[gmsh] 05/07: Imported Upstream version 2.9.3+dfsg1

Anton Gladky gladk at moszumanska.debian.org
Wed May 20 22:03:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository gmsh.

commit 15c506b1da33f697c54938ada7a11ddb16406246
Author: Anton Gladky <gladk at debian.org>
Date:   Wed May 20 23:59:10 2015 +0200

    Imported Upstream version 2.9.3+dfsg1
---
 CMakeLists.txt                                     |   188 +-
 CTestConfig.cmake                                  |     8 +-
 Common/CMakeLists.txt                              |     5 +-
 Common/Colors.h                                    |     2 +-
 Common/CommandLine.cpp                             |   106 +-
 Common/CommandLine.h                               |     2 +-
 Common/Context.cpp                                 |    13 +-
 Common/Context.h                                   |    29 +-
 Common/CreateFile.cpp                              |    43 +-
 Common/CreateFile.h                                |     2 +-
 Common/DefaultOptions.h                            |   186 +-
 Common/GamePad.cpp                                 |     3 +-
 Common/GamePad.h                                   |     2 +-
 Common/Gmsh.cpp                                    |    75 +-
 Common/Gmsh.h                                      |    14 +-
 Common/GmshConfig.h.in                             |     5 +-
 Common/GmshDefines.h                               |     6 +-
 Common/GmshIO.h                                    |     2 +-
 Common/GmshMessage.cpp                             |   226 +-
 Common/GmshMessage.h                               |    35 +-
 Common/GmshRemote.cpp                              |     4 +-
 Common/GmshRemote.h                                |     2 +-
 Common/GmshSocket.h                                |    18 +-
 Common/GmshVersion.h.in                            |     2 +-
 Common/Hash.h                                      |     2 +-
 Common/HashMap.h                                   |     2 +-
 Common/ListUtils.cpp                               |     2 +-
 Common/ListUtils.h                                 |     2 +-
 Common/Main.cpp                                    |     2 +-
 Common/MallocUtils.cpp                             |     2 +-
 Common/MallocUtils.h                               |     2 +-
 Common/OS.cpp                                      |   148 +-
 Common/OS.h                                        |     5 +-
 Common/Octree.cpp                                  |     2 +-
 Common/Octree.h                                    |     2 +-
 Common/OctreeInternals.cpp                         |     2 +-
 Common/OctreeInternals.h                           |     2 +-
 Common/OpenFile.cpp                                |    97 +-
 Common/OpenFile.h                                  |     4 +-
 Common/Options.cpp                                 |   250 +-
 Common/Options.h                                   |    24 +-
 Common/SmoothData.cpp                              |     2 +-
 Common/SmoothData.h                                |     2 +-
 Common/StringUtils.cpp                             |    28 +-
 Common/StringUtils.h                               |     2 +-
 Common/TreeUtils.cpp                               |     2 +-
 Common/TreeUtils.h                                 |     2 +-
 Common/VertexArray.cpp                             |     2 +-
 Common/VertexArray.h                               |     2 +-
 Common/gmshLocalNetworkClient.cpp                  |   858 +
 Common/gmshLocalNetworkClient.h                    |    86 +
 Common/gmshPopplerWrapper.cpp                      |     2 +-
 Common/gmshPopplerWrapper.h                        |     2 +-
 Common/onelab.h                                    |   386 +-
 Common/onelabUtils.cpp                             |   183 +-
 Common/onelabUtils.h                               |     8 +-
 Common/rtree.h                                     |  1639 +
 Fltk/CMakeLists.txt                                |    14 +-
 Fltk/FlGui.cpp                                     |   126 +-
 Fltk/FlGui.h                                       |    12 +-
 Fltk/Main.cpp                                      |     8 +-
 Fltk/Navigator.cpp                                 |     5 +-
 Fltk/Navigator.h                                   |     2 +-
 Fltk/classificationEditor.cpp                      |     2 +-
 Fltk/classificationEditor.h                        |     2 +-
 Fltk/clippingWindow.cpp                            |     3 +-
 Fltk/clippingWindow.h                              |     2 +-
 Fltk/colorbarWindow.cpp                            |     2 +-
 Fltk/colorbarWindow.h                              |     2 +-
 Fltk/contextWindow.cpp                             |     2 +-
 Fltk/contextWindow.h                               |     2 +-
 Fltk/drawContextFltk.h                             |     6 +-
 Fltk/drawContextFltkCairo.cpp                      |     2 +-
 Fltk/drawContextFltkCairo.h                        |     2 +-
 Fltk/drawContextFltkStringTexture.cpp              |     3 +-
 Fltk/drawContextFltkStringTexture.h                |     2 +-
 Fltk/extraDialogs.cpp                              |     2 +-
 Fltk/extraDialogs.h                                |     2 +-
 Fltk/fieldWindow.cpp                               |     2 +-
 Fltk/fieldWindow.h                                 |     2 +-
 Fltk/fileDialogs.cpp                               |     2 +-
 Fltk/fileDialogs.h                                 |     2 +-
 Fltk/gamepadWindow.cpp                             |     5 +-
 Fltk/gamepadWindow.h                               |     2 +-
 Fltk/gmshLocalNetworkClient.h                      |    66 -
 Fltk/graphicWindow.cpp                             |   105 +-
 Fltk/graphicWindow.h                               |     8 +-
 Fltk/helpWindow.cpp                                |    30 +-
 Fltk/helpWindow.h                                  |     2 +-
 Fltk/highOrderToolsWindow.cpp                      |    28 +-
 Fltk/highOrderToolsWindow.h                        |     2 +-
 Fltk/inputRange.h                                  |    19 +-
 Fltk/inputRegion.cpp                               |     2 +-
 Fltk/inputRegion.h                                 |     2 +-
 Fltk/inputValue.cpp                                |     2 +-
 Fltk/inputValue.h                                  |     2 +-
 Fltk/mainWindow.h                                  |     2 +-
 Fltk/manipWindow.cpp                               |     2 +-
 Fltk/manipWindow.h                                 |     2 +-
 Fltk/onelab2Group.cpp                              |  1030 +
 Fltk/onelab2Group.h                                |    95 +
 Fltk/onelabGroup.cpp                               |   965 +-
 Fltk/onelabGroup.h                                 |     2 +-
 Fltk/openglWindow.cpp                              |    82 +-
 Fltk/openglWindow.h                                |    10 +-
 Fltk/optionWindow.cpp                              |   102 +-
 Fltk/optionWindow.h                                |     6 +-
 Fltk/outputRange.h                                 |    18 +-
 Fltk/paletteWindow.h                               |     2 +-
 Fltk/partitionDialog.cpp                           |     2 +-
 Fltk/partitionDialog.h                             |     2 +-
 Fltk/pluginWindow.cpp                              |     2 +-
 Fltk/pluginWindow.h                                |     2 +-
 Fltk/projectionEditor.cpp                          |     2 +-
 Fltk/projectionEditor.h                            |     2 +-
 Fltk/solverButton.cpp                              |     5 +-
 Fltk/solverButton.h                                |     2 +-
 Fltk/spherePositionWidget.h                        |     2 +-
 Fltk/statisticsWindow.cpp                          |   275 +-
 Fltk/statisticsWindow.h                            |     4 +-
 Fltk/treeIcons.h                                   |    94 +
 Fltk/viewButton.cpp                                |    92 +-
 Fltk/viewButton.h                                  |     2 +-
 Fltk/visibilityWindow.cpp                          |     2 +-
 Fltk/visibilityWindow.h                            |     2 +-
 Geo/ACISEdge.cpp                                   |     2 +-
 Geo/ACISEdge.h                                     |     2 +-
 Geo/ACISFace.cpp                                   |     2 +-
 Geo/ACISFace.h                                     |     2 +-
 Geo/ACISVertex.h                                   |     2 +-
 Geo/CGNSOptions.h                                  |     2 +-
 Geo/CMakeLists.txt                                 |     3 +-
 Geo/Cell.cpp                                       |     2 +-
 Geo/Cell.h                                         |     2 +-
 Geo/CellComplex.cpp                                |     2 +-
 Geo/CellComplex.h                                  |     2 +-
 Geo/Chain.cpp                                      |     2 +-
 Geo/Chain.h                                        |     2 +-
 Geo/ChainComplex.cpp                               |     2 +-
 Geo/ChainComplex.h                                 |     2 +-
 Geo/Curvature.cpp                                  |     2 +-
 Geo/Curvature.h                                    |     2 +-
 Geo/CustomContainer.h                              |     2 +-
 Geo/ExtrudeParams.cpp                              |     2 +-
 Geo/ExtrudeParams.h                                |     2 +-
 Geo/GEdge.cpp                                      |     8 +-
 Geo/GEdge.h                                        |     8 +-
 Geo/GEdgeCompound.cpp                              |     2 +-
 Geo/GEdgeCompound.h                                |     2 +-
 Geo/GEdgeLoop.cpp                                  |     2 +-
 Geo/GEdgeLoop.h                                    |     2 +-
 Geo/GEntity.cpp                                    |     2 +-
 Geo/GEntity.h                                      |     6 +-
 Geo/GFace.cpp                                      |   166 +-
 Geo/GFace.h                                        |    14 +-
 Geo/GFaceCompound.cpp                              |    67 +-
 Geo/GFaceCompound.h                                |     2 +-
 Geo/GModel.cpp                                     |   197 +-
 Geo/GModel.h                                       |    40 +-
 Geo/GModelFactory.cpp                              |   142 +-
 Geo/GModelFactory.h                                |    13 +-
 Geo/GModelIO_ACIS.cpp                              |     2 +-
 Geo/GModelIO_ACTRAN.cpp                            |     2 +-
 Geo/GModelIO_BDF.cpp                               |     2 +-
 Geo/GModelIO_CGNS.cpp                              |     2 +-
 Geo/GModelIO_DIFF.cpp                              |     2 +-
 Geo/GModelIO_Fourier.cpp                           |     2 +-
 Geo/GModelIO_Fourier.h                             |     2 +-
 Geo/GModelIO_GEO.cpp                               |   240 +-
 Geo/GModelIO_GEOM.cpp                              |     2 +-
 Geo/GModelIO_INP.cpp                               |     7 +-
 Geo/GModelIO_IR3.cpp                               |     2 +-
 Geo/GModelIO_MAIL.cpp                              |     2 +-
 Geo/GModelIO_MED.cpp                               |    11 +-
 Geo/GModelIO_MESH.cpp                              |     2 +-
 Geo/GModelIO_MSH.cpp                               |     4 +-
 Geo/GModelIO_MSH2.cpp                              |     2 +-
 Geo/GModelIO_OCC.cpp                               |    80 +-
 Geo/GModelIO_OCC.h                                 |     9 +-
 Geo/GModelIO_P3D.cpp                               |     2 +-
 Geo/GModelIO_PLY.cpp                               |     2 +-
 Geo/GModelIO_POS.cpp                               |    10 +-
 Geo/GModelIO_SGEOM.cpp                             |   267 +-
 Geo/GModelIO_SGEOM.h                               |     7 +-
 Geo/GModelIO_STL.cpp                               |    18 +-
 Geo/GModelIO_SU2.cpp                               |     2 +-
 Geo/GModelIO_UNV.cpp                               |     8 +-
 Geo/GModelIO_VRML.cpp                              |     2 +-
 Geo/GModelIO_VTK.cpp                               |     2 +-
 Geo/GModelVertexArrays.cpp                         |     6 +-
 Geo/GPoint.h                                       |     2 +-
 Geo/GRbf.cpp                                       |    51 +-
 Geo/GRbf.h                                         |     2 +-
 Geo/GRegion.cpp                                    |     4 +-
 Geo/GRegion.h                                      |     2 +-
 Geo/GRegionCompound.cpp                            |     2 +-
 Geo/GRegionCompound.h                              |     2 +-
 Geo/GVertex.cpp                                    |     9 +-
 Geo/GVertex.h                                      |     7 +-
 Geo/GenericEdge.cpp                                |   210 +
 Geo/GenericEdge.h                                  |   111 +
 Geo/GenericFace.cpp                                |   266 +
 Geo/GenericFace.h                                  |   104 +
 Geo/GenericRegion.cpp                              |    28 +
 Geo/GenericRegion.h                                |    41 +
 Geo/GenericVertex.cpp                              |    64 +
 Geo/GenericVertex.h                                |    73 +
 Geo/Geo.cpp                                        |   127 +-
 Geo/Geo.h                                          |     7 +-
 Geo/GeoInterpolation.cpp                           |    49 +-
 Geo/GeoInterpolation.h                             |     2 +-
 Geo/GeoStringInterface.cpp                         |     8 +-
 Geo/GeoStringInterface.h                           |     2 +-
 Geo/GeomMeshMatcher.cpp                            |   175 +-
 Geo/GeomMeshMatcher.h                              |     2 +-
 Geo/Homology.cpp                                   |     2 +-
 Geo/Homology.h                                     |     2 +-
 Geo/MEdge.cpp                                      |     3 +-
 Geo/MEdge.h                                        |     2 +-
 Geo/MEdgeHash.h                                    |     2 +-
 Geo/MElement.cpp                                   |   301 +-
 Geo/MElement.h                                     |    65 +-
 Geo/MElementCut.cpp                                |    35 +-
 Geo/MElementCut.h                                  |    10 +-
 Geo/MElementOctree.cpp                             |     3 +-
 Geo/MElementOctree.h                               |     2 +-
 Geo/MFace.cpp                                      |     2 +-
 Geo/MFace.h                                        |     2 +-
 Geo/MFaceHash.h                                    |     2 +-
 Geo/MHexahedron.cpp                                |    67 +-
 Geo/MHexahedron.h                                  |    22 +-
 Geo/MLine.cpp                                      |    11 +-
 Geo/MLine.h                                        |    11 +-
 Geo/MPoint.h                                       |     4 +-
 Geo/MPrism.cpp                                     |   124 +-
 Geo/MPrism.h                                       |     8 +-
 Geo/MPyramid.cpp                                   |    29 +-
 Geo/MPyramid.h                                     |    10 +-
 Geo/MQuadrangle.cpp                                |   102 +-
 Geo/MQuadrangle.h                                  |     8 +-
 Geo/MSubElement.cpp                                |    18 +-
 Geo/MSubElement.h                                  |    18 +-
 Geo/MTetrahedron.cpp                               |    18 +-
 Geo/MTetrahedron.h                                 |    15 +-
 Geo/MTriangle.cpp                                  |    37 +-
 Geo/MTriangle.h                                    |    11 +-
 Geo/MVertex.cpp                                    |    44 +-
 Geo/MVertex.h                                      |    31 +-
 Geo/MVertexBoundaryLayerData.cpp                   |     2 +-
 Geo/MVertexBoundaryLayerData.h                     |     2 +-
 Geo/MVertexPositionSet.h                           |    91 -
 Geo/MVertexRTree.h                                 |    75 +
 Geo/MZone.cpp                                      |     2 +-
 Geo/MZone.h                                        |     2 +-
 Geo/MZoneBoundary.cpp                              |     2 +-
 Geo/MZoneBoundary.h                                |     2 +-
 Geo/OCCEdge.cpp                                    |    12 +-
 Geo/OCCEdge.h                                      |     3 +-
 Geo/OCCFace.cpp                                    |    40 +-
 Geo/OCCFace.h                                      |     3 +-
 Geo/OCCIncludes.h                                  |     2 +-
 Geo/OCCRegion.cpp                                  |    12 +-
 Geo/OCCRegion.h                                    |     3 +-
 Geo/OCCVertex.cpp                                  |     2 +-
 Geo/OCCVertex.h                                    |     2 +-
 Geo/OCC_Connect.cpp                                |     4 +-
 Geo/OCC_Connect.h                                  |     2 +-
 Geo/Pair.h                                         |     2 +-
 Geo/Range.h                                        |     2 +-
 Geo/SBoundingBox3d.h                               |     2 +-
 Geo/SGEOMIncludes.h                                |     2 +-
 Geo/SOrientedBoundingBox.cpp                       |     8 +-
 Geo/SOrientedBoundingBox.h                         |     2 +-
 Geo/SPoint2.h                                      |     6 +-
 Geo/SPoint3.h                                      |     4 +-
 Geo/STensor3.cpp                                   |     9 +-
 Geo/STensor3.h                                     |    16 +-
 Geo/SVector3.h                                     |     8 +-
 Geo/boundaryLayersData.cpp                         |    55 +-
 Geo/boundaryLayersData.h                           |     2 +-
 Geo/closestPoint.cpp                               |     5 +
 Geo/closestPoint.h                                 |     9 +
 Geo/discreteEdge.cpp                               |     2 +-
 Geo/discreteEdge.h                                 |     2 +-
 Geo/discreteFace.cpp                               |     2 +-
 Geo/discreteFace.h                                 |     2 +-
 Geo/discreteRegion.cpp                             |     2 +-
 Geo/discreteRegion.h                               |     2 +-
 Geo/discreteVertex.h                               |     2 +-
 Geo/findLinks.cpp                                  |     2 +-
 Geo/findLinks.h                                    |     2 +-
 Geo/fourierEdge.cpp                                |     2 +-
 Geo/fourierEdge.h                                  |     2 +-
 Geo/fourierFace.cpp                                |     2 +-
 Geo/fourierFace.h                                  |     2 +-
 Geo/fourierProjectionFace.cpp                      |     2 +-
 Geo/fourierProjectionFace.h                        |     2 +-
 Geo/fourierVertex.h                                |     2 +-
 Geo/gmshEdge.cpp                                   |     2 +-
 Geo/gmshEdge.h                                     |     2 +-
 Geo/gmshEdgeDiscretize.cpp                         |   187 +-
 Geo/gmshFace.cpp                                   |     3 +-
 Geo/gmshFace.h                                     |     2 +-
 Geo/gmshLevelset.cpp                               |   277 +-
 Geo/gmshLevelset.h                                 |   460 +-
 Geo/gmshRegion.cpp                                 |     2 +-
 Geo/gmshRegion.h                                   |     2 +-
 Geo/gmshSurface.cpp                                |     2 +-
 Geo/gmshSurface.h                                  |     2 +-
 Geo/gmshVertex.cpp                                 |    20 +-
 Geo/gmshVertex.h                                   |     7 +-
 Geo/intersectCurveSurface.cpp                      |     2 +-
 Geo/intersectCurveSurface.h                        |     2 +-
 Geo/partitionEdge.h                                |     2 +-
 Geo/partitionFace.h                                |     2 +-
 Geo/partitionVertex.h                              |     2 +-
 Graphics/CMakeLists.txt                            |     2 +-
 Graphics/Camera.cpp                                |    75 +-
 Graphics/Camera.h                                  |     2 +-
 Graphics/PixelBuffer.h                             |     2 +-
 Graphics/ReadImg.cpp                               |     2 +-
 Graphics/ReadImg.h                                 |     2 +-
 Graphics/drawAxes.cpp                              |     2 +-
 Graphics/drawContext.cpp                           |    82 +-
 Graphics/drawContext.h                             |    18 +-
 Graphics/drawGeom.cpp                              |    22 +-
 Graphics/drawGlyph.cpp                             |    73 +-
 Graphics/drawGraph2d.cpp                           |   143 +-
 Graphics/drawMesh.cpp                              |     2 +-
 Graphics/drawPost.cpp                              |     2 +-
 Graphics/drawScales.cpp                            |    33 +-
 Graphics/gl2gif.cpp                                |     2 +-
 Graphics/gl2gif.h                                  |     2 +-
 Graphics/gl2jpeg.cpp                               |     2 +-
 Graphics/gl2jpeg.h                                 |     2 +-
 Graphics/gl2pgf.cpp                                |     2 +-
 Graphics/gl2pgf.h                                  |     2 +-
 Graphics/gl2png.cpp                                |     2 +-
 Graphics/gl2png.h                                  |     2 +-
 Graphics/gl2ppm.cpp                                |     2 +-
 Graphics/gl2ppm.h                                  |     2 +-
 Graphics/gl2yuv.cpp                                |     2 +-
 Graphics/gl2yuv.h                                  |     2 +-
 Mesh/BDS.cpp                                       |    35 +-
 Mesh/BDS.h                                         |     2 +-
 Mesh/BGMBase.cpp                                   |   289 +
 Mesh/BGMBase.h                                     |    97 +
 Mesh/BackgroundMesh.cpp                            |   594 +-
 Mesh/BackgroundMesh.h                              |    47 +-
 Mesh/BackgroundMesh2D.cpp                          |   734 +
 Mesh/BackgroundMesh2D.h                            |   140 +
 Mesh/BackgroundMesh3D.cpp                          |  1170 +
 Mesh/BackgroundMesh3D.h                            |   163 +
 Mesh/BackgroundMeshManager.cpp                     |    65 +
 Mesh/BackgroundMeshManager.h                       |    30 +
 Mesh/BackgroundMeshTools.cpp                       |   411 +
 Mesh/BackgroundMeshTools.h                         |    30 +
 Mesh/BoundaryLayers.cpp                            |     2 +-
 Mesh/BoundaryLayers.h                              |     2 +-
 Mesh/CMakeLists.txt                                |     9 +-
 Mesh/CenterlineField.cpp                           |   137 +-
 Mesh/CenterlineField.h                             |     2 +-
 Mesh/DivideAndConquer.cpp                          |    25 +-
 Mesh/Field.cpp                                     |   120 +-
 Mesh/Field.h                                       |    26 +-
 Mesh/FieldPython.h                                 |     7 +
 Mesh/Generator.cpp                                 |   188 +-
 Mesh/Generator.h                                   |     2 +-
 Mesh/HighOrder.cpp                                 |   286 +-
 Mesh/HighOrder.h                                   |     2 +-
 Mesh/Levy3D.cpp                                    |     2 +-
 Mesh/Levy3D.h                                      |     2 +-
 Mesh/QuadTriExtruded2D.cpp                         |   357 +-
 Mesh/QuadTriExtruded2D.h                           |    85 +-
 Mesh/QuadTriExtruded3D.cpp                         |   850 +-
 Mesh/QuadTriExtruded3D.h                           |    70 +-
 Mesh/QuadTriTransfinite3D.cpp                      |     2 +-
 Mesh/QuadTriTransfinite3D.h                        |     2 +-
 Mesh/QuadTriUtils.cpp                              |   274 +-
 Mesh/QuadTriUtils.h                                |    69 +-
 Mesh/Voronoi3D.cpp                                 |     2 +-
 Mesh/Voronoi3D.h                                   |     2 +-
 Mesh/cross3D.h                                     |   157 +-
 Mesh/directions3D.cpp                              |   311 +-
 Mesh/directions3D.h                                |     4 +-
 Mesh/filterElements.cpp                            |    31 +-
 Mesh/filterElements.h                              |    31 +-
 Mesh/meshGEdge.cpp                                 |     7 +-
 Mesh/meshGEdge.h                                   |     2 +-
 Mesh/meshGEdgeExtruded.cpp                         |     2 +-
 Mesh/meshGFace.cpp                                 |   447 +-
 Mesh/meshGFace.h                                   |     2 +-
 Mesh/meshGFaceBDS.cpp                              |    42 +-
 Mesh/meshGFaceBDS.h                                |     2 +-
 Mesh/meshGFaceBamg.cpp                             |     4 +-
 Mesh/meshGFaceBamg.h                               |     2 +-
 Mesh/meshGFaceDelaunayInsertion.cpp                |   827 +-
 Mesh/meshGFaceDelaunayInsertion.h                  |     2 +-
 Mesh/meshGFaceElliptic.cpp                         |   102 +-
 Mesh/meshGFaceElliptic.h                           |     2 +-
 Mesh/meshGFaceExtruded.cpp                         |   129 +-
 Mesh/meshGFaceLloyd.cpp                            |     2 +-
 Mesh/meshGFaceOptimize.cpp                         |   154 +-
 Mesh/meshGFaceOptimize.h                           |     2 +-
 Mesh/meshGFaceQuadrilateralize.cpp                 |     2 +-
 Mesh/meshGFaceQuadrilateralize.h                   |     2 +-
 Mesh/meshGFaceTransfinite.cpp                      |     2 +-
 Mesh/meshGRegion.cpp                               |   263 +-
 Mesh/meshGRegion.h                                 |     2 +-
 Mesh/meshGRegionCarveHole.cpp                      |     2 +-
 Mesh/meshGRegionDelaunayInsertion.cpp              |   104 +-
 Mesh/meshGRegionDelaunayInsertion.h                |    10 +-
 Mesh/meshGRegionExtruded.cpp                       |    82 +-
 Mesh/meshGRegionLocalMeshMod.cpp                   |    38 +-
 Mesh/meshGRegionLocalMeshMod.h                     |    16 +-
 Mesh/meshGRegionMMG3D.cpp                          |     4 +-
 Mesh/meshGRegionMMG3D.h                            |     2 +-
 Mesh/meshGRegionTransfinite.cpp                    |     2 +-
 Mesh/meshMetric.cpp                                |     2 +-
 Mesh/meshMetric.h                                  |     2 +-
 Mesh/meshPartition.cpp                             |     2 +-
 Mesh/meshPartition.h                               |     2 +-
 Mesh/meshPartitionObjects.h                        |     2 +-
 Mesh/meshPartitionOptions.h                        |     2 +-
 Mesh/meshRefine.cpp                                |   583 +-
 Mesh/multiscalePartition.cpp                       |    42 +-
 Mesh/multiscalePartition.h                         |     2 +-
 Mesh/periodical.cpp                                |   338 +-
 Mesh/periodical.h                                  |     8 +-
 Mesh/pointInsertion.cpp                            |   778 +
 Mesh/pointInsertion.h                              |    43 +
 Mesh/pointInsertionRTreeTools.cpp                  |   199 +
 Mesh/pointInsertionRTreeTools.h                    |   254 +
 Mesh/qualityMeasures.cpp                           |   806 +-
 Mesh/qualityMeasures.h                             |   148 +-
 Mesh/simple3D.cpp                                  |   206 +-
 Mesh/simple3D.h                                    |    10 +-
 Mesh/surfaceFiller.cpp                             |   352 +-
 Mesh/surfaceFiller.h                               |    17 +-
 Mesh/yamakawa.cpp                                  |  3350 ++-
 Mesh/yamakawa.h                                    |   420 +-
 Numeric/BasisFactory.cpp                           |    95 +-
 Numeric/BasisFactory.h                             |    75 +-
 Numeric/BergotBasis.cpp                            |     2 +-
 Numeric/BergotBasis.h                              |     2 +-
 Numeric/CMakeLists.txt                             |     6 +-
 Numeric/CondNumBasis.cpp                           |   566 +
 Numeric/CondNumBasis.h                             |   125 +
 Numeric/ConjugateGradients.cpp                     |   137 +
 Numeric/ConjugateGradients.h                       |    18 +
 Numeric/ElementType.cpp                            |    30 +-
 Numeric/ElementType.h                              |     2 +-
 Numeric/FuncSpaceData.cpp                          |   107 +
 Numeric/FuncSpaceData.h                            |   102 +
 Numeric/GaussIntegration.cpp                       |     2 +-
 Numeric/GaussIntegration.h                         |     2 +-
 Numeric/GaussJacobi1D.cpp                          |     2 +-
 Numeric/GaussJacobi1D.h                            |     2 +-
 Numeric/GaussLegendre1D.h                          |     2 +-
 Numeric/GaussLegendreSimplex.cpp                   |     2 +-
 Numeric/GaussQuadratureHex.cpp                     |    77 +-
 Numeric/GaussQuadratureLin.cpp                     |    13 +-
 Numeric/GaussQuadraturePri.cpp                     |    13 +-
 Numeric/GaussQuadraturePyr.cpp                     |    16 +-
 Numeric/GaussQuadratureQuad.cpp                    |    63 +-
 Numeric/GaussQuadratureTet.cpp                     |     2 +-
 Numeric/GaussQuadratureTri.cpp                     |    25 +-
 Numeric/HilbertCurve.cpp                           |     2 +-
 Numeric/HilbertCurve.h                             |     2 +-
 Numeric/Iso.cpp                                    |     2 +-
 Numeric/Iso.h                                      |     2 +-
 Numeric/JacobianBasis.cpp                          |   790 +-
 Numeric/JacobianBasis.h                            |   254 +-
 Numeric/MetricBasis.cpp                            |  1688 +-
 Numeric/MetricBasis.h                              |   130 +-
 Numeric/Numeric.cpp                                |   415 +-
 Numeric/Numeric.h                                  |    21 +-
 Numeric/approximationError.cpp                     |    32 +
 Numeric/approximationError.h                       |    19 +
 Numeric/bezierBasis.cpp                            |   276 +-
 Numeric/bezierBasis.h                              |    59 +-
 Numeric/cartesian.h                                |     2 +-
 Numeric/decasteljau.cpp                            |     3 +-
 Numeric/decasteljau.h                              |     2 +-
 Numeric/discreteFrechetDistance.cpp                |     6 +-
 Numeric/discreteFrechetDistance.h                  |    10 +-
 Numeric/fullMatrix.cpp                             |     3 +-
 Numeric/fullMatrix.h                               |    12 +-
 Numeric/hausdorffDistance.cpp                      |    48 +-
 Numeric/jacobiPolynomials.cpp                      |    18 +-
 Numeric/jacobiPolynomials.h                        |     2 +-
 Numeric/legendrePolynomials.cpp                    |     2 +-
 Numeric/legendrePolynomials.h                      |     2 +-
 Numeric/mathEvaluator.cpp                          |     2 +-
 Numeric/mathEvaluator.h                            |     2 +-
 Numeric/miniBasis.cpp                              |    80 +-
 Numeric/miniBasis.h                                |    18 +-
 Numeric/nodalBasis.cpp                             |    29 +-
 Numeric/nodalBasis.h                               |    24 +-
 Numeric/pointsGenerators.cpp                       |   270 +-
 Numeric/pointsGenerators.h                         |    15 +-
 Numeric/polynomialBasis.cpp                        |     2 +-
 Numeric/polynomialBasis.h                          |     3 +-
 Numeric/pyramidalBasis.cpp                         |    40 +-
 Numeric/pyramidalBasis.h                           |     7 +-
 Numeric/robustPredicates.h                         |     2 +-
 Numeric/simpleFunction.h                           |    29 +-
 Numeric/simpleFunctionPython.h                     |     7 +
 Parser/CMakeLists.txt                              |     2 +-
 Parser/FunctionManager.cpp                         |    25 +-
 Parser/FunctionManager.h                           |     8 +-
 Parser/Gmsh.l                                      |     6 +-
 Parser/Gmsh.tab.cpp                                | 10227 ++++---
 Parser/Gmsh.tab.hpp                                |   482 +-
 Parser/Gmsh.y                                      |   528 +-
 Parser/Gmsh.yy.cpp                                 |  1412 +-
 Parser/Parser.h                                    |     2 +-
 Plugin/AnalyseCurvedMesh.cpp                       |   359 +-
 Plugin/AnalyseCurvedMesh.h                         |    58 +-
 Plugin/Annotate.cpp                                |     2 +-
 Plugin/Annotate.h                                  |     2 +-
 Plugin/Bubbles.cpp                                 |     2 +-
 Plugin/Bubbles.h                                   |     2 +-
 Plugin/CMakeLists.txt                              |     5 +-
 Plugin/Crack.cpp                                   |     2 +-
 Plugin/Crack.h                                     |     2 +-
 Plugin/Curl.cpp                                    |     2 +-
 Plugin/Curl.h                                      |     2 +-
 Plugin/CutBox.cpp                                  |     2 +-
 Plugin/CutBox.h                                    |     2 +-
 Plugin/CutGrid.cpp                                 |     2 +-
 Plugin/CutGrid.h                                   |     2 +-
 Plugin/CutMesh.cpp                                 |     2 +-
 Plugin/CutMesh.h                                   |     2 +-
 Plugin/CutParametric.cpp                           |     2 +-
 Plugin/CutParametric.h                             |     2 +-
 Plugin/CutPlane.cpp                                |     2 +-
 Plugin/CutPlane.h                                  |     2 +-
 Plugin/CutSphere.cpp                               |     2 +-
 Plugin/CutSphere.h                                 |     2 +-
 Plugin/DiscretizationError.cpp                     |     2 +-
 Plugin/DiscretizationError.h                       |     2 +-
 Plugin/Distance.cpp                                |     2 +-
 Plugin/Distance.h                                  |     2 +-
 Plugin/Divergence.cpp                              |     2 +-
 Plugin/Divergence.h                                |     2 +-
 Plugin/DuplicateBoundaries.cpp                     |  4840 +++
 Plugin/DuplicateBoundaries.h                       |    39 +
 Plugin/Eigenvalues.cpp                             |     2 +-
 Plugin/Eigenvalues.h                               |     2 +-
 Plugin/Eigenvectors.cpp                            |     2 +-
 Plugin/Eigenvectors.h                              |     2 +-
 Plugin/ExtractEdges.cpp                            |     2 +-
 Plugin/ExtractEdges.h                              |     2 +-
 Plugin/ExtractElements.cpp                         |     2 +-
 Plugin/ExtractElements.h                           |     2 +-
 Plugin/FaultZone.cpp                               |   111 +-
 Plugin/FaultZone.h                                 |     2 +-
 Plugin/FieldFromAmplitudePhase.cpp                 |     2 +-
 Plugin/FieldFromAmplitudePhase.h                   |     2 +-
 Plugin/Gradient.cpp                                |     2 +-
 Plugin/Gradient.h                                  |     2 +-
 Plugin/HarmonicToTime.cpp                          |     2 +-
 Plugin/HarmonicToTime.h                            |     2 +-
 Plugin/HomologyComputation.cpp                     |     2 +-
 Plugin/HomologyComputation.h                       |     2 +-
 Plugin/HomologyPostProcessing.cpp                  |     2 +-
 Plugin/HomologyPostProcessing.h                    |     2 +-
 Plugin/Integrate.cpp                               |    21 +-
 Plugin/Integrate.h                                 |     2 +-
 Plugin/Isosurface.cpp                              |     2 +-
 Plugin/Isosurface.h                                |     2 +-
 Plugin/Lambda2.cpp                                 |     2 +-
 Plugin/Lambda2.h                                   |     2 +-
 Plugin/Levelset.cpp                                |    50 +-
 Plugin/Levelset.h                                  |     2 +-
 Plugin/LongitudeLatitude.cpp                       |     3 +-
 Plugin/LongitudeLatitude.h                         |     2 +-
 Plugin/MakeSimplex.cpp                             |     2 +-
 Plugin/MakeSimplex.h                               |     2 +-
 Plugin/MathEval.cpp                                |     2 +-
 Plugin/MathEval.h                                  |     2 +-
 Plugin/MeshSubEntities.cpp                         |   151 +
 Plugin/MeshSubEntities.h                           |    31 +
 Plugin/MinMax.cpp                                  |    19 +-
 Plugin/MinMax.h                                    |     2 +-
 Plugin/ModifyComponent.cpp                         |     3 +-
 Plugin/ModifyComponent.h                           |     2 +-
 Plugin/ModulusPhase.cpp                            |     2 +-
 Plugin/ModulusPhase.h                              |     2 +-
 Plugin/NearToFarField.cpp                          |     2 +-
 Plugin/NearToFarField.h                            |     2 +-
 Plugin/NearestNeighbor.cpp                         |     2 +-
 Plugin/NearestNeighbor.h                           |     2 +-
 Plugin/NewView.cpp                                 |     2 +-
 Plugin/NewView.h                                   |     2 +-
 Plugin/Particles.cpp                               |     2 +-
 Plugin/Particles.h                                 |     2 +-
 Plugin/Plugin.cpp                                  |     2 +-
 Plugin/Plugin.h                                    |     2 +-
 Plugin/PluginManager.cpp                           |    10 +-
 Plugin/PluginManager.h                             |     2 +-
 Plugin/Probe.cpp                                   |     2 +-
 Plugin/Probe.h                                     |     2 +-
 Plugin/Remove.cpp                                  |     2 +-
 Plugin/Remove.h                                    |     2 +-
 Plugin/Scal2Tens.cpp                               |     2 +-
 Plugin/Scal2Tens.h                                 |     2 +-
 Plugin/Scal2Vec.cpp                                |     2 +-
 Plugin/Scal2Vec.h                                  |     2 +-
 Plugin/SimplePartition.cpp                         |     2 +-
 Plugin/SimplePartition.h                           |     2 +-
 Plugin/Skin.cpp                                    |     2 +-
 Plugin/Skin.h                                      |     2 +-
 Plugin/Smooth.cpp                                  |     2 +-
 Plugin/Smooth.h                                    |     2 +-
 Plugin/SphericalRaise.cpp                          |     2 +-
 Plugin/SphericalRaise.h                            |     2 +-
 Plugin/StreamLines.cpp                             |     2 +-
 Plugin/StreamLines.h                               |     2 +-
 Plugin/Tetrahedralize.cpp                          |     2 +-
 Plugin/Tetrahedralize.h                            |     2 +-
 Plugin/Transform.cpp                               |     2 +-
 Plugin/Transform.h                                 |     2 +-
 Plugin/Triangulate.cpp                             |   201 +-
 Plugin/Triangulate.h                               |     2 +-
 Plugin/Warp.cpp                                    |     2 +-
 Plugin/Warp.h                                      |     2 +-
 Post/CMakeLists.txt                                |     2 +-
 Post/ColorTable.cpp                                |     3 +-
 Post/ColorTable.h                                  |     2 +-
 Post/OctreePost.cpp                                |   172 +-
 Post/OctreePost.h                                  |    27 +-
 Post/PView.cpp                                     |     2 +-
 Post/PView.h                                       |     2 +-
 Post/PViewAsSimpleFunction.cpp                     |     2 +-
 Post/PViewAsSimpleFunction.h                       |     2 +-
 Post/PViewData.cpp                                 |    26 +-
 Post/PViewData.h                                   |    14 +-
 Post/PViewDataGModel.cpp                           |    69 +-
 Post/PViewDataGModel.h                             |     3 +-
 Post/PViewDataGModelIO.cpp                         |     3 +-
 Post/PViewDataIO.cpp                               |     2 +-
 Post/PViewDataList.cpp                             |     6 +-
 Post/PViewDataList.h                               |     2 +-
 Post/PViewDataListIO.cpp                           |    65 +-
 Post/PViewDataRemote.h                             |     2 +-
 Post/PViewFactory.cpp                              |     2 +-
 Post/PViewFactory.h                                |     2 +-
 Post/PViewIO.cpp                                   |     2 +-
 Post/PViewOptions.cpp                              |     2 +-
 Post/PViewOptions.h                                |     6 +-
 Post/PViewVertexArrays.cpp                         |     3 +-
 Post/adaptiveData.cpp                              |   271 +-
 Post/adaptiveData.h                                |    81 +-
 Post/shapeFunctions.cpp                            |     2 +-
 Post/shapeFunctions.h                              |     2 +-
 Qt/CMakeLists.txt                                  |     2 +-
 Qt/GLWidget.cpp                                    |     2 +-
 Qt/GLWidget.h                                      |     2 +-
 Qt/Main.cpp                                        |     2 +-
 Qt/QGui.cpp                                        |     2 +-
 Qt/QGui.h                                          |     2 +-
 Qt/graphicWindow.cpp                               |     2 +-
 Qt/graphicWindow.h                                 |     2 +-
 README.txt                                         |     5 +-
 Solver/CMakeLists.txt                              |     3 +-
 Solver/FuncGradDisc.h                              |     2 +-
 Solver/FuncHeaviside.h                             |     2 +-
 Solver/SElement.cpp                                |     2 +-
 Solver/SElement.h                                  |     2 +-
 Solver/STensor33.cpp                               |     2 +-
 Solver/STensor33.h                                 |     5 +-
 Solver/STensor43.cpp                               |     2 +-
 Solver/STensor43.h                                 |     9 +-
 Solver/STensor53.cpp                               |     2 +-
 Solver/STensor53.h                                 |     2 +-
 Solver/STensor63.cpp                               |     2 +-
 Solver/STensor63.h                                 |     2 +-
 Solver/crossConfTerm.h                             |     2 +-
 Solver/distanceTerm.h                              |     2 +-
 Solver/dofManager.cpp                              |     2 +-
 Solver/dofManager.h                                |     2 +-
 Solver/eigenSolver.cpp                             |    33 +-
 Solver/eigenSolver.h                               |    14 +-
 Solver/elasticitySolver.cpp                        |   520 +-
 Solver/elasticitySolver.h                          |    18 +-
 Solver/elasticityTerm.cpp                          |     2 +-
 Solver/elasticityTerm.h                            |     2 +-
 Solver/femTerm.h                                   |    80 +-
 Solver/filters.cpp                                 |     2 +-
 Solver/filters.h                                   |     2 +-
 Solver/frameSolver.h                               |     2 +-
 Solver/functionSpace.cpp                           |     2 +-
 Solver/functionSpace.h                             |    17 +-
 Solver/groupOfElements.cpp                         |     2 +-
 Solver/groupOfElements.h                           |     2 +-
 Solver/helmholtzTerm.h                             |     5 +-
 Solver/laplaceTerm.h                               |     2 +-
 Solver/linearSystem.cpp                            |     2 +-
 Solver/linearSystem.h                              |     2 +-
 Solver/linearSystemCSR.cpp                         |     2 +-
 Solver/linearSystemCSR.h                           |     2 +-
 Solver/linearSystemFull.h                          |     2 +-
 Solver/linearSystemGMM.h                           |     2 +-
 Solver/linearSystemMUMPS.cpp                       |     2 +-
 Solver/linearSystemMUMPS.h                         |     2 +-
 Solver/linearSystemPETSc.cpp                       |     2 +-
 Solver/linearSystemPETSc.h                         |    16 +-
 Solver/linearSystemPETSc.hpp                       |    26 +-
 Solver/materialLaw.h                               |     2 +-
 Solver/multiscaleLaplace.cpp                       |    42 +-
 Solver/multiscaleLaplace.h                         |     2 +-
 Solver/orthogonalTerm.h                            |     2 +-
 Solver/quadratureRules.h                           |     2 +-
 Solver/solverAlgorithms.h                          |     2 +-
 Solver/solverField.h                               |     2 +-
 Solver/sparsityPattern.cpp                         |     2 +-
 Solver/sparsityPattern.h                           |     2 +-
 Solver/terms.cpp                                   |    27 +-
 Solver/terms.h                                     |    32 +-
 Solver/terms.hpp                                   |    40 +-
 Solver/thermicSolver.cpp                           |   318 +
 Solver/thermicSolver.h                             |   100 +
 contrib/ANN/CMakeLists.txt                         |     2 +-
 contrib/Chaco/CMakeLists.txt                       |     2 +-
 contrib/Chaco/main/Gmsh_printf.cpp                 |     1 +
 contrib/DiscreteIntegration/CMakeLists.txt         |     2 +-
 contrib/DiscreteIntegration/README.txt             |    23 +
 contrib/HighOrderMeshOptimizer/CADDistances.cpp    |   589 +
 contrib/HighOrderMeshOptimizer/CADDistances.h      |    43 +
 contrib/HighOrderMeshOptimizer/CMakeLists.txt      |     4 +-
 contrib/HighOrderMeshOptimizer/OptHOM.cpp          |   329 +-
 contrib/HighOrderMeshOptimizer/OptHOM.h            |    22 +-
 contrib/HighOrderMeshOptimizer/OptHomCADDist.cpp   |   246 +
 contrib/HighOrderMeshOptimizer/OptHomCADDist.h     |    31 +
 contrib/HighOrderMeshOptimizer/OptHomElastic.cpp   |     2 +-
 .../HighOrderMeshOptimizer/OptHomFastCurving.cpp   |     3 +-
 .../OptHomIntegralBoundaryDist.cpp                 |    32 +-
 .../OptHomIntegralBoundaryDist.h                   |     1 +
 contrib/HighOrderMeshOptimizer/OptHomMesh.cpp      |   114 +-
 contrib/HighOrderMeshOptimizer/OptHomMesh.h        |    17 +
 .../OptHomObjContribCADDist.h                      |   108 +
 .../OptHomObjContribCADDistOld.h                   |    96 +
 .../OptHomObjContribMetricMin.h                    |    98 +
 .../OptHomObjContribScaledJac.h                    |    98 +
 contrib/HighOrderMeshOptimizer/OptHomRun.cpp       |   625 +-
 contrib/HighOrderMeshOptimizer/OptHomRun.h         |    13 +-
 contrib/HighOrderMeshOptimizer/README.txt          |    23 +
 contrib/MathEx/CMakeLists.txt                      |     2 +-
 contrib/MeshOptimizer/CMakeLists.txt               |    18 +
 contrib/MeshOptimizer/MeshOpt.cpp                  |   254 +
 contrib/MeshOptimizer/MeshOpt.h                    |    77 +
 contrib/MeshOptimizer/MeshOptCommon.cpp            |   136 +
 contrib/MeshOptimizer/MeshOptCommon.h              |    93 +
 contrib/MeshOptimizer/MeshOptObjContrib.cpp        |    19 +
 contrib/MeshOptimizer/MeshOptObjContrib.h          |    41 +
 contrib/MeshOptimizer/MeshOptObjContribFunc.cpp    |   101 +
 contrib/MeshOptimizer/MeshOptObjContribFunc.h      |   190 +
 .../MeshOptObjContribScaledNodeDispSq.h            |    95 +
 contrib/MeshOptimizer/MeshOptObjectiveFunction.cpp |   108 +
 contrib/MeshOptimizer/MeshOptObjectiveFunction.h   |    31 +
 contrib/MeshOptimizer/MeshOptPatch.cpp             |   837 +
 contrib/MeshOptimizer/MeshOptPatch.h               |   187 +
 contrib/MeshOptimizer/MeshOptVertexCoord.cpp       |   223 +
 contrib/MeshOptimizer/MeshOptVertexCoord.h         |   144 +
 contrib/MeshOptimizer/MeshOptimizer.cpp            |   624 +
 contrib/MeshOptimizer/MeshOptimizer.h              |    41 +
 .../MeshOptimizer/doc/figures/log_barrier/Makefile |     4 +
 .../doc/figures/log_barrier/log_barrier.pdf        |   Bin 0 -> 28796 bytes
 .../doc/figures/log_barrier/log_barrier.tex        |    16 +
 .../doc/figures/log_barrier/log_barrier_max.pdf    |   Bin 0 -> 28746 bytes
 .../doc/figures/log_barrier/log_barrier_max.tex    |    17 +
 .../doc/figures/opti_process/Makefile              |     4 +
 .../doc/figures/opti_process/opti2.dat             |    71 +
 .../doc/figures/opti_process/opti_process.pdf      |   Bin 0 -> 60448 bytes
 .../doc/figures/opti_process/opti_process.tex      |    40 +
 .../doc/figures/patches/patch_def.png              |   Bin 0 -> 15744 bytes
 .../doc/figures/patches/patch_tangled.png          |   Bin 0 -> 16690 bytes
 .../doc/figures/patches/patch_untangled.png        |   Bin 0 -> 15945 bytes
 .../MeshOptimizer/doc/figures/patches/patchdef.xcf |   Bin 0 -> 86327 bytes
 .../doc/figures/untangling/linear.pdf              |   Bin 0 -> 18894 bytes
 .../MeshOptimizer/doc/figures/untangling/p2.pdf    |   Bin 0 -> 19114 bytes
 .../doc/figures/untangling/p2_bad.pdf              |   Bin 0 -> 18933 bytes
 contrib/MeshOptimizer/doc/mesh_optimization.tex    |   831 +
 contrib/MeshQualityOptimizer/CMakeLists.txt        |    11 +
 .../MeshQualityObjContribIdealJac.h                |    98 +
 .../MeshQualityObjContribInvCond.h                 |    98 +
 .../MeshQualityOptimizer/MeshQualityOptimizer.cpp  |   171 +
 .../MeshQualityOptimizer/MeshQualityOptimizer.h    |    73 +
 contrib/MeshQualityOptimizer/README.txt            |    23 +
 contrib/Netgen/CMakeLists.txt                      |     2 +-
 contrib/Parasolid/CMakeLists.txt                   |     6 +
 contrib/Parasolid/interface_parasolid/Makefile     |    50 +
 .../interface_parasolid/ParasolidDataBase.cpp      |   731 +
 .../interface_parasolid/ParasolidDataBase.h        |   100 +
 .../interface_parasolid/ParasolidGModelBuilder.cpp |   818 +
 .../interface_parasolid/ParasolidGModelBuilder.h   |    52 +
 .../Parasolid/interface_parasolid/callbacks.cpp    |  1037 +
 contrib/Parasolid/interface_parasolid/callbacks.h  |    55 +
 contrib/Parasolid/interface_parasolid/fg.c         |   827 +
 contrib/Parasolid/interface_parasolid/frustrum.c   |  2720 ++
 .../Parasolid/interface_parasolid/frustrum_delta.c |   415 +
 .../interface_parasolid/include/frustrum_ifails.h  |    47 +
 .../include/frustrum_interface.h                   |    43 +
 .../interface_parasolid/include/frustrum_tokens.h  |   153 +
 .../interface_parasolid/include/kernel_interface.h |  3259 ++
 .../interface_parasolid/include/parasolid_debug.h  |   504 +
 .../interface_parasolid/include/parasolid_ifails.h |   657 +
 .../interface_parasolid/include/parasolid_kernel.h | 29735 +++++++++++++++++++
 .../interface_parasolid/include/parasolid_tokens.h |   737 +
 .../include/parasolid_typedefs.h                   |   181 +
 contrib/Parasolid/interface_parasolid/main.c       |   386 +
 .../interface_parasolid/schema/sch_0_15.sch_txt    |   584 +
 .../interface_parasolid/schema/sch_10002.sch_txt   |  1236 +
 .../interface_parasolid/schema/sch_10004.sch_txt   |  1238 +
 .../schema/sch_100_1000.sch_txt                    |   586 +
 .../interface_parasolid/schema/sch_10100.sch_txt   |  1252 +
 .../interface_parasolid/schema/sch_1022.sch_txt    |   738 +
 .../interface_parasolid/schema/sch_11003.sch_txt   |  1254 +
 .../interface_parasolid/schema/sch_11004.sch_txt   |  1254 +
 .../interface_parasolid/schema/sch_110_0.sch_txt   |   586 +
 .../interface_parasolid/schema/sch_12006.sch_txt   |  1274 +
 .../interface_parasolid/schema/sch_120_0.sch_txt   |   586 +
 .../interface_parasolid/schema/sch_12102.sch_txt   |  1276 +
 .../interface_parasolid/schema/sch_12103.sch_txt   |  1279 +
 .../interface_parasolid/schema/sch_13005.sch_txt   |  1279 +
 .../interface_parasolid/schema/sch_13006.sch_txt   |  1280 +
 .../interface_parasolid/schema/sch_130_0.sch_txt   |   586 +
 .../interface_parasolid/schema/sch_14000.sch_txt   |  1281 +
 .../interface_parasolid/schema/sch_140_0.sch_txt   |   586 +
 .../interface_parasolid/schema/sch_15003.sch_txt   |  1286 +
 .../interface_parasolid/schema/sch_15102.sch_txt   |  1298 +
 .../interface_parasolid/schema/sch_16002.sch_txt   |  1302 +
 .../interface_parasolid/schema/sch_16003.sch_txt   |  1303 +
 .../interface_parasolid/schema/sch_16004.sch_txt   |  1306 +
 .../interface_parasolid/schema/sch_16100.sch_txt   |  1313 +
 .../interface_parasolid/schema/sch_17104.sch_txt   |  1342 +
 .../interface_parasolid/schema/sch_17105.sch_txt   |  1357 +
 .../interface_parasolid/schema/sch_17106.sch_txt   |  1355 +
 .../interface_parasolid/schema/sch_18005.sch_txt   |  1369 +
 .../interface_parasolid/schema/sch_18007.sch_txt   |  1389 +
 .../interface_parasolid/schema/sch_18106.sch_txt   |  1381 +
 .../interface_parasolid/schema/sch_19002.sch_txt   |  1386 +
 .../interface_parasolid/schema/sch_19007.sch_txt   |  1399 +
 .../interface_parasolid/schema/sch_19008.sch_txt   |  1398 +
 .../interface_parasolid/schema/sch_20000.sch_txt   |  1407 +
 .../schema/sch_200_1009.sch_txt                    |   691 +
 .../schema/sch_200_1010.sch_txt                    |   693 +
 .../schema/sch_200_1011.sch_txt                    |   696 +
 .../schema/sch_200_1012.sch_txt                    |   696 +
 .../schema/sch_210_1012.sch_txt                    |   696 +
 .../interface_parasolid/schema/sch_25000.sch_txt   |  1439 +
 .../interface_parasolid/schema/sch_25001.sch_txt   |  1434 +
 .../interface_parasolid/schema/sch_26102.sch_txt   |  1470 +
 .../interface_parasolid/schema/sch_26104.sch_txt   |  1471 +
 .../interface_parasolid/schema/sch_26105.sch_txt   |  1472 +
 .../interface_parasolid/schema/sch_3000.sch_txt    |   738 +
 .../schema/sch_300_1022.sch_txt                    |   739 +
 .../interface_parasolid/schema/sch_4011.sch_txt    |   782 +
 .../interface_parasolid/schema/sch_4022.sch_txt    |   837 +
 .../interface_parasolid/schema/sch_4030.sch_txt    |   847 +
 .../interface_parasolid/schema/sch_4031.sch_txt    |   847 +
 .../interface_parasolid/schema/sch_4032.sch_txt    |   847 +
 .../interface_parasolid/schema/sch_4035.sch_txt    |   848 +
 .../interface_parasolid/schema/sch_4039.sch_txt    |   851 +
 .../interface_parasolid/schema/sch_5015.sch_txt    |   958 +
 .../interface_parasolid/schema/sch_5021.sch_txt    |  1030 +
 .../interface_parasolid/schema/sch_5030.sch_txt    |  1011 +
 .../interface_parasolid/schema/sch_5031.sch_txt    |  1011 +
 .../interface_parasolid/schema/sch_5032.sch_txt    |  1013 +
 .../interface_parasolid/schema/sch_5033.sch_txt    |   973 +
 .../interface_parasolid/schema/sch_5041.sch_txt    |   986 +
 .../interface_parasolid/schema/sch_5049.sch_txt    |   986 +
 .../interface_parasolid/schema/sch_5050.sch_txt    |   988 +
 .../interface_parasolid/schema/sch_5051.sch_txt    |   983 +
 .../interface_parasolid/schema/sch_5053.sch_txt    |   984 +
 .../interface_parasolid/schema/sch_5054.sch_txt    |   982 +
 .../interface_parasolid/schema/sch_5056.sch_txt    |   986 +
 .../interface_parasolid/schema/sch_5057.sch_txt    |   986 +
 .../interface_parasolid/schema/sch_5058.sch_txt    |   982 +
 .../interface_parasolid/schema/sch_5059.sch_txt    |   982 +
 .../interface_parasolid/schema/sch_6020.sch_txt    |  1110 +
 .../interface_parasolid/schema/sch_6021.sch_txt    |  1111 +
 .../interface_parasolid/schema/sch_7002.sch_txt    |  1110 +
 .../interface_parasolid/schema/sch_7007.sch_txt    |  1103 +
 .../interface_parasolid/schema/sch_7014.sch_txt    |  1187 +
 .../interface_parasolid/schema/sch_7015.sch_txt    |  1180 +
 .../interface_parasolid/schema/sch_7016.sch_txt    |  1163 +
 .../interface_parasolid/schema/sch_8000.sch_txt    |  1147 +
 .../interface_parasolid/schema/sch_8002.sch_txt    |  1148 +
 .../interface_parasolid/schema/sch_8005.sch_txt    |  1152 +
 .../interface_parasolid/schema/sch_8008.sch_txt    |  1161 +
 .../interface_parasolid/schema/sch_8101.sch_txt    |  1172 +
 .../interface_parasolid/schema/sch_9001.sch_txt    |  1175 +
 .../interface_parasolid/schema/sch_9003.sch_txt    |  1226 +
 .../interface_parasolid/schema/sch_9008.sch_txt    |  1227 +
 .../interface_parasolid/schema/sch_9100.sch_txt    |  1229 +
 .../testcases/3D solid-X-Y plane.xmt_txt           |    78 +
 .../testcases/3D solid-Z-Y plane.xmt_txt           |    73 +
 .../interface_parasolid/testcases/B1.xmt_txt       |    92 +
 .../interface_parasolid/testcases/B2.xmt_txt       |   163 +
 .../interface_parasolid/testcases/B3.xmt_txt       |    90 +
 .../interface_parasolid/testcases/B4.xmt_txt       |   160 +
 .../interface_parasolid/testcases/Block.xmt_txt    |    61 +
 .../testcases/Cutting-punch.xmt_txt                |   124 +
 .../testcases/Cutting-punch2.xmt_txt               |   119 +
 .../testcases/Hole CAD model.xmt_txt               |   144 +
 .../testcases/Work-piece.xmt_txt                   |    89 +
 .../interface_parasolid/testcases/blend1.xmt_txt   |   120 +
 .../interface_parasolid/testcases/blend2.xmt_txt   |   109 +
 .../interface_parasolid/testcases/blend3.xmt_txt   |   146 +
 .../interface_parasolid/testcases/brut.xmt_txt     |   476 +
 .../interface_parasolid/testcases/bsurf.xmt_txt    |    49 +
 .../interface_parasolid/testcases/fan.xmt_txt      |  1176 +
 .../testcases/instance_block.xmt_txt               |    71 +
 .../testcases/instance_block_inscribed.xmt_txt     |    90 +
 .../testcases/instance_block_tool.xmt_txt          |    80 +
 .../testcases/instance_cuboid_tool.xmt_txt         |    72 +
 .../testcases/instance_cuboid_tool2.xmt_txt        |    84 +
 .../testcases/instance_h_shape.xmt_txt             |   167 +
 .../testcases/instance_multi_level.xmt_txt         |   222 +
 .../testcases/instance_prism_tool.xmt_txt          |    86 +
 .../testcases/instance_sheet_body.xmt_txt          |    64 +
 .../testcases/instance_solid_cyl.xmt_txt           |    43 +
 .../testcases/instance_solid_cyl2.xmt_txt          |    43 +
 .../testcases/sheet_body.xmt_txt                   |    23 +
 .../testcases/twoplates.xmt_txt                    |   279 +
 contrib/Salome/CMakeLists.txt                      |     2 +-
 contrib/bamg/CMakeLists.txt                        |     2 +-
 contrib/bamg/bamglib/Mesh2.h                       |     3 +-
 contrib/blossom/CMakeLists.txt                     |     2 +-
 contrib/gmm/gmm_blas.h                             |    10 +-
 contrib/kbipack/CMakeLists.txt                     |     2 +-
 contrib/mmg3d/CMakeLists.txt                       |     2 +-
 contrib/mobile/Android/AndroidManifest.xml         |     7 +-
 .../Android/res/layout/fragment_postprocessing.xml |    67 +-
 contrib/mobile/Android/res/layout/splash.xml       |     3 +-
 contrib/mobile/Android/res/values/colors.xml       |     3 +
 .../Android/src/org/geuz/onelab/AboutActivity.java |    18 +-
 .../Android/src/org/geuz/onelab/GLESRender.java    |    19 +-
 .../mobile/Android/src/org/geuz/onelab/Gmsh.java   |    57 +-
 .../Android/src/org/geuz/onelab/MainActivity.java  |   137 +-
 .../mobile/Android/src/org/geuz/onelab/Model.java  |    32 +-
 .../src/org/geuz/onelab/ModelArrayAdapter.java     |    17 +-
 .../Android/src/org/geuz/onelab/ModelFragment.java |    84 +-
 .../Android/src/org/geuz/onelab/ModelList.java     |    23 +-
 .../src/org/geuz/onelab/OptionsActivity.java       |    74 +-
 .../org/geuz/onelab/OptionsDisplayFragment.java    |   247 +-
 .../src/org/geuz/onelab/OptionsFragment.java       |   183 +-
 .../src/org/geuz/onelab/OptionsModelFragment.java  |   207 +-
 .../geuz/onelab/OptionsPostProcessingFragment.java |   184 +-
 .../Android/src/org/geuz/onelab/Parameter.java     |    45 +-
 .../src/org/geuz/onelab/ParameterNumber.java       |   165 +-
 .../src/org/geuz/onelab/ParameterString.java       |    67 +-
 .../org/geuz/onelab/PostProcessingActivity.java    |    43 +-
 .../src/org/geuz/onelab/SeparatedListView.java     |    19 +-
 .../Android/src/org/geuz/onelab/SplashScreen.java  |    34 +-
 .../Android/src/org/geuz/onelab/Stepper.java       |     6 +-
 .../Android/src/org/geuz/onelab/StringTexture.java |    18 +-
 .../src/org/geuz/onelab/mGLSurfaceView.java        |    57 +-
 contrib/mobile/CMakeLists.txt                      |    36 +-
 contrib/mobile/README.txt                          |   371 +-
 contrib/mobile/androidGModel.cpp                   |    81 +-
 contrib/mobile/androidGModel.h                     |   147 +-
 contrib/mobile/drawContext.cpp                     |   163 +-
 contrib/mobile/drawContext.h                       |     2 +
 .../mobile/iOS/Onelab.xcodeproj/project.pbxproj    |    10 +-
 contrib/mobile/iOS/Onelab/AboutViewController.mm   |     4 +-
 contrib/mobile/iOS/Onelab/ModelViewController.mm   |     2 +-
 contrib/mobile/iOS/Onelab/Onelab-Info.plist        |     4 +-
 contrib/mobile/iOS/Onelab/Parameter.mm             |    57 +-
 contrib/mobile/iOS/Onelab/Utils.h                  |     3 +
 contrib/mobile/iOS/Onelab/Utils.mm                 |    15 +-
 contrib/mobile/iOS/Onelab/emulatorFix.c            |    42 +
 ...ndroid_petsc_reconfigure-armv7-android-linux.py |    33 +-
 contrib/mobile/utils/iOS.cmake                     |     8 +-
 contrib/mobile/utils/onelab_android_build.sh       |    35 +-
 contrib/mobile/utils/onelab_ios_build.sh           |     5 +-
 contrib/mobile/utils/onelab_iossimulator_build.sh  |     2 +-
 contrib/mpeg_encode/CMakeLists.txt                 |     2 +-
 contrib/onelab/CMakeLists.txt                      |     2 +-
 contrib/onelab/OnelabClients.cpp                   |    11 +-
 contrib/onelab/OnelabClients.h                     |     3 +
 contrib/onelab/OnelabMessage.cpp                   |     2 +-
 contrib/onelab/OnelabParser.cpp                    |    48 +-
 contrib/onelab/README.txt                          |    23 +
 contrib/onelab/myOS.cpp                            |     2 +-
 contrib/onelab/myOS.h                              |     2 +-
 contrib/onelab/python/onelab.py                    |   138 +-
 contrib/onelab2/CMakeLists.txt                     |    34 +
 contrib/onelab2/GmshLocalClient.cpp                |    76 +
 contrib/onelab2/GmshLocalClient.h                  |    38 +
 contrib/onelab2/GmshNetworkClient.cpp              |    54 +
 contrib/onelab2/GmshNetworkClient.h                |    36 +
 contrib/onelab2/NetworkUtils.cpp                   |   146 +
 contrib/onelab2/NetworkUtils.h                     |   156 +
 contrib/onelab2/Onelab.cpp                         |    68 +
 contrib/onelab2/OnelabAttributes.cpp               |   198 +
 contrib/onelab2/OnelabAttributes.h                 |   233 +
 contrib/onelab2/OnelabDatabase.cpp                 |   108 +
 contrib/onelab2/OnelabDatabase.h                   |   252 +
 contrib/onelab2/OnelabLocalClient.h                |    30 +
 contrib/onelab2/OnelabLocalNetworkClient.cpp       |    74 +
 contrib/onelab2/OnelabLocalNetworkClient.h         |    41 +
 contrib/onelab2/OnelabNetworkClient.cpp            |   237 +
 contrib/onelab2/OnelabNetworkClient.h              |   183 +
 contrib/onelab2/OnelabProtocol.cpp                 |   162 +
 contrib/onelab2/OnelabProtocol.h                   |    44 +
 contrib/onelab2/OnelabServer.cpp                   |   741 +
 contrib/onelab2/OnelabServer.h                     |   159 +
 contrib/onelab2/UdtUtils.h                         |    80 +
 contrib/onelab2/VirtualClient.h                    |    44 +
 contrib/onelab2/python/onelab2.py                  |   441 +
 contrib/rtree/README.TXT                           |    43 -
 contrib/rtree/rtree.h                              |  1593 -
 contrib/voro++/src/cell.hh                         |     2 +-
 doc/CREDITS.txt                                    |     5 +-
 doc/VERSIONS.txt                                   |    18 +
 doc/gmsh.html                                      |    37 +-
 doc/texinfo/cmake_options.texi                     |    16 +-
 doc/texinfo/commandline.texi                       |    11 +-
 doc/texinfo/gmsh.texi                              |   291 +-
 doc/texinfo/opt_fields.texi                        |    72 +-
 doc/texinfo/opt_general.texi                       |    56 +-
 doc/texinfo/opt_geometry.texi                      |     7 +-
 doc/texinfo/opt_mesh.texi                          |     5 +
 doc/texinfo/opt_plugin.texi                        |    58 +-
 doc/texinfo/opt_post.texi                          |    15 +
 doc/texinfo/opt_solver.texi                        |    10 +
 doc/texinfo/opt_view.texi                          |    21 +-
 doc/texinfo/shortcuts.texi                         |     2 +
 tutorial/t10.geo                                   |    21 +-
 tutorial/t11.geo                                   |    17 +-
 tutorial/t12.geo                                   |    21 +-
 tutorial/t13.geo                                   |    29 +-
 tutorial/t3.geo                                    |     9 +-
 tutorial/t5.geo                                    |     6 +
 tutorial/t6.geo                                    |     6 +-
 utils/api_demos/mainHomology.cpp                   |     2 +-
 utils/misc/gmsh_app.plist                          |     2 +-
 utils/misc/package_gmsh_getdp.sh                   |   105 +-
 utils/misc/release_gmsh_getdp.sh                   |    23 +
 utils/misc/update_copyright.sh                     |     4 +-
 utils/solvers/c++/GmshSocket.h                     |    17 +-
 utils/solvers/c++/onelab.h                         |   375 +-
 utils/solvers/python/pend.py                       |    14 +-
 wrappers/gmshpy/CMakeLists.txt                     |    10 +-
 wrappers/gmshpy/gmshCommon.i                       |     2 +
 wrappers/gmshpy/gmshGeo.i                          |    64 +-
 wrappers/gmshpy/gmshMesh.i                         |     9 +
 wrappers/gmshpy/gmshNumeric.i                      |    18 +
 wrappers/gmshpy/gmshPost.i                         |     3 +
 wrappers/gmshpy/gmshSolver.i                       |     8 +
 wrappers/gmshpy/gmshtypemaps.i                     |    40 +-
 1055 files changed, 193615 insertions(+), 19963 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c00f7e..151785e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -63,9 +63,13 @@ opt(MUMPS "Enable MUMPS sparse direct linear solver" OFF)
 opt(NATIVE_FILE_CHOOSER "Enable native file chooser in GUI" ${DEFAULT})
 opt(NETGEN "Enable Netgen 3D frontal mesh generator" ${DEFAULT})
 opt(NUMPY "Enable conversion between fullMatrix and numpy array (requires SWIG)" OFF)
+opt(PETSC4PY "Enable petsc4py wrappers for petsc matrices" ON)
 opt(OCC "Enable Open CASCADE geometrical models" ${DEFAULT})
 opt(ONELAB "Enable ONELAB solver interface" ${DEFAULT})
 opt(ONELAB2 "Enable experimental ONELAB-Cloud solver interface" OFF)
+if(ENABLE_ONELAB2)
+  opt(UDT "Enable UDT library for ONELAB-Cloud" ON)
+endif(ENABLE_ONELAB2)
 opt(ONELAB_METAMODEL "Enable ONELAB metamodels (experimental)" ${DEFAULT})
 opt(OPENMP "Enable OpenMP (experimental)" OFF)
 opt(OPTHOM "Enable high-order mesh optimization tools" ${DEFAULT})
@@ -77,7 +81,6 @@ opt(PLUGINS "Enable post-processing plugins" ${DEFAULT})
 opt(POST "Enable post-processing module (required by GUI)" ${DEFAULT})
 opt(POPPLER "Enable Poppler for displaying PDF documents (experimental)" OFF)
 opt(QT "Enable dummy QT graphical interface proof-of-concept (experimental)" OFF)
-opt(RTREE "Enable RTREE (used for quad/hex mesh generation)" ${DEFAULT})
 opt(SALOME "Enable Salome routines for CAD healing" ${DEFAULT})
 opt(SGEOM "Enable SGEOM interface to OCC (experimental)" OFF)
 opt(SLEPC "Enable SLEPc eigensolvers (required for conformal compounds)" ${DEFAULT})
@@ -91,8 +94,8 @@ opt(WRAP_JAVA "Enable generation of Java wrappers (experimental)" OFF)
 opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF)
 
 set(GMSH_MAJOR_VERSION 2)
-set(GMSH_MINOR_VERSION 8)
-set(GMSH_PATCH_VERSION 5)
+set(GMSH_MINOR_VERSION 9)
+set(GMSH_PATCH_VERSION 3)
 set(GMSH_EXTRA_VERSION "" CACHE STRING "Gmsh extra version string")
 
 set(GMSH_VERSION "${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}")
@@ -108,7 +111,9 @@ set(GMSH_API
     Common/onelab.h Common/GmshSocket.h Common/onelabUtils.h
   Numeric/Numeric.h Numeric/GaussIntegration.h Numeric/polynomialBasis.h
     Numeric/JacobianBasis.h Numeric/MetricBasis.h Numeric/bezierBasis.h Numeric/fullMatrix.h
+    Numeric/FuncSpaceData.h
     Numeric/simpleFunction.h Numeric/cartesian.h Numeric/ElementType.h
+    Numeric/BasisFactory.h
   Geo/GModel.h Geo/GEntity.h Geo/GPoint.h Geo/GVertex.h Geo/GEdge.h 
     Geo/GFace.h Geo/GRegion.h Geo/GEdgeLoop.h Geo/GEdgeCompound.h 
     Geo/GFaceCompound.h Geo/GRegionCompound.h Geo/GRbf.h Geo/MVertex.h
@@ -120,6 +125,7 @@ set(GMSH_API
     Geo/SPoint2.h Geo/SPoint3.h Geo/SVector3.h Geo/STensor3.h Geo/SBoundingBox3d.h 
     Geo/Pair.h Geo/Range.h Geo/SOrientedBoundingBox.h 
     Geo/CellComplex.h Geo/ChainComplex.h Geo/Cell.h Geo/Homology.h Geo/Chain.h 
+    Geo/GenericVertex.h Geo/GenericEdge.h Geo/GenericFace.h Geo/GenericRegion.h
     Geo/partitionEdge.h Geo/CGNSOptions.h Geo/gmshLevelset.h Geo/boundaryLayersData.h
   Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h 
     Mesh/meshGFaceElliptic.h Mesh/meshPartition.h Mesh/meshGFaceDelaunayInsertion.h 
@@ -131,6 +137,7 @@ set(GMSH_API
     Solver/linearSystem.h Solver/linearSystemGMM.h Solver/linearSystemCSR.h 
     Solver/linearSystemFull.h Solver/elasticitySolver.h Solver/sparsityPattern.h 
     Solver/groupOfElements.h Solver/linearSystemPETSc.h Solver/linearSystemMUMPS.h
+    Solver/thermicSolver.h
   Post/PView.h Post/PViewData.h Plugin/PluginManager.h Post/OctreePost.h 
   Post/PViewDataList.h Post/PViewDataGModel.h Post/PViewOptions.h Post/ColorTable.h
    Numeric/nodalBasis.h
@@ -141,6 +148,19 @@ set(GMSH_API
   contrib/HighOrderMeshOptimizer/OptHOM.h contrib/HighOrderMeshOptimizer/OptHomMesh.h
   contrib/HighOrderMeshOptimizer/OptHomRun.h contrib/HighOrderMeshOptimizer/ParamCoord.h
   contrib/HighOrderMeshOptimizer/OptHomFastCurving.h contrib/HighOrderMeshOptimizer/SuperEl.h
+  contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.h
+  contrib/HighOrderMeshOptimizer/CADDistances.h
+  contrib/HighOrderMeshOptimizer/OptHomObjContribScaledJac.h
+  contrib/HighOrderMeshOptimizer/OptHomObjContribMetricMin.h
+  contrib/HighOrderMeshOptimizer/OptHomObjContribCADDist.h
+  contrib/MeshOptimizer/MeshOptPatch.h contrib/MeshOptimizer/MeshOpt.h
+  contrib/MeshOptimizer/MeshOptCommon.h contrib/MeshOptimizer/MeshOptimizer.h
+  contrib/MeshOptimizer/MeshOptObjContribFunc.h contrib/MeshOptimizer/MeshOptObjContrib.h
+  contrib/MeshOptimizer/MeshOptObjContribScaledNodeDispSq.h
+  contrib/MeshOptimizer/MeshOptObjectiveFunction.h contrib/MeshOptimizer/MeshOptVertexCoord.h 
+  contrib/MeshQualityOptimizer/MeshQualityObjContribIdealJac.h
+  contrib/MeshQualityOptimizer/MeshQualityObjContribInvCond.h
+  contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
   contrib/MathEx/mathex.h)
 
 get_property(IAMCHILD DIRECTORY  PROPERTY PARENT_DIRECTORY)
@@ -441,8 +461,22 @@ if(ENABLE_FLTK)
       execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-gl --use-images --includedir
                       OUTPUT_VARIABLE FLTK_INCLUDE_DIR)
       string(STRIP ${FLTK_INCLUDE_DIR} FLTK_INCLUDE_DIR)
-      list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR} ${FLTK_INCLUDE_DIR}/FL/images
-           ${FLTK_INCLUDE_DIR}/jpeg ${FLTK_INCLUDE_DIR}/zlib ${FLTK_INCLUDE_DIR}/png)
+      list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR})
+      # On linux (at least OpenSuSE) the following directories are
+      # not existing (everything is in /usr/include). To avoid warnings
+      # check existance of these directories before adding them
+      if(EXISTS ${FLTK_INCLUDE_DIR}/FL/images)
+        list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR}/FL/images)
+      endif(EXISTS ${FLTK_INCLUDE_DIR}/FL/images)
+      if(EXISTS ${FLTK_INCLUDE_DIR}/jpeg)
+        list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR}/jpeg)
+      endif(EXISTS ${FLTK_INCLUDE_DIR}/jpeg)
+      if(EXISTS ${FLTK_INCLUDE_DIR}/zlib)
+        list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR}/zlib)
+      endif(EXISTS ${FLTK_INCLUDE_DIR}/zlib)
+      if(EXISTS ${FLTK_INCLUDE_DIR}/png)
+        list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR}/png)
+      endif(EXISTS ${FLTK_INCLUDE_DIR}/png)
       execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-gl --use-images --ldflags
                       OUTPUT_VARIABLE FLTK_LIBRARIES)
       string(STRIP ${FLTK_LIBRARIES} FLTK_LIBRARIES)
@@ -501,21 +535,38 @@ if(ENABLE_NATIVE_FILE_CHOOSER)
   set_config_option(HAVE_NATIVE_FILE_CHOOSER "NativeFileChooser")
 endif(ENABLE_NATIVE_FILE_CHOOSER)
 
-if(ENABLE_ONELAB)
-  set_config_option(HAVE_ONELAB "ONELAB")
-  if(ENABLE_ONELAB_METAMODEL)
-    add_subdirectory(contrib/onelab)
-    include_directories(contrib/onelab)
-    set_config_option(HAVE_ONELAB_METAMODEL "ONELABMetamodel")
-  endif(ENABLE_ONELAB_METAMODEL)
-  file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab/python/onelab.py
-            DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-endif(ENABLE_ONELAB)
-
 if(ENABLE_ONELAB2)
+  if(ENABLE_UDT)
+    find_package(Threads REQUIRED)
+    find_path(UDT_INCLUDE_DIR "udt.h" PATH_SUFFIXES include udt)
+    find_library(UDT_LIBRARY udt)
+    if(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+      set_config_option(HAVE_UDT "UDT")
+      list(APPEND EXTERNAL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+      list(APPEND EXTERNAL_LIBRARIES ${UDT_LIBRARY})
+      list(APPEND EXTERNAL_INCLUDES ${UDT_INCLUDE_DIR})
+    else(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+      message(FATAL_ERROR "Unable to find UDT library or threads")
+    endif(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+  endif(ENABLE_UDT)
   set_config_option(HAVE_ONELAB2 "ONELAB2")
+  add_subdirectory(contrib/onelab2)
+  include_directories(contrib/onelab2)
 endif(ENABLE_ONELAB2)
 
+if(ENABLE_ONELAB)
+  set_config_option(HAVE_ONELAB "ONELAB")
+  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab)
+    if(ENABLE_ONELAB_METAMODEL)
+      add_subdirectory(contrib/onelab)
+      include_directories(contrib/onelab)
+      set_config_option(HAVE_ONELAB_METAMODEL "ONELABMetamodel")
+    endif(ENABLE_ONELAB_METAMODEL)
+    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab/python/onelab.py
+              DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+  endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab)
+endif(ENABLE_ONELAB)
+
 if(ENABLE_BUILD_IOS)
   find_file(CMAKE_TOOLCHAIN_FILE "ios.cmake")
   if(NOT CMAKE_TOOLCHAIN_FILE)
@@ -633,6 +684,10 @@ endif(ENABLE_DINTEGRATION)
 if(ENABLE_OPTHOM)
   add_subdirectory(contrib/HighOrderMeshOptimizer)
   include_directories(contrib/HighOrderMeshOptimizer)
+  add_subdirectory(contrib/MeshOptimizer)
+  include_directories(contrib/MeshOptimizer)
+  add_subdirectory(contrib/MeshQualityOptimizer)
+  include_directories(contrib/MeshQualityOptimizer)
   set_config_option(HAVE_OPTHOM "OptHom")
 endif(ENABLE_OPTHOM)
 
@@ -701,11 +756,6 @@ if(HAVE_MESH OR HAVE_SOLVER)
 endif(HAVE_MESH OR HAVE_SOLVER)
 
 if(HAVE_MESH)
-  if(ENABLE_RTREE)
-    include_directories(contrib/rtree)
-    set_config_option(HAVE_RTREE "RTree")
-  endif(ENABLE_RTREE)
-
   if(ENABLE_VORO3D)
     add_subdirectory(contrib/voro++)
     include_directories(contrib/voro++/src)
@@ -891,6 +941,16 @@ if(HAVE_SOLVER)
       # find includes by parsing the petscvariables file
       file(STRINGS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables 
            PETSC_VARIABLES NEWLINE_CONSUME)
+    endif(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables)
+    if(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib/petsc-conf/petscvariables)
+      # old-style PETSc installations (using PETSC_DIR and PETSC_ARCH)
+      message(STATUS "Using PETSc dir: ${ENV_PETSC_DIR}")
+      message(STATUS "Using PETSc arch: ${ENV_PETSC_ARCH}")
+      # find includes by parsing the petscvariables file
+      file(STRINGS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib/petsc-conf/petscvariables 
+           PETSC_VARIABLES NEWLINE_CONSUME)
+    endif(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib/petsc-conf/petscvariables)
+    if(PETSC_VARIABLES)
       # try to find PETSC_CC_INCLUDES for PETSc >= 3.4
       string(REGEX MATCH "PETSC_CC_INCLUDES = [^\n\r]*" PETSC_PACKAGES_INCLUDES
              ${PETSC_VARIABLES})
@@ -911,7 +971,11 @@ if(HAVE_SOLVER)
           string(REPLACE "-I" "" PETSC_PACKAGES_INCLUDES ${PETSC_PACKAGES_INCLUDES})
           string(REPLACE " " ";" PETSC_PACKAGES_INCLUDES ${PETSC_PACKAGES_INCLUDES})
           foreach(VAR ${PETSC_PACKAGES_INCLUDES})
-            list(APPEND EXTERNAL_INCLUDES ${VAR})
+            # seem to include unexisting directories (/usr/include/lib64)
+	    # check to avoid warnings
+	    if(EXISTS ${VAR})
+	      list(APPEND EXTERNAL_INCLUDES ${VAR})
+            endif(EXISTS ${VAR})
           endforeach(VAR)
         endif(PETSC_PACKAGES_INCLUDES)
       endif(PETSC_PACKAGES_INCLUDES)
@@ -968,6 +1032,7 @@ if(HAVE_SOLVER)
       if(PLIBS_BASIC)
         string(REPLACE "PETSC_EXTERNAL_LIB_BASIC = " "" PLIBS_BASIC ${PLIBS_BASIC})
         string(STRIP ${PLIBS_BASIC} PLIBS_BASIC)
+        separate_arguments(PLIBS_BASIC)
         list(APPEND EXTERNAL_LIBRARIES "${PLIBS_BASIC}")
       endif(PLIBS_BASIC)
       string(REGEX MATCH "PCC_LINKER_LIBS = [^\n\r]*" LLIBS ${PETSC_VARIABLES})
@@ -976,7 +1041,7 @@ if(HAVE_SOLVER)
         string(STRIP ${LLIBS} LLIBS)
         list(APPEND EXTERNAL_LIBRARIES "${LLIBS}")
       endif(LLIBS)
-    else(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables)
+    else(PETSC_VARIABLES)
       # new-style PETSc installations (in standard system directories)
       find_library(PETSC_LIBS petsc)
       find_path(PETSC_INC "petsc.h" PATH_SUFFIXES include/petsc)
@@ -994,7 +1059,7 @@ if(HAVE_SOLVER)
         list(APPEND EXTERNAL_LIBRARIES ${PETSC_LIBS})
         list(APPEND EXTERNAL_INCLUDES ${PETSC_INC}) 
       endif(PETSC_LIBS AND PETSC_INC)
-    endif(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables)
+    endif(PETSC_VARIABLES)
   endif(ENABLE_PETSC)
 endif(HAVE_SOLVER)
 
@@ -1017,7 +1082,8 @@ if(ENABLE_OCC)
       # ModelingData
       TKBRep TKGeomBase TKG3d TKG2d
       # FoundationClasses
-      TKAdvTools TKMath TKernel)
+      # TKAdvTools -- not necessary? (and removed from OCC 6.8)
+      TKMath TKernel)
   if(ENABLE_SGEOM)
     set(OCC_LIBS_REQUIRED ${OCC_LIBS_REQUIRED}
       # For SGEOM
@@ -1051,6 +1117,7 @@ if(ENABLE_OCC)
       endif(HAVE_64BIT_SIZE_T)
       if(CYGWIN)
         list(APPEND EXTERNAL_LIBRARIES "winspool")
+        add_definitions(-DOCC_CONVERT_SIGNALS)
       elseif(MSVC)
         add_definitions(-DWNT)
       endif(CYGWIN)
@@ -1094,8 +1161,8 @@ endif(HAVE_ZLIB AND ENABLE_COMPRESSED_IO)
 
 if(ENABLE_WRAP_PYTHON)
   find_package(SWIG)
-  find_package(PythonInterp)
   find_package(PythonLibs)
+  find_package(PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT)
   if(SWIG_FOUND AND PYTHONLIBS_FOUND)
     message(STATUS "Found SWIG version " ${SWIG_VERSION})
     string(SUBSTRING ${SWIG_VERSION} 0 1 SWIG_MAJOR_VERSION)
@@ -1109,15 +1176,32 @@ endif(ENABLE_WRAP_PYTHON)
 
 if(HAVE_PYTHON)
   if(ENABLE_NUMPY)
-    EXEC_PROGRAM (${PYTHON_EXECUTABLE}
-      ARGS "-c \"import numpy; print(numpy.get_include())\""
-      OUTPUT_VARIABLE NUMPY_INC
-      RETURN_VALUE NUMPY_NOT_FOUND)
+    if (NOT NUMPY_INC)
+      EXEC_PROGRAM (${PYTHON_EXECUTABLE}
+        ARGS "-c \"import numpy; print(numpy.get_include())\""
+        OUTPUT_VARIABLE NUMPY_INC
+        RETURN_VALUE NUMPY_NOT_FOUND)
+    endif(NOT NUMPY_INC)
     if(NUMPY_INC)
       list(APPEND EXTERNAL_INCLUDES ${NUMPY_INC})
       set_config_option(HAVE_NUMPY "Numpy")
     endif(NUMPY_INC)
   endif(ENABLE_NUMPY)
+  if(HAVE_PETSC)
+    if(ENABLE_PETSC4PY)
+      EXECUTE_PROCESS(
+        COMMAND ${PYTHON_EXECUTABLE} -c "import petsc4py; print(petsc4py.get_include())"
+        OUTPUT_VARIABLE PETSC4PY_INC
+        RESULT_VARIABLE PETSC4PY_NOT_FOUND
+        ERROR_QUIET
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+      )
+      if(PETSC4PY_INC)
+        list(APPEND EXTERNAL_INCLUDES ${PETSC4PY_INC})
+        set_config_option(HAVE_PETSC4PY "PETSc4py")
+      endif(PETSC4PY_INC)
+    endif(ENABLE_PETSC4PY)
+  endif(HAVE_PETSC)
 endif(HAVE_PYTHON)
 
 check_function_exists(vsnprintf HAVE_VSNPRINTF)
@@ -1593,7 +1677,8 @@ if(APPLE AND ENABLE_BUILD_LIB)
   file(READ ${CMAKE_CURRENT_SOURCE_DIR}/utils/misc/gmsh_framework.plist F0)
   string(REPLACE GMSH_VERSION "${GMSH_VERSION}" F1 "${F0}")
   file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Info_framework.plist "${F1}")
-  get_target_property(LIBNAME lib LOCATION)
+  get_target_property(LIBNAME lib LOCATION) # depracated
+  #set(LIBNAME $<TARGET_FILE:lib>) # FIXME: use this in the future
   add_custom_target(framework DEPENDS lib
     COMMAND ${CMAKE_COMMAND} -E remove_directory Gmsh.framework
     COMMAND ${CMAKE_COMMAND} -E make_directory Gmsh.framework/Headers
@@ -1676,24 +1761,27 @@ endif(ENABLE_WRAP_JAVA)
 
 include(CPack)
 
-include(CTest)
-file(GLOB_RECURSE TESTFILES 
-     tutorial/*.geo demos/*.geo benchmarks/?d/*.geo benchmarks/extrude/*.geo)
-foreach(TESTFILE ${TESTFILES})
-  # use relative path for cygwin/mingw (the pure win exe built with the mingw 
-  # compilers does not understand a full cygwin-style path)
-  FILE(RELATIVE_PATH TEST ${CMAKE_CURRENT_BINARY_DIR} ${TESTFILE})
-  add_test(${TEST} ./gmsh ${TEST} -3 -nopopup -o ./tmp.msh)
-endforeach()
-# if(HAVE_PYTHON)
-#   file(GLOB_RECURSE TESTFILES tutorial/*.py)
-#   foreach(TESTFILE ${TESTFILES})
-#     add_test(NAME ${TESTFILE} 
-#              COMMAND ${PYTHON_EXECUTABLE}
-#                      ${TESTFILE} $<CONFIGURATION>)
-#     # sys.path.insert(0, "path/to/your/package")
-#   endforeach()
-# endif(HAVE_PYTHON)
+if(NOT DISABLE_GMSH_TESTS)
+  #disabling tests is usefull when including this CMakeLists in an external project
+  include(CTest)
+  file(GLOB_RECURSE TESTFILES 
+       tutorial/*.geo demos/*.geo benchmarks/?d/*.geo benchmarks/extrude/*.geo)
+  foreach(TESTFILE ${TESTFILES})
+    # use relative path for cygwin/mingw (the pure win exe built with the mingw 
+    # compilers does not understand a full cygwin-style path)
+    FILE(RELATIVE_PATH TEST ${CMAKE_CURRENT_BINARY_DIR} ${TESTFILE})
+    add_test(${TEST} ./gmsh ${TEST} -3 -nopopup -o ./tmp.msh)
+  endforeach()
+  # if(HAVE_PYTHON)
+  #   file(GLOB_RECURSE TESTFILES tutorial/*.py)
+  #   foreach(TESTFILE ${TESTFILES})
+  #     add_test(NAME ${TESTFILE} 
+  #              COMMAND ${PYTHON_EXECUTABLE}
+  #                      ${TESTFILE} $<CONFIGURATION>)
+  #     # sys.path.insert(0, "path/to/your/package")
+  #   endforeach()
+  # endif(HAVE_PYTHON)
+endif(NOT DISABLE_GMSH_TESTS)
 
 message(STATUS "")
 message(STATUS "Gmsh ${GMSH_VERSION} has been configured for ${GMSH_OS}")
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 41ef39d..22663f4 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -1,13 +1,13 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
 
-set(CTEST_PROJECT_NAME "Gmsh")
+set(CTEST_PROJECT_NAME ${CUSTOM_DROP_PROJECT})
 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE_CDASH TRUE)
-set(CTEST_DROP_SITE "onelab.info")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Gmsh")
+set(CTEST_DROP_SITE ${CUSTOM_DROP_SITE})
+set(CTEST_DROP_LOCATION ${CUSTOM_DROP_LOCATION})
 set(CTEST_TRIGGER_SITE "")
 set(SITE ${GMSH_HOST})
 set(BUILDNAME "${GMSH_OS}-${GMSH_PACKAGER}")
diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt
index cb20d41..a428037 100644
--- a/Common/CMakeLists.txt
+++ b/Common/CMakeLists.txt
@@ -1,11 +1,10 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 set(SRC  
   Gmsh.cpp
-    GmshRemote.cpp
     GmshMessage.cpp
   gmshPopplerWrapper.cpp
   Context.cpp
@@ -24,6 +23,8 @@ set(SRC
   MallocUtils.cpp
   onelabUtils.cpp
   GamePad.cpp
+  GmshRemote.cpp
+  gmshLocalNetworkClient.cpp
 )
 
 file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) 
diff --git a/Common/Colors.h b/Common/Colors.h
index 2434dbb..146ed7d 100644
--- a/Common/Colors.h
+++ b/Common/Colors.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index 60eefc2..3768e66 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,6 +6,7 @@
 #include <string>
 #include <string.h>
 #include <stdlib.h>
+#include <iostream>
 #include <fstream>
 #include "GmshConfig.h"
 #include "GmshDefines.h"
@@ -32,6 +33,14 @@
 #include "petsc.h"
 #endif
 
+#if defined(HAVE_OCC)
+#include "Standard_Version.hxx"
+#endif
+
+#if defined(HAVE_MED)
+#include "med.h"
+#endif
+
 #if defined(HAVE_POST)
 #include "PView.h"
 #endif
@@ -105,6 +114,10 @@ std::vector<std::pair<std::string, std::string> > GetUsage()
   s.push_back(mp("-link int",          "Select link mode between views (0, 1, 2, 3, 4)"));
   s.push_back(mp("-combine",           "Combine views having identical names into "
                                        "multi-time-step views"));
+  s.push_back(mp("Solver options:", ""));
+  s.push_back(mp("-listen",            "Always listen to incoming connection requests"));
+  s.push_back(mp("-minterpreter string", "Name of Octave interpreter"));
+  s.push_back(mp("-pyinterpreter string", "Name of Python interpreter"));
   s.push_back(mp("Display options:", ""));
   s.push_back(mp("-n",                 "Hide all meshes and post-processing views on startup"));
   s.push_back(mp("-nodb",              "Disable double buffering"));
@@ -127,7 +140,6 @@ std::vector<std::pair<std::string, std::string> > GetUsage()
                                        "post-processing mode"));
 #endif
   s.push_back(mp("-pid",               "Print process id on stdout"));
-  s.push_back(mp("-listen",            "Always listen to incoming connection requests"));
   s.push_back(mp("-watch pattern",     "Pattern of files to merge as they become available"));
   s.push_back(mp("-bg file",           "Load background (image or PDF) file"));
   s.push_back(mp("-v int",             "Set verbosity level"));
@@ -223,6 +235,7 @@ std::vector<std::pair<std::string, std::string> > GetShortcutsUsage(const std::s
   s.push_back(mp("Alt+Shift+l",    "Hide/show mesh lines"));
   s.push_back(mp("Alt+Shift+p",    "Hide/show mesh points"));
   s.push_back(mp("Alt+Shift+s",    "Hide/show mesh surface edges"));
+  s.push_back(mp("Alt+Shift+t",    "Same as Alt+t, but with numeric mode included"));
   s.push_back(mp("Alt+Shift+v",    "Hide/show mesh volume edges"));
   s.push_back(mp("Alt+Shift+w",    "Reverse all mesh normals"));
   s.push_back(mp("Alt+Shift+x",    "Set -X view"));
@@ -366,7 +379,7 @@ void GetOptions(int argc, char *argv[])
         opt_mesh_partition_metis_algorithm(0, GMSH_SET, 3); // partGraphKWay w/ weights
         while (check) {
           if (argv[i]) {
-            if (!strcmp(argv[i],"triangle")) {
+            if (!strcmp(argv[i],"tri") || !strcmp(argv[i],"triangle")) {
               i++;
               opt_mesh_partition_tri_weight(0,GMSH_SET,atoi(argv[i]));
             }
@@ -390,7 +403,10 @@ void GetOptions(int argc, char *argv[])
               i++;
               opt_mesh_partition_hex_weight(0,GMSH_SET,atoi(argv[i]));
             }
-            else check = false;
+            else {
+              Msg::Error("Bad argument for 'partWeight' (%s)", argv[i]);
+              check = false;
+            }
             i++;
           }
           else check = false;
@@ -492,34 +508,11 @@ void GetOptions(int argc, char *argv[])
 #if defined(HAVE_MESH)
       else if(!strcmp(argv[i] + 1, "microstructure")) {
         i++;
-        int j;
-        int radical;
-        double max;
-        double xMax;
-        double yMax;
-        double zMax;
-        std::vector<double> properties;
-        if(argv[i]){
-          std::ifstream file(argv[i++]);
-          file >> max;
-          file >> radical;
-          file >> xMax;
-          file >> yMax;
-          file >> zMax;
-          properties.clear();
-          properties.resize(4*max);
-          for(j=0;j<max;j++){
-            file >> properties[4*j];
-            file >> properties[4*j+1];
-            file >> properties[4*j+2];
-            file >> properties[4*j+3];
-          }
-          voroMetal3D vm1;
-          vm1.execute(properties,radical,0.1,xMax,yMax,zMax);
-          GModel::current()->load("MicrostructurePolycrystal3D.geo");
-          voroMetal3D vm2;
-          vm2.correspondance(0.00001,xMax,yMax,zMax);
-        }
+        if(argv[i]) microstructure(argv[i++]);
+      }
+      else if(!strcmp(argv[i] + 1, "computeBestSeeds")) {
+        i++;
+        if(argv[i]) computeBestSeeds(argv[i++]);
       }
 #endif
       else if(!strcmp(argv[i] + 1, "nopopup")) {
@@ -550,6 +543,7 @@ void GetOptions(int argc, char *argv[])
         i++;
 	if (i + 1 < argc && argv[i][0] != '-' && argv[i + 1][0] != '-') {
           gmsh_yystringsymbols[argv[i]] = argv[i + 1];
+          Msg::GetCommandLineStrings()[argv[i]] = argv[i + 1];
           i += 2;
 	}
         else
@@ -557,9 +551,9 @@ void GetOptions(int argc, char *argv[])
       }
       else if (!strcmp(argv[i]+1, "setnumber")) {
         i++;
-	if (i + 1 < argc && argv[i][0] != '-' && argv[i + 1][0] != '-') {
-          std::vector<double> val(1, atof(argv[i + 1]));
-          gmsh_yysymbols[argv[i]].value = val;
+	if (i + 1 < argc && argv[i][0] != '-') {
+          gmsh_yysymbols[argv[i]].value = std::vector<double>(1, atof(argv[i + 1]));
+          Msg::GetCommandLineNumbers()[argv[i]] = atof(argv[i + 1]);
           i += 2;
 	}
         else
@@ -890,8 +884,31 @@ void GetOptions(int argc, char *argv[])
           Msg::Fatal("Missing format");
       }
       else if(!strcmp(argv[i] + 1, "listen")) {
+        i++;
+#if !defined(HAVE_ONELAB2)
         CTX::instance()->solver.listen = 1;
+#else
+        CTX::instance()->batch = 1;
+        if(argv[i]) {
+          CTX::instance()->onelab.listen_port = atoi(argv[i++]);
+        }
+        else
+          CTX::instance()->onelab.listen_port = 1148;
+#endif
+      }
+      else if(!strcmp(argv[i] + 1, "minterpreter")) {
+        i++;
+        if(argv[i])
+          CTX::instance()->solver.octaveInterpreter = argv[i++];
+        else
+          Msg::Fatal("Missing interpreter name");
+      }
+      else if(!strcmp(argv[i] + 1, "pyinterpreter")) {
         i++;
+        if(argv[i])
+          CTX::instance()->solver.pythonInterpreter = argv[i++];
+        else
+          Msg::Fatal("Missing interpreter name");
       }
       else if(!strcmp(argv[i] + 1, "bg")){
         i++;
@@ -916,13 +933,22 @@ void GetOptions(int argc, char *argv[])
                 FL_MINOR_VERSION, FL_PATCH_VERSION);
 #endif
 #if defined(HAVE_PETSC)
-        fprintf(stderr, "PETSc version    : %d.%d.%d\n", PETSC_VERSION_MAJOR,
-                PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR);
+        fprintf(stderr, "PETSc version    : %d.%d.%d (%s arithmtic)\n", PETSC_VERSION_MAJOR,
+                PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR,
 #if defined(PETSC_USE_COMPLEX)
-        fprintf(stderr, "PETSc arithmetic : Complex\n");
+                "complex"
 #else
-        fprintf(stderr, "PETSc arithmetic : Real\n");
+                "real"
+#endif
+                );
+#endif
+#if defined(HAVE_OCC)
+        fprintf(stderr, "OCC version      : %d.%d.%d\n", OCC_VERSION_MAJOR,
+                OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE);
 #endif
+#if defined(HAVE_MED)
+        fprintf(stderr, "MED version      : %d.%d.%d\n", MED_NUM_MAJEUR,
+                MED_NUM_MINEUR, MED_NUM_RELEASE);
 #endif
         fprintf(stderr, "Packaged by      : %s\n", GMSH_PACKAGER);
         fprintf(stderr, "Web site         : http://www.geuz.org/gmsh/\n");
@@ -931,7 +957,7 @@ void GetOptions(int argc, char *argv[])
       }
       else if(!strcmp(argv[i] + 1, "help") || !strcmp(argv[i] + 1, "-help")) {
         fprintf(stderr, "Gmsh, a 3D mesh generator with pre- and post-processing facilities\n");
-        fprintf(stderr, "Copyright (C) 1997-2014 Christophe Geuzaine and Jean-Francois Remacle\n");
+        fprintf(stderr, "Copyright (C) 1997-2015 Christophe Geuzaine and Jean-Francois Remacle\n");
         PrintUsage(argv[0]);
         Msg::Exit(0);
       }
diff --git a/Common/CommandLine.h b/Common/CommandLine.h
index 8b4292f..651ffaa 100644
--- a/Common/CommandLine.h
+++ b/Common/CommandLine.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/Context.cpp b/Common/Context.cpp
index 42134a4..67f4277 100644
--- a/Common/Context.cpp
+++ b/Common/Context.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -45,6 +45,7 @@ CTX::CTX() : gamepad(0)
   bgmFileName = "";
   createAppendMeshStatReport = 0;
   launchSolverAtStartup = -1;
+  solverToRun = -1;
   lc = 1.;
   min[0] = min[1] = min[2] = max[2] = 0.;
   max[0] = max[1] = 1.; // for nice view when adding point in new model
@@ -59,7 +60,7 @@ CTX::CTX() : gamepad(0)
   post.draw = 1;
   post.combineTime = 0; // try to combineTime views at startup
   lock = 0; // very primitive locking
-  fileread=false;
+  fileread = false;
 
 #if defined(HAVE_FLTK)
   glFontEnum = FL_HELVETICA;
@@ -70,9 +71,11 @@ CTX::CTX() : gamepad(0)
   hideUnselected = 0;
   numWindows = numTiles = 1;
   deltaFontSize = 0;
-  recentFiles.resize(5);
+  recentFiles.resize(10);
   mesh.optimizeLloyd = 0;
   gamepad = 0;
+  mesh.switchElementTags = 0;
+  terminal = 0;
 
   // need to initialize these too, since the corresponding opt_XXX
   // routine uses the current value to set "mesh.changed"
@@ -94,10 +97,6 @@ CTX::CTX() : gamepad(0)
   color.mesh.tangents = color.mesh.line = color.mesh.quadrangle = 0;
   for (int i = 0; i < 20; i++)
     color.mesh.carousel[i] = 0;
-  // added by Gauthier Becker (these are not initialized by default
-  // leading to valgrind error) Feel free to change the default values)
-  mesh.switchElementTags=0;
-  terminal=0;
 }
 
 CTX::~CTX()
diff --git a/Common/Context.h b/Common/Context.h
index 2079af1..36f6da7 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -23,12 +23,14 @@ struct contextMeshOptions {
   int points, lines, triangles, quadrangles, tetrahedra, hexahedra, prisms, pyramids;
   int surfacesEdges, surfacesFaces, volumesEdges, volumesFaces, numSubEdges;
   int pointsNum, linesNum, surfacesNum, volumesNum, qualityType, labelType;
-  int optimize, optimizeNetgen, optimizeLloyd, smoothCrossField, refineSteps, remove4triangles;
+  int optimize, optimizeNetgen, optimizeLloyd, smoothCrossField, refineSteps;
+  int remove4triangles;
   double normals, tangents, explode, angleSmoothNormals, allowSwapEdgeAngle;
   double mshFileVersion, mshFilePartitioned, pointSize, lineWidth;
   double qualityInf, qualitySup, radiusInf, radiusSup;
   double scalingFactor, lcFactor, randFactor, lcIntegrationPrecision;
-  double lcMin, lcMax, toleranceEdgeLength, anisoMax, smoothRatio;
+  double lcMin, lcMax, toleranceEdgeLength, toleranceInitialDelaunay;
+  double anisoMax, smoothRatio;
   int lcFromPoints, lcFromCurvature, lcExtendFromBoundary;
   int dual, voronoi, drawSkinOnly, colorCarousel, labelSampling;
   int fileFormat, nbSmoothing, algo2d, algo3d, algoSubdivide;
@@ -70,6 +72,7 @@ struct contextGeometryOptions {
   double tolerance, snap[3], transform[3][3], offset[3];
   int occFixDegenerated, occFixSmallEdges, occFixSmallFaces;
   int occSewFaces, occConnectFaces;
+  double occScaling;
   int copyMeshingMethod, copyDisplayAttributes, exactExtrusion;
   int matchGeomAndMesh;
   int hideCompounds, orientedPhysicals;
@@ -88,7 +91,8 @@ class CTX {
   std::string bgmFileName, outputFileName, defaultFileName, tmpFileName;
   std::string sessionFileName, optionsFileName, errorFileName;
   std::string meshStatReportFileName;
-  std::string argv0;
+  // filename of the executable, with full path
+  std::string exeFileName;
   // the home directory
   std::string homeDir;
   // file history
@@ -97,6 +101,8 @@ class CTX {
   int createAppendMeshStatReport;
   // should we launch a solver at startup?
   int launchSolverAtStartup ;
+  // solver to use with ONELAB2
+  int solverToRun ;
   // save session/option file on exit?
   int sessionSave, optionsSave;
   // ask confirmation when overwriting files?
@@ -105,6 +111,8 @@ class CTX {
   std::string display;
   // FLTK theme
   std::string guiTheme;
+  // FLTK color scheme
+  int guiColorScheme;
   // print messages on to the terminal?
   int terminal;
   // number of graphical windows/tiles
@@ -123,6 +131,8 @@ class CTX {
   int fileChooserPosition[2], extraPosition[2], extraSize[2];
   // use the system menu bar on Mac OS X?
   int systemMenuBar;
+  // use high-resolution opengl graphics (retina Macs)
+  int highResolutionGraphics;
   // batch mode (-4: lua session, -3: server daemon, -2: check coherence, -1: write
   // geo, 0: full gfx, 1: 1D mesh, 2: 2D mesh, 3: 3D mesh, 4: adapt
   // mesh, 5: refine mesh)
@@ -187,8 +197,11 @@ class CTX {
   // font name, FLTK enum and size for opengl graphics
   std::string glFont, glFontTitle, glFontEngine;
   int glFontEnum, glFontEnumTitle, glFontSize, glFontSizeTitle;
+  // font size of messages
+  int msgFontSize;
   // point/line widths
   double pointSize, lineWidth;
+  double highResolutionPointSizeFactor;
   // light options
   int light[6];
   double lightPosition[6][4], shine, shineExponent;
@@ -234,16 +247,22 @@ class CTX {
     int smooth, animCycle, animStep, combineTime, combineRemoveOrig;
     int fileFormat, plugins, forceNodeData;
     double animDelay;
+    std::string graphPointCommand;
+    double graphPointX, graphPointY;
   }post;
   // solver options
   struct{
     int plugins, listen;
     double timeout;
-    std::string socketName;
+    std::string socketName, pythonInterpreter, octaveInterpreter;
     std::string name[NUM_SOLVERS], executable[NUM_SOLVERS], remoteLogin[NUM_SOLVERS];
     int autoSaveDatabase, autoArchiveOutputFiles, autoMesh, autoMergeFile;
     int autoShowViews, autoShowLastStep, autoCheck, showInvisibleParameters;
   }solver;
+  // onelab options
+  struct{
+    short listen_port;
+  }onelab;
   // print options
   struct{
     int fileFormat, epsQuality, epsCompress, epsPS3Shading;
diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp
index d4a2a2d..d12c2dd 100644
--- a/Common/CreateFile.cpp
+++ b/Common/CreateFile.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -135,8 +135,8 @@ static PixelBuffer *GetCompositePixelBuffer(GLenum format, GLenum type)
   openglWindow *newg = 0;
 
   if(CTX::instance()->print.width > 0 || CTX::instance()->print.height > 0){
-    GLint width = FlGui::instance()->getCurrentOpenglWindow()->w();
-    GLint height = FlGui::instance()->getCurrentOpenglWindow()->h();
+    GLint width = FlGui::instance()->getCurrentOpenglWindow()->pixel_w();
+    GLint height = FlGui::instance()->getCurrentOpenglWindow()->pixel_h();
     if(CTX::instance()->print.width <= 0){
       double w = width * CTX::instance()->print.height / (double)height;
       width = (int)w;
@@ -168,8 +168,8 @@ static PixelBuffer *GetCompositePixelBuffer(GLenum format, GLenum type)
 
   PixelBuffer *buffer;
   if(newg || !CTX::instance()->print.compositeWindows){
-    GLint width = FlGui::instance()->getCurrentOpenglWindow()->w();
-    GLint height = FlGui::instance()->getCurrentOpenglWindow()->h();
+    GLint width = FlGui::instance()->getCurrentOpenglWindow()->pixel_w();
+    GLint height = FlGui::instance()->getCurrentOpenglWindow()->pixel_h();
     buffer = new PixelBuffer(width, height, format, type);
     buffer->fill(CTX::instance()->batch);
   }
@@ -188,11 +188,11 @@ static PixelBuffer *GetCompositePixelBuffer(GLenum format, GLenum type)
     std::vector<PixelBuffer*> buffers;
     for(unsigned int i = 0; i < g->gl.size(); i++){
       openglWindow::setLastHandled(g->gl[i]);
-      buffer = new PixelBuffer(g->gl[i]->w(), g->gl[i]->h(), format, type);
+      buffer = new PixelBuffer(g->gl[i]->pixel_w(), g->gl[i]->pixel_h(), format, type);
       buffer->fill(CTX::instance()->batch);
       buffers.push_back(buffer);
-      ww = std::max(ww, g->gl[i]->x() + g->gl[i]->w());
-      hh = std::max(hh, g->gl[i]->y() + g->gl[i]->h());
+      ww = std::max(ww, g->gl[i]->x() + g->gl[i]->pixel_w());
+      hh = std::max(hh, g->gl[i]->y() + g->gl[i]->pixel_h());
     }
     buffer = new PixelBuffer(ww, hh, format, type);
     for(unsigned int i = 0; i < g->gl.size(); i++){
@@ -222,7 +222,7 @@ void change_print_parameter(int frame)
   double v = first + frame * step * CTX::instance()->post.animStep;
   Msg::Info("Setting Print.Parameter = %g", v);
   opt_print_parameter(0, GMSH_SET | GMSH_GUI, v);
-  ParseString(CTX::instance()->print.parameterCommand);
+  ParseString(CTX::instance()->print.parameterCommand, true);
 }
 
 void CreateOutputFile(const std::string &fileName, int format,
@@ -434,9 +434,9 @@ void CreateOutputFile(const std::string &fileName, int format,
         break;
       }
       std::string base = SplitFileName(name)[1];
-      GLint width = FlGui::instance()->getCurrentOpenglWindow()->w();
-      GLint height = FlGui::instance()->getCurrentOpenglWindow()->h();
-      GLint viewport[4] = {0, 0, width, height};
+      GLint width = FlGui::instance()->getCurrentOpenglWindow()->pixel_w();
+      GLint height = FlGui::instance()->getCurrentOpenglWindow()->pixel_h();
+      GLint pixel_viewport[4] = {0, 0, width, height};
 
       PixelBuffer buffer(width, height, GL_RGB, GL_FLOAT);
 
@@ -464,7 +464,7 @@ void CreateOutputFile(const std::string &fileName, int format,
       int res = GL2PS_OVERFLOW;
       while(res == GL2PS_OVERFLOW) {
         buffsize += 2048 * 2048;
-        gl2psBeginPage(base.c_str(), "Gmsh", viewport,
+        gl2psBeginPage(base.c_str(), "Gmsh", pixel_viewport,
                        psformat, pssort, psoptions, GL_RGBA, 0, NULL,
                        15, 20, 10, buffsize, fp, base.c_str());
         if(CTX::instance()->print.epsQuality == 0){
@@ -473,8 +473,8 @@ void CreateOutputFile(const std::string &fileName, int format,
           glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
           glMatrixMode(GL_PROJECTION);
           glLoadIdentity();
-          glOrtho((double)viewport[0], (double)viewport[2],
-                  (double)viewport[1], (double)viewport[3], -1., 1.);
+          glOrtho((double)pixel_viewport[0], (double)pixel_viewport[2],
+                  (double)pixel_viewport[1], (double)pixel_viewport[3], -1., 1.);
           glMatrixMode(GL_MODELVIEW);
           glLoadIdentity();
           glRasterPos2d(0, 0);
@@ -505,14 +505,14 @@ void CreateOutputFile(const std::string &fileName, int format,
         break;
       }
       std::string base = SplitFileName(name)[1];
-      GLint width = FlGui::instance()->getCurrentOpenglWindow()->w();
-      GLint height = FlGui::instance()->getCurrentOpenglWindow()->h();
-      GLint viewport[4] = {0, 0, width, height};
+      GLint width = FlGui::instance()->getCurrentOpenglWindow()->pixel_w();
+      GLint height = FlGui::instance()->getCurrentOpenglWindow()->pixel_h();
+      GLint pixel_viewport[4] = {0, 0, width, height};
       GLint buffsize = 0;
       int res = GL2PS_OVERFLOW;
       while(res == GL2PS_OVERFLOW) {
         buffsize += 2048 * 2048;
-        gl2psBeginPage(base.c_str(), "Gmsh", viewport,
+        gl2psBeginPage(base.c_str(), "Gmsh", pixel_viewport,
                        GL2PS_TEX, GL2PS_NO_SORT, GL2PS_NONE, GL_RGBA, 0, NULL,
                        0, 0, 0, buffsize, fp, base.c_str());
         int oldtext = CTX::instance()->print.text;
@@ -545,7 +545,10 @@ void CreateOutputFile(const std::string &fileName, int format,
       }
       PixelBuffer *buffer = GetCompositePixelBuffer(GL_RGB, GL_UNSIGNED_BYTE);
       drawContext *ctx = FlGui::instance()->getCurrentOpenglWindow()->getDrawContext();
-      print_pgf(name, num, cnt, buffer, ctx->r, ctx->viewport, ctx->proj, ctx->model);
+      GLint width = FlGui::instance()->getCurrentOpenglWindow()->pixel_w();
+      GLint height = FlGui::instance()->getCurrentOpenglWindow()->pixel_h();
+      GLint pixel_viewport[4] = {0, 0, width, height};
+      print_pgf(name, num, cnt, buffer, ctx->r, pixel_viewport, ctx->proj, ctx->model);
       delete buffer;
       // restore view
       if(restoreGeneralAxis) opt_general_axes(0, GMSH_SET| GMSH_GUI, 1);
diff --git a/Common/CreateFile.h b/Common/CreateFile.h
index f8b02b6..51f9c1b 100644
--- a/Common/CreateFile.h
+++ b/Common/CreateFile.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index a4ad06b..92cd799 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -53,10 +53,12 @@ StringXString GeneralOptions_String[] = {
     ".gmsh-errors" ,
 #endif
     "File into which the log is saved if a fatal error occurs" },
+  { F|S, "ExecutableFileName", opt_general_executable_filename , "" ,
+    "File name of the Gmsh executable (read-only)"},
 
   { F,   "FileName" , opt_general_filename , "" ,
     "Current project file name (read-only)" },
-  { F|O, "FltkTheme" , opt_general_gui_theme , "" ,
+  { F|S, "FltkTheme" , opt_general_gui_theme , "" ,
     "FLTK user interface theme (try e.g. plastic or gtk+)" },
 
   { F|O, "GraphicsFont" , opt_general_graphics_font , "Helvetica" ,
@@ -84,6 +86,16 @@ StringXString GeneralOptions_String[] = {
     "4th most recent opened file"},
   { F|S, "RecentFile4", opt_general_recent_file4 , "untitled.geo" ,
     "5th most recent opened file"},
+  { F|S, "RecentFile5", opt_general_recent_file5 , "untitled.geo" ,
+    "6th most recent opened file"},
+  { F|S, "RecentFile6", opt_general_recent_file6 , "untitled.geo" ,
+    "7th most recent opened file"},
+  { F|S, "RecentFile7", opt_general_recent_file7 , "untitled.geo" ,
+    "8th most recent opened file"},
+  { F|S, "RecentFile8", opt_general_recent_file8 , "untitled.geo" ,
+    "9th most recent opened file"},
+  { F|S, "RecentFile9", opt_general_recent_file9 , "untitled.geo" ,
+    "10th most recent opened file"},
 
   { 0,   "SessionFileName" , opt_general_session_filename ,
 #if defined(WIN32)
@@ -168,6 +180,11 @@ StringXString SolverOptions_String[] = {
   { F|S, "Name9" , opt_solver_name9 , "" ,
     "Name of solver 9" },
 
+  { F|S, "OctaveInterpreter" , opt_solver_octave_interpreter , "octave" ,
+    "Name of the Octave interpreter (used to run .m files)" },
+  { F|S, "PythonInterpreter" , opt_solver_python_interpreter , "python" ,
+    "Name of the Python interpreter (used to run .py files if they are not executable)" },
+
   { F|S, "RemoteLogin0" , opt_solver_remote_login0 , "",
     "Command to login to a remote host to launch solver 0" },
   { F|S, "RemoteLogin1" , opt_solver_remote_login1 , "" ,
@@ -204,6 +221,10 @@ StringXString SolverOptions_String[] = {
 } ;
 
 StringXString PostProcessingOptions_String[] = {
+  { F|O, "GraphPointCommand" , opt_post_graph_point_command, "" ,
+    "Command parsed when double-clicking on a graph data point "
+    "(e.g. Merge Sprintf('file_%g.pos', PostProcessing.GraphPointX);)" },
+
   { 0, 0 , 0 , "" , 0 }
 } ;
 
@@ -421,8 +442,8 @@ StringXNumber GeneralOptions_Number[] = {
     "planes window" },
   { F|O, "ClipWholeElements" , opt_general_clip_whole_elements , 0. ,
     "Clip whole elements" },
-  { F|O, "ColorScheme", opt_general_color_scheme , 1. ,
-    "Default color scheme (0=dark, 1=light or 2=grayscale)" },
+  { F|S, "ColorScheme", opt_general_color_scheme , 1. ,
+    "Default color scheme for graphics (0=dark, 1=light, 2=grayscale, 3=reverse)" },
   { F|O, "ConfirmOverwrite" , opt_general_confirm_overwrite, 1. ,
     "Ask confirmation before overwriting files?" },
   { F|S, "ContextPositionX" , opt_general_context_position0 , 650. ,
@@ -470,6 +491,8 @@ StringXNumber GeneralOptions_Number[] = {
   { F|S, "FileChooserPositionY" , opt_general_file_chooser_position1 , 200. ,
     "Vertical position (in pixels) of the upper left corner of the file chooser "
     "windows" },
+  { F|S, "FltkColorScheme" , opt_general_gui_color_scheme , 0. ,
+    "FLTK user interface color theme (0: standard, 1:dark)" },
   { F|O, "FontSize" , opt_general_fontsize , -1. ,
     "Size of the font in the user interface (-1=automatic)" },
 
@@ -494,6 +517,10 @@ StringXNumber GeneralOptions_Number[] = {
   { F|S, "HighOrderToolsPositionY" , opt_general_hot_position1 , 150. ,
     "Vertical position (in pixels) of the upper left corner of the high order "
     "tools window" },
+  { F|O, "HighResolutionGraphics" , opt_general_high_resolution_graphics , 1. ,
+    "Use high-resolution OpenGL graphics (e.g. for Macs with retina displays)" },
+  { F|O, "HighResolutionPointSizeFactor" , opt_general_high_resolution_point_size_factor , 2. ,
+    "Point size factor when using high-resolution OpenGL graphics" },
 
   { F|O, "InitialModule", opt_general_initial_context, 0. ,
     "Module launched on startup (0=automatic, 1=geometry, 2=mesh, 3=solver, "
@@ -588,6 +615,8 @@ StringXNumber GeneralOptions_Number[] = {
     "Horizontal position (in pixels) of the (detached) menu tree" },
   { F|S, "MenuPositionY" , opt_general_menu_position1 , 400. ,
     "Vertical position (in pixels) of the (detached) menu tree" },
+  { F|O, "MessageFontSize" , opt_general_message_fontsize , -1. ,
+    "Size of the font in the message window (-1=automatic)" },
   { F|S, "MessageHeight" , opt_general_message_size , 300. ,
     "Height (in pixels) of the message console when it is visible (should be > 0)" },
   { F,   "MinX" , opt_general_xmin , 0. ,
@@ -796,7 +825,9 @@ StringXNumber GeometryOptions_Number[] = {
   { F|O, "OCCSewFaces" , opt_geometry_occ_sew_faces , 0. ,
     "Sew faces in STEP, IGES and BRep models" },
   { F|O, "OCCConnectFaces" , opt_geometry_occ_connect_faces , 0. ,
-    "Cut and connect faces in STEP, IGES and BRep models" },
+    "Cut and connect faces in STEP, IGES and BRep models (0=no, 1=internal, 2=Salome)" },
+  { F|O, "OCCScaling" , opt_geometry_occ_scaling , 1. ,
+    "Scale STEP, IGES and BRep model by given factor" },
   { F,   "OffsetX" , opt_geometry_offset0 , 0. ,
     "Model display offset along X-axis (in model coordinates)" },
   { F,   "OffsetY" , opt_geometry_offset1 , 0. ,
@@ -1185,6 +1216,8 @@ StringXNumber MeshOptions_Number[] = {
   { F|O, "ToleranceEdgeLength" , opt_mesh_tolerance_edge_length, 0.0,
     "Skip a model edge in mesh generation if its length is less than user's "
     "defined tolerance" },
+  { F|O, "ToleranceInitialDelaunay" , opt_mesh_tolerance_initial_delaunay, 1.e-8,
+    "Tolerance for initial 3D Delaunay mesher" },
   { F|O, "Triangles" , opt_mesh_triangles , 1. ,
     "Display mesh triangles?" },
 
@@ -1247,12 +1280,16 @@ StringXNumber PostProcessingOptions_Number[] = {
 
   { F|O, "ForceNodeData" , opt_post_force_node_data , 0. ,
     "Try to force saving datasets as NodeData" },
-
   { F|O, "Format" , opt_post_file_format , 10. ,
     "Default file format for post-processing views (0=ASCII view, 1=binary "
     "view, 2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file, "
     "10=automatic)" },
 
+  { F|O, "GraphPointX" , opt_post_graph_point_x , 0. ,
+    "Abscissa of last selected graph point" },
+  { F|O, "GraphPointY" , opt_post_graph_point_y , 0. ,
+    "Ordinate of last selected graph point" },
+
   { F|O, "HorizontalScales" , opt_post_horizontal_scales , 1. ,
     "Display value scales horizontally" },
 
@@ -1286,7 +1323,7 @@ StringXNumber ViewOptions_Number[] = {
   { F|O, "AutoPosition" , opt_view_auto_position , 1. ,
     "Position the scale or 2D plot automatically (0: manual, 1: automatic, 2: top left, "
     "3: top right, 4: bottom left, 5: bottom right, 6: top, 7: bottom, 8: left, 9: right, "
-    "10: full, 11: top third)" },
+    "10: full, 11: top third, 12: in model coordinates)" },
   { F|O, "Axes" , opt_view_axes , 0 ,
     "Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid, 5=ruler)" },
   { F|O, "AxesMikado" , opt_view_axes_mikado , 0. ,
@@ -1316,7 +1353,7 @@ StringXNumber ViewOptions_Number[] = {
     "Draw the `N minus b'-dimensional boundary of the element (N=element "
     "dimension, b=option value)" },
 
-  { F|O, "CenterGlyphs" , opt_view_center_glyphs , 1,
+  { F|O, "CenterGlyphs" , opt_view_center_glyphs , 0,
     "Center glyphs (arrows, numbers, etc.)? (0=left, 1=centered, 2=right)" },
   { F,   "Clip" , opt_view_clip , 0.,
     "Enable clipping planes? (Plane[i]=2^i, i=0,...,5)" },
@@ -1432,6 +1469,8 @@ StringXNumber ViewOptions_Number[] = {
     "Maximum recursion level for adaptive views" },
   { F,   "Max" , opt_view_max , 0. ,
     "Maximum value in the view (read-only)" },
+  { F,   "MaxVisible" , opt_view_max_visible , 0. ,
+    "Maximum value in the visible parts of the view (read-only)" },
   { F,   "MaxX" , opt_view_xmax , 0. ,
     "Maximum view coordinate along the X-axis (read-only)" },
   { F,   "MaxY" , opt_view_ymax , 0. ,
@@ -1440,6 +1479,8 @@ StringXNumber ViewOptions_Number[] = {
     "Maximum view coordinate along the Z-axis (read-only)" },
   { F,   "Min" , opt_view_min , 0. ,
     "Minimum value in the view (read-only)" },
+  { F,   "MinVisible" , opt_view_min_visible , 0. ,
+    "Minimum value in the visible parts of the view (read-only)" },
   { F,   "MinX" , opt_view_xmin , 0. ,
     "Minimum view coordinate along the X-axis (read-only)" },
   { F,   "MinY" , opt_view_ymin , 0. ,
@@ -1510,6 +1551,9 @@ StringXNumber ViewOptions_Number[] = {
     "Tensor Visualization Type" },
   { F,   "TimeStep" , opt_view_timestep , 0. ,
     "Current time step displayed" },
+  { F,   "Time" , opt_view_time , -1. ,
+    "Current time displayed (if positive, sets the time step corresponding "
+    "the given time value)" },
   { F,   "TransformXX" , opt_view_transform00 , 1. ,
     "Element (1,1) of the 3x3 coordinate transformation matrix" },
   { F,   "TransformXY" , opt_view_transform01 , 0. ,
@@ -1529,7 +1573,7 @@ StringXNumber ViewOptions_Number[] = {
   { F,   "TransformZZ" , opt_view_transform22 , 1. ,
     "Element (3,3) of the 3x3 coordinate transformation matrix" },
   { F,   "Type" , opt_view_type , 1 ,
-    "Type of plot (1=3D, 2=2D space, 3=2D time)" },
+    "Type of plot (1=3D, 2=2D space, 3=2D time, 4=2D)" },
 
   { F|O, "UseGeneralizedRaise" , opt_view_use_gen_raise , 0 ,
     "Use generalized raise?" },
@@ -1652,70 +1696,70 @@ StringXNumber PrintOptions_Number[] = {
 
 StringXColor GeneralOptions_Color[] = {
   { F|O, "Background" , opt_general_color_background ,
-    {0, 0, 0, 255}, {255, 255, 255, 255}, {255, 255, 255, 255},
+    {245, 245, 245, 255}, {255, 255, 255, 255}, {245, 245, 245, 255}, {50, 50, 50, 255},
     "Background color" },
   { F|O, "BackgroundGradient" , opt_general_color_background_gradient ,
-    {0, 0, 128, 255}, {208, 215, 255, 255}, {125, 125, 125, 255},
+    {165, 165, 165, 255}, {208, 215, 255, 255}, {165, 165, 165, 255}, {50, 50, 50, 255},
     "Background gradient color" },
   { F|O, "Foreground" , opt_general_color_foreground ,
-    {170, 170, 170, 255}, {85, 85, 85, 255}, {128, 128, 128, 255},
+    {85, 85, 85, 255}, {85, 85, 85, 255}, {85, 85, 85, 255}, {170, 170, 170, 255},
     "Foreground color" },
   { F|O, "Text" , opt_general_color_text ,
-    {255, 255, 255, 255}, {0, 0, 0, 255}, {0, 0, 0, 255},
+    {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}, {245, 245, 245, 255},
     "Text color" },
   { F|O, "Axes" , opt_general_color_axes ,
-    {255, 255, 255, 255}, {0, 0, 0, 255}, {0, 0, 0, 255},
+    {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}, {245, 245, 245, 255},
     "Axes color" },
   { F|O, "SmallAxes" , opt_general_color_small_axes ,
-    {255, 255, 255, 255}, {0, 0, 0, 255}, {0, 0, 0, 255},
+    {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}, {245, 245, 245, 255},
     "Small axes color" },
   { F|O, "AmbientLight" , opt_general_color_ambient_light,
-    {25, 25, 25, 255}, {25, 25, 25, 255}, {25, 25, 25, 255},
+    {25, 25, 25, 255}, {25, 25, 25, 255}, {25, 25, 25, 255}, {25, 25, 25, 255},
     "Ambient light color" },
   { F|O, "DiffuseLight" , opt_general_color_diffuse_light,
-    {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255},
+    {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255},
     "Diffuse light color" },
   { F|O, "SpecularLight" , opt_general_color_specular_light,
-    {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255},
+    {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255}, {255, 255, 255, 255},
     "Specular light color" },
-  { 0, 0 , 0 ,  {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 ,  {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , {0, 0, 0, 0} , 0 }
 } ;
 
 StringXColor GeometryOptions_Color[] = {
   { F|O, "Points" , opt_geometry_color_points ,
-    {178, 182, 129, 255}, {90, 90, 90, 255}, {0, 0, 0, 255},
+    {90, 90, 90, 255}, {90, 90, 90, 255}, {0, 0, 0, 255}, {178, 178, 178, 255},
     "Normal geometry point color" },
   { F|O, "Lines" , opt_geometry_color_lines ,
-    {0, 0, 255, 255}, {0, 0, 255, 255}, {0, 0, 0, 255},
+    {0, 0, 255, 255}, {0, 0, 255, 255}, {0, 0, 0, 255}, {0, 0, 255, 255},
     "Normal geometry curve color" },
   { F|O, "Surfaces" , opt_geometry_color_surfaces ,
-    {128, 128, 128, 255}, {128, 128, 128, 255}, {0, 0, 0, 255},
+    {128, 128, 128, 255}, {128, 128, 128, 255}, {0, 0, 0, 255}, {128, 128, 128, 255},
     "Normal geometry surface color" },
   { F|O, "Volumes" , opt_geometry_color_volumes ,
-    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255},
+    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255}, {255, 255, 0, 255},
     "Normal geometry volume color" },
   { F|O, "Selection" , opt_geometry_color_selection ,
-    {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255},
+    {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255},
     "Selected geometry color" },
   { F|O, "HighlightZero" , opt_geometry_color_highlight0 ,
-    {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255},
+    {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255}, {255, 0, 0, 255},
     "Highlight 0 color" },
   { F|O, "HighlightOne" , opt_geometry_color_highlight1 ,
-    {255, 150, 0, 255}, {255, 150, 0, 255}, {255, 150, 0, 255},
+    {255, 150, 0, 255}, {255, 150, 0, 255}, {255, 150, 0, 255}, {255, 150, 0, 255},
     "Highlight 1 color" },
   { F|O, "HighlightTwo" , opt_geometry_color_highlight2 ,
-    {255, 255, 0, 255}, {255, 255, 0, 255}, {255, 255, 0, 255},
+    {255, 255, 0, 255}, {255, 255, 0, 255}, {255, 255, 0, 255}, {255, 255, 0, 255},
     "Highlight 2 color" },
   { F|O, "Tangents" , opt_geometry_color_tangents ,
-    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255},
+    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255}, {255, 255, 0, 255},
     "Tangent geometry vectors color" },
   { F|O, "Normals" , opt_geometry_color_normals ,
-    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255},
+    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255}, {255, 0, 0, 255},
     "Normal geometry vectors color" },
   { F|O, "Projection" , opt_geometry_color_projection ,
-    {0, 255, 0, 255}, {0, 255, 0, 255}, {0, 0, 0, 255},
+    {0, 255, 0, 255}, {0, 255, 0, 255}, {0, 0, 0, 255}, {0, 255, 0, 255},
     "Projection surface color" },
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
 } ;
 
 #define COLW  {210, 210, 210, 255}
@@ -1747,90 +1791,90 @@ StringXColor GeometryOptions_Color[] = {
 
 StringXColor MeshOptions_Color[] = {
   { F|O, "Points" , opt_mesh_color_points ,
-    {0, 0, 255, 255}, {0, 0, 255, 255}, {0, 0, 0, 255},
+    {0, 0, 255, 255}, {0, 0, 255, 255}, {0, 0, 0, 255}, {0, 0, 255, 255},
     "Mesh node color" },
   { F|O, "PointsSup" , opt_mesh_color_points_sup ,
-    {255, 0, 255, 255}, {255, 0, 255, 255}, {0, 0, 0, 255},
+    {255, 0, 255, 255}, {255, 0, 255, 255}, {0, 0, 0, 255}, {255, 0, 255, 255},
     "Second order mesh node color" },
   { F|O, "Lines" , opt_mesh_color_lines ,
-    {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255},
+    {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255},
     "Mesh line color" },
   { F|O, "Triangles" , opt_mesh_color_triangles ,
-    COLT, COLT, COLW,
+    COLT, COLT, COLW, COLT,
     "Mesh triangle color (if Mesh.ColorCarousel=0)" },
   { F|O, "Quadrangles" , opt_mesh_color_quadrangles ,
-    COLQ, COLQ, COLW,
+    COLQ, COLQ, COLW, COLQ,
     "Mesh quadrangle color (if Mesh.ColorCarousel=0)" },
   { F|O, "Tetrahedra" , opt_mesh_color_tetrahedra ,
-    COLT, COLT, COLW,
+    COLT, COLT, COLW, COLT,
      "Mesh tetrahedron color (if Mesh.ColorCarousel=0)" },
   { F|O, "Hexahedra" , opt_mesh_color_hexahedra ,
-    COLQ, COLQ, COLW,
+    COLQ, COLQ, COLW, COLQ,
     "Mesh hexahedron color (if Mesh.ColorCarousel=0)" },
   { F|O, "Prisms" , opt_mesh_color_prisms ,
-    COLP, COLP, COLW,
+    COLP, COLP, COLW, COLP,
      "Mesh prism color (if Mesh.ColorCarousel=0)" },
   { F|O, "Pyramids" , opt_mesh_color_pyramid ,
-    COLY, COLY, COLW,
+    COLY, COLY, COLW, COLY,
      "Mesh pyramid color (if Mesh.ColorCarousel=0)" },
   { F|O, "Tangents" , opt_mesh_color_tangents ,
-    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255},
+    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255}, {255, 255, 0, 255},
     "Tangent mesh vector color" },
   { F|O, "Normals" , opt_mesh_color_normals ,
-    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255},
+    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255}, {255, 0, 0, 255},
     "Normal mesh vector color" },
-  { F|O, "Zero"     , opt_mesh_color_0 , COL0, COL0, COLW,
+  { F|O, "Zero"     , opt_mesh_color_0 , COL0, COL0, COLW, COL0,
     "Color 0 in color carousel" },
-  { F|O, "One"      , opt_mesh_color_1 , COL1, COL1, COLW,
+  { F|O, "One"      , opt_mesh_color_1 , COL1, COL1, COLW, COL1,
     "Color 1 in color carousel" },
-  { F|O, "Two"      , opt_mesh_color_2 , COL2, COL2, COLW,
+  { F|O, "Two"      , opt_mesh_color_2 , COL2, COL2, COLW, COL2,
     "Color 2 in color carousel" },
-  { F|O, "Three"    , opt_mesh_color_3 , COL3, COL3, COLW,
+  { F|O, "Three"    , opt_mesh_color_3 , COL3, COL3, COLW, COL3,
     "Color 3 in color carousel" },
-  { F|O, "Four"     , opt_mesh_color_4 , COL4, COL4, COLW,
+  { F|O, "Four"     , opt_mesh_color_4 , COL4, COL4, COLW, COL4,
     "Color 4 in color carousel" },
-  { F|O, "Five"     , opt_mesh_color_5 , COL5, COL5, COLW,
+  { F|O, "Five"     , opt_mesh_color_5 , COL5, COL5, COLW, COL5,
     "Color 5 in color carousel" },
-  { F|O, "Six"      , opt_mesh_color_6 , COL6, COL6, COLW,
+  { F|O, "Six"      , opt_mesh_color_6 , COL6, COL6, COLW, COL6,
     "Color 6 in color carousel" },
-  { F|O, "Seven"    , opt_mesh_color_7 , COL7, COL7, COLW,
+  { F|O, "Seven"    , opt_mesh_color_7 , COL7, COL7, COLW, COL7,
     "Color 7 in color carousel" },
-  { F|O, "Eight"    , opt_mesh_color_8 , COL8, COL8, COLW,
+  { F|O, "Eight"    , opt_mesh_color_8 , COL8, COL8, COLW, COL8,
     "Color 8 in color carousel" },
-  { F|O, "Nine"     , opt_mesh_color_9 , COL9, COL9, COLW,
+  { F|O, "Nine"     , opt_mesh_color_9 , COL9, COL9, COLW, COL9,
     "Color 9 in color carousel" },
-  { F|O, "Ten"      , opt_mesh_color_10, COL10, COL10, COLW,
+  { F|O, "Ten"      , opt_mesh_color_10, COL10, COL10, COLW, COL10,
     "Color 10 in color carousel" },
-  { F|O, "Eleven"   , opt_mesh_color_11, COL11, COL11, COLW,
+  { F|O, "Eleven"   , opt_mesh_color_11, COL11, COL11, COLW, COL11,
     "Color 11 in color carousel" },
-  { F|O, "Twelve"   , opt_mesh_color_12, COL12, COL12, COLW,
+  { F|O, "Twelve"   , opt_mesh_color_12, COL12, COL12, COLW, COL12,
     "Color 12 in color carousel" },
-  { F|O, "Thirteen" , opt_mesh_color_13, COL13, COL13, COLW,
+  { F|O, "Thirteen" , opt_mesh_color_13, COL13, COL13, COLW, COL13,
     "Color 13 in color carousel" },
-  { F|O, "Fourteen" , opt_mesh_color_14, COL14, COL14, COLW,
+  { F|O, "Fourteen" , opt_mesh_color_14, COL14, COL14, COLW, COL14,
     "Color 14 in color carousel" },
-  { F|O, "Fifteen"  , opt_mesh_color_15, COL15, COL15, COLW,
+  { F|O, "Fifteen"  , opt_mesh_color_15, COL15, COL15, COLW, COL15,
     "Color 15 in color carousel" },
-  { F|O, "Sixteen"  , opt_mesh_color_16, COL16, COL16, COLW,
+  { F|O, "Sixteen"  , opt_mesh_color_16, COL16, COL16, COLW, COL16,
     "Color 16 in color carousel" },
-  { F|O, "Seventeen", opt_mesh_color_17, COL17, COL17, COLW,
+  { F|O, "Seventeen", opt_mesh_color_17, COL17, COL17, COLW, COL17,
     "Color 17 in color carousel" },
-  { F|O, "Eighteen" , opt_mesh_color_18, COL18, COL18, COLW,
+  { F|O, "Eighteen" , opt_mesh_color_18, COL18, COL18, COLW, COL18,
     "Color 18 in color carousel" },
-  { F|O, "Nineteen" , opt_mesh_color_19, COL19, COL19, COLW,
+  { F|O, "Nineteen" , opt_mesh_color_19, COL19, COL19, COLW, COL19,
     "Color 19 in color carousel" },
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , {0, 0, 0, 0} , 0 }
 } ;
 
 StringXColor SolverOptions_Color[] = {
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
 } ;
 
 StringXColor PostProcessingOptions_Color[] = {
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
 } ;
 
-#define ELECOL  {255, 255, 255, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}
+#define ELECOL  {0, 0, 0, 255}, {0, 0, 0, 255}, {0, 0, 0, 255}, {245, 245, 245, 255}
 
 StringXColor ViewOptions_Color[] = {
   { F|O, "Points" , opt_view_color_points , ELECOL, "Point color" },
@@ -1842,22 +1886,22 @@ StringXColor ViewOptions_Color[] = {
   { F|O, "Prisms" , opt_view_color_prisms , ELECOL, "Prism color" },
   { F|O, "Pyramids" , opt_view_color_pyramids , ELECOL, "Pyramid color" },
   { F|O, "Tangents" , opt_view_color_tangents ,
-    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255},
+    {255, 255, 0, 255}, {255, 255, 0, 255}, {0, 0, 0, 255}, {255, 255, 0, 255},
     "Tangent vector color" },
   { F|O, "Normals" , opt_view_color_normals ,
-    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255},
+    {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255}, {255, 0, 0, 255},
     "Normal vector color" },
   { F|O, "Text2D" , opt_view_color_text2d , ELECOL, "2D text color" },
   { F|O, "Text3D" , opt_view_color_text3d , ELECOL, "3D text color" },
   { F|O, "Axes" , opt_view_color_axes , ELECOL, "Axes color" },
   { F|O, "Background2D" , opt_view_color_background2d ,
-    {255, 255, 255, 200}, {255, 255, 255, 200}, {255, 255, 255, 200},
+    {255, 255, 255, 200}, {255, 255, 255, 200}, {255, 255, 255, 200}, {245, 245, 245, 200},
     "Bacground color for 2D plots" },
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
 } ;
 
 StringXColor PrintOptions_Color[] = {
-  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
+  { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 }
 } ;
 
 #undef S
diff --git a/Common/GamePad.cpp b/Common/GamePad.cpp
index dc5181d..a7252a6 100644
--- a/Common/GamePad.cpp
+++ b/Common/GamePad.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -53,6 +53,7 @@
 #include <string>
 #include <iostream>
 #include <stdio.h>
+#include <algorithm>
 #include "GamePad.h"
 
 #if !defined(WIN32)
diff --git a/Common/GamePad.h b/Common/GamePad.h
index 1f6b333..71320ba 100644
--- a/Common/GamePad.h
+++ b/Common/GamePad.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp
index 3d24486..926ead8 100644
--- a/Common/Gmsh.cpp
+++ b/Common/Gmsh.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -25,10 +25,7 @@
 #include "PView.h"
 #endif
 
-//test new algo generation points
-#include "BasisFactory.h"
-
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB) && !defined(HAVE_ONELAB2)
 #include "gmshLocalNetworkClient.h"
 #endif
 
@@ -46,8 +43,16 @@
 #include "FlGui.h"
 #include "graphicWindow.h"
 #include "drawContext.h"
+#if defined(HAVE_ONELAB2)
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
 #endif
+#endif
+
+#if defined(HAVE_ONELAB2)
+#include "OnelabServer.h"
+#endif
 
 int GmshInitialize(int argc, char **argv)
 {
@@ -124,6 +129,24 @@ int GmshSetOption(const std::string &category, const std::string &name,
   return ColorOption(GMSH_SET|GMSH_GUI, category.c_str(), index, name.c_str(), value);
 }
 
+void GmshSetStringOption(const std::string &category, const std::string &name,
+                         std::string value, int index)
+{
+  StringOption(GMSH_SET|GMSH_GUI, category.c_str(), index, name.c_str(), value);
+}
+
+void GmshSetNumberOption(const std::string &category, const std::string &name,
+                         double value, int index)
+{
+  NumberOption(GMSH_SET|GMSH_GUI, category.c_str(), index, name.c_str(), value);
+}
+
+void GmshSetColorOption(const std::string &category, const std::string &name,
+                        unsigned int value, int index)
+{
+  ColorOption(GMSH_SET|GMSH_GUI, category.c_str(), index, name.c_str(), value);
+}
+
 int GmshGetOption(const std::string &category, const std::string &name,
                   std::string &value, int index)
 {
@@ -142,6 +165,30 @@ int GmshGetOption(const std::string &category, const std::string &name,
   return ColorOption(GMSH_GET, category.c_str(), index, name.c_str(), value);
 }
 
+std::string GmshGetStringOption(const std::string &category, const std::string &name,
+                                int index)
+{
+  std::string value;
+  StringOption(GMSH_GET, category.c_str(), index, name.c_str(), value);
+  return value;
+}
+
+double GmshGetNumberOption(const std::string &category, const std::string &name,
+                           int index)
+{
+  double value;
+  NumberOption(GMSH_GET, category.c_str(), index, name.c_str(), value);
+  return value;
+}
+
+int GmshGetColorOption(const std::string &category, const std::string &name,
+                       int index)
+{
+  unsigned int value;
+  ColorOption(GMSH_GET, category.c_str(), index, name.c_str(), value);
+  return value;
+}
+
 int GmshRestoreDefaultOptions()
 {
   ReInitOptions(0);
@@ -190,6 +237,13 @@ int GmshBatch()
             Msg::GetCommSize(), Msg::GetCommSize() > 1 ? "s" : "",
             Msg::GetMaxThreads(), Msg::GetMaxThreads() > 1 ? "s" : "");
   Msg::Info("Started on %s", Msg::GetLaunchDate().c_str());
+#if defined(HAVE_ONELAB2)
+  if(CTX::instance()->onelab.listen_port > 0) {
+    OnelabServer::instance(0, CTX::instance()->onelab.listen_port);
+    OnelabServer::instance()->Run();
+    Msg::Exit(0);
+  }
+#endif
 
   OpenProject(GModel::current()->getFileName());
   bool open = false;
@@ -207,6 +261,7 @@ int GmshBatch()
       MergeFile(CTX::instance()->files[i]);
   }
 
+
 #if defined(HAVE_POST) && defined(HAVE_MESH)
   if(!CTX::instance()->bgmFileName.empty()) {
     MergePostProcessingFile(CTX::instance()->bgmFileName);
@@ -218,7 +273,9 @@ int GmshBatch()
 #endif
 
   if(CTX::instance()->batch == -3){
+#if !defined(HAVE_ONELAB2)
     GmshRemote();
+#endif
   }
   else if(CTX::instance()->batch == -2){
     GModel::current()->checkMeshCoherence(CTX::instance()->geom.tolerance);
@@ -261,12 +318,11 @@ int GmshBatch()
     CreateOutputFile(name, CTX::instance()->mesh.fileFormat);
   }
 
-#if defined(HAVE_FLTK) // FIXME this actually does not require the GUI
   // launch solver (if requested)
-  solver_batch_cb(0, (void*)CTX::instance()->launchSolverAtStartup);
+#if defined(HAVE_ONELAB)
+  solver_batch_cb((void*)CTX::instance()->launchSolverAtStartup);
 #endif
 
-
   time_t now;
   time(&now);
   std::string currtime = ctime(&now);
@@ -333,12 +389,13 @@ int GmshFLTK(int argc, char **argv)
     else
       Msg::Error("Invalid background mesh (no view)");
   }
-
+#if !defined(HAVE_ONELAB2)
   // listen to external solvers
   if(CTX::instance()->solver.listen){
     gmshLocalNetworkClient *c = new gmshLocalNetworkClient("Listen", "");
     c->run();
   }
+#endif
 
   // launch solver (if requested) and fill onelab tree
   solver_cb(0, (void*)CTX::instance()->launchSolverAtStartup);
diff --git a/Common/Gmsh.h b/Common/Gmsh.h
index e6245c4..5485404 100644
--- a/Common/Gmsh.h
+++ b/Common/Gmsh.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -21,12 +21,24 @@ int GmshSetOption(const std::string &category, const std::string &name,
                   double value, int index=0);
 int GmshSetOption(const std::string &category, const std::string &name,
                   unsigned int value, int index=0);
+void GmshSetStringOption(const std::string &category, const std::string &name,
+                         std::string value, int index=0);
+void GmshSetNumberOption(const std::string &category, const std::string &name,
+                         double value, int index=0);
+void GmshSetColorOption(const std::string &category, const std::string &name,
+                        unsigned int value, int index=0);
 int GmshGetOption(const std::string &category, const std::string &name,
                   std::string &value, int index=0);
 int GmshGetOption(const std::string &category, const std::string &name,
                   double &value, int index=0);
 int GmshGetOption(const std::string &category, const std::string &name,
                   unsigned int &value, int index=0);
+std::string GmshGetStringOption(const std::string &category, const std::string &name,
+                                int index=0);
+double GmshGetNumberOption(const std::string &category, const std::string &name,
+                           int index=0);
+unsigned int GmshGetColorOption(const std::string &category, const std::string &name,
+                                int index=0);
 int GmshRestoreDefaultOptions();
 int GmshOpenProject(const std::string &fileName);
 int GmshClearProject();
diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in
index b6e2c4b..10de2ab 100644
--- a/Common/GmshConfig.h.in
+++ b/Common/GmshConfig.h.in
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -49,16 +49,17 @@
 #cmakedefine HAVE_ONELAB
 #cmakedefine HAVE_ONELAB2
 #cmakedefine HAVE_ONELAB_METAMODEL
+#cmakedefine HAVE_UDT
 #cmakedefine HAVE_OPENGL
 #cmakedefine HAVE_OPTHOM
 #cmakedefine HAVE_OSMESA
 #cmakedefine HAVE_PARSER
 #cmakedefine HAVE_PETSC
+#cmakedefine HAVE_PETSC4PY
 #cmakedefine HAVE_PLUGINS
 #cmakedefine HAVE_POST
 #cmakedefine HAVE_POPPLER
 #cmakedefine HAVE_QT
-#cmakedefine HAVE_RTREE
 #cmakedefine HAVE_SALOME
 #cmakedefine HAVE_SGEOM
 #cmakedefine HAVE_SLEPC
diff --git a/Common/GmshDefines.h b/Common/GmshDefines.h
index a4e360d..8a3b647 100644
--- a/Common/GmshDefines.h
+++ b/Common/GmshDefines.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -64,6 +64,7 @@
 #define TYPE_POLYG   9
 #define TYPE_POLYH   10
 #define TYPE_XFEM    11
+#define TYPE_MINI    12
 
 // Element types in .msh file format (numbers should not be changed)
 #define MSH_LIN_2    1
@@ -211,8 +212,9 @@
 #define MSH_TET_SUB 136
 #define MSH_TET_16  137
 #define MSH_TRI_MINI 138
+#define MSH_TET_MINI 139
 
-#define MSH_NUM_TYPE 138
+#define MSH_NUM_TYPE 139
 
 // Geometric entities
 #define ENT_NONE     0
diff --git a/Common/GmshIO.h b/Common/GmshIO.h
index b15795c..2e81515 100644
--- a/Common/GmshIO.h
+++ b/Common/GmshIO.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 3b96500..d61c5b5 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -28,6 +28,14 @@
 #if defined(HAVE_ONELAB)
 #include "onelab.h"
 #endif
+#if !defined(HAVE_ONELAB2)
+#include "gmshLocalNetworkClient.h"
+#endif
+
+#if defined(HAVE_ONELAB2)
+#include "OnelabDatabase.h"
+#include "NetworkUtils.h"
+#endif
 
 #if defined(HAVE_PETSC)
 #include <petsc.h>
@@ -56,10 +64,19 @@ std::string Msg::_firstError;
 GmshMessage *Msg::_callback = 0;
 std::string Msg::_commandLine;
 std::string Msg::_launchDate;
+std::map<std::string, double> Msg::_commandLineNumbers;
+std::map<std::string, std::string> Msg::_commandLineStrings;
+#if !defined(HAVE_ONELAB2)
 GmshClient *Msg::_client = 0;
+#endif
 std::string Msg::_execName;
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB2)
+OnelabDatabase *OnelabDatabase::_instance = NULL;
+OnelabDatabase *Msg::_onelabClient = 0;
+#elif defined(HAVE_ONELAB)
 onelab::client *Msg::_onelabClient = 0;
+#endif
+#if defined(HAVE_ONELAB)
 onelab::server *onelab::server::_server = 0;
 #endif
 std::string Msg::_gmshOnelabAction = "";
@@ -82,20 +99,22 @@ static int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
 
 static void addGmshPathToEnvironmentVar(const std::string &name)
 {
-  std::vector<std::string> split = SplitFileName(CTX::instance()->argv0);
-  std::string path;
-  char *tmp = getenv(name.c_str());
-  if(tmp){
-    path = tmp;
+  std::string gmshPath = SplitFileName(CTX::instance()->exeFileName)[0];
+  if(gmshPath.size()){
+    std::string path;
+    char *tmp = getenv(name.c_str());
+    if(tmp){
+      path = tmp;
 #if defined(WIN32)
-    path += ";" + split[0];
+      path += ";" + gmshPath;
 #else
-    path += ":" + split[0];
+      path += ":" + gmshPath;
 #endif
+    }
+    else
+      path = gmshPath;
+    SetEnvironmentVar(name.c_str(), path.c_str());
   }
-  else
-    path = split[0];
-  SetEnvironmentVar(name.c_str(), path.c_str());
 }
 
 void Msg::Init(int argc, char **argv)
@@ -134,14 +153,15 @@ void Msg::Init(int argc, char **argv)
     _commandLine += argv[i];
   }
 
-  if(argc && argv){
-    CTX::instance()->argv0 = std::string(argv[0]);
-    // add the directory where the binary is installed to the path where Python
-    // looks for modules, and to the path for executables (this allows us to
-    // find the onelab.py module or subclients automatically)
-    addGmshPathToEnvironmentVar("PYTHONPATH");
-    addGmshPathToEnvironmentVar("PATH");
-  }
+  CTX::instance()->exeFileName = GetExecutableFileName();
+  if(CTX::instance()->exeFileName.empty() && argc && argv)
+    CTX::instance()->exeFileName = argv[0];
+
+  // add the directory where the binary is installed to the path where Python
+  // looks for modules, and to the path for executables (this allows us to find
+  // the onelab.py module or subclients automatically)
+  addGmshPathToEnvironmentVar("PYTHONPATH");
+  addGmshPathToEnvironmentVar("PATH");
 
   InitializeOnelab("Gmsh");
 }
@@ -248,15 +268,18 @@ void Msg::Fatal(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Fatal", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Error(str);
+#endif
 
 #if defined(HAVE_FLTK)
   if(FlGui::available()){
-    FlGui::instance()->check();
+    if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
     std::string tmp = std::string("@C1 at .") + "Fatal   : " + str;
     FlGui::instance()->addMessage(tmp.c_str());
     if(_firstError.empty()) _firstError = str;
-    FlGui::instance()->setLastStatus(FL_RED);
+    FlGui::instance()->setLastStatus
+      (CTX::instance()->guiColorScheme ? FL_DARK_RED : FL_RED);
     FlGui::instance()->saveMessages
       ((CTX::instance()->homeDir + CTX::instance()->errorFileName).c_str());
     fl_alert("A fatal error has occurred which will force Gmsh to abort.\n"
@@ -294,15 +317,19 @@ void Msg::Error(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Error", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Error(str);
+#endif
 
 #if defined(HAVE_FLTK)
   if(FlGui::available()){
-    FlGui::instance()->check();
-    std::string tmp = std::string("@C1 at .") + "Error   : " + str;
+    if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
+    std::string tmp = std::string(CTX::instance()->guiColorScheme ? "@B72 at ." : "@C1 at .")
+      + "Error   : " + str;
     FlGui::instance()->addMessage(tmp.c_str());
     if(_firstError.empty()) _firstError = str;
-    FlGui::instance()->setLastStatus(FL_RED);
+    FlGui::instance()->setLastStatus
+      (CTX::instance()->guiColorScheme ? FL_DARK_RED : FL_RED);
   }
 #endif
 
@@ -332,12 +359,14 @@ void Msg::Warning(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Warning", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Warning(str);
-
+#endif
 #if defined(HAVE_FLTK)
   if(FlGui::available()){
-    FlGui::instance()->check();
-    std::string tmp = std::string("@C5 at .") + "Warning : " + str;
+    if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
+    std::string tmp = std::string(CTX::instance()->guiColorScheme ? "@B152 at ." : "@C5 at .")
+      + "Warning : " + str;
     FlGui::instance()->addMessage(tmp.c_str());
     if(_firstWarning.empty()) _firstWarning = str;
     FlGui::instance()->setLastStatus();
@@ -368,7 +397,9 @@ void Msg::Info(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Info", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Info(str);
+#endif
 
 #if defined(HAVE_FLTK)
 #if defined(_OPENMP)
@@ -376,7 +407,7 @@ void Msg::Info(const char *fmt, ...)
 #endif
   {
     if(FlGui::available()){
-      FlGui::instance()->check();
+      if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
       std::string tmp = std::string("Info    : ") + str;
       FlGui::instance()->addMessage(tmp.c_str());
     }
@@ -407,7 +438,9 @@ void Msg::Direct(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Direct", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Info(str);
+#endif
 
 #if defined(HAVE_FLTK)
 #if defined(_OPENMP)
@@ -415,8 +448,9 @@ void Msg::Direct(const char *fmt, ...)
 #endif
   {
     if(FlGui::available()){
-      FlGui::instance()->check();
-      std::string tmp = std::string("@C4 at .") + str;
+      if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
+      std::string tmp = std::string(CTX::instance()->guiColorScheme ? "@B136 at ." : "@C4 at .")
+        + str;
       FlGui::instance()->addMessage(tmp.c_str());
     }
   }
@@ -446,7 +480,9 @@ void Msg::StatusBar(bool log, const char *fmt, ...)
   va_end(args);
 
   if(_callback && log) (*_callback)("Info", str);
+#if !defined(HAVE_ONELAB2)
   if(_client && log) _client->Info(str);
+#endif
 
 #if defined(HAVE_FLTK)
 #if defined(_OPENMP)
@@ -454,7 +490,7 @@ void Msg::StatusBar(bool log, const char *fmt, ...)
 #endif
   {
     if(FlGui::available()){
-      if(log) FlGui::instance()->check();
+      if(log && FlGui::instance()->in_main_thread()) FlGui::instance()->check();
       if(!log || _verbosity > 4)
 	FlGui::instance()->setStatus(str);
       if(log){
@@ -499,7 +535,9 @@ void Msg::Debug(const char *fmt, ...)
   va_end(args);
 
   if(_callback) (*_callback)("Debug", str);
+#if !defined(HAVE_ONELAB2)
   if(_client) _client->Info(str);
+#endif
 
 #if defined(HAVE_FLTK)
   if(FlGui::available()){
@@ -532,11 +570,13 @@ void Msg::ProgressMeter(int n, int N, bool log, const char *fmt, ...)
     va_end(args);
     sprintf(str2, "%3d%%    : %s", _progressMeterCurrent, str);
 
+#if !defined(HAVE_ONELAB2)
     if(_client) _client->Progress(str2);
+#endif
 
 #if defined(HAVE_FLTK)
     if(FlGui::available() && _verbosity > 4){
-      FlGui::instance()->check();
+      if(FlGui::instance()->in_main_thread()) FlGui::instance()->check();
       FlGui::instance()->setProgress(str, (n > N - 1) ? 0 : n, 0, N);
     }
 #endif
@@ -597,7 +637,9 @@ void Msg::PrintErrorCounter(const char *title)
 
 #if defined(HAVE_FLTK)
   if(FlGui::available()){
-    std::string col = _errorCount ? "@C1 at ." : "@C5 at .";
+    std::string col = _errorCount ?
+      std::string(CTX::instance()->guiColorScheme ? "@B72 at ." : "@C1 at .") :
+      std::string(CTX::instance()->guiColorScheme ? "@B152 at ." : "@C5 at .");
     FlGui::instance()->addMessage((col + prefix + line).c_str());
     FlGui::instance()->addMessage((col + prefix + title).c_str());
     FlGui::instance()->addMessage((col + prefix + warn).c_str());
@@ -702,7 +744,9 @@ int Msg::GetAnswer(const char *question, int defaultval, const char *zero,
 
 bool Msg::UseOnelab()
 {
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB2)
+  return true;
+#elif defined(HAVE_ONELAB)
   return _onelabClient ? true : false;
 #else
   return false;
@@ -714,14 +758,22 @@ void Msg::SetOnelabNumber(std::string name, double val, bool visible)
 #if defined(HAVE_ONELAB)
   if(_onelabClient){
     std::vector<onelab::number> numbers;
+#if defined(HAVE_ONELAB2)
+    _onelabClient->get(numbers, name, "Gmsh");
+#else
     _onelabClient->get(numbers, name);
+#endif
     if(numbers.empty()){
       numbers.resize(1);
       numbers[0].setName(name);
     }
     numbers[0].setValue(val);
     numbers[0].setVisible(visible);
+#if defined(HAVE_ONELAB2)
+    _onelabClient->set(numbers[0], "Gmsh");
+#else
     _onelabClient->set(numbers[0]);
+#endif
   }
 #endif
 }
@@ -731,14 +783,22 @@ void Msg::SetOnelabString(std::string name, std::string val, bool visible)
 #if defined(HAVE_ONELAB)
   if(_onelabClient){
     std::vector<onelab::string> strings;
+#if defined(HAVE_ONELAB2)
+    _onelabClient->get(strings, name, "Gmsh");
+#else
     _onelabClient->get(strings, name);
+#endif
     if(strings.empty()){
       strings.resize(1);
       strings[0].setName(name);
     }
     strings[0].setValue(val);
     strings[0].setVisible(visible);
+#if defined(HAVE_ONELAB2)
+    _onelabClient->set(strings[0], "Gmsh");
+#else
     _onelabClient->set(strings[0]);
+#endif
   }
 #endif
 }
@@ -773,7 +833,46 @@ public:
 
 void Msg::InitializeOnelab(const std::string &name, const std::string &sockname)
 {
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB2)
+  if(sockname.empty()){
+    if(name != "Gmsh"){ // load db from file:
+      FILE *fp = Fopen(name.c_str(), "rb");
+      if(fp){
+        OnelabDatabase::instance()->fromFile(fp);
+        fclose(fp);
+      }
+      else
+        Error("Error loading onelab database '%s'", name.c_str());
+    }
+    _onelabClient = OnelabDatabase::instance();
+  }
+  else{
+    UInt32 address = 0;
+    UInt16 port = 1148;
+    size_t colon = sockname.find(':');
+    if(colon != std::string::npos) {
+      address = ip4_inet_pton(sockname.substr(0,colon).c_str());
+      port = atoi(sockname.substr(colon+1).c_str());
+    }
+    GmshNetworkClient *c = OnelabDatabase::instance()->useAsNetworkClient(address, port, name);
+    if(c == NULL) {
+      Error("Unable to connect ONELAB server (%s)", sockname.c_str());
+      Exit(1);
+    }
+    _onelabClient = OnelabDatabase::instance();
+
+    SetOnelabNumber(name + "/UseCommandLine", 1, false);
+    SetOnelabString(name + "/FileExtension", ".geo", false);
+    SetOnelabString(name + "/9CheckCommand", "-", false);
+    SetOnelabString(name + "/9ComputeCommand", "-3", false);
+    std::vector<onelab::string> ps;
+    _onelabClient->get(ps, name + "/Action", "Gmsh");
+    if(ps.size()){
+      Info("Performing ONELAB '%s'", ps[0].getValue().c_str());
+      if(ps[0].getValue() == "initialize") Exit(0);
+    }
+  }
+#elif defined(HAVE_ONELAB)
   if(_onelabClient) delete _onelabClient;
   if(sockname.empty()){
     _onelabClient = new localGmsh();
@@ -811,30 +910,29 @@ void Msg::LoadOnelabClient(const std::string &clientName, const std::string &soc
 {
 #if defined(HAVE_ONELAB)
   onelab::remoteNetworkClient *client = 0;
-  client = new onelab::remoteNetworkClient(clientName,sockName);
+  client = new onelab::remoteNetworkClient(clientName, sockName);
   if(client){
     std::string action, cmd;
     std::vector<onelab::string> ps;
     client->get(ps,clientName+"/Action");
     if(ps.size() && ps[0].getValue().size())
       action.assign(ps[0].getValue());
-
     //cmd.assign("");
     if(!action.compare("compute")){
       std::vector<onelab::string> ps;
       client->get(ps,clientName+"/FullCmdLine");
       if(ps.size() && ps[0].getValue().size())
-	cmd.assign(ps[0].getValue());
+        cmd.assign(ps[0].getValue());
 
       if(cmd.size()){
-	Msg::Info("Loader calls <%s>",cmd.c_str());
-	//client->sendInfo(strcat("Loader calls",cmd.c_str()));
-	std::cout << "Loader calls " << cmd << std::endl;
-	SystemCall(cmd.c_str(),true); //true->blocking
+        Msg::Info("Loader calls <%s>", cmd.c_str());
+        //client->sendInfo(strcat("Loader calls",cmd.c_str()));
+        std::cout << "Loader calls " << cmd << std::endl;
+        SystemCall(cmd.c_str(), true); //true->blocking
       }
       else
-	Msg::Info("No full command line found for <%s>",
-		    clientName.c_str());
+        Msg::Info("No full command line found for <%s>",
+                  clientName.c_str());
     }
     Msg::Info("Stopping client <%s>", clientName.c_str());
     delete client;
@@ -862,6 +960,7 @@ static void _setStandardOptions(onelab::parameter *p,
   // numbers
   if(fopt.count("Visible")) p->setVisible(fopt["Visible"][0] ? true : false);
   if(fopt.count("ReadOnly")) p->setReadOnly(fopt["ReadOnly"][0] ? true : false);
+  if(fopt.count("NeverChanged")) p->setNeverChanged(fopt["NeverChanged"][0] ? true : false);
   if(fopt.count("ReadOnlyRange"))
     p->setAttribute("ReadOnlyRange", fopt["ReadOnlyRange"][0] ? "1" : "0");
   if(fopt.count("AutoCheck"))
@@ -892,7 +991,12 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
                                   std::map<std::string, std::vector<std::string> > &copt)
 {
 #if defined(HAVE_ONELAB)
-  if(!_onelabClient || val.empty()) return;
+  if(!_onelabClient) return;
+
+  if(val.empty()){
+    Msg::Error("No value to exchange with ONELAB");
+    return;
+  }
 
   std::string name;
   if(copt.count("Name"))
@@ -907,7 +1011,11 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
   }
 
   std::vector<onelab::number> ps;
+#if defined(HAVE_ONELAB2)
+  _onelabClient->get(ps, name, "Gmsh");
+#else
   _onelabClient->get(ps, name);
+#endif
   bool noRange = true, noChoices = true, noLoop = true;
   bool noGraph = true, noClosed = true;
   if(ps.size()){
@@ -987,8 +1095,12 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
   if(noClosed && fopt.count("Closed"))
     ps[0].setAttribute("Closed", fopt["Closed"][0] ? "1" : "0");
   _setStandardOptions(&ps[0], fopt, copt);
+#if defined(HAVE_ONELAB2)
+  _onelabClient->set(ps[0], "Gmsh");
+#else
   _onelabClient->set(ps[0]);
 #endif
+#endif
 }
 
 void Msg::ExchangeOnelabParameter(const std::string &key,
@@ -997,7 +1109,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
                                   std::map<std::string, std::vector<std::string> > &copt)
 {
 #if defined(HAVE_ONELAB)
-  if(!_onelabClient || val.empty()) return;
+  if(!_onelabClient) return;
 
   std::string name;
   if(copt.count("Name"))
@@ -1041,8 +1153,12 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
   if(noMultipleSelection && copt.count("MultipleSelection"))
     ps[0].setAttribute("MultipleSelection", copt["MultipleSelection"][0]);
   _setStandardOptions(&ps[0], fopt, copt);
+#if defined(HAVE_ONELAB2)
+  _onelabClient->set(ps[0], "Gmsh");
+#else
   _onelabClient->set(ps[0]);
 #endif
+#endif
 }
 
 void Msg::UndefineOnelabParameter(const std::string &name)
@@ -1083,9 +1199,23 @@ void Msg::ImportPhysicalsAsOnelabRegions()
 #endif
 }
 
+void Msg::RunOnelabClient(const std::string &name, const std::string &command)
+{
+#if defined(HAVE_ONELAB) && !defined(HAVE_ONELAB2)
+  gmshLocalNetworkClient client(name, command, "", true);
+  client.run();
+#endif
+}
+
 void Msg::FinalizeOnelab()
 {
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB2)
+  if(_onelabClient) {
+    _onelabClient->finalize();
+    delete _onelabClient;
+    _onelabClient = 0;
+  }
+#elif defined(HAVE_ONELAB)
   if(_onelabClient){
     delete _onelabClient;
     _onelabClient = 0;
diff --git a/Common/GmshMessage.h b/Common/GmshMessage.h
index 2345fee..350aac7 100644
--- a/Common/GmshMessage.h
+++ b/Common/GmshMessage.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -11,9 +11,15 @@
 #include <string>
 #include <stdarg.h>
 
+#include "GmshConfig.h"
+
 class GmshClient;
 namespace onelab{ class client; }
 
+#if defined(HAVE_ONELAB2)
+class OnelabDatabase;
+#endif
+
 // the external message handler
 class GmshMessage{
  public:
@@ -41,10 +47,20 @@ class Msg {
   static GmshMessage *_callback;
   // command-line and startup time
   static std::string _commandLine, _launchDate;
+  // command-line-specified numbers and strings
+  static std::map<std::string, double> _commandLineNumbers;
+  static std::map<std::string, std::string> _commandLineStrings;
+#if !defined(HAVE_ONELAB2)
   // communication with Gmsh when run remotely
   static GmshClient *_client;
+#endif
+#if defined(HAVE_ONELAB2)
+  // communication with onelab server (replace _client and old _onelabClient)
+  static OnelabDatabase *_onelabClient;
+#elif defined(HAVE_ONELAB)
   // communication with onelab server
   static onelab::client *_onelabClient;
+#endif
   // internal onelab status for Gmsh parser
   static std::string _gmshOnelabAction;
   // executable name
@@ -67,6 +83,14 @@ class Msg {
   static int GetVerbosity(){ return _verbosity; }
   static std::string GetLaunchDate(){ return _launchDate; }
   static std::string GetCommandLineArgs(){ return _commandLine; }
+  static std::map<std::string, double> &GetCommandLineNumbers()
+  {
+    return _commandLineNumbers;
+  }
+  static std::map<std::string, std::string> &GetCommandLineStrings()
+  {
+    return _commandLineStrings;
+  }
   static void Fatal(const char *fmt, ...);
   static void Error(const char *fmt, ...);
   static void Warning(const char *fmt, ...);
@@ -96,8 +120,16 @@ class Msg {
   static void SetExecutableName(const std::string &name) { _execName.assign(name); }
   static std::string GetExecutableName() { return _execName; }
   static void LoadOnelabClient(const std::string &name, const std::string &sockName);
+#if !defined(HAVE_ONELAB2)
   static GmshClient *GetGmshClient(){ return _client; }
+#else
+  static int GetGmshClient(){ return 1; }
+#endif
+#if defined(HAVE_ONELAB2)
+  static OnelabDatabase *GetOnelabClient(){ return _onelabClient; }
+#elif defined(HAVE_ONELAB)
   static onelab::client *GetOnelabClient(){ return _onelabClient; }
+#endif
   static void FinalizeOnelab();
   static bool UseOnelab();
   static void SetOnelabNumber(std::string name, double val, bool visible);
@@ -113,6 +145,7 @@ class Msg {
                                       std::map<std::string, std::vector<double> > &fopt,
                                       std::map<std::string, std::vector<std::string> > &copt);
   static void UndefineOnelabParameter(const std::string &name);
+  static void RunOnelabClient(const std::string &name, const std::string &exe="");
   static void ImportPhysicalsAsOnelabRegions();
 };
 
diff --git a/Common/GmshRemote.cpp b/Common/GmshRemote.cpp
index 83b1245..0e4b567 100644
--- a/Common/GmshRemote.cpp
+++ b/Common/GmshRemote.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,7 +19,7 @@
 #include <sstream>
 #include "GmshMessage.h"
 
-#if defined(HAVE_ONELAB) && defined(HAVE_POST)
+#if defined(HAVE_ONELAB) && defined(HAVE_POST) && !defined(HAVE_ONELAB2)
 
 #include "onelab.h"
 #include "OpenFile.h"
diff --git a/Common/GmshRemote.h b/Common/GmshRemote.h
index d33183b..9734c0f 100644
--- a/Common/GmshRemote.h
+++ b/Common/GmshRemote.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h
index 467a936..2ee9cd6 100644
--- a/Common/GmshSocket.h
+++ b/Common/GmshSocket.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // Permission is hereby granted, free of charge, to any person
 // obtaining a copy of this software and associated documentation
@@ -28,9 +28,7 @@
 #ifndef _GMSH_SOCKET_H_
 #define _GMSH_SOCKET_H_
 
-#if !defined(ONELAB_LOADER)
 #include "GmshConfig.h"
-#endif
 
 #include <string>
 #include <stdio.h>
@@ -328,11 +326,11 @@ class GmshServer : public GmshSocket{
  public:
   GmshServer() : GmshSocket(), _portno(-1) {}
   virtual ~GmshServer(){}
-  virtual int NonBlockingSystemCall(const char *str) = 0;
+  virtual int NonBlockingSystemCall(const std::string &exe, const std::string &args) = 0;
   virtual int NonBlockingWait(double waitint, double timeout, int socket=-1) = 0;
-  // start the client by launching "command" (command is supposed to contain
+  // start the client by launching "exe args" (args is supposed to contain
   // '%s' where the socket name should appear)
-  int Start(const char *command, const char *sockname, double timeout)
+  int Start(const char *exe, const char *args, const char *sockname, double timeout)
   {
     if(!sockname) throw "Invalid (null) socket name";
     _sockname = sockname;
@@ -397,10 +395,10 @@ class GmshServer : public GmshSocket{
       }
     }
 
-    if(command && strlen(command)){
-      char cmd[1024];
-      sprintf(cmd, command, _sockname.c_str());
-      NonBlockingSystemCall(cmd); // starts the solver
+    if((exe && strlen(exe)) || (args && strlen(args))){
+      char s[1024];
+      sprintf(s, args, _sockname.c_str());
+      NonBlockingSystemCall(exe, s); // starts the solver
     }
     else{
       timeout = 0.; // no command launched: don't set a timeout
diff --git a/Common/GmshVersion.h.in b/Common/GmshVersion.h.in
index c134050..08ee733 100644
--- a/Common/GmshVersion.h.in
+++ b/Common/GmshVersion.h.in
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/Hash.h b/Common/Hash.h
index 5e3257a..449c0c7 100644
--- a/Common/Hash.h
+++ b/Common/Hash.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/HashMap.h b/Common/HashMap.h
index d4f885f..871c098 100644
--- a/Common/HashMap.h
+++ b/Common/HashMap.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/ListUtils.cpp b/Common/ListUtils.cpp
index cbac7ac..49ee89c 100644
--- a/Common/ListUtils.cpp
+++ b/Common/ListUtils.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/ListUtils.h b/Common/ListUtils.h
index bbe9496..e91ad62 100644
--- a/Common/ListUtils.h
+++ b/Common/ListUtils.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/Main.cpp b/Common/Main.cpp
index cb6a3c8..a2e4f31 100644
--- a/Common/Main.cpp
+++ b/Common/Main.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/MallocUtils.cpp b/Common/MallocUtils.cpp
index 39ea9fe..14472e8 100644
--- a/Common/MallocUtils.cpp
+++ b/Common/MallocUtils.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/MallocUtils.h b/Common/MallocUtils.h
index 125a607..e0ad781 100644
--- a/Common/MallocUtils.h
+++ b/Common/MallocUtils.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/OS.cpp b/Common/OS.cpp
index 808b26b..ebb7903 100644
--- a/Common/OS.cpp
+++ b/Common/OS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -16,9 +16,11 @@
 #include <math.h>
 #include "GmshConfig.h"
 #include "StringUtils.h"
+#include "Context.h"
 
 #if defined(__APPLE__)
 #include <sys/sysctl.h>
+#include <mach-o/dyld.h>
 #endif
 
 #if defined(__linux__) && !defined(BUILD_ANDROID)
@@ -142,6 +144,68 @@ static unsigned utf8toUtf16(const char* src, unsigned srclen,
   return count;
 }
 
+static unsigned utf8FromUtf16(char* dst, unsigned dstlen,
+                              const wchar_t* src, unsigned srclen)
+{
+  unsigned i = 0;
+  unsigned count = 0;
+  if (dstlen) {
+    for (;;) {
+      unsigned ucs;
+      if (i >= srclen) {dst[count] = 0; return count;}
+      ucs = src[i++];
+      if (ucs < 0x80U) {
+        dst[count++] = ucs;
+        if (count >= dstlen) {dst[count-1] = 0; break;}
+      }
+      else if (ucs < 0x800U) { /* 2 bytes */
+        if (count+2 >= dstlen) {dst[count] = 0; count += 2; break;}
+        dst[count++] = 0xc0 | (ucs >> 6);
+        dst[count++] = 0x80 | (ucs & 0x3F);
+      }
+      else if (ucs >= 0xd800 && ucs <= 0xdbff && i < srclen &&
+	       src[i] >= 0xdc00 && src[i] <= 0xdfff) {
+        /* surrogate pair */
+        unsigned ucs2 = src[i++];
+        ucs = 0x10000U + ((ucs&0x3ff)<<10) + (ucs2&0x3ff);
+        /* all surrogate pairs turn into 4-byte utf8 */
+        if (count+4 >= dstlen) {dst[count] = 0; count += 4; break;}
+        dst[count++] = 0xf0 | (ucs >> 18);
+        dst[count++] = 0x80 | ((ucs >> 12) & 0x3F);
+        dst[count++] = 0x80 | ((ucs >> 6) & 0x3F);
+        dst[count++] = 0x80 | (ucs & 0x3F);
+      }
+      else {
+        /* all others are 3 bytes: */
+        if (count+3 >= dstlen) {dst[count] = 0; count += 3; break;}
+        dst[count++] = 0xe0 | (ucs >> 12);
+        dst[count++] = 0x80 | ((ucs >> 6) & 0x3F);
+        dst[count++] = 0x80 | (ucs & 0x3F);
+      }
+    }
+  }
+  /* we filled dst, measure the rest: */
+  while (i < srclen) {
+    unsigned ucs = src[i++];
+    if (ucs < 0x80U) {
+      count++;
+    }
+    else if (ucs < 0x800U) { /* 2 bytes */
+      count += 2;
+    }
+    else if (ucs >= 0xd800 && ucs <= 0xdbff && i < srclen-1 &&
+             src[i+1] >= 0xdc00 && src[i+1] <= 0xdfff) {
+      /* surrogate pair */
+      ++i;
+      count += 4;
+    }
+    else {
+      count += 3;
+    }
+  }
+  return count;
+}
+
 static wchar_t *wbuf[3] = {NULL, NULL, NULL};
 
 static void setwbuf(int i, const char *f)
@@ -186,7 +250,7 @@ const char *GetEnvironmentVar(const char *var)
 #endif
 }
 
-const void SetEnvironmentVar(const char *var, const char *val)
+void SetEnvironmentVar(const char *var, const char *val)
 {
 #if defined(WIN32) && !defined(__CYGWIN__)
   // should probably use Unicode version here
@@ -311,6 +375,35 @@ int GetProcessId()
 #endif
 }
 
+std::string GetExecutableFileName()
+{
+  std::string name = "";
+#if defined(WIN32) && !defined(__CYGWIN__)
+  WCHAR src[MAX_PATH];
+  DWORD size = GetModuleFileNameW(NULL, src, MAX_PATH);
+  if(size){
+    char dst[MAX_PATH];
+    utf8FromUtf16(dst, MAX_PATH, src, size);
+    name = std::string(dst);
+  }
+#elif defined(__APPLE__)
+  char path[PATH_MAX];
+  uint32_t size = sizeof(path);
+  if(_NSGetExecutablePath(path, &size) == 0){
+    char real[PATH_MAX];
+    if(realpath(path, real)){
+      name = std::string(real);
+    }
+  }
+#elif defined(__linux__)
+  char path[4096];
+  if(readlink("/proc/self/exe", path, 4096) > 0){
+    name = std::string(path);
+  }
+#endif
+  return name;
+}
+
 std::string GetHostName()
 {
   char host[256];
@@ -379,39 +472,36 @@ int KillProcess(int pid)
   return 1;
 }
 
-int SystemCall(const std::string &command, bool blocking)
+int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
+                  bool blocking)
 {
-  // separate (potential) executable from arguments
-  std::string exe, args;
-  std::string::size_type pos = command.find_first_of(" ");
-  if(pos != std::string::npos){
-    exe = command.substr(0, pos);
-    args = command.substr(pos, command.size() - pos);
-  }
-  else
-    exe = command;
-
-  // get executable extension
+  // do we try to run a .py script, .m script or an .exe?
   std::vector<std::string> split = SplitFileName(exe);
-
-  // do we try to run a .py script or a .exe?
   bool isPython = (split[2] == ".py" || split[2] == ".PY");
+  bool isOctave = (split[2] == ".m" || split[2] == ".M");
   bool isExe = (split[2] == ".exe" || split[2] == ".EXE");
 
-  if(isPython || isExe){
+  if(isPython || isOctave || isExe){
     if(StatFile(exe)){
       Msg::Error("Unable to open file '%s'", exe.c_str());
       return 1;
     }
   }
 
+  std::string command;
+  if(exe.size()){
+    command.append("\"" + exe + "\""); // allows exe with white space
+    if(argsOrCommand.size()) command.append(" ");
+  }
+  command.append(argsOrCommand);
+
 #if defined(WIN32) && !defined(__CYGWIN__)
-  if(isPython){
+  if(isPython || isOctave){
     Msg::Info("Shell opening '%s' with arguments '%s'", exe.c_str(),
-              args.c_str());
+              argsOrCommand.c_str());
     setwbuf(0, "open");
     setwbuf(1, exe.c_str());
-    setwbuf(2, args.c_str());
+    setwbuf(2, argsOrCommand.c_str());
     ShellExecuteW(NULL, wbuf[0], wbuf[1], wbuf[2], NULL, 0);
   }
   else{
@@ -441,12 +531,17 @@ int SystemCall(const std::string &command, bool blocking)
   }
 #else
   std::string cmd(command);
-  if(isPython || isExe){
+  if(isPython || isOctave || isExe){
     if(access(exe.c_str(), X_OK)){
       if(isPython){
-        Msg::Info("Script '%s' is not executable: running with python",
-		  exe.c_str());
-        cmd = "python " + cmd;
+        Msg::Info("Script '%s' is not executable: running with `%s'",
+		  exe.c_str(), CTX::instance()->solver.pythonInterpreter.c_str());
+        cmd = CTX::instance()->solver.pythonInterpreter + " " + cmd;
+      }
+      else if(isOctave){
+        Msg::Info("Script '%s' is not executable: running with `%s'",
+		  exe.c_str(), CTX::instance()->solver.octaveInterpreter.c_str());
+        cmd = CTX::instance()->solver.octaveInterpreter + " " + cmd;
       }
       else
         Msg::Warning("File '%s' is not executable", exe.c_str());
@@ -467,6 +562,11 @@ int SystemCall(const std::string &command, bool blocking)
   return 0;
 }
 
+int SystemCall(const std::string &command, bool blocking)
+{
+  return SystemCallExe("", command, blocking);
+}
+
 std::string GetCurrentWorkdir()
 {
   char path[1024];
diff --git a/Common/OS.h b/Common/OS.h
index 685005b..449036c 100644
--- a/Common/OS.h
+++ b/Common/OS.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,6 +18,7 @@ double Cpu();
 double TotalRam();
 long GetMemoryUsage();
 int GetProcessId();
+std::string GetExecutableFileName();
 std::string GetHostName();
 int UnlinkFile(const std::string &fileName);
 int StatFile(const std::string &fileName);
@@ -25,6 +26,8 @@ int KillProcess(int pid);
 int CreateSingleDir(const std::string &dirName);
 void CreatePath(const std::string &fullPath);
 int SystemCall(const std::string &command, bool blocking=false);
+int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
+                  bool blocking=false);
 std::string GetCurrentWorkdir();
 void RedirectIOToConsole();
 FILE *Fopen(const char* f, const char *mode);
diff --git a/Common/Octree.cpp b/Common/Octree.cpp
index 5468bc4..2fbbe88 100644
--- a/Common/Octree.cpp
+++ b/Common/Octree.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/Octree.h b/Common/Octree.h
index a0a7741..9de6a8c 100644
--- a/Common/Octree.h
+++ b/Common/Octree.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/OctreeInternals.cpp b/Common/OctreeInternals.cpp
index c678799..697b621 100644
--- a/Common/OctreeInternals.cpp
+++ b/Common/OctreeInternals.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/OctreeInternals.h b/Common/OctreeInternals.h
index fa32a50..b5da87e 100644
--- a/Common/OctreeInternals.h
+++ b/Common/OctreeInternals.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp
index 0da2124..8cee8b6 100644
--- a/Common/OpenFile.cpp
+++ b/Common/OpenFile.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -42,7 +42,11 @@
 #if defined(HAVE_FLTK)
 #include <FL/fl_ask.H>
 #include "FlGui.h"
+#if defined(HAVE_ONELAB2)
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
+#endif
 #include "graphicWindow.h"
 #include "drawContext.h"
 #endif
@@ -186,9 +190,9 @@ int ParseFile(const std::string &fileName, bool close, bool warnIfMissing)
     return 0;
   }
 
-#if defined(HAVE_FLTK) && defined(HAVE_POST)
-  int numViewsBefore = PView::list.size();
-#endif
+  //#if defined(HAVE_FLTK) && defined(HAVE_POST)
+  // int numViewsBefore = PView::list.size();
+  //#endif
 
   std::string old_yyname = gmsh_yyname;
   gmshFILE old_yyin = gmsh_yyin;
@@ -227,8 +231,11 @@ int ParseFile(const std::string &fileName, bool close, bool warnIfMissing)
   gmsh_yyviewindex = old_yyviewindex;
 
 #if defined(HAVE_FLTK) && defined(HAVE_POST)
-  if(FlGui::available())
-    FlGui::instance()->updateViews(numViewsBefore != (int)PView::list.size(), false);
+  if(FlGui::available()){
+    // this is not enough if the script creates and deletes views
+    //FlGui::instance()->updateViews(numViewsBefore != (int)PView::list.size(), false);
+    FlGui::instance()->updateViews(true, false);
+  }
 #endif
 
   return 1;
@@ -250,15 +257,21 @@ static bool doSystemUncompress(std::string fileName, std::string noExt)
   return false;
 }
 
-void ParseString(const std::string &str)
+void ParseString(const std::string &str, bool inCurrentModelDir)
 {
   if(str.empty()) return;
-  std::string fileName = CTX::instance()->homeDir + CTX::instance()->tmpFileName;
+  std::string fileName;
+  if(inCurrentModelDir)
+    fileName = FixRelativePath(GModel::current()->getFileName(),
+                               CTX::instance()->tmpFileName);
+  else
+    fileName = CTX::instance()->homeDir + CTX::instance()->tmpFileName;
   FILE *fp = Fopen(fileName.c_str(), "w");
   if(fp){
     fprintf(fp, "%s\n", str.c_str());
     fclose(fp);
     GModel::readGEO(fileName);
+    UnlinkFile(fileName);
   }
 }
 
@@ -426,13 +439,16 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit
     GModel::current()->setName(split[1] + ".geo");
     GModel::current()->setFileName(split[0] + split[1] + ".geo");
     CTX::instance()->launchSolverAtStartup = num;
+    CTX::instance()->solverToRun = num; // used in ONELAB2
     return 1;
   }
   else if(ext == ".py" || ext == ".PY" ||
+          ext == ".m" || ext == ".M" ||
           ext == ".exe" || ext == ".EXE"){
     int num = defineSolver(split[1]);
     opt_solver_executable(num, GMSH_SET, fileName);
     CTX::instance()->launchSolverAtStartup = num;
+    CTX::instance()->solverToRun = num; // used in ONELAB2
     return 1;
   }
 #endif
@@ -457,10 +473,17 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit
       if(status > 1) status = PView::readMSH(fileName);
 #endif
 #if defined(HAVE_MESH)
+      /*
+      This was introduced in r6039 by Koen to snap high order vertices on the
+      geometry. But it introduces subtle bugs when reading high-order
+      post-processing views ; we should have an explicit command to do this, and
+      not modify the mesh without warning just by reading a file --CG.
+
       if(CTX::instance()->mesh.order > 1)
         SetOrderN(GModel::current(), CTX::instance()->mesh.order,
                   CTX::instance()->mesh.secondOrderLinear,
                   CTX::instance()->mesh.secondOrderIncomplete);
+      */
 #endif
     }
 #if defined(HAVE_POST)
@@ -471,6 +494,9 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit
 #endif
     else {
       status = GModel::readGEO(fileName);
+#ifdef HAVE_ONELAB2
+      Msg::SetOnelabString("Gmsh/1ModelName", fileName, false);
+#endif
     }
   }
 
@@ -500,7 +526,6 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit
   // merge the associated option file if there is one
   if(!StatFile(fileName + ".opt"))
     MergeFile(fileName + ".opt");
-
   return status;
 }
 
@@ -636,44 +661,46 @@ void OpenProject(const std::string &fileName, bool setWindowTitle)
     // reuse it
     GModel::current()->destroy();
     GModel::current()->getGEOInternals()->destroy();
-    // don't clear the parser variables if we just launched gmsh with the
-    // -string, -setstring or -setnumber command line options
-#if defined(HAVE_PARSER)
-    std::string c = Msg::GetCommandLineArgs();
-    if(c.find("-string") == std::string::npos &&
-       c.find("-setstring") == std::string::npos &&
-       c.find("-setnumber") == std::string::npos){
-      gmsh_yysymbols.clear();
-      gmsh_yystringsymbols.clear();
-    }
-#endif
   }
   else{
-    // if the current model is not empty make it invisible, clear the parser
-    // variables and add a new model
-#if defined(HAVE_PARSER)
-    gmsh_yysymbols.clear();
-    gmsh_yystringsymbols.clear();
-#endif
+    // if the current model is not empty make it invisible and add a new model
     new GModel();
     GModel::current(GModel::list.size() - 1);
   }
 
+  // clear parser variables, but keep -setnumber/-setstrings command line
+  // definitions
+#if defined(HAVE_PARSER)
+  gmsh_yysymbols.clear();
+  gmsh_yystringsymbols.clear();
+  std::map<std::string, double> cln(Msg::GetCommandLineNumbers());
+  for(std::map<std::string, double>::iterator it = cln.begin(); it != cln.end(); it++)
+    gmsh_yysymbols[it->first].value = std::vector<double>(1, it->second);
+  std::map<std::string, std::string> cls(Msg::GetCommandLineStrings());
+  for(std::map<std::string, std::string>::iterator it = cls.begin(); it != cls.end(); it++)
+    gmsh_yystringsymbols[it->first] = it->second;
+#endif
+
   // temporary hack until we fill the current GModel on the fly during parsing
   ResetTemporaryBoundingBox();
 
   // merge the file
-  if(MergeFile(fileName, false, setWindowTitle)) {
-    if(fileName != CTX::instance()->recentFiles.front())
-      CTX::instance()->recentFiles.insert
-        (CTX::instance()->recentFiles.begin(), fileName);
-    if(CTX::instance()->recentFiles.size() > 5)
-      CTX::instance()->recentFiles.resize(5);
+  MergeFile(fileName, false, setWindowTitle);
+
+  // fill recent opened file list
+  std::vector<std::string> tmp = CTX::instance()->recentFiles;
+  CTX::instance()->recentFiles.clear();
+  CTX::instance()->recentFiles.push_back(fileName);
+  for(unsigned int i = 0; i < tmp.size(); i++){
+    if(tmp[i] != fileName)
+      CTX::instance()->recentFiles.push_back(tmp[i]);
+  }
+  if(CTX::instance()->recentFiles.size() > 10)
+    CTX::instance()->recentFiles.resize(10);
 #if defined(HAVE_FLTK)
-    if(FlGui::available())
-      FlGui::instance()->graph[0]->fillRecentHistoryMenu();
+  if(FlGui::available())
+    FlGui::instance()->graph[0]->fillRecentHistoryMenu();
 #endif
-  }
 
   // close the files that might have been left open by ParseFile
   if(openedFiles.size()){
diff --git a/Common/OpenFile.h b/Common/OpenFile.h
index 0812c73..90c91e9 100644
--- a/Common/OpenFile.h
+++ b/Common/OpenFile.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,7 +9,7 @@
 #include <string>
 
 int ParseFile(const std::string &fileName, bool close, bool warnIfMissing=false);
-void ParseString(const std::string &str);
+void ParseString(const std::string &str, bool inCurrentModelDir=false);
 void OpenProject(const std::string &filename, bool setWindowTitle=true);
 void OpenProjectMacFinder(const char *fileName);
 int MergeFile(const std::string &fileName, bool warnIfMissing=false,
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 552de15..818d953 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -50,7 +50,11 @@
 #include "manipWindow.h"
 #include "contextWindow.h"
 #include "clippingWindow.h"
+#ifdef HAVE_ONELAB2
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
+#endif
 #include "viewButton.h"
 #include "drawContextFltkCairo.h"
 #include "drawContextFltkStringTexture.h"
@@ -364,6 +368,13 @@ static void SetDefaultColorOptions(int num, StringXColor s[])
       i++;
     }
     break;
+  case 3:
+    while(s[i].str) {
+      s[i].function(num, GMSH_SET, CTX::instance()->packColor
+                    (s[i].def4[0], s[i].def4[1], s[i].def4[2], s[i].def4[3]));
+      i++;
+    }
+    break;
   default:
     while(s[i].str) {
       s[i].function(num, GMSH_SET, CTX::instance()->packColor
@@ -401,6 +412,10 @@ static void PrintColorOptions(int num, int level, int diff, int help,
         def = CTX::instance()->packColor
           (s[i].def3[0], s[i].def3[1], s[i].def3[2], s[i].def3[3]);
         break;
+      case 3:
+        def = CTX::instance()->packColor
+          (s[i].def4[0], s[i].def4[1], s[i].def4[2], s[i].def4[3]);
+        break;
       default:
         def = CTX::instance()->packColor
           (s[i].def1[0], s[i].def1[1], s[i].def1[2], s[i].def1[3]);
@@ -1109,6 +1124,11 @@ std::string opt_general_filename(OPT_ARGS_STR)
   return GModel::current()->getFileName();
 }
 
+std::string opt_general_executable_filename(OPT_ARGS_STR)
+{
+  return CTX::instance()->exeFileName;
+}
+
 std::string opt_general_default_filename(OPT_ARGS_STR)
 {
   if(action & GMSH_SET)
@@ -1184,6 +1204,41 @@ std::string opt_general_recent_file4(OPT_ARGS_STR)
   return CTX::instance()->recentFiles[4];
 }
 
+std::string opt_general_recent_file5(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->recentFiles[5] = val;
+  return CTX::instance()->recentFiles[5];
+}
+
+std::string opt_general_recent_file6(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->recentFiles[6] = val;
+  return CTX::instance()->recentFiles[6];
+}
+
+std::string opt_general_recent_file7(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->recentFiles[7] = val;
+  return CTX::instance()->recentFiles[7];
+}
+
+std::string opt_general_recent_file8(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->recentFiles[8] = val;
+  return CTX::instance()->recentFiles[8];
+}
+
+std::string opt_general_recent_file9(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->recentFiles[9] = val;
+  return CTX::instance()->recentFiles[9];
+}
+
 std::string opt_general_editor(OPT_ARGS_STR)
 {
   if(action & GMSH_SET)
@@ -1466,6 +1521,37 @@ std::string opt_solver_remote_login9(OPT_ARGS_STR)
   return opt_solver_remote_login(9, action, val);
 }
 
+std::string opt_solver_python_interpreter(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->solver.pythonInterpreter = val;
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && (action & GMSH_GUI))
+    FlGui::instance()->options->solver.input[1]->value
+      (CTX::instance()->solver.pythonInterpreter.c_str());
+#endif
+  return CTX::instance()->solver.pythonInterpreter;
+}
+
+std::string opt_solver_octave_interpreter(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->solver.octaveInterpreter = val;
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && (action & GMSH_GUI))
+    FlGui::instance()->options->solver.input[2]->value
+      (CTX::instance()->solver.octaveInterpreter.c_str());
+#endif
+  return CTX::instance()->solver.octaveInterpreter;
+}
+
+std::string opt_post_graph_point_command(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->post.graphPointCommand = val;
+  return CTX::instance()->post.graphPointCommand;
+}
+
 #if defined(HAVE_FLTK)
 int _gui_action_valid(int action, int num)
 {
@@ -1902,6 +1988,22 @@ double opt_general_fontsize(OPT_ARGS_NUM)
   return CTX::instance()->fontSize;
 }
 
+double opt_general_gui_color_scheme(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->guiColorScheme = (int)val;
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && (action & GMSH_GUI)){
+    FlGui::instance()->options->general.butt[21]->value
+      (CTX::instance()->guiColorScheme);
+  }
+  if(action & GMSH_SET && FlGui::available()){
+    FlGui::instance()->applyColorScheme();
+  }
+#endif
+  return CTX::instance()->guiColorScheme;
+}
+
 double opt_general_graphics_fontsize(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
@@ -2048,6 +2150,19 @@ double opt_general_message_size(OPT_ARGS_NUM)
   return CTX::instance()->msgSize;
 }
 
+double opt_general_message_fontsize(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET){
+    CTX::instance()->msgFontSize = (int)val;
+#if defined(HAVE_FLTK)
+    if(FlGui::available() && (action & GMSH_GUI)){
+      FlGui::instance()->graph[0]->setMessageFontSize(CTX::instance()->msgFontSize);
+    }
+#endif
+  }
+  return CTX::instance()->msgFontSize;
+}
+
 double opt_general_detached_menu(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET){
@@ -2273,6 +2388,13 @@ double opt_general_hot_position1(OPT_ARGS_NUM)
   return CTX::instance()->hotPosition[1];
 }
 
+double opt_general_high_resolution_graphics(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->highResolutionGraphics = (int)val;
+  return CTX::instance()->highResolutionGraphics;
+}
+
 double opt_general_session_save(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
@@ -2583,6 +2705,13 @@ double opt_general_point_size(OPT_ARGS_NUM)
   return CTX::instance()->pointSize;
 }
 
+double opt_general_high_resolution_point_size_factor(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->highResolutionPointSizeFactor = val;
+  return CTX::instance()->highResolutionPointSizeFactor;
+}
+
 double opt_general_line_width(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
@@ -3171,7 +3300,7 @@ double opt_general_color_scheme(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET) {
     CTX::instance()->colorScheme = (int)val;
-    if(CTX::instance()->colorScheme > 2)
+    if(CTX::instance()->colorScheme > 3)
       CTX::instance()->colorScheme = 0;
     SetDefaultColorOptions(0, GeneralOptions_Color);
     SetDefaultColorOptions(0, GeometryOptions_Color);
@@ -3343,15 +3472,14 @@ double opt_general_stereo_mode(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
     CTX::instance()->stereo = (int)val;
-  if (CTX::instance()->stereo)    opt_general_camera_mode(num, action, 1.);
-
+  if (CTX::instance()->stereo)
+    opt_general_camera_mode(num, action, 1.);
 #if defined(HAVE_FLTK)
   /*
-  if(FlGui::available() && (action & GMSH_GUI))
-  FlGui::instance()->options->general.butt[17]->value(CTX::instance()->stereo);
-*/
+    if(FlGui::available() && (action & GMSH_GUI))
+    FlGui::instance()->options->general.butt[17]->value(CTX::instance()->stereo);
+  */
 #endif
-
   return CTX::instance()->stereo ;
 }
 
@@ -4104,8 +4232,17 @@ double opt_geometry_auto_coherence(OPT_ARGS_NUM)
 
 double opt_geometry_hide_compounds(OPT_ARGS_NUM)
 {
-  if(action & GMSH_SET)
+  if(action & GMSH_SET){
+    int old = CTX::instance()->geom.hideCompounds;
     CTX::instance()->geom.hideCompounds = (int)val;
+    if(old != (int)val){
+      GModel::current()->setCompoundVisibility();
+      CTX::instance()->mesh.changed = ENT_ALL;
+#if defined(HAVE_FLTK)
+      if(FlGui::available()) FlGui::instance()->resetVisibility();
+#endif
+    }
+  }
 #if defined(HAVE_FLTK)
   if(FlGui::available() && (action & GMSH_GUI)){
     FlGui::instance()->options->geo.butt[17]->value
@@ -4456,7 +4593,7 @@ double opt_geometry_occ_sew_faces(OPT_ARGS_NUM)
 double opt_geometry_occ_connect_faces(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX::instance()->geom.occConnectFaces = val ? 1 : 0;
+    CTX::instance()->geom.occConnectFaces = (int)val;
 #if defined(HAVE_FLTK)
   if(FlGui::available() && (action & GMSH_GUI)) {
     FlGui::instance()->options->geo.butt[15]->value
@@ -4466,6 +4603,19 @@ double opt_geometry_occ_connect_faces(OPT_ARGS_NUM)
   return CTX::instance()->geom.occConnectFaces;
 }
 
+double opt_geometry_occ_scaling(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->geom.occScaling = val;
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && (action & GMSH_GUI)) {
+    FlGui::instance()->options->geo.value[20]->value
+      (CTX::instance()->geom.occScaling);
+  }
+#endif
+  return CTX::instance()->geom.occScaling;
+}
+
 double opt_geometry_old_circle(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
@@ -4753,6 +4903,13 @@ double opt_mesh_tolerance_edge_length(OPT_ARGS_NUM)
   return CTX::instance()->mesh.toleranceEdgeLength;
 }
 
+double opt_mesh_tolerance_initial_delaunay(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->mesh.toleranceInitialDelaunay = val;
+  return CTX::instance()->mesh.toleranceInitialDelaunay;
+}
+
 double opt_mesh_lc_from_curvature(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
@@ -6359,6 +6516,20 @@ double opt_post_force_node_data(OPT_ARGS_NUM)
   return CTX::instance()->post.forceNodeData;
 }
 
+double opt_post_graph_point_x(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->post.graphPointX = val;
+  return CTX::instance()->post.graphPointX;
+}
+
+double opt_post_graph_point_y(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX::instance()->post.graphPointY = val;
+  return CTX::instance()->post.graphPointY;
+}
+
 double opt_view_nb_timestep(OPT_ARGS_NUM)
 {
 #if defined(HAVE_POST)
@@ -6419,6 +6590,31 @@ double opt_view_timestep(OPT_ARGS_NUM)
 #endif
 }
 
+double opt_view_time(OPT_ARGS_NUM)
+{
+#if defined(HAVE_POST)
+  GET_VIEW(0.);
+  if(data && (action & GMSH_SET)) {
+    if(val >= 0.){
+      // if negative (the default), don't do anything so that we do not compete
+      // with timestep
+      int step = 0;
+      for(int i = 0; i < data->getNumTimeSteps(); i++){
+        double time = data->getTime(i);
+        if(fabs(time - val) < 1.e-15){
+          step = i;
+          break;
+        }
+      }
+      opt_view_timestep(num, action, step);
+    }
+  }
+  return opt->currentTime;
+#else
+  return 0.;
+#endif
+}
+
 double opt_view_min(OPT_ARGS_NUM)
 {
 #if defined(HAVE_POST)
@@ -6443,6 +6639,30 @@ double opt_view_max(OPT_ARGS_NUM)
 #endif
 }
 
+double opt_view_min_visible(OPT_ARGS_NUM)
+{
+#if defined(HAVE_POST)
+  GET_VIEW(0.);
+  if(!data) return 0.;
+  return data->getMin(opt->timeStep, true, opt->forceNumComponents,
+                      opt->componentMap);
+#else
+  return 0.;
+#endif
+}
+
+double opt_view_max_visible(OPT_ARGS_NUM)
+{
+#if defined(HAVE_POST)
+  GET_VIEW(0.);
+  if(!data) return 0.;
+  return data->getMax(opt->timeStep, true, opt->forceNumComponents,
+                      opt->componentMap);
+#else
+  return 0.;
+#endif
+}
+
 double opt_view_custom_min(OPT_ARGS_NUM)
 {
 #if defined(HAVE_POST)
@@ -7142,7 +7362,7 @@ double opt_view_auto_position(OPT_ARGS_NUM)
   GET_VIEWo(0.);
   if(action & GMSH_SET) {
     opt->autoPosition = (int)val;
-    if(opt->autoPosition < 0 || opt->autoPosition > 11)
+    if(opt->autoPosition < 0 || opt->autoPosition > 12)
       opt->autoPosition = 0;
   }
 #if defined(HAVE_FLTK)
@@ -7162,7 +7382,7 @@ double opt_view_position0(OPT_ARGS_NUM)
 #if defined(HAVE_POST)
   GET_VIEWo(0.);
   if(action & GMSH_SET) {
-    opt->position[0] = (int)val;
+    opt->position[0] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
@@ -7179,7 +7399,7 @@ double opt_view_position1(OPT_ARGS_NUM)
 #if defined(HAVE_POST)
   GET_VIEWo(0.);
   if(action & GMSH_SET) {
-    opt->position[1] = (int)val;
+    opt->position[1] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
@@ -7214,7 +7434,7 @@ double opt_view_size0(OPT_ARGS_NUM)
 #if defined(HAVE_POST)
   GET_VIEWo(0.);
   if(action & GMSH_SET) {
-    opt->size[0] = (int)val;
+    opt->size[0] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
@@ -7231,7 +7451,7 @@ double opt_view_size1(OPT_ARGS_NUM)
 #if defined(HAVE_POST)
   GET_VIEWo(0.);
   if(action & GMSH_SET) {
-    opt->size[1] = (int)val;
+    opt->size[1] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
diff --git a/Common/Options.h b/Common/Options.h
index 5712018..0725eac 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -36,6 +36,7 @@ std::string opt_general_axes_format2(OPT_ARGS_STR);
 std::string opt_general_background_image_filename(OPT_ARGS_STR);
 std::string opt_general_display(OPT_ARGS_STR);
 std::string opt_general_filename(OPT_ARGS_STR);
+std::string opt_general_executable_filename(OPT_ARGS_STR);
 std::string opt_general_default_filename(OPT_ARGS_STR);
 std::string opt_general_tmp_filename(OPT_ARGS_STR);
 std::string opt_general_error_filename(OPT_ARGS_STR);
@@ -46,6 +47,11 @@ std::string opt_general_recent_file1(OPT_ARGS_STR);
 std::string opt_general_recent_file2(OPT_ARGS_STR);
 std::string opt_general_recent_file3(OPT_ARGS_STR);
 std::string opt_general_recent_file4(OPT_ARGS_STR);
+std::string opt_general_recent_file5(OPT_ARGS_STR);
+std::string opt_general_recent_file6(OPT_ARGS_STR);
+std::string opt_general_recent_file7(OPT_ARGS_STR);
+std::string opt_general_recent_file8(OPT_ARGS_STR);
+std::string opt_general_recent_file9(OPT_ARGS_STR);
 std::string opt_general_editor(OPT_ARGS_STR);
 std::string opt_general_watch_file_pattern(OPT_ARGS_STR);
 std::string opt_general_gui_theme(OPT_ARGS_STR);
@@ -86,6 +92,9 @@ std::string opt_solver_remote_login6(OPT_ARGS_STR);
 std::string opt_solver_remote_login7(OPT_ARGS_STR);
 std::string opt_solver_remote_login8(OPT_ARGS_STR);
 std::string opt_solver_remote_login9(OPT_ARGS_STR);
+std::string opt_solver_octave_interpreter(OPT_ARGS_STR);
+std::string opt_solver_python_interpreter(OPT_ARGS_STR);
+std::string opt_post_graph_point_command(OPT_ARGS_STR);
 std::string opt_view_name(OPT_ARGS_STR);
 std::string opt_view_format(OPT_ARGS_STR);
 std::string opt_view_filename(OPT_ARGS_STR);
@@ -115,6 +124,7 @@ std::string opt_print_parameter_command(OPT_ARGS_STR);
 
 double opt_general_initial_context(OPT_ARGS_NUM);
 double opt_general_fontsize(OPT_ARGS_NUM);
+double opt_general_gui_color_scheme(OPT_ARGS_NUM);
 double opt_general_graphics_fontsize(OPT_ARGS_NUM);
 double opt_general_graphics_fontsize_title(OPT_ARGS_NUM);
 double opt_general_graphics_position0(OPT_ARGS_NUM);
@@ -130,6 +140,7 @@ double opt_general_polygon_offset_factor(OPT_ARGS_NUM);
 double opt_general_polygon_offset_units(OPT_ARGS_NUM);
 double opt_general_system_menu_bar(OPT_ARGS_NUM);
 double opt_general_message_size(OPT_ARGS_NUM);
+double opt_general_message_fontsize(OPT_ARGS_NUM);
 double opt_general_detached_menu(OPT_ARGS_NUM);
 double opt_general_menu_size0(OPT_ARGS_NUM);
 double opt_general_menu_size1(OPT_ARGS_NUM);
@@ -159,6 +170,8 @@ double opt_general_manip_position0(OPT_ARGS_NUM);
 double opt_general_manip_position1(OPT_ARGS_NUM);
 double opt_general_hot_position0(OPT_ARGS_NUM);
 double opt_general_hot_position1(OPT_ARGS_NUM);
+double opt_general_high_resolution_graphics(OPT_ARGS_NUM);
+double opt_general_high_resolution_point_size_factor(OPT_ARGS_NUM);
 double opt_general_session_save(OPT_ARGS_NUM);
 double opt_general_options_save(OPT_ARGS_NUM);
 double opt_general_rotation0(OPT_ARGS_NUM);
@@ -353,6 +366,7 @@ double opt_geometry_occ_fix_small_edges(OPT_ARGS_NUM);
 double opt_geometry_occ_fix_small_faces(OPT_ARGS_NUM);
 double opt_geometry_occ_sew_faces(OPT_ARGS_NUM);
 double opt_geometry_occ_connect_faces(OPT_ARGS_NUM);
+double opt_geometry_occ_scaling(OPT_ARGS_NUM);
 double opt_geometry_old_circle(OPT_ARGS_NUM);
 double opt_geometry_old_newreg(OPT_ARGS_NUM);
 double opt_geometry_old_ruled_surface(OPT_ARGS_NUM);
@@ -381,6 +395,7 @@ double opt_mesh_scaling_factor(OPT_ARGS_NUM);
 double opt_mesh_lc_min(OPT_ARGS_NUM);
 double opt_mesh_lc_max(OPT_ARGS_NUM);
 double opt_mesh_tolerance_edge_length(OPT_ARGS_NUM);
+double opt_mesh_tolerance_initial_delaunay(OPT_ARGS_NUM);
 double opt_mesh_lc_factor(OPT_ARGS_NUM);
 double opt_mesh_lc_from_curvature(OPT_ARGS_NUM);
 double opt_mesh_lc_from_points(OPT_ARGS_NUM);
@@ -527,11 +542,16 @@ double opt_post_plugins(OPT_ARGS_NUM);
 double opt_post_nb_views(OPT_ARGS_NUM);
 double opt_post_file_format(OPT_ARGS_NUM);
 double opt_post_force_node_data(OPT_ARGS_NUM);
+double opt_post_graph_point_x(OPT_ARGS_NUM);
+double opt_post_graph_point_y(OPT_ARGS_NUM);
 double opt_view_nb_timestep(OPT_ARGS_NUM);
 double opt_view_nb_non_empty_timestep(OPT_ARGS_NUM);
 double opt_view_timestep(OPT_ARGS_NUM);
+double opt_view_time(OPT_ARGS_NUM);
 double opt_view_min(OPT_ARGS_NUM);
 double opt_view_max(OPT_ARGS_NUM);
+double opt_view_min_visible(OPT_ARGS_NUM);
+double opt_view_max_visible(OPT_ARGS_NUM);
 double opt_view_custom_min(OPT_ARGS_NUM);
 double opt_view_custom_max(OPT_ARGS_NUM);
 double opt_view_custom_abscissa_min(OPT_ARGS_NUM);
@@ -784,7 +804,7 @@ typedef struct {
   // the defaults are stored in individual bytes so that we can initialize
   // them statically independently of the machine endianness. They will be
   // packed into unsigned ints at runtime
-  unsigned char def1[4], def2[4], def3[4];
+  unsigned char def1[4], def2[4], def3[4], def4[4];
   const char *help;
 } StringXColor;
 
diff --git a/Common/SmoothData.cpp b/Common/SmoothData.cpp
index d133a48..477b178 100644
--- a/Common/SmoothData.cpp
+++ b/Common/SmoothData.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/SmoothData.h b/Common/SmoothData.h
index 53e08f3..5765ffc 100644
--- a/Common/SmoothData.h
+++ b/Common/SmoothData.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/StringUtils.cpp b/Common/StringUtils.cpp
index f609237..50c15ee 100644
--- a/Common/StringUtils.cpp
+++ b/Common/StringUtils.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -91,17 +91,21 @@ std::string FixRelativePath(const std::string &reference, const std::string &in)
 
 std::vector<std::string> SplitFileName(const std::string &fileName)
 {
-  // returns [path, baseName, extension]
-  int idot = (int)fileName.find_last_of('.');
-  int islash = (int)fileName.find_last_of("/\\");
-  if(idot == (int)std::string::npos) idot = -1;
-  if(islash == (int)std::string::npos) islash = -1;
-  std::vector<std::string> s(3);
-  if(idot > 0)
-    s[2] = fileName.substr(idot);
-  if(islash > 0)
-    s[0] = fileName.substr(0, islash + 1);
-  s[1] = fileName.substr(s[0].size(), fileName.size() - s[0].size() - s[2].size());
+  // JFR DO NOT CHANGE TO std::vector<std::string> s(3), it segfaults while
+  // destructor si called
+  std::vector<std::string> s; s.resize(3);
+  if(fileName.size()){
+    // returns [path, baseName, extension]
+    int idot = (int)fileName.find_last_of('.');
+    int islash = (int)fileName.find_last_of("/\\");
+    if(idot == (int)std::string::npos) idot = -1;
+    if(islash == (int)std::string::npos) islash = -1;
+    if(idot > 0)
+      s[2] = fileName.substr(idot);
+    if(islash > 0)
+      s[0] = fileName.substr(0, islash + 1);
+    s[1] = fileName.substr(s[0].size(), fileName.size() - s[0].size() - s[2].size());
+  }
   return s;
 }
 
diff --git a/Common/StringUtils.h b/Common/StringUtils.h
index 7791681..8e84448 100644
--- a/Common/StringUtils.h
+++ b/Common/StringUtils.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/TreeUtils.cpp b/Common/TreeUtils.cpp
index f59fe4e..b3fab30 100644
--- a/Common/TreeUtils.cpp
+++ b/Common/TreeUtils.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/TreeUtils.h b/Common/TreeUtils.h
index e76b57a..1d6dce9 100644
--- a/Common/TreeUtils.h
+++ b/Common/TreeUtils.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/VertexArray.cpp b/Common/VertexArray.cpp
index 936b87f..2b051cf 100644
--- a/Common/VertexArray.cpp
+++ b/Common/VertexArray.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/VertexArray.h b/Common/VertexArray.h
index 2d4e5c5..d7dac30 100644
--- a/Common/VertexArray.h
+++ b/Common/VertexArray.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/gmshLocalNetworkClient.cpp b/Common/gmshLocalNetworkClient.cpp
new file mode 100644
index 0000000..6e918c4
--- /dev/null
+++ b/Common/gmshLocalNetworkClient.cpp
@@ -0,0 +1,858 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "GmshConfig.h"
+#include "Gmsh.h"
+#include "Context.h"
+#include "OS.h"
+#include "StringUtils.h"
+#include "OpenFile.h"
+#include "CreateFile.h"
+#include "PView.h"
+#include "Options.h"
+#include "GModel.h"
+
+#if defined(HAVE_ONELAB)
+
+#include "gmshLocalNetworkClient.h"
+#include "onelabUtils.h"
+
+#if defined(HAVE_FLTK)
+#include "FlGui.h"
+#include "onelabGroup.h"
+#include "drawContext.h"
+#endif
+
+#if defined(HAVE_ONELAB_METAMODEL)
+#include "OnelabClients.h"
+#include "metamodel.h"
+#endif
+
+class onelabGmshServer : public GmshServer{
+ private:
+  onelab::localNetworkClient *_client;
+ public:
+  onelabGmshServer(onelab::localNetworkClient *client)
+    : GmshServer(), _client(client) {}
+  ~onelabGmshServer(){}
+  int NonBlockingSystemCall(const std::string &exe, const std::string &args)
+  {
+    return SystemCallExe(exe, args);
+  }
+  int NonBlockingWait(double waitint, double timeout, int socket)
+  {
+    double start = GetTimeInSeconds();
+    while(1){
+      if(timeout > 0 && GetTimeInSeconds() - start > timeout)
+        return 2; // timeout
+      if(_client->getPid() < 0 || (_client->getExecutable().empty() &&
+                                   !CTX::instance()->solver.listen))
+        return 1; // process has been killed or we stopped listening
+      // check if there is data (call select with a zero timeout to
+      // return immediately, i.e., do polling)
+      int ret = Select(0, 0, socket);
+      if(ret == 0){ // nothing available
+        if(timeout < 0){
+          // if asked, refresh the onelab GUI, but no more than every 1/4th of
+          // a second
+          static double lastRefresh = 0.;
+          if(start - lastRefresh > 0.25){
+            std::vector<onelab::string> ps;
+            onelab::server::instance()->get(ps, "Gmsh/Action");
+            if(ps.size() && ps[0].getValue() == "refresh"){
+              ps[0].setVisible(false);
+              ps[0].setValue("");
+              onelab::server::instance()->set(ps[0]);
+#if defined(HAVE_FLTK)
+              if(FlGui::available()) onelab_cb(0, (void*)"refresh");
+#endif
+            }
+            lastRefresh = start;
+          }
+        }
+        // wait at most waitint seconds and respond to FLTK events
+#if defined(HAVE_FLTK)
+        if(FlGui::available()) FlGui::instance()->wait(waitint);
+#endif
+        // return to caller (we will be back here soon again)
+	if(timeout < 0) return 3;
+      }
+      else if(ret > 0){
+        return 0; // data is there!
+      }
+      else{
+        // an error happened
+        _client->setPid(-1);
+        return 1;
+      }
+    }
+  }
+  int LaunchClient()
+  {
+    std::string sockname;
+    std::ostringstream tmp;
+    const char *port = strstr(CTX::instance()->solver.socketName.c_str(), ":");
+    if(!port){
+      // Unix socket
+      tmp << CTX::instance()->homeDir << CTX::instance()->solver.socketName
+          << _client->getId();
+      sockname = FixWindowsPath(tmp.str());
+    }
+    else{
+      // TCP/IP socket
+      if(CTX::instance()->solver.socketName.size() &&
+         CTX::instance()->solver.socketName[0] == ':')
+        tmp << GetHostName(); // prepend hostname if only the port number is given
+      tmp << CTX::instance()->solver.socketName;
+      if(atoi(port + 1)) // nonzero port is given - append client id
+        tmp << _client->getId();
+      sockname = tmp.str();
+    }
+
+    std::string exe = FixWindowsPath(_client->getExecutable());
+    std::string args;
+    if(exe.size()){
+      if(_client->treatExecutableAsFullCommandLine()){
+        args = exe;
+        exe = "";
+      }
+      else{
+        std::vector<std::string> cl = onelabUtils::getCommandLine(_client);
+        for(unsigned int i = 0; i < cl.size(); i++)
+          args.append(" " + cl[i]);
+      }
+      args.append(" " + _client->getSocketSwitch() +
+                  " \"" + _client->getName() + "\" %s");
+    }
+    else{
+      Msg::Info("Listening on socket '%s'", sockname.c_str());
+    }
+
+    int sock;
+    try{
+      sock = Start(exe.c_str(), args.c_str(), sockname.c_str(),
+                   CTX::instance()->solver.timeout);
+    }
+    catch(const char *err){
+      Msg::Error("Abnormal server termination (%s on socket %s)", err,
+                 sockname.c_str());
+      sock = -1;
+    }
+
+    return sock;
+  }
+};
+
+bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
+{
+  // receive a message on the associated GmshServer; 'master' is only used when
+  // creating subclients with GMSH_CONNECT.
+
+  double timer = GetTimeInSeconds();
+
+  if(!getGmshServer()){
+    Msg::Error("Abnormal server termination (no valid server)");
+    return false;
+  }
+
+  int type, length, swap;
+  if(!getGmshServer()->ReceiveHeader(&type, &length, &swap)){
+    Msg::Error("Abnormal server termination (did not receive message header)");
+    return false;
+  }
+
+  std::string message(length, ' '), blank = message;
+  if(!getGmshServer()->ReceiveMessage(length, &message[0])){
+    Msg::Error("Abnormal server termination (did not receive message body)");
+    return false;
+  }
+
+  if(message == blank && !(type == GmshSocket::GMSH_PROGRESS ||
+                           type == GmshSocket::GMSH_INFO ||
+                           type == GmshSocket::GMSH_WARNING ||
+                           type == GmshSocket::GMSH_ERROR)){
+    // we should still allow blank msg strings to be sent
+    Msg::Error("Abnormal server termination (blank message: client not stopped?)");
+    return false;
+  }
+
+  switch (type) {
+  case GmshSocket::GMSH_START:
+    setPid(atoi(message.c_str()));
+    break;
+  case GmshSocket::GMSH_STOP:
+    setPid(-1);
+    if(getFather()){
+      std::string reply = getName(); // reply is dummy
+      getFather()->getGmshServer()->SendMessage
+        (GmshSocket::GMSH_STOP, reply.size(), &reply[0]);
+    }
+    break;
+  case GmshSocket::GMSH_PARAMETER:
+  case GmshSocket::GMSH_PARAMETER_UPDATE:
+    {
+      std::string version, ptype, name;
+      onelab::parameter::getInfoFromChar(message, version, ptype, name);
+      if(onelab::parameter::version() != version){
+        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
+                   onelab::parameter::version().c_str(), version.c_str());
+      }
+      else if(ptype == "number"){
+        onelab::number p; p.fromChar(message);
+        if(type == GmshSocket::GMSH_PARAMETER_UPDATE){
+          std::vector<onelab::number> par; get(par, name);
+          if(par.size()) {
+            onelab::number y = p; p = par[0]; onelabUtils::updateNumber(p, y);
+          }
+        }
+        set(p);
+        if(p.getName() == getName() + "/Progress"){
+#if defined(HAVE_FLTK)
+          if(FlGui::available())
+            FlGui::instance()->setProgress(p.getLabel().c_str(), p.getValue(),
+                                           p.getMin(), p.getMax());
+#endif
+        }
+      }
+      else if(ptype == "string"){
+        onelab::string p; p.fromChar(message);
+        if(type == GmshSocket::GMSH_PARAMETER_UPDATE){
+          std::vector<onelab::string> par; get(par, name);
+          if(par.size()){
+            onelab::string y = p; p = par[0]; onelabUtils::updateString(p,y);
+          }
+	}
+        set(p);
+      }
+      else if(ptype == "region"){
+        onelab::region p; p.fromChar(message); set(p);
+      }
+      else if(ptype == "function"){
+        onelab::function p; p.fromChar(message); set(p);
+      }
+      else
+        Msg::Error("Unknown ONELAB parameter type: %s", ptype.c_str());
+    }
+    break;
+  case GmshSocket::GMSH_PARAMETER_QUERY:
+    {
+      std::string version, ptype, name, reply;
+      onelab::parameter::getInfoFromChar(message, version, ptype, name);
+      if(onelab::parameter::version() != version){
+        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
+                   onelab::parameter::version().c_str(), version.c_str());
+      }
+      else if(ptype == "number"){
+        std::vector<onelab::number> par; get(par, name);
+        if(par.size() == 1) reply = par[0].toChar();
+      }
+      else if(ptype == "string"){
+        std::vector<onelab::string> par; get(par, name);
+        if(par.size() == 1) reply = par[0].toChar();
+      }
+      else if(ptype == "region"){
+        std::vector<onelab::region> par; get(par, name);
+        if(par.size() == 1) reply = par[0].toChar();
+      }
+      else if(ptype == "function"){
+        std::vector<onelab::function> par; get(par, name);
+        if(par.size() == 1) reply = par[0].toChar();
+      }
+      else
+        Msg::Error("Unknown ONELAB parameter type in query: %s", ptype.c_str());
+
+      if(reply.size()){
+        getGmshServer()->SendMessage
+          (GmshSocket::GMSH_PARAMETER, reply.size(), &reply[0]);
+      }
+      else{
+        reply = name;
+        getGmshServer()->SendMessage
+          (GmshSocket::GMSH_PARAMETER_NOT_FOUND, reply.size(), &reply[0]);
+      }
+    }
+    break;
+  case GmshSocket::GMSH_PARAMETER_QUERY_ALL:
+    {
+      std::string version, ptype, name, reply;
+      std::vector<std::string> replies;
+      onelab::parameter::getInfoFromChar(message, version, ptype, name);
+      if(onelab::parameter::version() != version){
+        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
+                   onelab::parameter::version().c_str(), version.c_str());
+      }
+      else if(ptype == "number"){
+        std::vector<onelab::number> numbers; get(numbers);
+        for(std::vector<onelab::number>::iterator it = numbers.begin();
+            it != numbers.end(); it++) replies.push_back((*it).toChar());
+      }
+      else if(ptype == "string"){
+        std::vector<onelab::string> strings; get(strings);
+        for(std::vector<onelab::string>::iterator it = strings.begin();
+            it != strings.end(); it++) replies.push_back((*it).toChar());
+      }
+      else if(ptype == "region"){
+        std::vector<onelab::region> regions; get(regions);
+        for(std::vector<onelab::region>::iterator it = regions.begin();
+            it != regions.end(); it++) replies.push_back((*it).toChar());
+      }
+      else if(ptype == "function"){
+        std::vector<onelab::function> functions; get(functions);
+        for(std::vector<onelab::function>::iterator it = functions.begin();
+            it != functions.end(); it++) replies.push_back((*it).toChar());
+      }
+      else
+        Msg::Error("Unknown ONELAB parameter type in query: %s", ptype.c_str());
+
+      for(unsigned int i = 0; i < replies.size(); i++)
+        getGmshServer()->SendMessage
+          (GmshSocket::GMSH_PARAMETER_QUERY_ALL, replies[i].size(), &replies[i][0]);
+      reply = "Sent all ONELAB " + ptype + "s";
+      getGmshServer()->SendMessage
+        (GmshSocket::GMSH_PARAMETER_QUERY_END, reply.size(), &reply[0]);
+    }
+    break;
+  case GmshSocket::GMSH_PARAMETER_CLEAR:
+    clear(message == "*" ? "" : message);
+    break;
+  case GmshSocket::GMSH_PROGRESS:
+    Msg::StatusBar(false, "%s %s", _name.c_str(), message.c_str());
+    break;
+  case GmshSocket::GMSH_INFO:
+    Msg::Direct("Info    : %s - %s", _name.c_str(), message.c_str());
+    break;
+  case GmshSocket::GMSH_WARNING:
+    Msg::Warning("%s - %s", _name.c_str(), message.c_str());
+    break;
+  case GmshSocket::GMSH_ERROR:
+    Msg::Error("%s - %s", _name.c_str(), message.c_str());
+    break;
+  case GmshSocket::GMSH_MERGE_FILE:
+    if(CTX::instance()->solver.autoMergeFile){
+      unsigned int n = PView::list.size();
+      MergePostProcessingFile(message, CTX::instance()->solver.autoShowViews,
+                              CTX::instance()->solver.autoShowLastStep, true);
+#if defined(HAVE_FLTK)
+      drawContext::global()->draw();
+      if(FlGui::available() && n != PView::list.size()){
+        FlGui::instance()->rebuildTree(true);
+        FlGui::instance()->openModule("Post-processing");
+      }
+#endif
+    }
+    break;
+  case GmshSocket::GMSH_OPEN_PROJECT:
+    OpenProject(message);
+#if defined(HAVE_FLTK)
+    drawContext::global()->draw();
+#endif
+    break;
+  case GmshSocket::GMSH_PARSE_STRING:
+    ParseString(message, true);
+#if defined(HAVE_FLTK)
+    drawContext::global()->draw();
+#endif
+    break;
+  case GmshSocket::GMSH_SPEED_TEST:
+    Msg::Info("got %d Mb message in %g seconds",
+              length / 1024 / 1024, GetTimeInSeconds() - timer);
+    break;
+  case GmshSocket::GMSH_VERTEX_ARRAY:
+    {
+      int n = PView::list.size();
+      PView::fillVertexArray(this, length, &message[0], swap);
+#if defined(HAVE_FLTK)
+      if(FlGui::available())
+        FlGui::instance()->updateViews(n != (int)PView::list.size(), true);
+      drawContext::global()->draw();
+#endif
+    }
+    break;
+  case GmshSocket::GMSH_CONNECT:
+    {
+      std::string::size_type first = 0;
+      std::string clientName = onelab::parameter::getNextToken(message, first);
+      std::string command = onelab::parameter::getNextToken(message, first);
+      gmshLocalNetworkClient* subClient =
+        new gmshLocalNetworkClient(clientName, command, "", true);
+      onelabGmshServer *server = new onelabGmshServer(subClient);
+      subClient->setPid(0);
+      int sock = server->LaunchClient();
+      if(sock < 0){ // could not establish the connection: aborting
+        server->Shutdown();
+        delete server;
+        Msg::Error("Could not connect client '%s'", subClient->getName().c_str());
+      }
+      else{
+        Msg::StatusBar(true, "Running '%s'...", subClient->getName().c_str());
+        subClient->setGmshServer(server);
+        subClient->setFather(this);
+        master->addClient(subClient);
+      }
+    }
+    break;
+  case GmshSocket::GMSH_OLPARSE:
+    {
+      std::string reply = "unavailable";
+#if defined(HAVE_ONELAB_METAMODEL)
+      std::string::size_type first = 0;
+      std::string clientName = onelab::parameter::getNextToken(message, first);
+      std::string fullName = onelab::parameter::getNextToken(message, first);
+      preProcess(clientName, fullName); // contrib/onelab/OnelabParser.cpp
+      Msg::Info("Done preprocessing file '%s'", fullName.c_str());
+      reply = onelab::server::instance()->getChanged(clientName) ? "true" : "false";
+#endif
+      getGmshServer()->SendMessage
+	(GmshSocket::GMSH_OLPARSE, reply.size(), &reply[0]);
+    }
+    break;
+  case GmshSocket::GMSH_CLIENT_CHANGED:
+    {
+      std::string::size_type first = 0;
+      std::string command = onelab::parameter::getNextToken(message, first);
+      std::string name = onelab::parameter::getNextToken(message, first);
+      if(command == "get"){
+	std::string reply = onelab::server::instance()->getChanged(name) ? "true" : "false";
+	getGmshServer()->SendMessage
+	  (GmshSocket::GMSH_CLIENT_CHANGED, reply.size(), &reply[0]);
+      }
+      else if(command == "set"){
+	std::string changed = onelab::parameter::getNextToken(message, first);
+	onelab::server::instance()->setChanged(changed=="true"?true:false,name);
+      }
+    }
+    break;
+  default:
+    Msg::Warning("Received unknown message type (%d)", type);
+    break;
+  }
+
+  return true;
+}
+
+bool gmshLocalNetworkClient::run()
+{
+ new_connection:
+  setPid(0); // dummy pid, should be non-negative
+
+  onelabGmshServer *server = new onelabGmshServer(this);
+
+  int sock = server->LaunchClient();
+
+  if(sock < 0){
+    // could not establish the connection: aborting
+    server->Shutdown();
+    delete server;
+    return false;
+  }
+
+  Msg::StatusBar(true, "Running '%s'...", _name.c_str());
+
+  setGmshServer(server);
+
+  while(1) {
+    if(getExecutable().empty() && !CTX::instance()->solver.listen){
+      // we stopped listening to the special "Listen" client
+      break;
+    }
+
+    // loop over all the clients (usually only one, but can be more if we
+    // spawned subclients) and check if data is available for one of them
+    bool stop = false, haveData = false;
+    gmshLocalNetworkClient *c = 0;
+    std::vector<gmshLocalNetworkClient*> toDelete;
+    for(int i = 0; i < getNumClients(); i++){
+      c = getClient(i);
+      if(c->getPid() < 0){
+        if(c == this){ // the "master" client stopped
+          stop = true;
+          break;
+        }
+        else{
+          // this subclient is not active anymore: shut down and delete its
+          // server and mark the client for deletion
+          GmshServer *s = c->getGmshServer();
+          c->setGmshServer(0);
+          c->setFather(0);
+          if(s){
+            s->Shutdown();
+            delete s;
+          }
+          toDelete.push_back(c);
+          continue;
+        }
+      }
+      GmshServer *s = c->getGmshServer();
+      if(!s){
+        Msg::Error("Abnormal server termination (no valid server)");
+        stop = true;
+        break;
+      }
+      else{
+        int ret = s->NonBlockingWait(0.001, -1.);
+        if(ret == 0){ // we have data from this particular client
+          haveData = true;
+          break;
+        }
+        else if(ret == 3){ // pass to the next client
+          continue;
+        }
+        else{ // an error occurred
+          stop = true;
+          break;
+        }
+      }
+    }
+    for(unsigned int i = 0; i < toDelete.size(); i++){
+      removeClient(toDelete[i]);
+      delete toDelete[i];
+    }
+
+    // break the while(1) if the master client has stopped or if we encountered
+    // a problem
+    if(stop) break;
+
+    // if data is available try to get the message from the corresponding
+    // client; break the while(1) if we could not receive the message
+    if(haveData && !c->receiveMessage(this)) break;
+
+    // break the while(1) if the master client has stopped
+    if(c == this && c->getPid() < 0) break;
+  }
+
+  // we are done running the (master) client: delete the servers and the
+  // subclients, if any remain (they should have been deleted already).
+  std::vector<gmshLocalNetworkClient*> toDelete;
+  for(int i = 0; i < getNumClients(); i++){
+    gmshLocalNetworkClient *c = getClient(i);
+    GmshServer *s = c->getGmshServer();
+    c->setGmshServer(0);
+    c->setFather(0);
+    if(s){
+      s->Shutdown();
+      delete s;
+    }
+    if(c != this){
+      if(c->getPid() > 0)
+        Msg::Error("Subclient %s was not stopped correctly", c->getName().c_str());
+      toDelete.push_back(c);
+    }
+  }
+  for(unsigned int i = 0; i < toDelete.size(); i++){
+    removeClient(toDelete[i]);
+    delete toDelete[i];
+  }
+
+  Msg::StatusBar(true, "Done running '%s'", _name.c_str());
+
+  if(getExecutable().empty()){
+    Msg::Info("Client disconnected: starting new connection");
+    goto new_connection;
+  }
+
+  return true;
+}
+
+bool gmshLocalNetworkClient::kill()
+{
+  // FIXME: we should kill all the clients in the list
+  if(getPid() > 0) {
+    if(KillProcess(getPid())){
+      Msg::Info("Killed '%s' (pid %d)", _name.c_str(), getPid());
+#if defined(HAVE_FLTK)
+      if(FlGui::available())
+        FlGui::instance()->setProgress("Killed", 0, 0, 0);
+#endif
+      setPid(-1);
+      return true;
+    }
+  }
+  setPid(-1);
+  return false;
+}
+
+void initializeLoops()
+{
+  onelabUtils::initializeLoop("1");
+  onelabUtils::initializeLoop("2");
+  onelabUtils::initializeLoop("3");
+
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && onelab::server::instance()->getChanged())
+    FlGui::instance()->rebuildTree(false);
+#endif
+}
+
+bool incrementLoops()
+{
+  bool ret = false;
+  if(onelabUtils::incrementLoop("3"))      ret = true;
+  else if(onelabUtils::incrementLoop("2")) ret = true;
+  else if(onelabUtils::incrementLoop("1")) ret = true;
+
+  //Define ONELAB parameter indicating whether or not in a loop
+  onelab::number n("0Metamodel/Loop",ret?1:0);
+  n.setVisible(false);
+  onelab::server::instance()->set(n);
+
+#if defined(HAVE_FLTK)
+  if(FlGui::available() && onelab::server::instance()->getChanged())
+    FlGui::instance()->rebuildTree(false);
+#endif
+  return ret;
+}
+
+void updateGraphs()
+{
+  bool redraw = false;
+  for(int i = 0; i < 18; i++){
+    std::ostringstream tmp;
+    tmp << i;
+    bool ret = onelabUtils::updateGraph(tmp.str());
+    redraw = redraw || ret;
+  }
+  if(redraw){
+    // don't delete the widgets, as this is called in widget callbacks
+#if defined(HAVE_FLTK)
+    FlGui::instance()->updateViews(true, false);
+    drawContext::global()->draw();
+#endif
+  }
+}
+
+std::string timeStamp()
+{
+  time_t now;
+  time(&now);
+  tm *t = localtime(&now);
+  char stamp[32];
+  // stamp.size() is always 20
+  sprintf(stamp, "_%04d-%02d-%02d_%02d-%02d-%02d", 1900 + t->tm_year,
+          1 + t->tm_mon, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+  return std::string(stamp);
+}
+
+void saveDb(const std::string &fileName)
+{
+  FILE *fp = Fopen(fileName.c_str(), "wb");
+  if(fp){
+    Msg::StatusBar(true, "Saving database '%s'...", fileName.c_str());
+    onelab::server::instance()->toFile(fp);
+    fclose(fp);
+    Msg::StatusBar(true, "Done saving database '%s'", fileName.c_str());
+  }
+  else
+    Msg::Error("Could not save database '%s'", fileName.c_str());
+}
+
+void archiveOutputFiles(const std::string &fileName)
+{
+  std::string stamp;
+  std::vector<onelab::string> ps;
+  onelab::server::instance()->get(ps,"0Metamodel/9Tag");
+  if(ps.size() && ps[0].getValue().size())
+    stamp.assign(timeStamp() + "_" + ps[0].getValue());
+  else
+    stamp.assign(timeStamp());
+
+  // add time stamp in all output files in the db, and rename them on disk
+  std::vector<onelab::string> strings;
+  onelab::server::instance()->get(strings);
+  for(unsigned int i = 0; i < strings.size(); i++){
+    if(strings[i].getName().find("9Output files") != std::string::npos){
+      std::vector<std::string> names = strings[i].getChoices();
+      names.push_back(strings[i].getValue());
+      for(unsigned int j = 0; j < names.size(); j++){
+        std::vector<std::string> split = SplitFileName(names[j]);
+        int n = split[1].size();
+        // if name is not already stamped
+        if(n < 18 || split[1][n-3] != '-' || split[1][n-6] != '-' ||
+           split[1][n-9] != '_'){
+          std::string old = names[j];
+          CreateSingleDir(split[0] + "archive/");
+          names[j] = split[0] + "archive/" + split[1] + stamp + split[2];
+          Msg::Info("Renaming '%s' into '%s'", old.c_str(), names[j].c_str());
+          rename(old.c_str(), names[j].c_str());
+        }
+      }
+      strings[i].setValue(names.back());
+      names.pop_back();
+      strings[i].setChoices(names);
+      onelab::server::instance()->set(strings[i]);
+    }
+  }
+
+  // save stamped db
+  {
+    std::vector<std::string> split = SplitFileName(fileName);
+    CreateSingleDir(split[0] + "archive/");
+    saveDb(split[0] + "archive/" + split[1] + stamp + split[2]);
+  }
+
+#if defined(HAVE_FLTK)
+  FlGui::instance()->rebuildTree(true);
+#endif
+}
+
+void archiveSolutionFiles(const std::string &fileName)
+{
+  // extract tag from db fileName, use fileName as tag otherwise
+  std::vector<std::string> split = SplitFileName(fileName);
+  std::string dir = split[0] + "archive/";
+  std::string tag = split[1];
+  if (!tag.compare(0,6,"onelab"))
+    tag.assign(tag.substr(6)); // cut off 'onelab' if present
+
+  // add tag to all solution files in the db, and rename them on disk
+  std::vector<onelab::string> strings;
+  onelab::server::instance()->get(strings,"0Metamodel/9Solution files");
+  if(strings.size()){
+    std::vector<std::string> names = strings[0].getChoices();
+    if(names.size()){
+      for(unsigned int j = 0; j < names.size(); j++){
+	std::vector<std::string> split = SplitFileName(names[j]);
+	std::string old = names[j];
+	CreateSingleDir(dir);
+	names[j] = dir + split[1] + tag + split[2];
+	Msg::Info("Renaming '%s' into '%s'", old.c_str(), names[j].c_str());
+	rename(old.c_str(), names[j].c_str());
+      }
+      strings[0].setValue(names[0]);
+      strings[0].setChoices(names);
+      onelab::server::instance()->set(strings[0]);
+#if defined(HAVE_FLTK)
+      FlGui::instance()->rebuildTree(true);
+#endif
+    }
+  }
+}
+
+void loadDb(const std::string &name)
+{
+  Msg::StatusBar(true, "Loading database '%s'...", name.c_str());
+  FILE *fp = Fopen(name.c_str(), "rb");
+  if(fp){
+    onelab::server::instance()->fromFile(fp);
+    fclose(fp);
+    Msg::StatusBar(true, "Done loading database '%s'", name.c_str());
+  }
+  else
+    Msg::Error("Could not load database '%s'", name.c_str());
+}
+
+void resetDb(bool runGmshClient)
+{
+  Msg::Info("Resetting database");
+
+  // clear everything except persistent parameters
+  std::vector<onelab::number> allNumbers, persistentNumbers;
+  std::vector<onelab::string> allStrings, persistentStrings;
+  onelab::server::instance()->get(allNumbers);
+  onelab::server::instance()->get(allStrings);
+  for(unsigned int i = 0; i < allNumbers.size(); i++){
+    if(allNumbers[i].getAttribute("Persistent") == "1")
+      persistentNumbers.push_back(allNumbers[i]);
+  }
+  for(unsigned int i = 0; i < allStrings.size(); i++){
+    if(allStrings[i].getAttribute("Persistent") == "1")
+      persistentStrings.push_back(allStrings[i]);
+  }
+
+  // TODO FIXME: this will be removed once the new stable version of getdp is
+  // released
+  for(onelab::server::citer it = onelab::server::instance()->firstClient();
+      it != onelab::server::instance()->lastClient(); it++){
+    onelab::client *c = *it;
+    std::vector<onelab::number> ps;
+    c->get(ps, c->getName() + "/UseCommandLine");
+    if(ps.size()) persistentNumbers.push_back(ps[0]);
+    c->get(ps, c->getName() + "/GuessModelName");
+    if(ps.size()) persistentNumbers.push_back(ps[0]);
+    std::vector<onelab::string> ps2;
+    c->get(ps2, c->getName() + "/FileExtension");
+    if(ps2.size()) persistentStrings.push_back(ps2[0]);
+  }
+  // END TODO
+
+  // clear the db
+  onelab::server::instance()->clear();
+
+  // run Gmsh client for non-python metamodels
+  if(runGmshClient && onelab::server::instance()->findClient("Gmsh") !=
+     onelab::server::instance()->lastClient())
+    onelabUtils::runGmshClient("reset", CTX::instance()->solver.autoMesh);
+
+  for(unsigned int i = 0; i < persistentNumbers.size(); i++){
+    Msg::Info("Restoring persistent parameter %s",
+              persistentNumbers[i].getName().c_str());
+    onelab::server::instance()->set(persistentNumbers[i]);
+  }
+  for(unsigned int i = 0; i < persistentStrings.size(); i++){
+    Msg::Info("Restoring persistent parameter %s",
+              persistentStrings[i].getName().c_str());
+    onelab::server::instance()->set(persistentStrings[i]);
+  }
+}
+
+void solver_batch_cb(void *data)
+{
+  int num = (intptr_t)data;
+  if(num < 0) return;
+  std::string name = opt_solver_name(num, GMSH_GET, "");
+  std::string exe = opt_solver_executable(num, GMSH_GET, "");
+  std::string host = opt_solver_remote_login(num, GMSH_GET, "");
+  if(exe.empty()){
+    Msg::Error("Solver executable name not provided");
+    return;
+  }
+
+  onelab::number n("0Metamodel/Batch", CTX::instance()->batch);
+  n.setVisible(false);
+  onelab::server::instance()->set(n);
+
+  // create client
+  onelab::localNetworkClient *c = new gmshLocalNetworkClient(name, exe, host);
+  c->setIndex(num);
+  onelab::string o(c->getName() + "/Action");
+
+  // initialize
+  onelabUtils::runGmshClient("initialize", CTX::instance()->solver.autoMesh);
+  o.setValue("initialize");
+  onelab::server::instance()->set(o);
+  c->run();
+
+  // load db
+  if(CTX::instance()->solver.autoSaveDatabase){
+    std::string db = SplitFileName(GModel::current()->getFileName())[0] + "onelab.db";
+    if(!StatFile(db)) loadDb(db);
+  }
+
+  // check
+  onelabUtils::runGmshClient("check", CTX::instance()->solver.autoMesh);
+  onelabUtils::guessModelName(c);
+  o.setValue("check");
+  onelab::server::instance()->set(o);
+  c->run();
+
+  // compute
+  initializeLoops();
+  do{
+    onelabUtils::runGmshClient("compute", CTX::instance()->solver.autoMesh);
+    onelabUtils::guessModelName(c);
+    o.setValue("compute");
+    onelab::server::instance()->set(o);
+    c->run();
+    onelab::server::instance()->setChanged(false, c->getName());
+  } while(incrementLoops());
+
+  if(CTX::instance()->solver.autoSaveDatabase ||
+     CTX::instance()->solver.autoArchiveOutputFiles){
+    std::string db = SplitFileName(GModel::current()->getFileName())[0] + "onelab.db";
+    if(CTX::instance()->solver.autoArchiveOutputFiles) archiveOutputFiles(db);
+    if(CTX::instance()->solver.autoSaveDatabase) saveDb(db);
+  }
+}
+
+#endif
diff --git a/Common/gmshLocalNetworkClient.h b/Common/gmshLocalNetworkClient.h
new file mode 100644
index 0000000..7175fc3
--- /dev/null
+++ b/Common/gmshLocalNetworkClient.h
@@ -0,0 +1,86 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _GMSH_LOCAL_NETWORK_CLIENT_H_
+#define _GMSH_LOCAL_NETWORK_CLIENT_H_
+
+#include <vector>
+#include <algorithm>
+#include "GmshConfig.h"
+
+#if defined(HAVE_ONELAB)
+
+#include "onelab.h"
+
+class gmshLocalNetworkClient : public onelab::localNetworkClient{
+ private:
+  // a gmsh local network client can launch subclients (this is typical for a
+  // metamodel that calls several underlying models); _clients keeps track of
+  // the master (this) and the subclients.
+  std::vector<gmshLocalNetworkClient*> _clients;
+  // client that launched this one (with GMSH_CONNECT); _father is zero for the
+  // master client (the one created by Gmsh).
+  gmshLocalNetworkClient *_father;
+ public:
+  gmshLocalNetworkClient(const std::string &name, const std::string &executable,
+                         const std::string &remoteLogin="",
+                         bool treatExecutableAsFullCommandLine=false)
+    : onelab::localNetworkClient(name, executable, remoteLogin,
+                                 treatExecutableAsFullCommandLine), _father(0)
+  {
+    addClient(this);
+  }
+  void setFather(gmshLocalNetworkClient *father)
+  {
+    _father = father;
+  }
+  gmshLocalNetworkClient *getFather()
+  {
+    return _father;
+  }
+  void addClient(gmshLocalNetworkClient *client)
+  {
+    _clients.push_back(client);
+  }
+  void removeClient(gmshLocalNetworkClient *client)
+  {
+    std::vector<gmshLocalNetworkClient*>::iterator it;
+    it = std::find(_clients.begin(), _clients.end(), client);
+    if(it != _clients.end()) _clients.erase(it);
+  }
+  int getNumClients(){ return _clients.size(); }
+  gmshLocalNetworkClient *getClient(int i)
+  {
+    if(i >= 0 && i < getNumClients()) return _clients[i];
+    return 0;
+  }
+  int getNumConnectedClients()
+  {
+    int n = 0;
+    for(int i = 0; i < getNumClients(); i++){
+      if(_clients[i]->getPid() != -1) n++;
+    }
+    return n;
+  }
+  bool receiveMessage(gmshLocalNetworkClient *master);
+  bool run();
+  bool kill();
+};
+
+// FIXME: move this to onelabUtils
+void initializeLoops();
+bool incrementLoops();
+void updateGraphs();
+std::string timeStamp();
+void saveDb(const std::string &fileName);
+void archiveOutputFiles(const std::string &fileName);
+void archiveSolutionFiles(const std::string &fileName);
+void loadDb(const std::string &name);
+void resetDb(bool runGmshClient);
+void solver_batch_cb(void *data);
+
+#endif
+
+#endif
diff --git a/Common/gmshPopplerWrapper.cpp b/Common/gmshPopplerWrapper.cpp
index 63f580d..4d487ce 100644
--- a/Common/gmshPopplerWrapper.cpp
+++ b/Common/gmshPopplerWrapper.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/gmshPopplerWrapper.h b/Common/gmshPopplerWrapper.h
index 3cca44b..44371e3 100644
--- a/Common/gmshPopplerWrapper.h
+++ b/Common/gmshPopplerWrapper.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Common/onelab.h b/Common/onelab.h
index 8cd774a..8a9dc5c 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -38,10 +38,19 @@
 #include <sstream>
 #include "GmshSocket.h"
 
+#ifdef HAVE_ONELAB2
+#include "NetworkUtils.h"
+#include "OnelabAttributes.h"
+#endif
+
 namespace onelab{
 
   // The base parameter class.
-  class parameter{
+#ifdef HAVE_ONELAB2
+  class parameter : public OnelabAttr{
+#else
+  class parameter {
+#endif
   private:
     // the name of the parameter, including its '/'-separated path in the
     // parameter hierarchy. Parameters or subpaths can start with numbers to
@@ -292,6 +301,86 @@ namespace onelab{
       }
       return true;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x05;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = _name.length()+_label.length()+_help.length()+10;
+      for(std::map<std::string, bool>::const_iterator it = getClients().begin(); it != getClients().end(); it++)
+        len += it->first.size()+2;
+      for(std::map<std::string, std::string>::const_iterator it = _attributes.begin(); it != _attributes.end(); it++)
+        len += it->first.size()+it->second.size()+2;
+      return len;
+    }
+    virtual UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = encode(dst, getAttributeType());
+      dst = encode(dst, getAttributeLength());
+
+      dst = encode(dst, (UInt8 *)_name.c_str(), this->_name.length()+1);
+      dst = encode(dst, (UInt8 *)_label.c_str(), this->_label.length()+1);
+      dst = encode(dst, (UInt8 *)_help.c_str(), this->_help.length()+1);
+      dst = encode(dst, (UInt8)_readOnly);
+      dst = encode(dst, (UInt8)_neverChanged);
+      dst = encode(dst, (UInt8)_visible);
+
+      dst = encode(dst, (UInt16)_attributes.size());
+      for(std::map<std::string, std::string>::const_iterator it = _attributes.begin(); it != _attributes.end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+
+      dst = encode(dst, (UInt16)_clients.size());
+      for(std::map<std::string, bool>::const_iterator it = getClients().begin(); it != getClients().end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8)it->second);
+      }
+
+      return dst;
+    }
+    virtual UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt8 tmp;
+      UInt16 n;
+
+      src = parse(src, _name, '\0');
+      src = parse(src, _label, '\0');
+      src = parse(src, _help, '\0');
+      src = parse(src, tmp);
+      this->_readOnly = (bool)tmp;
+      src = parse(src, tmp);
+      this->_neverChanged = (bool)tmp;
+      src = parse(src, tmp);
+      this->_visible = (bool)tmp;
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        std::string key, value;
+        src = parse(src, key, '\0');
+        src = parse(src, value, '\0');
+        setAttribute(key, value);
+      }
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        std::string client;
+        src = parse(src, client, '\0');
+        src = parse(src, tmp);
+        addClient(client, (bool)tmp);
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      std::cout << "Name: " << getName() << std::endl
+        << "Label: " << getLabel() << std::endl
+        << "Help: " << getHelp() << std::endl
+        << "Never changed: " << getNeverChanged() << std::endl
+        << "Changed: " << getChanged() << std::endl
+        << "Visible: " << getVisible() << std::endl;
+    }
+#endif
   };
 
   class parameterLessThan{
@@ -412,6 +501,73 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x06;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength()+sizeof(double)*4+8+sizeof(double)*_choices.size();
+      for(std::map<double, std::string>::const_iterator it = _valueLabels.begin(); it != _valueLabels.end(); it++)
+        len += it->second.size()+1+sizeof(double);
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+
+      dst = encode(dst, _value);
+      dst = encode(dst, _min);
+      dst = encode(dst, _max);
+      dst = encode(dst, _step);
+      dst = encode(dst, (UInt32)_index);
+
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        dst = encode(dst, _choices[i]);
+
+      dst = encode(dst, (UInt16)_valueLabels.size());
+      for(std::map<double, std::string>::const_iterator it = _valueLabels.begin(); it != _valueLabels.end(); it++) {
+        dst = encode(dst, it->first);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt16 n;
+
+      src = parameter::parseAttribute(src, length);
+
+      src = parse(src, _value);
+      src = parse(src, _min);
+      src = parse(src, _max);
+      src = parse(src, _step);
+      src = parse(src, *(UInt32 *)&_index);
+
+      src = parse(src, n);
+      _choices.resize(n);
+      for(unsigned int i = 0; i < n; i++)
+        src = parse(src, _choices[i]);
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        double value;
+        std::string label;
+        src = parse(src, value);
+        src = parse(src, label, '\0');
+        setValueLabel(value, label);
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      parameter::showAttribute();
+      std::cout << "Value: " << this->_value << std::endl
+        << "Min: " << this->_min << std::endl
+        << "Max: " << this->_max << std::endl;
+    }
+#endif
   };
 
   // The string class. A string has a mutable "kind": we do not derive
@@ -476,6 +632,51 @@ namespace onelab{
         _choices[i] = getNextToken(msg, pos);
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x07;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const
+    {
+      UInt16 len =  parameter::getAttributeLength();
+      len += _value.size()+_kind.size()+4;
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        len += _choices[i].size()+1;
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+
+      dst = encode(dst, (UInt8 *)_value.c_str(), _value.size()+1);
+      dst = encode(dst, (UInt8 *)_kind.c_str(), _kind.size()+1);
+
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        dst = encode(dst, (UInt8 *)_choices[i].c_str(), _choices[i].size()+1);
+
+      return dst;
+     }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt16 n;
+      src = parameter::parseAttribute(src, length);
+      src = parse(src, _value, '\0');
+      src = parse(src, _kind, '\0');
+
+      src = parse(src, n);
+      _choices.resize(n);
+      for(unsigned int i=0; i<n; i++) {
+        src = parse(src, _choices[i], '\0');
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      parameter::showAttribute();
+      std::cout << "Value: " << this->_value << std::endl;
+    }
+#endif
   };
 
   // The region class. A region can be any kind of geometrical entity,
@@ -558,6 +759,63 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x08;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength();
+      len += 2;
+      for(std::set<std::string>::const_iterator it = _value.begin(); it != _value.end(); it++)
+        len += it->size()+1;
+      len += 4;
+      len += 2;
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        len += 2;
+        for(std::set<std::string>::const_iterator it = _choices[i].begin(); it != _choices[i].end(); it++)
+          len += it->size()+1;
+      }
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+      dst = encode(dst, (UInt16)this->_value.size());
+      for(std::set<std::string>::const_iterator it = _value.begin(); it != _value.end(); it++)
+        dst = encode(dst, (UInt8 *)it->c_str(), it->size()+1);
+      dst = encode(dst, (UInt32)_dimension);
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        dst = encode(dst, (UInt16)_choices[i].size());
+        for(std::set<std::string>::const_iterator it = _choices[i].begin(); it != _choices[i].end(); it++)
+          dst = encode(dst, (UInt8 *)it->c_str(), it->size()+1);
+      }
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 len)
+    {
+      src = parameter::parseAttribute(src, len);
+      UInt16 m = 0, n = 0;
+      std::string value;
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, value, '\0');
+      	_value.insert(value);
+      }
+      src = parse(src, *(UInt32 *)&_dimension);
+      src = parse(src, n);
+      _choices.resize(n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, m);
+        for(int j=0; j<m; j++) {
+          src = parse(src, value, '\0');
+          _choices[i].insert(value);
+        }
+      }
+      return src;
+    }
+    void showAttribute() const {}
+#endif
+
   };
 
   // The (possibly piece-wise defined on regions) function class. Functions are
@@ -642,6 +900,69 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x09;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength();
+      len += 2;
+      for(std::map<std::string, std::string>::const_iterator it = _value.begin();
+          it != _value.end(); it++)
+        len += 2+it->first.size()+it->second.size();
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        len += 2;
+        for(std::map<std::string, std::string>::const_iterator it = _choices[i].begin();
+            it != _choices[i].end(); it++) {
+          len += 2+it->first.size()+it->second.size();
+        }
+      }
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst),
+      dst = encode(dst, (UInt16)this->_value.size());
+      for(std::map<std::string, std::string>::const_iterator it = _value.begin();
+          it != _value.end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        dst = encode(dst, (UInt16)_choices[i].size());
+        for(std::map<std::string, std::string>::const_iterator it = _choices[i].begin();
+            it != _choices[i].end(); it++) {
+          dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+          dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+        }
+      }
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 len)
+    {
+      src = parameter::parseAttribute(src, len);
+      UInt16 m = 0, n = 0;
+      std::string key, value;
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, key, '\0');
+        src = parse(src, value, '\0');
+      	_value[key] = value;
+      }
+      src = parse(src, n);
+      _choices.resize(n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, m);
+        for(int j=0; j<m; j++) {
+          src = parse(src, key, '\0');
+          src = parse(src, value, '\0');
+          _choices[i][key] = value;
+        }
+      }
+      return src;
+    }
+    void showAttribute() const {}
+#endif
   };
 
   // The parameter space, i.e., the set of parameters stored and handled by the
@@ -695,6 +1016,9 @@ namespace onelab{
       }
       else{
         T* newp = new T(p);
+#ifdef HAVE_ONELAB2
+        newp->isInDatabase(true);
+#endif
         if(client.size()) newp->addClient(client, true);
         ps.insert(newp);
       }
@@ -724,6 +1048,16 @@ namespace onelab{
       }
       return true;
     }
+    template <class T> T* _getPtr(std::string name, const std::string client, std::set<T*, parameterLessThan> ps)
+    {
+      T tmp(name);
+      typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp);
+      if(it != ps.end()){
+        if(client.size()) (*it)->addClient(client, true);
+        return *it;
+      }
+      return NULL;
+    }
     void _getAllParameters(std::set<parameter*, parameterLessThan> &ps) const
     {
       ps.insert(_numbers.begin(), _numbers.end());
@@ -770,6 +1104,21 @@ namespace onelab{
              const std::string &client=""){ return _get(ps, name, client, _regions); }
     bool get(std::vector<function> &ps, const std::string &name="",
              const std::string &client=""){ return _get(ps, name, client, _functions); }
+    void getPtr(number **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _numbers);}
+    void getPtr(string **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _strings);}
+    void getPtr(region **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _regions);}
+    void getPtr(function **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _functions);}
+    void getAllParameters(std::set<parameter*, parameterLessThan> &ps) const
+    {
+      ps.insert(_numbers.begin(), _numbers.end());
+      ps.insert(_strings.begin(), _strings.end());
+      ps.insert(_regions.begin(), _regions.end());
+      ps.insert(_functions.begin(), _functions.end());
+    }
     unsigned int getNumParameters()
     {
       return (int)(_numbers.size() + _strings.size() + _regions.size() + _functions.size());
@@ -935,7 +1284,6 @@ namespace onelab{
       return false;
     }
   };
-
   // The onelab server: a singleton that stores the parameter space and
   // interacts with onelab clients.
   class server{
@@ -944,8 +1292,8 @@ namespace onelab{
     static server *_server;
     // the address of the server
     std::string _address;
-    // the connected clients, indexed by name
-    std::map<std::string, client*> _clients;
+    // the connected clients
+    std::set<client*> _clients;
     // the parameter space
     parameterSpace _parameterSpace;
   public:
@@ -970,17 +1318,22 @@ namespace onelab{
     {
       return _parameterSpace.get(ps, name, client);
     }
-    typedef std::map<std::string, client*>::iterator citer;
+    typedef std::set<client*>::iterator citer;
     citer firstClient(){ return _clients.begin(); }
     citer lastClient(){ return _clients.end(); }
     int getNumClients() { return (int)_clients.size(); };
-    citer findClient(const std::string &name){ return _clients.find(name); }
+    citer findClient(const std::string &name)
+    {
+      for(citer it = _clients.begin(); it != _clients.end(); it++)
+        if((*it)->getName() == name) return it;
+      return _clients.end();
+    }
     void registerClient(client *c)
     {
-      _clients[c->getName()] = c;
+      _clients.insert(c);
       c->setId(_clients.size());
     }
-    void unregisterClient(client *c){ _clients.erase(c->getName()); }
+    void unregisterClient(client *c){ _clients.erase(c); }
     void setChanged(bool changed, const std::string &client="")
     {
       _parameterSpace.setChanged(changed, client);
@@ -1057,6 +1410,10 @@ namespace onelab{
   private:
     // executable of the client (including filesystem path, if necessary)
     std::string _executable;
+    // treat the executable name as a full command line (will prevent the
+    // escaping of the exe name, and will assume that the command line has been
+    // correcly escaped)
+    bool _treatExecutableAsFullCommandLine;
     // command to login to a remote host (if necessary)
     std::string _remoteLogin;
     // command line option to specify socket
@@ -1067,14 +1424,21 @@ namespace onelab{
     GmshServer *_gmshServer;
   public:
     localNetworkClient(const std::string &name, const std::string &executable,
-                       const std::string &remoteLogin="")
-      : localClient(name), _executable(executable), _remoteLogin(remoteLogin),
-        _socketSwitch("-onelab"), _pid(-1), _gmshServer(0) {}
+                       const std::string &remoteLogin="",
+                       bool treatExecutableAsFullCommandLine=false)
+      : localClient(name), _executable(executable),
+        _treatExecutableAsFullCommandLine(treatExecutableAsFullCommandLine),
+        _remoteLogin(remoteLogin), _socketSwitch("-onelab"), _pid(-1),
+        _gmshServer(0) {}
     virtual ~localNetworkClient(){}
     virtual bool isNetworkClient(){ return true; }
     const std::string &getExecutable(){ return _executable; }
     void setExecutable(const std::string &s){ _executable = s; }
     const std::string &getRemoteLogin(){ return _remoteLogin; }
+    bool treatExecutableAsFullCommandLine() const
+    {
+      return _treatExecutableAsFullCommandLine;
+    }
     void setRemoteLogin(const std::string &s){ _remoteLogin = s; }
     const std::string &getSocketSwitch(){ return _socketSwitch; }
     void setSocketSwitch(const std::string &s){ _socketSwitch = s; }
diff --git a/Common/onelabUtils.cpp b/Common/onelabUtils.cpp
index 40541f5..4ece1c0 100644
--- a/Common/onelabUtils.cpp
+++ b/Common/onelabUtils.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,10 +22,87 @@
 #include "PViewOptions.h"
 #endif
 
+#if defined(HAVE_ONELAB2)
+#include "OnelabDatabase.h"
+#include "OnelabServer.h"
+#endif
+
 namespace onelabUtils {
 
   // get command line arguments for the client if "UseCommandLine" is set for
   // this client
+#ifdef HAVE_ONELAB2
+  std::vector<std::string> getCommandLine(const std::string &client)
+  {
+    std::vector<std::string> args;
+    std::vector<onelab::number> n;
+    OnelabDatabase::instance()->get(n, client + "/UseCommandLine");
+    if(n.size() && n[0].getValue()){
+      std::vector<onelab::string> ps;
+      OnelabDatabase::instance()->get(ps, client + "/Action");
+      std::string action = (ps.empty() ? "" : ps[0].getValue());
+      OnelabDatabase::instance()->get(ps, client + "/1ModelName");
+      std::string modelName = (ps.empty() ? "" : ps[0].getValue());
+      OnelabDatabase::instance()->get(ps, client + "/9CheckCommand");
+      std::string checkCommand = (ps.empty() ? "" : ps[0].getValue());
+      OnelabDatabase::instance()->get(ps, client + "/9ComputeCommand");
+      std::string computeCommand = (ps.empty() ? "" : ps[0].getValue());
+      if(modelName.size()) args.push_back(" \"" + modelName + "\"");
+      if(action == "check")
+        args.push_back(" " + checkCommand) ;
+      else if(action == "compute")
+        args.push_back(" " + computeCommand);
+    }
+    return args;
+  }
+  std::string getMshFileName()
+  {
+    std::string name;
+    std::vector<onelab::string> ps;
+    OnelabDatabase::instance()->get(ps, "Gmsh/MshFileName");
+    if(ps.size()){
+      name = ps[0].getValue();
+    }
+    else{
+      name = CTX::instance()->outputFileName;
+      if(name.empty()){
+        if(CTX::instance()->mesh.fileFormat == FORMAT_AUTO)
+          name = GetDefaultFileName(FORMAT_MSH);
+        else
+          name = GetDefaultFileName(CTX::instance()->mesh.fileFormat);
+      }
+      onelab::string o("Gmsh/MshFileName", name, "Mesh name");
+      o.setKind("file");
+      o.setAttribute("Closed", "1");
+      OnelabDatabase::instance()->set(o, std::string("Gmsh"));
+    }
+    return name;
+  }
+
+  void guessModelName(const std::string &client)
+  {
+    std::vector<onelab::number> n;
+    OnelabDatabase::instance()->get(n, client + "/GuessModelName");
+    if(n.size() && n[0].getValue()){
+      std::vector<onelab::string> ps;
+      OnelabDatabase::instance()->get(ps, client + "/1ModelName");
+      if(ps.empty()){
+        OnelabDatabase::instance()->get(ps, "Gmsh/1ModelName");
+        std::vector<std::string> split;
+        if(!ps.empty()) split = SplitFileName(ps[0].getValue());
+        else split = SplitFileName(GModel::current()->getFileName());
+        std::string ext = "";
+        OnelabDatabase::instance()->get(ps, client + "/FileExtension");
+        if(ps.size()) ext = ps[0].getValue();
+        std::string name(split[0] + split[1] + ext);
+        onelab::string o(client + "/1ModelName", name, "Model name");
+        o.setKind("file");
+        OnelabDatabase::instance()->set(o, client);
+      }
+    }
+  }
+
+#else
   std::vector<std::string> getCommandLine(onelab::client *c)
   {
     std::vector<std::string> args;
@@ -47,12 +124,23 @@ namespace onelabUtils {
         args.push_back(" " + checkCommand) ;
       else if(action == "compute")
         args.push_back(" " + computeCommand);
+      // Propagate -setnumber/-setnumber gmsh option to the client. (Is this a
+      // good idea?)
+      std::ostringstream sstream;
+      sstream.precision(16);
+      std::map<std::string, double> cln(Msg::GetCommandLineNumbers());
+      for(std::map<std::string, double>::iterator it = cln.begin(); it != cln.end(); it++)
+        sstream << " -setnumber " << it->first << " " << it->second;
+      std::map<std::string, std::string> cls(Msg::GetCommandLineStrings());
+      for(std::map<std::string, std::string>::iterator it = cls.begin(); it != cls.end(); it++)
+        sstream << " -setstring " << it->first << " " << it->second;
+      args.push_back(sstream.str());
     }
     return args;
   }
-
   std::string getMshFileName(onelab::client *c)
   {
+
     std::string name;
     std::vector<onelab::string> ps;
     c->get(ps, "Gmsh/MshFileName");
@@ -104,6 +192,8 @@ namespace onelabUtils {
     }
   }
 
+#endif
+
   void initializeLoop(const std::string &level)
   {
     bool changed = false;
@@ -243,18 +333,22 @@ namespace onelabUtils {
     int num = atoi(graphNum.c_str());
     std::vector<double> x, y;
     std::string xName, yName;
+    int graphType = 3;
     std::vector<onelab::number> numbers;
     onelab::server::instance()->get(numbers);
     for(unsigned int i = 0; i < numbers.size(); i++){
       std::string v = numbers[i].getAttribute("Graph");
       v.resize(36, '0');
-      if(v[2 * num] == '1'){
+      if(v[2 * num] != '0'){
         x = getRange(numbers[i]);
         xName = numbers[i].getShortName();
       }
-      if(v[2 * num + 1] == '1'){
+      if(v[2 * num + 1] != '0'){
         y = getRange(numbers[i]);
         yName = numbers[i].getShortName();
+        char t = v[2 * num + 1];
+        graphType = (t == '1') ? 1 : (t == '2') ? 2 : (t == '3') ? 3 :
+          (t == '4') ? 4 : 3;
       }
     }
     if(x.empty()){
@@ -263,8 +357,8 @@ namespace onelabUtils {
     }
     if(x.size() && y.size()){
       if(x.size() != y.size())
-        Msg::Warning("X-Y data series have different length (%d != %d)",
-                     (int)x.size(), (int)y.size());
+        Msg::Info("X-Y data series have different length (%d != %d)",
+                  (int)x.size(), (int)y.size());
       if(view){
         view->getData()->setXY(x, y);
         view->getData()->setName(yName);
@@ -274,7 +368,7 @@ namespace onelabUtils {
       else{
         view = new PView(xName, yName, x, y);
         view->getData()->setFileName("ONELAB" + graphNum);
-        view->getOptions()->intervalsType = PViewOptions::Discrete;
+        view->getOptions()->intervalsType = graphType;
         view->getOptions()->autoPosition = num / 2 + 2;
       }
       changed = true;
@@ -290,7 +384,78 @@ namespace onelabUtils {
   static bool _firstComputation = true;
   void setFirstComputationFlag(bool val){ _firstComputation = val; }
   bool getFirstComputationFlag(){ return _firstComputation; }
+#ifdef HAVE_ONELAB2
+  bool runGmshClient(const std::string &action, int meshAuto)
+  {
+    bool redraw = false;
 
+    // do nothing in case of a python metamodel
+    std::vector<onelab::number> pn;
+    OnelabDatabase::instance()->get(pn, "IsPyMetamodel");
+    if(pn.size() && pn[0].getValue()) return redraw;
+
+    OnelabLocalNetworkClient *c = OnelabServer::instance()->getClient("Gmsh");
+    if(c != NULL) return redraw; // Gmsh is remote TODO
+
+    std::string mshFileName = onelabUtils::getMshFileName();
+
+    Msg::SetGmshOnelabAction(action);
+
+    static std::string modelName = GModel::current()->getName();
+
+    if(action == "initialize"){
+      // nothing to do
+    }
+    else if(action == "reset"){
+      setFirstComputationFlag(false);
+      // nothing more to do: "check" will be called right afterwards
+    }
+    else if(action == "check"){
+      if(OnelabServer::instance()->getChanged("Gmsh") ||
+         modelName != GModel::current()->getName()){
+        // reload geometry if Gmsh parameters have been modified or
+        // if the model name has changed
+        modelName = GModel::current()->getName();
+        redraw = true;
+        OpenProject(GModel::current()->getFileName(), false);
+        OnelabServer::instance()->setChanged(true, "Gmsh");
+      }
+    }
+    else if(action == "compute"){
+      if(OnelabServer::instance()->getChanged("Gmsh") ||
+         modelName != GModel::current()->getName()){
+        // reload the geometry, mesh it and save the mesh if Gmsh parameters
+        // have been modified or if the model name has changed
+        modelName = GModel::current()->getName();
+        redraw = true;
+        OpenProject(GModel::current()->getFileName(), false);
+        if(getFirstComputationFlag() && !StatFile(mshFileName) && meshAuto != 2){
+          Msg::Info("Skipping mesh generation: assuming '%s' is up-to-date "
+                    "(use Solver.AutoMesh=2 to force mesh generation)",
+                    mshFileName.c_str());
+        }
+        else if(!GModel::current()->empty() && meshAuto){
+          GModel::current()->mesh(3);
+          CreateOutputFile(mshFileName, CTX::instance()->mesh.fileFormat);
+        }
+      }
+      else if(StatFile(mshFileName)){
+        // mesh+save if the mesh file does not exist
+        if(meshAuto){
+          redraw = true;
+          GModel::current()->mesh(3);
+          CreateOutputFile(mshFileName, CTX::instance()->mesh.fileFormat);
+        }
+      }
+      setFirstComputationFlag(false);
+      OnelabServer::instance()->setChanged(false, "Gmsh");
+    }
+
+    Msg::SetGmshOnelabAction("");
+
+    return redraw;
+  }
+#else
   bool runGmshClient(const std::string &action, int meshAuto)
   {
     bool redraw = false;
@@ -303,7 +468,7 @@ namespace onelabUtils {
     onelab::server::citer it = onelab::server::instance()->findClient("Gmsh");
     if(it == onelab::server::instance()->lastClient()) return redraw;
 
-    onelab::client *c = it->second;
+    onelab::client *c = *it;
     std::string mshFileName = onelabUtils::getMshFileName(c);
 
     Msg::SetGmshOnelabAction(action);
@@ -361,7 +526,7 @@ namespace onelabUtils {
 
     return redraw;
   }
-
+#endif
   // update x using y, giving priority to any settings in x that can be set in
   // the GUI. The value of x is only changed if y is read-only.
   double updateNumber(onelab::number &x, onelab::number &y, const bool readOnlyRange)
diff --git a/Common/onelabUtils.h b/Common/onelabUtils.h
index 9f77c34..cb1155e 100644
--- a/Common/onelabUtils.h
+++ b/Common/onelabUtils.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -12,9 +12,15 @@
 // onelab servers
 
 namespace onelabUtils {
+#ifdef HAVE_ONELAB2
+  std::vector<std::string> getCommandLine(const std::string &client);
+  std::string getMshFileName();
+  void guessModelName(const std::string &client);
+#else
   std::vector<std::string> getCommandLine(onelab::client *c);
   std::string getMshFileName(onelab::client *c);
   void guessModelName(onelab::client *c);
+#endif
   void initializeLoop(const std::string &level);
   bool incrementLoop(const std::string &level);
   std::vector<double> getRange(onelab::number &p);
diff --git a/Common/rtree.h b/Common/rtree.h
new file mode 100644
index 0000000..c4ea149
--- /dev/null
+++ b/Common/rtree.h
@@ -0,0 +1,1639 @@
+/*
+
+TITLE
+
+	R-TREES: A DYNAMIC INDEX STRUCTURE FOR SPATIAL SEARCHING
+
+DESCRIPTION
+
+	A C++ templated version of the RTree algorithm.
+	For more information please read the comments in RTree.h
+
+AUTHORS
+
+	* 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely
+	* 1994 ANCI C ported from original test code by Melinda Green - melinda at superliminal.com
+	* 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook
+	* 2004 Templated C++ port by Greg Douglas
+
+LICENSE:
+
+	Entirely free for all uses. Enjoy!
+
+FILES
+	* RTree.h            The C++ templated RTree implementation. Well commented.
+	* Test.cpp           A simple test program, ported from the original C version.
+	* MemoryTest.cpp     A more rigourous test to validate memory use.
+	* README.TXT         This file.
+
+TO BUILD
+
+	To build a test, compile only one of the test files with RTree.h.
+	Both test files contain a main() function.
+
+RECENT CHANGE LOG
+
+05 Jan 2010
+o Fixed Iterator GetFirst() - Previous fix was not incomplete
+
+03 Dec 2009
+o Added Iteartor GetBounds()
+o Added Iterator usage to simple test
+o Fixed Iterator GetFirst() - Thanks Mathew Riek
+o Minor updates for MSVC 2005/08 compilers
+
+ */
+
+#ifndef RTREE_H
+#define RTREE_H
+#include <algorithm>
+
+// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
+
+// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
+#include <stdio.h>
+#include <math.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#define ASSERT assert // RTree uses ASSERT( condition )
+#ifndef Min
+  #define Min std::min
+#endif //Min
+#ifndef Max
+  #define Max std::max
+#endif //Max
+
+//
+// RTree.h
+//
+
+#define RTREE_TEMPLATE template<class DATATYPE, class ELEMTYPE, int NUMDIMS, class ELEMTYPEREAL, int TMAXNODES, int TMINNODES>
+#define RTREE_QUAL RTree<DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES>
+
+#define RTREE_DONT_USE_MEMPOOLS // This version does not contain a fixed memory allocator, fill in lines with EXAMPLE to implement one.
+#define RTREE_USE_SPHERICAL_VOLUME // Better split classification, may be slower on some systems
+
+// Fwd decl
+class RTFileStream;  // File I/O helper class, look below for implementation and notes.
+
+
+/// \class RTree
+/// Implementation of RTree, a multidimensional bounding rectangle tree.
+/// Example usage: For a 3-dimensional tree use RTree<Object*, float, 3> myTree;
+///
+/// This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com)
+///
+/// DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof<void*> and simple type
+/// ELEMTYPE Type of element such as int or float
+/// NUMDIMS Number of dimensions such as 2 or 3
+/// ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs
+///
+/// NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle.
+///        This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency.
+///        Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory
+///        array similar to MFC CArray or STL Vector for returning search query result.
+///
+template<class DATATYPE, class ELEMTYPE, int NUMDIMS,
+         class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
+class RTree
+{
+protected:
+
+  struct Node;  // Fwd decl.  Used by other internal structs and iterator
+
+public:
+
+  // These constant must be declared after Branch and before Node struct
+  // Stuck up here for MSVC 6 compiler.  NSVC .NET 2003 is much happier.
+  enum
+  {
+    MAXNODES = TMAXNODES,                         ///< Max elements in node
+    MINNODES = TMINNODES,                         ///< Min elements in node
+  };
+
+
+public:
+
+  RTree();
+  virtual ~RTree();
+
+  /// Insert entry
+  /// \param a_min Min of bounding rect
+  /// \param a_max Max of bounding rect
+  /// \param a_dataId Positive Id of data.  Maybe zero, but negative numbers not allowed.
+  void Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
+
+  /// Remove entry
+  /// \param a_min Min of bounding rect
+  /// \param a_max Max of bounding rect
+  /// \param a_dataId Positive Id of data.  Maybe zero, but negative numbers not allowed.
+  void Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
+
+  /// Find all within search rectangle
+  /// \param a_min Min of search bounding rect
+  /// \param a_max Max of search bounding rect
+  /// \param a_resultCallback Callback function to return result.  Callback should return 'true' to continue searching
+  /// \param a_context User context to pass as parameter to a_resultCallback
+  /// \return Returns the number of entries found
+  int Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context);
+
+  /// Remove all entries from tree
+  void RemoveAll();
+
+  /// Count the data elements in this container.  This is slow as no internal counter is maintained.
+  int Count();
+
+  /// Load tree contents from file
+  bool Load(const char* a_fileName);
+  /// Load tree contents from stream
+  bool Load(RTFileStream& a_stream);
+
+
+  /// Save tree contents to file
+  bool Save(const char* a_fileName);
+  /// Save tree contents to stream
+  bool Save(RTFileStream& a_stream);
+
+  /// Iterator is not remove safe.
+  class Iterator
+  {
+  private:
+
+    enum { MAX_STACK = 32 }; //  Max stack size. Allows almost n^32 where n is number of branches in node
+
+    struct StackElement
+    {
+      Node* m_node;
+      int m_branchIndex;
+    };
+
+  public:
+
+    Iterator()                                    { Init(); }
+
+    ~Iterator()                                   { }
+
+    /// Is iterator invalid
+    bool IsNull()                                 { return (m_tos <= 0); }
+
+    /// Is iterator pointing to valid data
+    bool IsNotNull()                              { return (m_tos > 0); }
+
+    /// Access the current data element. Caller must be sure iterator is not NULL first.
+    DATATYPE& operator*()
+    {
+      ASSERT(IsNotNull());
+      StackElement& curTos = m_stack[m_tos - 1];
+      return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
+    }
+
+    /// Access the current data element. Caller must be sure iterator is not NULL first.
+    const DATATYPE& operator*() const
+    {
+      ASSERT(IsNotNull());
+      StackElement& curTos = m_stack[m_tos - 1];
+      return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
+    }
+
+    /// Find the next data element
+    bool operator++()                             { return FindNextData(); }
+
+    /// Get the bounds for this node
+    void GetBounds(ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS])
+    {
+      ASSERT(IsNotNull());
+      StackElement& curTos = m_stack[m_tos - 1];
+      Branch& curBranch = curTos.m_node->m_branch[curTos.m_branchIndex];
+
+      for(int index = 0; index < NUMDIMS; ++index)
+      {
+        a_min[index] = curBranch.m_rect.m_min[index];
+        a_max[index] = curBranch.m_rect.m_max[index];
+      }
+    }
+
+  private:
+
+    /// Reset iterator
+    void Init()                                   { m_tos = 0; }
+
+    /// Find the next data element in the tree (For internal use only)
+    bool FindNextData()
+    {
+      for(;;)
+      {
+        if(m_tos <= 0)
+        {
+          return false;
+        }
+        StackElement curTos = Pop(); // Copy stack top cause it may change as we use it
+
+        if(curTos.m_node->IsLeaf())
+        {
+          // Keep walking through data while we can
+          if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
+          {
+            // There is more data, just point to the next one
+            Push(curTos.m_node, curTos.m_branchIndex + 1);
+            return true;
+          }
+          // No more data, so it will fall back to previous level
+        }
+        else
+        {
+          if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
+          {
+            // Push sibling on for future tree walk
+            // This is the 'fall back' node when we finish with the current level
+            Push(curTos.m_node, curTos.m_branchIndex + 1);
+          }
+          // Since cur node is not a leaf, push first of next level to get deeper into the tree
+          Node* nextLevelnode = curTos.m_node->m_branch[curTos.m_branchIndex].m_child;
+          Push(nextLevelnode, 0);
+
+          // If we pushed on a new leaf, exit as the data is ready at TOS
+          if(nextLevelnode->IsLeaf())
+          {
+            return true;
+          }
+        }
+      }
+    }
+
+    /// Push node and branch onto iteration stack (For internal use only)
+    void Push(Node* a_node, int a_branchIndex)
+    {
+      m_stack[m_tos].m_node = a_node;
+      m_stack[m_tos].m_branchIndex = a_branchIndex;
+      ++m_tos;
+      ASSERT(m_tos <= MAX_STACK);
+    }
+
+    /// Pop element off iteration stack (For internal use only)
+    StackElement& Pop()
+    {
+      ASSERT(m_tos > 0);
+      --m_tos;
+      return m_stack[m_tos];
+    }
+
+    StackElement m_stack[MAX_STACK];              ///< Stack as we are doing iteration instead of recursion
+    int m_tos;                                    ///< Top Of Stack index
+
+    friend class RTree; // Allow hiding of non-public functions while allowing manipulation by logical owner
+  };
+
+  /// Get 'first' for iteration
+  void GetFirst(Iterator& a_it)
+  {
+    a_it.Init();
+    Node* first = m_root;
+    while(first)
+    {
+      if(first->IsInternalNode() && first->m_count > 1)
+      {
+        a_it.Push(first, 1); // Descend sibling branch later
+      }
+      else if(first->IsLeaf())
+      {
+        if(first->m_count)
+        {
+          a_it.Push(first, 0);
+        }
+        break;
+      }
+      first = first->m_branch[0].m_child;
+    }
+  }
+
+  /// Get Next for iteration
+  void GetNext(Iterator& a_it)                    { ++a_it; }
+
+  /// Is iterator NULL, or at end?
+  bool IsNull(Iterator& a_it)                     { return a_it.IsNull(); }
+
+  /// Get object at iterator position
+  DATATYPE& GetAt(Iterator& a_it)                 { return *a_it; }
+
+protected:
+
+  /// Minimal bounding rectangle (n-dimensional)
+  struct Rect
+  {
+    ELEMTYPE m_min[NUMDIMS];                      ///< Min dimensions of bounding box
+    ELEMTYPE m_max[NUMDIMS];                      ///< Max dimensions of bounding box
+  };
+
+  /// May be data or may be another subtree
+  /// The parents level determines this.
+  /// If the parents level is 0, then this is data
+  struct Branch
+  {
+    Rect m_rect;                                  ///< Bounds
+    union
+    {
+      Node* m_child;                              ///< Child node
+      DATATYPE m_data;                            ///< Data Id or Ptr
+    };
+  };
+
+  /// Node for each branch level
+  struct Node
+  {
+    bool IsInternalNode()                         { return (m_level > 0); } // Not a leaf, but a internal node
+    bool IsLeaf()                                 { return (m_level == 0); } // A leaf, contains data
+
+    int m_count;                                  ///< Count
+    int m_level;                                  ///< Leaf is zero, others positive
+    Branch m_branch[MAXNODES];                    ///< Branch
+  };
+
+  /// A link list of nodes for reinsertion after a delete operation
+  struct ListNode
+  {
+    ListNode* m_next;                             ///< Next in list
+    Node* m_node;                                 ///< Node
+  };
+
+  /// Variables for finding a split partition
+  struct PartitionVars
+  {
+    int m_partition[MAXNODES+1];
+    int m_total;
+    int m_minFill;
+    int m_taken[MAXNODES+1];
+    int m_count[2];
+    Rect m_cover[2];
+    ELEMTYPEREAL m_area[2];
+
+    Branch m_branchBuf[MAXNODES+1];
+    int m_branchCount;
+    Rect m_coverSplit;
+    ELEMTYPEREAL m_coverSplitArea;
+  };
+
+  Node* AllocNode();
+  void FreeNode(Node* a_node);
+  void InitNode(Node* a_node);
+  void InitRect(Rect* a_rect);
+  bool InsertRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, Node** a_newNode, int a_level);
+  bool InsertRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level);
+  Rect NodeCover(Node* a_node);
+  bool AddBranch(Branch* a_branch, Node* a_node, Node** a_newNode);
+  void DisconnectBranch(Node* a_node, int a_index);
+  int PickBranch(Rect* a_rect, Node* a_node);
+  Rect CombineRect(Rect* a_rectA, Rect* a_rectB);
+  void SplitNode(Node* a_node, Branch* a_branch, Node** a_newNode);
+  ELEMTYPEREAL RectSphericalVolume(Rect* a_rect);
+  ELEMTYPEREAL RectVolume(Rect* a_rect);
+  ELEMTYPEREAL CalcRectVolume(Rect* a_rect);
+  void GetBranches(Node* a_node, Branch* a_branch, PartitionVars* a_parVars);
+  void ChoosePartition(PartitionVars* a_parVars, int a_minFill);
+  void LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars);
+  void InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill);
+  void PickSeeds(PartitionVars* a_parVars);
+  void Classify(int a_index, int a_group, PartitionVars* a_parVars);
+  bool RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root);
+  bool RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode);
+  ListNode* AllocListNode();
+  void FreeListNode(ListNode* a_listNode);
+  bool Overlap(Rect* a_rectA, Rect* a_rectB);
+  void ReInsert(Node* a_node, ListNode** a_listNode);
+  bool Search(Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context);
+  void RemoveAllRec(Node* a_node);
+  void Reset();
+  void CountRec(Node* a_node, int& a_count);
+
+  bool SaveRec(Node* a_node, RTFileStream& a_stream);
+  bool LoadRec(Node* a_node, RTFileStream& a_stream);
+
+  Node* m_root;                                    ///< Root of tree
+  ELEMTYPEREAL m_unitSphereVolume;                 ///< Unit sphere constant for required number of dimensions
+};
+
+
+// Because there is not stream support, this is a quick and dirty file I/O helper.
+// Users will likely replace its usage with a Stream implementation from their favorite API.
+class RTFileStream
+{
+  FILE* m_file;
+
+public:
+
+
+  RTFileStream()
+  {
+    m_file = NULL;
+  }
+
+  ~RTFileStream()
+  {
+    Close();
+  }
+
+  bool OpenRead(const char* a_fileName)
+  {
+    m_file = fopen(a_fileName, "rb");
+    if(!m_file)
+    {
+      return false;
+    }
+    return true;
+  }
+
+  bool OpenWrite(const char* a_fileName)
+  {
+    m_file = fopen(a_fileName, "wb");
+    if(!m_file)
+    {
+      return false;
+    }
+    return true;
+  }
+
+  void Close()
+  {
+    if(m_file)
+    {
+      fclose(m_file);
+      m_file = NULL;
+    }
+  }
+
+  template< typename TYPE >
+  size_t Write(const TYPE& a_value)
+  {
+    ASSERT(m_file);
+    return fwrite((void*)&a_value, sizeof(a_value), 1, m_file);
+  }
+
+  template< typename TYPE >
+  size_t WriteArray(const TYPE* a_array, int a_count)
+  {
+    ASSERT(m_file);
+    return fwrite((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
+  }
+
+  template< typename TYPE >
+  size_t Read(TYPE& a_value)
+  {
+    ASSERT(m_file);
+    return fread((void*)&a_value, sizeof(a_value), 1, m_file);
+  }
+
+  template< typename TYPE >
+  size_t ReadArray(TYPE* a_array, int a_count)
+  {
+    ASSERT(m_file);
+    return fread((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
+  }
+};
+
+
+RTREE_TEMPLATE
+RTREE_QUAL::RTree()
+{
+  ASSERT(MAXNODES > MINNODES);
+  ASSERT(MINNODES > 0);
+
+
+  // We only support machine word size simple data type eg. integer index or object pointer.
+  // Since we are storing as union with non data branch
+  ASSERT(sizeof(DATATYPE) == sizeof(void*) || sizeof(DATATYPE) == sizeof(int));
+
+  // Precomputed volumes of the unit spheres for the first few dimensions
+  const float UNIT_SPHERE_VOLUMES[] = {
+    0.000000f, 2.000000f, 3.141593f, // Dimension  0,1,2
+    4.188790f, 4.934802f, 5.263789f, // Dimension  3,4,5
+    5.167713f, 4.724766f, 4.058712f, // Dimension  6,7,8
+    3.298509f, 2.550164f, 1.884104f, // Dimension  9,10,11
+    1.335263f, 0.910629f, 0.599265f, // Dimension  12,13,14
+    0.381443f, 0.235331f, 0.140981f, // Dimension  15,16,17
+    0.082146f, 0.046622f, 0.025807f, // Dimension  18,19,20
+  };
+
+  m_root = AllocNode();
+  m_root->m_level = 0;
+  m_unitSphereVolume = (ELEMTYPEREAL)UNIT_SPHERE_VOLUMES[NUMDIMS];
+}
+
+
+RTREE_TEMPLATE
+RTREE_QUAL::~RTree()
+{
+  Reset(); // Free, or reset node memory
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
+{
+#ifdef _DEBUG
+  for(int index=0; index<NUMDIMS; ++index)
+  {
+    ASSERT(a_min[index] <= a_max[index]);
+  }
+#endif //_DEBUG
+
+  Rect rect;
+
+  for(int axis=0; axis<NUMDIMS; ++axis)
+  {
+    rect.m_min[axis] = a_min[axis];
+    rect.m_max[axis] = a_max[axis];
+  }
+
+  InsertRect(&rect, a_dataId, &m_root, 0);
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
+{
+#ifdef _DEBUG
+  for(int index=0; index<NUMDIMS; ++index)
+  {
+    ASSERT(a_min[index] <= a_max[index]);
+  }
+#endif //_DEBUG
+
+  Rect rect;
+
+  for(int axis=0; axis<NUMDIMS; ++axis)
+  {
+    rect.m_min[axis] = a_min[axis];
+    rect.m_max[axis] = a_max[axis];
+  }
+
+  RemoveRect(&rect, a_dataId, &m_root);
+}
+
+
+RTREE_TEMPLATE
+int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context)
+{
+#ifdef _DEBUG
+  for(int index=0; index<NUMDIMS; ++index)
+  {
+    ASSERT(a_min[index] <= a_max[index]);
+  }
+#endif //_DEBUG
+
+  Rect rect;
+
+  for(int axis=0; axis<NUMDIMS; ++axis)
+  {
+    rect.m_min[axis] = a_min[axis];
+    rect.m_max[axis] = a_max[axis];
+  }
+
+  // NOTE: May want to return search result another way, perhaps returning the number of found elements here.
+
+  int foundCount = 0;
+  Search(m_root, &rect, foundCount, a_resultCallback, a_context);
+
+  return foundCount;
+}
+
+
+RTREE_TEMPLATE
+int RTREE_QUAL::Count()
+{
+  int count = 0;
+  CountRec(m_root, count);
+
+  return count;
+}
+
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::CountRec(Node* a_node, int& a_count)
+{
+  if(a_node->IsInternalNode())  // not a leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      CountRec(a_node->m_branch[index].m_child, a_count);
+    }
+  }
+  else // A leaf node
+  {
+    a_count += a_node->m_count;
+  }
+}
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::Load(const char* a_fileName)
+{
+  RemoveAll(); // Clear existing tree
+
+  RTFileStream stream;
+  if(!stream.OpenRead(a_fileName))
+  {
+    return false;
+  }
+
+  bool result = Load(stream);
+
+  stream.Close();
+
+  return result;
+};
+
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::Load(RTFileStream& a_stream)
+{
+  // Write some kind of header
+  int _dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
+  int _dataSize = sizeof(DATATYPE);
+  int _dataNumDims = NUMDIMS;
+  int _dataElemSize = sizeof(ELEMTYPE);
+  int _dataElemRealSize = sizeof(ELEMTYPEREAL);
+  int _dataMaxNodes = TMAXNODES;
+  int _dataMinNodes = TMINNODES;
+
+  int dataFileId = 0;
+  int dataSize = 0;
+  int dataNumDims = 0;
+  int dataElemSize = 0;
+  int dataElemRealSize = 0;
+  int dataMaxNodes = 0;
+  int dataMinNodes = 0;
+
+  a_stream.Read(dataFileId);
+  a_stream.Read(dataSize);
+  a_stream.Read(dataNumDims);
+  a_stream.Read(dataElemSize);
+  a_stream.Read(dataElemRealSize);
+  a_stream.Read(dataMaxNodes);
+  a_stream.Read(dataMinNodes);
+
+  bool result = false;
+
+  // Test if header was valid and compatible
+  if(    (dataFileId == _dataFileId)
+      && (dataSize == _dataSize)
+      && (dataNumDims == _dataNumDims)
+      && (dataElemSize == _dataElemSize)
+      && (dataElemRealSize == _dataElemRealSize)
+      && (dataMaxNodes == _dataMaxNodes)
+      && (dataMinNodes == _dataMinNodes)
+    )
+  {
+    // Recursively load tree
+    result = LoadRec(m_root, a_stream);
+  }
+
+  return result;
+}
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::LoadRec(Node* a_node, RTFileStream& a_stream)
+{
+  a_stream.Read(a_node->m_level);
+  a_stream.Read(a_node->m_count);
+
+  if(a_node->IsInternalNode())  // not a leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      Branch* curBranch = &a_node->m_branch[index];
+
+      a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
+      a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
+
+      curBranch->m_child = AllocNode();
+      LoadRec(curBranch->m_child, a_stream);
+    }
+  }
+  else // A leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      Branch* curBranch = &a_node->m_branch[index];
+
+      a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
+      a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
+
+      a_stream.Read(curBranch->m_data);
+    }
+  }
+
+  return true; // Should do more error checking on I/O operations
+}
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::Save(const char* a_fileName)
+{
+  RTFileStream stream;
+  if(!stream.OpenWrite(a_fileName))
+  {
+    return false;
+  }
+
+  bool result = Save(stream);
+
+  stream.Close();
+
+  return result;
+}
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::Save(RTFileStream& a_stream)
+{
+  // Write some kind of header
+  int dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
+  int dataSize = sizeof(DATATYPE);
+  int dataNumDims = NUMDIMS;
+  int dataElemSize = sizeof(ELEMTYPE);
+  int dataElemRealSize = sizeof(ELEMTYPEREAL);
+  int dataMaxNodes = TMAXNODES;
+  int dataMinNodes = TMINNODES;
+
+  a_stream.Write(dataFileId);
+  a_stream.Write(dataSize);
+  a_stream.Write(dataNumDims);
+  a_stream.Write(dataElemSize);
+  a_stream.Write(dataElemRealSize);
+  a_stream.Write(dataMaxNodes);
+  a_stream.Write(dataMinNodes);
+
+  // Recursively save tree
+  bool result = SaveRec(m_root, a_stream);
+
+  return result;
+}
+
+
+RTREE_TEMPLATE
+bool RTREE_QUAL::SaveRec(Node* a_node, RTFileStream& a_stream)
+{
+  a_stream.Write(a_node->m_level);
+  a_stream.Write(a_node->m_count);
+
+  if(a_node->IsInternalNode())  // not a leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      Branch* curBranch = &a_node->m_branch[index];
+
+      a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
+      a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
+
+      SaveRec(curBranch->m_child, a_stream);
+    }
+  }
+  else // A leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      Branch* curBranch = &a_node->m_branch[index];
+
+      a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
+      a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
+
+      a_stream.Write(curBranch->m_data);
+    }
+  }
+
+  return true; // Should do more error checking on I/O operations
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::RemoveAll()
+{
+  // Delete all existing nodes
+  Reset();
+
+  m_root = AllocNode();
+  m_root->m_level = 0;
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::Reset()
+{
+#ifdef RTREE_DONT_USE_MEMPOOLS
+  // Delete all existing nodes
+  RemoveAllRec(m_root);
+#else // RTREE_DONT_USE_MEMPOOLS
+  // Just reset memory pools.  We are not using complex types
+  // EXAMPLE
+#endif // RTREE_DONT_USE_MEMPOOLS
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::RemoveAllRec(Node* a_node)
+{
+  ASSERT(a_node);
+  ASSERT(a_node->m_level >= 0);
+
+  if(a_node->IsInternalNode()) // This is an internal node in the tree
+  {
+    for(int index=0; index < a_node->m_count; ++index)
+    {
+      RemoveAllRec(a_node->m_branch[index].m_child);
+    }
+  }
+  FreeNode(a_node);
+}
+
+
+RTREE_TEMPLATE
+typename RTREE_QUAL::Node* RTREE_QUAL::AllocNode()
+{
+  Node* newNode;
+#ifdef RTREE_DONT_USE_MEMPOOLS
+  newNode = new Node;
+#else // RTREE_DONT_USE_MEMPOOLS
+  // EXAMPLE
+#endif // RTREE_DONT_USE_MEMPOOLS
+  InitNode(newNode);
+  return newNode;
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::FreeNode(Node* a_node)
+{
+  ASSERT(a_node);
+
+#ifdef RTREE_DONT_USE_MEMPOOLS
+  delete a_node;
+#else // RTREE_DONT_USE_MEMPOOLS
+  // EXAMPLE
+#endif // RTREE_DONT_USE_MEMPOOLS
+}
+
+
+// Allocate space for a node in the list used in DeletRect to
+// store Nodes that are too empty.
+RTREE_TEMPLATE
+typename RTREE_QUAL::ListNode* RTREE_QUAL::AllocListNode()
+{
+#ifdef RTREE_DONT_USE_MEMPOOLS
+  return new ListNode;
+#else // RTREE_DONT_USE_MEMPOOLS
+  // EXAMPLE
+#endif // RTREE_DONT_USE_MEMPOOLS
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::FreeListNode(ListNode* a_listNode)
+{
+#ifdef RTREE_DONT_USE_MEMPOOLS
+  delete a_listNode;
+#else // RTREE_DONT_USE_MEMPOOLS
+  // EXAMPLE
+#endif // RTREE_DONT_USE_MEMPOOLS
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::InitNode(Node* a_node)
+{
+  a_node->m_count = 0;
+  a_node->m_level = -1;
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::InitRect(Rect* a_rect)
+{
+  for(int index = 0; index < NUMDIMS; ++index)
+  {
+    a_rect->m_min[index] = (ELEMTYPE)0;
+    a_rect->m_max[index] = (ELEMTYPE)0;
+  }
+}
+
+
+// Inserts a new data rectangle into the index structure.
+// Recursively descends tree, propagates splits back up.
+// Returns 0 if node was not split.  Old node updated.
+// If node was split, returns 1 and sets the pointer pointed to by
+// new_node to point to the new node.  Old node updated to become one of two.
+// The level argument specifies the number of steps up from the leaf
+// level to insert; e.g. a data rectangle goes in at level = 0.
+RTREE_TEMPLATE
+bool RTREE_QUAL::InsertRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, Node** a_newNode, int a_level)
+{
+  ASSERT(a_rect && a_node && a_newNode);
+  ASSERT(a_level >= 0 && a_level <= a_node->m_level);
+
+  int index;
+  Branch branch;
+  Node* otherNode;
+
+  // Still above level for insertion, go down tree recursively
+  if(a_node->m_level > a_level)
+  {
+    index = PickBranch(a_rect, a_node);
+    if (!InsertRectRec(a_rect, a_id, a_node->m_branch[index].m_child, &otherNode, a_level))
+    {
+      // Child was not split
+      a_node->m_branch[index].m_rect = CombineRect(a_rect, &(a_node->m_branch[index].m_rect));
+      return false;
+    }
+    else // Child was split
+    {
+      a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
+      branch.m_child = otherNode;
+      branch.m_rect = NodeCover(otherNode);
+      return AddBranch(&branch, a_node, a_newNode);
+    }
+  }
+  else if(a_node->m_level == a_level) // Have reached level for insertion. Add rect, split if necessary
+  {
+    branch.m_rect = *a_rect;
+    branch.m_child = (Node*) a_id;
+    // Child field of leaves contains id of data record
+    return AddBranch(&branch, a_node, a_newNode);
+  }
+  else
+  {
+    // Should never occur
+    ASSERT(0);
+    return false;
+  }
+}
+
+
+// Insert a data rectangle into an index structure.
+// InsertRect provides for splitting the root;
+// returns 1 if root was split, 0 if it was not.
+// The level argument specifies the number of steps up from the leaf
+// level to insert; e.g. a data rectangle goes in at level = 0.
+// InsertRect2 does the recursion.
+//
+RTREE_TEMPLATE
+bool RTREE_QUAL::InsertRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level)
+{
+  ASSERT(a_rect && a_root);
+  ASSERT(a_level >= 0 && a_level <= (*a_root)->m_level);
+#ifdef _DEBUG
+  for(int index=0; index < NUMDIMS; ++index)
+  {
+    ASSERT(a_rect->m_min[index] <= a_rect->m_max[index]);
+  }
+#endif //_DEBUG
+
+  Node* newRoot;
+  Node* newNode;
+  Branch branch;
+
+  if(InsertRectRec(a_rect, a_id, *a_root, &newNode, a_level))  // Root split
+  {
+    newRoot = AllocNode();  // Grow tree taller and new root
+    newRoot->m_level = (*a_root)->m_level + 1;
+    branch.m_rect = NodeCover(*a_root);
+    branch.m_child = *a_root;
+    AddBranch(&branch, newRoot, NULL);
+    branch.m_rect = NodeCover(newNode);
+    branch.m_child = newNode;
+    AddBranch(&branch, newRoot, NULL);
+    *a_root = newRoot;
+    return true;
+  }
+
+  return false;
+}
+
+
+// Find the smallest rectangle that includes all rectangles in branches of a node.
+RTREE_TEMPLATE
+typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover(Node* a_node)
+{
+  ASSERT(a_node);
+
+  int firstTime = true;
+  Rect rect;
+  InitRect(&rect);
+
+  for(int index = 0; index < a_node->m_count; ++index)
+  {
+    if(firstTime)
+    {
+      rect = a_node->m_branch[index].m_rect;
+      firstTime = false;
+    }
+    else
+    {
+      rect = CombineRect(&rect, &(a_node->m_branch[index].m_rect));
+    }
+  }
+
+  return rect;
+}
+
+
+// Add a branch to a node.  Split the node if necessary.
+// Returns 0 if node not split.  Old node updated.
+// Returns 1 if node split, sets *new_node to address of new node.
+// Old node updated, becomes one of two.
+RTREE_TEMPLATE
+bool RTREE_QUAL::AddBranch(Branch* a_branch, Node* a_node, Node** a_newNode)
+{
+  ASSERT(a_branch);
+  ASSERT(a_node);
+
+  if(a_node->m_count < MAXNODES)  // Split won't be necessary
+  {
+    a_node->m_branch[a_node->m_count] = *a_branch;
+    ++a_node->m_count;
+
+    return false;
+  }
+  else
+  {
+    ASSERT(a_newNode);
+
+    SplitNode(a_node, a_branch, a_newNode);
+    return true;
+  }
+}
+
+
+// Disconnect a dependent node.
+// Caller must return (or stop using iteration index) after this as count has changed
+RTREE_TEMPLATE
+void RTREE_QUAL::DisconnectBranch(Node* a_node, int a_index)
+{
+  ASSERT(a_node && (a_index >= 0) && (a_index < MAXNODES));
+  ASSERT(a_node->m_count > 0);
+
+  // Remove element by swapping with the last element to prevent gaps in array
+  a_node->m_branch[a_index] = a_node->m_branch[a_node->m_count - 1];
+
+  --a_node->m_count;
+}
+
+
+// Pick a branch.  Pick the one that will need the smallest increase
+// in area to accomodate the new rectangle.  This will result in the
+// least total area for the covering rectangles in the current node.
+// In case of a tie, pick the one which was smaller before, to get
+// the best resolution when searching.
+RTREE_TEMPLATE
+int RTREE_QUAL::PickBranch(Rect* a_rect, Node* a_node)
+{
+  ASSERT(a_rect && a_node);
+
+  bool firstTime = true;
+  ELEMTYPEREAL increase;
+  ELEMTYPEREAL bestIncr = (ELEMTYPEREAL)-1;
+  ELEMTYPEREAL area;
+  ELEMTYPEREAL bestArea = (ELEMTYPEREAL)-1;
+  int best = -1;
+  Rect tempRect;
+
+  for(int index=0; index < a_node->m_count; ++index)
+  {
+    Rect* curRect = &a_node->m_branch[index].m_rect;
+    area = CalcRectVolume(curRect);
+    tempRect = CombineRect(a_rect, curRect);
+    increase = CalcRectVolume(&tempRect) - area;
+    if((increase < bestIncr) || firstTime)
+    {
+      best = index;
+      bestArea = area;
+      bestIncr = increase;
+      firstTime = false;
+    }
+    else if((increase == bestIncr) && (area < bestArea))
+    {
+      best = index;
+      bestArea = area;
+      bestIncr = increase;
+    }
+  }
+  return best;
+}
+
+
+// Combine two rectangles into larger one containing both
+RTREE_TEMPLATE
+typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB)
+{
+  ASSERT(a_rectA && a_rectB);
+
+  Rect newRect;
+
+  for(int index = 0; index < NUMDIMS; ++index)
+  {
+    newRect.m_min[index] = Min(a_rectA->m_min[index], a_rectB->m_min[index]);
+    newRect.m_max[index] = Max(a_rectA->m_max[index], a_rectB->m_max[index]);
+  }
+
+  return newRect;
+}
+
+
+
+// Split a node.
+// Divides the nodes branches and the extra one between two nodes.
+// Old node is one of the new ones, and one really new one is created.
+// Tries more than one method for choosing a partition, uses best result.
+RTREE_TEMPLATE
+void RTREE_QUAL::SplitNode(Node* a_node, Branch* a_branch, Node** a_newNode)
+{
+  ASSERT(a_node);
+  ASSERT(a_branch);
+
+  // Could just use local here, but member or external is faster since it is reused
+  PartitionVars localVars;
+  PartitionVars* parVars = &localVars;
+  int level;
+
+  // Load all the branches into a buffer, initialize old node
+  level = a_node->m_level;
+  GetBranches(a_node, a_branch, parVars);
+
+  // Find partition
+  ChoosePartition(parVars, MINNODES);
+
+  // Put branches from buffer into 2 nodes according to chosen partition
+  *a_newNode = AllocNode();
+  (*a_newNode)->m_level = a_node->m_level = level;
+  LoadNodes(a_node, *a_newNode, parVars);
+
+  ASSERT((a_node->m_count + (*a_newNode)->m_count) == parVars->m_total);
+}
+
+
+// Calculate the n-dimensional volume of a rectangle
+RTREE_TEMPLATE
+ELEMTYPEREAL RTREE_QUAL::RectVolume(Rect* a_rect)
+{
+  ASSERT(a_rect);
+
+  ELEMTYPEREAL volume = (ELEMTYPEREAL)1;
+
+  for(int index=0; index<NUMDIMS; ++index)
+  {
+    volume *= a_rect->m_max[index] - a_rect->m_min[index];
+  }
+
+  ASSERT(volume >= (ELEMTYPEREAL)0);
+
+  return volume;
+}
+
+
+// The exact volume of the bounding sphere for the given Rect
+RTREE_TEMPLATE
+ELEMTYPEREAL RTREE_QUAL::RectSphericalVolume(Rect* a_rect)
+{
+  ASSERT(a_rect);
+
+  ELEMTYPEREAL sumOfSquares = (ELEMTYPEREAL)0;
+  ELEMTYPEREAL radius;
+
+  for(int index=0; index < NUMDIMS; ++index)
+  {
+    ELEMTYPEREAL halfExtent = ((ELEMTYPEREAL)a_rect->m_max[index] - (ELEMTYPEREAL)a_rect->m_min[index]) * 0.5f;
+    sumOfSquares += halfExtent * halfExtent;
+  }
+
+  radius = (ELEMTYPEREAL)sqrt(sumOfSquares);
+
+  // Pow maybe slow, so test for common dims like 2,3 and just use x*x, x*x*x.
+  if(NUMDIMS == 3)
+  {
+    return (radius * radius * radius * m_unitSphereVolume);
+  }
+  else if(NUMDIMS == 2)
+  {
+    return (radius * radius * m_unitSphereVolume);
+  }
+  else
+  {
+    return (ELEMTYPEREAL)(pow(radius, NUMDIMS) * m_unitSphereVolume);
+  }
+}
+
+
+// Use one of the methods to calculate retangle volume
+RTREE_TEMPLATE
+ELEMTYPEREAL RTREE_QUAL::CalcRectVolume(Rect* a_rect)
+{
+#ifdef RTREE_USE_SPHERICAL_VOLUME
+  return RectSphericalVolume(a_rect); // Slower but helps certain merge cases
+#else // RTREE_USE_SPHERICAL_VOLUME
+  return RectVolume(a_rect); // Faster but can cause poor merges
+#endif // RTREE_USE_SPHERICAL_VOLUME
+}
+
+
+// Load branch buffer with branches from full node plus the extra branch.
+RTREE_TEMPLATE
+void RTREE_QUAL::GetBranches(Node* a_node, Branch* a_branch, PartitionVars* a_parVars)
+{
+  ASSERT(a_node);
+  ASSERT(a_branch);
+
+  ASSERT(a_node->m_count == MAXNODES);
+
+  // Load the branch buffer
+  for(int index=0; index < MAXNODES; ++index)
+  {
+    a_parVars->m_branchBuf[index] = a_node->m_branch[index];
+  }
+  a_parVars->m_branchBuf[MAXNODES] = *a_branch;
+  a_parVars->m_branchCount = MAXNODES + 1;
+
+  // Calculate rect containing all in the set
+  a_parVars->m_coverSplit = a_parVars->m_branchBuf[0].m_rect;
+  for(int index=1; index < MAXNODES+1; ++index)
+  {
+    a_parVars->m_coverSplit = CombineRect(&a_parVars->m_coverSplit, &a_parVars->m_branchBuf[index].m_rect);
+  }
+  a_parVars->m_coverSplitArea = CalcRectVolume(&a_parVars->m_coverSplit);
+
+  InitNode(a_node);
+}
+
+
+// Method #0 for choosing a partition:
+// As the seeds for the two groups, pick the two rects that would waste the
+// most area if covered by a single rectangle, i.e. evidently the worst pair
+// to have in the same group.
+// Of the remaining, one at a time is chosen to be put in one of the two groups.
+// The one chosen is the one with the greatest difference in area expansion
+// depending on which group - the rect most strongly attracted to one group
+// and repelled from the other.
+// If one group gets too full (more would force other group to violate min
+// fill requirement) then other group gets the rest.
+// These last are the ones that can go in either group most easily.
+RTREE_TEMPLATE
+void RTREE_QUAL::ChoosePartition(PartitionVars* a_parVars, int a_minFill)
+{
+  ASSERT(a_parVars);
+
+  ELEMTYPEREAL biggestDiff;
+  int group, chosen = -1, betterGroup = -1;
+
+  InitParVars(a_parVars, a_parVars->m_branchCount, a_minFill);
+  PickSeeds(a_parVars);
+
+  while (((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
+       && (a_parVars->m_count[0] < (a_parVars->m_total - a_parVars->m_minFill))
+       && (a_parVars->m_count[1] < (a_parVars->m_total - a_parVars->m_minFill)))
+  {
+    biggestDiff = (ELEMTYPEREAL) -1;
+    for(int index=0; index<a_parVars->m_total; ++index)
+    {
+      if(!a_parVars->m_taken[index])
+      {
+        Rect* curRect = &a_parVars->m_branchBuf[index].m_rect;
+        Rect rect0 = CombineRect(curRect, &a_parVars->m_cover[0]);
+        Rect rect1 = CombineRect(curRect, &a_parVars->m_cover[1]);
+        ELEMTYPEREAL growth0 = CalcRectVolume(&rect0) - a_parVars->m_area[0];
+        ELEMTYPEREAL growth1 = CalcRectVolume(&rect1) - a_parVars->m_area[1];
+        ELEMTYPEREAL diff = growth1 - growth0;
+        if(diff >= 0)
+        {
+          group = 0;
+        }
+        else
+        {
+          group = 1;
+          diff = -diff;
+        }
+
+        if(diff > biggestDiff)
+        {
+          biggestDiff = diff;
+          chosen = index;
+          betterGroup = group;
+        }
+        else if((diff == biggestDiff) && (a_parVars->m_count[group] < a_parVars->m_count[betterGroup]))
+        {
+          chosen = index;
+          betterGroup = group;
+        }
+      }
+    }
+    Classify(chosen, betterGroup, a_parVars);
+  }
+
+  // If one group too full, put remaining rects in the other
+  if((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
+  {
+    if(a_parVars->m_count[0] >= a_parVars->m_total - a_parVars->m_minFill)
+    {
+      group = 1;
+    }
+    else
+    {
+      group = 0;
+    }
+    for(int index=0; index<a_parVars->m_total; ++index)
+    {
+      if(!a_parVars->m_taken[index])
+      {
+        Classify(index, group, a_parVars);
+      }
+    }
+  }
+
+  ASSERT((a_parVars->m_count[0] + a_parVars->m_count[1]) == a_parVars->m_total);
+  ASSERT((a_parVars->m_count[0] >= a_parVars->m_minFill) &&
+        (a_parVars->m_count[1] >= a_parVars->m_minFill));
+}
+
+
+// Copy branches from the buffer into two nodes according to the partition.
+RTREE_TEMPLATE
+void RTREE_QUAL::LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars)
+{
+  ASSERT(a_nodeA);
+  ASSERT(a_nodeB);
+  ASSERT(a_parVars);
+
+  for(int index=0; index < a_parVars->m_total; ++index)
+  {
+    ASSERT(a_parVars->m_partition[index] == 0 || a_parVars->m_partition[index] == 1);
+
+    if(a_parVars->m_partition[index] == 0)
+    {
+      AddBranch(&a_parVars->m_branchBuf[index], a_nodeA, NULL);
+    }
+    else if(a_parVars->m_partition[index] == 1)
+    {
+      AddBranch(&a_parVars->m_branchBuf[index], a_nodeB, NULL);
+    }
+  }
+}
+
+
+// Initialize a PartitionVars structure.
+RTREE_TEMPLATE
+void RTREE_QUAL::InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill)
+{
+  ASSERT(a_parVars);
+
+  a_parVars->m_count[0] = a_parVars->m_count[1] = 0;
+  a_parVars->m_area[0] = a_parVars->m_area[1] = (ELEMTYPEREAL)0;
+  a_parVars->m_total = a_maxRects;
+  a_parVars->m_minFill = a_minFill;
+  for(int index=0; index < a_maxRects; ++index)
+  {
+    a_parVars->m_taken[index] = false;
+    a_parVars->m_partition[index] = -1;
+  }
+}
+
+
+RTREE_TEMPLATE
+void RTREE_QUAL::PickSeeds(PartitionVars* a_parVars)
+{
+  int seed0 = -1, seed1 = -1;
+  ELEMTYPEREAL worst, waste;
+  ELEMTYPEREAL area[MAXNODES+1];
+
+  for(int index=0; index<a_parVars->m_total; ++index)
+  {
+    area[index] = CalcRectVolume(&a_parVars->m_branchBuf[index].m_rect);
+  }
+
+  worst = -a_parVars->m_coverSplitArea - 1;
+  for(int indexA=0; indexA < a_parVars->m_total-1; ++indexA)
+  {
+    for(int indexB = indexA+1; indexB < a_parVars->m_total; ++indexB)
+    {
+      Rect oneRect = CombineRect(&a_parVars->m_branchBuf[indexA].m_rect, &a_parVars->m_branchBuf[indexB].m_rect);
+      waste = CalcRectVolume(&oneRect) - area[indexA] - area[indexB];
+      if(waste > worst)
+      {
+        worst = waste;
+        seed0 = indexA;
+        seed1 = indexB;
+      }
+    }
+  }
+  Classify(seed0, 0, a_parVars);
+  Classify(seed1, 1, a_parVars);
+}
+
+
+// Put a branch in one of the groups.
+RTREE_TEMPLATE
+void RTREE_QUAL::Classify(int a_index, int a_group, PartitionVars* a_parVars)
+{
+  ASSERT(a_parVars);
+  ASSERT(!a_parVars->m_taken[a_index]);
+
+  a_parVars->m_partition[a_index] = a_group;
+  a_parVars->m_taken[a_index] = true;
+
+  if (a_parVars->m_count[a_group] == 0)
+  {
+    a_parVars->m_cover[a_group] = a_parVars->m_branchBuf[a_index].m_rect;
+  }
+  else
+  {
+    a_parVars->m_cover[a_group] = CombineRect(&a_parVars->m_branchBuf[a_index].m_rect, &a_parVars->m_cover[a_group]);
+  }
+  a_parVars->m_area[a_group] = CalcRectVolume(&a_parVars->m_cover[a_group]);
+  ++a_parVars->m_count[a_group];
+}
+
+
+// Delete a data rectangle from an index structure.
+// Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node.
+// Returns 1 if record not found, 0 if success.
+// RemoveRect provides for eliminating the root.
+RTREE_TEMPLATE
+bool RTREE_QUAL::RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root)
+{
+  ASSERT(a_rect && a_root);
+  ASSERT(*a_root);
+
+  Node* tempNode;
+  ListNode* reInsertList = NULL;
+
+  if(!RemoveRectRec(a_rect, a_id, *a_root, &reInsertList))
+  {
+    // Found and deleted a data item
+    // Reinsert any branches from eliminated nodes
+    while(reInsertList)
+    {
+      tempNode = reInsertList->m_node;
+
+      for(int index = 0; index < tempNode->m_count; ++index)
+      {
+        InsertRect(&(tempNode->m_branch[index].m_rect),
+                   tempNode->m_branch[index].m_data,
+                   a_root,
+                   tempNode->m_level);
+      }
+
+      ListNode* remLNode = reInsertList;
+      reInsertList = reInsertList->m_next;
+
+      FreeNode(remLNode->m_node);
+      FreeListNode(remLNode);
+    }
+
+    // Check for redundant root (not leaf, 1 child) and eliminate
+    if((*a_root)->m_count == 1 && (*a_root)->IsInternalNode())
+    {
+      tempNode = (*a_root)->m_branch[0].m_child;
+
+      ASSERT(tempNode);
+      FreeNode(*a_root);
+      *a_root = tempNode;
+    }
+    return false;
+  }
+  else
+  {
+    return true;
+  }
+}
+
+
+// Delete a rectangle from non-root part of an index structure.
+// Called by RemoveRect.  Descends tree recursively,
+// merges branches on the way back up.
+// Returns 1 if record not found, 0 if success.
+RTREE_TEMPLATE
+bool RTREE_QUAL::RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode)
+{
+  ASSERT(a_rect && a_node && a_listNode);
+  ASSERT(a_node->m_level >= 0);
+
+  if(a_node->IsInternalNode())  // not a leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      if(Overlap(a_rect, &(a_node->m_branch[index].m_rect)))
+      {
+        if(!RemoveRectRec(a_rect, a_id, a_node->m_branch[index].m_child, a_listNode))
+        {
+          if(a_node->m_branch[index].m_child->m_count >= MINNODES)
+          {
+            // child removed, just resize parent rect
+            a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
+          }
+          else
+          {
+            // child removed, not enough entries in node, eliminate node
+            ReInsert(a_node->m_branch[index].m_child, a_listNode);
+            DisconnectBranch(a_node, index); // Must return after this call as count has changed
+          }
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+  else // A leaf node
+  {
+    for(int index = 0; index < a_node->m_count; ++index)
+    {
+      if(a_node->m_branch[index].m_child == (Node*)a_id)
+      {
+        DisconnectBranch(a_node, index); // Must return after this call as count has changed
+        return false;
+      }
+    }
+    return true;
+  }
+}
+
+
+// Decide whether two rectangles overlap.
+RTREE_TEMPLATE
+bool RTREE_QUAL::Overlap(Rect* a_rectA, Rect* a_rectB)
+{
+  ASSERT(a_rectA && a_rectB);
+
+  for(int index=0; index < NUMDIMS; ++index)
+  {
+    if (a_rectA->m_min[index] > a_rectB->m_max[index] ||
+        a_rectB->m_min[index] > a_rectA->m_max[index])
+    {
+      return false;
+    }
+  }
+  return true;
+}
+
+
+// Add a node to the reinsertion list.  All its branches will later
+// be reinserted into the index structure.
+RTREE_TEMPLATE
+void RTREE_QUAL::ReInsert(Node* a_node, ListNode** a_listNode)
+{
+  ListNode* newListNode;
+
+  newListNode = AllocListNode();
+  newListNode->m_node = a_node;
+  newListNode->m_next = *a_listNode;
+  *a_listNode = newListNode;
+}
+
+
+// Search in an index tree or subtree for all data retangles that overlap the argument rectangle.
+RTREE_TEMPLATE
+bool RTREE_QUAL::Search(Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context)
+{
+  ASSERT(a_node);
+  ASSERT(a_node->m_level >= 0);
+  ASSERT(a_rect);
+
+  if(a_node->IsInternalNode()) // This is an internal node in the tree
+  {
+    for(int index=0; index < a_node->m_count; ++index)
+    {
+      if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
+      {
+        if(!Search(a_node->m_branch[index].m_child, a_rect, a_foundCount, a_resultCallback, a_context))
+        {
+          return false; // Don't continue searching
+        }
+      }
+    }
+  }
+  else // This is a leaf node
+  {
+    for(int index=0; index < a_node->m_count; ++index)
+    {
+      if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
+      {
+        DATATYPE& id = a_node->m_branch[index].m_data;
+
+        // NOTE: There are different ways to return results.  Here's where to modify
+        //if(&a_resultCallback)
+        {
+          ++a_foundCount;
+          if(!a_resultCallback(id, a_context))
+          {
+            return false; // Don't continue searching
+          }
+        }
+      }
+    }
+  }
+
+  return true; // Continue searching
+}
+
+
+#undef RTREE_TEMPLATE
+#undef RTREE_QUAL
+
+#endif //RTREE_H
diff --git a/Fltk/CMakeLists.txt b/Fltk/CMakeLists.txt
index e98342e..af15496 100644
--- a/Fltk/CMakeLists.txt
+++ b/Fltk/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -26,11 +26,21 @@ set(SRC
     projectionEditor.cpp
     classificationEditor.cpp
     partitionDialog.cpp
-    onelabGroup.cpp
     inputValue.cpp inputRegion.cpp
     viewButton.cpp solverButton.cpp
     Navigator.cpp
 )
+if(ENABLE_ONELAB2)
+  set(SRC
+    ${SRC}
+    onelab2Group.cpp
+  )
+else(ENABLE_ONELAB2)
+  set(SRC
+    ${SRC}
+    onelabGroup.cpp
+  )
+endif(ENABLE_ONELAB2)
 
 file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) 
 append_gmsh_src(Fltk "${SRC};${HDR}")
diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp
index a5a7cf8..d68a066 100644
--- a/Fltk/FlGui.cpp
+++ b/Fltk/FlGui.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -29,13 +29,18 @@ typedef unsigned long intptr_t;
 #include "clippingWindow.h"
 #include "manipWindow.h"
 #include "contextWindow.h"
+#ifdef HAVE_ONELAB2
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
+#endif
 #include "helpWindow.h"
 #include "colorbarWindow.h"
 #include "fileDialogs.h"
 #include "GmshDefines.h"
 #include "GmshMessage.h"
 #include "GModel.h"
+#include "OS.h"
 #include "MElement.h"
 #include "PView.h"
 #include "Field.h"
@@ -70,6 +75,19 @@ static int globalShortcut(int event)
   return FlGui::instance()->testGlobalShortcuts(event);
 }
 
+int FlGui::lock()
+{
+  _in_main_thread++;
+  Fl::lock();
+  return _in_main_thread;
+}
+
+void FlGui::unlock()
+{
+  Fl::unlock();
+  _in_main_thread--;
+}
+
 static void simple_right_box_draw(int x, int y, int w, int h, Fl_Color c)
 {
   fl_color(c); fl_rectf(x, y, w, h);
@@ -80,7 +98,6 @@ static void simple_top_box_draw(int x, int y, int w, int h, Fl_Color c)
 {
   fl_color(c); fl_rectf(x, y, w, h);
   fl_color(FL_DARK2); fl_line(x, y, x + w, y);
-  //fl_color(FL_LIGHT2); fl_line(x, y+1, x + w, y+1);
 }
 
 // Icons for the satus bar
@@ -226,6 +243,54 @@ static void fatal_error_handler(const char *fmt, ...)
   Msg::Fatal("%s (FLTK internal error)", str);
 }
 
+void FlGui::applyColorScheme()
+{
+  static int first = true;
+  int N = 4 + FL_NUM_GRAY;
+  static std::vector<unsigned char> r(N, 0), g(N, 0), b(N, 0);
+
+  if(first){
+    // store default (OS-dependent) interface colors:
+    Fl::get_system_colors();
+    Fl::get_color(FL_BACKGROUND_COLOR, r[0], g[0], b[0]);
+    Fl::get_color(FL_BACKGROUND2_COLOR, r[1], g[1], b[1]);
+    Fl::get_color(FL_FOREGROUND_COLOR, r[2], g[2], b[2]);
+    Fl::get_color(FL_SELECTION_COLOR, r[3], g[3], b[3]);
+    for (int i = 0; i < FL_NUM_GRAY; i++) {
+      Fl::get_color(fl_gray_ramp(i), r[4 + i], g[4 + i], b[4 + i]);
+    }
+  }
+
+  if(CTX::instance()->guiColorScheme == 1){ // dark mode
+    Fl::set_color(FL_BACKGROUND_COLOR, 50, 50, 50);
+    Fl::set_color(FL_BACKGROUND2_COLOR, 120, 120, 120);
+    Fl::set_color(FL_FOREGROUND_COLOR, 240, 240, 240);
+    for (int i = 0; i < FL_NUM_GRAY; i++) {
+      double min = 0., max = 135.;
+      int d = (int)(min + i * (max - min) / (FL_NUM_GRAY - 1.));
+      Fl::set_color(fl_gray_ramp(i), d, d, d);
+    }
+    if(available()) Fl::reload_scheme();
+    Fl::set_color(FL_SELECTION_COLOR, 200, 200, 200);
+    if(available()) updateViews(true, true);
+  }
+  else if(!first && available() && CTX::instance()->guiColorScheme == 0){
+    // retore default colors (only if not calling the routine from the
+    // constructor)
+    Fl::set_color(FL_BACKGROUND_COLOR, r[0], g[0], b[0]);
+    Fl::set_color(FL_BACKGROUND2_COLOR, r[1], g[1], b[1]);
+    Fl::set_color(FL_FOREGROUND_COLOR, r[2], g[2], b[2]);
+    for (int i = 0; i < FL_NUM_GRAY; i++) {
+      Fl::set_color(fl_gray_ramp(i), r[4 + i], g[4 + i], b[4 + i]);
+    }
+    Fl::reload_scheme();
+    Fl::set_color(FL_SELECTION_COLOR, r[3], g[3], b[3]);
+    updateViews(true, true);
+  }
+
+  first = false;
+}
+
 FlGui::FlGui(int argc, char **argv)
 {
   Fl::error = error_handler;
@@ -235,12 +300,9 @@ FlGui::FlGui(int argc, char **argv)
   if(CTX::instance()->display.size())
     Fl::display(CTX::instance()->display.c_str());
 
-#if 0 // dark scheme... not bad, but needs work
-  Fl::background(110, 110, 110);
-  Fl::background2(140, 140, 140);
-  Fl::foreground(230, 230, 230);
-  //Fl::set_color(FL_SELECTION_COLOR, 50, 50, 0);
-#endif
+  // apply color scheme before widget creation (noop if default color scheme is
+  // selected), so that there's no color "flashing"
+  applyColorScheme();
 
   // add new box types (dx dy dw dh)
   Fl::set_boxtype(GMSH_SIMPLE_RIGHT_BOX, simple_right_box_draw, 0, 0, 1, 0);
@@ -266,6 +328,11 @@ FlGui::FlGui(int argc, char **argv)
   Fl_Tooltip::size(FL_NORMAL_SIZE);
   Fl_Tooltip::delay(0.5);
 
+  // use retina resolution if available
+#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) && (FL_PATCH_VERSION >= 4)
+  Fl::use_high_res_GL(CTX::instance()->highResolutionGraphics);
+#endif
+
   // register image formats not in core fltk library (jpeg/png)
   fl_register_images();
 
@@ -323,6 +390,10 @@ FlGui::FlGui(int argc, char **argv)
   graph[0]->getWindow()->show(argc >0 ? 1 : 0, argv);
   if(graph[0]->getMenuWindow()) graph[0]->getMenuWindow()->show();
 
+  // re-apply color scheme (necessary for some reason to get the selection color
+  // right)
+  applyColorScheme();
+
   // graphic window should have the initial focus (so we can e.g. directly loop
   // through time steps with the keyboard)
   Fl::focus(graph[0]->gl[0]);
@@ -352,7 +423,7 @@ FlGui::FlGui(int argc, char **argv)
   fullscreen->mode(mode);
   fullscreen->end();
   fullscreen->fullscreen();
-#if not defined (__APPLE__)
+#if !defined (__APPLE__)
   fullscreen->icon(graph[0]->getWindow()->icon());
 #endif
 
@@ -372,6 +443,8 @@ FlGui::FlGui(int argc, char **argv)
   // init solver plugin stuff
   callForSolverPlugin(-1);
 
+  _in_main_thread = 0;
+
   // draw
   for(unsigned int i = 0; i < graph.size(); i++)
     for(unsigned int j = 0; j < graph[i]->gl.size(); j++)
@@ -387,6 +460,11 @@ FlGui *FlGui::instance(int argc, char **argv)
     _instance = new FlGui(argc, argv);
     // set all options in the new GUI
     InitOptionsGUI(0);
+#ifdef HAVE_ONELAB2
+    // Enable multi-thread support by locking from the main thread
+    Fl::lock();
+#endif
+
     // say welcome!
     Msg::StatusBar(false, "Gmsh %s", GetGmshVersion());
     // log the following for bug reports
@@ -397,6 +475,7 @@ FlGui *FlGui::instance(int argc, char **argv)
     Msg::Info("Build date     : %s", GetGmshBuildDate());
     Msg::Info("Build host     : %s", GetGmshBuildHost());
     Msg::Info("Packager       : %s", GetGmshPackager());
+    Msg::Info("Executable     : %s", CTX::instance()->exeFileName.c_str());
     Msg::Info("Home directory : %s", CTX::instance()->homeDir.c_str());
     Msg::Info("Launch date    : %s", Msg::GetLaunchDate().c_str());
     Msg::Info("Command line   : %s", Msg::GetCommandLineArgs().c_str());
@@ -693,6 +772,15 @@ int FlGui::testGlobalShortcuts(int event)
   }
   else if(Fl::test_shortcut(FL_ALT + 't')) {
     for(unsigned int i = 0; i < PView::list.size(); i++)
+      if(opt_view_visible(i, GMSH_GET, 0)){
+        int t = opt_view_intervals_type(i, GMSH_GET, 0) + 1;
+        if(t == 4) t = 1; // skip numeric display
+        opt_view_intervals_type(i, GMSH_SET | GMSH_GUI, t);
+      }
+    status = 2;
+  }
+  else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 't')) {
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_intervals_type
           (i, GMSH_SET | GMSH_GUI, opt_view_intervals_type(i, GMSH_GET, 0) + 1);
@@ -891,7 +979,7 @@ char FlGui::selectEntity(int type)
 {
   return getCurrentOpenglWindow()->selectEntity
     (type, selectedVertices, selectedEdges, selectedFaces, selectedRegions,
-     selectedElements);
+     selectedElements, selectedPoints);
 }
 
 void FlGui::setStatus(const std::string &msg, bool opengl)
@@ -936,10 +1024,16 @@ void FlGui::setStatus(const std::string &msg, bool opengl)
 void FlGui::setLastStatus(int col)
 {
   for(unsigned int i = 0; i < graph.size(); i++){
-    if(col >= 0 && graph[0]->getMessageHeight() < FL_NORMAL_SIZE)
-      graph[i]->getProgress()->labelcolor(col);
-    else
+    if(col >= 0 && graph[0]->getMessageHeight() < FL_NORMAL_SIZE){
+      if(CTX::instance()->guiColorScheme) // dark
+        graph[i]->getProgress()->color(col);
+      else
+        graph[i]->getProgress()->labelcolor(col);
+    }
+    else{
+      graph[i]->getProgress()->color(FL_BACKGROUND_COLOR);
       graph[i]->getProgress()->labelcolor(FL_FOREGROUND_COLOR);
+    }
   }
   setStatus(_lastStatus);
 }
@@ -957,12 +1051,6 @@ void FlGui::setProgress(const std::string &msg, double val, double min, double m
   setStatus(msg);
 }
 
-void FlGui::setProgressColor(int col)
-{
-  for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++)
-    FlGui::instance()->graph[i]->getProgress()->labelcolor(col);
-}
-
 void FlGui::storeCurrentWindowsInfo()
 {
   CTX::instance()->glPosition[0] = graph[0]->getWindow()->x();
diff --git a/Fltk/FlGui.h b/Fltk/FlGui.h
index 265602e..31ac2ad 100644
--- a/Fltk/FlGui.h
+++ b/Fltk/FlGui.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,6 +8,7 @@
 
 #include <string>
 #include <vector>
+#include "SPoint2.h"
 
 #define GMSH_WINDOW_BOX FL_FLAT_BOX
 #define GMSH_SIMPLE_RIGHT_BOX (Fl_Boxtype)(FL_FREE_BOXTYPE+1)
@@ -44,6 +45,7 @@ class FlGui{
  private:
   static FlGui *_instance;
   static std::string _openedThroughMacFinder;
+  int _in_main_thread;
   std::string _lastStatus;
  public:
   std::vector<GVertex*> selectedVertices;
@@ -51,6 +53,7 @@ class FlGui{
   std::vector<GFace*> selectedFaces;
   std::vector<GRegion*> selectedRegions;
   std::vector<MElement*> selectedElements;
+  std::vector<SPoint2> selectedPoints;
  public:
   std::vector<graphicWindow*> graph;
   optionWindow *options;
@@ -81,6 +84,9 @@ class FlGui{
   static void wait();
   // wait (at most time seconds) for any events, then process them
   static void wait(double time);
+  int lock();
+  void unlock();
+  bool in_main_thread() {return _in_main_thread==0;}
   // is a file opened through the Mac Finder?
   static void setOpenedThroughMacFinder(const std::string &name)
   {
@@ -117,8 +123,6 @@ class FlGui{
   void setLastStatus(int col=-1);
   // display status message and update progress bar
   void setProgress(const std::string &msg, double val, double min, double max);
-  // set color of progress message
-  void setProgressColor(int col);
   // create the window for physical context dependant definitions
   void callForSolverPlugin(int dim);
   // add line in message console
@@ -129,6 +133,8 @@ class FlGui{
   void rebuildTree(bool deleteWidgets);
   // open module in tree
   void openModule(const std::string &name);
+  // apply color scheme to widgets
+  void applyColorScheme();
 };
 
 void redraw_cb(Fl_Widget *w, void *data);
diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp
index bd4754f..4b20f7d 100644
--- a/Fltk/Main.cpp
+++ b/Fltk/Main.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -11,6 +11,9 @@
 #include "Options.h"
 #include "PluginManager.h"
 #include "GModel.h"
+#if defined(HAVE_ONELAB2) && defined(__linux__)
+#include <X11/Xlib.h>
+#endif
 
 int main(int argc, char *argv[])
 {
@@ -38,5 +41,8 @@ int main(int argc, char *argv[])
   }
 
   // Interactive Gmsh with FLTK GUI
+#if defined(HAVE_ONELAB2) && defined(__linux__)
+  XInitThreads();
+#endif
   return GmshFLTK(argc, argv);
 }
diff --git a/Fltk/Navigator.cpp b/Fltk/Navigator.cpp
index e08ba92..4a7006a 100644
--- a/Fltk/Navigator.cpp
+++ b/Fltk/Navigator.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,7 +8,8 @@
 #include <string>
 #include <iostream>
 #include <stdio.h>
-#include <Navigator.h>
+#include <algorithm>
+#include "Navigator.h"
 #include "Trackball.h"
 #include "Context.h"
 #include "drawContext.h"
diff --git a/Fltk/Navigator.h b/Fltk/Navigator.h
index bf56e23..ad80e79 100644
--- a/Fltk/Navigator.h
+++ b/Fltk/Navigator.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/classificationEditor.cpp b/Fltk/classificationEditor.cpp
index 367a322..b2708ff 100644
--- a/Fltk/classificationEditor.cpp
+++ b/Fltk/classificationEditor.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/classificationEditor.h b/Fltk/classificationEditor.h
index a13e6d3..cbc68ec 100644
--- a/Fltk/classificationEditor.h
+++ b/Fltk/classificationEditor.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/clippingWindow.cpp b/Fltk/clippingWindow.cpp
index da504cc..273cbb6 100644
--- a/Fltk/clippingWindow.cpp
+++ b/Fltk/clippingWindow.cpp
@@ -1,10 +1,11 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <FL/Fl_Tabs.H>
 #include <FL/Fl_Return_Button.H>
+#include <algorithm>
 #include "FlGui.h"
 #include "drawContext.h"
 #include "clippingWindow.h"
diff --git a/Fltk/clippingWindow.h b/Fltk/clippingWindow.h
index 11d1887..5adecb2 100644
--- a/Fltk/clippingWindow.h
+++ b/Fltk/clippingWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/colorbarWindow.cpp b/Fltk/colorbarWindow.cpp
index 930bbfe..a23da03 100644
--- a/Fltk/colorbarWindow.cpp
+++ b/Fltk/colorbarWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/colorbarWindow.h b/Fltk/colorbarWindow.h
index 32b70f4..ae37aba 100644
--- a/Fltk/colorbarWindow.h
+++ b/Fltk/colorbarWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/contextWindow.cpp b/Fltk/contextWindow.cpp
index deff825..27c084b 100644
--- a/Fltk/contextWindow.cpp
+++ b/Fltk/contextWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/contextWindow.h b/Fltk/contextWindow.h
index 48a1164..87a57a1 100644
--- a/Fltk/contextWindow.h
+++ b/Fltk/contextWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/drawContextFltk.h b/Fltk/drawContextFltk.h
index e35794b..dab25d0 100644
--- a/Fltk/drawContextFltk.h
+++ b/Fltk/drawContextFltk.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -35,7 +35,9 @@ class drawContextFltk : public drawContextGlobal{
         }
       }
     }
+#ifndef HAVE_ONELAB2
     FlGui::instance()->check();
+#endif
   }
   void drawCurrentOpenglWindow(bool make_current)
   {
@@ -117,7 +119,7 @@ class drawContextFltk : public drawContextGlobal{
     else{
       int w = Fl::w();
       if(w <= 1024)      return 11;
-      else if(w <= 1400) return 12;
+      else if(w <= 1440) return 12;
       else if(w <= 1680) return 13;
       else if(w <= 1920) return 14;
       else               return 15;
diff --git a/Fltk/drawContextFltkCairo.cpp b/Fltk/drawContextFltkCairo.cpp
index c1b9dca..46070e7 100644
--- a/Fltk/drawContextFltkCairo.cpp
+++ b/Fltk/drawContextFltkCairo.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/drawContextFltkCairo.h b/Fltk/drawContextFltkCairo.h
index 3656b10..6c23cf1 100644
--- a/Fltk/drawContextFltkCairo.h
+++ b/Fltk/drawContextFltkCairo.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/drawContextFltkStringTexture.cpp b/Fltk/drawContextFltkStringTexture.cpp
index 6c20e06..15a8515 100644
--- a/Fltk/drawContextFltkStringTexture.cpp
+++ b/Fltk/drawContextFltkStringTexture.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,6 +6,7 @@
 // Contributed by Jonathan Lambrechts
 
 #include "drawContextFltkStringTexture.h"
+#include <algorithm>
 
 // FIXME: hack for current version of mingw
 #if defined(WIN32) && !defined(GL_TEXTURE_RECTANGLE_ARB)
diff --git a/Fltk/drawContextFltkStringTexture.h b/Fltk/drawContextFltkStringTexture.h
index cf31c2e..5e336ce 100644
--- a/Fltk/drawContextFltkStringTexture.h
+++ b/Fltk/drawContextFltkStringTexture.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp
index b7313c1..d10b3af 100644
--- a/Fltk/extraDialogs.cpp
+++ b/Fltk/extraDialogs.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/extraDialogs.h b/Fltk/extraDialogs.h
index 81c6f66..f1f2a1c 100644
--- a/Fltk/extraDialogs.h
+++ b/Fltk/extraDialogs.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/fieldWindow.cpp b/Fltk/fieldWindow.cpp
index 0ff4ee5..1b57d53 100644
--- a/Fltk/fieldWindow.cpp
+++ b/Fltk/fieldWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/fieldWindow.h b/Fltk/fieldWindow.h
index 9bcd2d5..e323eef 100644
--- a/Fltk/fieldWindow.h
+++ b/Fltk/fieldWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp
index 10e48d1..7f2f765 100644
--- a/Fltk/fileDialogs.cpp
+++ b/Fltk/fileDialogs.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/fileDialogs.h b/Fltk/fileDialogs.h
index b8a7291..557b566 100644
--- a/Fltk/fileDialogs.h
+++ b/Fltk/fileDialogs.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/gamepadWindow.cpp b/Fltk/gamepadWindow.cpp
index 5393dbd..d1ea0ec 100644
--- a/Fltk/gamepadWindow.cpp
+++ b/Fltk/gamepadWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -11,6 +11,7 @@ typedef unsigned long intptr_t;
 #endif
 #include <string.h>
 #include <FL/Fl.H>
+#include <algorithm>
 #include "FlGui.h"
 #include "paletteWindow.h"
 #include "optionWindow.h"
@@ -50,7 +51,7 @@ gamepadWindow::gamepadWindow()
   int width = 34 * FL_NORMAL_SIZE + WB;
   int height = 15 * BH + 4 * WB;
   int L =  FL_NORMAL_SIZE;
- 
+
   win = new paletteWindow
     (width, height, CTX::instance()->nonModalWindows ? true : false);
   win->box(GMSH_WINDOW_BOX);
diff --git a/Fltk/gamepadWindow.h b/Fltk/gamepadWindow.h
index 5ee126d..a2a846b 100644
--- a/Fltk/gamepadWindow.h
+++ b/Fltk/gamepadWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/gmshLocalNetworkClient.h b/Fltk/gmshLocalNetworkClient.h
deleted file mode 100644
index 8243598..0000000
--- a/Fltk/gmshLocalNetworkClient.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-//
-// See the LICENSE.txt file for license information. Please report all
-// bugs and problems to the public mailing list <gmsh at geuz.org>.
-
-#ifndef _GMSH_LOCAL_NETWORK_CLIENT_H_
-#define _GMSH_LOCAL_NETWORK_CLIENT_H_
-
-#include <vector>
-#include <algorithm>
-#include "onelab.h"
-
-class gmshLocalNetworkClient : public onelab::localNetworkClient{
- private:
-  // a gmsh local network client can launch subclients (this is typical for a
-  // metamodel that calls several underlying models); _clients keeps track of
-  // the master (this) and the subclients.
-  std::vector<gmshLocalNetworkClient*> _clients;
-  // client that launched this one (with GMSH_CONNECT); _father is zero for the
-  // master client (the one created by Gmsh).
-  gmshLocalNetworkClient *_father;
- public:
-  gmshLocalNetworkClient(const std::string &name, const std::string &executable,
-                         const std::string &remoteLogin="")
-    : onelab::localNetworkClient(name, executable, remoteLogin), _father(0)
-  {
-    addClient(this);
-  }
-  void setFather(gmshLocalNetworkClient *father)
-  {
-    _father = father;
-  }
-  gmshLocalNetworkClient *getFather()
-  {
-    return _father;
-  }
-  void addClient(gmshLocalNetworkClient *client)
-  {
-    _clients.push_back(client);
-  }
-  void removeClient(gmshLocalNetworkClient *client)
-  {
-    std::vector<gmshLocalNetworkClient*>::iterator it;
-    it = std::find(_clients.begin(), _clients.end(), client);
-    if(it != _clients.end()) _clients.erase(it);
-  }
-  int getNumClients(){ return _clients.size(); }
-  gmshLocalNetworkClient *getClient(int i)
-  {
-    if(i >= 0 && i < getNumClients()) return _clients[i];
-    return 0;
-  }
-  int getNumConnectedClients()
-  {
-    int n = 0;
-    for(int i = 0; i < getNumClients(); i++){
-      if(_clients[i]->getPid() != -1) n++;
-    }
-    return n;
-  }
-  bool receiveMessage(gmshLocalNetworkClient *master);
-  bool run();
-  bool kill();
-};
-
-#endif
diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp
index 9ec0a45..d415f8d 100644
--- a/Fltk/graphicWindow.cpp
+++ b/Fltk/graphicWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,8 +33,9 @@ typedef unsigned long intptr_t;
 #include "fieldWindow.h"
 #include "pluginWindow.h"
 #include "helpWindow.h"
-#include "onelabGroup.h"
+#if not defined(HAVE_ONELAB2)
 #include "gmshLocalNetworkClient.h"
+#endif
 #include "fileDialogs.h"
 #include "extraDialogs.h"
 #include "partitionDialog.h"
@@ -181,6 +182,7 @@ static void file_clear_cb(Fl_Widget *w, void *data)
 
 static void file_remote_cb(Fl_Widget *w, void *data)
 {
+#if not defined(HAVE_ONELAB2)
   onelab::localNetworkClient *c;
   onelab::server::citer it = onelab::server::instance()->findClient("GmshRemote");
   if(it == onelab::server::instance()->lastClient()){
@@ -188,7 +190,7 @@ static void file_remote_cb(Fl_Widget *w, void *data)
     c->setSocketSwitch("-socket");
   }
   else
-    c = (onelab::localNetworkClient*)it->second;
+    c = (onelab::localNetworkClient*)(*it);
   GmshServer *server = c->getGmshServer();
 
   std::string str((const char*)data);
@@ -224,6 +226,7 @@ static void file_remote_cb(Fl_Widget *w, void *data)
       server->SendString(GmshSocket::GMSH_SPEED_TEST, "Speed test");
     }
   }
+#endif
 }
 
 static void file_window_cb(Fl_Widget *w, void *data)
@@ -1610,12 +1613,14 @@ static std::vector<std::string> getInfoStrings(MElement *ele)
   }
   {
     std::ostringstream sstream;
+    sstream.precision(12);
     SPoint3 pt = ele->barycenter();
     sstream << " Barycenter: (" << pt[0] << ", " << pt[1] << ", " << pt[2] << ")";
     info.push_back(sstream.str());
   }
   {
     std::ostringstream sstream;
+    sstream.precision(12);
     sstream << " Edge length: "
             << "min = " << ele->minEdge() << " "
             << "max = " << ele->maxEdge();
@@ -1623,21 +1628,23 @@ static std::vector<std::string> getInfoStrings(MElement *ele)
   }
   {
     std::ostringstream sstream;
+    sstream.precision(12);
     sstream << " Quality: "
-            << "rho = " << ele->rhoShapeMeasure() << " "
-            << "gamma = " << ele->gammaShapeMeasure() << " "
-            << "eta = " << ele->etaShapeMeasure();
+        << "gamma = " << ele->gammaShapeMeasure() << " "
+        << "rho = " << ele->rhoShapeMeasure();
     info.push_back(sstream.str());
   }
   {
     std::ostringstream sstream;
-    double jmin, jmax;
-    ele->scaledJacRange(jmin, jmax);
-    sstream << " Scaled Jacobian range: " << jmin << " " << jmax;
+    sstream.precision(12);
+    double sICNMin, sICNMax;
+    ele->signedInvCondNumRange(sICNMin, sICNMax);
+    sstream << " SICN range: " << sICNMin << " " << sICNMax;
     info.push_back(sstream.str());
   }
   {
     std::ostringstream sstream;
+    sstream.precision(12);
     sstream << " Inner / outer radius: "
             << ele->getInnerRadius() << " / " << ele->getOuterRadius();
     info.push_back(sstream.str());
@@ -1946,6 +1953,11 @@ static Fl_Menu_Item bar_table[] = {
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {0},
   {"M&erge...",   FL_CTRL+FL_SHIFT+'o', (Fl_Callback *)file_open_merge_cb, (void*)"merge"},
     {"Watch Pattern...",    0, (Fl_Callback *)file_watch_cb, 0},
@@ -2014,6 +2026,11 @@ static Fl_Menu_Item sysbar_table[] = {
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
+      {"", 0, (Fl_Callback *)file_open_recent_cb, 0},
       {0},
     {"Merge...",   FL_META+FL_SHIFT+'o', (Fl_Callback *)file_open_merge_cb, (void*)"merge"},
     {"Watch Pattern...",   0, (Fl_Callback *)file_watch_cb, 0},
@@ -2726,6 +2743,20 @@ static void message_menu_save_cb(Fl_Widget *w, void *data)
     g->saveMessages(fileChooserGetName(1).c_str());
 }
 
+#if 0
+static void message_menu_increase_font_cb(Fl_Widget *w, void *data)
+{
+  graphicWindow *g = (graphicWindow*)data;
+  g->changeMessageFontSize(1);
+}
+
+static void message_menu_decrease_font_cb(Fl_Widget *w, void *data)
+{
+  graphicWindow *g = (graphicWindow*)data;
+  g->changeMessageFontSize(-1);
+}
+#endif
+
 static void message_browser_cb(Fl_Widget *w, void *data)
 {
   graphicWindow *g = (graphicWindow*)data;
@@ -2736,6 +2767,8 @@ static void message_browser_cb(Fl_Widget *w, void *data)
         message_menu_scroll_cb, g },
       { "Clear Messages",   0, message_menu_clear_cb, g },
       { "Save Messages...", 0, message_menu_save_cb, g },
+      //{ "Increase font size", 0, message_menu_increase_font_cb, g },
+      //{ "Decrease font size", 0, message_menu_decrease_font_cb, g },
       { 0 }
     };
     const Fl_Menu_Item *m = rclick_menu->popup(Fl::event_x(), Fl::event_y(), 0, 0, 0);
@@ -2935,10 +2968,10 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
   }
 
   x += 4;
-  _label = new mainWindowProgress(x, mh + glheight + mheight + 2, width - x - WB, sht);
+  _label = new mainWindowProgress(x, mh + glheight + mheight + 2, width - x - 2, sht);
   _label->box(FL_FLAT_BOX);
   _label->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
-  _label->color(FL_BACKGROUND_COLOR, FL_DARK2); // FL_DARK_GREEN
+  _label->color(FL_BACKGROUND_COLOR, FL_DARK2);
 
   // dummy resizable box
   dummyBox *resbox = new dummyBox(x, mh, width - x, glheight);
@@ -2994,7 +3027,12 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
     _browser = new Fl_Browser(twidth, mh + glheight, glwidth, mheight);
     _browser->box(GMSH_SIMPLE_TOP_BOX);
     _browser->textfont(FL_SCREEN);
-    _browser->textsize(FL_NORMAL_SIZE - 2);
+    int s = CTX::instance()->msgFontSize;
+#if defined(WIN32) // screen font on Windows is really small
+    _browser->textsize(s <= 0 ? FL_NORMAL_SIZE : s);
+#else
+    _browser->textsize(s <= 0 ? FL_NORMAL_SIZE - 2 : s);
+#endif
     _browser->type(FL_MULTI_BROWSER);
     _browser->callback(message_browser_cb, this);
     _browser->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2)); // thinner scrollbars
@@ -3004,12 +3042,8 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
   }
 
   if(main && !detachedMenu){
-#if defined(HAVE_ONELAB2)
-    // Hey Maxime, this is for you!
-#else
     _onelab = new onelabGroup(0, mh, twidth, height - mh - sh);
     _onelab->enableTreeWidgetResize(false);
-#endif
   }
   else{
     _onelab = 0;
@@ -3075,8 +3109,9 @@ void graphicWindow::detachMenu()
   _tile->remove(_onelab);
   _browser->resize(0, _browser->y(), _browser->w() + w, _browser->h());
   for(unsigned int i = 0; i < gl.size(); i++){
-    if(gl[i]->x() == w)
+    if(gl[i]->x() == w){
       gl[i]->resize(0, gl[i]->y(), gl[i]->w() + w, gl[i]->h());
+    }
   }
   _tile->redraw();
 
@@ -3114,8 +3149,9 @@ void graphicWindow::attachMenu()
   if(_browser->w() - w < 0) w = _browser->w() / 2;
   _browser->resize(w, _browser->y(), _browser->w() - w, _browser->h());
   for(unsigned int i = 0; i < gl.size(); i++){
-    if(gl[i]->x() == 0)
+    if(gl[i]->x() == 0){
       gl[i]->resize(w, gl[i]->y(), gl[i]->w() - w, gl[i]->h());
+    }
   }
   _onelab->box(GMSH_SIMPLE_RIGHT_BOX);
   _tile->add(_onelab);
@@ -3227,11 +3263,13 @@ bool graphicWindow::split(openglWindow *g, char how)
     g2->mode(g->mode());
 
     gl.push_back(g2);
-    _tile->add(g2);
-    g2->show();
 
     g->resize(x1, y1, w1, h1);
     g2->resize(x2, y2, w2, h2);
+
+    _tile->add(g2);
+
+    g2->show();
   }
   return true;
 }
@@ -3244,7 +3282,7 @@ void graphicWindow::setStereo(bool st)
       gl[i]->mode(FL_RGB | FL_DEPTH | FL_DOUBLE | FL_STEREO);
     }
     else{
-      gl[i]->mode(FL_RGB | FL_DEPTH | FL_DOUBLE );
+      gl[i]->mode(FL_RGB | FL_DEPTH | FL_DOUBLE);
     }
     gl[i]->show();
   }
@@ -3303,8 +3341,9 @@ void graphicWindow::setMenuWidth(int w)
   double dw = w - _onelab->w();
   if(!dw) return;
   for(unsigned int i = 0; i < gl.size(); i++){
-    if(gl[i]->x() == _onelab->x() + _onelab->w())
+    if(gl[i]->x() == _onelab->x() + _onelab->w()){
       gl[i]->resize(gl[i]->x() + dw, gl[i]->y(), gl[i]->w() - dw, gl[i]->h());
+    }
   }
   _browser->resize(_browser->x() + dw, _browser->y(), _browser->w() - dw, _browser->h());
   _onelab->resize(_onelab->x(), _onelab->y(), _onelab->w() + dw, _onelab->h());
@@ -3345,8 +3384,9 @@ void graphicWindow::setMessageHeight(int h)
   int dh = h - _browser->h();
   if(!dh) return;
   for(unsigned int i = 0; i < gl.size(); i++){
-    if(gl[i]->y() + gl[i]->h() == _browser->y())
+    if(gl[i]->y() + gl[i]->h() == _browser->y()){
       gl[i]->resize(gl[i]->x(), gl[i]->y(), gl[i]->w(), gl[i]->h() - dh);
+    }
   }
   _browser->resize(_browser->x(), _browser->y() - dh,
                    _browser->w(), _browser->h() + dh);
@@ -3445,6 +3485,23 @@ void graphicWindow::copySelectedMessagesToClipboard()
   Fl::copy(buff.c_str(), buff.size(), 1);
 }
 
+void graphicWindow::setMessageFontSize(int size)
+{
+  if(!_browser) return;
+#if defined(WIN32) // screen font on Windows is really small
+  _browser->textsize(size <= 0 ? FL_NORMAL_SIZE - 1 : size);
+#else
+  _browser->textsize(size <= 0 ? FL_NORMAL_SIZE - 2 : size);
+#endif
+  _browser->redraw();
+}
+
+void graphicWindow::changeMessageFontSize(int incr)
+{
+  if(!_browser) return;
+  setMessageFontSize(_browser->textsize() + incr);
+}
+
 void graphicWindow::fillRecentHistoryMenu()
 {
 #if defined(__APPLE__)
@@ -3458,7 +3515,7 @@ void graphicWindow::fillRecentHistoryMenu()
     table = sysbar_table;
 #endif
 
-  for(int i = 0; i < 5; i++){
+  for(int i = 0; i < 10; i++){
     table[4 + i].text = CTX::instance()->recentFiles[i].c_str();
     table[4 + i].user_data_ = (void*)CTX::instance()->recentFiles[i].c_str();
   }
diff --git a/Fltk/graphicWindow.h b/Fltk/graphicWindow.h
index c8d5446..4b7834d 100644
--- a/Fltk/graphicWindow.h
+++ b/Fltk/graphicWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,7 +19,11 @@
 #endif
 #include <FL/Fl_Menu_Bar.H>
 #include "openglWindow.h"
+#ifdef HAVE_ONELAB2
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
+#endif
 
 class graphicWindow{
  private:
@@ -81,6 +85,8 @@ class graphicWindow{
   void clearMessages();
   void saveMessages(const char *filename);
   void copySelectedMessagesToClipboard();
+  void setMessageFontSize(int size);
+  void changeMessageFontSize(int incr);
   void fillRecentHistoryMenu();
 };
 
diff --git a/Fltk/helpWindow.cpp b/Fltk/helpWindow.cpp
index 245d7b2..3c0d132 100644
--- a/Fltk/helpWindow.cpp
+++ b/Fltk/helpWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -26,6 +26,14 @@
 #include "petsc.h"
 #endif
 
+#if defined(HAVE_OCC)
+#include "Standard_Version.hxx"
+#endif
+
+#if defined(HAVE_MED)
+#include "med.h"
+#endif
+
 static const char *help_link(Fl_Widget *w, const char *uri)
 {
   fl_open_uri(uri);
@@ -279,7 +287,7 @@ helpWindow::helpWindow()
 {
   {
     int width = 28 * FL_NORMAL_SIZE;
-    int height = 18 * BH;
+    int height = 19 * BH;
 
     about = new paletteWindow
       (width, height, CTX::instance()->nonModalWindows ? true : false, "About Gmsh");
@@ -291,12 +299,12 @@ helpWindow::helpWindow()
     o->box(FL_FLAT_BOX);
     std::ostringstream sstream;
     sstream << "<center><h3>Gmsh</h3><br>version " << GetGmshVersion()
-            << "<p>Copyright (C) 1997-2014"
+            << "<p>Copyright (C) 1997-2015"
             << "<br>Christophe Geuzaine and Jean-Francois Remacle"
             << "<p><a href=\"http://geuz.org/gmsh/doc/CREDITS.txt\">Credits</a> "
             << "and <a href=\"http://geuz.org/gmsh/doc/LICENSE.txt\">licensing "
             << "information</a>"
-            << "<p>Please send all questions and bug reports to "
+            << "<p>Please send all questions and bug reports to the public mailing list "
             << "<a href=\"mailto:gmsh at geuz.org\">gmsh at geuz.org</a></center>"
             << "<ul>"
             << "<li><i>Build OS:</i> " << GetGmshBuildOS()
@@ -309,10 +317,18 @@ helpWindow::helpWindow()
             << "<li><i>PETSc version:</i> " << PETSC_VERSION_MAJOR << "."
             << PETSC_VERSION_MINOR << "." << PETSC_VERSION_SUBMINOR
 #if defined(PETSC_USE_COMPLEX)
-            << "<li><i>PETSc arithmetic:</i> Complex"
+            << " (complex arithmetic)"
 #else
-            << "<li><i>PETSc arithmetic:</i> Real"
+            << " (real arithmetic)"
+#endif
+#endif
+#if defined(HAVE_OCC)
+            << "<li><i>OCC version:</i> " << OCC_VERSION_MAJOR << "."
+            << OCC_VERSION_MINOR << "." << OCC_VERSION_MAINTENANCE
 #endif
+#if defined(HAVE_MED)
+            << "<li><i>MED version:</i> " << MED_NUM_MAJEUR << "."
+            << MED_NUM_MINEUR << "." << MED_NUM_RELEASE
 #endif
             << "<li><i>Packaged by:</i> " << GetGmshPackager()
             << "</ul>"
@@ -414,7 +430,7 @@ helpWindow::helpWindow()
     search->box(FL_FLAT_BOX);
     search->callback(help_options_cb);
     search->when(FL_WHEN_CHANGED);
-    search->take_focus();
+    //search->take_focus(); cannot call this here - it triggers show() on Linux in fltk 1.3.3
     o->resizable(search);
     o->end();
 
diff --git a/Fltk/helpWindow.h b/Fltk/helpWindow.h
index 970480a..c863029 100644
--- a/Fltk/helpWindow.h
+++ b/Fltk/helpWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/highOrderToolsWindow.cpp b/Fltk/highOrderToolsWindow.cpp
index f2cc517..de797e5 100644
--- a/Fltk/highOrderToolsWindow.cpp
+++ b/Fltk/highOrderToolsWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -115,10 +115,10 @@ static void chooseopti_cb(Fl_Widget *w, void *data)
 static void chooseopti_strategy(Fl_Widget *w, void *data)
 {
   highOrderToolsWindow *o = FlGui::instance()->highordertools;
-  if (o->choice[3]->value() == 0)
-    for (int i=9;i<=11;i++) o->value[i]->deactivate();
-  else
+  if (o->choice[3]->value() == 1)
     for (int i=9;i<=11;i++) o->value[i]->activate();
+  else
+    for (int i=9;i<=11;i++) o->value[i]->deactivate();
 }
 
 static void highordertools_runopti_cb(Fl_Widget *w, void *data)
@@ -151,8 +151,7 @@ static void highordertools_runopti_cb(Fl_Widget *w, void *data)
     p.dim = dim;
     p.itMax = (int) o->value[3]->value();
     p.optPassMax = (int) o->value[4]->value();
-    p.weightFixed =  o->value[5]->value();
-    p.weightFree =  o->value[6]->value();
+    p.weight = o->value[5]->value();
     p.distanceFactor =  o->value[7]->value();
     p.fixBndNodes = (!o->CAD) || (o->choice[0]->value() == 0);
     p.strategy = o->choice[3]->value();
@@ -214,7 +213,7 @@ highOrderToolsWindow::highOrderToolsWindow(int deltaFontSize)
   butt[3] = new Fl_Check_Button
     (x, y, width - 4 * WB, BH, "Show detailed log messages");
   butt[3]->type(FL_TOGGLE_BUTTON);
-  butt[3]->value(1);
+  butt[3]->value(0);
 
   {
     y += BH / 2;
@@ -336,13 +335,9 @@ highOrderToolsWindow::highOrderToolsWindow(int deltaFontSize)
 
   y += BH;
   value[5] = new Fl_Value_Input
-    (x, y, IW/2, BH);
+    (x, y, IW, BH, "Weight on node displacement");
   value[5]->align(FL_ALIGN_RIGHT);
-  value[5]->value(1000.);
-  value[6] = new Fl_Value_Input
-    (x+IW/2,y, IW/2, BH, "W fixed / W free");
-  value[6]->align(FL_ALIGN_RIGHT);
-  value[6]->value(1.);
+  value[5]->value(1.);
 
   y += BH;
   value[3] = new Fl_Value_Input
@@ -355,7 +350,7 @@ highOrderToolsWindow::highOrderToolsWindow(int deltaFontSize)
 
   y += BH;
   value[4] = new Fl_Value_Input
-    (x, y, IW, BH, "Max. number of optimization passes");
+    (x, y, IW, BH, "Max. number of barrier updates");
   value[4]->minimum(1);
   value[4]->maximum(100);
   value[4]->step(1);
@@ -363,8 +358,9 @@ highOrderToolsWindow::highOrderToolsWindow(int deltaFontSize)
   value[4]->value(50);
 
   static Fl_Menu_Item menu_strategy[] = {
-    {"Connected blobs", 0, 0, 0},
+    {"Disjoint strong", 0, 0, 0},
     {"Adaptive one-by-one", 0, 0, 0},
+    {"Disjoint weak", 0, 0, 0},
     {0}
   };
 
@@ -377,7 +373,7 @@ highOrderToolsWindow::highOrderToolsWindow(int deltaFontSize)
 
   y += BH;
   value[9] = new Fl_Value_Input
-    (x, y, IW, BH, "Max. number of blob adaptation iter.");
+    (x, y, IW, BH, "Max. number of patch adaptation iter.");
   value[9]->minimum(1);
   value[9]->maximum(100);
   value[9]->step(1);
diff --git a/Fltk/highOrderToolsWindow.h b/Fltk/highOrderToolsWindow.h
index e0782fa..2240601 100644
--- a/Fltk/highOrderToolsWindow.h
+++ b/Fltk/highOrderToolsWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/inputRange.h b/Fltk/inputRange.h
index 7b799d9..17e350c 100644
--- a/Fltk/inputRange.h
+++ b/Fltk/inputRange.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -32,6 +32,7 @@ class inputRange : public Fl_Group {
   void _values2string()
   {
     std::ostringstream tmp;
+    tmp.precision(12);
     if(_choices.size()){
       // construct range string using choices
       for(unsigned int i = 0; i < _choices.size(); i++){
@@ -173,14 +174,14 @@ class inputRange : public Fl_Group {
                        37, 38, 39, 40,  43, 44, 45, 46,
                        49, 50, 51, 52};
       for(int i = 0; i < 36; i++){
-        if(_graph_val[i] == '1')
+        if(_graph_val[i] != '0')
           ((Fl_Menu_Item*)_graph_menu->menu())[index[i]].set();
         else
           ((Fl_Menu_Item*)_graph_menu->menu())[index[i]].clear();
       }
     }
     bool yellow = false;
-    for(int i = 0; i < 36; i++) if(_graph_val[i] == '1') yellow = true;
+    for(int i = 0; i < 36; i++) if(_graph_val[i] != '0') yellow = true;
     if(yellow){
       _graph_butt->value(1);
       _graph_butt->selection_color(FL_YELLOW);
@@ -222,8 +223,10 @@ class inputRange : public Fl_Group {
                      25, 26, 27, 28,  31, 32, 33, 34,
                      37, 38, 39, 40,  43, 44, 45, 46,
                      49, 50, 51, 52};
-    for(int i = 0; i < 36; i++)
-      v[i] = b->_graph_menu->menu()[index[i]].value() ? '1' : '0';
+    for(int i = 0; i < 36; i++){
+      // 1=iso, 2=continuous, 3=discrete, 4=numeric
+      v[i] = b->_graph_menu->menu()[index[i]].value() ? '3' : '0';
+    }
     b->_set_graph_value(v, false);
     b->doCallbackOnValues(false);
     b->do_callback();
@@ -327,7 +330,11 @@ class inputRange : public Fl_Group {
   std::string loop(){ return _loop_val; }
   void graph(const std::string &val){ _set_graph_value(val); }
   std::string graph(){ return _graph_val; }
-  void color(int col){ _input->color(col); }
+  void color(int col)
+  {
+    _input->color(col);
+    _input->textcolor(fl_contrast(FL_FOREGROUND_COLOR, col));
+  }
   int color(){ return _input->color(); }
   Fl_Value_Input *input(){ return _input; }
 };
diff --git a/Fltk/inputRegion.cpp b/Fltk/inputRegion.cpp
index 1711016..c42ba9b 100644
--- a/Fltk/inputRegion.cpp
+++ b/Fltk/inputRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/inputRegion.h b/Fltk/inputRegion.h
index 98f5895..60acfe9 100644
--- a/Fltk/inputRegion.h
+++ b/Fltk/inputRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/inputValue.cpp b/Fltk/inputValue.cpp
index dd0707c..773a438 100644
--- a/Fltk/inputValue.cpp
+++ b/Fltk/inputValue.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/inputValue.h b/Fltk/inputValue.h
index 0ec88b5..95edeaf 100644
--- a/Fltk/inputValue.h
+++ b/Fltk/inputValue.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/mainWindow.h b/Fltk/mainWindow.h
index cf99f0c..9e6920f 100644
--- a/Fltk/mainWindow.h
+++ b/Fltk/mainWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/manipWindow.cpp b/Fltk/manipWindow.cpp
index d3b457b..d9260cd 100644
--- a/Fltk/manipWindow.cpp
+++ b/Fltk/manipWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/manipWindow.h b/Fltk/manipWindow.h
index eb0c742..e770431 100644
--- a/Fltk/manipWindow.h
+++ b/Fltk/manipWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/onelab2Group.cpp b/Fltk/onelab2Group.cpp
new file mode 100644
index 0000000..6a30dfe
--- /dev/null
+++ b/Fltk/onelab2Group.cpp
@@ -0,0 +1,1030 @@
+#include "onelab2Group.h"
+
+#include "FlGui.h"
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Check_Button.H>
+#include <FL/Fl_Input_Choice.H>
+#include <FL/Fl_Choice.H>
+#include <FL/Fl_Menu_Item.H>
+#include "inputRange.h"
+#include "outputRange.h"
+#include "inputRegion.h"
+#include "drawContext.h"
+#include "viewButton.h"
+#include "solverButton.h"
+#include "PView.h"
+#include "PViewOptions.h"
+
+#include "Gmsh.h"
+#include "onelabUtils.h"
+#include "OnelabDatabase.h"
+#include "Options.h"
+#include "Context.h"
+
+static void updateGraphs()
+{
+  bool redraw = true;//FIXME false;
+  for(int i = 0; i < 18; i++){
+    std::ostringstream tmp;
+    tmp << i;
+    bool ret = onelabUtils::updateGraph(tmp.str());
+    redraw = redraw || ret;
+  }
+  if(redraw){
+    // don't delete the widgets, as this is called in widget callbacks
+    FlGui::instance()->updateViews(true, false);
+    drawContext::global()->draw();
+  }
+}
+
+void connect_cb(Fl_Widget *w, void *arg)
+{
+  if(!arg) return;
+  onelabGroup *obj = (onelabGroup *)arg;
+  if(strcmp(w->label(), "Connect") == 0) {
+    if(!obj->useServer()) return;
+    obj->clearTree();
+    GmshNetworkClient *cli = OnelabDatabase::instance()->useAsNetworkClient(obj->getServerIP(), obj->getServerPort());
+    if(cli) {
+      cli->setCallback(obj);
+      w->label("Disconnect");
+    }
+    else
+      fl_alert("Unable to connect to server");
+  }
+  else {
+    obj->clearTree();
+    OnelabDatabase::instance()->useAsClient()->setCallback(obj);
+    w->label("Connect");
+  }
+}
+
+void useserver_cb(Fl_Widget *w, void *arg)
+{
+  if(!arg) return;
+  Fl_Check_Button *checkbox = (Fl_Check_Button *)w;
+  onelabGroup *obj = (onelabGroup *)arg;
+  obj->useServer(checkbox->value() == 1);
+}
+
+void onelab_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+
+  std::string action((const char*)data);
+  Msg::Info("Try to %s", action.c_str());
+
+  if(action == "refresh"){
+    updateGraphs();
+    return;
+  }
+
+  if(FlGui::instance()->onelab->isBusy()){
+    Msg::Info("I'm busy! Ask me that later...");
+    return;
+  }
+
+  if(action == "reset"){
+    OnelabDatabase::instance()->clear(); // TODO keep persitant
+    return;
+  }
+
+  Msg::ResetErrorCounter();
+
+  FlGui::instance()->onelab->setButtonMode("", "stop");
+
+  OnelabDatabase::instance()->run(action);
+  drawContext::global()->draw();
+
+  FlGui::instance()->onelab->setButtonMode("check", "compute");
+}
+
+void onelab_option_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+  std::string what((const char*)data);
+  double val = ((Fl_Menu_*)w)->mvalue()->value() ? 1. : 0.;
+  if(what == "save")
+    CTX::instance()->solver.autoSaveDatabase = val;
+  else if(what == "archive")
+    CTX::instance()->solver.autoArchiveOutputFiles = val;
+  else if(what == "check"){
+    CTX::instance()->solver.autoCheck = val;
+    FlGui::instance()->onelab->setButtonVisibility();
+  }
+  else if(what == "mesh")
+    CTX::instance()->solver.autoMesh = val;
+  else if(what == "merge")
+    CTX::instance()->solver.autoMergeFile = val;
+  else if(what == "show")
+    CTX::instance()->solver.autoShowViews = val ? 2 : 0;
+  else if(what == "step")
+    CTX::instance()->solver.autoShowLastStep = val;
+  else if(what == "invisible"){
+    CTX::instance()->solver.showInvisibleParameters = val;
+    FlGui::instance()->onelab->rebuildTree(true);
+  }
+}
+
+void solver_cb(Fl_Widget *w, void *data)
+{
+  if(!FlGui::instance()->onelab) return;
+
+  if(FlGui::instance()->onelab->isBusy())
+    FlGui::instance()->onelab->show();
+
+  int num = (intptr_t)data;
+  if(num >= 0){
+    std::string name = opt_solver_name(num, GMSH_GET, "");
+    if(name.empty()) return;// TODO
+    std::string exe = opt_solver_executable(num, GMSH_GET, "");
+    std::string host = opt_solver_remote_login(num, GMSH_GET, "");
+    OnelabDatabase::instance()->run("initialize", name);
+    FlGui::instance()->onelab->addSolver(name, exe, host, num);
+  }
+
+  if(num >= 0) {
+    onelab_cb(0, (void*)"check");
+  }
+  else {
+    onelab_cb(0, (void*)"refresh");
+  }
+  FlGui::instance()->onelab->updateGearMenu();
+}
+
+static bool getFlColor(const std::string &str, Fl_Color &c)
+{
+  if(str == "1"){
+    c = FL_YELLOW;
+    return true;
+  }
+  int r, g, b;
+  if(str.size() && GetRGBForString(str.c_str(), r, g, b)){
+    c = fl_color_cube(r * (FL_NUM_RED - 1) / 255,
+                      g * (FL_NUM_GREEN - 1) / 255,
+                      b * (FL_NUM_BLUE - 1) / 255);
+    return true;
+  }
+  c = FL_BLACK;
+  return false;
+}
+
+#if !defined(__APPLE__)
+#define gear_width 16
+#define gear_height 16
+static unsigned char gear_bits[] = {
+   0x80, 0x01, 0x80, 0x01, 0x8c, 0x31, 0xfc, 0x3f, 0xf8, 0x1f, 0xf8, 0x1f,
+   0x38, 0x1c, 0x3f, 0xfc, 0x3f, 0xfc, 0x38, 0x1c, 0xf8, 0x1f, 0xf8, 0x1f,
+   0xfc, 0x3f, 0x8c, 0x31, 0x80, 0x01, 0x80, 0x01 };
+#endif
+
+onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
+  : Fl_Group(x, y, w, h, l), _stop(false), _enableTreeWidgetResize(false)
+{
+  int col = FL_BACKGROUND2_COLOR;
+  color(col);
+
+  box(GMSH_SIMPLE_RIGHT_BOX);
+  int dx = Fl::box_dx(box());
+  int dy = Fl::box_dy(box());
+  int dw = Fl::box_dw(box());
+  int dh = Fl::box_dh(box());
+
+  _tree = new Fl_Tree(x + dx, y + dy + 6*BH, w - dw, h - dh - BH - 2 * WB - 6*BH);
+  _tree->color(col);
+  // TODO _tree->callback(onelab_tree_cb);
+  _tree->connectorstyle(FL_TREE_CONNECTOR_SOLID);
+  _tree->showroot(0);
+  _tree->box(FL_FLAT_BOX);
+  _tree->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2));
+  _tree->add("0Post-processing/");
+  _tree->end();
+
+
+  Fl_Check_Button *useServer = new Fl_Check_Button(x+WB, y, w-2*WB, BH, "Use a remote server");
+  useServer->callback(useserver_cb, this);
+  new Fl_Box(x+WB , y+BH, w-2*WB, BH, "Server IP address:");
+  server_ip = new Fl_Input(x+WB, y+2*BH, w-2*WB, BH, "");
+  server_ip->value("127.0.0.1");
+  server_ip->readonly(true);
+  new Fl_Box(x+WB , y+3*BH, w-2*WB, BH, "Server port:");
+  server_port = new Fl_Input(x+WB, y+4*BH, w-2*WB, BH, "");
+  server_port->value("1148");
+  server_port->readonly(true);
+  Fl_Button *connect_btn = new Fl_Button(x+WB, y+5*BH, w-2*WB, BH, "Connect");
+  connect_btn->callback(connect_cb, this);
+
+  _computeWidths();
+  _widgetLabelRatio = 0.48;
+
+  int BB2 = BB / 2 + 4;
+  _butt[0] = new Fl_Button(x + w - 3 * WB - 3 * BB2, y + h - WB - BH, BB2, BH, "Check");
+  _butt[0]->callback(onelab_cb, (void*)"check");
+
+  _butt[1] = new Fl_Button(x + w - 2 * WB - 2 * BB2, y + h - WB - BH, BB2, BH, "Run");
+  _butt[1]->callback(onelab_cb, (void*)"compute");
+
+  _gear = new Fl_Menu_Button(x + w - WB - BB2, y + h - WB - BH, BB2, BH);
+#if defined(__APPLE__)
+  _gear->label("@-1gmsh_gear");
+#else
+  _gear->image(new Fl_Bitmap(gear_bits, gear_width, gear_height));
+#endif
+  _gear->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
+  _gear->add("Reset database", 0, onelab_cb, (void*)"reset");
+  _gear->add("Save database...", 0, onelab_cb, (void*)"save");
+  _gear->add("_Load database...", 0, onelab_cb, (void*)"load");
+
+  _minWindowWidth = 3 * BB2 + 4 * WB;
+  _minWindowHeight = 2 * BH + 3 * WB;
+
+  _gearOptionsStart = _gear->menu()->size();
+
+  _gear->add("Save && load database automatically", 0, onelab_option_cb, (void*)"save",
+             FL_MENU_TOGGLE);
+  _gear->add("Archive output files automatically", 0, onelab_option_cb, (void*)"archive",
+             FL_MENU_TOGGLE);
+  _gear->add("Check model after each change", 0, onelab_option_cb, (void*)"check",
+             FL_MENU_TOGGLE);
+  _gear->add("Remesh automatically", 0, onelab_option_cb, (void*)"mesh",
+             FL_MENU_TOGGLE);
+  _gear->add("Merge results automatically", 0, onelab_option_cb, (void*)"merge",
+             FL_MENU_TOGGLE);
+  _gear->add("Show new views", 0, onelab_option_cb, (void*)"show",
+             FL_MENU_TOGGLE);
+  _gear->add("Always show last step", 0, onelab_option_cb, (void*)"step",
+             FL_MENU_TOGGLE);
+  _gear->add("_Show hidden parameters", 0, onelab_option_cb, (void*)"invisible",
+             FL_MENU_TOGGLE);
+
+  _gearOptionsEnd = _gear->menu()->size();
+
+  //_gear->add("Add new solver...", 0, onelab_add_solver_cb);
+
+  end();
+
+  Fl_Box *resbox = new Fl_Box(x + WB, y + WB, WB, WB);
+  resizable(resbox);
+
+  rebuildSolverList();
+
+  OnelabDatabase::instance()->useAsClient()->setCallback(this);
+}
+onelabGroup::~onelabGroup()
+{
+  Fl::delete_widget(_tree);
+}
+
+void onelabGroup::clearTree(bool deleteWidgets)
+{
+  _tree->clear();
+  _tree->sortorder(FL_TREE_SORT_ASCENDING);
+  _tree->selectmode(FL_TREE_SELECT_NONE);
+
+  std::vector<Fl_Widget*> delWidgets;
+  std::vector<char*> delStrings;
+  if(deleteWidgets){
+    delWidgets = _treeWidgets;
+    delStrings = _treeStrings;
+    _treeWidgets.clear();
+    _treeStrings.clear();
+   }
+  FlGui::check();
+  if(deleteWidgets){
+    for(unsigned int i = 0; i < delWidgets.size(); i++)
+      Fl::delete_widget(delWidgets[i]);
+    for(unsigned int i = 0; i < delStrings.size(); i++)
+      free(delStrings[i]);
+  }
+}
+
+void onelabGroup::openTreeItem(const std::string &name)
+{
+  Fl_Tree_Item *n = _tree->find_item(name.c_str());
+  if(n && n->has_children()){
+    n->open();
+    _tree->redraw();
+  }
+}
+
+void onelabGroup::setButtonVisibility()
+{
+  std::vector<onelab::number> numbers;
+  OnelabDatabase::instance()->get(numbers);
+  bool showRun = /*OnelabDatabase::instance()->getNumClients() > 1 FIXME*/true || numbers.size();
+  if(CTX::instance()->solver.autoCheck){
+    _butt[0]->hide();
+    if(showRun)
+      _butt[1]->show();
+    else
+      _butt[1]->hide();
+  }
+  else if(showRun){
+    _butt[0]->show();
+    _butt[1]->show();
+  }
+  else{
+    _butt[0]->hide();
+    _butt[1]->hide();
+  }
+  redraw();
+}
+
+void onelabGroup::setButtonMode(const std::string &butt0, const std::string &butt1)
+{
+  if(butt0 == "check"){
+    _butt[0]->activate();
+    _butt[0]->label("Check");
+    _butt[0]->callback(onelab_cb, (void*)"check");
+  }
+  else{
+    _butt[0]->deactivate();
+  }
+
+  if(butt1 == "compute"){
+    _butt[1]->activate();
+    _butt[1]->label("Run");
+    _butt[1]->callback(onelab_cb, (void*)"compute");
+    for(int i = 0; i < _gear->menu()->size(); i++)
+      ((Fl_Menu_Item*)_gear->menu())[i].activate();
+  }
+  else if(butt1 == "stop"){
+    _butt[1]->activate();
+    _butt[1]->label("Stop");
+    _butt[1]->callback(onelab_cb, (void*)"stop");
+    for(int i = 0; i < _gear->menu()->size(); i++)
+      if(i < _gearOptionsStart - 1 || i > _gearOptionsEnd - 2)
+        ((Fl_Menu_Item*)_gear->menu())[i].deactivate();
+  }
+  else if(butt1 == "kill"){
+    _butt[1]->activate();
+    _butt[1]->label("Kill");
+    _butt[1]->callback(onelab_cb, (void*)"kill");
+    for(int i = 0; i < _gear->menu()->size(); i++)
+      if(i < _gearOptionsStart - 1 || i > _gearOptionsEnd - 2)
+        ((Fl_Menu_Item*)_gear->menu())[i].deactivate();
+  }
+  else{
+    _butt[1]->deactivate();
+    for(int i = 0; i < _gear->menu()->size(); i++)
+      if(i < _gearOptionsStart - 1 || i > _gearOptionsEnd - 2)
+        ((Fl_Menu_Item*)_gear->menu())[i].deactivate();
+  }
+}
+
+void onelabGroup::updateGearMenu()
+{
+  Fl_Menu_Item* menu = (Fl_Menu_Item*)_gear->menu();
+  int values[8] = {CTX::instance()->solver.autoSaveDatabase,
+                   CTX::instance()->solver.autoArchiveOutputFiles,
+                   CTX::instance()->solver.autoCheck,
+                   CTX::instance()->solver.autoMesh,
+                   CTX::instance()->solver.autoMergeFile,
+                   CTX::instance()->solver.autoShowViews,
+                   CTX::instance()->solver.autoShowLastStep,
+                   CTX::instance()->solver.showInvisibleParameters};
+  for(int i = 0; i < 8; i++){
+    int idx = _gearOptionsStart - 1 + i;
+    if(values[i])
+      menu[idx].set();
+    else
+      menu[idx].clear();
+  }
+}
+
+void onelabGroup::addLastPostProcessing()
+{
+  _tree->sortorder(FL_TREE_SORT_NONE);
+  _addViewMenu(PView::list.size()-1);
+  _tree->sortorder(FL_TREE_SORT_ASCENDING);
+  for(unsigned int i = 0; i < PView::list.size(); i++)
+    getViewButton(i)->value(PView::list[i]->getOptions()->visible);
+}
+
+void onelabGroup::rebuildSolverList()
+{
+  updateGearMenu();
+
+  std::vector<std::string> names, exes, hosts;
+  for(int i = 0; i < NUM_SOLVERS; i++){
+    if(opt_solver_name(i, GMSH_GET, "").size()){
+      names.push_back(opt_solver_name(i, GMSH_GET, ""));
+      exes.push_back(opt_solver_executable(i, GMSH_GET, ""));
+      hosts.push_back(opt_solver_remote_login(i, GMSH_GET, ""));
+    }
+  }
+  for(unsigned int i = 0; i < NUM_SOLVERS; i++){
+    if(i < names.size()){
+      onelab::server::citer it = onelab::server::instance()->findClient(names[i]);
+      if(it != onelab::server::instance()->lastClient())
+        (*it)->setIndex(i);
+      opt_solver_name(i, GMSH_SET, names[i]);
+      opt_solver_executable(i, GMSH_SET, exes[i]);
+      opt_solver_remote_login(i, GMSH_SET, hosts[i]);
+    }
+    else{
+      opt_solver_name(i, GMSH_SET, "");
+      opt_solver_executable(i, GMSH_SET, "");
+      opt_solver_remote_login(i, GMSH_SET, "");
+    }
+  }
+
+  setButtonVisibility();
+  rebuildTree(true);
+}
+
+void onelabGroup::addSolver(const std::string &name, const std::string &executable,
+                            const std::string &remoteLogin, int index)
+{
+  //onelab::server::citer it = onelab::server::instance()->findClient(name);
+  //if(it != onelab::server::instance()->lastClient()){
+  //  if(needToChooseExe(executable))
+  //    onelab_choose_executable_cb(0, (void *)(*it));
+  //  return; // solver already exists
+  //}
+
+  //// delete the other non-local clients so we keep only the new one
+  //std::vector<onelab::client*> networkClients;
+  //for(onelab::server::citer it = onelab::server::instance()->firstClient();
+  //    it != onelab::server::instance()->lastClient(); it++)
+  //  if((*it)->isNetworkClient())
+  //    networkClients.push_back(*it);
+  //for(unsigned int i = 0; i < networkClients.size(); i++){
+  //  delete networkClients[i];
+  //}
+
+  //// create and register the new client
+  //onelab::localNetworkClient *c = new gmshLocalNetworkClient(name, executable,
+  //                                                           remoteLogin);
+  //c->setIndex(index);
+  //opt_solver_name(index, GMSH_SET, name);
+  //if(needToChooseExe(executable))
+  //  onelab_choose_executable_cb(0, (void *)c);
+  //opt_solver_remote_login(index, GMSH_SET, remoteLogin);
+
+  FlGui::instance()->onelab->rebuildSolverList();
+}
+
+bool onelabGroup::useServer() {return !server_ip->readonly();}
+void onelabGroup::useServer(bool use=false)
+{
+  server_ip->readonly(!use);
+  server_port->readonly(!use);
+}
+
+void onelabGroup::addParameter(onelab::parameter &p)
+{
+  if(!p.getVisible() || CTX::instance()->solver.showInvisibleParameters) return;
+
+  bool highlight = false;
+  Fl_Color c;
+  if(getFlColor(p.getAttribute("Highlight"), c)) highlight = true;
+  Fl_Tree_Item *n = _tree->add(p.getName().c_str());
+  n->labelsize(FL_NORMAL_SIZE + 4);
+  _tree->begin();
+  int ww = _baseWidth - (n->depth() + 1) * _indent;
+  ww *= _widgetLabelRatio; // FIXME CHANGE THIS
+  int hh = n->labelsize() + 4;
+  Fl_Group *grp = new Fl_Group(1, 1, ww, hh);
+  Fl_Widget *widget = _addParameterWidget(p, ww, hh, n, highlight, c);
+  grp->end();
+  if(!_enableTreeWidgetResize) grp->resizable(0);
+  _treeWidgets.push_back(grp);
+  widget->copy_label(p.getShortName().c_str());
+  std::string help = p.getLabel().size() ? p.getLabel() : p.getShortName();
+  if(p.getHelp().size()) help += ":\n" + p.getHelp();
+  widget->copy_tooltip(help.c_str());
+  n->widget(grp);
+  _tree->end();
+  if(p.getAttribute("Closed") == "1" && p.getPath().size()) _tree->close(p.getPath().c_str(), 0);
+  _tree->redraw();
+}
+Fl_Widget *onelabGroup::_addParameterWidget(onelab::parameter &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c)
+{
+  int type = p.getAttributeType();
+  if(type == onelab::number::attributeType())
+      return _addParameterWidget(*(onelab::number *)&p, ww, hh, n, highlight, c);
+  if(type == onelab::string::attributeType())
+      return _addParameterWidget(*(onelab::string *)&p, ww, hh, n, highlight, c);
+  if(type == onelab::region::attributeType())
+      return _addParameterWidget(*(onelab::region *)&p, ww, hh, n, highlight, c);
+  if(type == onelab::function::attributeType())
+      return _addParameterWidget(*(onelab::function *)&p, ww, hh, n, highlight, c);
+  return NULL;
+}
+
+template<class T>
+static void autoCheck(const T &pold, const T &pnew, bool force=false)
+{
+  if(onelabUtils::getFirstComputationFlag()){
+    if(pold.getValue() != pnew.getValue())
+      onelabUtils::setFirstComputationFlag(false);
+  }
+
+  if((CTX::instance()->solver.autoCheck && pnew.getAttribute("AutoCheck") != "0") ||
+     pnew.getAttribute("AutoCheck") == "1"){
+    if(force || pold.getValue() != pnew.getValue())
+      onelab_cb(0, (void*)"check");
+  }
+}
+
+template <class T>
+static void setGmshOption(T &n)
+{
+  std::string opt = n.getAttribute("GmshOption");
+  if(opt.empty()) return;
+  /*if(opt == "ResetDatabase"){ // special option to reset the onelab db
+    resetDb(false);
+    FlGui::instance()->rebuildTree(false);
+    return;
+  }
+  if(opt == "Reset"){ // reset db + models except current one
+    resetDb(false);
+    for(int i = PView::list.size() - 1; i >= 0; i--)
+      delete PView::list[i];
+    for(int i = GModel::list.size() - 1; i >= 0; i--)
+      if(GModel::list[i] != GModel::current()) delete GModel::list[i];
+    FlGui::instance()->rebuildTree(false);
+    return;
+  }*/
+  std::string::size_type dot = opt.find('.');
+  if(dot == std::string::npos) return;
+  GmshSetOption(opt.substr(0, dot), opt.substr(dot + 1), n.getValue());
+  drawContext::global()->draw();
+}
+
+// callback for number
+static void onelab_number_input_range_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+  std::string name((char*)data);
+  std::vector<onelab::number> numbers;
+  OnelabDatabase::instance()->get(numbers, name);
+  if(numbers.size()){
+    inputRange *o = (inputRange*)w;
+    onelab::number old = numbers[0];
+    if(o->doCallbackOnValues()){
+      numbers[0].setValue(o->value());
+      numbers[0].setMin(o->minimum());
+      numbers[0].setMax(o->maximum());
+      numbers[0].setStep(o->step());
+      numbers[0].setChoices(o->choices());
+    }
+    o->doCallbackOnValues(true);
+    numbers[0].setAttribute("Loop", o->loop());
+    numbers[0].setAttribute("Graph", o->graph());
+    setGmshOption(numbers[0]);
+    OnelabDatabase::instance()->set(numbers[0], std::string("localGUI"));
+    updateGraphs();
+    autoCheck(old, numbers[0]);
+  }
+}
+static void onelab_number_choice_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+  std::string name((char*)data);
+  std::vector<onelab::number> numbers;
+  OnelabDatabase::instance()->get(numbers, name);
+  if(numbers.size()){
+    Fl_Choice *o = (Fl_Choice*)w;
+    std::vector<double> choices = numbers[0].getChoices();
+    onelab::number old = numbers[0];
+    if(o->value() < (int)choices.size()) numbers[0].setValue(choices[o->value()]);
+    setGmshOption(numbers[0]);
+    OnelabDatabase::instance()->set(numbers[0], std::string("localGUI"));
+    autoCheck(old, numbers[0]);
+  }
+}
+static void onelab_number_check_button_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+  std::string name((char*)data);
+  std::vector<onelab::number> numbers;
+  OnelabDatabase::instance()->get(numbers, name);
+  if(numbers.size()){
+    Fl_Check_Button *o = (Fl_Check_Button*)w;
+    onelab::number old = numbers[0];
+    numbers[0].setValue(o->value());
+    setGmshOption(numbers[0]);
+    OnelabDatabase::instance()->set(numbers[0], std::string("localGUI"));
+    autoCheck(old, numbers[0]);
+  }
+}
+// add a parameter number to the tree
+Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c)
+{
+  char *path = strdup(getPath(n).c_str());
+  _treeStrings.push_back(path);
+
+  // enumeration (display choices as value labels, not numbers)
+  if(p.getChoices().size() &&
+     p.getChoices().size() == p.getValueLabels().size()){
+    Fl_Choice *but = new Fl_Choice(1, 1, ww, hh);
+    std::vector<Fl_Menu_Item> menu;
+    std::map<double, std::string> labels(p.getValueLabels());
+    for(std::map<double, std::string>::iterator it = labels.begin();
+        it != labels.end(); it++){
+      char *str = strdup(it->second.c_str());
+      _treeStrings.push_back(str);
+      Fl_Menu_Item menuItem = {str, 0, 0, 0, 0};
+      if(highlight) menuItem.labelcolor(c);
+      menu.push_back(menuItem);
+    }
+    Fl_Menu_Item it = {0};
+    menu.push_back(it);
+    but->copy(&menu[0]);
+    for(unsigned int i = 0; i < p.getChoices().size(); i++){
+      if(p.getValue() == p.getChoices()[i]){
+        but->value(i);
+        break;
+      }
+    }
+    but->callback(onelab_number_choice_cb, (void*)path);
+    but->align(FL_ALIGN_RIGHT);
+    if(p.getReadOnly()) but->deactivate();
+    return but;
+  }
+
+  // check box (boolean choice)
+  if(p.getChoices().size() == 2 &&
+     p.getChoices()[0] == 0 && p.getChoices()[1] == 1){
+    n->labelsize(FL_NORMAL_SIZE + 2);
+    Fl_Check_Button *but = new Fl_Check_Button(1, 1, ww / _widgetLabelRatio, hh);
+    but->box(FL_FLAT_BOX);
+    but->color(_tree->color());
+    but->value(p.getValue());
+    but->callback(onelab_number_check_button_cb, (void*)path);
+    if(highlight) but->color(c);
+    if(p.getReadOnly()) but->deactivate();
+    return but;
+  }
+
+  // non-editable value
+  if(p.getReadOnly()){
+    outputRange *but = new outputRange(1, 1, ww, hh);
+    //TODO but->callback(onelab_number_output_range_cb, (void*)path);
+    but->value(p.getValue());
+    but->align(FL_ALIGN_RIGHT);
+    but->graph(p.getAttribute("Graph"));
+    if(highlight) but->color(c);
+    return but;
+  }
+
+  // general number input
+  inputRange *but = new inputRange(1, 1, ww, hh, onelab::parameter::maxNumber(),
+                                   p.getAttribute("ReadOnlyRange") == "1");
+  but->value(p.getValue());
+  but->minimum(p.getMin());
+  but->maximum(p.getMax());
+  but->step(p.getStep());
+  but->choices(p.getChoices());
+  but->loop(p.getAttribute("Loop"));
+  but->graph(p.getAttribute("Graph"));
+  but->callback(onelab_number_input_range_cb, (void*)path);
+  but->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY);
+  but->align(FL_ALIGN_RIGHT);
+  if(highlight) but->color(c);
+  return but;
+}
+// callback for string
+static void onelab_string_input_choice_cb(Fl_Widget *w, void *data)
+{
+  if(!data) return;
+  std::string name((char*)data);
+  std::vector<onelab::string> strings;
+  OnelabDatabase::instance()->get(strings, name);
+  if(strings.size()){
+    Fl_Input_Choice *o = (Fl_Input_Choice*)w;
+    onelab::string old = strings[0];
+    strings[0].setValue(o->value());
+    std::string choices;
+    for(int i = 0; i < o->menubutton()->menu()->size(); i++){
+      if(o->menubutton()->menu()[i].flags & FL_MENU_TOGGLE){
+        if(o->menubutton()->menu()[i].flags & FL_MENU_VALUE)
+          choices += "1";
+        else
+          choices += "0";
+      }
+    }
+    if(choices.size())
+      strings[0].setAttribute("MultipleSelection", choices);
+    //setGmshOption(strings[0]);
+    OnelabDatabase::instance()->set(strings[0], "localGUI");
+    autoCheck(old, strings[0]);
+  }
+}
+// add parameter string to tree
+Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh,
+                                            Fl_Tree_Item *n, bool highlight, Fl_Color c)
+{
+  char *path = strdup(getPath(n).c_str());
+  _treeStrings.push_back(path);
+
+  // macro button
+  if(p.getAttribute("Macro") == "Gmsh"){
+    Fl_Button *but = new Fl_Button(1, 1, ww / _widgetLabelRatio, hh);
+    but->box(FL_FLAT_BOX);
+    but->color(_tree->color());
+    but->selection_color(_tree->color());
+    but->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
+    //TODO but->callback(onelab_string_button_cb, (void*)path);
+    if(highlight) but->color(c);
+    return but;
+  }
+
+  // non-editable value
+  if(p.getReadOnly()){
+    Fl_Output *but = new Fl_Output(1, 1, ww, hh);
+    but->value(p.getValue().c_str());
+    but->align(FL_ALIGN_RIGHT);
+    if(highlight) but->color(c);
+    return but;
+  }
+
+  // simple string (no menu)
+  if(p.getChoices().empty() && p.getKind() != "file"){
+    Fl_Input *but = new Fl_Input(1, 1, ww, hh);
+    but->value(p.getValue().c_str());
+    //TODO but->callback(onelab_string_input_cb, (void*)path);
+    but->when(FL_WHEN_ENTER_KEY);
+    but->align(FL_ALIGN_RIGHT);
+    if(highlight) but->color(c);
+    return but;
+  }
+
+  // general string input
+  Fl_Input_Choice *but = new Fl_Input_Choice(1, 1, ww, hh);
+  std::string multipleSelection = p.getAttribute("MultipleSelection");
+  if(multipleSelection.size())
+    ;//but->menubutton()->callback(multiple_selection_menu_cb, but);
+  std::vector<Fl_Menu_Item> menu;
+  for(unsigned int j = 0; j < p.getChoices().size(); j++){
+    char *str = strdup(p.getChoices()[j].c_str());
+    _treeStrings.push_back(str);
+    bool divider = (p.getKind() == "file" &&
+                    j == p.getChoices().size() - 1);
+    int choice = multipleSelection.size() ? FL_MENU_TOGGLE : 0;
+    if(multipleSelection.size() > j && multipleSelection[j] == '1')
+      choice |= FL_MENU_VALUE;
+    Fl_Menu_Item it = {str, 0, 0, 0, divider ? FL_MENU_DIVIDER : choice};
+    menu.push_back(it);
+  }
+  //if(p.getKind() == "file"){
+  //  Fl_Menu_Item it = {"Choose...", 0, onelab_input_choice_file_chooser_cb, (void*)n};
+  //  menu.push_back(it);
+  //  Fl_Menu_Item it2 = {"Edit...", 0, onelab_input_choice_file_edit_cb, (void*)n};
+  //  menu.push_back(it2);
+  //  if(GuessFileFormatFromFileName(p.getValue()) >= 0){
+  //    Fl_Menu_Item it3 = {"Merge...", 0, onelab_input_choice_file_merge_cb, (void*)n};
+  //    menu.push_back(it3);
+  //  }
+  //}
+  Fl_Menu_Item it = {0};
+  menu.push_back(it);
+  but->menubutton()->copy(&menu[0]);
+  but->value(p.getValue().c_str());
+  but->callback(onelab_string_input_choice_cb, (void*)path);
+  but->input()->when(FL_WHEN_ENTER_KEY);
+  but->align(FL_ALIGN_RIGHT);
+  if(highlight) but->input()->color(c);
+  return but;
+}
+Fl_Widget *onelabGroup::_addParameterWidget(onelab::region &p, int ww, int hh,
+                                            Fl_Tree_Item *n, bool highlight, Fl_Color c)
+{
+  char *path = strdup(getPath(n).c_str());
+  _treeStrings.push_back(path);
+
+  // non-editable value
+  if(p.getReadOnly()){
+    inputRegion *but = new inputRegion(1, 1, ww, hh, true);
+    but->value(p.getValue());
+    but->align(FL_ALIGN_RIGHT);
+    if(highlight) but->color(c);
+    return but;
+  }
+
+  inputRegion *but = new inputRegion(1, 1, ww, hh, false);
+  but->value(p.getValue());
+  but->align(FL_ALIGN_RIGHT);
+  //TODO but->callback(onelab_region_input_cb, (void*)path);
+  if(highlight) but->color(c);
+  return but;
+}
+
+Fl_Widget *onelabGroup::_addParameterWidget(onelab::function &p, int ww, int hh,
+                                            Fl_Tree_Item *n, bool highlight, Fl_Color c)
+{
+  // non-editable value
+  if(1 || p.getReadOnly()){
+    Fl_Output *but = new Fl_Output(1, 1, ww, hh);
+    but->value("TODO function");
+    but->align(FL_ALIGN_RIGHT);
+    if(highlight) but->color(c);
+    return but;
+  }
+}
+
+void onelabGroup::updateParameter(onelab::parameter &p)
+{
+  int type = p.getAttributeType();
+  if(type == onelab::number::attributeType())
+      return updateParameter(*(onelab::number *)&p);
+  if(type == onelab::string::attributeType())
+      return updateParameter(*(onelab::string *)&p);
+}
+void onelabGroup::updateParameter(onelab::number &p)
+{
+  Fl_Tree_Item *n = _tree->find_item(p.getName().c_str());
+  if(!n) {
+    addParameter(p);
+    return;
+  }
+  Fl_Group *grp = (Fl_Group *)n->widget();
+  // enumeration (display choices as value labels, not numbers)
+  if(p.getChoices().size() &&
+     p.getChoices().size() == p.getValueLabels().size()){
+    Fl_Choice *but = (Fl_Choice *)grp->child(0);
+    //std::vector<Fl_Menu_Item> menu;
+    //std::map<double, std::string> labels(p.getValueLabels());
+    //for(std::map<double, std::string>::iterator it = labels.begin();
+    //    it != labels.end(); it++){
+    //  char *str = strdup(it->second.c_str());
+    //  _treeStrings.push_back(str);
+    //  Fl_Menu_Item menuItem = {str, 0, 0, 0, 0};
+    //  if(highlight) menuItem.labelcolor(c);
+    //  menu.push_back(menuItem);
+    //}
+    //Fl_Menu_Item it = {0};
+    //menu.push_back(it);
+    //but->copy(&menu[0]);
+    for(unsigned int i = 0; i < p.getChoices().size(); i++){
+      if(p.getValue() == p.getChoices()[i]){
+        but->value(i);
+        break;
+      }
+    }
+    return;
+  }
+
+  // check box (boolean choice)
+  if(p.getChoices().size() == 2 &&
+     p.getChoices()[0] == 0 && p.getChoices()[1] == 1){
+    Fl_Check_Button *but = (Fl_Check_Button *)grp->child(0);
+    but->value(p.getValue());
+    return;
+  }
+
+  // non-editable value FIXME
+  if(p.getReadOnly()){
+    outputRange *but = (outputRange *)grp->child(0);;
+    but->value(p.getValue());
+    but->graph(p.getAttribute("Graph"));
+    return;
+  }
+
+  // general number input
+  inputRange *but = (inputRange *)grp->child(0);
+  but->value(p.getValue());
+  but->minimum(p.getMin());
+  but->maximum(p.getMax());
+  but->step(p.getStep());
+  but->choices(p.getChoices());
+  but->loop(p.getAttribute("Loop"));
+  but->graph(p.getAttribute("Graph"));
+}
+void onelabGroup::updateParameter(onelab::string &p)
+{
+  Fl_Tree_Item *n = _tree->find_item(p.getName().c_str());
+  if(!n) {
+    addParameter(p);
+    return;
+  }
+  Fl_Group *grp = (Fl_Group *)n->widget();
+  // macro button
+  if(p.getAttribute("Macro") == "Gmsh"){
+    return;
+  }
+
+  // non-editable value FIXME
+  if(p.getReadOnly()){
+    Fl_Output *but = (Fl_Output *)grp->child(0);
+    but->value(p.getValue().c_str());
+    return;
+  }
+
+  // simple string (no menu)
+  if(p.getChoices().empty() && p.getKind() != "file"){
+    Fl_Input *but = (Fl_Input *)grp->child(0);
+    but->value(p.getValue().c_str());
+    return;
+  }
+
+  // general string input TODO
+  Fl_Input_Choice *but = (Fl_Input_Choice *)grp->child(0);
+  but->value(p.getValue().c_str());
+}
+
+void onelabGroup::removeParameter(onelab::parameter &p)
+{
+  Fl_Tree_Item *n = _tree->find_item(p.getName().c_str());
+  _tree->remove(n);
+}
+
+void onelabGroup::_computeWidths()
+{
+  _baseWidth = (int)(_tree->w() - _tree->marginleft());
+  _indent = (int)(_tree->connectorwidth() / 2. + _tree->openicon()->w() / 2.);
+}
+
+bool onelabGroup::isBusy()
+{
+  std::string s(_butt[1]->label());
+  if(s == "Run") return false;
+  return true;
+}
+
+std::string onelabGroup::getPath(Fl_Tree_Item *item)
+{
+  if(!item){
+    Msg::Error("No item for path");
+    return "";
+  }
+  char path[1024];
+  if(_tree->item_pathname(path, sizeof(path), item)){
+    Msg::Error("Could not get path for item");
+    return "";
+  }
+  return std::string(path);
+}
+
+void onelabGroup::_addMenu(const std::string &path, Fl_Callback *callback, void *data)
+{
+  Fl_Tree_Item *n = _tree->add(path.c_str());
+  _tree->begin();
+  int ww = _baseWidth - (n->depth() + 1) * _indent;
+  int hh = n->labelsize() + 4;
+  Fl_Group *grp = new Fl_Group(1, 1, ww, hh);
+  Fl_Button *but = new Fl_Button(1, 1, ww, hh);
+  but->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
+  but->callback(callback, data);
+  but->box(FL_FLAT_BOX);
+  but->color(_tree->color());
+  but->selection_color(_tree->color());
+  grp->end();
+  if(!_enableTreeWidgetResize) grp->resizable(0);
+  _treeWidgets.push_back(grp);
+  std::string label = path;
+  std::string::size_type last = path.find_last_of('/');
+  if(last != std::string::npos) label = path.substr(last + 1);
+  but->copy_label(label.c_str());
+  n->widget(grp);
+  _tree->end();
+}
+
+void onelabGroup::_addSolverMenu(int num)
+{
+  std::ostringstream path;
+  path << "0Solver/View" << num;
+  Fl_Tree_Item *n = _tree->add(path.str().c_str());
+  int ww = _baseWidth - (n->depth() + 1) * _indent;
+  int hh = n->labelsize() + 4;
+  _tree->begin();
+  Fl_Group *grp = new Fl_Group(1, 1, ww, hh);
+  new solverButton(1, 1, ww, hh, num, _tree->color());
+  grp->end();
+  if(!_enableTreeWidgetResize) grp->resizable(0);
+  _treeWidgets.push_back(grp);
+  n->widget(grp);
+  _tree->end();
+}
+
+void onelabGroup::_addViewMenu(int num)
+{
+  // FIXME SEGFAULT in n->depth() with pend.py
+  std::ostringstream path;
+  path << "0Post-processing/View" << num;
+  Fl_Tree_Item *n = _tree->add(path.str().c_str());
+  int ww = _baseWidth - (n->depth() + 1) * _indent;
+  int hh = n->labelsize() + 4;
+  _tree->begin();
+  Fl_Group *grp = new Fl_Group(1, 1, ww, hh);
+  new viewButton(1, 1, ww, hh, num, _tree->color());
+  grp->end();
+  if(!_enableTreeWidgetResize) grp->resizable(0);
+  _treeWidgets.push_back(grp);
+  n->widget(grp);
+  _tree->end();
+}
+
+viewButton *onelabGroup::getViewButton(int num)
+{
+  char tmp[256];
+  sprintf(tmp, "0Post-processing/View%d", num);
+  Fl_Tree_Item *n = _tree->find_item(tmp);
+  if(n){
+    Fl_Group *grp = (Fl_Group*)n->widget();
+    return (viewButton*)grp->child(0);
+  }
+  return 0;
+}
diff --git a/Fltk/onelab2Group.h b/Fltk/onelab2Group.h
new file mode 100644
index 0000000..7981a28
--- /dev/null
+++ b/Fltk/onelab2Group.h
@@ -0,0 +1,95 @@
+#ifndef _ONELAB2_GROUP_H_
+#define _ONELAB2_GROUP_H_
+
+#include <vector>
+#include <set>
+#include <string>
+#include <FL/Fl.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Tree.H>
+#include <FL/Fl_Menu_Button.H>
+#include <FL/Fl_Input.H>
+#include "NetworkUtils.h"
+#include "onelab.h"
+
+class viewButton;
+
+class onelabGroup : public Fl_Group{
+private:
+  Fl_Input *server_ip, *server_port;
+  Fl_Tree *_tree;
+  Fl_Button *_butt[2];
+  Fl_Menu_Button *_gear;
+  int _gearOptionsStart, _gearOptionsEnd;
+  std::vector<Fl_Widget*> _treeWidgets;
+  std::vector<char*> _treeStrings;
+  bool _stop;
+  int _baseWidth, _indent;
+  int _minWindowWidth, _minWindowHeight;
+  double _widgetLabelRatio;
+  std::set<std::string> _manuallyClosed;
+  bool _enableTreeWidgetResize;
+
+  Fl_Widget *_addParameterWidget(onelab::parameter &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c);
+  Fl_Widget *_addParameterWidget(onelab::number &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c);
+  Fl_Widget *_addParameterWidget(onelab::string &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c);
+  Fl_Widget *_addParameterWidget(onelab::function &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c);
+  Fl_Widget *_addParameterWidget(onelab::region &p, int ww, int hh, Fl_Tree_Item *n, bool highlight, Fl_Color c);
+  void _computeWidths();
+  void _addMenu(const std::string &path, Fl_Callback *callback, void *data);
+  void _addSolverMenu(int num);
+  void _addViewMenu(int num);
+  std::set<std::string> _getClosedGmshMenus();
+  void _addGmshMenus();
+
+public:
+  onelabGroup(int x, int y, int w, int h, const char *l=0);
+  ~onelabGroup();
+  void updateGearMenu();
+  void rebuildSolverList();
+  void addLastPostProcessing();
+  void rebuildTree(bool deleteWidgets){} // useless in ONELAB2 ?
+  void enableTreeWidgetResize(bool value){ _enableTreeWidgetResize = value; }
+  void clearTree(bool deleteWidgets=true);
+  void openTreeItem(const std::string &name);
+  void createRemoteTree(bool keepLocal=true);
+  void setButtonVisibility();
+  void setButtonMode(const std::string &butt0, const std::string &butt1);
+  UInt32 getServerIP() {return ip4_inet_pton(server_ip->value());}
+  UInt16 getServerPort() {return (UInt16)strtoul(server_port->value(), NULL, 0);}
+  bool useServer();
+  void useServer(bool);
+  bool isBusy();
+  int getMinWindowWidth(){ return _minWindowWidth; }
+  int getMinWindowHeight(){ return _minWindowHeight; }
+  //template <class T> void addParameter(T &p);
+  void addParameter(onelab::parameter &p);
+  void updateParameter(onelab::parameter &p);
+  void updateParameter(onelab::number &p);
+  void updateParameter(onelab::string &p);
+  void removeParameter(onelab::parameter &p);
+  std::string getPath(Fl_Tree_Item *item);
+  void addSolver(const std::string &name, const std::string &exe,
+                 const std::string &hostName, int index);
+  void insertInManuallyClosed(const std::string &path)
+  {
+    _manuallyClosed.insert(path);
+  }
+  void removeFromManuallyClosed(const std::string &path)
+  {
+    _manuallyClosed.erase(path);
+  }
+  bool isManuallyClosed(const std::string &path)
+  {
+    return _manuallyClosed.find(path) != _manuallyClosed.end();
+  }
+  viewButton *getViewButton(int num);
+};
+
+void connect_cb(Fl_Widget *w, void *arg);
+void onelab_cb(Fl_Widget *w, void *data);
+inline void onelab_cb(void *data) {onelab_cb(0, data);}
+void solver_cb(Fl_Widget *w, void *data);
+inline void solver_batch_cb(void *data){} // TODO ?
+
+#endif
diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp
index 71bc0b7..5a4f9d7 100644
--- a/Fltk/onelabGroup.cpp
+++ b/Fltk/onelabGroup.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -44,759 +44,12 @@ typedef unsigned long intptr_t;
 #include "CreateFile.h"
 #include "drawContext.h"
 #include "PView.h"
-
-#if defined(HAVE_ONELAB_METAMODEL)
-#include "OnelabClients.h"
-#include "metamodel.h"
-#endif
+#include "treeIcons.h"
 
 // This file contains the Gmsh/FLTK specific parts of the ONELAB
 // interface. You'll need to reimplement this if you plan to build a different
 // ONELAB server.
 
-class onelabGmshServer : public GmshServer{
- private:
-  onelab::localNetworkClient *_client;
- public:
-  onelabGmshServer(onelab::localNetworkClient *client)
-    : GmshServer(), _client(client) {}
-  ~onelabGmshServer(){}
-  int NonBlockingSystemCall(const char *str)
-  {
-    return SystemCall(str);
-  }
-  int NonBlockingWait(double waitint, double timeout, int socket)
-  {
-    double start = GetTimeInSeconds();
-    while(1){
-      if(timeout > 0 && GetTimeInSeconds() - start > timeout)
-        return 2; // timeout
-      if(_client->getPid() < 0 || (_client->getExecutable().empty() &&
-                                   !CTX::instance()->solver.listen))
-        return 1; // process has been killed or we stopped listening
-      // check if there is data (call select with a zero timeout to
-      // return immediately, i.e., do polling)
-      int ret = Select(0, 0, socket);
-      if(ret == 0){ // nothing available
-        if(timeout < 0){
-          // if asked, refresh the onelab GUI, but no more than every 1/4th of
-          // a second
-          static double lastRefresh = 0.;
-          if(start - lastRefresh > 0.25){
-            std::vector<onelab::string> ps;
-            onelab::server::instance()->get(ps, "Gmsh/Action");
-            if(ps.size() && ps[0].getValue() == "refresh"){
-              ps[0].setVisible(false);
-              ps[0].setValue("");
-              onelab::server::instance()->set(ps[0]);
-              if(FlGui::available()) onelab_cb(0, (void*)"refresh");
-            }
-            lastRefresh = start;
-          }
-        }
-        // wait at most waitint seconds and respond to FLTK events
-        if(FlGui::available()) FlGui::instance()->wait(waitint);
-        // return to caller (we will be back here soon again)
-	if(timeout < 0) return 3;
-      }
-      else if(ret > 0){
-        return 0; // data is there!
-      }
-      else{
-        // an error happened
-        _client->setPid(-1);
-        return 1;
-      }
-    }
-  }
-  int LaunchClient()
-  {
-    std::string sockname;
-    std::ostringstream tmp;
-    const char *port = strstr(CTX::instance()->solver.socketName.c_str(), ":");
-    if(!port){
-      // Unix socket
-      tmp << CTX::instance()->homeDir << CTX::instance()->solver.socketName
-          << _client->getId();
-      sockname = FixWindowsPath(tmp.str());
-    }
-    else{
-      // TCP/IP socket
-      if(CTX::instance()->solver.socketName.size() &&
-         CTX::instance()->solver.socketName[0] == ':')
-        tmp << GetHostName(); // prepend hostname if only the port number is given
-      tmp << CTX::instance()->solver.socketName;
-      if(atoi(port + 1)) // nonzero port is given - append client id
-        tmp << _client->getId();
-      sockname = tmp.str();
-    }
-
-    std::string command = FixWindowsPath(_client->getExecutable());
-    if(command.size()){
-      std::vector<std::string> args = onelabUtils::getCommandLine(_client);
-      for(unsigned int i = 0; i < args.size(); i++)
-        command.append(" " + args[i]);
-      command.append(" " + _client->getSocketSwitch() +
-                     " \"" + _client->getName() + "\" %s");
-    }
-    else{
-      Msg::Info("Listening on socket '%s'", sockname.c_str());
-    }
-
-    int sock;
-    try{
-      sock = Start(command.c_str(), sockname.c_str(),
-                   CTX::instance()->solver.timeout);
-    }
-    catch(const char *err){
-      Msg::Error("Abnormal server termination (%s on socket %s)", err,
-                 sockname.c_str());
-      sock = -1;
-    }
-
-    return sock;
-  }
-};
-
-bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
-{
-  // receive a message on the associated GmshServer; 'master' is only used when
-  // creating subclients with GMSH_CONNECT.
-
-  double timer = GetTimeInSeconds();
-
-  if(!getGmshServer()){
-    Msg::Error("Abnormal server termination (no valid server)");
-    return false;
-  }
-
-  int type, length, swap;
-  if(!getGmshServer()->ReceiveHeader(&type, &length, &swap)){
-    Msg::Error("Abnormal server termination (did not receive message header)");
-    return false;
-  }
-
-  std::string message(length, ' '), blank = message;
-  if(!getGmshServer()->ReceiveMessage(length, &message[0])){
-    Msg::Error("Abnormal server termination (did not receive message body)");
-    return false;
-  }
-
-  if(message == blank && !(type == GmshSocket::GMSH_PROGRESS ||
-                           type == GmshSocket::GMSH_INFO ||
-                           type == GmshSocket::GMSH_WARNING ||
-                           type == GmshSocket::GMSH_ERROR)){
-    // we should still allow blank msg strings to be sent
-    Msg::Error("Abnormal server termination (blank message: client not stopped?)");
-    return false;
-  }
-
-  switch (type) {
-  case GmshSocket::GMSH_START:
-    setPid(atoi(message.c_str()));
-    break;
-  case GmshSocket::GMSH_STOP:
-    setPid(-1);
-    if(getFather()){
-      std::string reply = getName(); // reply is dummy
-      getFather()->getGmshServer()->SendMessage
-        (GmshSocket::GMSH_STOP, reply.size(), &reply[0]);
-    }
-    break;
-  case GmshSocket::GMSH_PARAMETER:
-  case GmshSocket::GMSH_PARAMETER_UPDATE:
-    {
-      std::string version, ptype, name;
-      onelab::parameter::getInfoFromChar(message, version, ptype, name);
-      if(onelab::parameter::version() != version){
-        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
-                   onelab::parameter::version().c_str(), version.c_str());
-      }
-      else if(ptype == "number"){
-        onelab::number p; p.fromChar(message);
-        if(type == GmshSocket::GMSH_PARAMETER_UPDATE){
-          std::vector<onelab::number> par; get(par, name);
-          if(par.size()) {
-            onelab::number y = p; p = par[0]; onelabUtils::updateNumber(p, y);
-          }
-        }
-        set(p);
-        if(p.getName() == getName() + "/Progress")
-          if(FlGui::available())
-            FlGui::instance()->setProgress(p.getLabel().c_str(), p.getValue(),
-                                           p.getMin(), p.getMax());
-      }
-      else if(ptype == "string"){
-        onelab::string p; p.fromChar(message);
-        if(type == GmshSocket::GMSH_PARAMETER_UPDATE){
-          std::vector<onelab::string> par; get(par, name);
-          if(par.size()){
-            onelab::string y = p; p = par[0]; onelabUtils::updateString(p,y);
-          }
-	}
-        set(p);
-      }
-      else if(ptype == "region"){
-        onelab::region p; p.fromChar(message); set(p);
-      }
-      else if(ptype == "function"){
-        onelab::function p; p.fromChar(message); set(p);
-      }
-      else
-        Msg::Error("Unknown ONELAB parameter type: %s", ptype.c_str());
-    }
-    break;
-  case GmshSocket::GMSH_PARAMETER_QUERY:
-    {
-      std::string version, ptype, name, reply;
-      onelab::parameter::getInfoFromChar(message, version, ptype, name);
-      if(onelab::parameter::version() != version){
-        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
-                   onelab::parameter::version().c_str(), version.c_str());
-      }
-      else if(ptype == "number"){
-        std::vector<onelab::number> par; get(par, name);
-        if(par.size() == 1) reply = par[0].toChar();
-      }
-      else if(ptype == "string"){
-        std::vector<onelab::string> par; get(par, name);
-        if(par.size() == 1) reply = par[0].toChar();
-      }
-      else if(ptype == "region"){
-        std::vector<onelab::region> par; get(par, name);
-        if(par.size() == 1) reply = par[0].toChar();
-      }
-      else if(ptype == "function"){
-        std::vector<onelab::function> par; get(par, name);
-        if(par.size() == 1) reply = par[0].toChar();
-      }
-      else
-        Msg::Error("Unknown ONELAB parameter type in query: %s", ptype.c_str());
-
-      if(reply.size()){
-        getGmshServer()->SendMessage
-          (GmshSocket::GMSH_PARAMETER, reply.size(), &reply[0]);
-      }
-      else{
-        reply = name;
-        getGmshServer()->SendMessage
-          (GmshSocket::GMSH_PARAMETER_NOT_FOUND, reply.size(), &reply[0]);
-      }
-    }
-    break;
-  case GmshSocket::GMSH_PARAMETER_QUERY_ALL:
-    {
-      std::string version, ptype, name, reply;
-      std::vector<std::string> replies;
-      onelab::parameter::getInfoFromChar(message, version, ptype, name);
-      if(onelab::parameter::version() != version){
-        Msg::Error("ONELAB version mismatch (server: %s / client: %s)",
-                   onelab::parameter::version().c_str(), version.c_str());
-      }
-      else if(ptype == "number"){
-        std::vector<onelab::number> numbers; get(numbers);
-        for(std::vector<onelab::number>::iterator it = numbers.begin();
-            it != numbers.end(); it++) replies.push_back((*it).toChar());
-      }
-      else if(ptype == "string"){
-        std::vector<onelab::string> strings; get(strings);
-        for(std::vector<onelab::string>::iterator it = strings.begin();
-            it != strings.end(); it++) replies.push_back((*it).toChar());
-      }
-      else if(ptype == "region"){
-        std::vector<onelab::region> regions; get(regions);
-        for(std::vector<onelab::region>::iterator it = regions.begin();
-            it != regions.end(); it++) replies.push_back((*it).toChar());
-      }
-      else if(ptype == "function"){
-        std::vector<onelab::function> functions; get(functions);
-        for(std::vector<onelab::function>::iterator it = functions.begin();
-            it != functions.end(); it++) replies.push_back((*it).toChar());
-      }
-      else
-        Msg::Error("Unknown ONELAB parameter type in query: %s", ptype.c_str());
-
-      for(unsigned int i = 0; i < replies.size(); i++)
-        getGmshServer()->SendMessage
-          (GmshSocket::GMSH_PARAMETER_QUERY_ALL, replies[i].size(), &replies[i][0]);
-      reply = "Sent all ONELAB " + ptype + "s";
-      getGmshServer()->SendMessage
-        (GmshSocket::GMSH_PARAMETER_QUERY_END, reply.size(), &reply[0]);
-    }
-    break;
-  case GmshSocket::GMSH_PARAMETER_CLEAR:
-    clear(message == "*" ? "" : message);
-    break;
-  case GmshSocket::GMSH_PROGRESS:
-    Msg::StatusBar(false, "%s %s", _name.c_str(), message.c_str());
-    break;
-  case GmshSocket::GMSH_INFO:
-    Msg::Direct("Info    : %s - %s", _name.c_str(), message.c_str());
-    break;
-  case GmshSocket::GMSH_WARNING:
-    Msg::Warning("%s - %s", _name.c_str(), message.c_str());
-    break;
-  case GmshSocket::GMSH_ERROR:
-    Msg::Error("%s - %s", _name.c_str(), message.c_str());
-    break;
-  case GmshSocket::GMSH_MERGE_FILE:
-    if(CTX::instance()->solver.autoMergeFile){
-      unsigned int n = PView::list.size();
-      MergePostProcessingFile(message, CTX::instance()->solver.autoShowViews,
-                              CTX::instance()->solver.autoShowLastStep, true);
-      drawContext::global()->draw();
-      if(FlGui::available() && n != PView::list.size()){
-        FlGui::instance()->rebuildTree(true);
-        FlGui::instance()->openModule("Post-processing");
-      }
-    }
-    break;
-  case GmshSocket::GMSH_OPEN_PROJECT:
-    OpenProject(message);
-    drawContext::global()->draw();
-    break;
-  case GmshSocket::GMSH_PARSE_STRING:
-    ParseString(message);
-    drawContext::global()->draw();
-    break;
-  case GmshSocket::GMSH_SPEED_TEST:
-    Msg::Info("got %d Mb message in %g seconds",
-              length / 1024 / 1024, GetTimeInSeconds() - timer);
-    break;
-  case GmshSocket::GMSH_VERTEX_ARRAY:
-    {
-      int n = PView::list.size();
-      PView::fillVertexArray(this, length, &message[0], swap);
-      if(FlGui::available())
-        FlGui::instance()->updateViews(n != (int)PView::list.size(), true);
-      drawContext::global()->draw();
-    }
-    break;
-  case GmshSocket::GMSH_CONNECT:
-    {
-      std::string::size_type first = 0;
-      std::string clientName = onelab::parameter::getNextToken(message, first);
-      std::string command = onelab::parameter::getNextToken(message, first);
-      gmshLocalNetworkClient* subClient =
-	new gmshLocalNetworkClient(clientName, command);
-      onelabGmshServer *server = new onelabGmshServer(subClient);
-      subClient->setPid(0);
-      int sock = server->LaunchClient();
-      if(sock < 0){ // could not establish the connection: aborting
-	server->Shutdown();
-	delete server;
-	Msg::Error("Could not connect client '%s'", subClient->getName().c_str());
-      }
-      else{
-	Msg::StatusBar(true, "Running '%s'...", subClient->getName().c_str());
-	subClient->setGmshServer(server);
-	subClient->setFather(this);
-	master->addClient(subClient);
-      }
-    }
-    break;
-  case GmshSocket::GMSH_OLPARSE:
-    {
-#if defined(HAVE_ONELAB_METAMODEL)
-      std::string::size_type first = 0;
-      std::string name = onelab::parameter::getNextToken(message, first);
-      std::string fileName = onelab::parameter::getNextToken(message, first);
-      std::vector<std::string> split = SplitOLFileName(fileName);
-      std::string ofileName = split[0] + split[1] ;
-      std::ofstream outfile(ofileName.c_str());
-      localSolverClient *c = new InterfacedClient(name,"","");
-      if (outfile.is_open()) {
-        Msg::Info("Preprocess file <%s>",ofileName.c_str());
-        c->convert_onefile(fileName, outfile);
-      }
-      else
-        Msg::Error("The file <%s> cannot be opened",ofileName.c_str());
-      outfile.close();
-
-      std::string reply = onelab::server::instance()->getChanged(c->getName()) ?
-        "true" : "false";
-      getGmshServer()->SendMessage
-        (GmshSocket::GMSH_OLPARSE, reply.size(), &reply[0]);
-
-      delete c;
-#endif
-    }
-    break;
-  case GmshSocket::GMSH_CLIENT_CHANGED:
-    {
-      std::string::size_type first = 0;
-      std::string command = onelab::parameter::getNextToken(message, first);
-       std::string name = onelab::parameter::getNextToken(message, first);
-     if(command == "get"){
-       std::string reply = onelab::server::instance()->getChanged(name) ?
-        "true" : "false";
-      getGmshServer()->SendMessage
-        (GmshSocket::GMSH_CLIENT_CHANGED, reply.size(), &reply[0]);
-      }
-      else if(command == "set"){
-	std::string changed = onelab::parameter::getNextToken(message, first);
-	onelab::server::instance()->setChanged(changed=="true"?true:false,name);
-      }
-    }
-    break;
-  default:
-    Msg::Warning("Received unknown message type (%d)", type);
-    break;
-  }
-
-  return true;
-}
-
-bool gmshLocalNetworkClient::run()
-{
- new_connection:
-  setPid(0); // dummy pid, should be non-negative
-
-  onelabGmshServer *server = new onelabGmshServer(this);
-
-  int sock = server->LaunchClient();
-
-  if(sock < 0){
-    // could not establish the connection: aborting
-    server->Shutdown();
-    delete server;
-    return false;
-  }
-
-  Msg::StatusBar(true, "Running '%s'...", _name.c_str());
-
-  setGmshServer(server);
-
-  while(1) {
-    if(getExecutable().empty() && !CTX::instance()->solver.listen){
-      // we stopped listening to the special "Listen" client
-      break;
-    }
-
-    // loop over all the clients (usually only one, but can be more if we
-    // spawned subclients) and check if data is available for one of them
-    bool stop = false, haveData = false;
-    gmshLocalNetworkClient *c = 0;
-    std::vector<gmshLocalNetworkClient*> toDelete;
-    for(int i = 0; i < getNumClients(); i++){
-      c = getClient(i);
-      if(c->getPid() < 0){
-        if(c == this){ // the "master" client stopped
-          stop = true;
-          break;
-        }
-        else{
-          // this subclient is not active anymore: shut down and delete its
-          // server and mark the client for deletion
-          GmshServer *s = c->getGmshServer();
-          c->setGmshServer(0);
-          c->setFather(0);
-          if(s){
-            s->Shutdown();
-            delete s;
-          }
-          toDelete.push_back(c);
-          continue;
-        }
-      }
-      GmshServer *s = c->getGmshServer();
-      if(!s){
-        Msg::Error("Abnormal server termination (no valid server)");
-        stop = true;
-        break;
-      }
-      else{
-        int ret = s->NonBlockingWait(0.001, -1.);
-        if(ret == 0){ // we have data from this particular client
-          haveData = true;
-          break;
-        }
-        else if(ret == 3){ // pass to the next client
-          continue;
-        }
-        else{ // an error occurred
-          stop = true;
-          break;
-        }
-      }
-    }
-    for(unsigned int i = 0; i < toDelete.size(); i++){
-      removeClient(toDelete[i]);
-      delete toDelete[i];
-    }
-
-    // break the while(1) if the master client has stopped or if we encountered
-    // a problem
-    if(stop) break;
-
-    // if data is available try to get the message from the corresponding
-    // client; break the while(1) if we could not receive the message
-    if(haveData && !c->receiveMessage(this)) break;
-
-    // break the while(1) if the master client has stopped
-    if(c == this && c->getPid() < 0) break;
-  }
-
-  // we are done running the (master) client: delete the servers and the
-  // subclients, if any remain (they should have been deleted already).
-  std::vector<gmshLocalNetworkClient*> toDelete;
-  for(int i = 0; i < getNumClients(); i++){
-    gmshLocalNetworkClient *c = getClient(i);
-    GmshServer *s = c->getGmshServer();
-    c->setGmshServer(0);
-    c->setFather(0);
-    if(s){
-      s->Shutdown();
-      delete s;
-    }
-    if(c != this){
-      if(c->getPid() > 0)
-        Msg::Error("Subclient %s was not stopped correctly", c->getName().c_str());
-      toDelete.push_back(c);
-    }
-  }
-  for(unsigned int i = 0; i < toDelete.size(); i++){
-    removeClient(toDelete[i]);
-    delete toDelete[i];
-  }
-
-  Msg::StatusBar(true, "Done running '%s'", _name.c_str());
-
-  if(getExecutable().empty()){
-    Msg::Info("Client disconnected: starting new connection");
-    goto new_connection;
-  }
-
-  return true;
-}
-
-bool gmshLocalNetworkClient::kill()
-{
-  // FIXME: we should kill all the clients in the list
-  if(getPid() > 0) {
-    if(KillProcess(getPid())){
-      Msg::Info("Killed '%s' (pid %d)", _name.c_str(), getPid());
-      if(FlGui::available())
-        FlGui::instance()->setProgress("Killed", 0, 0, 0);
-      setPid(-1);
-      return true;
-    }
-  }
-  setPid(-1);
-  return false;
-}
-
-static void initializeLoops()
-{
-  onelabUtils::initializeLoop("1");
-  onelabUtils::initializeLoop("2");
-  onelabUtils::initializeLoop("3");
-
-  if(FlGui::available() && onelab::server::instance()->getChanged())
-    FlGui::instance()->rebuildTree(false);
-}
-
-static bool incrementLoops()
-{
-  bool ret = false;
-  if(onelabUtils::incrementLoop("3"))      ret = true;
-  else if(onelabUtils::incrementLoop("2")) ret = true;
-  else if(onelabUtils::incrementLoop("1")) ret = true;
-
-  //Define ONELAB parameter indicating whether or not in a loop
-  onelab::number n("0Metamodel/Loop",ret?1:0);
-  n.setVisible(false);
-  onelab::server::instance()->set(n);
-
-  if(FlGui::available() && onelab::server::instance()->getChanged())
-    FlGui::instance()->rebuildTree(false);
-
-  return ret;
-}
-
-static void updateGraphs()
-{
-  bool redraw = false;
-  for(int i = 0; i < 18; i++){
-    std::ostringstream tmp;
-    tmp << i;
-    bool ret = onelabUtils::updateGraph(tmp.str());
-    redraw = redraw || ret;
-  }
-  if(redraw){
-    // don't delete the widgets, as this is called in widget callbacks
-    FlGui::instance()->updateViews(true, false);
-    drawContext::global()->draw();
-  }
-}
-
-static std::string timeStamp()
-{
-  time_t now;
-  time(&now);
-  tm *t = localtime(&now);
-  char stamp[32];
-  // stamp.size() is always 20
-  sprintf(stamp, "_%04d-%02d-%02d_%02d-%02d-%02d", 1900 + t->tm_year,
-          1 + t->tm_mon, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
-  return std::string(stamp);
-}
-
-static void saveDb(const std::string &fileName)
-{
-  FILE *fp = Fopen(fileName.c_str(), "wb");
-  if(fp){
-    Msg::StatusBar(true, "Saving database '%s'...", fileName.c_str());
-    onelab::server::instance()->toFile(fp);
-    fclose(fp);
-    Msg::StatusBar(true, "Done saving database '%s'", fileName.c_str());
-  }
-  else
-    Msg::Error("Could not save database '%s'", fileName.c_str());
-}
-
-static void archiveOutputFiles(const std::string &fileName)
-{
-  std::string stamp;
-  std::vector<onelab::string> ps;
-  onelab::server::instance()->get(ps,"0Metamodel/9Tag");
-  if(ps.size())
-    stamp.assign(ps[0].getValue()+timeStamp());
-  else
-    stamp.assign(timeStamp());
-
-  // add time stamp in all output files in the db, and rename them on disk
-  std::vector<onelab::string> strings;
-  onelab::server::instance()->get(strings);
-  for(unsigned int i = 0; i < strings.size(); i++){
-    if(strings[i].getName().find("9Output files") != std::string::npos){
-      std::vector<std::string> names = strings[i].getChoices();
-      names.push_back(strings[i].getValue());
-      for(unsigned int j = 0; j < names.size(); j++){
-        std::vector<std::string> split = SplitFileName(names[j]);
-        int n = split[1].size();
-        // if name is not already stamped
-        if(n < 18 || split[1][n-3] != '-' || split[1][n-6] != '-' ||
-           split[1][n-9] != '_'){
-          std::string old = names[j];
-          CreateSingleDir(split[0] + "archive/");
-          names[j] = split[0] + "archive/" + split[1] + stamp + split[2];
-          Msg::Info("Renaming '%s' into '%s'", old.c_str(), names[j].c_str());
-          rename(old.c_str(), names[j].c_str());
-        }
-      }
-      strings[i].setValue(names.back());
-      names.pop_back();
-      strings[i].setChoices(names);
-      onelab::server::instance()->set(strings[i]);
-    }
-  }
-
-  // save stamped db
-  {
-    std::vector<std::string> split = SplitFileName(fileName);
-    CreateSingleDir(split[0] + "archive/");
-    saveDb(split[0] + "archive/" + split[1] + stamp + split[2]);
-  }
-
-  FlGui::instance()->rebuildTree(true);
-}
-
-static void archiveSolutionFiles(const std::string &fileName)
-{
-  // extract tag from dbName
-  std::vector<std::string> split = SplitFileName(fileName);
-  std::string tag = split[1].substr(6); // cut off 'onelab'
-
-  // add tag to all solution files in the db, and rename them on disk
-  std::vector<onelab::string> strings;
-  onelab::server::instance()->get(strings,"0Metamodel/9Solution files");
-  if(strings.size()){
-    std::vector<std::string> names = strings[0].getChoices();
-    if(names.size()){
-      for(unsigned int j = 0; j < names.size(); j++){
-	std::vector<std::string> split = SplitFileName(names[j]);
-	std::string old = names[j];
-	CreateSingleDir(split[0] + "archive/");
-	names[j] = split[0] + "archive/" + split[1] + tag + split[2];
-	Msg::Info("Renaming '%s' into '%s'", old.c_str(), names[j].c_str());
-	rename(old.c_str(), names[j].c_str());
-      }
-      strings[0].setValue(names[0]);
-      strings[0].setChoices(names);
-      onelab::server::instance()->set(strings[0]);
-      FlGui::instance()->rebuildTree(true);
-    }
-  }
-}
-
-static void loadDb(const std::string &name)
-{
-  Msg::StatusBar(true, "Loading database '%s'...", name.c_str());
-  FILE *fp = Fopen(name.c_str(), "rb");
-  if(fp){
-    onelab::server::instance()->fromFile(fp);
-    fclose(fp);
-    Msg::StatusBar(true, "Done loading database '%s'", name.c_str());
-  }
-  else
-    Msg::Error("Could not load database '%s'", name.c_str());
-}
-
-static void resetDb(bool runGmshClient)
-{
-  Msg::Info("Resetting database");
-
-  // clear everything except persistent parameters
-  std::vector<onelab::number> allNumbers, persistentNumbers;
-  std::vector<onelab::string> allStrings, persistentStrings;
-  onelab::server::instance()->get(allNumbers);
-  onelab::server::instance()->get(allStrings);
-  for(unsigned int i = 0; i < allNumbers.size(); i++){
-    if(allNumbers[i].getAttribute("Persistent") == "1")
-      persistentNumbers.push_back(allNumbers[i]);
-  }
-  for(unsigned int i = 0; i < allStrings.size(); i++){
-    if(allStrings[i].getAttribute("Persistent") == "1")
-      persistentStrings.push_back(allStrings[i]);
-  }
-
-  // TODO FIXME: this will be removed once the new stable version of getdp is
-  // released
-  for(onelab::server::citer it = onelab::server::instance()->firstClient();
-      it != onelab::server::instance()->lastClient(); it++){
-    onelab::client *c = it->second;
-    std::vector<onelab::number> ps;
-    c->get(ps, c->getName() + "/UseCommandLine");
-    if(ps.size()) persistentNumbers.push_back(ps[0]);
-    c->get(ps, c->getName() + "/GuessModelName");
-    if(ps.size()) persistentNumbers.push_back(ps[0]);
-    std::vector<onelab::string> ps2;
-    c->get(ps2, c->getName() + "/FileExtension");
-    if(ps2.size()) persistentStrings.push_back(ps2[0]);
-  }
-  // END TODO
-
-  // clear the db
-  onelab::server::instance()->clear();
-
-  // run Gmsh client for non-python metamodels
-  if(runGmshClient && onelab::server::instance()->findClient("Gmsh") !=
-     onelab::server::instance()->lastClient())
-    onelabUtils::runGmshClient("reset", CTX::instance()->solver.autoMesh);
-
-  for(unsigned int i = 0; i < persistentNumbers.size(); i++){
-    Msg::Info("Restoring persistent parameter %s",
-              persistentNumbers[i].getName().c_str());
-    onelab::server::instance()->set(persistentNumbers[i]);
-  }
-  for(unsigned int i = 0; i < persistentStrings.size(); i++){
-    Msg::Info("Restoring persistent parameter %s",
-              persistentStrings[i].getName().c_str());
-    onelab::server::instance()->set(persistentStrings[i]);
-  }
-}
-
 void onelab_cb(Fl_Widget *w, void *data)
 {
   if(!data) return;
@@ -814,7 +67,7 @@ void onelab_cb(Fl_Widget *w, void *data)
     FlGui::instance()->onelab->setButtonMode("", "kill");
     for(onelab::server::citer it = onelab::server::instance()->firstClient();
         it != onelab::server::instance()->lastClient(); it++){
-      onelab::string o(it->second->getName() + "/Action", "stop");
+      onelab::string o((*it)->getName() + "/Action", "stop");
       o.setVisible(false);
       o.setNeverChanged(true);
       onelab::server::instance()->set(o);
@@ -826,7 +79,7 @@ void onelab_cb(Fl_Widget *w, void *data)
     FlGui::instance()->onelab->stop(true);
     for(onelab::server::citer it = onelab::server::instance()->firstClient();
         it != onelab::server::instance()->lastClient(); it++)
-      it->second->kill();
+      (*it)->kill();
     return;
   }
 
@@ -843,20 +96,36 @@ void onelab_cb(Fl_Widget *w, void *data)
     // add user defined tag, if any
     std::vector<onelab::string> ps;
     onelab::server::instance()->get(ps,"0Metamodel/9Tag");
-    if(ps.size()){
-      fileName.assign("onelab" + ps[0].getValue() + ".db");
-      ps[0].setValue("");
-      onelab::server::instance()->set(ps[0]);
+    if(ps.size() && ps[0].getValue().size()){
+      fileName.assign("onelab_" + ps[0].getValue() + ".db");
+    }
+
+    // save db in "restore" mode"
+    double restoreMode=0;
+    std::vector<onelab::number> pn;
+    onelab::server::instance()->get(pn,"0Metamodel/9Use restored solution");
+    if(pn.size()){
+      restoreMode=pn[0].getValue();
+      pn[0].setValue(2); // special value
+      onelab::server::instance()->set(pn[0]);
     }
 
     std::string s;
     s.assign(SplitFileName(GModel::current()->getFileName())[0] + fileName);
     if(fileChooser(FILE_CHOOSER_CREATE, "Save", "*.db", s.c_str())){
-      archiveSolutionFiles(fileChooserGetName(1));
+      if(!restoreMode)
+	archiveSolutionFiles(fileChooserGetName(1));
       saveDb(fileChooserGetName(1));
     }
 
-    return;
+    // switch back to normal "run" mode"
+    onelab::server::instance()->get(pn,"0Metamodel/9Use restored solution");
+    if(pn.size()){
+      pn[0].setValue(0);
+      onelab::server::instance()->set(pn[0]);
+    }
+    action = "check";
+    //return;
   }
 
   if(FlGui::instance()->onelab->isBusy()){
@@ -868,15 +137,6 @@ void onelab_cb(Fl_Widget *w, void *data)
     std::string db = SplitFileName(GModel::current()->getFileName())[0] + "onelab.db";
     if(fileChooser(FILE_CHOOSER_SINGLE, "Load", "*.db", db.c_str()))
       loadDb(fileChooserGetName(1));
-
-    // switch to "restore" mode"
-    // (the metamodel will use archived solution files)
-    std::vector<onelab::number> pn;
-    onelab::server::instance()->get(pn,"0Metamodel/9Use restored solution");
-    if(pn.size()){
-      pn[0].setValue(1);
-      onelab::server::instance()->set(pn[0]);
-    }
     action = "check";
   }
 
@@ -904,10 +164,11 @@ void onelab_cb(Fl_Widget *w, void *data)
     // iterate over all other clients (there should normally only be one)
     for(onelab::server::citer it = onelab::server::instance()->firstClient();
 	it != onelab::server::instance()->lastClient(); it++){
-      onelab::client *c = it->second;
+      onelab::client *c = *it;
       if(c->getName() == "Gmsh" || // local Gmsh client
 	 c->getName() == "Listen" || // unknown client connecting through "-listen"
-	 c->getName() == "GmshRemote") // distant post-processing Gmsh client
+	 c->getName() == "GmshRemote" || // distant post-processing Gmsh client
+         c->getName().find("NoAutoRun") != std::string::npos) // client name contains "NoAutoRun"
 	continue;
       if(action != "initialize") onelabUtils::guessModelName(c);
       onelab::string o(c->getName() + "/Action", action);
@@ -924,7 +185,7 @@ void onelab_cb(Fl_Widget *w, void *data)
         // for this solver
         onelab::server::instance()->setChanged(false, c->getName());
 
-	FlGui::instance()->onelab->checkForErrors(c->getName());
+        FlGui::instance()->onelab->checkForErrors(c->getName());
       }
       if(FlGui::instance()->onelab->stop()) break;
     }
@@ -993,20 +254,22 @@ static void onelab_choose_executable_cb(Fl_Widget *w, void *data)
 
     // try to find an executable automatically (this is really useful for
     // beginners)
-    if(CTX::instance()->argv0.size()){
-      std::vector<std::string> split = SplitFileName(CTX::instance()->argv0);
+    std::string gmshPath = SplitFileName(CTX::instance()->exeFileName)[0];
+    if(gmshPath.size()){
       std::string name = c->getName();
       for(unsigned int i = 0; i < name.size(); i++)
         name[i] = tolower(name[i]);
-      std::string path = split[0] + name;
+      std::string path1 = gmshPath + name;
+      std::string path2 = gmshPath + "data/" + name;
 #if defined(WIN32)
-      path += ".exe";
+      path1 += ".exe";
+      path2 += ".exe";
 #endif
-      if(!StatFile(path)){
-        exe = path;
+      if(!StatFile(path1)) exe = path1;
+      else if(!StatFile(path2)) exe = path2;
+      if(exe.size())
         Msg::Info("Automatically found %s executable: %s", c->getName().c_str(),
                   exe.c_str());
-      }
     }
 
     if(exe.empty()){
@@ -1141,6 +404,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
   _tree->color(col);
   _tree->callback(onelab_tree_cb);
   _tree->connectorstyle(FL_TREE_CONNECTOR_SOLID);
+  _tree->connectorcolor(FL_DARK2);
   // _tree->marginleft(0);
   // _tree->usericonmarginleft(0);
   // _tree->labelmarginleft(0);
@@ -1267,6 +531,7 @@ void onelabGroup::_addParameter(T &p)
 void onelabGroup::_addMenu(const std::string &path, Fl_Callback *callback, void *data)
 {
   Fl_Tree_Item *n = _tree->add(path.c_str());
+  //n->labelsize(FL_NORMAL_SIZE + 4);
   _tree->begin();
   int ww = _baseWidth - (n->depth() + 1) * _indent;
   int hh = n->labelsize() + 4;
@@ -1443,10 +708,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh,
      p.getChoices().size() == p.getValueLabels().size()){
     Fl_Choice *but = new Fl_Choice(1, 1, ww, hh);
     std::vector<Fl_Menu_Item> menu;
+    std::vector<double> choices = p.getChoices();
     std::map<double, std::string> labels(p.getValueLabels());
-    for(std::map<double, std::string>::iterator it = labels.begin();
-        it != labels.end(); it++){
-      char *str = strdup(it->second.c_str());
+    for(unsigned int i = 0; i < choices.size(); i++){
+      char *str = strdup(labels[choices[i]].c_str());
       _treeStrings.push_back(str);
       Fl_Menu_Item menuItem = {str, 0, 0, 0, 0};
       if(highlight) menuItem.labelcolor(c);
@@ -1455,8 +720,8 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh,
     Fl_Menu_Item it = {0};
     menu.push_back(it);
     but->copy(&menu[0]);
-    for(unsigned int i = 0; i < p.getChoices().size(); i++){
-      if(p.getValue() == p.getChoices()[i]){
+    for(unsigned int i = 0; i < choices.size(); i++){
+      if(p.getValue() == choices[i]){
         but->value(i);
         break;
       }
@@ -1476,7 +741,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::number &p, int ww, int hh,
     but->color(_tree->color());
     but->value(p.getValue());
     but->callback(onelab_number_check_button_cb, (void*)path);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->labelcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     if(p.getReadOnly()) but->deactivate();
     return but;
   }
@@ -1516,9 +784,16 @@ static void onelab_string_button_cb(Fl_Widget *w, void *data)
   std::vector<onelab::string> strings;
   onelab::server::instance()->get(strings, name);
   if(strings.size()){
-    std::string tmp = FixRelativePath(GModel::current()->getFileName(),
-                                      strings[0].getValue());
-    MergeFile(tmp);
+    if(strings[0].getAttribute("Macro") == "GmshParseString"){
+      // parse string directly
+      ParseString(strings[0].getValue());
+    }
+    else{
+      // merge file
+      std::string tmp = FixRelativePath(GModel::current()->getFileName(),
+                                        strings[0].getValue());
+      MergeFile(tmp);
+    }
     setGmshOption(strings[0]);
     autoCheck(strings[0], strings[0], true);
     drawContext::global()->draw();
@@ -1616,14 +891,19 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh,
   _treeStrings.push_back(path);
 
   // macro button
-  if(p.getAttribute("Macro") == "Gmsh"){
+  if(p.getAttribute("Macro") == "Gmsh" ||
+     p.getAttribute("Macro") == "GmshMergeFile" ||
+     p.getAttribute("Macro") == "GmshParseString"){
     Fl_Button *but = new Fl_Button(1, 1, ww / _widgetLabelRatio, hh);
     but->box(FL_FLAT_BOX);
     but->color(_tree->color());
     but->selection_color(_tree->color());
     but->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
     but->callback(onelab_string_button_cb, (void*)path);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->labelcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     return but;
   }
 
@@ -1632,7 +912,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh,
     Fl_Output *but = new Fl_Output(1, 1, ww, hh);
     but->value(p.getValue().c_str());
     but->align(FL_ALIGN_RIGHT);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->textcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     return but;
   }
 
@@ -1643,7 +926,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh,
     but->callback(onelab_string_input_cb, (void*)path);
     but->when(FL_WHEN_ENTER_KEY);
     but->align(FL_ALIGN_RIGHT);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->textcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     return but;
   }
 
@@ -1681,7 +967,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, int ww, int hh,
   but->callback(onelab_string_input_choice_cb, (void*)path);
   but->input()->when(FL_WHEN_ENTER_KEY);
   but->align(FL_ALIGN_RIGHT);
-  if(highlight) but->input()->color(c);
+  if(highlight){
+    but->input()->color(c);
+    but->input()->textcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+  }
   return but;
 }
 
@@ -1711,7 +1000,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::region &p, int ww, int hh,
     inputRegion *but = new inputRegion(1, 1, ww, hh, true);
     but->value(p.getValue());
     but->align(FL_ALIGN_RIGHT);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->labelcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     return but;
   }
 
@@ -1719,7 +1011,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::region &p, int ww, int hh,
   but->value(p.getValue());
   but->align(FL_ALIGN_RIGHT);
   but->callback(onelab_region_input_cb, (void*)path);
-  if(highlight) but->color(c);
+  if(highlight){
+    but->color(c);
+    but->labelcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+  }
   return but;
 }
 
@@ -1731,7 +1026,10 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::function &p, int ww, int hh,
     Fl_Output *but = new Fl_Output(1, 1, ww, hh);
     but->value("TODO function");
     but->align(FL_ALIGN_RIGHT);
-    if(highlight) but->color(c);
+    if(highlight){
+      but->color(c);
+      but->textcolor(fl_contrast(FL_FOREGROUND_COLOR, c));
+    }
     return but;
   }
 }
@@ -1745,9 +1043,23 @@ void onelabGroup::rebuildTree(bool deleteWidgets)
   std::set<std::string> closed = _getClosedGmshMenus();
 
   _tree->clear();
+
+  if(CTX::instance()->guiColorScheme){
+    _tree->openicon(&open_pixmap_dark);
+    _tree->closeicon(&open_pixmap_dark);
+  }
+  else{
+    _tree->openicon(&open_pixmap_light);
+    _tree->closeicon(&open_pixmap_light);
+  }
   _tree->sortorder(FL_TREE_SORT_ASCENDING);
   _tree->selectmode(FL_TREE_SELECT_NONE);
 
+  // hide all the widgets we have added in the tree to make sure they don't get
+  // spurious events (until they are deleted)
+  for(unsigned int i = 0; i < _treeWidgets.size(); i++)
+    _treeWidgets[i]->hide();
+
   // we don't delete widgets everytime the tree is rebuilt to minimize potential
   // race conditions (e.g. during heavy user interaction with autoCheck, with
   // risks to call handle() or focus() on deleted widgets)
@@ -1991,7 +1303,7 @@ void onelabGroup::rebuildSolverList()
     if(i < names.size()){
       onelab::server::citer it = onelab::server::instance()->findClient(names[i]);
       if(it != onelab::server::instance()->lastClient())
-        it->second->setIndex(i);
+        (*it)->setIndex(i);
       opt_solver_name(i, GMSH_SET, names[i]);
       opt_solver_executable(i, GMSH_SET, exes[i]);
       opt_solver_remote_login(i, GMSH_SET, hosts[i]);
@@ -2026,7 +1338,7 @@ void onelabGroup::addSolver(const std::string &name, const std::string &executab
   onelab::server::citer it = onelab::server::instance()->findClient(name);
   if(it != onelab::server::instance()->lastClient()){
     if(needToChooseExe(executable))
-      onelab_choose_executable_cb(0, (void *)it->second);
+      onelab_choose_executable_cb(0, (void *)(*it));
     return; // solver already exists
   }
 
@@ -2034,8 +1346,8 @@ void onelabGroup::addSolver(const std::string &name, const std::string &executab
   std::vector<onelab::client*> networkClients;
   for(onelab::server::citer it = onelab::server::instance()->firstClient();
       it != onelab::server::instance()->lastClient(); it++)
-    if(it->second->isNetworkClient())
-      networkClients.push_back(it->second);
+    if((*it)->isNetworkClient())
+      networkClients.push_back(*it);
   for(unsigned int i = 0; i < networkClients.size(); i++){
     delete networkClients[i];
   }
@@ -2095,65 +1407,6 @@ void solver_cb(Fl_Widget *w, void *data)
   CTX::instance()->launchSolverAtStartup = -1;
 }
 
-void solver_batch_cb(Fl_Widget *w, void *data)
-{
-  int num = (intptr_t)data;
-  if(num < 0) return;
-  std::string name = opt_solver_name(num, GMSH_GET, "");
-  std::string exe = opt_solver_executable(num, GMSH_GET, "");
-  std::string host = opt_solver_remote_login(num, GMSH_GET, "");
-  if(exe.empty()){
-    Msg::Error("Solver executable name not provided");
-    return;
-  }
-
-  onelab::number n("0Metamodel/Batch", CTX::instance()->batch);
-  n.setVisible(false);
-  onelab::server::instance()->set(n);
-
-  // create client
-  onelab::localNetworkClient *c = new gmshLocalNetworkClient(name, exe, host);
-  c->setIndex(num);
-  onelab::string o(c->getName() + "/Action");
-
-  // initialize
-  onelabUtils::runGmshClient("initialize", CTX::instance()->solver.autoMesh);
-  o.setValue("initialize");
-  onelab::server::instance()->set(o);
-  c->run();
-
-  // load db
-  if(CTX::instance()->solver.autoSaveDatabase){
-    std::string db = SplitFileName(GModel::current()->getFileName())[0] + "onelab.db";
-    if(!StatFile(db)) loadDb(db);
-  }
-
-  // check
-  onelabUtils::runGmshClient("check", CTX::instance()->solver.autoMesh);
-  onelabUtils::guessModelName(c);
-  o.setValue("check");
-  onelab::server::instance()->set(o);
-  c->run();
-
-  // compute
-  initializeLoops();
-  do{
-    onelabUtils::runGmshClient("compute", CTX::instance()->solver.autoMesh);
-    onelabUtils::guessModelName(c);
-    o.setValue("compute");
-    onelab::server::instance()->set(o);
-    c->run();
-    onelab::server::instance()->setChanged(false, c->getName());
-  } while(incrementLoops());
-
-  if(CTX::instance()->solver.autoSaveDatabase ||
-     CTX::instance()->solver.autoArchiveOutputFiles){
-    std::string db = SplitFileName(GModel::current()->getFileName())[0] + "onelab.db";
-    if(CTX::instance()->solver.autoArchiveOutputFiles) archiveOutputFiles(db);
-    if(CTX::instance()->solver.autoSaveDatabase) saveDb(db);
-  }
-}
-
 void flgui_wait_cb(double time)
 {
   FlGui::instance()->wait(time);
diff --git a/Fltk/onelabGroup.h b/Fltk/onelabGroup.h
index f125872..801517d 100644
--- a/Fltk/onelabGroup.h
+++ b/Fltk/onelabGroup.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/openglWindow.cpp b/Fltk/openglWindow.cpp
index 6a83afb..c2dd089 100644
--- a/Fltk/openglWindow.cpp
+++ b/Fltk/openglWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -17,6 +17,7 @@
 #include "MElement.h"
 #include "Numeric.h"
 #include "FlGui.h"
+#include "OpenFile.h"
 #include "drawContext.h"
 #include "Context.h"
 #include "Trackball.h"
@@ -41,7 +42,6 @@ static void navigator_handler(void *data)
   }
 }
 
-
 static void lassoZoom(drawContext *ctx, mousePosition &click1, mousePosition &click2)
 {
   if(click1.win[0] == click2.win[0] || click1.win[1] == click2.win[1]) return;
@@ -65,7 +65,8 @@ openglWindow::openglWindow(int x, int y, int w, int h)
   :  Fl_Gl_Window(x, y, w, h, "gl"), _lock(false), _drawn(false),
      _selection(ENT_NONE), _trySelection(0), Nautilus(0)
 {
-  _ctx = new drawContext();
+  _ctx = new drawContext(this);
+
   for(int i = 0; i < 3; i++) _point[i] = 0.;
   for(int i = 0; i < 4; i++) _trySelectionXYWH[i] = 0;
   _lassoXY[0] = _lassoXY[1] = 0;
@@ -73,7 +74,7 @@ openglWindow::openglWindow(int x, int y, int w, int h)
   addPointMode = lassoMode = selectionMode = false;
   endSelection = undoSelection = invertSelection = quitSelection = 0;
 
-  if(CTX::instance()->gamepad)   Fl::add_timeout(.5, navigator_handler, (void*)this);
+  if(CTX::instance()->gamepad) Fl::add_timeout(.5, navigator_handler, (void*)this);
 }
 
 openglWindow::~openglWindow()
@@ -156,8 +157,7 @@ void openglWindow::draw()
   _ctx->viewport[1] = 0;
   _ctx->viewport[2] = w();
   _ctx->viewport[3] = h();
-  glViewport(_ctx->viewport[0], _ctx->viewport[1],
-             _ctx->viewport[2], _ctx->viewport[3]);
+  glViewport(0, 0, pixel_w(), pixel_h());
 
   if(lassoMode) {
     // draw the zoom or selection lasso on top of the current scene (without
@@ -215,7 +215,10 @@ void openglWindow::draw()
 
     _ctx->draw3d();
     glColor4ubv((GLubyte *) & CTX::instance()->color.fg);
-    glPointSize((float)CTX::instance()->geom.pointSize);
+    float ps = CTX::instance()->geom.pointSize;
+    if(_ctx->isHighResolution())
+      ps *= CTX::instance()->highResolutionPointSizeFactor;
+    glPointSize(ps);
     glBegin(GL_POINTS);
     glVertex3d(_point[0], _point[1], _point[2]);
     glEnd();
@@ -240,12 +243,12 @@ void openglWindow::draw()
     if(CTX::instance()->camera && !CTX::instance()->stereo){
       Camera *cam = &(_ctx->camera);
       if (!cam->on) cam->init();
-      cam->giveViewportDimension(_ctx->viewport[2],_ctx->viewport[3]);
+      cam->giveViewportDimension(_ctx->viewport[2], _ctx->viewport[3]);
       glMatrixMode(GL_PROJECTION);
       glLoadIdentity();
 
       glFrustum(cam->glFleft, cam->glFright, cam->glFbottom,
-                cam->glFtop, cam->glFnear , cam->glFfar*cam->Lc );
+                cam->glFtop, cam->glFnear, cam->glFfar*cam->Lc);
 
       glMatrixMode(GL_MODELVIEW);
       glLoadIdentity();
@@ -344,7 +347,23 @@ int openglWindow::handle(int event)
   case FL_PUSH:
     if(Fl::event_clicks() == 1 && !selectionMode){
       // double-click and not in selection mode
-      status_options_cb(0, (void*)"quick_access");
+      std::vector<GVertex*> vertices;
+      std::vector<GEdge*> edges;
+      std::vector<GFace*> faces;
+      std::vector<GRegion*> regions;
+      std::vector<MElement*> elements;
+      std::vector<SPoint2> points;
+      _select(ENT_ALL, false, false, Fl::event_x(), Fl::event_y(), 5, 5,
+              vertices, edges, faces, regions, elements, points);
+      if(points.size()){ // double-click on graph point
+        CTX::instance()->post.graphPointX = points[0].x();
+        CTX::instance()->post.graphPointY = points[0].y();
+        if(CTX::instance()->post.graphPointCommand.size())
+          ParseString(CTX::instance()->post.graphPointCommand, true);
+      }
+      else{ // popup quick access menu
+        status_options_cb(0, (void*)"quick_access");
+      }
       Fl::event_clicks(-1);
       return 1;
     }
@@ -609,9 +628,10 @@ int openglWindow::handle(int event)
         std::vector<GFace*> faces;
         std::vector<GRegion*> regions;
         std::vector<MElement*> elements;
+        std::vector<SPoint2> points;
         bool res = _select(_selection, false, CTX::instance()->mouseHoverMeshes,
                            (int)_curr.win[0], (int)_curr.win[1], 5, 5,
-                           vertices, edges, faces, regions, elements);
+                           vertices, edges, faces, regions, elements, points);
         if((_selection == ENT_ALL && res) ||
            (_selection == ENT_POINT && vertices.size()) ||
            (_selection == ENT_LINE && edges.size()) ||
@@ -629,6 +649,17 @@ int openglWindow::handle(int event)
         std::string text;
         if(ge) text += ge->getInfoString();
         if(me) text += me->getInfoString();
+        if(points.size()){
+          char tmp[256];
+          sprintf(tmp, "Point (%g, %g)", points[0].x(), points[0].y());
+          text += tmp;
+          if(CTX::instance()->post.graphPointCommand.size()){
+            text += std::string(" - Double-click to execute\n\n");
+            std::string cmd = CTX::instance()->post.graphPointCommand;
+            std::replace(cmd.begin(), cmd.end(), '\r', ' ');
+            text += cmd;
+          }
+        }
         if(CTX::instance()->tooltips)
           drawTooltip(text);
         else
@@ -643,13 +674,32 @@ int openglWindow::handle(int event)
   }
 }
 
+int openglWindow::pixel_w()
+{
+#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) && (FL_PATCH_VERSION >= 4)
+  return Fl_Gl_Window::pixel_w();
+#else
+  return w();
+#endif
+}
+
+int openglWindow::pixel_h()
+{
+#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) && (FL_PATCH_VERSION >= 4)
+  return Fl_Gl_Window::pixel_h();
+#else
+  return h();
+#endif
+}
+
 bool openglWindow::_select(int type, bool multiple, bool mesh,
                            int x, int y, int w, int h,
                            std::vector<GVertex*> &vertices,
                            std::vector<GEdge*> &edges,
                            std::vector<GFace*> &faces,
                            std::vector<GRegion*> &regions,
-                           std::vector<MElement*> &elements)
+                           std::vector<MElement*> &elements,
+                           std::vector<SPoint2> &points)
 {
   // same lock as in draw() to prevent firing up a GL_SELECT rendering pass
   // while a GL_RENDER pass is happening (due to the asynchronus nature of
@@ -658,7 +708,8 @@ bool openglWindow::_select(int type, bool multiple, bool mesh,
   _lock = true;
   make_current();
   bool ret = _ctx->select(type, multiple, mesh, x, y, w, h,
-                          vertices, edges, faces, regions, elements);
+                          vertices, edges, faces, regions, elements,
+                          points);
   _lock = false;
   return ret;
 }
@@ -668,7 +719,8 @@ char openglWindow::selectEntity(int type,
                                 std::vector<GEdge*> &edges,
                                 std::vector<GFace*> &faces,
                                 std::vector<GRegion*> &regions,
-                                std::vector<MElement*> &elements)
+                                std::vector<MElement*> &elements,
+                                std::vector<SPoint2> &points)
 {
   // force keyboard focus in GL window
   take_focus();
@@ -719,7 +771,7 @@ char openglWindow::selectEntity(int type,
       else if(_select(_selection, multi, true, _trySelectionXYWH[0],
                       _trySelectionXYWH[1], _trySelectionXYWH[2],
                       _trySelectionXYWH[3], vertices, edges, faces,
-                      regions, elements)){
+                      regions, elements, points)){
         _selection = ENT_NONE;
         selectionMode = false;
         if(add)
diff --git a/Fltk/openglWindow.h b/Fltk/openglWindow.h
index 27fe212..d159a97 100644
--- a/Fltk/openglWindow.h
+++ b/Fltk/openglWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -35,12 +35,14 @@ class openglWindow : public Fl_Gl_Window {
   bool _select(int type, bool multiple, bool mesh, int x, int y, int w, int h,
                std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges,
                std::vector<GFace*> &faces, std::vector<GRegion*> &regions,
-               std::vector<MElement*> &elements);
+               std::vector<MElement*> &elements, std::vector<SPoint2> &points);
  protected:
   void draw();
   int handle(int);
  public:
-  time_t  rawtime,  prev_rawtime;
+  int pixel_w();
+  int pixel_h();
+  time_t rawtime,  prev_rawtime;
   double response_frequency;
   bool addPointMode, lassoMode, selectionMode;
   int endSelection, undoSelection, invertSelection, quitSelection;
@@ -51,7 +53,7 @@ class openglWindow : public Fl_Gl_Window {
   char selectEntity(int type,
                     std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges,
                     std::vector<GFace*> &faces, std::vector<GRegion*> &regions,
-                    std::vector<MElement*> &elements);
+                    std::vector<MElement*> &elements, std::vector<SPoint2> &points);
   static openglWindow *getLastHandled(){ return _lastHandled; }
   static void setLastHandled(openglWindow *w){ _lastHandled = w; }
   void drawTooltip(const std::string &text);
diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp
index a4deb5d..f7b1d11 100644
--- a/Fltk/optionWindow.cpp
+++ b/Fltk/optionWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -36,7 +36,7 @@ typedef unsigned long intptr_t;
 #include "Context.h"
 #include "StringUtils.h"
 
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB) && not defined(HAVE_ONELAB2)
 #include "gmshLocalNetworkClient.h"
 #endif
 
@@ -105,6 +105,7 @@ static Fl_Menu_Item menu_position[] = {
   {"Right",        0, 0, 0},
   {"Full",         0, 0, 0},
   {"Top third",    0, 0, 0},
+  {"In model coordinates", 0, 0, 0},
   {0}
 };
 
@@ -298,6 +299,12 @@ static void general_options_ok_cb(Fl_Widget *w, void *data)
                  (CTX::instance()->homeDir + CTX::instance()->sessionFileName).c_str());
   opt_general_options_save(0, GMSH_SET, o->general.butt[9]->value());
   opt_general_expert_mode(0, GMSH_SET, o->general.butt[10]->value());
+
+  if(opt_general_gui_color_scheme(0, GMSH_GET, 0) != o->general.butt[21]->value()){
+    opt_general_gui_color_scheme(0, GMSH_SET, o->general.butt[21]->value());
+    opt_general_color_scheme(0, GMSH_SET|GMSH_GUI, o->general.butt[21]->value() ? 0. : 1.);
+  }
+
   opt_general_tooltips(0, GMSH_SET, o->general.butt[13]->value());
   opt_general_confirm_overwrite(0, GMSH_SET, o->general.butt[14]->value());
   opt_general_rotation_center_cg(0, GMSH_SET, o->general.butt[15]->value());
@@ -367,7 +374,6 @@ static void general_options_ok_cb(Fl_Widget *w, void *data)
   opt_general_camera_mode(0, GMSH_SET, o->general.butt[18]->value());
   o->activate((const char*)data);
 
-
   opt_general_eye_sep_ratio(0, GMSH_SET, o->general.value[29]->value());
   opt_general_focallength_ratio(0, GMSH_SET, o->general.value[30]->value());
   opt_general_camera_aperture(0, GMSH_SET, o->general.value[31]->value());
@@ -424,9 +430,9 @@ static void geometry_options_ok_cb(Fl_Widget *w, void *data)
   opt_geometry_occ_fix_small_faces(0, GMSH_SET, o->geo.butt[12]->value());
   opt_geometry_occ_sew_faces(0, GMSH_SET, o->geo.butt[13]->value());
   opt_geometry_occ_connect_faces(0, GMSH_SET, o->geo.butt[15]->value());
+  opt_geometry_occ_scaling(0, GMSH_SET, o->geo.value[20]->value());
 
   opt_geometry_light_two_side(0, GMSH_SET, o->geo.butt[14]->value());
-  int old_hide_compound = (int)opt_geometry_hide_compounds(0, GMSH_GET, 0);
   opt_geometry_hide_compounds(0, GMSH_SET, o->geo.butt[17]->value());
 
   opt_geometry_normals(0, GMSH_SET, o->geo.value[0]->value());
@@ -456,12 +462,6 @@ static void geometry_options_ok_cb(Fl_Widget *w, void *data)
   opt_geometry_transform(0, GMSH_SET, o->geo.choice[3]->value());
   opt_geometry_label_type(0, GMSH_SET, o->geo.choice[4]->value() + 1);
 
-  if(old_hide_compound != (int)opt_geometry_hide_compounds(0, GMSH_GET, 0)){
-    GModel::current()->setCompoundVisibility();
-    FlGui::instance()->resetVisibility();
-    CTX::instance()->mesh.changed = ENT_ALL;
-  }
-
   if(CTX::instance()->fastRedraw)
     CTX::instance()->post.draw = CTX::instance()->mesh.draw = 0;
   drawContext::global()->draw();
@@ -568,7 +568,7 @@ static void solver_options_ok_cb(Fl_Widget *w, void *data)
   optionWindow *o = FlGui::instance()->options;
   o->activate((const char*)data);
 
-#if defined(HAVE_ONELAB)
+#if defined(HAVE_ONELAB) && not defined(HAVE_ONELAB2)
   int old_listen = (int)opt_solver_listen(0, GMSH_GET, o->solver.butt[0]->value());
   opt_solver_listen(0, GMSH_SET, o->solver.butt[0]->value());
   if(!old_listen && o->solver.butt[0]->value()){
@@ -578,12 +578,14 @@ static void solver_options_ok_cb(Fl_Widget *w, void *data)
       c->run();
     }
     else
-      it->second->run();
+      (*it)->run();
   }
 #endif
 
   opt_solver_socket_name(0, GMSH_SET, o->solver.input[0]->value());
   opt_solver_timeout(0, GMSH_SET, o->solver.value[0]->value());
+  opt_solver_python_interpreter(0, GMSH_SET, o->solver.input[1]->value());
+  opt_solver_octave_interpreter(0, GMSH_SET, o->solver.input[2]->value());
 
   if(CTX::instance()->fastRedraw)
     CTX::instance()->post.draw = CTX::instance()->mesh.draw = 0;
@@ -1359,67 +1361,73 @@ optionWindow::optionWindow(int deltaFontSize)
     {
       Fl_Group *o = new Fl_Group
         (L + WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General");
+
       general.butt[10] = new Fl_Check_Button
         (L + 2 * WB, 2 * WB + 1 * BH, BW, BH, "Enable expert mode");
       general.butt[10]->type(FL_TOGGLE_BUTTON);
       general.butt[10]->callback(general_options_ok_cb);
 
+      general.butt[21] = new Fl_Check_Button
+        (L + 2 * WB, 2 * WB + 2 * BH, BW, BH, "Use dark interface");
+      general.butt[21]->type(FL_TOGGLE_BUTTON);
+      general.butt[21]->callback(general_options_ok_cb);
+
       general.butt[13] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 2 * BH, BW, BH, "Show tooltips");
+        (L + 2 * WB, 2 * WB + 3 * BH, BW, BH, "Show tooltips");
       general.butt[13]->type(FL_TOGGLE_BUTTON);
       general.butt[13]->callback(general_options_ok_cb);
 
       general.butt[6] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 3 * BH, BW, BH, "Show bounding boxes");
+        (L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Show bounding boxes");
       general.butt[6]->tooltip("(Alt+b)");
       general.butt[6]->type(FL_TOGGLE_BUTTON);
       general.butt[6]->callback(general_options_ok_cb);
 
       general.butt[2] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 4 * BH, BW, BH,
+        (L + 2 * WB, 2 * WB + 5 * BH, BW, BH,
          "Draw simplified model during user interaction");
       general.butt[2]->tooltip("(Alt+f)");
       general.butt[2]->type(FL_TOGGLE_BUTTON);
       general.butt[2]->callback(general_options_ok_cb, (void*)"fast_redraw");
 
       general.butt[11] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Enable mouse hover over meshes");
+        (L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable mouse hover over meshes");
       general.butt[11]->type(FL_TOGGLE_BUTTON);
       general.butt[11]->callback(general_options_ok_cb);
 
       general.butt[3] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable double buffering");
+        (L + 2 * WB, 2 * WB + 7 * BH, BW, BH, "Enable double buffering");
       general.butt[3]->type(FL_TOGGLE_BUTTON);
       general.butt[3]->callback(general_options_ok_cb);
 
       general.butt[12] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 7 * BH, BW, BH, "Enable antialiasing");
+        (L + 2 * WB, 2 * WB + 8 * BH, BW, BH, "Enable antialiasing");
       general.butt[12]->type(FL_TOGGLE_BUTTON);
       general.butt[12]->callback(general_options_ok_cb);
 
       general.butt[5] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 8 * BH, BW, BH,
+        (L + 2 * WB, 2 * WB + 9 * BH, BW, BH,
          "Use trackball rotation instead of Euler angles");
       general.butt[5]->type(FL_TOGGLE_BUTTON);
       general.butt[5]->callback(general_options_ok_cb);
 
       general.butt[15] = new Fl_Check_Button
-        (L + 2 * WB, 2 * WB + 9 * BH, BW, BH, "Rotate around pseudo center of mass");
+        (L + 2 * WB, 2 * WB + 10 * BH, BW, BH, "Rotate around pseudo center of mass");
       general.butt[15]->type(FL_TOGGLE_BUTTON);
       general.butt[15]->callback(general_options_ok_cb, (void*)"rotation_center");
 
       general.push[0] = new Fl_Button
-        (L + 2 * IW - 2 * WB, 2 * WB + 10 * BH, BB, BH, "Select");
+        (L + 2 * IW - 2 * WB, 2 * WB + 11 * BH, BB, BH, "Select");
       general.push[0]->callback(general_options_rotation_center_select_cb);
 
       general.value[8] = new Fl_Value_Input
-        (L + 2 * WB, 2 * WB + 10 * BH, IW / 3, BH);
+        (L + 2 * WB, 2 * WB + 11 * BH, IW / 3, BH);
       general.value[8]->callback(general_options_ok_cb, (void*)"rotation_center_coord");
       general.value[9] = new Fl_Value_Input
-        (L + 2 * WB + IW / 3, 2 * WB + 10 * BH, IW / 3, BH);
+        (L + 2 * WB + IW / 3, 2 * WB + 11 * BH, IW / 3, BH);
       general.value[9]->callback(general_options_ok_cb, (void*)"rotation_center_coord");
       general.value[10] = new Fl_Value_Input
-        (L + 2 * WB + 2 * IW / 3, 2 * WB + 10 * BH, IW / 3, BH, "Rotation center");
+        (L + 2 * WB + 2 * IW / 3, 2 * WB + 11 * BH, IW / 3, BH, "Rotation center");
       general.value[10]->align(FL_ALIGN_RIGHT);
       general.value[10]->callback(general_options_ok_cb, (void*)"rotation_center_coord");
 
@@ -1478,7 +1486,10 @@ optionWindow::optionWindow(int deltaFontSize)
       Fl_Button *b2 = new Fl_Button
         (L + 2 * WB, 2 * WB + 9 * BH, BW, BH, "Restore all options to default settings");
       b2->callback(options_restore_defaults_cb);
-      b2->labelcolor(FL_DARK_RED);
+      if(CTX::instance()->guiColorScheme)
+        b2->color(FL_DARK_RED);
+      else
+        b2->labelcolor(FL_DARK_RED);
 
       o->end();
     }
@@ -1778,6 +1789,7 @@ optionWindow::optionWindow(int deltaFontSize)
         {"Dark", 0, 0, 0},
         {"Light", 0, 0, 0},
         {"Grayscale", 0, 0, 0},
+        {"Reverse", 0, 0, 0},
         {0}
       };
 
@@ -1946,6 +1958,11 @@ optionWindow::optionWindow(int deltaFontSize)
       geo.butt[15]->type(FL_TOGGLE_BUTTON);
       geo.butt[15]->callback(geometry_options_ok_cb);
 
+      geo.value[20] = new Fl_Value_Input
+        (L + 2 * WB, 2 * WB + 9 * BH, IW, BH, "Global model scaling");
+      geo.value[20]->align(FL_ALIGN_RIGHT);
+      geo.value[20]->callback(geometry_options_ok_cb);
+
 #if !defined(HAVE_OCC)
       b2->deactivate();
       geo.butt[16]->deactivate();
@@ -1953,6 +1970,7 @@ optionWindow::optionWindow(int deltaFontSize)
       geo.butt[12]->deactivate();
       geo.butt[13]->deactivate();
       geo.butt[15]->deactivate();
+      geo.value[20]->deactivate();
 #endif
       o->end();
     }
@@ -2511,8 +2529,8 @@ optionWindow::optionWindow(int deltaFontSize)
       mesh.value[5]->callback(mesh_options_ok_cb);
 
       static Fl_Menu_Item menu_quality_type[] = {
+        {"SICN", 0, 0, 0},
         {"Gamma", 0, 0, 0},
-        {"Eta", 0, 0, 0},
         {"Rho", 0, 0, 0},
         {"Disto", 0, 0, 0},
         {0}
@@ -2699,6 +2717,16 @@ optionWindow::optionWindow(int deltaFontSize)
         solver.butt[0]->type(FL_TOGGLE_BUTTON);
         solver.butt[0]->callback(solver_options_ok_cb);
 
+        solver.input[1] = new Fl_Input
+          (L + 2 * WB, 2 * WB + 4 * BH, IW, BH, "Python interpreter");
+        solver.input[1]->align(FL_ALIGN_RIGHT);
+        solver.input[1]->callback(solver_options_ok_cb);
+
+        solver.input[2] = new Fl_Input
+          (L + 2 * WB, 2 * WB + 5 * BH, IW, BH, "Octave interpreter");
+        solver.input[2]->align(FL_ALIGN_RIGHT);
+        solver.input[2]->callback(solver_options_ok_cb);
+
         o->end();
       }
     }
@@ -3027,28 +3055,28 @@ optionWindow::optionWindow(int deltaFontSize)
         (L + 2 * WB, 2 * WB + 9 * BH, IW / 2, BH);
       view.value[20]->minimum(-2000);
       view.value[20]->maximum(2000);
-      view.value[20]->step(1);
+      view.value[20]->step(0.5);
       view.value[20]->callback(view_options_ok_cb);
       view.value[21] = new Fl_Value_Input
         (L + 2 * WB + IW / 2, 2 * WB + 9 * BH, IW / 2, BH, "2D axes/value scale position");
       view.value[21]->align(FL_ALIGN_RIGHT);
       view.value[21]->minimum(-2000);
       view.value[21]->maximum(2000);
-      view.value[21]->step(1);
+      view.value[21]->step(0.5);
       view.value[21]->callback(view_options_ok_cb);
 
       view.value[22] = new Fl_Value_Input
         (L + 2 * WB, 2 * WB + 10 * BH, IW / 2, BH);
       view.value[22]->minimum(0);
       view.value[22]->maximum(2000);
-      view.value[22]->step(1);
+      view.value[22]->step(0.5);
       view.value[22]->callback(view_options_ok_cb);
       view.value[23] = new Fl_Value_Input
         (L + 2 * WB + IW / 2, 2 * WB + 10 * BH, IW / 2, BH, "2D axes/value scale size");
       view.value[23]->align(FL_ALIGN_RIGHT);
       view.value[23]->minimum(0);
       view.value[23]->maximum(2000);
-      view.value[23]->step(1);
+      view.value[23]->step(0.5);
       view.value[23]->callback(view_options_ok_cb);
 
       o->end();
@@ -4017,17 +4045,17 @@ void optionWindow::activate(const char *what)
     }
   }
   else if(!strcmp(what, "view_axes_auto_2d")){
-    if(view.choice[16]->value()){
-      view.value[20]->deactivate();
-      view.value[21]->deactivate();
-      view.value[22]->deactivate();
-      view.value[23]->deactivate();
-    }
-    else{
+    if(view.choice[16]->value() == 0 || view.choice[16]->value() == 12){
       view.value[20]->activate();
       view.value[21]->activate();
       view.value[22]->activate();
       view.value[23]->activate();
     }
+    else{
+      view.value[20]->deactivate();
+      view.value[21]->deactivate();
+      view.value[22]->deactivate();
+      view.value[23]->deactivate();
+    }
   }
 }
diff --git a/Fltk/optionWindow.h b/Fltk/optionWindow.h
index b7dea7b..e5c08ff 100644
--- a/Fltk/optionWindow.h
+++ b/Fltk/optionWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,7 +33,7 @@ class optionWindow{
 
   struct{
     Fl_Group *group;
-    Fl_Check_Button *butt[21];
+    Fl_Check_Button *butt[22];
     Fl_Button *push[20];
     Fl_Value_Input *value[50];
     Fl_Button *color[50];
@@ -45,7 +45,7 @@ class optionWindow{
   struct{
     Fl_Group *group;
     Fl_Check_Button *butt[20];
-    Fl_Value_Input *value[20];
+    Fl_Value_Input *value[25];
     Fl_Button *color[50];
     Fl_Choice *choice[20];
   } geo;
diff --git a/Fltk/outputRange.h b/Fltk/outputRange.h
index 72d09f5..3ef7063 100644
--- a/Fltk/outputRange.h
+++ b/Fltk/outputRange.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -32,14 +32,14 @@ class outputRange : public Fl_Group {
                        37, 38, 39, 40,  43, 44, 45, 46,
                        49, 50, 51, 52};
       for(int i = 0; i < 36; i++){
-        if(_graph_val[i] == '1')
+        if(_graph_val[i] != '0')
           ((Fl_Menu_Item*)_graph_menu->menu())[index[i]].set();
         else
           ((Fl_Menu_Item*)_graph_menu->menu())[index[i]].clear();
       }
     }
     bool yellow = false;
-    for(int i = 0; i < 36; i++) if(_graph_val[i] == '1') yellow = true;
+    for(int i = 0; i < 36; i++) if(_graph_val[i] != '0') yellow = true;
     if(yellow){
       _graph_butt->value(1);
       _graph_butt->selection_color(FL_YELLOW);
@@ -60,8 +60,10 @@ class outputRange : public Fl_Group {
                      25, 26, 27, 28,  31, 32, 33, 34,
                      37, 38, 39, 40,  43, 44, 45, 46,
                      49, 50, 51, 52};
-    for(int i = 0; i < 36; i++)
-      v[i] = b->_graph_menu->menu()[index[i]].value() ? '1' : '0';
+    for(int i = 0; i < 36; i++){
+      // 1=iso, 2=continuous, 3=discrete, 4=numeric
+      v[i] = b->_graph_menu->menu()[index[i]].value() ? '3' : '0';
+    }
     b->_set_graph_value(v, false);
     b->do_callback();
   }
@@ -140,7 +142,11 @@ class outputRange : public Fl_Group {
   }
   void graph(const std::string &val){ _set_graph_value(val); }
   std::string graph(){ return _graph_val; }
-  void color(int col){ _output->color(col); }
+  void color(int col)
+  {
+    _output->color(col);
+    _output->textcolor(fl_contrast(FL_FOREGROUND_COLOR, col));
+  }
 };
 
 #endif
diff --git a/Fltk/paletteWindow.h b/Fltk/paletteWindow.h
index 973ff28..0eeca4d 100644
--- a/Fltk/paletteWindow.h
+++ b/Fltk/paletteWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/partitionDialog.cpp b/Fltk/partitionDialog.cpp
index 5041f40..5614e4e 100644
--- a/Fltk/partitionDialog.cpp
+++ b/Fltk/partitionDialog.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/partitionDialog.h b/Fltk/partitionDialog.h
index d27bfb9..3e98143 100644
--- a/Fltk/partitionDialog.h
+++ b/Fltk/partitionDialog.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/pluginWindow.cpp b/Fltk/pluginWindow.cpp
index a448d99..9fdc50b 100644
--- a/Fltk/pluginWindow.cpp
+++ b/Fltk/pluginWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/pluginWindow.h b/Fltk/pluginWindow.h
index eae93cc..0e7bcc9 100644
--- a/Fltk/pluginWindow.h
+++ b/Fltk/pluginWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/projectionEditor.cpp b/Fltk/projectionEditor.cpp
index 1c5f905..2dd1bdd 100644
--- a/Fltk/projectionEditor.cpp
+++ b/Fltk/projectionEditor.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/projectionEditor.h b/Fltk/projectionEditor.h
index 293a06a..3b5f2ed 100644
--- a/Fltk/projectionEditor.h
+++ b/Fltk/projectionEditor.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/solverButton.cpp b/Fltk/solverButton.cpp
index a38dda8..46756cb 100644
--- a/Fltk/solverButton.cpp
+++ b/Fltk/solverButton.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -25,8 +25,7 @@ static void solver_remove_cb(Fl_Widget *w, void *data)
 
   onelab::server::citer it = onelab::server::instance()->findClient(name);
   if(it != onelab::server::instance()->lastClient()){
-    onelab::client *c = it->second;
-    delete c;
+    delete *it;
   }
   FlGui::instance()->onelab->rebuildSolverList();
 }
diff --git a/Fltk/solverButton.h b/Fltk/solverButton.h
index fc8eb3f..af76a31 100644
--- a/Fltk/solverButton.h
+++ b/Fltk/solverButton.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/spherePositionWidget.h b/Fltk/spherePositionWidget.h
index eee2117..f7fc1a4 100644
--- a/Fltk/spherePositionWidget.h
+++ b/Fltk/spherePositionWidget.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/statisticsWindow.cpp b/Fltk/statisticsWindow.cpp
index 455227c..42d552c 100644
--- a/Fltk/statisticsWindow.cpp
+++ b/Fltk/statisticsWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,6 +18,8 @@
 #include "OS.h"
 #include "Field.h"
 
+enum QM_HISTO {QMH_SICN_XY, QMH_SICN_3D, QMH_GAMMA_XY, QMH_GAMMA_3D, QMH_RHO_XY, QMH_RHO_3D};
+
 void statistics_cb(Fl_Widget *w, void *data)
 {
   FlGui::instance()->stats->show();
@@ -30,57 +32,50 @@ static void statistics_update_cb(Fl_Widget *w, void *data)
 
 static void statistics_histogram_cb(Fl_Widget *w, void *data)
 {
-  std::string name((const char*)data);
+  QM_HISTO qmh = *(QM_HISTO*)data;
 
   std::vector<double> x, y;
 
-  if(name == "Gamma2D"){
+  if (qmh == QMH_SICN_XY) {
     for(int i = 0; i < 100; i++){
-      x.push_back((double)i / 99);
+      x.push_back((double)(2*i-99) / 99);
       y.push_back(FlGui::instance()->stats->quality[0][i]);
     }
-    new PView("Gamma", "# Elements", x, y);
+    new PView("SICN", "# Elements", x, y);
   }
-  else if(name == "Eta2D"){
+  else if (qmh == QMH_GAMMA_XY) {
     for(int i = 0; i < 100; i++){
       x.push_back((double)i / 99);
       y.push_back(FlGui::instance()->stats->quality[1][i]);
     }
-    new PView("Eta", "# Elements", x, y);
+    new PView("Gamma", "# Elements", x, y);
   }
-  else if(name == "Rho2D"){
+  else if (qmh == QMH_RHO_XY) {
     for(int i = 0; i < 100; i++){
       x.push_back((double)i / 99);
       y.push_back(FlGui::instance()->stats->quality[2][i]);
     }
     new PView("Rho", "# Elements", x, y);
   }
-  else if(name == "Disto2D"){
-    for(int i = 0; i < 100; i++){
-      x.push_back((double)i / 99);
-      y.push_back(FlGui::instance()->stats->quality[3][i]);
-    }
-    new PView("Disto", "# Elements", x, y);
-  }
-  else{
+  else {
     std::vector<GEntity*> entities_;
     GModel::current()->getEntities(entities_);
     std::map<int, std::vector<double> > d;
-    for(unsigned int i = 0; i < entities_.size(); i++){
-      if(entities_[i]->dim() < 2) continue;
-      for(unsigned int j = 0; j < entities_[i]->getNumMeshElements(); j++){
-	MElement *e = entities_[i]->getMeshElement(j);
-	if(name == "Gamma3D")
-	  d[e->getNum()].push_back(e->gammaShapeMeasure());
-	else if(name == "Eta3D")
-	  d[e->getNum()].push_back(e->etaShapeMeasure());
-	else if(name == "Rho3D")
-	  d[e->getNum()].push_back(e->rhoShapeMeasure());
-	else
-	  d[e->getNum()].push_back(e->distoShapeMeasure());
+    for (unsigned int i = 0; i < entities_.size(); i++){
+      if (entities_[i]->dim() < 2) continue;
+      for (unsigned int j = 0; j < entities_[i]->getNumMeshElements(); j++) {
+        MElement *e = entities_[i]->getMeshElement(j);
+        if (qmh == QMH_SICN_3D)
+          d[e->getNum()].push_back(e->minSICNShapeMeasure());
+        else if (qmh == QMH_GAMMA_3D)
+          d[e->getNum()].push_back(e->gammaShapeMeasure());
+        else if (qmh == QMH_RHO_3D)
+          d[e->getNum()].push_back(e->rhoShapeMeasure());
       }
     }
-    name.resize(name.size() - 2);
+    std::string name = (qmh == QMH_SICN_3D) ? "SICN" :
+                       (qmh == QMH_GAMMA_3D) ? "Gamma" :
+                       (qmh == QMH_RHO_3D) ? "Rho" : "";
     new PView(name, "ElementData", GModel::current(), d);
   }
 
@@ -94,7 +89,7 @@ statisticsWindow::statisticsWindow(int deltaFontSize)
 
   int num = 0;
   int width = 26 * FL_NORMAL_SIZE;
-  int height = 5 * WB + 18 * BH;
+  int height = 5 * WB + 17 * BH;
 
   win = new paletteWindow
     (width, height, CTX::instance()->nonModalWindows ? true : false, "Statistics");
@@ -128,16 +123,14 @@ statisticsWindow::statisticsWindow(int deltaFontSize)
       value[num++] = new Fl_Output(2 * WB, 2 * WB + 11 * BH, IW, BH, "Time for 2D mesh");
       value[num++] = new Fl_Output(2 * WB, 2 * WB + 12 * BH, IW, BH, "Time for 3D mesh");
 
-      value[num] = new Fl_Output(2 * WB, 2 * WB + 13 * BH, IW, BH, "Gamma");
-      value[num]->tooltip("~ inscribed_radius / circumscribed_radius"); num++;
-      value[num] = new Fl_Output(2 * WB, 2 * WB + 14 * BH, IW, BH, "Eta");
-      value[num]->tooltip("~ volume^(2/3) / sum_edge_length^2"); num++;
+      value[num] = new Fl_Output(2 * WB, 2 * WB + 13 * BH, IW, BH, "SICN");
+      value[num]->tooltip("~ signed inverse condition number"); num++;
+      value[num] = new Fl_Output(2 * WB, 2 * WB + 14 * BH, IW, BH, "Gamma");
+      value[num]->tooltip("~ inscribed_radius / circumscribed_radius (simplices)"); num++;
       value[num] = new Fl_Output(2 * WB, 2 * WB + 15 * BH, IW, BH, "Rho");
       value[num]->tooltip("~ min_edge_length / max_edge_length"); num++;
-      value[num] = new Fl_Output(2 * WB, 2 * WB + 16 * BH, IW, BH, "Disto");
-      value[num]->tooltip("~ min (J_min/J_0, J_0/J_max)"); num++;
 
-      for(int i = 0; i < 4; i++){
+      for(int i = 0; i < 3; i++){
         int ww = 3 * FL_NORMAL_SIZE;
         new Fl_Box
           (FL_NO_BOX, width - 3 * ww - 2 * WB, 2 * WB + (13 + i) * BH, ww, BH, "Plot");
@@ -146,14 +139,14 @@ statisticsWindow::statisticsWindow(int deltaFontSize)
         butt[2 * i + 1] = new Fl_Button
           (width - ww - 2 * WB, 2 * WB + (13 + i) * BH, ww, BH, "3D");
       }
-      butt[0]->callback(statistics_histogram_cb, (void *)"Gamma2D");
-      butt[1]->callback(statistics_histogram_cb, (void *)"Gamma3D");
-      butt[2]->callback(statistics_histogram_cb, (void *)"Eta2D");
-      butt[3]->callback(statistics_histogram_cb, (void *)"Eta3D");
-      butt[4]->callback(statistics_histogram_cb, (void *)"Rho2D");
-      butt[5]->callback(statistics_histogram_cb, (void *)"Rho3D");
-      butt[6]->callback(statistics_histogram_cb, (void *)"Disto2D");
-      butt[7]->callback(statistics_histogram_cb, (void *)"Disto3D");
+      static const QM_HISTO qmh0 = QMH_SICN_XY, qmh1 = QMH_SICN_3D, qmh2 = QMH_GAMMA_XY,
+                            qmh3 = QMH_GAMMA_3D, qmh4 = QMH_RHO_XY, qmh5 = QMH_RHO_3D;
+      butt[0]->callback(statistics_histogram_cb, (void*) &qmh0);
+      butt[1]->callback(statistics_histogram_cb, (void*) &qmh1);
+      butt[2]->callback(statistics_histogram_cb, (void*) &qmh2);
+      butt[3]->callback(statistics_histogram_cb, (void*) &qmh3);
+      butt[4]->callback(statistics_histogram_cb, (void*) &qmh4);
+      butt[5]->callback(statistics_histogram_cb, (void*) &qmh5);
 
       group[1]->end();
     }
@@ -197,188 +190,6 @@ statisticsWindow::statisticsWindow(int deltaFontSize)
 
 void statisticsWindow::compute(bool elementQuality)
 {
-#if 0
-  {
-    // MINIMUM MAXIMUM ANGLES
-    double minAngle = 1.0; //M_PI;
-    double meanAngle = 0.0;
-    int count = 0;
-    std::vector<GEntity*> entities;
-    GModel::current()->getEntities(entities);
-    std::map<int, std::vector<double> > d;
-    for(unsigned int i = 0; i < entities.size(); i++){
-      if(entities[i]->dim() == 3) {// continue;//<3
-	for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
-	  MElement *e = entities[i]->getMeshElement(j);
-	  double angle = e->angleShapeMeasure();
-	  minAngle = std::min(minAngle, angle);
-	  meanAngle += angle;
-	  count++;
-	}
-      }
-    }
-    meanAngle  = meanAngle / count;
-    printf("Angles min =%g av=%g nbhex=%d\n", minAngle, meanAngle, count);
-  }
-
-  // {
-  //   // MESH DEGREE VERTICES
-  //   std::vector<GEntity*> entities;
-  //   std::set<MEdge, Less_Edge> edges;
-  //   GModel::current()->getEntities(entities);
-  //   std::map<MVertex*, int > vert2Deg;
-  //   for(unsigned int i = 0; i < entities.size(); i++){
-  //     if(entities[i]->dim() < 2 ) continue;
-  //     // if(entities[i]->tag() < 100) continue;
-  //     for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
-  // 	MElement *e =  entities[i]->getMeshElement(j);
-  // 	for(unsigned int k = 0; k < e->getNumEdges(); k++){
-  // 	  edges.insert(e->getEdge(k));
-  // 	}
-  // 	for(unsigned int k = 0; k < e->getNumVertices(); k++){
-  // 	  MVertex *v = e->getVertex(k);
-  // 	  if (v->onWhat()->dim() < 2) continue;
-  // 	  std::map<MVertex*, int >::iterator it = vert2Deg.find(v);
-  // 	  if (it == vert2Deg.end()) {
-  // 	    vert2Deg.insert(std::make_pair(v,1));
-  // 	  }
-  // 	  else{
-  // 	    int nbE = it->second+1;
-  // 	    it->second = nbE;
-  // 	  }
-  // 	}
-  //     }
-  //   }
-  //   int dMin = 10;
-  //   int dMax = 0;
-  //   int d4 = 0;
-  //   int nbElems = vert2Deg.size();
-  //   std::map<MVertex*, int >::const_iterator itmap = vert2Deg.begin();
-  //   for(; itmap !=vert2Deg.end(); itmap++){
-  //     MVertex *v = itmap->first;
-  //     int nbE =  itmap->second;
-  //     dMin = std::min(nbE, dMin);
-  //     dMax = std::max(nbE, dMax);
-  //     if (nbE == 4) d4 += 1;
-  //   }
-  //   if (nbElems > 0)
-  //     printf("Stats degree vertices: dMin=%d , dMax=%d, d4=%g \n",
-  // 	     dMin, dMax, (double)d4/nbElems);
-  //   FieldManager *fields = GModel::current()->getFields();
-  //   Field *f = fields->get(fields->background_field);
-  //   int nbEdges = edges.size();
-  //   printf("nb edges =%d \n", nbEdges);
-  //   if(system("rm qualEdges.txt"));
-  //   FILE *fp = Fopen("qualEdges.txt", "w");
-  //   std::vector<int> qualE;
-  //   int nbS = 50;
-  //   qualE.resize(nbS);
-  //   if(fields.getBackgroundField() > 0){
-  //     std::set<MEdge, Less_Edge>::iterator it = edges.begin();
-  //     double sum = 0;
-  //     for (; it !=edges.end();++it){
-  // 	MVertex *v0 = it->getVertex(0);
-  // 	MVertex *v1 = it->getVertex(1);
-  // 	double l = sqrt((v0->x()-v1->x())*(v0->x()-v1->x())+
-  // 			(v0->y()-v1->y())*(v0->y()-v1->y())+
-  // 			(v0->z()-v1->z())*(v0->z()-v1->z()));
-  // 	double lf =  (*f)(0.5*(v0->x()+v1->x()), 0.5*(v0->y()+v1->y()),
-  // 			  0.5*(v0->z()+v1->z()),v0->onWhat());
-  // 	double el = l/lf;
-  // 	int index = (int) ceil(el*nbS*0.5);
-  // 	qualE[index]+= 1;
-  // 	double e = (l>lf) ? lf/l : l/lf;
-  // 	sum += e - 1.0;
-  //     }
-  //     double tau = exp ((1./edges.size()) * sum);
-  //     printf("N edges = %d tau = %g\n",(int)edges.size(),tau);
-
-  //     double ibegin = 2./(2*nbS);
-  //     double inext = 2./nbS;
-  //     for (int i= 0; i< qualE.size(); i++){
-  // 	fprintf(fp, "0 0 0 0 %g 0 0 %g \n", ibegin+i*inext , (double)qualE[i]/nbEdges);
-  //     }
-
-  //   }
-  //   fclose(fp);
-  // }
-  // {
-  //   std::vector<GEntity*> entities;
-  //   std::set<MEdge, Less_Edge> edges;
-  //   GModel::current()->getEntities(entities);
-  //   std::map<MVertex*, int > vert2Deg;
-  //   for(unsigned int i = 0; i < entities.size(); i++){
-  //     if(entities[i]->dim() < 2 ) continue;
-  //     if(entities[i]->tag() != 10) continue;
-  //     for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
-  // 	MElement *e =  entities[i]->getMeshElement(j);
-  // 	for(unsigned int k = 0; k < e->getNumEdges(); k++){
-  // 	  edges.insert(e->getEdge(k));
-  // 	}
-  // 	for(unsigned int k = 0; k < e->getNumVertices(); k++){
-  // 	  MVertex *v = e->getVertex(k);
-  // 	  if (v->onWhat()->dim() < 2) continue;
-  // 	  std::map<MVertex*, int >::iterator it = vert2Deg.find(v);
-  // 	  if (it == vert2Deg.end()){
-  // 	    vert2Deg.insert(std::make_pair(v,1));
-  // 	  }
-  // 	  else{
-  // 	    int nbE = it->second+1;
-  // 	    it->second = nbE;
-  // 	  }
-  // 	}
-  //     }
-  //   }
-  //   int dMin = 10;
-  //   int dMax = 0;
-  //   int d4 = 0;
-  //   int nbElems = vert2Deg.size();
-  //   std::map<MVertex*, int >::const_iterator itmap = vert2Deg.begin();
-  //   for(; itmap !=vert2Deg.end(); itmap++){
-  //     MVertex *v = itmap->first;
-  //     int nbE =  itmap->second;
-  //     dMin = std::min(nbE, dMin);
-  //     dMax = std::max(nbE, dMax);
-  //     if (nbE == 4) d4 += 1;
-  //   }
-  //   if (nbElems > 0) printf("Stats degree vertices: dMin=%d , dMax=%d, d4=%g \n",
-  // 			    dMin, dMax, (double)d4/nbElems);
-  //   FieldManager *fields = GModel::current()->getFields();
-  //   Field *f = fields->get(fields.getBackgroundField());
-  //   int nbEdges = edges.size();
-  //   if(system("rm qualEdges.txt"));
-  //   FILE *fp = Fopen("qualEdges.txt", "w");
-  //   std::vector<int> qualE;
-  //   int nbS = 50;
-  //   qualE.resize(nbS);
-  //   if(fields.getBackgroundField() > 0){
-  //     std::set<MEdge, Less_Edge>::iterator it = edges.begin();
-  //     double sum = 0;
-  //     for (; it !=edges.end();++it){
-  // 	MVertex *v0 = it->getVertex(0);
-  // 	MVertex *v1 = it->getVertex(1);
-  // 	double l = sqrt((v0->x()-v1->x())*(v0->x()-v1->x())+
-  // 			(v0->y()-v1->y())*(v0->y()-v1->y())+
-  // 			(v0->z()-v1->z())*(v0->z()-v1->z()));
-  // 	double lf =  (*f)(0.5*(v0->x()+v1->x()), 0.5*(v0->y()+v1->y()),
-  // 			  0.5*(v0->z()+v1->z()),v0->onWhat());
-  // 	double el = l/lf;
-  // 	int index = (int) ceil(el*nbS*0.5);
-  // 	qualE[index]+= 1;
-  // 	double e = (l>lf) ? lf/l : l/lf;
-  // 	sum += e - 1.0;
-  //     }
-  //     double tau = exp ((1./edges.size()) * sum);
-  //     double ibegin = 2./(2*nbS);
-  //     double inext = 2./nbS;
-  //     for (int i= 0; i< qualE.size(); i++){
-  // 	fprintf(fp, "0 0 0 0 %g 0 0 %g \n", ibegin+i*inext , (double)qualE[i]/nbEdges);
-  //     }
-  //   }
-  //   fclose(fp);
-  // }
-#endif
-
   int num = 0;
   static double s[50];
   static char label[50][256];
@@ -411,10 +222,7 @@ void statisticsWindow::compute(bool elementQuality)
   sprintf(label[num], "%g", s[15]); value[num]->value(label[num]); num++;
 
   if(!elementQuality){
-    for(int i = 0; i < 8; i += 2) butt[i]->deactivate();
-    sprintf(label[num], "Press Update");
-    value[num]->deactivate();
-    value[num]->value(label[num]); num++;
+    for(int i = 0; i < 6; i += 2) butt[i]->deactivate();
     sprintf(label[num], "Press Update");
     value[num]->deactivate();
     value[num]->value(label[num]); num++;
@@ -426,7 +234,7 @@ void statisticsWindow::compute(bool elementQuality)
     value[num]->value(label[num]); num++;
   }
   else{
-    for(int i = 0; i < 8; i += 2) butt[i]->activate();
+    for(int i = 0; i < 6; i += 2) butt[i]->activate();
     sprintf(label[num], "%.4g (%.4g->%.4g)", s[17], s[18], s[19]);
     value[num]->activate();
     value[num]->value(label[num]); num++;
@@ -436,9 +244,6 @@ void statisticsWindow::compute(bool elementQuality)
     sprintf(label[num], "%.4g (%.4g->%.4g)", s[23], s[24], s[25]);
     value[num]->activate();
     value[num]->value(label[num]); num++;
-    sprintf(label[num], "%.4g (%.4g->%.4g)", s[46], s[47], s[48]);
-    value[num]->activate();
-    value[num]->value(label[num]); num++;
   }
 
   // post
diff --git a/Fltk/statisticsWindow.h b/Fltk/statisticsWindow.h
index 7d748df..b9a1a25 100644
--- a/Fltk/statisticsWindow.h
+++ b/Fltk/statisticsWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,7 +18,7 @@ class statisticsWindow{
   Fl_Button *butt[8];
   Fl_Group *group[3];
   Fl_Box *memUsage;
-  double quality[4][100];
+  double quality[3][100];
  public:
   statisticsWindow(int deltaFontSize);
   void compute(bool elementQuality);
diff --git a/Fltk/treeIcons.h b/Fltk/treeIcons.h
new file mode 100644
index 0000000..69cffb3
--- /dev/null
+++ b/Fltk/treeIcons.h
@@ -0,0 +1,94 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _TREE_ICONS_H_
+#define _TREE_ICONS_H_
+
+#include <FL/Fl_Pixmap.H>
+
+#define TREE_ICON_RIGHT(col)\
+  "11 11 2 1",\
+  ". c None",\
+  col,\
+  "... at .......",\
+  "...@@......",\
+  "...@@@.....",\
+  "...@@@@....",\
+  "...@@@@@...",\
+  "...@@@@@@..",\
+  "...@@@@@...",\
+  "...@@@@....",\
+  "...@@@.....",\
+  "...@@......",\
+  "... at ......."
+
+#define TREE_ICON_DOWN(col)\
+  "11 11 2 1",\
+  ".  c None",\
+  col,\
+  "...........",\
+  "...........",\
+  "...........",\
+  "@@@@@@@@@@@",\
+  ".@@@@@@@@@.",\
+  "..@@@@@@@..",\
+  "...@@@@@...",\
+  "....@@@....",\
+  "..... at .....",\
+  "...........",\
+  "..........."
+
+#define TREE_ICON_PLUS(col)\
+  "11 11 3 1",\
+  col,\
+  "# c #323232",\
+  "@ c #000000",\
+  "###########",\
+  "#.........#",\
+  "#.........#",\
+  "#.... at ....#",\
+  "#.... at ....#",\
+  "#..@@@@@..#",\
+  "#.... at ....#",\
+  "#.... at ....#",\
+  "#.........#",\
+  "#.........#",\
+  "###########"
+
+#define TREE_ICON_MINUS(col)\
+  "11 11 3 1",\
+  col,\
+  "#	c #323232",\
+  "@	c #000000",\
+  "###########",\
+  "#.........#",\
+  "#.........#",\
+  "#.........#",\
+  "#.........#",\
+  "#..@@@@@..#",\
+  "#.........#",\
+  "#.........#",\
+  "#.........#",\
+  "#.........#",\
+  "###########"
+
+#if defined(__APPLE__)
+static const char * const open_xpm_light[] = {TREE_ICON_RIGHT("@ c #222222")};
+static const char * const close_xpm_light[] = {TREE_ICON_DOWN("@ c #222222")};
+static const char * const open_xpm_dark[] = {TREE_ICON_RIGHT("@ c #444444")};
+static const char * const close_xpm_dark[] = {TREE_ICON_DOWN("@ c #444444")};
+#else
+static const char * const open_xpm_light[] = {TREE_ICON_PLUS(". c #fefefe")};
+static const char * const close_xpm_light[] = {TREE_ICON_MINUS(". c #fefefe")};
+static const char * const open_xpm_dark[] = {TREE_ICON_PLUS(". c #bbbbbb")};
+static const char * const close_xpm_dark[] = {TREE_ICON_MINUS(". c #bbbbbb")};
+#endif
+
+static Fl_Pixmap open_pixmap_light(open_xpm_light);
+static Fl_Pixmap close_pixmap_light(close_xpm_light);
+static Fl_Pixmap open_pixmap_dark(open_xpm_dark);
+static Fl_Pixmap close_pixmap_dark(close_xpm_dark);
+
+#endif
diff --git a/Fltk/viewButton.cpp b/Fltk/viewButton.cpp
index ad1c7aa..a003528 100644
--- a/Fltk/viewButton.cpp
+++ b/Fltk/viewButton.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,7 +18,11 @@
 #include "OpenFile.h"
 #include "Field.h"
 #include "OS.h"
+#ifdef HAVE_ONELAB2
+#include "onelab2Group.h"
+#else
 #include "onelabGroup.h"
+#endif
 #include "viewButton.h"
 
 static void view_toggle_cb(Fl_Widget *w, void *data)
@@ -287,64 +291,62 @@ viewButton::viewButton(int x, int y, int w, int h, int num, Fl_Color col)
 
   _popup->add("Options", 'o',
               (Fl_Callback *) view_options_cb, (void *)num, 0);
-  _popup->add("Plugins", 'p',
-              (Fl_Callback *) plugin_cb, (void *)num, FL_MENU_DIVIDER);
+  _popup->add("_Plugins", 'p',
+              (Fl_Callback *) plugin_cb, (void *)num, 0);
 
   _popup->add("Reload", 'r',
               (Fl_Callback *) view_reload_cb, (void *)num, 0);
+  _popup->add("Reload Views/All", 0,
+              (Fl_Callback *) view_reload_all_cb, (void *)num, 0);
+  _popup->add("Reload Views/Visible", 0,
+              (Fl_Callback *) view_reload_visible_cb, (void *)num, 0);
+  _popup->add("_Create Alias", 0,
+              (Fl_Callback *) view_alias_with_options_cb, (void *)num, 0);
+
   _popup->add("Remove", FL_Delete,
               (Fl_Callback *) view_remove_cb, (void *)num, 0);
-  _popup->add("Create Alias", 0,
-              (Fl_Callback *) view_alias_with_options_cb, (void *)num, 0);
-  _popup->add("Apply As Background Mesh", 0,
-              (Fl_Callback *) view_applybgmesh_cb, (void *)num, 0);
-  _popup->add("Save As...", 0,
-              (Fl_Callback *) view_save_cb, (void *)num, FL_MENU_DIVIDER);
+  _popup->add("_Remove Views/All", 0,
+              (Fl_Callback *) view_remove_all_cb, (void *)-1, 0);
+  _popup->add("Remove Views/Visible", 0,
+              (Fl_Callback *) view_remove_all_cb, (void *)-2, 0);
+  _popup->add("Remove Views/Invisible", 0,
+              (Fl_Callback *) view_remove_all_cb, (void *)-3, 0);
+  _popup->add("Remove Views/Other", 0,
+              (Fl_Callback *) view_remove_other_cb, (void *)num, 0);
+  _popup->add("Remove Views/Empty", 0,
+              (Fl_Callback *) view_remove_all_cb, (void *)-4, 0);
+  _popup->add("Remove Views/With Same Name", 0,
+              (Fl_Callback *) view_remove_all_cb, (void *)num, 0);
 
   _popup->add("Sort By Name", 0,
-              (Fl_Callback *) view_sort_cb, (void *)0, FL_MENU_DIVIDER);
-
-  _popup->add("All/Reload", 0,
-              (Fl_Callback *) view_reload_all_cb, (void *)num, 0);
-  _popup->add("All/Remove", 0,
-              (Fl_Callback *) view_remove_all_cb, (void *)-1, 0);
-  _popup->add("All/Combine Elements", 0,
-              (Fl_Callback *) view_combine_space_all_cb, (void *)num, 0);
-  _popup->add("All/Combine Time Steps", 0,
-              (Fl_Callback *) view_combine_time_all_cb, (void *)num, 0);
-  _popup->add("All/Set Visibility On", 0,
+              (Fl_Callback *) view_sort_cb, (void *)0, 0);
+  _popup->add("Set Visibility/All On", 0,
               (Fl_Callback *) view_all_visible_cb, (void *)-1, 0);
-  _popup->add("All/Set Visibility Off", 0,
+  _popup->add("Set Visibility/All Off", 0,
               (Fl_Callback *) view_all_visible_cb, (void *)-2, 0);
-  _popup->add("All/Invert Visibility", 0,
+  _popup->add("Set Visibility/Invert", 0,
               (Fl_Callback *) view_all_visible_cb, (void *)-3, 0);
+  _popup->add("Set Visibility/Same Name On", 0,
+              (Fl_Callback *) view_all_visible_cb, (void *)num, 0);
 
-  _popup->add("Visible/Reload", 0,
-              (Fl_Callback *) view_reload_visible_cb, (void *)num, 0);
-  _popup->add("Visible/Remove", 0,
-              (Fl_Callback *) view_remove_all_cb, (void *)-2, 0);
-  _popup->add("Visible/Combine Elements", 0,
+  _popup->add("Combine Elements/From All Views", 0,
+              (Fl_Callback *) view_combine_space_all_cb, (void *)num, 0);
+  _popup->add("Combine Elements/From Visible Views", 0,
               (Fl_Callback *) view_combine_space_visible_cb, (void *)num, 0);
-  _popup->add("Visible/Combine Time Steps", 0,
-              (Fl_Callback *) view_combine_time_visible_cb, (void *)num, 0);
-
-  _popup->add("Invisible/Remove", 0,
-              (Fl_Callback *) view_remove_all_cb, (void *)-3, 0);
-
-  _popup->add("Other/Remove", 0,
-              (Fl_Callback *) view_remove_other_cb, (void *)num, 0);
-
-  _popup->add("Empty/Remove", 0,
-              (Fl_Callback *) view_remove_all_cb, (void *)-4, 0);
-
-  _popup->add("Same Name/Remove", 0,
-              (Fl_Callback *) view_remove_all_cb, (void *)num, 0);
-  _popup->add("Same Name/Combine Elements", 0,
+  _popup->add("Combine Elements/From All Views With Same Name", 0,
               (Fl_Callback *) view_combine_space_by_name_cb, (void *)num, 0);
-  _popup->add("Same Name/Combine Time Steps", 0,
+
+  _popup->add("_Combine Time Steps/From All Views", 0,
+              (Fl_Callback *) view_combine_time_all_cb, (void *)num, 0);
+  _popup->add("Combine Time Steps/From Visible Views", 0,
+              (Fl_Callback *) view_combine_time_visible_cb, (void *)num, 0);
+  _popup->add("Combine Time Steps/From All Views With Same Name", 0,
               (Fl_Callback *) view_combine_time_by_name_cb, (void *)num, 0);
-  _popup->add("Same Name/Set Visibility On", 0,
-              (Fl_Callback *) view_all_visible_cb, (void *)num, 0);
+
+  _popup->add("Apply As Background Mesh", 0,
+              (Fl_Callback *) view_applybgmesh_cb, (void *)num, 0);
+  _popup->add("Save As...", 0,
+              (Fl_Callback *) view_save_cb, (void *)num, 0);
 
   end(); // close the group
   resizable(_toggle);
diff --git a/Fltk/viewButton.h b/Fltk/viewButton.h
index d43a403..8e30704 100644
--- a/Fltk/viewButton.h
+++ b/Fltk/viewButton.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp
index f2be0d7..08c44f4 100644
--- a/Fltk/visibilityWindow.cpp
+++ b/Fltk/visibilityWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Fltk/visibilityWindow.h b/Fltk/visibilityWindow.h
index 164fde1..6c25c83 100644
--- a/Fltk/visibilityWindow.h
+++ b/Fltk/visibilityWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ACISEdge.cpp b/Geo/ACISEdge.cpp
index c1d99dd..11d0b90 100644
--- a/Geo/ACISEdge.cpp
+++ b/Geo/ACISEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ACISEdge.h b/Geo/ACISEdge.h
index fa804c0..99a074f 100644
--- a/Geo/ACISEdge.h
+++ b/Geo/ACISEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ACISFace.cpp b/Geo/ACISFace.cpp
index 0c9662a..9a8fdaa 100644
--- a/Geo/ACISFace.cpp
+++ b/Geo/ACISFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ACISFace.h b/Geo/ACISFace.h
index e1b0e99..a465f6e 100644
--- a/Geo/ACISFace.h
+++ b/Geo/ACISFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ACISVertex.h b/Geo/ACISVertex.h
index 5f796a4..dd587d4 100644
--- a/Geo/ACISVertex.h
+++ b/Geo/ACISVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/CGNSOptions.h b/Geo/CGNSOptions.h
index b2de45f..afb8081 100644
--- a/Geo/CGNSOptions.h
+++ b/Geo/CGNSOptions.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt
index ed90152..e91f0be 100644
--- a/Geo/CMakeLists.txt
+++ b/Geo/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -14,6 +14,7 @@ set(SRC
     gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp
    gmshSurface.cpp
    OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp
+   GenericVertex.cpp GenericEdge.cpp GenericFace.cpp GenericRegion.cpp
     discreteEdge.cpp discreteFace.cpp discreteRegion.cpp
     fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp
   ACISVertex.cpp
diff --git a/Geo/Cell.cpp b/Geo/Cell.cpp
index 38c86a2..2bf984a 100644
--- a/Geo/Cell.cpp
+++ b/Geo/Cell.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Cell.h b/Geo/Cell.h
index 9cb6f9b..97b0887 100644
--- a/Geo/Cell.h
+++ b/Geo/Cell.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/CellComplex.cpp b/Geo/CellComplex.cpp
index 5b85852..3f34297 100644
--- a/Geo/CellComplex.cpp
+++ b/Geo/CellComplex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/CellComplex.h b/Geo/CellComplex.h
index cade65d..1406c31 100644
--- a/Geo/CellComplex.h
+++ b/Geo/CellComplex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Chain.cpp b/Geo/Chain.cpp
index e87b32d..02efc4d 100644
--- a/Geo/Chain.cpp
+++ b/Geo/Chain.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Chain.h b/Geo/Chain.h
index 124f420..fb1f2af 100644
--- a/Geo/Chain.h
+++ b/Geo/Chain.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ChainComplex.cpp b/Geo/ChainComplex.cpp
index eef0be4..ef6d490 100644
--- a/Geo/ChainComplex.cpp
+++ b/Geo/ChainComplex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ChainComplex.h b/Geo/ChainComplex.h
index 9804057..9d9132e 100644
--- a/Geo/ChainComplex.h
+++ b/Geo/ChainComplex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Curvature.cpp b/Geo/Curvature.cpp
index a21f9be..4e1cb5a 100644
--- a/Geo/Curvature.cpp
+++ b/Geo/Curvature.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Curvature.h b/Geo/Curvature.h
index 27c9229..966a015 100644
--- a/Geo/Curvature.h
+++ b/Geo/Curvature.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/CustomContainer.h b/Geo/CustomContainer.h
index e3f6b68..f984d41 100644
--- a/Geo/CustomContainer.h
+++ b/Geo/CustomContainer.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ExtrudeParams.cpp b/Geo/ExtrudeParams.cpp
index e19f2f5..3c00b07 100644
--- a/Geo/ExtrudeParams.cpp
+++ b/Geo/ExtrudeParams.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/ExtrudeParams.h b/Geo/ExtrudeParams.h
index 583260f..4e81ce0 100644
--- a/Geo/ExtrudeParams.h
+++ b/Geo/ExtrudeParams.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp
index ddbaec1..68bd1e8 100644
--- a/Geo/GEdge.cpp
+++ b/Geo/GEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -176,6 +176,8 @@ void GEdge::setVisibility(char val, bool recursive)
 std::string GEdge::getAdditionalInfoString()
 {
   std::ostringstream sstream;
+  sstream.precision(12);
+
   if(v0 && v1) sstream << "{" << v0->tag() << " " << v1->tag() << "}";
 
   if(meshAttributes.method == MESH_TRANSFINITE){
@@ -445,12 +447,12 @@ void GEdge::replaceEndingPoints(GVertex *replOfv0, GVertex *replOfv1)
 {
   replaceEndingPointsInternals(replOfv0, replOfv1);
   if (replOfv0 != v0){
-    v0->delEdge(this);
+    if (v0) v0->delEdge(this);
     replOfv0->addEdge(this);
     v0 = replOfv0;
   }
   if (replOfv1 != v1){
-    v1->delEdge(this);
+    if (v1) v1->delEdge(this);
     replOfv1->addEdge(this);
     v1 = replOfv1;
   }
diff --git a/Geo/GEdge.h b/Geo/GEdge.h
index dbb584c..5260301 100644
--- a/Geo/GEdge.h
+++ b/Geo/GEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -49,8 +49,8 @@ class GEdge : public GEntity {
   virtual void deleteMesh();
 
   // get the start/end vertices of the edge
-  GVertex *getBeginVertex() const { return v0; }
-  GVertex *getEndVertex() const { return v1; }
+  virtual GVertex *getBeginVertex() const { return v0; }
+  virtual GVertex *getEndVertex() const { return v1; }
 
   void reverse();
 
@@ -207,7 +207,7 @@ class GEdge : public GEntity {
 
   std::vector<MLine*> lines;
 
-  void addLine(MLine *line){ lines.push_back(line); }
+  virtual void addLine(MLine *line){ lines.push_back(line); }
 
   virtual void discretize(double tol, std::vector<SPoint3> &dpts, std::vector<double> &ts);
   SPoint3 closestPoint (SPoint3 &p, double tolerance);
diff --git a/Geo/GEdgeCompound.cpp b/Geo/GEdgeCompound.cpp
index 86337ed..968c602 100644
--- a/Geo/GEdgeCompound.cpp
+++ b/Geo/GEdgeCompound.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEdgeCompound.h b/Geo/GEdgeCompound.h
index d4bf15d..9e2e29d 100644
--- a/Geo/GEdgeCompound.h
+++ b/Geo/GEdgeCompound.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp
index a551295..9a3328a 100644
--- a/Geo/GEdgeLoop.cpp
+++ b/Geo/GEdgeLoop.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEdgeLoop.h b/Geo/GEdgeLoop.h
index b35aa61..1dfb505 100644
--- a/Geo/GEdgeLoop.h
+++ b/Geo/GEdgeLoop.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEntity.cpp b/Geo/GEntity.cpp
index d32aa6c..6b898c0 100644
--- a/Geo/GEntity.cpp
+++ b/Geo/GEntity.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GEntity.h b/Geo/GEntity.h
index b120b83..9b935c0 100644
--- a/Geo/GEntity.h
+++ b/Geo/GEntity.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -65,6 +65,7 @@ class GEntity {
     GmshModel,
     FourierModel,
     OpenCascadeModel,
+    GenericModel,
     AcisModel
   };
 
@@ -239,6 +240,9 @@ class GEntity {
 
   // get the native pointer of the particular representation
   virtual void *getNativePtr() const { return 0; }
+  
+  // get the native id (int) of the particular representation
+  virtual int getNativeInt() const { return 0; }
 
   // the model owning this entity
   GModel *model() const { return _model; }
diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp
index d44829d..56755ed 100644
--- a/Geo/GFace.cpp
+++ b/Geo/GFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,7 +22,7 @@
 #if defined(HAVE_MESH)
 #include "meshGFaceOptimize.h"
 #include "meshGFaceLloyd.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #endif
 
 #if defined(HAVE_BFGS)
@@ -107,6 +107,23 @@ void GFace::delFreeEdge(GEdge *e)
   }
 }
 
+void GFace::replaceEdge(GEdge *e1, GEdge *e2)
+{
+  std::list<GEdge*>::iterator ite = l_edges.begin();
+  std::list<GEdge*> newlist;
+  newlist.clear();
+  while(ite != l_edges.end()){
+    if(e1 == *ite){
+      newlist.push_back(e2);
+    }
+    else{
+      newlist.push_back((*ite));
+    }
+    ite++;
+  }
+  l_edges = newlist;
+}
+
 void GFace::deleteMesh()
 {
   for(unsigned int i = 0; i < mesh_vertices.size(); i++) delete mesh_vertices[i];
@@ -259,6 +276,26 @@ surface_params GFace::getSurfaceParams() const
   return p;
 }
 
+std::vector<MVertex*> GFace::getEmbeddedMeshVertices() const
+{
+  std::set<MVertex*> tmp;
+  for(std::list<GEdge *>::const_iterator it = embedded_edges.begin();
+      it != embedded_edges.end(); it++){
+    tmp.insert((*it)->mesh_vertices.begin(), (*it)->mesh_vertices.end());
+    tmp.insert((*it)->getBeginVertex()->mesh_vertices.begin(),
+               (*it)->getBeginVertex()->mesh_vertices.end());
+    tmp.insert((*it)->getEndVertex()->mesh_vertices.begin(),
+               (*it)->getEndVertex()->mesh_vertices.end());
+  }
+  for(std::list<GVertex *>::const_iterator it = embedded_vertices.begin();
+      it != embedded_vertices.end(); it++){
+    tmp.insert((*it)->mesh_vertices.begin(), (*it)->mesh_vertices.end());
+  }
+  std::vector<MVertex*> res;
+  res.insert(res.end(), tmp.begin(), tmp.end());
+  return res;
+}
+
 std::list<GVertex*> GFace::vertices() const
 {
   std::set<GVertex*> v;
@@ -958,110 +995,61 @@ void bfgs_callback(const alglib::real_1d_array& x, double& func,
 GPoint GFace::closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const
 {
 #if defined(HAVE_BFGS)
-  // Creating the optimisation problem
-  // printf("STARTING OPTIMIZATION\n");
-
-  alglib::ae_int_t dim = 2;
-  alglib::ae_int_t corr = 2; // Num of corrections in the scheme in [3,7]
-  alglib::minlbfgsstate state;
-  alglib::real_1d_array x; // = "[0.5,0.5]";
-  std::vector<double> initial_conditions(dim);
-
-  double min_dist = 1e18;
-  double min_u = 0.5;
-  double min_v = 0.5;
-
-  Range<double> uu = parBounds(0);
-  Range<double> vv = parBounds(1);
-  {
-    GPoint pnt = point(initialGuess[0], initialGuess[1]);
-    SPoint3 spnt(pnt.x(), pnt.y(), pnt.z());
-    //double dist = queryPoint.distance(spnt);
-  }
-
-  // FILE *F = Fopen ("hop.pos","w");
-  // fprintf(F,"View \" \" {\n");
-  // fprintf(F,"SP(%g,%g,%g) {%g};\n",queryPoint.x(),queryPoint.y(),queryPoint.z(),0.0);
-  double initial_guesses = 10.0;
-  for(double u = uu.low(); u <= uu.high() + 1.e-5;
-      u += (uu.high() - uu.low()) / initial_guesses) {
-    //    printf("%f\n", u);
-    for(double v = vv.low(); v <= vv.high() + 1.e-5;
-        v += (vv.high() - vv.low()) / initial_guesses) {
+  // Test initial guess
+  double min_u = initialGuess[0];
+  double min_v = initialGuess[1];
+  GPoint pnt = point(min_u, min_v);
+  SPoint3 spnt(pnt.x(), pnt.y(), pnt.z());
+  double min_dist = queryPoint.distance(spnt);
+
+  // Try to find a better initial guess by sampling full parameter range
+  const double nGuesses = 10.;
+  const Range<double> uu = parBounds(0);
+  const Range<double> vv = parBounds(1);
+  const double ru = uu.high()-uu.low(), rv = vv.high()-vv.low();
+  const double epsU = 1e-5*ru, epsV = 1e-5*rv;
+  const double du = ru/nGuesses, dv = rv/nGuesses;
+  for(double u = uu.low(); u <= uu.high() + epsU; u += du) {
+    for(double v = vv.low(); v <= vv.high() + epsV; v += dv) {
       GPoint pnt = point(u, v);
       SPoint3 spnt(pnt.x(), pnt.y(), pnt.z());
       double dist = queryPoint.distance(spnt);
-      // fprintf(F,"SP(%g,%g,%g) {%g};\n",pnt.x(), pnt.y(), pnt.z(),dist);
-      // printf("lmocal (%12.5E %12.5E) (point) : %12.5E %12.5E %12.5E (query) : "
-      //        "%12.5E %12.5E %12.5E DSIT %12.5E\n",u,v, pnt.x(), pnt.y(), pnt.z(),
-      //         queryPoint.x(),queryPoint.y(),queryPoint.z(), dist);
       if (dist < min_dist) {
-	// printf("min_dist %f\n", dist);
-	min_dist = dist;
-	min_u = u;
-	min_v = v;
-	// GPoint pnt = point(min_u, min_v);
+        min_dist = dist;
+        min_u = u;
+        min_v = v;
       }
     }
   }
-  // fprintf(F,"};\n");
-  // fclose(F);
-  // getchar();
-  initial_conditions[0] = min_u;
-  initial_conditions[1] = min_v;
-
-  // printf("Initial conditions : %f %f %12.5E\n", min_u, min_v,min_dist);
-  // GPoint pnt = point(min_u, min_v);
-  // printf("Initial conditions (point) : %f %f %f local (%g %g) "
-  //        "Looking for %f %f %f DIST = %12.5E\n",
-  //         pnt.x(), pnt.y(), pnt.z(),min_u,min_v,
-  //         queryPoint.x(),queryPoint.y(),queryPoint.z(), min_dist);
-
-  x.setcontent(dim, &initial_conditions[0]);
 
+  // Set up optimisation problem
+  alglib::ae_int_t dim = 2;
+  alglib::ae_int_t corr = 2; // Num of corrections in the scheme in [3,7]
+  alglib::minlbfgsstate state;
+  alglib::real_1d_array x;
+  const double initialCond[2] = {min_u, min_v};
+  x.setcontent(dim, initialCond);
   minlbfgscreate(2, corr, x, state);
 
-  // Defining the stopping criterion
-  double epsg = 1.e-12;
-  double epsf = 0.0;
-  double epsx = 0.0;
-  alglib::ae_int_t maxits = 500;
-
+  // Set stopping criteria
+  const double epsg = 1.e-12;
+  const double epsf = 0.;
+  const double epsx = 0.;
+  const alglib::ae_int_t maxits = 500;
   minlbfgssetcond(state, epsg, epsf, epsx, maxits);
 
-  // Solving the problem
+  // Solve problem
   data_wrapper w;
   w.set_point(queryPoint);
   w.set_face(this);
-
   minlbfgsoptimize(state, bfgs_callback, NULL, &w);
 
-  // Getting the results
+  // Get results
   alglib::minlbfgsreport rep;
-
   minlbfgsresults(state, x, rep);
-
   GPoint pntF = point(x[0], x[1]);
-  if (rep.terminationtype != 4){
-    // printf("Initial conditions (point) : %f %f %f local (%g %g) "
-    //        "Looking for %f %f %f DIST = %12.5E at the end (%f %f) %f %f %f\n",
-    //         pnt.x(), pnt.y(), pnt.z(),min_u,min_v,
-    //         queryPoint.x(),queryPoint.y(),queryPoint.z(),
-    //         min_dist,x[0],x[1],pntF.x(), pntF.y(), pntF.z());
-    // double DDD =
-    //   ( queryPoint.x() - pntF.x()) * ( queryPoint.x() - pntF.x()) +
-    //   ( queryPoint.y() - pntF.y()) * ( queryPoint.y() - pntF.y()) +
-    //   ( queryPoint.z() - pntF.z()) * ( queryPoint.z() - pntF.z());
-    // if (sqrt(DDD) > 1.e-4)
-    /*
-    printf("Initial conditions (point) : %f %f %f local (%g %g) Looking for %f %f %f "
-           "DIST = %12.5E at the end (%f %f) %f %f %f termination %d\n",
-           pnt.x(), pnt.y(), pnt.z(),min_u,min_v,
-	   queryPoint.x(),queryPoint.y(),queryPoint.z(),
-	   min_dist,x[0],x[1],pntF.x(), pntF.y(), pntF.z(),rep.terminationtype);
-    */
-  }
   return pntF;
+
 #else
   Msg::Error("Closest point not implemented for this type of surface");
   SPoint2 p = parFromPoint(queryPoint, false);
@@ -1420,7 +1408,7 @@ void GFace::addLayersOfQuads(int nLayers, GVertex *gv, double hmin, double ratio
   SVector3 ez (0, 0, 1);
   std::list<GEdgeLoop>::iterator it = edgeLoops.begin();
   FILE *f = Fopen ("coucou.pos","w");
-  fprintf(f,"View \"\"{\n");
+  if(f) fprintf(f,"View \"\"{\n");
   for (; it != edgeLoops.end(); ++it){
     bool found = false;
     // look if this edge loop has the GVertex as an endpoint
@@ -1466,15 +1454,15 @@ void GFace::addLayersOfQuads(int nLayers, GVertex *gv, double hmin, double ratio
 	  double v = p1.y() + n.y() * hmin;
 	  GPoint gp = point(SPoint2(u,v));
 	  additionalVertices.push_back(new MFaceVertex(gp.x(),gp.y(),gp.z(),this,u,v));
-	  fprintf(f,"SP(%g, %g, 0){1};\n",gp.x(),gp.y());
+	  if(f) fprintf(f,"SP(%g, %g, 0){1};\n",gp.x(),gp.y());
 	}
 	hlayer *= ratio;
 	hmin += hlayer;
       }
-      fprintf(f,"};\n");
+      if(f) fprintf(f,"};\n");
     }
   }
-  fclose(f);
+  if(f) fclose(f);
 }
 
 void GFace::relocateMeshVertices()
diff --git a/Geo/GFace.h b/Geo/GFace.h
index 232f74f..a4432a8 100644
--- a/Geo/GFace.h
+++ b/Geo/GFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -58,18 +58,20 @@ class GFace : public GEntity
   // periodic counterparts of edges
   std::map<int,int> edgeCounterparts;
 
+  // encoding of an explicit affine transformation for period meshing
+  std::vector<double> affineTransform;
+
   // an array with additional vertices that are supposed to exist in
   // the final mesh of the model face. This can be used for boundary
   // layer meshes or when using Lloyd-like smoothing algorithms those
   // vertices are classifed on this GFace, their type is MFaceVertex.
   // After mesh generation, those are moved to the mesh_vertices array
+  std::vector<MVertex*> additionalVertices;
 
  public:
   GFace(GModel *model, int tag);
   virtual ~GFace();
 
-  std::vector<MVertex*> additionalVertices;
-
   // delete mesh data
   virtual void deleteMesh();
 
@@ -96,6 +98,10 @@ class GFace : public GEntity
   // edge in the face, not part of any edge loops--use with caution!)
   void delFreeEdge(GEdge *e);
 
+  //find the edge 1 from the list of edges and replace it by edge 2
+  //dont change the edge loops, and is susceptible to break some functionalities
+  void replaceEdge(GEdge *e1, GEdge *e2);
+
   // edge orientations
   virtual std::list<int> orientations() const { return l_dirs; }
 
@@ -115,6 +121,8 @@ class GFace : public GEntity
   // edges that are embedded in the face
   virtual std::list<GVertex*> embeddedVertices() const { return embedded_vertices; }
 
+  std::vector<MVertex*> getEmbeddedMeshVertices() const;
+
   // vertices that bound the face
   virtual std::list<GVertex*> vertices() const;
 
diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp
index fd78dcc..f11549c 100644
--- a/Geo/GFaceCompound.cpp
+++ b/Geo/GFaceCompound.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -45,7 +45,7 @@
 #include "MPoint.h"
 #include "Numeric.h"
 #include "meshGFace.h"
-#include <ANN/ANN.h>
+#include "ANN/ANN.h"
 
 static void fixEdgeToValue(GEdge *ed, double value, dofManager<double> &myAssembler)
 {
@@ -56,22 +56,6 @@ static void fixEdgeToValue(GEdge *ed, double value, dofManager<double> &myAssemb
   }
 }
 
-/*
-static void printBound(std::vector<MVertex*> &l, int tag)
-{
-  char name[256];
-  sprintf(name, "myBOUND%d.pos", tag);
-  FILE * xyz = Fopen(name,"w");
-  fprintf(xyz,"View \"\"{\n");
-  for(unsigned int i = 0; i < l.size(); i++){
-    MVertex *v = l[i];
-    fprintf(xyz,"SP(%g,%g,%g){%d};\n", v->x(), v->y(), v->z(), i);
-  }
-  fprintf(xyz,"};\n");
-  fclose(xyz);
-}
-*/
-
 static std::vector<MVertex*> getBlob(unsigned int minNbPt, v2t_cont::iterator it,
                                      v2t_cont &adj)
 {
@@ -461,18 +445,20 @@ void GFaceCompound::printFillTris() const
     //std::list<GFace*>::const_iterator itf = _compound.begin();
     sprintf(name, "fillTris-%d.pos", tag());
     FILE * ftri = Fopen(name,"w");
-    fprintf(ftri,"View \"\"{\n");
-    for (std::list<MTriangle*>::iterator it2 = fillTris.begin();
-	 it2 !=fillTris.end(); it2++ ){
-      MTriangle *t = (*it2);
-      fprintf(ftri,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g};\n",
-	      t->getVertex(0)->x(), t->getVertex(0)->y(), t->getVertex(0)->z(),
-	      t->getVertex(1)->x(), t->getVertex(1)->y(), t->getVertex(1)->z(),
-	      t->getVertex(2)->x(), t->getVertex(2)->y(), t->getVertex(2)->z(),
-	      1., 1., 1.);
-    }
-    fprintf(ftri,"};\n");
-    fclose(ftri);
+    if(ftri){
+      fprintf(ftri,"View \"\"{\n");
+      for (std::list<MTriangle*>::iterator it2 = fillTris.begin();
+           it2 !=fillTris.end(); it2++ ){
+        MTriangle *t = (*it2);
+        fprintf(ftri,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g};\n",
+                t->getVertex(0)->x(), t->getVertex(0)->y(), t->getVertex(0)->z(),
+                t->getVertex(1)->x(), t->getVertex(1)->y(), t->getVertex(1)->z(),
+                t->getVertex(2)->x(), t->getVertex(2)->y(), t->getVertex(2)->z(),
+                1., 1., 1.);
+      }
+      fprintf(ftri,"};\n");
+      fclose(ftri);
+    }
   }
 }
 
@@ -2885,12 +2871,31 @@ void GFaceCompound::printStuff(int iNewton) const
 
   sprintf(name7, "UVM-%d.pos", (*it)->tag());
 
-  //FILE * uva = Fopen(name0,"w");
   FILE * uvx = Fopen(name1,"w");
+  if(!uvx){
+    Msg::Error("Could not open file '%s'", name1);
+    return;
+  }
   FILE * uvy = Fopen(name2,"w");
+  if(!uvy){
+    Msg::Error("Could not open file '%s'", name2);
+    return;
+  }
   FILE * uvz = Fopen(name3,"w");
+  if(!uvz){
+    Msg::Error("Could not open file '%s'", name3);
+    return;
+  }
   FILE * xyzu = Fopen(name4,"w");
+  if(!xyzu){
+    Msg::Error("Could not open file '%s'", name4);
+    return;
+  }
   FILE * xyzv = Fopen(name5,"w");
+  if(!xyzv){
+    Msg::Error("Could not open file '%s'", name5);
+    return;
+  }
 
   fprintf(uvx, "View \"\"{\n");
   fprintf(uvy, "View \"\"{\n");
diff --git a/Geo/GFaceCompound.h b/Geo/GFaceCompound.h
index c2146e6..3ad1a32 100644
--- a/Geo/GFaceCompound.h
+++ b/Geo/GFaceCompound.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 3a00394..b1c4904 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,7 +33,7 @@
 #include "Context.h"
 #include "OS.h"
 #include "GEdgeLoop.h"
-#include "MVertexPositionSet.h"
+#include "MVertexRTree.h"
 #include "OpenFile.h"
 #include "CreateFile.h"
 #include "Options.h"
@@ -288,14 +288,13 @@ GVertex *GModel::getVertexByTag(int n) const
 std::vector<int> GModel::getEdgesByStringTag(const std::string tag)
 {
   std::vector<int> nums;
-  std::map<int, std::vector<GEntity*> > physicalGroups[4];
-  getPhysicalGroups(physicalGroups);
-  std::vector<GEntity*> allEdges = physicalGroups[1][this->getPhysicalNumber(1,tag)];
-  for ( std::vector<GEntity*>::iterator it = allEdges.begin(); it != allEdges.end(); it++){
+  std::map<int, std::vector<GEntity*> > physicalGroups;
+  getPhysicalGroups(1, physicalGroups);
+  std::vector<GEntity*> allEdges = physicalGroups[this->getPhysicalNumber(1, tag)];
+  for (std::vector<GEntity*>::iterator it = allEdges.begin(); it != allEdges.end(); it++){
     GEntity *ge = *it;
     nums.push_back(ge->tag());
   }
-
   return nums;
 }
 
@@ -358,13 +357,45 @@ void GModel::snapVertices()
   }
 }
 
-void GModel::getEntities(std::vector<GEntity*> &entities) const
+void GModel::getEntities(std::vector<GEntity*> &entities, int dim) const
+{
+  entities.clear();
+  switch (dim) {
+  case 0:
+    entities.insert(entities.end(), vertices.begin(), vertices.end());
+    break;
+  case 1:
+    entities.insert(entities.end(), edges.begin(), edges.end());
+    break;
+  case 2:
+    entities.insert(entities.end(), faces.begin(), faces.end());
+    break;
+  case 3:
+    entities.insert(entities.end(), regions.begin(), regions.end());
+    break;
+  default:
+    entities.insert(entities.end(), vertices.begin(), vertices.end());
+    entities.insert(entities.end(), edges.begin(), edges.end());
+    entities.insert(entities.end(), faces.begin(), faces.end());
+    entities.insert(entities.end(), regions.begin(), regions.end());
+    break;
+  }
+}
+
+void GModel::getEntitiesInBox(std::vector<GEntity*> &entities, SBoundingBox3d box,
+                              int dim) const
 {
   entities.clear();
-  entities.insert(entities.end(), vertices.begin(), vertices.end());
-  entities.insert(entities.end(), edges.begin(), edges.end());
-  entities.insert(entities.end(), faces.begin(), faces.end());
-  entities.insert(entities.end(), regions.begin(), regions.end());
+  std::vector<GEntity*> all;
+  getEntities(all, dim);
+  // if we use this often, create an rtree to avoid the linear search
+  for(unsigned int i = 0; i < all.size(); i++){
+    SBoundingBox3d bbox = all[i]->bounds();
+    if(bbox.min().x() >= box.min().x() && bbox.max().x() <= box.max().x() &&
+       bbox.min().y() >= box.min().y() && bbox.max().y() <= box.max().y() &&
+       bbox.min().z() >= box.min().z() && bbox.max().z() <= box.max().z())
+      entities.push_back(all[i]);
+  }
 }
 
 int GModel::getMaxElementaryNumber(int dim)
@@ -387,7 +418,7 @@ bool GModel::noPhysicalGroups()
   return true;
 }
 
-void GModel::getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4])
+void GModel::getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4]) const
 {
   std::vector<GEntity*> entities;
   getEntities(entities);
@@ -403,6 +434,21 @@ void GModel::getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4])
   }
 }
 
+void GModel::getPhysicalGroups(int dim, std::map<int, std::vector<GEntity*> > &groups) const
+{
+  std::vector<GEntity*> entities;
+  getEntities(entities, dim);
+  for(unsigned int i = 0; i < entities.size(); i++){
+    for(unsigned int j = 0; j < entities[i]->physicals.size(); j++){
+      // physicals can be stored with negative signs when the entity
+      // should be "reversed"
+      int p = std::abs(entities[i]->physicals[j]);
+      if(std::find(groups[p].begin(), groups[p].end(), entities[i]) == groups[p].end())
+        groups[p].push_back(entities[i]);
+    }
+  }
+}
+
 void GModel::deletePhysicalGroups()
 {
   std::vector<GEntity*> entities;
@@ -414,15 +460,13 @@ void GModel::deletePhysicalGroups()
 void GModel::deletePhysicalGroup(int dim, int num)
 {
   std::vector<GEntity*> entities;
-  getEntities(entities);
+  getEntities(entities, dim);
   for(unsigned int i = 0; i < entities.size(); i++){
-    if(dim == entities[i]->dim()){
-      std::vector<int> p;
-      for(unsigned int j = 0; j < entities[i]->physicals.size(); j++)
-        if(entities[i]->physicals[j] != num)
-          p.push_back(entities[i]->physicals[j]);
-      entities[i]->physicals = p;
-    }
+    std::vector<int> p;
+    for(unsigned int j = 0; j < entities[i]->physicals.size(); j++)
+      if(entities[i]->physicals[j] != num)
+        p.push_back(entities[i]->physicals[j]);
+    entities[i]->physicals = p;
   }
 }
 
@@ -454,14 +498,6 @@ int GModel::setPhysicalName(std::string name, int dim, int number)
 
 std::string GModel::getPhysicalName(int dim, int number) const
 {
-  //Emi debug here
-  // printf("getPhysName size %d \n", physicalNames.size());
-  // std::map<std::pair<int, int>, std::string>::iterator itt = physicalNames.begin();
-  // for (; itt != physicalNames.end(); itt++){
-  //   printf("name %s \n", itt->second.c_str());
-  //   printf("par (%d,%d) \n", itt->first.first, itt->first.second);
-  // }
-
   std::map<std::pair<int, int>, std::string>::const_iterator it =
     physicalNames.find(std::pair<int, int>(dim, number));
   if(it != physicalNames.end()) return it->second;
@@ -820,10 +856,10 @@ MVertex *GModel::getMeshVertexByTag(int n)
 void GModel::getMeshVerticesForPhysicalGroup(int dim, int num, std::vector<MVertex*> &v)
 {
   v.clear();
-  std::map<int, std::vector<GEntity*> > groups[4];
-  getPhysicalGroups(groups);
-  std::map<int, std::vector<GEntity*> >::const_iterator it = groups[dim].find(num);
-  if(it == groups[dim].end()) return;
+  std::map<int, std::vector<GEntity*> > groups;
+  getPhysicalGroups(dim, groups);
+  std::map<int, std::vector<GEntity*> >::const_iterator it = groups.find(num);
+  if(it == groups.end()) return;
   const std::vector<GEntity *> &entities = it->second;
   std::set<MVertex*> sv;
   for(unsigned int i = 0; i < entities.size(); i++){
@@ -1017,8 +1053,8 @@ void GModel::deleteMeshPartitions()
 }
 
 void GModel::store(std::vector<MVertex*> &vertices, int dim,
-          std::map<int, std::vector<MElement*> > &entityMap,
-          std::map<int, std::map<int, std::string> > &physicalMap)
+                   std::map<int, std::vector<MElement*> > &entityMap,
+                   std::map<int, std::map<int, std::string> > &physicalMap)
 {
   _storeVerticesInEntities(vertices);
   _storeElementsInEntities(entityMap);
@@ -1176,7 +1212,7 @@ void GModel::_storeVerticesInEntities(std::vector<MVertex*> &vertices)
   }
 }
 
-void GModel::_pruneMeshVertexAssociations()
+void GModel::pruneMeshVertexAssociations()
 {
   std::vector<GEntity*> entities;
   std::vector<MVertex*> vertices;
@@ -1459,16 +1495,8 @@ void GModel::checkMeshCoherence(double tolerance)
     for(unsigned int i = 0; i < entities.size(); i++)
       vertices.insert(vertices.end(), entities[i]->mesh_vertices.begin(),
                       entities[i]->mesh_vertices.end());
-    MVertexPositionSet pos(vertices);
-    for(unsigned int i = 0; i < vertices.size(); i++)
-      pos.find(vertices[i]->x(), vertices[i]->y(), vertices[i]->z(), eps);
-    int num = 0;
-    for(unsigned int i = 0; i < vertices.size(); i++)
-      if(!vertices[i]->getIndex()){
-        Msg::Info("Duplicate vertex %d at (%.16g,%.16g,%.16g)", vertices[i]->getNum(),
-                  vertices[i]->x(), vertices[i]->y(), vertices[i]->z());
-        num++;
-      }
+    MVertexRTree pos(eps);
+    int num = pos.insert(vertices, true);
     if(num) Msg::Error("%d duplicate vert%s", num, num > 1 ? "ices" : "ex");
   }
 
@@ -1476,29 +1504,22 @@ void GModel::checkMeshCoherence(double tolerance)
   {
     Msg::Info("Checking for duplicate elements...");
     std::vector<MVertex*> vertices;
-    for(unsigned int i = 0; i < entities.size(); i++)
+    for(unsigned int i = 0; i < entities.size(); i++){
       for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
         MElement *e = entities[i]->getMeshElement(j);
         double vol = e->getVolume();
         if(vol < 0)
           Msg::Warning("Element %d has negative volume", e->getNum());
-        else if(vol < 1e-12)
+        else if(vol < eps * eps * eps)
           Msg::Warning("Element %d has zero volume", e->getNum());
         SPoint3 p = e->barycenter();
         vertices.push_back(new MVertex(p.x(), p.y(), p.z()));
       }
-    MVertexPositionSet pos(vertices);
+    }
+    MVertexRTree pos(eps);
+    int num = pos.insert(vertices, true);
     for(unsigned int i = 0; i < vertices.size(); i++)
-      pos.find(vertices[i]->x(), vertices[i]->y(), vertices[i]->z(), eps);
-    int num = 0;
-    for(unsigned int i = 0; i < vertices.size(); i++){
-      if(!vertices[i]->getIndex()){
-        Msg::Info("Duplicate element with barycenter (%.16g,%.16g,%.16g)",
-                  vertices[i]->x(), vertices[i]->y(), vertices[i]->z());
-        num++;
-      }
       delete vertices[i];
-    }
     if(num) Msg::Error("%d duplicate element%s", num, num > 1 ? "s" : "");
   }
 
@@ -1517,17 +1538,14 @@ int GModel::removeDuplicateMeshVertices(double tolerance)
   getEntities(entities);
 
   std::vector<MVertex*> vertices;
-  for(unsigned int i = 0; i < entities.size(); i++)
+  for(unsigned int i = 0; i < entities.size(); i++){
     for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++){
       MVertex *v = entities[i]->mesh_vertices[j];
       vertices.push_back(new MVertex(v->x(), v->y(), v->z()));
     }
-  MVertexPositionSet pos(vertices);
-  for(unsigned int i = 0; i < vertices.size(); i++)
-    pos.find(vertices[i]->x(), vertices[i]->y(), vertices[i]->z(), eps);
-  int num = 0;
-  for(unsigned int i = 0; i < vertices.size(); i++)
-    if(!vertices[i]->getIndex()) num++;
+  }
+  MVertexRTree pos(eps);
+  int num = pos.insert(vertices);
 
   Msg::Info("Found %d duplicate vertices ", num);
 
@@ -1545,7 +1563,7 @@ int GModel::removeDuplicateMeshVertices(double tolerance)
       std::vector<MVertex*> verts;
       for(int k = 0; k < e->getNumVertices(); k++){
         MVertex *v = e->getVertex(k);
-        MVertex *v2 = pos.find(v->x(), v->y(), v->z(), eps);
+        MVertex *v2 = pos.find(v->x(), v->y(), v->z());
         if(v2) verts.push_back(v2);
       }
       if((int)verts.size() == e->getNumVertices()){
@@ -2318,8 +2336,14 @@ void makeSimplyConnected(std::map<int, std::vector<MElement*> > elements[10])
       allElements.push_back(elements[4][ri][j]);
     std::vector<std::vector<MElement*> > conRegions;
     int nbConRegions = connectedVolumes(allElements, conRegions);
+    Msg::Info("%d connected regions (reg=%d)\n", nbConRegions, ri);
+    unsigned int maxNumEl = 1;
+    for(int j = 0; j < nbConRegions; j++)
+      if(conRegions[j].size() > maxNumEl)
+        maxNumEl = conRegions[j].size();
     for(int j = 0; j < nbConRegions; j++){
-      if(conRegions[j].size() < 3){ //remove conRegions containing 1 or 2 elements
+      //remove conRegions containing few elements
+      if(conRegions[j].size() < maxNumEl * 1.e-4){
         //find adjacent region
         int r2 = ri;
         if(regs.size() == 2)
@@ -2329,7 +2353,8 @@ void makeSimplyConnected(std::map<int, std::vector<MElement*> > elements[10])
             MElement *el = conRegions[j][k];
             for(int l = 0; l < el->getNumFaces(); l++){
               MFace mf = el->getFace(l);
-              std::multimap<MFace, MElement*, Less_Face>::iterator itl = f2e.lower_bound(mf);
+              std::multimap<MFace, MElement*, Less_Face>::iterator itl =
+                f2e.lower_bound(mf);
               for(; itl != f2e.upper_bound(mf); itl++){
                 if(itl->second != el) break;
               }
@@ -2389,9 +2414,15 @@ void makeSimplyConnected(std::map<int, std::vector<MElement*> > elements[10])
     for(unsigned int j = 0; j < elements[2][fi].size(); j++)
       allElements.push_back(elements[2][fi][j]);
     std::vector<std::vector<MElement*> > conSurfaces;
-    int nbSurfaces = connectedSurfaces(allElements, conSurfaces);
-    for(int j = 0; j < nbSurfaces; j++){
-      if(conSurfaces[j].size() < 3){ //remove conSurfaces containing 1 or 2 elements
+    int nbConSurfaces = connectedSurfaces(allElements, conSurfaces);
+    Msg::Info("%d connected surfaces (reg=%d)\n", nbConSurfaces, fi);
+    unsigned int maxNumEl = 1;
+    for(int j = 0; j < nbConSurfaces; j++)
+      if(conSurfaces[j].size() > maxNumEl)
+        maxNumEl = conSurfaces[j].size();
+    for(int j = 0; j < nbConSurfaces; j++){
+      //remove conSurfaces containing few elements
+      if(conSurfaces[j].size() < maxNumEl * 1.e-4){
         //find adjacent surface
         int f2 = fi;
         if(faces.size() == 2)
@@ -2847,11 +2878,21 @@ void GModel::setPeriodicPairOfFaces(int numFaceMaster, std::vector<int> EdgeList
                                      numFaceSlave, EdgeListSlave);
 }
 
-void GModel::setPhysicalNumToEntitiesInBox(int EntityType, int PhysicalGroupNumber,
+void GModel::setPhysicalNumToEntitiesInBox(int EntityDimension, int PhysicalNumber,
+                                           SBoundingBox3d box)
+{
+  std::vector<GEntity*> entities;
+  getEntitiesInBox(entities, box, EntityDimension);
+  for(unsigned int i = 0; i < entities.size(); i++)
+    entities[i]->addPhysicalEntity(PhysicalNumber);
+}
+
+void GModel::setPhysicalNumToEntitiesInBox(int EntityDimension, int PhysicalNumber,
                                            std::vector<double> p1, std::vector<double> p2)
 {
-  if(_factory)
-    _factory->setPhysicalNumToEntitiesInBox(this, EntityType, PhysicalGroupNumber, p1, p2);
+  if(p1.size() != 3 || p2.size() != 3) return;
+  SBoundingBox3d box(p1[0], p1[2], p1[2], p2[0], p2[1], p2[3]);
+  setPhysicalNumToEntitiesInBox(EntityDimension, PhysicalNumber, box);
 }
 
 static void computeDuplicates(GModel *model,
@@ -2859,8 +2900,7 @@ static void computeDuplicates(GModel *model,
                               std::map<GVertex*, GVertex*> &Duplicates2Unique,
                               const double &eps)
 {
-  // FIXME: currently we use a greedy algorithm in n^2 (using a kd-tree:
-  // cf. MVertexPositionSet)
+  // FIXME: currently we use a greedy algorithm in n^2 (use e.g. MVertexRTree)
 
   // FIXME: add option to remove orphaned entities after duplicate check
   std::list<GVertex*> v;
@@ -3511,7 +3551,7 @@ void GModel::computeHomology()
         }
       }
     }
-    _pruneMeshVertexAssociations();
+    pruneMeshVertexAssociations();
     delete homology;
   }
   Msg::Info("");
@@ -3569,3 +3609,6 @@ void GModel::setCompoundVisibility()
   }
 
 }
+
+
+
diff --git a/Geo/GModel.h b/Geo/GModel.h
index e1a6f31..cda7dc2 100644
--- a/Geo/GModel.h
+++ b/Geo/GModel.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -125,12 +125,6 @@ class GModel
   void _storeVerticesInEntities(std::map<int, MVertex*> &vertices);
   void _storeVerticesInEntities(std::vector<MVertex*> &vertices);
 
-  // remove all mesh vertex associations to geometrical entities and
-  // remove vertices from geometrical entities, then
-  // _associateEntityWithMeshVertices and _storeVerticesInEntities
-  // are called to rebuild the associations
-  void _pruneMeshVertexAssociations();
-
   // store the physical tags in the geometrical entities
   void _storePhysicalTagsInEntities(int dim,
                                     std::map<int, std::map<int, std::string> > &map);
@@ -203,6 +197,11 @@ class GModel
   //delete the mesh stored in entities and call destroMeshCaches
   void deleteMesh();
 
+  // remove all mesh vertex associations to geometrical entities and remove
+  // vertices from geometrical entities, then _associateEntityWithMeshVertices
+  // and _storeVerticesInEntities are called to rebuild the associations
+  void pruneMeshVertexAssociations();
+
   // access internal CAD representations
   GEO_Internals *getGEOInternals(){ return _geo_internals; }
   OCC_Internals *getOCCInternals(){ return _occ_internals; }
@@ -283,7 +282,11 @@ class GModel
   void snapVertices();
 
   // fill a vector containing all the entities in the model
-  void getEntities(std::vector<GEntity*> &entities) const;
+  void getEntities(std::vector<GEntity*> &entities, int dim=-1) const;
+
+  // fill a vector containing all the entities in a given bounding box
+  void getEntitiesInBox(std::vector<GEntity*> &entities, SBoundingBox3d box,
+                        int dim=-1) const;
 
   // return the highest number associated with an elementary entity of
   // a given dimension (or the highest overall if dim < 0)
@@ -293,7 +296,8 @@ class GModel
   bool noPhysicalGroups();
 
   // return all physical groups (one map per dimension: 0-D to 3-D)
-  void getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4]);
+  void getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4]) const;
+  void getPhysicalGroups(int dim, std::map<int, std::vector<GEntity*> > &groups) const;
 
   // delete physical groups in the model
   void deletePhysicalGroups();
@@ -327,6 +331,12 @@ class GModel
   // "dim" and name "name". return -1 if not found
   int getPhysicalNumber(const int &dim, const std::string & name);
 
+  // set physical tags to entities in a given bounding box
+  void setPhysicalNumToEntitiesInBox(int EntityDimension, int PhysicalNumber,
+                                     std::vector<double> p1, std::vector<double> p2);
+  void setPhysicalNumToEntitiesInBox(int EntityDimension, int PhysicalNumber,
+                                     SBoundingBox3d box);
+
   // get the name (if any) of a given elementary entity of dimension
   // "dim" and id number "num"
   std::string getElementaryName(int dim, int num);
@@ -531,13 +541,9 @@ class GModel
   void    salomeconnect();
   void    occconnect();
 
-	// do stuff for all entities inside a bounding box
-  void    setPeriodicAllFaces(std::vector<double> FaceTranslationVector);
-  void    setPeriodicPairOfFaces(int numFaceMaster, std::vector<int> EdgeListMaster,
-																 int numFaceSlave, std::vector<int> EdgeListSlave);
-  void    setPhysicalNumToEntitiesInBox(int EntityType, int PhysicalGroupNumber,
-																				std::vector<double> p1,std::vector<double> p2);
-
+  void setPeriodicAllFaces(std::vector<double> FaceTranslationVector);
+  void setPeriodicPairOfFaces(int numFaceMaster, std::vector<int> EdgeListMaster,
+                              int numFaceSlave, std::vector<int> EdgeListSlave);
 
   // build a new GModel by cutting the elements crossed by the levelset ls
   // if cutElem is set to false, split the model without cutting the elements
@@ -620,7 +626,7 @@ class GModel
 
   // mesh statistics (saved as a Gmsh post-processing view)
   int writePOS(const std::string &name, bool printElementary,
-               bool printElementNumber, bool printGamma, bool printEta, bool printRho,
+               bool printElementNumber, bool printSICN, bool printGamma, bool printRho,
                bool printDisto, bool saveAll=false, double scalingFactor=1.0);
 
   // Stereo lithography format
diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp
index 6bf5b36..54bfcc0 100644
--- a/Geo/GModelFactory.cpp
+++ b/Geo/GModelFactory.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -20,7 +20,6 @@
 #include "Geo.h"
 #include "GmshDefines.h"
 
-
 GVertex *GeoFactory::addVertex(GModel *gm, double x, double y, double z, double lc)
 {
   int num =  gm->getMaxElementaryNumber(0) + 1;
@@ -164,7 +163,6 @@ GFace *GeoFactory::addPlanarFace(GModel *gm, std::vector< std::vector<GEdge *> >
 
 GRegion* GeoFactory::addVolume (GModel *gm, std::vector<std::vector<GFace *> > faces)
 {
-
   //create surface loop
   int nLoops = faces.size();
   std::vector<SurfaceLoop *> vecLoops;
@@ -1169,8 +1167,8 @@ void OCCFactory::setPeriodicAllFaces(GModel *gm, std::vector<double> FaceTransla
          && IsEqualG(BarycenterFace1.X()+FaceTranslationVector[0],BarycenterFace2.X())
          && IsEqualG(BarycenterFace1.Y()+FaceTranslationVector[1],BarycenterFace2.Y())
          && IsEqualG(BarycenterFace1.Z()+FaceTranslationVector[2],BarycenterFace2.Z())){
-        numFaceMaster = gm->getOCCInternals()->getGTagOfOCCFaceByNativePtr(gm,aFace1);
-        numFaceSlave  = gm->getOCCInternals()->getGTagOfOCCFaceByNativePtr(gm,aFace2);
+        numFaceMaster = gm->getOCCInternals()->getOCCFaceByNativePtr(gm,aFace1)->tag();
+        numFaceSlave  = gm->getOCCInternals()->getOCCFaceByNativePtr(gm,aFace2)->tag();
         //Msg::Info("Face %d (slave) is most likely Face %d (master) translated by (%.2e,%.2e,%.2e)!",
         //           numFaceSlave,numFaceMaster,FaceTranslationVector[0],FaceTranslationVector[1],
         //           FaceTranslationVector[2]);
@@ -1183,7 +1181,7 @@ void OCCFactory::setPeriodicAllFaces(GModel *gm, std::vector<double> FaceTransla
         for (TopExp_Explorer aEdgeExplorer1(aFace1,TopAbs_EDGE); aEdgeExplorer1.More();
              aEdgeExplorer1.Next()) {
           TopoDS_Edge aEdge1 = TopoDS::Edge(aEdgeExplorer1.Current());
-          int numEdgeMaster  = gm->getOCCInternals()->getGTagOfOCCEdgeByNativePtr(gm,aEdge1);
+          int numEdgeMaster  = gm->getOCCInternals()->getOCCEdgeByNativePtr(gm,aEdge1)->tag();
           EdgeListMaster[i1] = numEdgeMaster;
           //i2=0;
           for (TopExp_Explorer aEdgeExplorer2(aFace2,TopAbs_EDGE); aEdgeExplorer2.More();
@@ -1201,7 +1199,7 @@ void OCCFactory::setPeriodicAllFaces(GModel *gm, std::vector<double> FaceTransla
                && IsEqualG(BarycenterEdge1.X()+FaceTranslationVector[0],BarycenterEdge2.X())
                && IsEqualG(BarycenterEdge1.Y()+FaceTranslationVector[1],BarycenterEdge2.Y())
                && IsEqualG(BarycenterEdge1.Z()+FaceTranslationVector[2],BarycenterEdge2.Z())){
-              int numEdgeSlave   = gm->getOCCInternals()->getGTagOfOCCEdgeByNativePtr(gm,aEdge2);
+              int numEdgeSlave   = gm->getOCCInternals()->getOCCEdgeByNativePtr(gm,aEdge2)->tag();
               EdgeListSlave[i1]  = numEdgeSlave;
             }
           }
@@ -1253,136 +1251,6 @@ void OCCFactory::setPeriodicPairOfFaces(GModel *gm, int numFaceMaster, std::vect
   }
 }
 
-/* setPhysicalNumToEntitiesInBox allows to set a physical number to all entities
-   of a given type (0:vertex, 1:edge, 2:face, 3:volume) lying inside a 3D box
-   defined by 2 points */
-void OCCFactory::setPhysicalNumToEntitiesInBox(GModel *gm, int EntityType, int PhysicalGroupNumber,
-                                               std::vector<double> p1, std::vector<double> p2)
-{
-  std::vector<int> ListOfGVerticeTagsInbox;
-  std::vector<int> ListOfGEdgesTagsInbox;
-  std::vector<int> ListOfGFacesTagsInbox;
-  std::vector<int> ListOfGRegionsTagsInbox;
-
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
-  TopoDS_Shape shape = gm->_occ_internals->getShape();
-  switch (EntityType) {
-  case 0 :
-    for(TopExp_Explorer aVertexExplorer(shape, TopAbs_VERTEX); aVertexExplorer.More(); aVertexExplorer.Next()){
-      TopoDS_Vertex aVertex = TopoDS::Vertex(aVertexExplorer.Current());
-      Bnd_Box VertexBB;
-      BRepBndLib::Add(aVertex,VertexBB);
-      VertexBB.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-      if(aXmin>p1[0]
-         && aYmin>p1[1]
-         && aZmin>p1[2]
-         && aXmax<p2[0]
-         && aYmax<p2[1]
-         && aZmax<p2[2]){
-        int GVertexTag = gm->getOCCInternals()->getGTagOfOCCVertexByNativePtr(gm,aVertex);
-        //Msg::Info("This volume %d (xmin,ymin,zmin)=(%lf,%lf,%lf)  (xmax,ymax,zmax)=(%lf,%lf,%lf)",GVertexTag);
-        ListOfGVerticeTagsInbox.push_back(GVertexTag);
-      }
-    }
-    Msg::Info("These edges have OCC bounding boxes inside the given box!");
-    for (std::vector<int>::iterator it = ListOfGVerticeTagsInbox.begin() ;
-         it != ListOfGVerticeTagsInbox.end(); ++it){
-      Msg::Info("- %d",*it);
-      GVertex *gv = gm->getVertexByTag(*it);
-      if(gv){
-        gv->addPhysicalEntity(PhysicalGroupNumber);
-      }
-    }
-    break;
-  case 1 :
-    for(TopExp_Explorer aEdgeExplorer(shape, TopAbs_EDGE); aEdgeExplorer.More(); aEdgeExplorer.Next()){
-      TopoDS_Edge aEdge = TopoDS::Edge(aEdgeExplorer.Current());
-      Bnd_Box EdgeBB;
-      BRepBndLib::Add(aEdge,EdgeBB);
-      EdgeBB.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-
-      if(aXmin>p1[0]
-         && aYmin>p1[1]
-         && aZmin>p1[2]
-         && aXmax<p2[0]
-         && aYmax<p2[1]
-         && aZmax<p2[2]){
-        int GEdgeTag = gm->getOCCInternals()->getGTagOfOCCEdgeByNativePtr(gm,aEdge);
-        //Msg::Info("This edge %d (xmin,ymin,zmin)=(%lf,%lf,%lf)  (xmax,ymax,zmax)=(%lf,%lf,%lf)",GEdgeTag);
-        ListOfGEdgesTagsInbox.push_back(GEdgeTag);
-      }
-    }
-    Msg::Info("These edges have OCC bounding boxes inside the given box!");
-    for (std::vector<int>::iterator it = ListOfGEdgesTagsInbox.begin() ; it != ListOfGEdgesTagsInbox.end(); ++it){
-      Msg::Info("- %d",*it);
-      GEdge *ge = gm->getEdgeByTag(*it);
-      if(ge){
-        ge->addPhysicalEntity(PhysicalGroupNumber);
-      }
-    }
-    break;
-  case 2 :
-    for(TopExp_Explorer aFaceExplorer(shape, TopAbs_FACE); aFaceExplorer.More(); aFaceExplorer.Next()){
-      TopoDS_Face aFace = TopoDS::Face(aFaceExplorer.Current());
-      Bnd_Box FaceBB;
-      BRepBndLib::Add(aFace,FaceBB);
-      FaceBB.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-
-      if(aXmin>p1[0]
-         && aYmin>p1[1]
-         && aZmin>p1[2]
-         && aXmax<p2[0]
-         && aYmax<p2[1]
-         && aZmax<p2[2]){
-        int GFaceTag = gm->getOCCInternals()->getGTagOfOCCFaceByNativePtr(gm,aFace);
-        //Msg::Info("This face %d (xmin,ymin,zmin)=(%lf,%lf,%lf)  (xmax,ymax,zmax)=(%lf,%lf,%lf)",GFaceTag);
-        ListOfGFacesTagsInbox.push_back(GFaceTag);
-      }
-    }
-    Msg::Info("This faces have OCC bounding boxes inside the given box!");
-    for (std::vector<int>::iterator it = ListOfGFacesTagsInbox.begin() ;
-         it != ListOfGFacesTagsInbox.end(); ++it){
-      Msg::Info("- %d",*it);
-      GFace *gf = gm->getFaceByTag(*it);
-      if(gf){
-        gf->addPhysicalEntity(PhysicalGroupNumber);
-      }
-    }
-    break;
-  case 3 :
-    for(TopExp_Explorer aSolidExplorer(shape, TopAbs_SOLID); aSolidExplorer.More();
-        aSolidExplorer.Next()){
-      TopoDS_Solid aSolid = TopoDS::Solid(aSolidExplorer.Current());
-      Bnd_Box SolidBB;
-      BRepBndLib::Add(aSolid,SolidBB);
-      SolidBB.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-      if(aXmin>p1[0]
-         && aYmin>p1[1]
-         && aZmin>p1[2]
-         && aXmax<p2[0]
-         && aYmax<p2[1]
-         && aZmax<p2[2]
-         ){
-        int GSolidTag = gm->getOCCInternals()->getGTagOfOCCSolidByNativePtr(gm,aSolid);
-        //Msg::Info("This volume %d (xmin,ymin,zmin)=(%lf,%lf,%lf)  (xmax,ymax,zmax)=(%lf,%lf,%lf)",GSolidTag);
-        ListOfGRegionsTagsInbox.push_back(GSolidTag);
-      }
-    }
-    Msg::Info("These edges have OCC bounding boxes inside the given box!");
-    for (std::vector<int>::iterator it = ListOfGRegionsTagsInbox.begin() ;
-         it != ListOfGRegionsTagsInbox.end(); ++it){
-      Msg::Info("- %d",*it);
-      GRegion *gr = gm->getRegionByTag(*it);
-      if(gr){
-        gr->addPhysicalEntity(PhysicalGroupNumber);
-      }
-    }
-    break;
-  default:
-    Msg::Error("First argument of setPhysicalNumToEntitiesInBox should be 0,1,2 or 3 (Vertice, Edge, Surface or Volume)");
-  }
-}
-
 void OCCFactory::fillet(GModel *gm, std::vector<int> edges, double radius)
 {
   try{
diff --git a/Geo/GModelFactory.h b/Geo/GModelFactory.h
index ffab382..ac25ea3 100644
--- a/Geo/GModelFactory.h
+++ b/Geo/GModelFactory.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -210,15 +210,7 @@ class GModelFactory {
     Msg::Error("setPeriodicPairOfFaces not implemented yet");
   }
   ;
-  virtual void setPhysicalNumToEntitiesInBox(GModel *gm, int EntityType,
-                                             int PhysicalGroupNumber,
-                                             std::vector<double> p1,std::vector<double> p2)
-  {
-    Msg::Error("setPhysicalNumToEntitiesInBox not implemented yet");
-  }
-
   virtual void healGeometry(GModel *gm, double tolerance = -1.) = 0;
-
 };
 
 class GeoFactory : public GModelFactory {
@@ -287,9 +279,6 @@ class OCCFactory : public GModelFactory {
   void setPeriodicAllFaces(GModel *gm, std::vector<double> FaceTranslationVector);
   void setPeriodicPairOfFaces(GModel *gm, int numFaceMaster, std::vector<int> EdgeListMaster,
                               int numFaceSlave, std::vector<int> EdgeListSlave);
-  void setPhysicalNumToEntitiesInBox(GModel *gm, int EntityType, int PhysicalGroupNumber,
-                                     std::vector<double> p1, std::vector<double> p2);
-
   void fillet(GModel *gm, std::vector<int> edges, double radius);
   void healGeometry(GModel *gm, double tolerance = -1.);
 };
diff --git a/Geo/GModelIO_ACIS.cpp b/Geo/GModelIO_ACIS.cpp
index c044a82..e297030 100644
--- a/Geo/GModelIO_ACIS.cpp
+++ b/Geo/GModelIO_ACIS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_ACTRAN.cpp b/Geo/GModelIO_ACTRAN.cpp
index 27e885f..17251cd 100644
--- a/Geo/GModelIO_ACTRAN.cpp
+++ b/Geo/GModelIO_ACTRAN.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_BDF.cpp b/Geo/GModelIO_BDF.cpp
index 3e90be7..56d92a3 100644
--- a/Geo/GModelIO_BDF.cpp
+++ b/Geo/GModelIO_BDF.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_CGNS.cpp b/Geo/GModelIO_CGNS.cpp
index 8cdd3f1..9570e83 100644
--- a/Geo/GModelIO_CGNS.cpp
+++ b/Geo/GModelIO_CGNS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_DIFF.cpp b/Geo/GModelIO_DIFF.cpp
index 18f27ac..96ded24 100644
--- a/Geo/GModelIO_DIFF.cpp
+++ b/Geo/GModelIO_DIFF.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp
index 6f4beca..c46098c 100644
--- a/Geo/GModelIO_Fourier.cpp
+++ b/Geo/GModelIO_Fourier.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_Fourier.h b/Geo/GModelIO_Fourier.h
index cb3d18f..4a2691e 100644
--- a/Geo/GModelIO_Fourier.h
+++ b/Geo/GModelIO_Fourier.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp
index 59d761a..baabc9f 100644
--- a/Geo/GModelIO_GEO.cpp
+++ b/Geo/GModelIO_GEO.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -48,19 +48,24 @@ int GModel::readGEO(const std::string &name)
 
 int GModel::exportDiscreteGEOInternals()
 {
-  if(_geo_internals) delete _geo_internals;
+  int maxv = 1; // FIXME: temporary - see TODO below
+
+  if(_geo_internals){
+    maxv = _geo_internals->MaxVolumeNum;
+    delete _geo_internals;
+  }
   _geo_internals = new GEO_Internals;
 
   for(viter it = firstVertex(); it != lastVertex(); it++){
     Vertex *v = Create_Vertex((*it)->tag(), (*it)->x(), (*it)->y(), (*it)->z(),
-                              (*it)->prescribedMeshSizeAtVertex(), 1.0);
-    Tree_Add(this->getGEOInternals()->Points, &v);
+        (*it)->prescribedMeshSizeAtVertex(), 1.0);
+    Tree_Add(_geo_internals->Points, &v);
   }
 
   for(eiter it = firstEdge(); it != lastEdge(); it++){
     if((*it)->geomType() == GEntity::DiscreteCurve){
       Curve *c = Create_Curve((*it)->tag(), MSH_SEGM_DISCRETE, 1,
-                              NULL, NULL, -1, -1, 0., 1.);
+          NULL, NULL, -1, -1, 0., 1.);
       List_T *points = Tree2List(_geo_internals->Points);
       GVertex *gvb = (*it)->getBeginVertex();
       GVertex *gve = (*it)->getEndVertex();
@@ -79,7 +84,7 @@ int GModel::exportDiscreteGEOInternals()
         }
       }
       End_Curve(c);
-      Tree_Add(this->getGEOInternals()->Curves, &c);
+      Tree_Add(_geo_internals->Curves, &c);
       CreateReversedCurve(c);
       List_Delete(points);
     }
@@ -100,12 +105,14 @@ int GModel::exportDiscreteGEOInternals()
           }
         }
       }
-      Tree_Add(this->getGEOInternals()->Surfaces, &s);
+      Tree_Add(_geo_internals->Surfaces, &s);
       List_Delete(curves);
     }
   }
 
-  // TODO: create Volumes from discreteRegions
+  // TODO: create Volumes from discreteRegions ; meanwhile, keep track of
+  // maximum volume num so that we don't break later operations:
+  _geo_internals->MaxVolumeNum = maxv;
 
   Msg::Debug("Geo internal model has:");
   Msg::Debug("%d Vertices", Tree_Nbr(_geo_internals->Points));
@@ -127,6 +134,9 @@ int GModel::importGEOInternals()
         v = new gmshVertex(this, p);
         add(v);
       }
+      else{
+        v->resetMeshAttributes();
+      }
       if(!p->Visible) v->setVisibility(0);
     }
     List_Delete(points);
@@ -137,7 +147,7 @@ int GModel::importGEOInternals()
       Curve *c;
       List_Read(curves, i, &c);
       if(c->Num >= 0){
-	GEdge *e = getEdgeByTag(c->Num);
+        GEdge *e = getEdgeByTag(c->Num);
         if(!e && c->Typ == MSH_SEGM_COMPOUND){
           std::vector<GEdge*> comp;
           for(unsigned int j = 0; j < c->compound.size(); j++){
@@ -145,24 +155,27 @@ int GModel::importGEOInternals()
             if(ge) comp.push_back(ge);
           }
           e = new GEdgeCompound(this, c->Num, comp);
-	  e->meshAttributes.method = c->Method;
-	  e->meshAttributes.nbPointsTransfinite = c->nbPointsTransfinite;
-	  e->meshAttributes.typeTransfinite = c->typeTransfinite;
-	  e->meshAttributes.coeffTransfinite = c->coeffTransfinite;
-	  e->meshAttributes.extrude = c->Extrude;
-	  e->meshAttributes.reverseMesh = c->ReverseMesh;
+          e->meshAttributes.method = c->Method;
+          e->meshAttributes.nbPointsTransfinite = c->nbPointsTransfinite;
+          e->meshAttributes.typeTransfinite = c->typeTransfinite;
+          e->meshAttributes.coeffTransfinite = c->coeffTransfinite;
+          e->meshAttributes.extrude = c->Extrude;
+          e->meshAttributes.reverseMesh = c->ReverseMesh;
           add(e);
         }
         else if(!e && c->beg && c->end){
           e = new gmshEdge(this, c,
-                           getVertexByTag(c->beg->Num),
-                           getVertexByTag(c->end->Num));
+              getVertexByTag(c->beg->Num),
+              getVertexByTag(c->end->Num));
           add(e);
         }
         else if(!e){
           e = new gmshEdge(this, c, 0, 0);
           add(e);
         }
+        else{
+          e->resetMeshAttributes();
+        }
 
         if(!c->Visible) e->setVisibility(0);
         if(c->Color.type) e->setColor(c->Color.mesh);
@@ -186,24 +199,24 @@ int GModel::importGEOInternals()
           if(gf)
             comp.push_back(gf);
         }
-	std::list<GEdge*> b[4];
+        std::list<GEdge*> b[4];
         for(int j = 0; j < 4; j++){
-	  for(unsigned int k = 0; k < s->compoundBoundary[j].size(); k++){
-	    GEdge *ge = getEdgeByTag(s->compoundBoundary[j][k]);
-	    if(ge) b[j].push_back(ge);
-	  }
-	}
+          for(unsigned int k = 0; k < s->compoundBoundary[j].size(); k++){
+            GEdge *ge = getEdgeByTag(s->compoundBoundary[j][k]);
+            if(ge) b[j].push_back(ge);
+          }
+        }
         int param = CTX::instance()->mesh.remeshParam;
-	GFaceCompound::typeOfCompound typ = GFaceCompound::HARMONIC_CIRCLE;
-	if (param == 1) typ =  GFaceCompound::CONFORMAL_SPECTRAL;
-	if (param == 2) typ =  GFaceCompound::RADIAL_BASIS;
-	if (param == 3) typ =  GFaceCompound::HARMONIC_PLANE;
-	if (param == 4) typ =  GFaceCompound::CONVEX_CIRCLE;
-	if (param == 5) typ =  GFaceCompound::CONVEX_PLANE;
-	if (param == 6) typ =  GFaceCompound::HARMONIC_SQUARE;
-	if (param == 7) typ =  GFaceCompound::CONFORMAL_FE;
+        GFaceCompound::typeOfCompound typ = GFaceCompound::HARMONIC_CIRCLE;
+        if (param == 1) typ =  GFaceCompound::CONFORMAL_SPECTRAL;
+        if (param == 2) typ =  GFaceCompound::RADIAL_BASIS;
+        if (param == 3) typ =  GFaceCompound::HARMONIC_PLANE;
+        if (param == 4) typ =  GFaceCompound::CONVEX_CIRCLE;
+        if (param == 5) typ =  GFaceCompound::CONVEX_PLANE;
+        if (param == 6) typ =  GFaceCompound::HARMONIC_SQUARE;
+        if (param == 7) typ =  GFaceCompound::CONFORMAL_FE;
         int algo = CTX::instance()->mesh.remeshAlgo;
-	f = new GFaceCompound(this, s->Num, comp, b[0], b[1], b[2], b[3], typ, algo);
+        f = new GFaceCompound(this, s->Num, comp, b[0], b[1], b[2], b[3], typ, algo);
         f->meshAttributes.recombine = s->Recombine;
         f->meshAttributes.recombineAngle = s->RecombineAngle;
         f->meshAttributes.method = s->Method;
@@ -290,8 +303,9 @@ int GModel::importGEOInternals()
         r = new gmshRegion(this, v);
         add(r);
       }
-      else
+      else{
         r->resetMeshAttributes();
+      }
       if(!v->Visible) r->setVisibility(0);
       if(v->Color.type) r->setColor(v->Color.mesh);
     }
@@ -306,40 +320,42 @@ int GModel::importGEOInternals()
       GEntity *ge = 0;
       int tag = CTX::instance()->geom.orientedPhysicals ? abs(num) : num;
       switch(p->Typ){
-      case MSH_PHYSICAL_POINT:   ge = getVertexByTag(tag); break;
-      case MSH_PHYSICAL_LINE:    ge = getEdgeByTag(tag); break;
-      case MSH_PHYSICAL_SURFACE: ge = getFaceByTag(tag); break;
-      case MSH_PHYSICAL_VOLUME:  ge = getRegionByTag(tag); break;
+        case MSH_PHYSICAL_POINT:   ge = getVertexByTag(tag); break;
+        case MSH_PHYSICAL_LINE:    ge = getEdgeByTag(tag); break;
+        case MSH_PHYSICAL_SURFACE: ge = getFaceByTag(tag); break;
+        case MSH_PHYSICAL_VOLUME:  ge = getRegionByTag(tag); break;
       }
       int pnum = CTX::instance()->geom.orientedPhysicals ? (sign(num) * p->Num) : p->Num;
       if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), pnum) ==
-         ge->physicals.end())
+          ge->physicals.end())
         ge->physicals.push_back(pnum);
     }
   }
 
   // create periodic mesh relationships
-
-  for (std::map<int,int>::iterator it = _geo_internals->periodicEdges.begin();
-       it != _geo_internals->periodicEdges.end(); ++it){
+  for(std::map<int,int>::iterator it = _geo_internals->periodicEdges.begin();
+      it != _geo_internals->periodicEdges.end(); ++it){
     GEdge *ge = getEdgeByTag(abs(it->first));
     if (ge){
       int MASTER = it->second * (it->first > 0 ? 1 : -1);
       ge->setMeshMaster(MASTER);
     }
   }
-  for (std::map<int,int>::iterator it = _geo_internals->periodicFaces.begin();
-       it != _geo_internals->periodicFaces.end(); ++it){
+  for(std::map<int,int>::iterator it = _geo_internals->periodicFaces.begin();
+      it != _geo_internals->periodicFaces.end(); ++it){
     GFace *gf = getFaceByTag(abs(it->first));
     if (gf)gf->setMeshMaster(it->second * (it->first > 0 ? 1 : -1));
   }
-
-  for (eiter it = firstEdge() ; it != lastEdge() ; ++it){
+  for(eiter it = firstEdge() ; it != lastEdge() ; ++it){
     int meshMaster = (*it)->meshMaster();
     if (meshMaster != (*it)->tag()){
       GEdge *ge_master = getEdgeByTag(abs(meshMaster));
-      if(ge_master)(*it)->getBeginVertex()->setMeshMaster ( (meshMaster > 0)  ? ge_master->getBeginVertex()->tag() : ge_master->getEndVertex()->tag());
-      if(ge_master)(*it)->getEndVertex()->setMeshMaster ( (meshMaster < 0)  ? ge_master->getBeginVertex()->tag() : ge_master->getEndVertex()->tag());
+      if(ge_master)
+        (*it)->getBeginVertex()->setMeshMaster((meshMaster > 0) ? ge_master->getBeginVertex()->tag() :
+                                               ge_master->getEndVertex()->tag());
+      if(ge_master)
+        (*it)->getEndVertex()->setMeshMaster((meshMaster < 0) ? ge_master->getBeginVertex()->tag() :
+                                             ge_master->getEndVertex()->tag());
     }
   }
 
@@ -353,79 +369,79 @@ int GModel::importGEOInternals()
 }
 
 class writeFieldOptionGEO {
- private :
-  FILE *geo;
-  Field *field;
- public :
-  writeFieldOptionGEO(FILE *fp,Field *_field) { geo = fp ? fp : stdout; field=_field; }
-  void operator() (std::pair<std::string, FieldOption *> it)
-  {
-    std::string v;
-    it.second->getTextRepresentation(v);
-    fprintf(geo, "Field[%i].%s = %s;\n", field->id, it.first.c_str(), v.c_str());
-  }
+  private :
+    FILE *geo;
+    Field *field;
+  public :
+    writeFieldOptionGEO(FILE *fp,Field *_field) { geo = fp ? fp : stdout; field=_field; }
+    void operator() (std::pair<std::string, FieldOption *> it)
+    {
+      std::string v;
+      it.second->getTextRepresentation(v);
+      fprintf(geo, "Field[%i].%s = %s;\n", field->id, it.first.c_str(), v.c_str());
+    }
 };
 
 class writeFieldGEO {
- private :
-  FILE *geo;
- public :
-  writeFieldGEO(FILE *fp) { geo = fp ? fp : stdout; }
-  void operator() (std::pair<const int, Field *> it)
-  {
-    fprintf(geo, "Field[%i] = %s;\n", it.first, it.second->getName());
-    std::for_each(it.second->options.begin(), it.second->options.end(),
-                  writeFieldOptionGEO(geo, it.second));
-  }
+  private :
+    FILE *geo;
+  public :
+    writeFieldGEO(FILE *fp) { geo = fp ? fp : stdout; }
+    void operator() (std::pair<const int, Field *> it)
+    {
+      fprintf(geo, "Field[%i] = %s;\n", it.first, it.second->getName());
+      std::for_each(it.second->options.begin(), it.second->options.end(),
+          writeFieldOptionGEO(geo, it.second));
+    }
 };
 
 class writePhysicalGroupGEO {
- private :
-  FILE *geo;
-  int dim;
-  bool printLabels;
-  std::map<int, std::string> &oldLabels;
-  std::map<std::pair<int, int>, std::string> &newLabels;
- public :
-  writePhysicalGroupGEO(FILE *fp, int i, bool labels,
-                        std::map<int, std::string> &o,
-                        std::map<std::pair<int, int>, std::string> &n)
-    : dim(i), printLabels(labels), oldLabels(o), newLabels(n)
-  {
-    geo = fp ? fp : stdout;
-  }
-  void operator () (std::pair<const int, std::vector<GEntity *> > &g)
-  {
-    std::string oldName, newName;
-    if(printLabels){
-      if(newLabels.count(std::pair<int, int>(dim, g.first))) {
-        newName = newLabels[std::pair<int, int>(dim, g.first)];
-      }
-      else if(oldLabels.count(g.first)) {
-        oldName = oldLabels[g.first];
-        fprintf(geo, "%s = %d;\n", oldName.c_str(), g.first);
-      }
+  private :
+    FILE *geo;
+    int dim;
+    bool printLabels;
+    std::map<int, std::string> &oldLabels;
+    std::map<std::pair<int, int>, std::string> &newLabels;
+  public :
+    writePhysicalGroupGEO(FILE *fp, int i, bool labels,
+        std::map<int, std::string> &o,
+        std::map<std::pair<int, int>, std::string> &n)
+      : dim(i), printLabels(labels), oldLabels(o), newLabels(n)
+    {
+      geo = fp ? fp : stdout;
     }
+    void operator () (std::pair<const int, std::vector<GEntity *> > &g)
+    {
+      std::string oldName, newName;
+      if(printLabels){
+        if(newLabels.count(std::pair<int, int>(dim, g.first))) {
+          newName = newLabels[std::pair<int, int>(dim, g.first)];
+        }
+        else if(oldLabels.count(g.first)) {
+          oldName = oldLabels[g.first];
+          fprintf(geo, "%s = %d;\n", oldName.c_str(), g.first);
+        }
+      }
 
-    switch (dim) {
-    case 0: fprintf(geo, "Physical Point"); break;
-    case 1: fprintf(geo, "Physical Line"); break;
-    case 2: fprintf(geo, "Physical Surface"); break;
-    case 3: fprintf(geo, "Physical Volume"); break;
-    }
+      switch (dim) {
+        case 0: fprintf(geo, "Physical Point"); break;
+        case 1: fprintf(geo, "Physical Line"); break;
+        case 2: fprintf(geo, "Physical Surface"); break;
+        case 3: fprintf(geo, "Physical Volume"); break;
+      }
 
-    if(oldName.size())
-      fprintf(geo, "(%s) = {", oldName.c_str());
-    else if(newName.size())
-      fprintf(geo, "(\"%s\") = {", newName.c_str());
-    else
-      fprintf(geo, "(%d) = {", g.first);
-    for(unsigned int i = 0; i < g.second.size(); i++) {
-      if(i) fprintf(geo, ", ");
-      fprintf(geo, "%d", g.second[i]->tag());
+      if(oldName.size())
+        fprintf(geo, "(%s) = {", oldName.c_str());
+      else if(newName.size())
+        fprintf(geo, "(\"%s\") = {", newName.c_str());
+      else
+        fprintf(geo, "(%d) = {", g.first);
+      for(unsigned int i = 0; i < g.second.size(); i++) {
+        if(i) fprintf(geo, ", ");
+        fprintf(geo, "%d", g.second[i]->tag());
+      }
+      fprintf(geo, "};\n");
     }
-    fprintf(geo, "};\n");
-  }
 };
 
 static bool skipRegion(GRegion *gr)
@@ -475,7 +491,7 @@ int GModel::writeGEO(const std::string &name, bool printLabels, bool onlyPhysica
     if(meshSizeParameters.find(val) == meshSizeParameters.end()){
       std::ostringstream paramName;
       paramName << "cl__" << ++cpt;
-      fprintf(fp, "%s = %.16g;\n", paramName.str().c_str(),val);
+      fprintf(fp, "%s = %.16g;\n", paramName.str().c_str(), val);
       meshSizeParameters.insert(std::make_pair(val, paramName.str()));
     }
   }
@@ -511,7 +527,7 @@ int GModel::writeGEO(const std::string &name, bool printLabels, bool onlyPhysica
   getPhysicalGroups(groups);
   for(int i = 0; i < 4; i++)
     std::for_each(groups[i].begin(), groups[i].end(),
-                  writePhysicalGroupGEO(fp, i, printLabels, labels, physicalNames));
+        writePhysicalGroupGEO(fp, i, printLabels, labels, physicalNames));
 
   std::for_each(getFields()->begin(), getFields()->end(), writeFieldGEO(fp));
   if(getFields()->getBackgroundField() > 0)
diff --git a/Geo/GModelIO_GEOM.cpp b/Geo/GModelIO_GEOM.cpp
index 4d65587..c7d7c71 100644
--- a/Geo/GModelIO_GEOM.cpp
+++ b/Geo/GModelIO_GEOM.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_INP.cpp b/Geo/GModelIO_INP.cpp
index 216d701..27bbb92 100644
--- a/Geo/GModelIO_INP.cpp
+++ b/Geo/GModelIO_INP.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -23,7 +23,7 @@ static void writeElementsINP(FILE *fp, GEntity *ge, std::vector<T*> &elements,
     if(typ){
       const char *str = (ge->dim() == 3) ? "Volume" : (ge->dim() == 2) ?
         "Surface" : (ge->dim() == 1) ? "Line" : "Point";
-      fprintf(fp, "*Element, type=%s, ELSET=%s%d\n", typ, str, ge->tag());
+      fprintf(fp, "*ELEMENT, type=%s, ELSET=%s%d\n", typ, str, ge->tag());
       for(unsigned int i = 0; i < elements.size(); i++)
         elements[i]->writeINP(fp, elements[i]->getNum());
     }
@@ -62,11 +62,12 @@ int GModel::writeINP(const std::string &name, bool saveAll, bool saveGroupsOfNod
   fprintf(fp, "*Heading\n");
   fprintf(fp, " %s\n", name.c_str());
 
-  fprintf(fp, "*Node\n");
+  fprintf(fp, "*NODE\n");
   for(unsigned int i = 0; i < entities.size(); i++)
     for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++)
       entities[i]->mesh_vertices[j]->writeINP(fp, scalingFactor);
 
+  fprintf(fp, "******* E L E M E N T S *************\n");
   for(viter it = firstVertex(); it != lastVertex(); ++it){
     writeElementsINP(fp, *it, (*it)->points, saveAll);
   }
diff --git a/Geo/GModelIO_IR3.cpp b/Geo/GModelIO_IR3.cpp
index a1f7d96..f118942 100644
--- a/Geo/GModelIO_IR3.cpp
+++ b/Geo/GModelIO_IR3.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_MAIL.cpp b/Geo/GModelIO_MAIL.cpp
index 31ba276..020b9ba 100644
--- a/Geo/GModelIO_MAIL.cpp
+++ b/Geo/GModelIO_MAIL.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp
index 959d329..e0e1344 100644
--- a/Geo/GModelIO_MED.cpp
+++ b/Geo/GModelIO_MED.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -374,7 +374,10 @@ int GModel::readMED(const std::string &name, int meshIndex)
       for(int k = 0; k < numNodPerEle; k++)
         v[k] = verts[conn[numNodPerEle * j + med2mshNodeIndex(type, k)] - 1];
       MElement *e = factory.create(mshType, v, eleTags.empty() ? 0 : eleTags[j]);
-      if(e) elements[-fam[j]].push_back(e);
+      // according to the MED documentation, fam[j] should be negative; still,
+      // accept all family ids, even positive, as some code do not export valid
+      // MED files
+      if(e) elements[std::abs(fam[j])].push_back(e);
     }
     _storeElementsInEntities(elements);
   }
@@ -429,7 +432,9 @@ int GModel::readMED(const std::string &name, int meshIndex)
       continue;
     }
 #endif
-    // family tags are unique (for all dimensions)
+    // element family tags are unique (for all dimensions), and <= 0 (node
+    // family tags are positive - these will simply never match any Gmsh GEntity
+    // tag and will be ignored)
     GEntity *ge;
     if((ge = getRegionByTag(-familyNum))){}
     else if((ge = getFaceByTag(-familyNum))){}
diff --git a/Geo/GModelIO_MESH.cpp b/Geo/GModelIO_MESH.cpp
index 0d2e73a..26af554 100644
--- a/Geo/GModelIO_MESH.cpp
+++ b/Geo/GModelIO_MESH.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_MSH.cpp b/Geo/GModelIO_MSH.cpp
index 236aa52..9b6ed85 100644
--- a/Geo/GModelIO_MSH.cpp
+++ b/Geo/GModelIO_MSH.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -261,7 +261,7 @@ int GModel::readMSH(const std::string &name)
               GRegion *gr = getRegionByTag(entity);
               double uvw[3];
               if(!binary){
-                if(fscanf(fp, "%lf %lf %lf", &uvw[0], &uvw[1], &uvw[2]) != 2){
+                if(fscanf(fp, "%lf %lf %lf", &uvw[0], &uvw[1], &uvw[2]) != 3){
                   fclose(fp);
                   return 0;
                 }
diff --git a/Geo/GModelIO_MSH2.cpp b/Geo/GModelIO_MSH2.cpp
index 21e09d9..80bda67 100644
--- a/Geo/GModelIO_MSH2.cpp
+++ b/Geo/GModelIO_MSH2.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp
index 3632cf7..77c07b6 100644
--- a/Geo/GModelIO_OCC.cpp
+++ b/Geo/GModelIO_OCC.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,6 +22,8 @@
 #include "Partition_Spliter.hxx"
 #endif
 
+#include <BRepBuilderAPI_Transform.hxx>
+
 void addSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape &theList);
 
 void OCC_Internals::buildLists()
@@ -35,7 +37,8 @@ void OCC_Internals::buildLists()
   addShapeToLists(shape);
 }
 
-void  OCC_Internals::buildShapeFromGModel(GModel* gm){
+void OCC_Internals::buildShapeFromGModel(GModel* gm)
+{
   somap.Clear();
   shmap.Clear();
   fmap.Clear();
@@ -45,13 +48,13 @@ void  OCC_Internals::buildShapeFromGModel(GModel* gm){
   for (GModel::riter it = gm->firstRegion(); it != gm->lastRegion() ; ++it){
     if ((*it)->getNativeType() == GEntity::OpenCascadeModel){
       OCCRegion *occ = static_cast<OCCRegion*> (*it);
-      if (occ)addShapeToLists (occ->getTopoDS_Shape());
+      if(occ) addShapeToLists(occ->getTopoDS_Shape());
     }
   }
   for (GModel::fiter it = gm->firstFace(); it != gm->lastFace() ; ++it){
     if ((*it)->getNativeType() == GEntity::OpenCascadeModel){
       OCCFace *occ = static_cast<OCCFace*> (*it);
-      if(occ)addShapeToLists (occ->getTopoDS_Face ());
+      if(occ) addShapeToLists(occ->getTopoDS_Face());
     }
   }
   BRep_Builder B;
@@ -240,9 +243,17 @@ void OCC_Internals::addShapeToLists(TopoDS_Shape _shape)
 
 void OCC_Internals::healGeometry(double tolerance, bool fixdegenerated,
                                  bool fixsmalledges, bool fixspotstripfaces,
-                                 bool sewfaces, bool makesolids, bool connect)
+                                 bool sewfaces, bool makesolids, int connect,
+                                 double scaling)
 {
-  
+  if(scaling != 1.0){
+    Msg::Info("Scaling geometry by factor %g", scaling);
+    gp_Trsf t;
+    t.SetScaleFactor(scaling);
+    BRepBuilderAPI_Transform trsf(shape, t);
+    shape = trsf.Shape();
+  }
+
   if(!fixdegenerated && !fixsmalledges && !fixspotstripfaces &&
      !sewfaces && !makesolids && !connect) return;
 
@@ -528,8 +539,8 @@ void OCC_Internals::healGeometry(double tolerance, bool fixdegenerated,
     }
   }
 
-  if(connect){
 #if defined(HAVE_SALOME)
+  if(connect == 2){
     Msg::Info("- cutting and connecting faces with Salome's Partition_Spliter");
     TopExp_Explorer e2;
     Partition_Spliter ps;
@@ -542,14 +553,16 @@ void OCC_Internals::healGeometry(double tolerance, bool fixdegenerated,
     catch(Standard_Failure &err){
       Msg::Error("%s", err.GetMessageString());
     }
-#else
+  }
+  else
+#endif
+  if(connect){
     Msg::Info("- cutting and connecting faces with OCC_Connect");
     OCC_Connect connect(1);
     for(TopExp_Explorer p(shape, TopAbs_SOLID); p.More(); p.Next())
       connect.Add(p.Current());
     connect.Connect();
     shape = connect;
-#endif
   }
 
   double newsurfacecont = 0;
@@ -591,7 +604,8 @@ void OCC_Internals::loadBREP(const char *fn)
                CTX::instance()->geom.occFixSmallFaces,
                CTX::instance()->geom.occSewFaces,
                false,
-               CTX::instance()->geom.occConnectFaces);
+               CTX::instance()->geom.occConnectFaces,
+               CTX::instance()->geom.occScaling);
   BRepTools::Clean(shape);
   buildLists();
 }
@@ -623,7 +637,8 @@ void OCC_Internals::loadSTEP(const char *fn)
                CTX::instance()->geom.occFixSmallFaces,
                CTX::instance()->geom.occSewFaces,
                false,
-               CTX::instance()->geom.occConnectFaces);
+               CTX::instance()->geom.occConnectFaces,
+               CTX::instance()->geom.occScaling);
   BRepTools::Clean(shape);
   buildLists();
 }
@@ -650,7 +665,8 @@ void OCC_Internals::loadIGES(const char *fn)
                CTX::instance()->geom.occFixSmallFaces,
                CTX::instance()->geom.occSewFaces,
                false,
-               CTX::instance()->geom.occConnectFaces);
+               CTX::instance()->geom.occConnectFaces,
+               CTX::instance()->geom.occScaling);
   BRepTools::Clean(shape);
   buildLists();
 }
@@ -737,35 +753,6 @@ GRegion* OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region)
   //  return getOCCRegionByNativePtr(model, region);
 }
 
-/* I needed getGTagOfOCC*ByNativePtr whithin setPhysicalNumToEntitiesInBox */
-int OCC_Internals::getGTagOfOCCVertexByNativePtr(GModel *model, TopoDS_Vertex toFind)
-{
-  if(gvNumCache.IsBound(toFind))
-    return (int)gvNumCache.Find(toFind);
-  return 0;
-}
-
-int OCC_Internals::getGTagOfOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind)
-{
-  if(gfNumCache.IsBound(toFind))
-    return (int)gfNumCache.Find(toFind);
-  return 0;
-}
-
-int OCC_Internals::getGTagOfOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind)
-{
-  if(geNumCache.IsBound(toFind))
-    return (int)geNumCache.Find(toFind);
-  return 0;
-}
-
-int OCC_Internals::getGTagOfOCCSolidByNativePtr(GModel *model, TopoDS_Solid toFind)
-{
-  if(grNumCache.IsBound(toFind))
-    return (int)grNumCache.Find(toFind);
-  return 0;
-}
-
 void OCC_Internals::buildGModel(GModel *model)
 {
   // building geom vertices
@@ -1079,26 +1066,27 @@ int GModel::readOCCIGES(const std::string &fn)
 
 int GModel::writeOCCBREP(const std::string &fn)
 {
-  _occ_internals->buildShapeFromGModel(this);
-  
   if(!_occ_internals){
     Msg::Error("No OpenCASCADE model found");
     return 0;
   }
-  else
+  else{
+    _occ_internals->buildShapeFromGModel(this);
     _occ_internals->writeBREP(fn.c_str());
+  }
   return 1;
 }
 
 int GModel::writeOCCSTEP(const std::string &fn)
 {
-  _occ_internals->buildShapeFromGModel(this);
   if(!_occ_internals){
     Msg::Error("No OpenCASCADE model found");
     return 0;
   }
-  else
+  else{
+    _occ_internals->buildShapeFromGModel(this);
     _occ_internals->writeSTEP(fn.c_str());
+  }
   return 1;
 }
 
diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h
index 445a9d5..fb00ac0 100644
--- a/Geo/GModelIO_OCC.h
+++ b/Geo/GModelIO_OCC.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -32,7 +32,7 @@ class OCC_Internals {
   void healGeometry(double tolerance, bool fixdegenerated,
                     bool fixsmalledges, bool fixspotstripfaces,
                     bool sewfaces, bool makesolids=false,
-                    bool connect=false);
+                    int connect=0, double scaling=0.0);
   void loadBREP(const char *);
   void writeBREP(const char *);
   void loadSTEP(const char *);
@@ -58,11 +58,6 @@ class OCC_Internals {
   GRegion *addRegionToModel(GModel *model, TopoDS_Solid r);
   void fillet(std::vector<TopoDS_Edge> &shapes, double radius);
   void applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op);
-	
-  int getGTagOfOCCVertexByNativePtr(GModel *model, TopoDS_Vertex toFind);
-  int getGTagOfOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind);
-  int getGTagOfOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind);
-  int getGTagOfOCCSolidByNativePtr(GModel *model, TopoDS_Solid toFind);
 };
 
 #endif
diff --git a/Geo/GModelIO_P3D.cpp b/Geo/GModelIO_P3D.cpp
index 2b17786..9b4a012 100644
--- a/Geo/GModelIO_P3D.cpp
+++ b/Geo/GModelIO_P3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_PLY.cpp b/Geo/GModelIO_PLY.cpp
index 23a37e6..f16f0a5 100644
--- a/Geo/GModelIO_PLY.cpp
+++ b/Geo/GModelIO_PLY.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_POS.cpp b/Geo/GModelIO_POS.cpp
index f9b5622..7b6377d 100644
--- a/Geo/GModelIO_POS.cpp
+++ b/Geo/GModelIO_POS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,7 +9,7 @@
 #include "MElement.h"
 
 int GModel::writePOS(const std::string &name, bool printElementary,
-                     bool printElementNumber, bool printGamma, bool printEta,
+                     bool printElementNumber, bool printSICN, bool printGamma,
                      bool printRho, bool printDisto,
                      bool saveAll, double scalingFactor)
 {
@@ -36,7 +36,7 @@ int GModel::writePOS(const std::string &name, bool printElementary,
   }
   */
 
-  bool f[6] = {printElementary, printElementNumber, printGamma, printEta, printRho,
+  bool f[6] = {printElementary, printElementNumber, printSICN, printGamma, printRho,
                printDisto};
 
   bool first = true;
@@ -51,11 +51,11 @@ int GModel::writePOS(const std::string &name, bool printElementary,
   }
   if(f[2]){
     if(first) first = false; else names += ",";
-    names += "\"Gamma\"";
+    names += "\"SICN\"";
   }
   if(f[3]){
     if(first) first = false; else names += ",";
-    names += "\"Eta\"";
+    names += "\"Gamma\"";
   }
   if(f[4]){
     if(first) first = false; else names += ",";
diff --git a/Geo/GModelIO_SGEOM.cpp b/Geo/GModelIO_SGEOM.cpp
index 9c8a0e1..1d7459c 100644
--- a/Geo/GModelIO_SGEOM.cpp
+++ b/Geo/GModelIO_SGEOM.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -23,7 +23,7 @@
 // #endif
 
 // void addSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape &theList);
-// 
+//
 // void SGEOM_Internals::buildLists()
 // {
 //   somap.Clear();
@@ -34,18 +34,18 @@
 //   vmap.Clear();
 //   addShapeToLists(shape);
 // }
-// 
+//
 // void SGEOM_Internals::buildShapeFromLists(TopoDS_Shape _shape)
 // {
 //   BRep_Builder B;
 //   TopoDS_Compound C;
 //   B.MakeCompound(C);
-// 
+//
 //   TopTools_ListOfShape theList;
 //   addSimpleShapes(_shape, theList);
 //   TopTools_ListIteratorOfListOfShape itSub1(theList);
 //   for (; itSub1.More(); itSub1.Next()) B.Add(C, itSub1.Value());
-// 
+//
 //   for(int i = 1; i <= vmap.Extent(); i++) B.Add(C, vmap(i));
 //   for(int i = 1; i <= emap.Extent(); i++) B.Add(C, emap(i));
 //   for(int i = 1; i <= wmap.Extent(); i++) B.Add(C, wmap(i));
@@ -54,7 +54,7 @@
 //   for(int i = 1; i <= somap.Extent(); i++) B.Add(C, somap(i));
 //   shape = C;
 // }
-// 
+//
 // void SGEOM_Internals::addShapeToLists(TopoDS_Shape _shape)
 // {
 //   // Solids
@@ -63,27 +63,27 @@
 //     TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
 //     if(somap.FindIndex(solid) < 1){
 //       somap.Add(solid);
-// 
+//
 //       for(exp1.Init(solid, TopAbs_SHELL); exp1.More(); exp1.Next()){
 //         TopoDS_Shell shell = TopoDS::Shell(exp1.Current());
 //         if(shmap.FindIndex(shell) < 1){
 //           shmap.Add(shell);
-// 
+//
 //           for(exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next()){
 //             TopoDS_Face face = TopoDS::Face(exp2.Current());
 //             if(fmap.FindIndex(face) < 1){
 //               fmap.Add(face);
-// 
+//
 //               for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){
 //                 TopoDS_Wire wire = TopoDS::Wire(exp3.Current());
 //                 if(wmap.FindIndex(wire) < 1){
 //                   wmap.Add(wire);
-// 
+//
 //                   for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){
 //                     TopoDS_Edge edge = TopoDS::Edge(exp4.Current());
 //                     if(emap.FindIndex(edge) < 1){
 //                       emap.Add(edge);
-// 
+//
 //                       for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){
 //                         TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //                         if(vmap.FindIndex(vertex) < 1)
@@ -99,28 +99,28 @@
 //       }
 //     }
 //   }
-// 
+//
 //   // Free Shells
 //   for(exp1.Init(exp0.Current(), TopAbs_SHELL, TopAbs_SOLID); exp1.More(); exp1.Next()){
 //     TopoDS_Shape shell = exp1.Current();
 //     if(shmap.FindIndex(shell) < 1){
 //       shmap.Add(shell);
-// 
+//
 //       for(exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next()){
 //         TopoDS_Face face = TopoDS::Face(exp2.Current());
 //         if(fmap.FindIndex(face) < 1){
 //           fmap.Add(face);
-// 
+//
 //           for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){
 //             TopoDS_Wire wire = TopoDS::Wire(exp3.Current());
 //             if(wmap.FindIndex(wire) < 1){
 //               wmap.Add(wire);
-// 
+//
 //               for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){
 //                 TopoDS_Edge edge = TopoDS::Edge(exp4.Current());
 //                 if(emap.FindIndex(edge) < 1){
 //                   emap.Add(edge);
-// 
+//
 //                   for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){
 //                     TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //                     if(vmap.FindIndex(vertex) < 1)
@@ -134,23 +134,23 @@
 //       }
 //     }
 //   }
-// 
+//
 //   // Free Faces
 //   for(exp2.Init(_shape, TopAbs_FACE, TopAbs_SHELL); exp2.More(); exp2.Next()){
 //     TopoDS_Face face = TopoDS::Face(exp2.Current());
 //     if(fmap.FindIndex(face) < 1){
 //       fmap.Add(face);
-// 
+//
 //       for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){
 //         TopoDS_Wire wire = TopoDS::Wire(exp3.Current());
 //         if(wmap.FindIndex(wire) < 1){
 //           wmap.Add(wire);
-// 
+//
 //           for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){
 //             TopoDS_Edge edge = TopoDS::Edge(exp4.Current());
 //             if(emap.FindIndex(edge) < 1){
 //               emap.Add(edge);
-// 
+//
 //               for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){
 //                 TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //                 if(vmap.FindIndex(vertex) < 1)
@@ -162,18 +162,18 @@
 //       }
 //     }
 //   }
-// 
+//
 //   // Free Wires
 //   for(exp3.Init(_shape, TopAbs_WIRE, TopAbs_FACE); exp3.More(); exp3.Next()){
 //     TopoDS_Wire wire = TopoDS::Wire(exp3.Current());
 //     if(wmap.FindIndex(wire) < 1){
 //       wmap.Add(wire);
-// 
+//
 //       for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){
 //         TopoDS_Edge edge = TopoDS::Edge(exp4.Current());
 //         if(emap.FindIndex(edge) < 1){
 //           emap.Add(edge);
-// 
+//
 //           for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){
 //             TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //             if(vmap.FindIndex(vertex) < 1)
@@ -183,13 +183,13 @@
 //       }
 //     }
 //   }
-// 
+//
 //   // Free Edges
 //   for(exp4.Init(_shape, TopAbs_EDGE, TopAbs_WIRE); exp4.More(); exp4.Next()){
 //     TopoDS_Edge edge = TopoDS::Edge(exp4.Current());
 //     if(emap.FindIndex(edge) < 1){
 //       emap.Add(edge);
-// 
+//
 //       for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){
 //         TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //         if(vmap.FindIndex(vertex) < 1)
@@ -197,25 +197,25 @@
 //       }
 //     }
 //   }
-// 
+//
 //   // Free Vertices
 //   for(exp5.Init(_shape, TopAbs_VERTEX, TopAbs_EDGE); exp5.More(); exp5.Next()){
 //     TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current());
 //     if(vmap.FindIndex(vertex) < 1)
 //       vmap.Add(vertex);
 //   }
-// 
+//
 // }
-// 
+//
 // void SGEOM_Internals::healGeometry(double tolerance, bool fixdegenerated,
 //                                  bool fixsmalledges, bool fixspotstripfaces,
 //                                  bool sewfaces, bool makesolids, bool connect)
 // {
 //   if(!fixdegenerated && !fixsmalledges && !fixspotstripfaces &&
 //      !sewfaces && !makesolids && !connect) return;
-// 
+//
 //   Msg::Info("Starting geometry healing procedure (tolerance: %g)", tolerance);
-// 
+//
 //   buildLists();
 //   TopExp_Explorer exp0, exp1;
 //   int nrc = 0, nrcs = 0;
@@ -223,7 +223,7 @@
 //   int nrw = wmap.Extent(), nre = emap.Extent(), nrv = vmap.Extent();
 //   for(exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) nrc++;
 //   for(exp0.Init(shape, TopAbs_COMPSOLID); exp0.More(); exp0.Next()) nrcs++;
-// 
+//
 //   double surfacecont = 0;
 //   for(exp0.Init(shape, TopAbs_FACE); exp0.More(); exp0.Next()){
 //     TopoDS_Face face = TopoDS::Face(exp0.Current());
@@ -231,10 +231,10 @@
 //     BRepGProp::SurfaceProperties(face, system);
 //     surfacecont += system.Mass();
 //   }
-// 
+//
 //   if(fixdegenerated){
 //     Msg::Info("- fix degenerated edges and faces");
-// 
+//
 //     {
 //       Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //       rebuild->Apply(shape);
@@ -246,20 +246,20 @@
 //       shape = rebuild->Apply(shape);
 //     }
 //     buildLists();
-// 
+//
 //     {
 //       Handle(ShapeFix_Face) sff;
 //       Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //       rebuild->Apply(shape);
-// 
+//
 //       for(exp0.Init(shape, TopAbs_FACE); exp0.More(); exp0.Next()){
 //         TopoDS_Face face = TopoDS::Face(exp0.Current());
-// 
+//
 //         sff = new ShapeFix_Face(face);
 //         sff->FixAddNaturalBoundMode() = Standard_True;
 //         sff->FixSmallAreaWireMode() = Standard_True;
 //         sff->Perform();
-// 
+//
 //         if(sff->Status(ShapeExtend_DONE1) ||
 //            sff->Status(ShapeExtend_DONE2) ||
 //            sff->Status(ShapeExtend_DONE3) ||
@@ -278,13 +278,13 @@
 //             else if(sff->Status(ShapeExtend_DONE5))
 //               Msg::Info("  (natural bounds added)");
 //             TopoDS_Face newface = sff->Face();
-// 
+//
 //             rebuild->Replace(face, newface, Standard_False);
 //           }
 //       }
 //       shape = rebuild->Apply(shape);
 //     }
-// 
+//
 //     {
 //       Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //       rebuild->Apply(shape);
@@ -296,28 +296,28 @@
 //       shape = rebuild->Apply(shape);
 //     }
 //   }
-// 
+//
 //   if(fixsmalledges){
 //     Msg::Info("- fixing small edges");
-// 
+//
 //     Handle(ShapeFix_Wire) sfw;
 //     Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //     rebuild->Apply(shape);
-// 
+//
 //     for(exp0.Init(shape, TopAbs_FACE); exp0.More(); exp0.Next()){
 //       TopoDS_Face face = TopoDS::Face(exp0.Current());
-// 
+//
 //       for(exp1.Init(face, TopAbs_WIRE); exp1.More(); exp1.Next()){
 //         TopoDS_Wire oldwire = TopoDS::Wire(exp1.Current());
 //         sfw = new ShapeFix_Wire(oldwire, face ,tolerance);
 //         sfw->ModifyTopologyMode() = Standard_True;
-// 
+//
 //         sfw->ClosedWireMode() = Standard_True;
-// 
+//
 //         bool replace = false;
 //         replace = sfw->FixReorder() || replace;
 //         replace = sfw->FixConnected() || replace;
-// 
+//
 //         if(sfw->FixSmall(Standard_False, tolerance) &&
 //            ! (sfw->StatusSmall(ShapeExtend_FAIL1) ||
 //               sfw->StatusSmall(ShapeExtend_FAIL2) ||
@@ -336,7 +336,7 @@
 //         else if(sfw->StatusSmall(ShapeExtend_FAIL3))
 //           Msg::Warning("Failed to fix small edge in wire, CheckConnected has failed",
 //                        wmap.FindIndex(oldwire));
-// 
+//
 //         replace = sfw->FixEdgeCurves() || replace;
 //         replace = sfw->FixDegenerated() || replace;
 //         replace = sfw->FixSelfIntersection() || replace;
@@ -347,14 +347,14 @@
 //         }
 //       }
 //     }
-// 
+//
 //     shape = rebuild->Apply(shape);
-// 
+//
 //     {
 //       buildLists();
 //       Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //       rebuild->Apply(shape);
-// 
+//
 //       for(exp1.Init(shape, TopAbs_EDGE); exp1.More(); exp1.Next()){
 //         TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
 //         if(vmap.FindIndex(TopExp::FirstVertex(edge)) ==
@@ -371,7 +371,7 @@
 //       }
 //       shape = rebuild->Apply(shape);
 //     }
-// 
+//
 //     {
 //       Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //       rebuild->Apply(shape);
@@ -382,12 +382,12 @@
 //       }
 //       shape = rebuild->Apply(shape);
 //     }
-// 
+//
 //     Handle(ShapeFix_Wireframe) sfwf = new ShapeFix_Wireframe;
 //     sfwf->SetPrecision(tolerance);
 //     sfwf->Load(shape);
 //     sfwf->ModeDropSmallEdges() = Standard_True;
-// 
+//
 //     if(sfwf->FixWireGaps()){
 //       Msg::Info("- fixing wire gaps");
 //       if(sfwf->StatusWireGaps(ShapeExtend_OK))
@@ -401,9 +401,9 @@
 //       if(sfwf->StatusWireGaps(ShapeExtend_FAIL2))
 //         Msg::Info("  failed to fix some 3D gaps");
 //     }
-// 
+//
 //     sfwf->SetPrecision(tolerance);
-// 
+//
 //     if(sfwf->FixSmallEdges()){
 //       Msg::Info("- fixing wire frames");
 //       if(sfwf->StatusSmallEdges(ShapeExtend_OK))
@@ -413,38 +413,38 @@
 //       if(sfwf->StatusSmallEdges(ShapeExtend_FAIL1))
 //         Msg::Info("  failed to fix some small edges");
 //     }
-// 
+//
 //     shape = sfwf->Shape();
 //   }
-// 
+//
 //   if(fixspotstripfaces){
 //     Msg::Info("- fixing spot and strip faces");
 //     Handle(ShapeFix_FixSmallFace) sffsm = new ShapeFix_FixSmallFace();
 //     sffsm->Init(shape);
 //     sffsm->SetPrecision(tolerance);
 //     sffsm->Perform();
-// 
+//
 //     shape = sffsm->FixShape();
 //   }
-// 
+//
 //   if(sewfaces){
 //     Msg::Info("- sewing faces");
-// 
+//
 //     BRepOffsetAPI_Sewing sewedObj(tolerance);
-// 
+//
 //     for(exp0.Init(shape, TopAbs_FACE); exp0.More(); exp0.Next()){
 //       TopoDS_Face face = TopoDS::Face(exp0.Current());
 //       sewedObj.Add(face);
 //     }
-// 
+//
 //     sewedObj.Perform();
-// 
+//
 //     if(!sewedObj.SewedShape().IsNull())
 //       shape = sewedObj.SewedShape();
 //     else
 //       Msg::Info("  not possible");
 //   }
-// 
+//
 //   {
 //     Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
 //     rebuild->Apply(shape);
@@ -455,17 +455,17 @@
 //     }
 //     shape = rebuild->Apply(shape);
 //   }
-// 
+//
 //   if(makesolids){
 //     Msg::Info("- making solids");
-// 
+//
 //     BRepBuilderAPI_MakeSolid ms;
 //     int count = 0;
 //     for(exp0.Init(shape, TopAbs_SHELL); exp0.More(); exp0.Next()){
 //       count++;
 //       ms.Add(TopoDS::Shell(exp0.Current()));
 //     }
-// 
+//
 //     if(!count){
 //       Msg::Info("  not possible (no shells)");
 //     }
@@ -478,7 +478,7 @@
 //         sfs->SetMaxTolerance(tolerance);
 //         sfs->Perform();
 //         shape = sfs->Shape();
-// 
+//
 //         for(exp0.Init(shape, TopAbs_SOLID); exp0.More(); exp0.Next()){
 //           TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
 //           TopoDS_Solid newsolid = solid;
@@ -495,7 +495,7 @@
 //         Msg::Info("  not possible");
 //     }
 //   }
-// 
+//
 //   if(connect){
 // #if defined(HAVE_SALOME)
 //     Msg::Info("- cutting and connecting faces with Salome's Partition_Spliter");
@@ -519,7 +519,7 @@
 //     shape = connect;
 // #endif
 //   }
-// 
+//
 //   double newsurfacecont = 0;
 //   for(exp0.Init(shape, TopAbs_FACE); exp0.More(); exp0.Next()){
 //     TopoDS_Face face = TopoDS::Face(exp0.Current());
@@ -527,14 +527,14 @@
 //     BRepGProp::SurfaceProperties(face, system);
 //     newsurfacecont += system.Mass();
 //   }
-// 
+//
 //   buildLists();
 //   int nnrc = 0, nnrcs = 0;
 //   int nnrso = somap.Extent(), nnrsh = shmap.Extent(), nnrf = fmap.Extent();
 //   int nnrw = wmap.Extent(), nnre = emap.Extent(), nnrv = vmap.Extent();
 //   for(exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) nnrc++;
 //   for(exp0.Init(shape, TopAbs_COMPSOLID); exp0.More(); exp0.Next()) nnrcs++;
-// 
+//
 //   Msg::Info("-----------------------------------");
 //   Msg::Info("Compounds          : %d (%d)", nnrc, nrc);
 //   Msg::Info("Composite solids   : %d (%d)", nnrcs, nrcs);
@@ -547,7 +547,7 @@
 //   Msg::Info("Totol surface area : %g (%g)", newsurfacecont, surfacecont);
 //   Msg::Info("-----------------------------------");
 // }
-// 
+//
 // void SGEOM_Internals::loadBREP(const char *fn)
 // {
 //   BRep_Builder aBuilder;
@@ -563,7 +563,7 @@
 //   BRepTools::Clean(shape);
 //   buildLists();
 // }
-// 
+//
 // void SGEOM_Internals::writeBREP(const char *fn)
 // {
 //   std::ofstream myFile;
@@ -576,7 +576,7 @@
 //   }
 //   myFile.close();
 // }
-// 
+//
 // void SGEOM_Internals::loadSTEP(const char *fn)
 // {
 //   STEPControl_Reader reader;
@@ -595,7 +595,7 @@
 //   BRepTools::Clean(shape);
 //   buildLists();
 // }
-// 
+//
 // void SGEOM_Internals::writeSTEP(const char *fn)
 // {
 //   STEPControl_Writer writer;
@@ -603,7 +603,7 @@
 //   if(status == IFSelect_RetDone)
 //     status = writer.Write((char*)fn);
 // }
-// 
+//
 // void SGEOM_Internals::loadIGES(const char *fn)
 // {
 //   IGESControl_Reader reader;
@@ -622,42 +622,42 @@
 //   BRepTools::Clean(shape);
 //   buildLists();
 // }
-// 
+//
 // void SGEOM_Internals::loadShape(const TopoDS_Shape *s)
 // {
 //   shape = *s;
 //   BRepTools::Clean(shape);
 //   buildLists();
 // }
-// 
+//
 // GVertex *SGEOM_Internals::getOCCVertexByNativePtr(GModel *model, TopoDS_Vertex toFind)
 // {
 //   if(gvNumCache.IsBound(toFind))
 //     return model->getVertexByTag(gvNumCache.Find(toFind));
 //   return 0;
 // }
-// 
+//
 // GEdge *SGEOM_Internals::getOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind)
 // {
 //   if(geNumCache.IsBound(toFind))
 //     return model->getEdgeByTag(geNumCache.Find(toFind));
 //   return 0;
 // }
-// 
+//
 // GFace *SGEOM_Internals::getOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind)
 // {
 //   if(gfNumCache.IsBound(toFind))
 //     return model->getFaceByTag(gfNumCache.Find(toFind));
 //   return 0;
 // }
-// 
+//
 // GRegion *SGEOM_Internals::getOCCRegionByNativePtr(GModel *model, TopoDS_Solid toFind)
 // {
 //   if(grNumCache.IsBound(toFind))
 //     return model->getRegionByTag(grNumCache.Find(toFind));
 //   return 0;
 // }
-// 
+//
 // GVertex *SGEOM_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
 // {
 //   GVertex *gv = getOCCVertexByNativePtr(model, vertex);
@@ -667,7 +667,7 @@
 //   buildGModel(model);
 //   return getOCCVertexByNativePtr(model, vertex);
 // }
-// 
+//
 // GEdge *SGEOM_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
 // {
 //   GEdge *ge = getOCCEdgeByNativePtr(model, edge);
@@ -677,7 +677,7 @@
 //   buildGModel(model);
 //   return getOCCEdgeByNativePtr(model, edge);
 // }
-// 
+//
 // GFace* SGEOM_Internals::addFaceToModel(GModel *model, TopoDS_Face face)
 // {
 //   GFace *gf = getOCCFaceByNativePtr(model, face);
@@ -687,7 +687,7 @@
 //   buildGModel(model);
 //   return getOCCFaceByNativePtr(model, face);
 // }
-// 
+//
 // GRegion* SGEOM_Internals::addRegionToModel(GModel *model, TopoDS_Solid region)
 // {
 //   GRegion *gr  = getOCCRegionByNativePtr(model, region);
@@ -697,36 +697,7 @@
 //   buildGModel(model);
 //   return getOCCRegionByNativePtr(model, region);
 // }
-// 
-// /* I needed getGTagOfOCC*ByNativePtr whithin setPhysicalNumToEntitiesInBox */
-// int SGEOM_Internals::getGTagOfOCCVertexByNativePtr(GModel *model, TopoDS_Vertex toFind)
-// {
-// 	if(gvNumCache.IsBound(toFind))
-// 		return (int)gvNumCache.Find(toFind);
-// 	return 0;	
-// }
-// 
-// int SGEOM_Internals::getGTagOfOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind)
-// {
-// 	if(gfNumCache.IsBound(toFind))
-// 		return (int)gfNumCache.Find(toFind);
-// 	return 0;
-// }
-// 
-// int SGEOM_Internals::getGTagOfOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind)
-// {
-// 	if(geNumCache.IsBound(toFind))
-// 		return (int)geNumCache.Find(toFind);
-// 	return 0;
-// }
-// 
-// int SGEOM_Internals::getGTagOfOCCSolidByNativePtr(GModel *model, TopoDS_Solid toFind)
-// {
-// 	if(grNumCache.IsBound(toFind))
-// 		return (int)grNumCache.Find(toFind);
-// 	return 0;	
-// }
-// 
+//
 // void SGEOM_Internals::buildGModel(GModel *model)
 // {
 //   // building geom vertices
@@ -738,7 +709,7 @@
 //       numv++;
 //     }
 //   }
-// 
+//
 //   // building geom edges
 //   int nume = model->getMaxElementaryNumber(1) + 1;
 //   for(int i = 1; i <= emap.Extent(); i++){
@@ -751,7 +722,7 @@
 //       nume++;
 //     }
 //   }
-// 
+//
 //   // building geom faces
 //   int numf = model->getMaxElementaryNumber(2) + 1;
 //   for(int i = 1; i <= fmap.Extent(); i++){
@@ -760,7 +731,7 @@
 //       numf++;
 //     }
 //   }
-// 
+//
 //   // building geom regions
 //   int numr = model->getMaxElementaryNumber(3) + 1;
 //   for(int i = 1; i <= somap.Extent(); i++){
@@ -770,7 +741,7 @@
 //     }
 //   }
 // }
-// 
+//
 // void addSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape &theList)
 // {
 //   if(theShape.ShapeType() != TopAbs_COMPOUND &&
@@ -778,10 +749,10 @@
 //     theList.Append(theShape);
 //     return;
 //   }
-// 
+//
 //   TopTools_MapOfShape mapShape;
 //   TopoDS_Iterator It(theShape, Standard_True, Standard_True);
-// 
+//
 //   for(; It.More(); It.Next()) {
 //     TopoDS_Shape aShape_i = It.Value();
 //     if(mapShape.Add(aShape_i)) {
@@ -795,7 +766,7 @@
 //     }
 //   }
 // }
-// 
+//
 // void SGEOM_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op)
 // {
 //   if(tool.IsNull()) return;
@@ -813,7 +784,7 @@
 //         addSimpleShapes(tool, listShape2);
 //         Standard_Boolean isCompound =
 //           (listShape1.Extent() > 1 || listShape2.Extent() > 1);
-// 
+//
 //         TopTools_ListIteratorOfListOfShape itSub1(listShape1);
 //         for(; itSub1.More(); itSub1.Next()) {
 //           TopoDS_Shape aValue1 = itSub1.Value();
@@ -863,13 +834,13 @@
 //         BRep_Builder B;
 //         TopoDS_Compound C;
 //         B.MakeCompound(C);
-// 
+//
 //         TopTools_ListOfShape listShapes, listTools;
 //         addSimpleShapes(shape, listShapes);
 //         addSimpleShapes(tool, listTools);
-// 
+//
 //         Standard_Boolean isCompound = (listShapes.Extent() > 1);
-// 
+//
 //         TopTools_ListIteratorOfListOfShape itSub1(listShapes);
 //         for(; itSub1.More(); itSub1.Next()) {
 //           TopoDS_Shape aCut = itSub1.Value();
@@ -898,7 +869,7 @@
 //           else
 //             theNewShape = aCut;
 //         }
-// 
+//
 //         if(isCompound) {
 //           TopTools_ListOfShape listShapeC;
 //           addSimpleShapes(C, listShapeC);
@@ -931,11 +902,11 @@
 //         BRep_Builder B;
 //         TopoDS_Compound C;
 //         B.MakeCompound(C);
-// 
+//
 //         TopTools_ListOfShape listShapes, listTools;
 //         addSimpleShapes(shape, listShapes);
 //         addSimpleShapes(tool, listTools);
-// 
+//
 //         Standard_Boolean isCompound = (listShapes.Extent() > 1);
 //         TopTools_ListIteratorOfListOfShape itSub1(listShapes);
 //         for(; itSub1.More(); itSub1.Next()) {
@@ -977,7 +948,7 @@
 //     }
 //   }
 // }
-// 
+//
 // void SGEOM_Internals::fillet(std::vector<TopoDS_Edge> &edgesToFillet,
 //                            double Radius)
 // {
@@ -995,22 +966,22 @@
 //     return;
 //   }
 //   shape = fill.Shape();
-// 
+//
 //   if(shape.IsNull()) return;
-// 
+//
 //   // Check shape validity
 //   BRepCheck_Analyzer ana(shape, false);
 //   if(!ana.IsValid()) {
 //     Msg::Error("Fillet algorithm have produced an invalid shape result");
 //   }
 // }
-// 
+//
 // void GModel::_deleteOCCInternals()
 // {
 //   if(_occ_internals) delete _occ_internals;
 //   _occ_internals = 0;
 // }
-// 
+//
 // int GModel::readOCCBREP(const std::string &fn)
 // {
 //   _occ_internals = new SGEOM_Internals;
@@ -1019,7 +990,7 @@
 //   snapVertices();
 //   return 1;
 // }
-// 
+//
 // int GModel::readOCCSTEP(const std::string &fn)
 // {
 //   _occ_internals = new SGEOM_Internals;
@@ -1028,7 +999,7 @@
 //   //snapVertices();
 //   return 1;
 // }
-// 
+//
 // int GModel::readOCCIGES(const std::string &fn)
 // {
 //   _occ_internals = new SGEOM_Internals;
@@ -1036,7 +1007,7 @@
 //   _occ_internals->buildGModel(this);
 //   return 1;
 // }
-// 
+//
 // int GModel::writeOCCBREP(const std::string &fn)
 // {
 //   if(!_occ_internals){
@@ -1047,7 +1018,7 @@
 //     _occ_internals->writeBREP(fn.c_str());
 //   return 1;
 // }
-// 
+//
 // int GModel::writeOCCSTEP(const std::string &fn)
 // {
 //   if(!_occ_internals){
@@ -1058,7 +1029,7 @@
 //     _occ_internals->writeSTEP(fn.c_str());
 //   return 1;
 // }
-// 
+//
 // int GModel::importOCCShape(const void *shape)
 // {
 //   _occ_internals = new SGEOM_Internals;
@@ -1068,48 +1039,48 @@
 //   SetBoundingBox();
 //   return 1;
 // }
-// 
+//
 // #else
-// 
+//
 // void GModel::_deleteOCCInternals()
 // {
 // }
-// 
+//
 // int GModel::readOCCBREP(const std::string &fn)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to load '%s'",
 //              fn.c_str());
 //   return 0;
 // }
-// 
+//
 // int GModel::readOCCSTEP(const std::string &fn)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to load '%s'",
 //              fn.c_str());
 //   return 0;
 // }
-// 
+//
 // int GModel::readOCCIGES(const std::string &fn)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to load '%s'",
 //              fn.c_str());
 //   return 0;
 // }
-// 
+//
 // int GModel::writeOCCBREP(const std::string &fn)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to write '%s'",
 //              fn.c_str());
 //   return 0;
 // }
-// 
+//
 // int GModel::writeOCCSTEP(const std::string &fn)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to write '%s'",
 //              fn.c_str());
 //   return 0;
 // }
-// 
+//
 // int GModel::importOCCShape(const void *shape)
 // {
 //   Msg::Error("Gmsh must be compiled with Open CASCADE support to import "
diff --git a/Geo/GModelIO_SGEOM.h b/Geo/GModelIO_SGEOM.h
index ef9916a..9e163c4 100644
--- a/Geo/GModelIO_SGEOM.h
+++ b/Geo/GModelIO_SGEOM.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -57,11 +57,6 @@ class SGEOM_Internals {
   // GRegion *addRegionToModel(GModel *model, TopoDS_Solid r);
   // void fillet(std::vector<TopoDS_Edge> &shapes, double radius);
   // void applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op);
-  //
-  // int getGTagOfOCCVertexByNativePtr(GModel *model, TopoDS_Vertex toFind);
-  // int getGTagOfOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind);
-  // int getGTagOfOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind);
-  // int getGTagOfOCCSolidByNativePtr(GModel *model, TopoDS_Solid toFind);
 };
 
 #endif
diff --git a/Geo/GModelIO_STL.cpp b/Geo/GModelIO_STL.cpp
index 229b249..f2a64c4 100644
--- a/Geo/GModelIO_STL.cpp
+++ b/Geo/GModelIO_STL.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,7 +9,7 @@
 #include "MLine.h"
 #include "MTriangle.h"
 #include "MQuadrangle.h"
-#include "MVertexPositionSet.h"
+#include "MVertexRTree.h"
 #include "discreteFace.h"
 #include "StringUtils.h"
 
@@ -143,9 +143,10 @@ int GModel::readSTL(const std::string &name, double tolerance)
     for(unsigned int j = 0; j < points[i].size(); j++)
       vertices.push_back(new MVertex(points[i][j].x(), points[i][j].y(),
                                      points[i][j].z()));
-  MVertexPositionSet pos(vertices);
+  MVertexRTree pos(eps);
+  pos.insert(vertices);
 
-  std::set<MFace,Less_Face> unique;
+  std::set<MFace, Less_Face> unique;
   int nbDuplic = 0;
   for(unsigned int i = 0; i < points.size(); i ++){
     for(unsigned int j = 0; j < points[i].size(); j += 3){
@@ -154,9 +155,12 @@ int GModel::readSTL(const std::string &name, double tolerance)
         double x = points[i][j + k].x();
         double y = points[i][j + k].y();
         double z = points[i][j + k].z();
-        v[k] = pos.find(x, y, z, eps);
+        v[k] = pos.find(x, y, z);
       }
-      MFace mf (v[0], v[1], v[2]);
+      // FIXME: is this unicity test really useful? it slows down large STL
+      // reads. It would be better to provide an API to detect/remove duplicate
+      // elements
+      MFace mf(v[0], v[1], v[2]);
       if (unique.find(mf) == unique.end()){
 	faces[i]->triangles.push_back(new MTriangle(v[0], v[1], v[2]));
 	unique.insert(mf);
@@ -166,7 +170,7 @@ int GModel::readSTL(const std::string &name, double tolerance)
       }
     }
   }
-  if (nbDuplic)
+  if(nbDuplic)
     Msg::Warning("%d duplicate triangles in STL file", nbDuplic);
 
   _associateEntityWithMeshVertices();
diff --git a/Geo/GModelIO_SU2.cpp b/Geo/GModelIO_SU2.cpp
index ec1170e..3a3ab5c 100644
--- a/Geo/GModelIO_SU2.cpp
+++ b/Geo/GModelIO_SU2.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_UNV.cpp b/Geo/GModelIO_UNV.cpp
index 03bb8e1..4d262d9 100644
--- a/Geo/GModelIO_UNV.cpp
+++ b/Geo/GModelIO_UNV.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -183,6 +183,10 @@ int GModel::readUNV(const std::string &name)
             physicals[dim][elementary][physical] = "unnamed";
         }
       }
+      else if(record == 2477){ // groups elements
+        Msg::Info("Discarding element/node groups: currently still reading physical "
+                  "tags directly from elements");
+      }
     }
   }
 
@@ -309,8 +313,8 @@ int GModel::writeUNV(const std::string &name, bool saveAll, bool saveGroupsOfNod
         fprintf(fp, "\n");
       }
     }
-    fprintf(fp, "%6d\n", -1);
   }
+  fprintf(fp, "%6d\n", -1);
 
   fclose(fp);
   return 1;
diff --git a/Geo/GModelIO_VRML.cpp b/Geo/GModelIO_VRML.cpp
index 533d001..aae26f2 100644
--- a/Geo/GModelIO_VRML.cpp
+++ b/Geo/GModelIO_VRML.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelIO_VTK.cpp b/Geo/GModelIO_VTK.cpp
index cf55c7c..f5ed188 100644
--- a/Geo/GModelIO_VTK.cpp
+++ b/Geo/GModelIO_VTK.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GModelVertexArrays.cpp b/Geo/GModelVertexArrays.cpp
index 52f7600..d3a6c09 100644
--- a/Geo/GModelVertexArrays.cpp
+++ b/Geo/GModelVertexArrays.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -106,9 +106,9 @@ bool isElementVisible(MElement *ele)
     else if(CTX::instance()->mesh.qualityType == 2)
       q = ele->rhoShapeMeasure();
     else if(CTX::instance()->mesh.qualityType == 1)
-      q = ele->etaShapeMeasure();
-    else
       q = ele->gammaShapeMeasure();
+    else
+      q = ele->minSICNShapeMeasure();
     if(q < CTX::instance()->mesh.qualityInf ||
        q > CTX::instance()->mesh.qualitySup) return false;
   }
diff --git a/Geo/GPoint.h b/Geo/GPoint.h
index 13bb3e8..fc4e188 100644
--- a/Geo/GPoint.h
+++ b/Geo/GPoint.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GRbf.cpp b/Geo/GRbf.cpp
index b3a0d8b..d91468e 100644
--- a/Geo/GRbf.cpp
+++ b/Geo/GRbf.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -17,14 +17,14 @@
 #include "SBoundingBox3d.h"
 #include "OS.h"
 #include "MVertex.h"
-#include "MVertexPositionSet.h"
+#include "MVertexRTree.h"
 
 #if defined(HAVE_SOLVER)
 #include "linearSystem.h"
 #endif
 
 #if defined(HAVE_ANN)
-#include <ANN/ANN.h>
+#include "ANN/ANN.h"
 #endif
 
 static void SphereBB(void *a, double*mmin, double*mmax)
@@ -61,27 +61,29 @@ static int SphereInEle(void *a, double*c)
 static void printNodes(std::set<MVertex *> myNodes)
 {
   FILE * xyz = Fopen("myNodes.pos","w");
-  fprintf(xyz,"View \"\"{\n");
-  for(std::set<MVertex *>::iterator itv = myNodes.begin(); itv !=myNodes.end(); ++itv){
-    MVertex *v = *itv;
-    fprintf(xyz,"SP(%g,%g,%g){%d};\n", v->x(), v->y(), v->z(), v->getNum());
+  if(xyz){
+    fprintf(xyz,"View \"\"{\n");
+    for(std::set<MVertex *>::iterator itv = myNodes.begin(); itv !=myNodes.end(); ++itv){
+      MVertex *v = *itv;
+      fprintf(xyz,"SP(%g,%g,%g){%d};\n", v->x(), v->y(), v->z(), v->getNum());
+    }
+    fprintf(xyz,"};\n");
+    fclose(xyz);
   }
-  fprintf(xyz,"};\n");
-  fclose(xyz);
 }
 
 static void exportParametrizedMesh(fullMatrix<double> &UV, int nbNodes)
 {
-  FILE *f = Fopen ("UV.pos", "w");
-  fprintf(f,"View  \" uv \" {\n");
-
-  Msg::Info("*** RBF exporting 'UV.pos' ");
-  for(int id = 0; id < nbNodes; id++){
-    fprintf(f,"SP(%g,%g,%g){%d};\n", UV(id,0), UV(id,1), 0.0, id);
+  FILE *f = Fopen("UV.pos", "w");
+  if(f){
+    fprintf(f,"View  \" uv \" {\n");
+    Msg::Info("*** RBF exporting 'UV.pos' ");
+    for(int id = 0; id < nbNodes; id++){
+      fprintf(f,"SP(%g,%g,%g){%d};\n", UV(id,0), UV(id,1), 0.0, id);
+    }
+    fprintf(f,"};\n");
+    fclose(f);
   }
-  fprintf(f,"};\n");
-
-  fclose(f);
 }
 
 GRbf::GRbf(double sizeBox, int variableEps, int rbfFun,
@@ -107,22 +109,21 @@ GRbf::GRbf(double sizeBox, int variableEps, int rbfFun,
   }
 
   // then create Mvertex position
-  std::vector<MVertex*> vertices( allNodes.begin(), allNodes.end() );
-  MVertexPositionSet pos(vertices);
+  std::vector<MVertex*> vertices(allNodes.begin(), allNodes.end());
+  MVertexRTree pos(tol);
+  pos.insert(vertices);
   for(unsigned int i = 0; i < vertices.size(); i++){
     MVertex *v = vertices[i];
-    pos.find(v->x(), v->y(), v->z(), tol);
+    if(!pos.find(v->x(), v->y(), v->z()))
+      myNodes.insert(v); // keep only no duplicate vertices
     allCenters(i,0) = v->x()/sBox;
     allCenters(i,1) = v->y()/sBox;
     allCenters(i,2) = v->z()/sBox;
     _mapAllV.insert(std::make_pair(v, i));
   }
-  // keep only no duplicate vertices
-  for(unsigned int i = 0; i < vertices.size(); i++)
-    if(vertices[i]->getIndex()) myNodes.insert(vertices[i]);
 
   // initialize with  points
-  nbNodes= myNodes.size();
+  nbNodes = myNodes.size();
   centers.resize(nbNodes,3);
   normals.resize(nbNodes,3);
   int index = 0;
diff --git a/Geo/GRbf.h b/Geo/GRbf.h
index 547fd6d..98f11be 100644
--- a/Geo/GRbf.h
+++ b/Geo/GRbf.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp
index 669365e..f7b69c2 100644
--- a/Geo/GRegion.cpp
+++ b/Geo/GRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -116,7 +116,7 @@ MElement *GRegion::getMeshElement(unsigned int index)
 
 void GRegion::resetMeshAttributes()
 {
-  meshAttributes.recombine3D=0;
+  meshAttributes.recombine3D = 0;
   meshAttributes.method = MESH_UNSTRUCTURED;
   meshAttributes.extrude = 0;
   meshAttributes.QuadTri = NO_QUADTRI;
diff --git a/Geo/GRegion.h b/Geo/GRegion.h
index c87d268..d05cdf6 100644
--- a/Geo/GRegion.h
+++ b/Geo/GRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GRegionCompound.cpp b/Geo/GRegionCompound.cpp
index b55bef3..af9a68f 100644
--- a/Geo/GRegionCompound.cpp
+++ b/Geo/GRegionCompound.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GRegionCompound.h b/Geo/GRegionCompound.h
index 5140f92..6abdf68 100644
--- a/Geo/GRegionCompound.h
+++ b/Geo/GRegionCompound.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GVertex.cpp b/Geo/GVertex.cpp
index 85f1c49..312b6c4 100644
--- a/Geo/GVertex.cpp
+++ b/Geo/GVertex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -13,6 +13,7 @@
 
 GVertex::GVertex(GModel *m, int tag, double ms) : GEntity(m, tag), meshSize(ms)
 {
+  resetMeshAttributes();
 }
 
 GVertex::~GVertex()
@@ -30,6 +31,11 @@ void GVertex::deleteMesh()
   model()->destroyMeshCaches();
 }
 
+void GVertex::resetMeshAttributes()
+{
+  meshSize = MAX_LC;
+}
+
 void GVertex::setPosition(GPoint &p)
 {
   Msg::Error("Cannot set position of this kind of vertex");
@@ -55,6 +61,7 @@ SPoint2 GVertex::reparamOnFace(const GFace *gf, int) const
 std::string GVertex::getAdditionalInfoString()
 {
   std::ostringstream sstream;
+  sstream.precision(12);
   sstream << "{" << x() << "," << y() << "," << z() << "}";
   double lc = prescribedMeshSizeAtVertex();
   if(lc < MAX_LC) sstream << " (mesh size: " << lc << ")";
diff --git a/Geo/GVertex.h b/Geo/GVertex.h
index 96e98fd..0326dd8 100644
--- a/Geo/GVertex.h
+++ b/Geo/GVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,6 +33,9 @@ class GVertex : public GEntity
   // delete mesh data
   virtual void deleteMesh();
 
+  // reset the mesh attributes to default values
+  virtual void resetMeshAttributes();
+
   // get/set the coordinates of the vertex
   virtual GPoint point() const = 0;
   virtual double x() const = 0;
@@ -61,7 +64,7 @@ class GVertex : public GEntity
   virtual GeomType geomType() const { return Point; }
 
   // get/set the prescribed mesh size at the vertex
-  inline double prescribedMeshSizeAtVertex() const { return meshSize; }
+  virtual inline double prescribedMeshSizeAtVertex() const { return meshSize; }
   virtual void setPrescribedMeshSizeAtVertex(double l) { meshSize = l; }
 
   // get the bounding box
diff --git a/Geo/GenericEdge.cpp b/Geo/GenericEdge.cpp
new file mode 100644
index 0000000..595460e
--- /dev/null
+++ b/Geo/GenericEdge.cpp
@@ -0,0 +1,210 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#include <limits>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
+#include "GModel.h"
+#include "GenericEdge.h"
+#include "GenericFace.h"
+#include "Context.h"
+
+GenericEdge::ptrfunction_int_double_refvector GenericEdge::EdgeEvalXYZFromT = NULL;
+GenericEdge::ptrfunction_int_refdouble_refdouble GenericEdge::EdgeEvalParBounds = NULL;
+GenericEdge::ptrfunction_int_refstring GenericEdge::EdgeGeomType = NULL;
+GenericEdge::ptrfunction_int_refbool GenericEdge::EdgeDegenerated = NULL;
+GenericEdge::ptrfunction_int_double_refvector GenericEdge::EdgeEvalFirstDer = NULL;
+GenericEdge::ptrfunction_int_double_refdouble GenericEdge::EdgeEvalCurvature = NULL;
+GenericEdge::ptrfunction_int_refvector_refdouble_refvector_refbool GenericEdge::EdgeClosestPoint = NULL;
+GenericEdge::ptrfunction_int_refbool GenericEdge::EdgeIs3D = NULL;
+GenericEdge::ptrfunction_int_int_double_int_refvector GenericEdge::EdgeReparamOnFace = NULL;
+
+GenericEdge::GenericEdge(GModel *m, int num, int _native_id, GVertex *v1, GVertex *v2, bool _isseam)
+ : GEdge(m, num, v1, v2), id(_native_id),is_seam(_isseam)
+{
+  if ((!EdgeEvalParBounds)||(!EdgeEvalXYZFromT)) Msg::Error("GenericEdge::ERROR: Callback not set");
+  bool ok = EdgeEvalParBounds(id,s0,s1);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeEvalParBounds ! " );
+}
+
+GenericEdge::~GenericEdge()
+{
+}
+
+Range<double> GenericEdge::parBounds(int i) const
+{
+  return Range<double>(s0, s1);
+}
+
+SPoint2 GenericEdge::reparamOnFace(const GFace *face, double par, int dir) const
+{
+  std::vector<double> res(2,0.);
+  if (!EdgeReparamOnFace) Msg::Error("GenericEdge::ERROR: Callback EdgeReparamOnFace not set");
+  bool ok = EdgeReparamOnFace(id,face->getNativeInt(),par, dir,res);
+  if (!ok){
+    Msg::Error("GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id %d",getNativeInt() );
+  }
+  return SPoint2(res[0],res[1]);;
+}
+
+GPoint GenericEdge::closestPoint(const SPoint3 &qp, double &param) const
+{
+  std::vector<double> queryPoint(3,0.);
+  for (int i=0;i<3;i++) queryPoint[i] = qp[i];
+  std::vector<double> res(3,0.);
+  bool is_on_edge;
+  if (!EdgeClosestPoint) Msg::Error("GenericEdge::ERROR: Callback EdgeClosestPoint not set");
+  bool ok = EdgeClosestPoint(id,queryPoint,param,res,is_on_edge);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeClosestPoint ! " );
+  if (!is_on_edge) Msg::Warning("WARNING:GenericEdge::closestPoint closest point NOT on edge, out of bounds ! " );
+  return GPoint(res[0], res[1], res[2], this, param);
+}
+
+bool GenericEdge::isSeam(const GFace *face) const
+{
+  return is_seam;
+}
+
+GPoint GenericEdge::point(double par) const
+{
+  std::vector<double> res(3,0.);
+  if (!EdgeEvalXYZFromT) Msg::Error("GenericEdge::ERROR: Callback EdgeEvalXYZFromT not set");
+  bool ok = EdgeEvalXYZFromT(id,par,res);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeEvalXYZFromT ! " );
+  return GPoint(res[0], res[1], res[2], this, par);
+}
+
+SVector3 GenericEdge::firstDer(double par) const
+{
+  std::vector<double> res(3,0.);
+  if (!EdgeEvalFirstDer) Msg::Error("GenericEdge::ERROR: Callback EdgeEvalFirstDer not set");
+  bool ok = EdgeEvalFirstDer(id,par,res);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeEvalFirstDer ! " );
+  return SVector3(res[0],res[1],res[2]);
+}
+
+GEntity::GeomType GenericEdge::geomType() const
+{
+  std::string s;
+  if (!EdgeGeomType) Msg::Error("GenericEdge::ERROR: Callback EdgeGeomType not set");
+  bool ok = EdgeGeomType(id,s);
+  if (!ok){
+    Msg::Error("GenericEdge::ERROR from EdgeGeomType ! Edge Native id %d",getNativeInt() );
+    return Unknown;
+  }
+
+  if(s.compare("Line")==0)
+    return Line;
+  else if(s.compare("Circle")==0)
+    return Circle;
+  else if(s.compare("Ellipse")==0)
+    return Ellipse;
+  else if(s.compare("Parabola")==0)
+    return Parabola;
+  else if(s.compare("Hyperbola")==0)
+    return Hyperbola;
+  else if(s.compare("Bezier")==0)
+    return Bezier;
+  else if(s.compare("BSpline")==0)
+    return BSpline;
+  else if(s.compare("TrimmedCurve")==0)
+    return TrimmedCurve;
+  else if(s.compare("Intersection curve")==0)
+    return BSpline;
+
+  Msg::Warning("GenericEdge::geomType:: unknown type from callback: %s", s.c_str());
+
+  return Unknown;
+}
+
+double GenericEdge::curvature(double par) const
+{
+  double res;
+  if (!EdgeEvalCurvature) Msg::Error("GenericEdge::ERROR: Callback EdgeEvalCurvature not set");
+  bool ok = EdgeEvalCurvature(id,par,res);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeEvalCurvature ! " );
+  return res;
+}
+
+bool GenericEdge::is3D() const
+{
+  bool res;
+  if (!EdgeIs3D) Msg::Error("GenericEdge::ERROR: Callback EdgeIs3D not set");
+  bool ok = EdgeIs3D(id,res);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeIs3D ! " );
+  return res;
+}
+
+bool GenericEdge::degenerate(int) const
+{
+  bool res=false;
+  if (!EdgeDegenerated) Msg::Error("GenericEdge::ERROR: Callback EdgeDegenerated not set");
+  bool ok = EdgeDegenerated(id,res);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeDegenerated ! " );
+  return res;
+}
+
+int GenericEdge::minimumDrawSegments() const
+{
+  if(geomType() == Line)
+    return GEdge::minimumDrawSegments();
+  else
+    return CTX::instance()->geom.numSubEdges * GEdge::minimumDrawSegments();
+}
+
+LinearSeamEdge::LinearSeamEdge(GModel *m, int num, GVertex *v1, GVertex *v2):GEdge(m, num, v1, v2)
+{
+  s0=0.;
+  s1=v1->xyz().distance(v2->xyz());
+  first_der = SVector3(v1->xyz(),v2->xyz());
+  first_der.normalize();
+}
+
+LinearSeamEdge::~LinearSeamEdge()
+{
+}
+
+Range<double> LinearSeamEdge::parBounds(int i) const
+{
+  return Range<double>(s0, s1);
+}
+
+GPoint LinearSeamEdge::point(double par) const
+{
+  SVector3 res = v0->xyz() + par*first_der;
+  return GPoint(res[0], res[1], res[2], this, par);
+}
+
+SVector3 LinearSeamEdge::firstDer(double par) const
+{
+  return first_der;
+}
+
+GEntity::GeomType LinearSeamEdge::geomType() const
+{
+  return Line;
+}
+
+double LinearSeamEdge::curvature(double par) const
+{
+  return 0.;
+}
+
+bool LinearSeamEdge::is3D() const
+{
+  return false;
+}
+
+bool LinearSeamEdge::degenerate(int) const
+{
+  return false;
+}
+
+GPoint LinearSeamEdge::closestPoint(const SPoint3 &q, double &t) const
+{
+  return GEdge::closestPoint(q,t);
+}
diff --git a/Geo/GenericEdge.h b/Geo/GenericEdge.h
new file mode 100644
index 0000000..cdd5a75
--- /dev/null
+++ b/Geo/GenericEdge.h
@@ -0,0 +1,111 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#ifndef _GENERIC_EDGE_H
+#define _GENERIC_EDGE_H
+
+#include "GmshConfig.h"
+#include "GEdge.h"
+#include "GModel.h"
+#include "GenericVertex.h"
+#include "Range.h"
+#include <vector>
+
+class GenericFace;
+
+/* The set of Generic Entities is a generic interface to any other modeler.
+   Callbacks (function pointers) are given, sending requests, enquiries, to the
+   native modeler. */
+
+class GenericEdge : public GEdge {
+protected:
+  double s0, s1;
+  int id;
+  const bool is_seam;
+public:
+  // callbacks typedef
+  typedef bool (*ptrfunction_int_double_refvector)(int, double, std::vector<double>&);
+  typedef bool (*ptrfunction_int_refdouble_refdouble)(int, double&, double&);
+  typedef bool (*ptrfunction_int_double_refdouble)(int, double, double&);
+  typedef bool (*ptrfunction_int_refstring)(int, std::string&);
+  typedef bool (*ptrfunction_int_refbool)(int, bool&);
+  typedef bool (*ptrfunction_int_refvector_refdouble_refvector_refbool)(int, const std::vector<double> &, double &, std::vector<double>&, bool &);
+  typedef bool (*ptrfunction_int_int_double_int_refvector)(int, int, double, int, std::vector<double> &);
+
+  GenericEdge(GModel *model, int num,int _native_id, GVertex *v1, GVertex *v2, bool _isseam=false);
+  virtual ~GenericEdge();
+
+  virtual Range<double> parBounds(int i) const;
+  virtual GeomType geomType() const;
+  virtual bool degenerate(int) const;
+  virtual GPoint point(double p) const;
+  virtual SVector3 firstDer(double par) const;
+  virtual double curvature (double par) const;
+  virtual SPoint2 reparamOnFace(const GFace *face, double epar, int dir) const;
+  virtual GPoint closestPoint(const SPoint3 &queryPoint, double &param) const;
+
+  ModelType getNativeType() const { return GenericModel; }
+  virtual int getNativeInt()const{return id;};
+
+  virtual int minimumDrawSegments () const;// for output
+
+  bool is3D() const;
+  bool isSeam(const GFace *) const;
+
+  // sets the callbacks, to be given by the user
+  static void setEdgeEvalXYZFromT(ptrfunction_int_double_refvector fct){EdgeEvalXYZFromT = fct;};
+  static void setEdgeEvalParBounds(ptrfunction_int_refdouble_refdouble fct){EdgeEvalParBounds = fct;};
+  static void setEdgeGeomType(ptrfunction_int_refstring fct){EdgeGeomType = fct;};
+  static void setEdgeDegenerated(ptrfunction_int_refbool fct){EdgeDegenerated = fct;};
+  static void setEdgeEvalFirstDer(ptrfunction_int_double_refvector fct){EdgeEvalFirstDer = fct;};
+  static void setEdgeEvalCurvature(ptrfunction_int_double_refdouble fct){EdgeEvalCurvature = fct;};
+  static void setEdgeClosestPoint(ptrfunction_int_refvector_refdouble_refvector_refbool fct){EdgeClosestPoint = fct;};
+  static void setEdgeIs3D(ptrfunction_int_refbool fct){EdgeIs3D = fct;};
+  static void setEdgeReparamOnFace(ptrfunction_int_int_double_int_refvector fct){EdgeReparamOnFace = fct;};
+
+private:
+  // the callbacks:
+  // --------------
+  static ptrfunction_int_double_refvector EdgeEvalXYZFromT;
+  static ptrfunction_int_refdouble_refdouble EdgeEvalParBounds;
+  static ptrfunction_int_refstring EdgeGeomType;
+  static ptrfunction_int_refbool EdgeDegenerated;
+  static ptrfunction_int_double_refvector EdgeEvalFirstDer;
+  static ptrfunction_int_double_refdouble EdgeEvalCurvature;
+  // the first vector is a query point xyz, fills the second vector with closest point
+  // on edge using orthogonal projection.  Fills double param with parametric coordinate of end point projection.
+  static ptrfunction_int_refvector_refdouble_refvector_refbool EdgeClosestPoint;
+  static ptrfunction_int_refbool EdgeIs3D;
+  static ptrfunction_int_int_double_int_refvector EdgeReparamOnFace;
+
+
+};
+
+class LinearSeamEdge : public GEdge {
+protected:
+  double s0, s1;
+  SVector3 first_der;
+public:
+  LinearSeamEdge(GModel *model, int num, GVertex *v1, GVertex *v2);
+  virtual ~LinearSeamEdge();
+
+  virtual Range<double> parBounds(int i) const;
+  virtual GeomType geomType() const;
+  virtual bool degenerate(int) const;
+  virtual GPoint point(double p) const;
+  virtual SVector3 firstDer(double par) const;
+  virtual double curvature (double par) const;
+  virtual bool isSeam(const GFace *face) const { return true; }
+  bool is3D() const;
+  virtual GPoint closestPoint(const SPoint3 &queryPoint, double &param) const;
+
+  ModelType getNativeType() const { return GenericModel; }
+
+
+};
+
+#endif
diff --git a/Geo/GenericFace.cpp b/Geo/GenericFace.cpp
new file mode 100644
index 0000000..a8047b2
--- /dev/null
+++ b/Geo/GenericFace.cpp
@@ -0,0 +1,266 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#include <math.h>
+#include "GmshMessage.h"
+#include "GModel.h"
+#include "GEdgeLoop.h"
+#include "GenericVertex.h"
+#include "GenericEdge.h"
+#include "GenericFace.h"
+#include "Numeric.h"
+#include "Context.h"
+
+GenericFace::ptrfunction_int_refstring GenericFace::FaceGeomType = NULL;
+GenericFace::ptrfunction_int_refvector_refvector GenericFace::FaceUVFromXYZ = NULL;
+GenericFace::ptrfunction_int_refvector_refvector_refvector GenericFace::FaceClosestPoint = NULL;
+GenericFace::ptrfunction_int_refvector_refbool GenericFace::FaceContainsPointFromXYZ = NULL;
+GenericFace::ptrfunction_int_refvector_refbool GenericFace::FaceContainsPointFromUV = NULL;
+GenericFace::ptrfunction_int_refvector_refvector GenericFace::FaceXYZFromUV = NULL;
+GenericFace::ptrfunction_int_int_refdouble_refdouble GenericFace::FaceParBounds = NULL;
+GenericFace::ptrfunction_int_refvector_refvector_refvector_refdouble_refdouble GenericFace::FaceCurvatures = NULL;
+GenericFace::ptrfunction_int_refvector_refvector GenericFace::FaceEvalNormal = NULL;
+GenericFace::ptrfunction_int_refvector_refvector_refvector GenericFace::FaceFirstDer = NULL;
+GenericFace::ptrfunction_int_refvector_refvector_refvector_refvector GenericFace::FaceSecondDer = NULL;
+GenericFace::ptrfunction_int_refbool_refbool_refdouble_refdouble GenericFace::FacePeriodicInfo = NULL;
+
+GenericFace::GenericFace(GModel *m, int num, int _native_id):GFace(m, num), id(_native_id)
+{
+  if (!FaceParBounds) Msg::Fatal("Genericface::ERROR: Callback FaceParBounds not set");
+
+  bool ok = FaceParBounds(id,0,umin,umax);
+  if (!ok) Msg::Error("GenericEdge::ERROR from EdgeEvalParBounds ! " );
+  ok = FaceParBounds(id,1,vmin,vmax);
+
+  computePeriodicity();
+}
+
+GenericFace::~GenericFace()
+{
+}
+
+Range<double> GenericFace::parBounds(int i) const
+{
+  if(i == 0) return Range<double>(umin, umax);
+  return Range<double>(vmin, vmax);
+}
+
+SVector3 GenericFace::normal(const SPoint2 &param) const
+{
+  std::vector<double> res(3,0.);
+  std::vector<double> par(2,0.);
+  for (int i=0;i<3;i++) par[i] = param[i];
+  if (!FaceEvalNormal) Msg::Fatal("Genericface::ERROR: Callback FaceEvalNormal not set");
+  bool ok = FaceEvalNormal(id,par,res);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceEvalNormal ! " );
+  return SVector3(res[0],res[1],res[2]);
+}
+
+Pair<SVector3,SVector3> GenericFace::firstDer(const SPoint2 &param) const
+{
+  if (!FaceFirstDer) Msg::Fatal("Genericface::ERROR: Callback FaceFirstDer not set");
+  std::vector<double> deru(3,0.);
+  std::vector<double> derv(3,0.);
+  std::vector<double> par(2,0.);
+  for (int i=0;i<3;i++) par[i] = param[i];
+  bool ok = FaceFirstDer(id,par,deru,derv);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceFirstDer ! " );
+  return Pair<SVector3,SVector3>(SVector3(deru[0],deru[1],deru[2]),
+                                 SVector3(derv[0],derv[1],derv[2]));
+}
+
+void GenericFace::secondDer(const SPoint2 &param,SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const
+{
+  std::vector<double> deruu(3,0.);
+  std::vector<double> dervv(3,0.);
+  std::vector<double> deruv(3,0.);
+  std::vector<double> par(2,0.);
+  for (int i=0;i<2;i++) par[i] = param[i];
+  if (!FaceSecondDer) Msg::Fatal("Genericface::ERROR: Callback FaceSecondDer not set");
+  bool ok = FaceSecondDer(id,par,deruu,dervv,deruv);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceSecondDer ! " );
+  *dudu = SVector3(deruu[0],deruu[1],deruu[2]);
+  *dvdv = SVector3(dervv[0],dervv[1],dervv[2]);
+  *dudv = SVector3(deruv[0],deruv[1],deruv[2]);
+  return;
+}
+
+GPoint GenericFace::point(double par1, double par2) const
+{
+  std::vector<double> uv(2,0.);
+  uv[0] = par1;
+  uv[1] = par2;
+  std::vector<double> xyz(3,0.);
+  double pp[2] = {par1, par2};
+  if (!FaceXYZFromUV) Msg::Fatal("Genericface::ERROR: Callback FaceXYZFromUV not set");
+  bool ok = FaceXYZFromUV(id,uv,xyz);
+  if (!ok){
+    Msg::Error("GenericFace::ERROR from FaceXYZFromUV ! " );
+    GPoint p(xyz[0], xyz[1], xyz[2], this, pp);
+    p.setNoSuccess();
+    return p;
+  }
+  return GPoint(xyz[0], xyz[1], xyz[2], this, pp);
+}
+
+
+GPoint GenericFace::closestPoint(const SPoint3 &qp, const double initialGuess[2]) const
+{
+  std::vector<double> uvres(2,0.);
+  std::vector<double> xyzres(3,0.);
+  std::vector<double> queryPoint(3,0.);
+  for (int i=0;i<3;i++) queryPoint[i] = qp[i];
+  if (!FaceClosestPoint) Msg::Fatal("Genericface::ERROR: Callback FaceClosestPoint not set");
+  bool ok = FaceClosestPoint(id,queryPoint,xyzres,uvres);// orthogonal projection
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceClosestPoint ! " );
+
+  // check if the projected point lies on the face...
+  bool on_the_face;
+
+  if (!FaceContainsPointFromUV) Msg::Fatal("Genericface::ERROR: Callback FaceContainsPointFromUV not set");
+  ok = FaceContainsPointFromUV(id,uvres,on_the_face);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceContainsPointFromUV ! " );
+  if (!on_the_face) Msg::Warning("GenericFace::closestPoint::Warning (using UV)  !!!! The returned point does not lies on the face ! " );
+  double pp[2] = {uvres[0], uvres[1]};
+  return GPoint(xyzres[0], xyzres[1], xyzres[2], this, pp);
+}
+
+SPoint2 GenericFace::parFromPoint(const SPoint3 &qp, bool onSurface) const
+{
+  std::vector<double> uvres(2,0.);
+  std::vector<double> xyzres(3,0.);
+  std::vector<double> queryPoint(3,0.);
+  for (int i=0;i<3;i++) queryPoint[i] = qp[i];
+  bool ok=true;
+  if (onSurface){
+    if (!FaceUVFromXYZ) Msg::Fatal("Genericface::ERROR: Callback FaceUVFromXYZ not set");
+    ok = FaceUVFromXYZ(id,queryPoint,uvres);// assuming point is on surface
+    if (!ok) Msg::Error("GenericFace::ERROR from FaceUVFromXYZ ! " );
+  }
+  if ((!onSurface)||(!ok)){// if not on surface
+    if (!FaceClosestPoint) Msg::Fatal("Genericface::ERROR: Callback FaceClosestPoint not set");
+    ok = FaceClosestPoint(id,queryPoint,xyzres,uvres);// orthogonal projection
+    if (!ok) Msg::Error("GenericFace::ERROR from FaceClosestPoint ! " );
+    bool on_the_face;
+    if (!FaceContainsPointFromXYZ) Msg::Fatal("Genericface::ERROR: Callback FaceContainsPointFromXYZ not set");
+    ok = FaceContainsPointFromXYZ(id,xyzres,on_the_face);// check if the projected point lies on the face...
+    if (!ok) Msg::Error("GenericFace::parFromPoint::ERROR from FaceContainsPointFromXYZ ! " );
+    if (!on_the_face) Msg::Warning("GenericFace::parFromPoint::Warning !!!! The returned point does not lies on the face ! " );
+  }
+  return SPoint2(uvres[0],uvres[1]);
+}
+
+GEntity::GeomType GenericFace::geomType() const
+{
+  std::string s;
+  if (!FaceGeomType) Msg::Fatal("Genericface::ERROR: Callback FaceGeomType not set");
+  bool ok = FaceGeomType(id,s);
+  if (!ok){
+    Msg::Error("GenericFace::ERROR from FaceGeomType ! " );
+    return Unknown;
+  }
+
+  if(s.compare("Plane")==0)
+    return Plane;
+  else if(s.compare("Cylinder")==0)
+    return Cylinder;
+  else if(s.compare("Cone")==0)
+    return Cone;
+  else if(s.compare("Sphere")==0)
+    return Sphere;
+  else if(s.compare("Torus")==0)
+    return Torus;
+  else if(s.compare("BezierSurface")==0)
+    return BezierSurface;
+  else if(s.compare("BSplineSurface")==0)
+    return BSplineSurface;
+  else if(s.compare("SurfaceOfRevolution")==0)
+    return SurfaceOfRevolution;
+
+  return Unknown;
+}
+
+double GenericFace::curvatureMax(const SPoint2 &param) const
+{
+  std::vector<double> dirMax(3,0.);
+  std::vector<double> dirMin(3,0.);
+  double curvMax,curvMin;
+  std::vector<double> par(2,0.);
+  for (int i=0;i<2;i++) par[i] = param[i];
+  if (!FaceCurvatures) Msg::Fatal("Genericface::ERROR: Callback FaceCurvatures not set");
+  bool ok = FaceCurvatures(id,par,dirMax,dirMin,curvMax,curvMin);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceCurvatures ! " );
+  return std::max(fabs(curvMax), fabs(curvMin));
+}
+
+double GenericFace::curvatures(const SPoint2 &_param,SVector3 *_dirMax,SVector3 *_dirMin,
+                               double *curvMax,double *curvMin) const
+{
+  std::vector<double> param(2,0.);
+  for (int i=0;i<2;i++) param[i] = _param[i];
+  std::vector<double> dirMax(3,0.);
+  std::vector<double> dirMin(3,0.);
+
+  if (!FaceCurvatures) Msg::Fatal("Genericface::ERROR: Callback FaceCurvatures not set");
+  bool ok = FaceCurvatures(id,param,dirMax,dirMin,*curvMax,*curvMin);
+  if (!ok) Msg::Error("GenericFace::ERROR from FaceCurvatures ! " );
+
+  *_dirMax = SVector3(dirMax[0],dirMax[1],dirMax[2]);
+  *_dirMin = SVector3(dirMin[0],dirMin[1],dirMin[2]);
+  return *curvMax;
+}
+
+bool GenericFace::containsPoint(const SPoint3 &pt) const
+{
+  bool res;
+  std::vector<double> queryPoint(3,0.);
+  for (int i=0;i<3;i++) queryPoint[i] = pt[i];
+  if (!FaceContainsPointFromXYZ) Msg::Fatal("Genericface::ERROR: Callback FaceContainsPointFromXYZ not set");
+  bool ok = FaceContainsPointFromXYZ(id,queryPoint,res);
+  if (!ok) Msg::Error("GenericFace::containsPoint::ERROR from FaceContainsPointFromXYZ ! " );
+  return res;
+}
+
+void GenericFace::computePeriodicity()
+{
+  if (!FacePeriodicInfo) Msg::Fatal("Genericface::ERROR: Callback FacePeriodicInfo not set");
+  bool ok = FacePeriodicInfo(id,_periodic[0], _periodic[1],_period[0],_period[1]);
+  if (!ok) Msg::Error("GenericFace::ERROR from FacePeriodicInfo ! " );
+}
+
+void GenericFace::createLoops()
+{
+  edgeLoops.clear();
+  l_edges.clear();
+  l_dirs.clear();
+
+  for (std::set<int>::iterator it_loop = loopsnumber.begin();
+       it_loop!=loopsnumber.end();it_loop++){// for each loop
+    std::pair<std::multimap<int, std::pair<GEdge*,int> >::iterator,
+              std::multimap<int, std::pair<GEdge*,int> >::iterator>
+      range = bnd.equal_range(*it_loop);
+    std::list<GEdge*> l_wire;
+    for (std::multimap<int, std::pair<GEdge*,int> >::iterator it = range.first;
+         it!=range.second;it++){// for all edges
+      l_wire.push_back(it->second.first);
+    }
+    GEdgeLoop el(l_wire);
+    for(GEdgeLoop::citer it = el.begin(); it != el.end(); ++it){
+      l_edges.push_back(it->ge);
+      l_dirs.push_back(it->_sign);
+      if (el.count() == 2){
+        it->ge->meshAttributes.minimumMeshSegments =
+          std::max(it->ge->meshAttributes.minimumMeshSegments,2);
+      }
+      if (el.count() == 1){
+        it->ge->meshAttributes.minimumMeshSegments =
+          std::max(it->ge->meshAttributes.minimumMeshSegments,3);
+      }
+    }
+    edgeLoops.push_back(el);
+  }
+}
diff --git a/Geo/GenericFace.h b/Geo/GenericFace.h
new file mode 100644
index 0000000..3aec818
--- /dev/null
+++ b/Geo/GenericFace.h
@@ -0,0 +1,104 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#ifndef _GENERIC_FACE_H_
+#define _GENERIC_FACE_H_
+
+#include "GmshConfig.h"
+#include "GFace.h"
+#include "GModel.h"
+#include "GenericVertex.h"
+#include "GenericEdge.h"
+#include "Range.h"
+#include <vector>
+
+/* The set of Generic Entities is a generic interface to any other modeler.
+   Callbacks (function pointers) are given, sending requests, enquiries, to the
+   native modeler. */
+
+class GenericFace : public GFace {
+protected:
+  int id;
+  double umin, umax, vmin, vmax;// face uv bounds
+  bool _periodic[2];// is periodic in u, v
+  double _period[2];
+
+public:
+  // callbacks typedef
+  typedef bool (*ptrfunction_int_refstring)(int, std::string&);
+  typedef bool (*ptrfunction_int_refbool_refbool_refdouble_refdouble)(int, bool&, bool&, double&, double&);
+  typedef bool (*ptrfunction_int_refvector_refvector)(const int , const std::vector<double> &, std::vector<double> &);
+  typedef bool (*ptrfunction_int_refvector_refvector_refvector)(const int , const std::vector<double> &, std::vector<double> &, std::vector<double> &);
+  typedef bool (*ptrfunction_int_refvector_refbool)(const int , const std::vector<double> &, bool &);
+  typedef bool (*ptrfunction_int_int_refdouble_refdouble)(const int, const int, double &, double &);
+  typedef bool (*ptrfunction_int_refvector_refvector_refvector_refdouble_refdouble)(const int, const std::vector<double> &, std::vector<double> &, std::vector<double> &, double &, double &);
+  typedef bool (*ptrfunction_int_refvector_refvector_refvector_refvector)(const int , const std::vector<double> &, std::vector<double> &, std::vector<double> &, std::vector<double> &);
+
+  GenericFace(GModel *m, int num, int _native_id);
+  virtual ~GenericFace();
+
+  Range<double> parBounds(int i) const;
+  virtual GPoint point(double par1, double par2) const;
+  virtual GPoint closestPoint(const SPoint3 & queryPoint,
+                              const double initialGuess[2]) const;
+  virtual bool containsPoint(const SPoint3 &pt) const;
+  virtual SVector3 normal(const SPoint2 &param) const;
+  virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const;
+  virtual void secondDer(const SPoint2 &, SVector3 *, SVector3 *, SVector3 *) const;
+  virtual GEntity::GeomType geomType() const;
+  virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true) const;
+  virtual double curvatureMax(const SPoint2 &param) const;
+  virtual double curvatures(const SPoint2 &param, SVector3 *dirMax, SVector3 *dirMin,
+                            double *curvMax, double *curvMin) const;
+  virtual bool periodic(int dir) const { return false;}//_periodic[dir]; }// TODO ?
+  virtual double period(int dir) const{ return _period[dir]; };
+
+  ModelType getNativeType() const { return GenericModel; }
+  virtual int getNativeInt()const{return id;};
+
+  void addBndInfo(int loop, GEdge *ptr, int sign)
+  {
+    bnd.insert(std::make_pair(loop, std::make_pair(ptr,sign)));
+    l_dirs.push_back(sign);
+    l_edges.push_back(ptr);
+    loopsnumber.insert(loop);
+    ptr->addFace(this);
+  };
+  void createLoops();
+
+  void computePeriodicity();
+
+  // sets callbacks
+  static void setFaceGeomType(ptrfunction_int_refstring fct){FaceGeomType = fct;};
+  static void setFaceUVFromXYZ(ptrfunction_int_refvector_refvector fct){FaceUVFromXYZ = fct;};
+  static void setFaceClosestPoint(ptrfunction_int_refvector_refvector_refvector fct){FaceClosestPoint = fct;};
+  static void setFaceContainsPointFromXYZ(ptrfunction_int_refvector_refbool fct){FaceContainsPointFromXYZ = fct;};
+  static void setFaceContainsPointFromUV(ptrfunction_int_refvector_refbool fct){FaceContainsPointFromUV = fct;};
+  static void setFaceXYZFromUV(ptrfunction_int_refvector_refvector fct){FaceXYZFromUV = fct;};
+  static void setFaceParBounds(ptrfunction_int_int_refdouble_refdouble fct){FaceParBounds = fct;};
+  static void setFaceCurvatures(ptrfunction_int_refvector_refvector_refvector_refdouble_refdouble fct){FaceCurvatures = fct;};
+  static void setFaceEvalNormal(ptrfunction_int_refvector_refvector fct){FaceEvalNormal = fct;};
+  static void setFaceFirstDer(ptrfunction_int_refvector_refvector_refvector fct){FaceFirstDer = fct;};
+  static void setFaceSecondDer(ptrfunction_int_refvector_refvector_refvector_refvector fct){FaceSecondDer = fct;};
+  static void setFacePeriodicInfo(ptrfunction_int_refbool_refbool_refdouble_refdouble fct){FacePeriodicInfo = fct;};
+
+private:
+  std::multimap<int, std::pair<GEdge*,int> > bnd;
+  std::set<int> loopsnumber;
+
+  // the callbacks:
+  static ptrfunction_int_refstring FaceGeomType;
+  static ptrfunction_int_refvector_refvector FaceUVFromXYZ,FaceXYZFromUV,FaceEvalNormal;
+  static ptrfunction_int_refvector_refvector_refvector FaceClosestPoint,FaceFirstDer;
+  static ptrfunction_int_refvector_refbool FaceContainsPointFromXYZ,FaceContainsPointFromUV;
+  static ptrfunction_int_int_refdouble_refdouble FaceParBounds;
+  static ptrfunction_int_refvector_refvector_refvector_refdouble_refdouble FaceCurvatures;
+  static ptrfunction_int_refvector_refvector_refvector_refvector FaceSecondDer;
+  static ptrfunction_int_refbool_refbool_refdouble_refdouble FacePeriodicInfo;
+};
+
+#endif
diff --git a/Geo/GenericRegion.cpp b/Geo/GenericRegion.cpp
new file mode 100644
index 0000000..e8325d2
--- /dev/null
+++ b/Geo/GenericRegion.cpp
@@ -0,0 +1,28 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#include "GModel.h"
+#include "GenericVertex.h"
+#include "GenericEdge.h"
+#include "GenericFace.h"
+#include "GenericRegion.h"
+
+GenericRegion::GenericRegion(GModel *m, int num, int _native_id)
+ : GRegion(m, num), id(_native_id)
+{
+}
+
+GenericRegion::~GenericRegion()
+{
+}
+
+GEntity::GeomType GenericRegion::geomType() const
+{
+  return Unknown;
+}
+
+
diff --git a/Geo/GenericRegion.h b/Geo/GenericRegion.h
new file mode 100644
index 0000000..1ae038d
--- /dev/null
+++ b/Geo/GenericRegion.h
@@ -0,0 +1,41 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#ifndef _GENERIC_REGION_H_
+#define _GENERIC_REGION_H_
+
+#include "GmshConfig.h"
+#include "GRegion.h"
+
+/* The set of Generic Entities is a generic interface to any other modeler.
+   Callbacks (function pointers) are given, sending requests, enquiries, to the
+   native modeler. */
+
+class GenericRegion : public GRegion {
+public:
+  GenericRegion(GModel *m, int num, int _native_id);
+  virtual ~GenericRegion();
+
+  virtual GeomType geomType() const;
+
+  ModelType getNativeType() const { return GenericModel; }
+  virtual int getNativeInt()const{return id;};
+
+  // TODO: When using GRegion->l_dirs and l_faces, what is the convention for
+  // l_dirs ? For now, assuming positive value for normals pointing inside the
+  // region.
+  void addFace(GenericFace *ptr, int sign){
+    l_dirs.push_back(sign);
+    l_faces.push_back(ptr);
+    ptr->addRegion(this);
+  };
+
+private:
+  int id;
+};
+
+#endif
diff --git a/Geo/GenericVertex.cpp b/Geo/GenericVertex.cpp
new file mode 100644
index 0000000..03a4320
--- /dev/null
+++ b/Geo/GenericVertex.cpp
@@ -0,0 +1,64 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#include <algorithm>
+#include "GModel.h"
+#include "MVertex.h"
+#include "MPoint.h"
+#include "GenericVertex.h"
+#include "GenericEdge.h"
+#include "GenericFace.h"
+
+GenericVertex::ptrfunction_int_vector GenericVertex::VertexXYZ = NULL;
+GenericVertex::ptrfunction_int_doubleptr_voidptr GenericVertex::VertexMeshSize = NULL;
+
+GenericVertex::GenericVertex(GModel *m, int num, int _native_id)
+ : GVertex(m, num), id(_native_id)
+{
+  if (!VertexXYZ)
+    Msg::Fatal("GenericVertex::ERROR: Callback not set");
+
+  std::vector<double> vec(3,0.);
+  bool ok = VertexXYZ(id,vec);
+  if (!ok) Msg::Error("GenericVertex::ERROR from callback VertexXYZ ");
+  _x=vec[0];
+  _y=vec[1];
+  _z=vec[2];
+}
+
+GenericVertex::GenericVertex(GModel *m, int num, int _native_id, const std::vector<double> &vec)
+ : GVertex(m, num), id(_native_id)
+{
+  if (!VertexXYZ)
+    Msg::Fatal("GenericVertex::ERROR: Callback not set");
+  _x=vec[0];
+  _y=vec[1];
+  _z=vec[2];
+}
+
+GenericVertex::~GenericVertex(){
+
+}
+
+SPoint2 GenericVertex::reparamOnFace(const GFace *gf, int dir) const
+{
+  SPoint3 pt(_x,_y,_z);
+  return gf->parFromPoint(pt,true);
+}
+
+void GenericVertex::setPosition(GPoint &p)
+{
+  _x = p.x();
+  _y = p.y();
+  _z = p.z();
+  if(mesh_vertices.size()){
+    mesh_vertices[0]->x() = p.x();
+    mesh_vertices[0]->y() = p.y();
+    mesh_vertices[0]->z() = p.z();
+  }
+}
+
diff --git a/Geo/GenericVertex.h b/Geo/GenericVertex.h
new file mode 100644
index 0000000..0bee21f
--- /dev/null
+++ b/Geo/GenericVertex.h
@@ -0,0 +1,73 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#ifndef _GENERIC_VERTEX_H_
+#define _GENERIC_VERTEX_H_
+
+#include "GmshConfig.h"
+#include "GModel.h"
+#include "GVertex.h"
+#include "Context.h"
+#include <vector>
+
+/* The set of Generic Entities is a generic interface to any other modeler.
+   Callbacks (function pointers) are given, sending requests, enquiries, to the
+   native modeler. */
+
+class GenericVertex : public GVertex {
+protected:
+  int id;
+  double _x, _y, _z;
+public:
+  // callbacks typedef
+  typedef bool (*ptrfunction_int_vector)(int, std::vector<double>&);
+  typedef bool (*ptrfunction_int_doubleptr_voidptr)(int, double*, void*);
+
+  GenericVertex(GModel *m, int num, int _native_id);
+  GenericVertex(GModel *m, int num, int _native_id, const std::vector<double> &vec);
+  virtual ~GenericVertex();
+
+  virtual GPoint point() const { return GPoint(x(), y(), z()); }
+  virtual double x() const { return _x; }
+  virtual double y() const { return _y; }
+  virtual double z() const { return _z; }
+
+  virtual void setPosition(GPoint &p);
+  virtual SPoint2 reparamOnFace(const GFace *gf, int) const;
+
+  ModelType getNativeType() const { return GenericModel; }
+  virtual int getNativeInt()const{return id;};
+
+  // sets the callbacks
+  static void setVertexXYZ(ptrfunction_int_vector fct){VertexXYZ = fct;};
+  static void setVertexMeshSize(ptrfunction_int_doubleptr_voidptr fct){VertexMeshSize = fct;};
+
+  // meshing-related methods:
+  virtual void setPrescribedMeshSizeAtVertex(double l)
+  {
+    Msg::Error("GenericVertex::setPrescribedMeshSizeAtVertex");
+  }
+  virtual inline double prescribedMeshSizeAtVertex() const
+  {
+    double size;
+    void *chose = NULL;
+    if (!VertexMeshSize(id,&size,chose)){
+      Msg::Error("GenericVertex::ERROR from callback VertexMeshSize");
+      return CTX::instance()->lc;
+    }
+    return size;
+  }
+
+private:
+  // the callbacks:
+  // --------------
+  // fills vector xyz for vertex of int id
+  static ptrfunction_int_vector VertexXYZ;
+  static ptrfunction_int_doubleptr_voidptr VertexMeshSize;
+};
+
+#endif
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index dc09d28..75be98c 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -11,7 +11,7 @@
 #include "GModel.h"
 #include "GeoInterpolation.h"
 #include "Context.h"
-#include "MVertexPositionSet.h"
+#include "MVertexRTree.h"
 
 #if defined(HAVE_MESH)
 #include "Field.h"
@@ -455,14 +455,14 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste,
                          {1.0, -2.5, 2.0, -0.5},
                          {-0.5, 0.0, 0.5, 0.0},
                          {0.0, 1.0, 0.0, 0.0} };
-  double matbs[4][4] = { {-1.0, 3, -3, 1},
-                         {3, -6, 3.0, 0},
-                         {-3, 0.0, 3, 0.0},
-                         {1, 4, 1, 0.0} };
-  double matbez[4][4] = { {-1.0, 3, -3, 1},
-                          {3, -6, 3.0, 0},
-                          {-3, 3.0, 0, 0.0},
-                          {1, 0, 0, 0.0} };
+  double matbs[4][4] = { {-1, 3, -3, 1},
+                         { 3,-6,  3, 0},
+                         {-3, 0,  3, 0},
+                         { 1, 4,  1, 0} };
+  double matbez[4][4] = { {-1, 3,-3, 1},
+                          { 3,-6, 3, 0},
+                          {-3, 3, 0, 0},
+                          { 1, 0, 0, 0} };
 
   Curve *pC = new Curve;
   pC->Color.type = 0;
@@ -878,7 +878,7 @@ PhysicalGroup *FindPhysicalGroup(int num, int type)
   return NULL;
 }
 
-static void GetAllEntityNumbers(int dim, std::set<int> &nums)
+static void GetAllElementaryEntityNumbers(int dim, std::set<int> &nums)
 {
   GModel *m = GModel::current();
   switch(dim){
@@ -940,10 +940,42 @@ static void GetAllEntityNumbers(int dim, std::set<int> &nums)
   }
 }
 
-List_T *GetAllEntityNumbers(int dim)
+List_T *GetAllElementaryEntityNumbers(int dim)
 {
   std::set<int> nums;
-  GetAllEntityNumbers(dim, nums);
+  GetAllElementaryEntityNumbers(dim, nums);
+  List_T *l = List_Create(nums.size(), 1, sizeof(double));
+  for(std::set<int>::iterator it = nums.begin(); it != nums.end(); it++){
+    double a = *it;
+    List_Add(l, &a);
+  }
+  return l;
+}
+
+static void GetAllPhysicalEntityNumbers(int dim, std::set<int> &nums)
+{
+  for(int i = 0; i < List_Nbr(GModel::current()->getGEOInternals()->PhysicalGroups); i++){
+    PhysicalGroup *p;
+    List_Read(GModel::current()->getGEOInternals()->PhysicalGroups, i, &p);
+    if((dim == 0 && p->Typ == MSH_PHYSICAL_POINT) ||
+       (dim == 1 && p->Typ == MSH_PHYSICAL_LINE) ||
+       (dim == 2 && p->Typ == MSH_PHYSICAL_SURFACE) ||
+       (dim == 3 && p->Typ == MSH_PHYSICAL_VOLUME)){
+      nums.insert(p->Num);
+    }
+  }
+
+  std::map<int, std::vector<GEntity*> > groups;
+  GModel::current()->getPhysicalGroups(dim, groups);
+  for(std::map<int, std::vector<GEntity*> >::iterator it = groups.begin();
+      it != groups.end(); it++)
+    nums.insert(it->first);
+}
+
+List_T *GetAllPhysicalEntityNumbers(int dim)
+{
+  std::set<int> nums;
+  GetAllPhysicalEntityNumbers(dim, nums);
   List_T *l = List_Create(nums.size(), 1, sizeof(double));
   for(std::set<int>::iterator it = nums.begin(); it != nums.end(); it++){
     double a = *it;
@@ -2367,51 +2399,44 @@ static void ReplaceDuplicatePointsNew(double tol = -1.)
   if (tol < 0)
     tol = CTX::instance()->geom.tolerance * CTX::instance()->lc;
 
-  // create kdtree
+  // create rtree
+  MVertexRTree pos(tol);
   std::map<MVertex*, Vertex*> v2V;
-  std::vector<MVertex*> all;
+  std::vector<MVertex*> used, unused;
   List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Points);
   for(int i = 0; i < List_Nbr(tmp); i++) {
     Vertex *V;
     List_Read(tmp, i, &V);
     MVertex *v = new MVertex(V->Pos.X, V->Pos.Y, V->Pos.Z);
-    all.push_back(v);
+    if(!pos.insert(v))
+      used.push_back(v);
+    else
+      unused.push_back(v);
     v2V[v] = V;
   }
   List_Delete(tmp);
-  MVertexPositionSet pos(all);
-
-  // touch all points
-  tmp = Tree2List(GModel::current()->getGEOInternals()->Points);
-  for(int i = 0; i < List_Nbr(tmp); i++) {
-    Vertex *V;
-    List_Read(tmp, i, &V);
-    pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol);
-  }
-  List_Delete(tmp);
 
   // replace points in curves
   tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
-
   for(int i = 0; i < List_Nbr(tmp); i++) {
     Curve *c;
     List_Read(tmp, i, &c);
     // replace begin/end points
-    c->beg = v2V[pos.find(c->beg->Pos.X, c->beg->Pos.Y, c->beg->Pos.Z, tol)];
-    c->end = v2V[pos.find(c->end->Pos.X, c->end->Pos.Y, c->end->Pos.Z, tol)];
+    c->beg = v2V[pos.find(c->beg->Pos.X, c->beg->Pos.Y, c->beg->Pos.Z)];
+    c->end = v2V[pos.find(c->end->Pos.X, c->end->Pos.Y, c->end->Pos.Z)];
 
     // replace control points
     for(int j = 0; j < List_Nbr(c->Control_Points); j++) {
       Vertex *V;
       List_Read(c->Control_Points, j, &V);
       List_Write(c->Control_Points, j,
-		 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol)]);
+		 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z)]);
     }
     // replace extrusion sources
     if(c->Extrude && c->Extrude->geo.Mode == EXTRUDED_ENTITY){
       Vertex *V = FindPoint(std::abs(c->Extrude->geo.Source));
       if(V) c->Extrude->geo.Source =
-	      v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol)]->Num;
+	      v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z)]->Num;
     }
   }
   List_Delete(tmp);
@@ -2426,7 +2451,7 @@ static void ReplaceDuplicatePointsNew(double tol = -1.)
       Vertex *V;
       List_Read(s->TrsfPoints, j, &V);
       List_Write(s->TrsfPoints, j,
-                 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol)]);
+                 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z)]);
     }
   }
   List_Delete(tmp);
@@ -2441,7 +2466,7 @@ static void ReplaceDuplicatePointsNew(double tol = -1.)
       Vertex *V;
       List_Read(vol->TrsfPoints, j, &V);
       List_Write(vol->TrsfPoints, j,
-                 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol)]);
+                 &v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z)]);
     }
   }
   List_Delete(tmp);
@@ -2456,22 +2481,23 @@ static void ReplaceDuplicatePointsNew(double tol = -1.)
         List_Read(p->Entities, j, &num);
         Vertex *V = FindPoint(std::abs(num));
         if(V) List_Write(p->Entities, j,
-                         &(v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z, tol)]->Num));
+                         &(v2V[pos.find(V->Pos.X, V->Pos.Y, V->Pos.Z)]->Num));
       }
     }
   }
 
   int start = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
-  for(unsigned int i = 0; i < all.size(); i++){
-    if(all[i]->getIndex() == 0){
-      Vertex *V = v2V[all[i]];
-      Tree_Suppress(GModel::current()->getGEOInternals()->Points, &V);
-      Free_Vertex(&V, NULL);
-    }
-    delete all[i];
+  for(unsigned int i = 0; i < unused.size(); i++){
+    Vertex *V = v2V[unused[i]];
+    Tree_Suppress(GModel::current()->getGEOInternals()->Points, &V);
+    Free_Vertex(&V, NULL);
+    delete unused[i];
+  }
+  for(unsigned int i = 0; i < used.size(); i++){
+    delete used[i];
   }
   int end = Tree_Nbr(GModel::current()->getGEOInternals()->Points);
-  Msg::Info("Done new Coherence (removed %d additional points)", end - start);
+  Msg::Info("Done new Coherence (removed %d additional points)", start - end);
 }
 
 static void ReplaceDuplicatePoints(std::map<int, int> * v_report = 0)
@@ -3443,6 +3469,11 @@ int Extrude_ProtudeCurve(int type, int ic,
     return pc->Num;
   }
 
+  // FIXME: if we extrude by rotation a (non-straight) curve defined by 2 end
+  // points, with a rotation axis going through the end points, the resulting
+  // surface would have 2 bounding edges (the axis and the curve). We cannot
+  // handle this case.
+
   if(type == BOUNDARY_LAYER)
     s = Create_Surface(NEWSURFACE(), MSH_SURF_BND_LAYER);
   else if(!CurveBeg || !CurveEnd)
@@ -4251,10 +4282,12 @@ void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
 
     for(int j = 0; j < List_Nbr(s->EmbeddedCurves) + List_Nbr(s->Generatrices); j++) {
       Curve *cDejaInSurf;
+      //      Msg::Info("hopla1 %d %d %d",j,List_Nbr(s->EmbeddedCurves), List_Nbr(s->Generatrices));
       if (j < s->EmbeddedCurves->n)
         List_Read(s->EmbeddedCurves, j, &cDejaInSurf);
       else
         List_Read(s->Generatrices, j-s->EmbeddedCurves->n, &cDejaInSurf);
+      //      Msg::Info("hopla2 %d",j);
       if (cDejaInSurf->Typ != MSH_SEGM_LINE)
         // compute intersections only avalaible for straight lines
         continue;
@@ -4285,6 +4318,8 @@ void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
           List_Read(cToAddInSurf->Control_Points, l, &w1);
           List_Read(cToAddInSurf->Control_Points, l+1, &w2);
 
+	  if (w1 == v1 || w1 == v2 || w2 == v1 || w2 == v2)continue;
+
           SPoint3 q1 = SPoint3(w1->Pos.X, w1->Pos.Y, w1->Pos.Z);
           SPoint3 q2 = SPoint3(w2->Pos.X, w2->Pos.Y, w2->Pos.Z);
 
@@ -4296,7 +4331,12 @@ void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
 
           double x[2];
           int inters = intersection_segments(p3, p4, q3, q4, x);
-
+	  /*
+	   printf("%d %d vs %d %d\n",w1->Num,w2->Num,v1->Num,v2->Num);
+	  printf("%22.15E %22.15E %22.15E -- %22.15E %22.15E %22.15E\n",p3.x(),p3.y(),p3.z(),p4.x(),p4.y(),p4.z());
+	  printf("%22.15E %22.15E %22.15E -- %22.15E %22.15E %22.15E\n",q3.x(),q3.y(),q3.z(),q4.x(),q4.y(),q4.z());
+	  printf("%22.15E %22.15E\n",x[0],x[1]);
+	  */
           if (inters && x[0] != 0. && x[1] != 0. && x[0] != 1. && x[1] != 1.){
             SPoint3 p = SPoint3( (1.-x[0])*p3.x() + x[0]*p4.x(),
                                  (1.-x[0])*p3.y() + x[0]*p4.y(),
@@ -4410,6 +4450,7 @@ void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
     }
     List_Add(s->EmbeddedCurves, &cToAddInSurf);
   }
+  //  Msg::Info("coucou2");
 }
 
 void setVolumeEmbeddedSurfaces(Volume *v, List_T *surfaces)
diff --git a/Geo/Geo.h b/Geo/Geo.h
index 024c7ad..edecd65 100644
--- a/Geo/Geo.h
+++ b/Geo/Geo.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -193,6 +193,8 @@ class Surface{
   gmshSurface *geometry;
   // the mesh master surface
   std::map<int,int> edgeCounterparts;
+  // prescribed affine transform for periodic meshing
+  std::vector<double> affineTransform;
   std::vector<int> compound, compoundBoundary[4];
   int ReverseMesh;
   void SetVisible(int value, bool recursive)
@@ -349,7 +351,8 @@ SurfaceLoop *FindSurfaceLoop(int inum);
 Volume *FindVolume(int inum);
 LevelSet *FindLevelSet(int inum);
 PhysicalGroup *FindPhysicalGroup(int inum, int type);
-List_T *GetAllEntityNumbers(int dim);
+List_T *GetAllElementaryEntityNumbers(int dim);
+List_T *GetAllPhysicalEntityNumbers(int dim);
 
 void TranslateShapes(double X,double Y,double Z, List_T *shapes);
 void DilatShapes(double X,double Y,double Z, double A, double B, double C,
diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp
index 37c5b98..8678381 100644
--- a/Geo/GeoInterpolation.cpp
+++ b/Geo/GeoInterpolation.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -12,6 +12,47 @@
 
 #define SQU(a)      ((a)*(a))
 
+// Cubic spline :
+
+/*
+static void InterpolateBezier(Vertex *v[4], double t, Vertex &V)
+{
+  V.lc = (1 - t) * v[1]->lc + t * v[2]->lc;
+  V.w = (1 - t) * v[1]->w + t * v[2]->w;
+  const double tt = 1.-t;
+  const double s[4] = {tt*tt*tt, 3*t*tt*tt,3*t*t*tt,t*t*t};
+  V.Pos.X = s[0]*v[0]->Pos.X+s[1]*v[1]->Pos.X+s[2]*v[2]->Pos.X+s[3]*v[3]->Pos.X;
+  V.Pos.Y = s[0]*v[0]->Pos.Y+s[1]*v[1]->Pos.Y+s[2]*v[2]->Pos.Y+s[3]*v[3]->Pos.Y;
+  V.Pos.Z = s[0]*v[0]->Pos.Z+s[1]*v[1]->Pos.Z+s[2]*v[2]->Pos.Z+s[3]*v[3]->Pos.Z;
+}
+*/
+
+static Vertex InterpolateCubicSpline(Vertex *v[4], double t)
+{
+  Vertex V;
+  V.lc = (1 - t) * v[1]->lc + t * v[2]->lc;
+  V.w = (1 - t) * v[1]->w + t * v[2]->w;
+  const double tt = 1.-t;
+  const double  t3 = t*t*t;
+  const double s[4] = {tt*tt*tt, 3*t3-6*t*t+4,-3*t3+3*t*t+3*t+1,t3};
+  V.Pos.X = (s[0]*v[0]->Pos.X+s[1]*v[1]->Pos.X+s[2]*v[2]->Pos.X+s[3]*v[3]->Pos.X)/6.0;
+  V.Pos.Y = (s[0]*v[0]->Pos.Y+s[1]*v[1]->Pos.Y+s[2]*v[2]->Pos.Y+s[3]*v[3]->Pos.Y)/6.0;
+  V.Pos.Z = (s[0]*v[0]->Pos.Z+s[1]*v[1]->Pos.Z+s[2]*v[2]->Pos.Z+s[3]*v[3]->Pos.Z)/6.0;
+  return V;
+}
+
+static void InterpolateCatmullRom(Vertex *v[4], double t, Vertex &V)
+{
+  V.lc = (1 - t) * v[1]->lc + t * v[2]->lc;
+  V.w = (1 - t) * v[1]->w + t * v[2]->w;
+  const double t2 = t*t;
+  const double  t3 = t*t*t;
+  const double s[4] = {-.5*t3+t2-.5*t, 1.5*t3-2.5*t2+1,-1.5*t3+2*t2+.5*t,0.5*t3-0.5*t2};
+  V.Pos.X = s[0]*v[0]->Pos.X+s[1]*v[1]->Pos.X+s[2]*v[2]->Pos.X+s[3]*v[3]->Pos.X;
+  V.Pos.Y = s[0]*v[0]->Pos.Y+s[1]*v[1]->Pos.Y+s[2]*v[2]->Pos.Y+s[3]*v[3]->Pos.Y;
+  V.Pos.Z = s[0]*v[0]->Pos.Z+s[1]*v[1]->Pos.Z+s[2]*v[2]->Pos.Z+s[3]*v[3]->Pos.Z;
+}
+
 static Vertex InterpolateCubicSpline(Vertex *v[4], double t, double mat[4][4],
                                      int derivee, double t1, double t2)
 {
@@ -199,7 +240,8 @@ static Vertex InterpolateUBS(Curve *Curve, double u, int derivee)
     return V;
   }
   else
-    return InterpolateCubicSpline(v, t, Curve->mat, derivee, t1, t2);
+    //    return InterpolateCubicSpline(v, t, Curve->mat, derivee, t1, t2);
+    return InterpolateCubicSpline(v, t);
 }
 
 // Non Uniform BSplines
@@ -449,7 +491,8 @@ Vertex InterpolateCurve(Curve *c, double u, int derivee)
       V.Pos.Z = pt.z();
     }
     else
-      V = InterpolateCubicSpline(v, t, c->mat, 0, t1, t2);
+      InterpolateCatmullRom(v, t, V);
+	//      V = InterpolateCubicSpline(v, t, c->mat, 0, t1, t2);
     break;
 
   case MSH_SEGM_BND_LAYER:
diff --git a/Geo/GeoInterpolation.h b/Geo/GeoInterpolation.h
index f1298d6..4dd03ca 100644
--- a/Geo/GeoInterpolation.h
+++ b/Geo/GeoInterpolation.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp
index 82c5790..eda794c 100644
--- a/Geo/GeoStringInterface.cpp
+++ b/Geo/GeoStringInterface.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -23,6 +23,9 @@
 #if defined(HAVE_ONELAB)
 #include "onelab.h"
 #endif
+#if defined(HAVE_ONELAB2)
+#include "OnelabDatabase.h"
+#endif
 
 void add_infile(std::string text, std::string fileName, bool forceDestroy)
 {
@@ -139,6 +142,9 @@ void add_infile(std::string text, std::string fileName, bool forceDestroy)
 #if defined(HAVE_ONELAB)
   onelab::server::instance()->setChanged(true, "Gmsh");
 #endif
+#if defined(HAVE_ONELAB2)
+  OnelabDatabase::instance()->setChanged(true, "Gmsh");
+#endif
 }
 
 void coherence(std::string fileName)
diff --git a/Geo/GeoStringInterface.h b/Geo/GeoStringInterface.h
index b8c9da7..a1e2956 100644
--- a/Geo/GeoStringInterface.h
+++ b/Geo/GeoStringInterface.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp
index 29efce6..a678a2b 100644
--- a/Geo/GeomMeshMatcher.cpp
+++ b/Geo/GeomMeshMatcher.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -74,6 +74,7 @@ template <class T> T findMatching(std::vector<Pair<T,T> >& matching, T& entity)
 std::vector<Pair<GVertex*,GVertex*> >*
 GeomMeshMatcher::matchVertices(GModel* m1, GModel *m2, bool& ok)
 {
+
   // Vector that will be returned.
   std::vector<Pair<GVertex*,GVertex*> >* coresp_v = new std::vector<Pair<GVertex*,
                                                                GVertex*> >;
@@ -155,29 +156,28 @@ GeomMeshMatcher::matchEdges(GModel* m1, GModel* m2,
       closed_curves.push_back(e1);
 
       for (GModel::eiter eit2 = m2->firstEdge(); eit2 != m2->lastEdge(); eit2++) {
-	GEdge* e2 = (GEdge*)*eit2;
-	GVertex* v3 = e2->getBeginVertex();
-	GVertex* v4 = e2->getEndVertex();
-	if (v3 == v4) {
-	  Msg::Debug("Found a loop (%i) in the mesh %i %i", e2->tag(), v3->tag(), v3->tag());
-	  common_edges.push_back(e2);
-	}
-
+        GEdge* e2 = (GEdge*)*eit2;
+        GVertex* v3 = e2->getBeginVertex();
+        GVertex* v4 = e2->getEndVertex();
+        if (v3 == v4) {
+          Msg::Debug("Found a loop (%i) in the mesh %i %i", e2->tag(), v3->tag(), v3->tag());
+          common_edges.push_back(e2);
+        }
       }
     } else {
       //if (coresp_v->count(vfindMatching<GVertex*>(*coresp_v,v1)1) > 0 && coresp_v->count(v2) > 0) {
       bool ok1 = false;
       bool ok2 = false;
       if (findMatching<GVertex*>(*coresp_v,v1) != 0) {
-	ok1 = true;
-	lists.push_back((findMatching<GVertex*>(*coresp_v,v1))->edges());
+        ok1 = true;
+        lists.push_back((findMatching<GVertex*>(*coresp_v,v1))->edges());
       }
       if (findMatching<GVertex*>(*coresp_v,v2) != 0) {
-	ok2 = true;
-	lists.push_back((findMatching<GVertex*>(*coresp_v,v2))->edges());
+        ok2 = true;
+        lists.push_back((findMatching<GVertex*>(*coresp_v,v2))->edges());
       }
       if (ok1 && ok2)
-	getIntersection<GEdge*>(common_edges, lists);
+        getIntersection<GEdge*>(common_edges, lists);
     }
 
     GEdge* choice = 0;
@@ -238,18 +238,28 @@ GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2,
     std::vector<std::list<GFace*> > lists;
 
     std::list<GEdge*> boundary_edges = f1->edges();
+
     for (std::list<GEdge*>::iterator boundary_edge = boundary_edges.begin();
          boundary_edge != boundary_edges.end(); boundary_edge++) {
+
       //      if (boundary_edge->getBeginVertex() == boundary_edge->getEndVertex() &&
       if (!(*boundary_edge)->isSeam(f1))
-	lists.push_back(findMatching<GEdge*>(*coresp_e,*boundary_edge)->faces());
+        lists.push_back(findMatching<GEdge*>(*coresp_e,*boundary_edge)->faces());
     }
     std::vector<GFace*> common_faces;
     getIntersection<GFace*>(common_faces, lists);
     GFace* choice = 0;
-    if (common_faces.size() == 1) {
+
+
+    if (common_faces.size() == 0) {
+      Msg::Debug("Could not match face %i (geom).",f1->tag());
+      continue;
+    }
+
+    if (common_faces.size() == 1)  {
       choice = common_faces[0];
-    } else if (common_faces.size() > 1) {
+
+    } else {
 
       // Then, compute the minimal bounding box
       SOrientedBoundingBox geo_obb = f1->getOBB();
@@ -258,25 +268,23 @@ GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2,
       // Next, let's iterate over the mesh entities.
       for (std::vector<GFace*>::iterator candidate = common_faces.begin();
            candidate != common_faces.end(); candidate++) {
-          SOrientedBoundingBox mesh_obb = (*candidate)->getOBB();
-          Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb));
-          double score = SOrientedBoundingBox::compare(geo_obb,mesh_obb);
+        SOrientedBoundingBox mesh_obb = (*candidate)->getOBB();
+        Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb));
+        double score = SOrientedBoundingBox::compare(geo_obb,mesh_obb);
 
-          if (score < best_score) {
-            best_score = score;
-            choice = (*candidate);
-          }
+        if (score < best_score) {
+          best_score = score;
+          choice = (*candidate);
         }
+      }
     }
 
-    Msg::Debug("Faces %i (geom) and %i (mesh) match.",
-              f1->tag(),
-              choice->tag());
-
-    coresp_f->push_back(Pair<GFace*,GFace*>(f1 ,
-                                             choice));
-    choice->setTag(f1->tag());
-    num_matched_faces++;
+    if (choice) {
+      Msg::Debug("Faces %i (geom) and %i (mesh) match.",f1->tag(),choice->tag());
+      coresp_f->push_back(Pair<GFace*,GFace*>(f1,choice));
+      choice->setTag(f1->tag());
+      num_matched_faces++;
+    }
   }
 
   Msg::Info("Matched %i faces out of %i.", num_matched_faces, num_total_faces);
@@ -298,15 +306,21 @@ GeomMeshMatcher::matchRegions(GModel* m1, GModel* m2,
   std::vector<Pair<GRegion*,GRegion*> >* coresp_r = new std::vector<Pair<GRegion*,GRegion*> >;
 
   std::vector<GEntity*> m1_entities;
-  m1->getEntities(m1_entities);
+  m1->getEntities(m1_entities,3);
   std::vector<GEntity*> m2_entities;
-  m2->getEntities(m2_entities);
+  m2->getEntities(m2_entities,3);
+
+  if (m1_entities.empty() || m2_entities.empty()) {
+    Msg::Info("No regions could be matched since one of the models doesn't have any");
+    return coresp_r;
+  }
+
 
   for (std::vector<GEntity*>::iterator entity1 = m1_entities.begin();
        entity1 != m1_entities.end();
        entity1++)
   {
-    if ((*entity1)->dim() != 3) continue;
+    // if ((*entity1)->dim() != 3) continue;
     num_total_regions++;
 
     //std::vector<list<GRegion*> > lists;
@@ -579,12 +593,15 @@ static void copy_vertices (GVertex *to, GVertex *from, std::map<MVertex*,MVertex
   }
 }
 static void copy_vertices (GRegion *to, GRegion *from, std::map<MVertex*,MVertex*> &_mesh_to_geom){
+
   to->deleteMesh();
-  for (unsigned int i=0;i<from->mesh_vertices.size();i++){
-    MVertex *v_from = from->mesh_vertices[i];
-    MVertex *v_to = new MVertex (v_from->x(),v_from->y(),v_from->z(), to);
-    to->mesh_vertices.push_back(v_to);
-    _mesh_to_geom[v_from] = v_to;
+  if (from) {
+    for (unsigned int i=0;i<from->mesh_vertices.size();i++){
+      MVertex *v_from = from->mesh_vertices[i];
+      MVertex *v_to = new MVertex (v_from->x(),v_from->y(),v_from->z(), to);
+      to->mesh_vertices.push_back(v_to);
+      _mesh_to_geom[v_from] = v_to;
+    }
   }
 }
 static void copy_vertices (GEdge* to, GEdge* from, std::map<MVertex*,MVertex*> &_mesh_to_geom){
@@ -651,10 +668,12 @@ static void copy_elements (std::vector<ELEMENT*> &to,
 }
 
 
-void copy_vertices (GModel *geom, GModel *mesh, std::map<MVertex*,MVertex*> &_mesh_to_geom,
-		    std::vector<Pair<GVertex*, GVertex*> > *coresp_v,
-		    std::vector<Pair<GEdge*, GEdge*> > *coresp_e,
-		    std::vector<Pair<GFace*, GFace*> > *coresp_f){
+void copy_vertices (GModel *geom, GModel *mesh,
+                    std::map<MVertex*,MVertex*> &_mesh_to_geom,
+                    std::vector<Pair<GVertex*, GVertex*> > *coresp_v,
+                    std::vector<Pair<GEdge*  , GEdge*  > > *coresp_e,
+                    std::vector<Pair<GFace*  , GFace*  > > *coresp_f,
+                    std::vector<Pair<GRegion*, GRegion*> > *coresp_r){
 
   // copy all elements
   for (unsigned int i=0;i<coresp_v->size();++i)
@@ -663,31 +682,47 @@ void copy_vertices (GModel *geom, GModel *mesh, std::map<MVertex*,MVertex*> &_me
     copy_vertices((*coresp_e)[i].first(),(*coresp_e)[i].second(),_mesh_to_geom);
   for (unsigned int i=0;i<coresp_f->size();++i)
     copy_vertices((*coresp_f)[i].first(),(*coresp_f)[i].second(),_mesh_to_geom);
-  for (GModel::riter rit = geom->firstRegion() ; rit != geom->lastRegion(); rit++)
-  copy_vertices(*rit,mesh->getRegionByTag((*rit)->tag()),_mesh_to_geom);
+  for (unsigned int i=0;i<coresp_r->size();++i)
+    copy_vertices((*coresp_r)[i].first(),(*coresp_r)[i].second(),_mesh_to_geom);
+
+  // for (GModel::riter rit = geom->firstRegion() ; rit != geom->lastRegion(); rit++)
+  // copy_vertices(*rit,mesh->getRegionByTag((*rit)->tag()),_mesh_to_geom);
 }
 void copy_elements (GModel *geom, GModel *mesh, std::map<MVertex*,MVertex*> &_mesh_to_geom,
-		    std::vector<Pair<GVertex*, GVertex*> > *coresp_v,
-		    std::vector<Pair<GEdge*, GEdge*> > *coresp_e,
-		    std::vector<Pair<GFace*, GFace*> > *coresp_f){
+                    std::vector<Pair<GVertex*, GVertex*> > *coresp_v,
+                    std::vector<Pair<GEdge*  , GEdge*  > > *coresp_e,
+                    std::vector<Pair<GFace*  , GFace*  > > *coresp_f,
+                    std::vector<Pair<GRegion*, GRegion*> > *coresp_r){
+
   // copy all elements
 
-  for (unsigned int i=0;i<coresp_v->size();++i)
-    copy_elements<MPoint>((*coresp_v)[i].first()->points,(*coresp_v)[i].second()->points,_mesh_to_geom);
+  for (unsigned int i=0;i<coresp_v->size();++i) {
+    GVertex* dest = (*coresp_v)[i].first();
+    GVertex* orig = (*coresp_v)[i].second();
+    copy_elements<MPoint>(dest->points,orig->points,_mesh_to_geom);
+  }
 
-  for (unsigned int i=0;i<coresp_e->size();++i)
-    copy_elements<MLine>((*coresp_e)[i].first()->lines,(*coresp_e)[i].second()->lines,_mesh_to_geom);
+  for (unsigned int i=0;i<coresp_e->size();++i) {
+    GEdge* dest = (*coresp_e)[i].first();
+    GEdge* orig = (*coresp_e)[i].second();
+    copy_elements<MLine>(dest->lines,orig->lines,_mesh_to_geom);
+  }
 
   for (unsigned int i=0;i<coresp_f->size();++i){
-    copy_elements<MTriangle>((*coresp_f)[i].first()->triangles,(*coresp_f)[i].second()->triangles,_mesh_to_geom);
-    copy_elements<MQuadrangle>((*coresp_f)[i].first()->quadrangles,(*coresp_f)[i].second()->quadrangles,_mesh_to_geom);
+    GFace* dest = (*coresp_f)[i].first();
+    GFace* orig = (*coresp_f)[i].second();
+    copy_elements<MTriangle>  (dest->triangles  ,orig->triangles  ,_mesh_to_geom);
+    copy_elements<MQuadrangle>(dest->quadrangles,orig->quadrangles,_mesh_to_geom);
+  }
+
+  for (unsigned int i=0;i<coresp_r->size();++i){
+    GRegion* dest = (*coresp_r)[i].first();
+    GRegion* orig = (*coresp_r)[i].second();
+    copy_elements<MTetrahedron>(dest->tetrahedra,orig->tetrahedra,_mesh_to_geom);
+    copy_elements<MHexahedron> (dest->hexahedra ,orig->hexahedra ,_mesh_to_geom);
+    copy_elements<MPrism>      (dest->prisms    ,orig->prisms    ,_mesh_to_geom);
+    copy_elements<MPyramid>    (dest->pyramids  ,orig->pyramids  ,_mesh_to_geom);
   }
-  for (GModel::riter rit = geom->firstRegion() ; rit != geom->lastRegion(); ++rit) {
-    copy_elements<MTetrahedron>((*rit)->tetrahedra,mesh->getRegionByTag((*rit)->tag())->tetrahedra,_mesh_to_geom);
-    copy_elements<MHexahedron>((*rit)->hexahedra,mesh->getRegionByTag((*rit)->tag())->hexahedra,_mesh_to_geom);
-    copy_elements<MPrism>((*rit)->prisms,mesh->getRegionByTag((*rit)->tag())->prisms,_mesh_to_geom);
-    copy_elements<MPyramid>((*rit)->pyramids,mesh->getRegionByTag((*rit)->tag())->pyramids,_mesh_to_geom);
-    }
 }
 
 int GeomMeshMatcher::match(GModel *geom, GModel *mesh)
@@ -697,20 +732,14 @@ int GeomMeshMatcher::match(GModel *geom, GModel *mesh)
 
   bool ok = true;
 
-  // This will match VERTICES
-  std::vector<Pair<GVertex*, GVertex*> > *coresp_v = matchVertices(geom, mesh,ok);
-
-  // This will match EDGES
-  std::vector<Pair<GEdge*, GEdge*> > *coresp_e = matchEdges(geom, mesh, coresp_v,ok);
-
-  // This will match SURFACES
-  std::vector<Pair<GFace*, GFace*> > *coresp_f = matchFaces(geom, mesh, coresp_e,ok);
-
-  std::vector<Pair<GRegion*, GRegion*> > *coresp_r = matchRegions(geom, mesh, coresp_f,ok);
+  std::vector<Pair<GVertex*, GVertex*> > *coresp_v = matchVertices(geom, mesh, ok);
+  std::vector<Pair<GEdge*  , GEdge*  > > *coresp_e = matchEdges   (geom, mesh, coresp_v, ok);
+  std::vector<Pair<GFace*  , GFace*  > > *coresp_f = matchFaces   (geom, mesh, coresp_e, ok);
+  std::vector<Pair<GRegion*, GRegion*> > *coresp_r = matchRegions (geom, mesh, coresp_f, ok);
 
   std::map<MVertex*,MVertex*> _mesh_to_geom;
-  copy_vertices(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f);
-  copy_elements(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f);
+  copy_vertices(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
+  copy_elements(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
 
   delete coresp_v;
   delete coresp_e;
diff --git a/Geo/GeomMeshMatcher.h b/Geo/GeomMeshMatcher.h
index 2ecd609..161ec5b 100644
--- a/Geo/GeomMeshMatcher.h
+++ b/Geo/GeomMeshMatcher.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Homology.cpp b/Geo/Homology.cpp
index 2893565..77a9911 100644
--- a/Geo/Homology.cpp
+++ b/Geo/Homology.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Homology.h b/Geo/Homology.h
index 5469c04..c8b6096 100644
--- a/Geo/Homology.h
+++ b/Geo/Homology.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MEdge.cpp b/Geo/MEdge.cpp
index 3f71126..7ef12c6 100644
--- a/Geo/MEdge.cpp
+++ b/Geo/MEdge.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "MEdge.h"
 #include "Numeric.h"
 
diff --git a/Geo/MEdge.h b/Geo/MEdge.h
index 92c30ea..fa4633a 100644
--- a/Geo/MEdge.h
+++ b/Geo/MEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MEdgeHash.h b/Geo/MEdgeHash.h
index d730626..ae78287 100644
--- a/Geo/MEdgeHash.h
+++ b/Geo/MEdgeHash.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 108be65..3994bc0 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,6 +22,7 @@
 #include "GEntity.h"
 #include "StringUtils.h"
 #include "Numeric.h"
+#include "CondNumBasis.h"
 #include "Context.h"
 
 #define SQU(a)      ((a)*(a))
@@ -48,6 +49,89 @@ MElement::MElement(int num, int part) : _visible(1)
   }
 }
 
+MElement* MElement::createElement(int tag, const std::vector<MVertex*> &vertices,
+                                  int num, int part)
+{
+  const int type = ElementType::ParentTypeFromTag(tag);
+  const int order = ElementType::OrderFromTag(tag);
+  const bool serendipity = ElementType::SerendipityFromTag(tag) > 1;
+
+  if (order == 0) {
+    Msg::Error("p0 elements can not be created (tag %d)", tag);
+    return NULL;
+  }
+
+  switch (type) {
+
+  case TYPE_PNT:
+    return new MPoint(vertices, num, part);
+
+  case TYPE_LIN:
+    if (order == 1)
+      return new MLine(vertices, num, part);
+    else if (order == 2)
+      return new MLine3(vertices, num, part);
+    else
+      return new MLineN(vertices, num, part);
+
+  case TYPE_TRI:
+    if (order == 1)
+      return new MTriangle(vertices, num, part);
+    else if (order == 2)
+      return new MTriangle6(vertices, num, part);
+    else
+      return new MTriangleN(vertices, order, num, part);
+
+  case TYPE_QUA:
+    if (order == 1)
+      return new MQuadrangle(vertices, num, part);
+    else if (order == 2 && serendipity)
+      return new MQuadrangle8(vertices, num, part);
+    else if (order == 2)
+      return new MQuadrangle9(vertices, num, part);
+    else
+      return new MQuadrangleN(vertices, order, num, part);
+
+  case TYPE_TET:
+    if (order == 1)
+      return new MTetrahedron(vertices, num, part);
+    else if (order == 2)
+      return new MTetrahedron10(vertices, num, part);
+    else
+      return new MTetrahedronN(vertices, order, num, part);
+
+  case TYPE_PYR:
+    if (order == 1)
+      return new MPyramid(vertices, num, part);
+    else
+      return new MPyramidN(vertices, order, num, part);
+
+  case TYPE_PRI:
+    if (order == 1)
+      return new MPrism(vertices, num, part);
+    else if (order == 2 && serendipity)
+      return new MPrism15(vertices, num, part);
+    else if (order == 2)
+      return new MPrism18(vertices, num, part);
+    else
+      return new MPrismN(vertices, order, num, part);
+
+  case TYPE_HEX:
+    if (order == 1)
+      return new MHexahedron(vertices, num, part);
+    else if (order == 2 && serendipity)
+      return new MHexahedron20(vertices, num, part);
+    else if (order == 2)
+      return new MHexahedron27(vertices, num, part);
+    else
+      return new MHexahedronN(vertices, order, num, part);
+
+  default:
+    break;
+  }
+  return NULL;
+}
+
 void MElement::_getEdgeRep(MVertex *v0, MVertex *v1,
                            double *x, double *y, double *z, SVector3 *n,
                            int faceIndex)
@@ -112,7 +196,17 @@ double MElement::rhoShapeMeasure()
     return 0.;
 }
 
-double MElement::maxDistToStraight()
+double MElement::metricShapeMeasure()
+{
+  return MetricBasis::minRCorner(this);
+}
+
+double MElement::metricShapeMeasure2()
+{
+  return MetricBasis::boundMinR(this);
+}
+
+double MElement::maxDistToStraight() const
 {
   const nodalBasis *lagBasis = getFunctionSpace();
   const fullMatrix<double> &uvw = lagBasis->points;
@@ -135,7 +229,7 @@ double MElement::maxDistToStraight()
   return maxdx;
 }
 
-void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge)
+void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) const
 {
   jmin = jmax = 1.0;
 #if defined(HAVE_MESH)
@@ -150,7 +244,7 @@ void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge)
     SVector3 geoNorm(0.,0.,0.);
     // ... correct Jacobian sign with geometrical normal
     for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
-      MVertex *vert = getVertex(i);
+      const MVertex *vert = getVertex(i);
       if (vert->onWhat() == ge) {
         double u, v;
         vert->getParameter(0,u);
@@ -175,6 +269,105 @@ void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge)
 #endif
 }
 
+void MElement::idealJacRange(double &jmin, double &jmax, GEntity *ge)
+{
+  jmin = jmax = 1.0;
+#if defined(HAVE_MESH)
+  const JacobianBasis *jac = getJacobianFuncSpace();
+  const int numJacNodes = jac->getNumJacNodes();
+  fullMatrix<double> nodesXYZ(jac->getNumMapNodes(),3);
+  getNodesCoord(nodesXYZ);
+  fullVector<double> iJi(numJacNodes), Bi(numJacNodes);
+  jac->getSignedIdealJacobian(nodesXYZ,iJi);
+  const int nEd = getNumEdges(), dim = getDim();
+  double sumEdLength = 0.;
+  for(int iEd = 0; iEd < nEd; iEd++)
+    sumEdLength += getEdge(iEd).length();
+  const double invMeanEdLength = double(nEd)/sumEdLength;
+  if (sumEdLength == 0.) {
+    jmin = 0.; jmax = 0.;
+    return;
+  }
+  double scale = (dim == 1.) ? invMeanEdLength :
+                 (dim == 2.) ? invMeanEdLength*invMeanEdLength :
+                 invMeanEdLength*invMeanEdLength*invMeanEdLength;
+  if (ge && (ge->dim() == 2) && ge->haveParametrization()) {
+    // If parametrized surface entity provided...
+    SVector3 geoNorm(0.,0.,0.);
+    // ... correct Jacobian sign with geometrical normal
+    for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
+      const MVertex *vert = getVertex(i);
+      if (vert->onWhat() == ge) {
+        double u, v;
+        vert->getParameter(0,u);
+        vert->getParameter(1,v);
+        geoNorm += ((GFace*)ge)->normal(SPoint2(u,v));
+      }
+    }
+    if (geoNorm.normSq() == 0.) {
+      // If no vertex on surface or average is zero, take normal at barycenter
+      SPoint2 param = ((GFace*)ge)->parFromPoint(barycenter(true),false);
+      geoNorm = ((GFace*)ge)->normal(param);
+    }
+    fullMatrix<double> elNorm(1,3);
+    jac->getPrimNormal2D(nodesXYZ, elNorm, true);
+    const double dp = geoNorm(0) * elNorm(0,0) + geoNorm(1) * elNorm(0,1) +
+      geoNorm(2) * elNorm(0,2);
+    if (dp < 0.) scale = -scale;
+  }
+  iJi.scale(scale);
+  jac->lag2Bez(iJi,Bi);
+  jmin = *std::min_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
+  jmax = *std::max_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
+#endif
+}
+
+void MElement::signedInvCondNumRange(double &iCNMin, double &iCNMax, GEntity *ge)
+{
+  iCNMin = iCNMax = 1.0;
+#if defined(HAVE_MESH)
+  const CondNumBasis *cnb = BasisFactory::getCondNumBasis(getTypeForMSH());
+  const int numCNNodes = cnb->getNumCondNumNodes();
+  fullMatrix<double> nodesXYZ(cnb->getNumMapNodes(), 3), normals;
+  getNodesCoord(nodesXYZ);
+  if (getDim() == 2.) {
+    SVector3 nVec = getFace(0).normal();
+    normals.resize(1, 3);
+    normals(0, 0) = nVec[0]; normals(0, 1) = nVec[1]; normals(0, 2) = nVec[2];
+  }
+  if (ge && (ge->dim() == 2) && ge->haveParametrization()) {
+    // If parametrized surface entity provided...
+    SVector3 geoNorm(0., 0., 0.);
+    // ... correct Jacobian sign with geometrical normal
+    for (int i=0; i<getNumPrimaryVertices(); i++) {
+      const MVertex *vert = getVertex(i);
+      if (vert->onWhat() == ge) {
+        double u, v;
+        vert->getParameter(0, u);
+        vert->getParameter(1, v);
+        geoNorm += ((GFace*)ge)->normal(SPoint2(u, v));
+      }
+    }
+    if (geoNorm.normSq() == 0.) {
+      // If no vertex on surface or average is zero, take normal at barycenter
+      SPoint2 param = ((GFace*)ge)->parFromPoint(barycenter(true), false);
+      geoNorm = ((GFace*)ge)->normal(param);
+    }
+    const double dp = geoNorm(0) * normals(0, 0) + geoNorm(1) * normals(0, 1)
+                    + geoNorm(2) * normals(0, 2);
+    if (dp < 0.) {
+       normals(0, 0) = -normals(0, 0);
+       normals(0, 1) = -normals(0, 1);
+       normals(0, 2) = -normals(0, 2);
+    }
+  }
+  fullVector<double> invCondNum(numCNNodes);
+  cnb->getSignedInvCondNum(nodesXYZ, normals, invCondNum);
+  iCNMin = *std::min_element(invCondNum.getDataPtr(), invCondNum.getDataPtr()+numCNNodes);
+  iCNMax = *std::max_element(invCondNum.getDataPtr(), invCondNum.getDataPtr()+numCNNodes);
+#endif
+}
+
 void MElement::getNode(int num, double &u, double &v, double &w) const
 {
   // only for MElements that don't have a lookup table for this
@@ -399,8 +592,8 @@ double MElement::getJacobian(double u, double v, double w, double jac[3][3]) con
       jac[j][1] += ver->y() * gg[j];
       jac[j][2] += ver->z() * gg[j];
     }
-    //    printf("GSF (%d,%g %g) = %g %g \n",i,u,v,gg[0],gg[1]);
   }
+
   return _computeDeterminantAndRegularize(this, jac);
 }
 
@@ -439,7 +632,7 @@ const {
   return _computeDeterminantAndRegularize(this, jac);
 }
 
-double MElement::getPrimaryJacobian(double u, double v, double w, double jac[3][3])
+double MElement::getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
 {
   jac[0][0] = jac[0][1] = jac[0][2] = 0.;
   jac[1][0] = jac[1][1] = jac[1][2] = 0.;
@@ -460,7 +653,7 @@ double MElement::getPrimaryJacobian(double u, double v, double w, double jac[3][
   return _computeDeterminantAndRegularize(this, jac);
 }
 
-void MElement::getSignedJacobian(fullVector<double> &jacobian, int o)
+void MElement::getSignedJacobian(fullVector<double> &jacobian, int o) const
 {
   const int numNodes = getNumVertices();
   fullMatrix<double> nodesXYZ(numNodes,3);
@@ -479,6 +672,60 @@ void MElement::getNodesCoord(fullMatrix<double> &nodesXYZ) const
   }
 }
 
+double MElement::getEigenvaluesMetric(double u, double v, double w, double values[3]) const
+{
+  double jac[3][3];
+  getJacobian(u, v, w, jac);
+  GradientBasis::mapFromIdealElement(getType(), jac);
+
+  switch (getDim()) {
+  case 1:
+    values[0] = 0;
+    values[1] = -1;
+    values[2] = -1;
+    for (int d = 0; d < 3; ++d)
+      values[0] += jac[d][0] * jac[d][0];
+    return 1;
+
+  case 2:
+  {
+    fullMatrix<double> metric(2, 2);
+    for (int i = 0; i < 2; ++i) {
+      for (int j = 0; j < 2; ++j) {
+        for (int d = 0; d < 3; ++d)
+          metric(i, j) += jac[d][i] * jac[d][j];
+      }
+    }
+    fullVector<double> valReal(values, 2), valImag(2);
+    fullMatrix<double> vecLeft(2, 2), vecRight(2, 2);
+    metric.eig(valReal, valImag, vecLeft, vecRight, true);
+    values[2] = -1;
+    return std::sqrt(valReal(0) / valReal(1));
+  }
+
+  case 3:
+  {
+    fullMatrix<double> metric(3, 3);
+    for (int i = 0; i < 3; ++i) {
+      for (int j = 0; j < 3; ++j) {
+        for (int d = 0; d < 3; ++d)
+          metric(i, j) += jac[d][i] * jac[d][j];
+      }
+    }
+
+    fullVector<double> valReal(values, 3), valImag(3);
+    fullMatrix<double> vecLeft(3, 3), vecRight(3, 3);
+    metric.eig(valReal, valImag, vecLeft, vecRight, true);
+
+    return std::sqrt(valReal(0) / valReal(2));
+  }
+
+  default:
+    Msg::Error("wrong dimension for getEigenvaluesMetric function");
+    return -1;
+  }
+}
+
 void MElement::pnt(double u, double v, double w, SPoint3 &p) const
 {
   double x = 0., y = 0., z = 0.;
@@ -882,7 +1129,7 @@ void MElement::writeMSH2(FILE *fp, double version, bool binary, int num,
 }
 
 void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber,
-                        bool printGamma, bool printEta, bool printRho,
+                        bool printSICN, bool printGamma, bool printRho,
                         bool printDisto, double scalingFactor, int elementary)
 {
   const char *str = getStringForPOS();
@@ -909,18 +1156,18 @@ void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber,
       fprintf(fp, "%d", getNum());
     }
   }
-  if(printGamma){
-    double gamma = gammaShapeMeasure();
+  if(printSICN){
+    double sICNMin = minSICNShapeMeasure();
     for(int i = 0; i < n; i++){
       if(first) first = false; else fprintf(fp, ",");
-      fprintf(fp, "%g", gamma);
+      fprintf(fp, "%g", sICNMin);
     }
   }
-  if(printEta){
-    double eta = etaShapeMeasure();
+  if(printGamma){
+    double gamma = gammaShapeMeasure();
     for(int i = 0; i < n; i++){
       if(first) first = false; else fprintf(fp, ",");
-      fprintf(fp, "%g", eta);
+      fprintf(fp, "%g", gamma);
     }
   }
   if(printRho){
@@ -1058,6 +1305,8 @@ void MElement::writeUNV(FILE *fp, int num, int elementary, int physical)
 void MElement::writeMESH(FILE *fp, int elementTagType, int elementary,
                          int physical)
 {
+  if(physical < 0) reverse();
+
   for(int i = 0; i < getNumVertices(); i++)
     if (getTypeForMSH() == MSH_TET_10 && i == 8)
       fprintf(fp, " %d", getVertex(9)->getIndex());
@@ -1066,18 +1315,24 @@ void MElement::writeMESH(FILE *fp, int elementTagType, int elementary,
     else
       fprintf(fp, " %d", getVertex(i)->getIndex());
   fprintf(fp, " %d\n", (elementTagType == 3) ? _partition :
-          (elementTagType == 2) ? physical : elementary);
+          (elementTagType == 2) ? abs(physical) : elementary);
+
+  if(physical < 0) reverse();
 }
 
 void MElement::writeIR3(FILE *fp, int elementTagType, int num, int elementary,
                         int physical)
 {
+  if(physical < 0) reverse();
+
   int numVert = getNumVertices();
   fprintf(fp, "%d %d %d", num, (elementTagType == 3) ? _partition :
-          (elementTagType == 2) ? physical : elementary, numVert);
+          (elementTagType == 2) ? abs(physical) : elementary, numVert);
   for(int i = 0; i < numVert; i++)
     fprintf(fp, " %d", getVertex(i)->getIndex());
   fprintf(fp, "\n");
+
+  if(physical < 0) reverse();
 }
 
 void MElement::writeBDF(FILE *fp, int format, int elementTagType, int elementary,
@@ -1090,8 +1345,10 @@ void MElement::writeBDF(FILE *fp, int format, int elementTagType, int elementary
   const char *cont[4] = {"E", "F", "G", "H"};
   int ncont = 0;
 
+  if(physical < 0) reverse();
+
   int tag =  (elementTagType == 3) ? _partition : (elementTagType == 2) ?
-    physical : elementary;
+    abs(physical) : elementary;
 
   if(format == 0){ // free field format
     fprintf(fp, "%s,%d,%d", str, _num, tag);
@@ -1119,23 +1376,29 @@ void MElement::writeBDF(FILE *fp, int format, int elementTagType, int elementary
       fprintf(fp, "%-8s%-8s%-8s", "0.", "0.", "0.");
     fprintf(fp, "\n");
   }
+
+  if(physical < 0) reverse();
 }
 
-void MElement::writeDIFF(FILE *fp, int num, bool binary, int physical_property)
+void MElement::writeDIFF(FILE *fp, int num, bool binary, int physical)
 {
   const char *str = getStringForDIFF();
   if(!str) return;
 
+  if(physical < 0) reverse();
+
   int n = getNumVertices();
   if(binary){
     // TODO
   }
   else{
-    fprintf(fp, "%d %s %d ", num, str, physical_property);
+    fprintf(fp, "%d %s %d ", num, str, abs(physical));
     for(int i = 0; i < n; i++)
       fprintf(fp, " %d", getVertexDIFF(i)->getIndex());
     fprintf(fp, "\n");
   }
+
+  if(physical < 0) reverse();
 }
 
 void MElement::writeINP(FILE *fp, int num)
diff --git a/Geo/MElement.h b/Geo/MElement.h
index db684db..c19d8e4 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -17,8 +17,8 @@
 #include "nodalBasis.h"
 #include "polynomialBasis.h"
 #include "JacobianBasis.h"
+#include "MetricBasis.h"
 #include "GaussIntegration.h"
-
 class GModel;
 
 // A mesh element.
@@ -45,6 +45,10 @@ class MElement
   MElement(int num=0, int part=0);
   virtual ~MElement(){}
 
+  // Create an element from tag
+  static MElement* createElement(int tag, const std::vector<MVertex*>&,
+                                 int num=0, int part=0);
+
   // set/get the tolerance for isInside() test
   static void setTolerance(const double tol){ _isInsideTolerance = tol; }
   static double getTolerance() { return _isInsideTolerance; }
@@ -58,6 +62,15 @@ class MElement
   // return the polynomial order the element
   virtual int getPolynomialOrder() const { return 1; }
 
+  // return true if the element can be considered as a serendipity element
+  virtual bool getIsAssimilatedSerendipity() const {
+    return ElementType::SerendipityFromTag(getTypeForMSH()) > 0;
+  }
+  // return true if the element has to be considered as a serendipity element
+  virtual bool getIsOnlySerendipity() const {
+    return ElementType::SerendipityFromTag(getTypeForMSH()) > 1;
+  }
+
   // get/set the partition to which the element belongs
   virtual int getPartition() const { return _partition; }
   virtual void setPartition(int num){ _partition = (short)num; }
@@ -117,7 +130,7 @@ class MElement
   }
 
   // get the edges
-  virtual int getNumEdges() = 0;
+  virtual int getNumEdges() const = 0;
   virtual MEdge getEdge(int num) const= 0;
 
   // give an MEdge as input and get its local number and sign
@@ -128,21 +141,24 @@ class MElement
 
   // get an edge representation for drawing
   virtual int getNumEdgesRep(bool curved) = 0;
-  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) = 0;
+  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
+                          SVector3 *n) = 0;
 
   // get the faces
   virtual int getNumFaces() = 0;
   virtual MFace getFace(int num) = 0;
 
   // give an MFace as input and get its local number, sign and rotation
-  virtual void getFaceInfo(const MFace & face, int &ithFace, int &sign, int &rot) const
+  virtual void getFaceInfo(const MFace & face, int &ithFace, int &sign,
+                           int &rot) const
   {
     Msg::Error("Face information not available for this element");
   }
 
   // get a face representation for drawing
   virtual int getNumFacesRep(bool curved) = 0;
-  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) = 0;
+  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
+                          SVector3 *n) = 0;
 
   // get all the vertices on a edge or a face
   virtual void getEdgeVertices(const int num, std::vector<MVertex*> &v) const
@@ -160,6 +176,7 @@ class MElement
   virtual int getNumChildren() const { return 0; }
   virtual MElement *getChild(int i) const { return NULL; }
   virtual bool ownsParent() const { return false; }
+
   // get base element in case of MSubElement
   virtual const MElement *getBaseElement() const { return this; }
   virtual MElement *getBaseElement() { return this; }
@@ -175,22 +192,32 @@ class MElement
   virtual double maxEdge();
   virtual double minEdge();
 
-  // Max. distance between curved and straight element among all high-order nodes
-  double maxDistToStraight();
+  // max. distance between curved and straight element among all high-order nodes
+  double maxDistToStraight() const;
 
   // get the quality measures
   double skewness();
   virtual double rhoShapeMeasure();
   virtual double gammaShapeMeasure(){ return 0.; }
   virtual double etaShapeMeasure(){ return 0.; }
-  virtual double distoShapeMeasure()
+  double distoShapeMeasure()
   {
     double jmin, jmax;
     scaledJacRange(jmin, jmax);
     return jmin;
   }
+  double minSICNShapeMeasure()
+  {
+    double sICNMin, sICNMax;
+    signedInvCondNumRange(sICNMin, sICNMax);
+    return sICNMin;
+  }
   virtual double angleShapeMeasure() { return 1.0; }
-  virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0);
+  virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0) const;
+  virtual void idealJacRange(double &jmin, double &jmax, GEntity *ge = 0);
+  virtual void signedInvCondNumRange(double &iCNMin, double &iCNMax, GEntity *ge = 0);
+  virtual double metricShapeMeasure();
+  virtual double metricShapeMeasure2();
 
   // get the radius of the inscribed circle/sphere if it exists,
   // otherwise get the minimum radius of all the circles/spheres
@@ -266,18 +293,22 @@ class MElement
     }
     return detJ;
   }
-  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]);
-  double getJacobianDeterminant(double u, double v, double w)
+  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const;
+  double getJacobianDeterminant(double u, double v, double w) const
   {
     double jac[3][3]; return getJacobian(u, v, w, jac);
   }
-  void getSignedJacobian(fullVector<double> &jacobian, int o = -1);
+  void getSignedJacobian(fullVector<double> &jacobian, int o = -1) const;
   void getNodesCoord(fullMatrix<double> &nodesXYZ) const;
-  virtual int getNumShapeFunctions() const{ return getNumVertices(); }
-  virtual int getNumPrimaryShapeFunctions() { return getNumPrimaryVertices(); }
-  virtual const MVertex *getShapeFunctionNode(int i) const{ return getVertex(i); }
+  virtual int getNumShapeFunctions() const { return getNumVertices(); }
+  virtual int getNumPrimaryShapeFunctions() const { return getNumPrimaryVertices(); }
+  virtual const MVertex *getShapeFunctionNode(int i) const { return getVertex(i); }
   virtual MVertex *getShapeFunctionNode(int i) { return getVertex(i); }
 
+  // return the eigenvalues of the metric evaluated at point (u,v,w) in
+  // parametric coordinates
+  virtual double getEigenvaluesMetric(double u, double v, double w, double values[3]) const;
+
   // get the point in cartesian coordinates corresponding to the point
   // (u,v,w) in parametric coordinates
   virtual void pnt(double u, double v, double w, SPoint3 &p) const;
@@ -329,7 +360,7 @@ class MElement
                          int parentNum=0, int dom1Num = 0, int dom2Num = 0,
                          std::vector<short> *ghosts=0);
   virtual void writePOS(FILE *fp, bool printElementary, bool printElementNumber,
-                        bool printGamma, bool printEta, bool printRho,
+                        bool printSICN, bool printGamma, bool printRho,
                         bool printDisto,double scalingFactor=1.0, int elementary=1);
   virtual void writeSTL(FILE *fp, bool binary=false, double scalingFactor=1.0);
   virtual void writeVRML(FILE *fp);
diff --git a/Geo/MElementCut.cpp b/Geo/MElementCut.cpp
index 3d14181..fd7baef 100644
--- a/Geo/MElementCut.cpp
+++ b/Geo/MElementCut.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -1448,19 +1448,24 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls,
   fullMatrix<double> verticesLs(nbLs, numVert + 1);
 
  //compute all at once for ls POINTS (type = 11)
-  std::vector<MVertex *> vert;
-  for(unsigned int i = 0; i < gmEntities.size(); i++) {
-    for(unsigned int j = 0; j < gmEntities[i]->getNumMeshVertices(); j++) {
-      vert.push_back(gmEntities[i]->getMeshVertex(j));
+  bool lsPoints = false;
+  for(int i = 0; i < primS; i++)
+    if(primitives[i]->type() == LSPOINTS) {lsPoints = true; break;}
+  if(lsPoints){
+    std::vector<MVertex *> vert;
+    for(unsigned int i = 0; i < gmEntities.size(); i++) {
+      for(unsigned int j = 0; j < gmEntities[i]->getNumMeshVertices(); j++) {
+        vert.push_back(gmEntities[i]->getMeshVertex(j));
+      }
     }
-  }
-  for(int k = 0; k < primS; k++){
-    if (primitives[k]->type() == LSPOINTS){
-      ((gLevelsetPoints*)primitives[k])->computeLS(vert);
+    for(int k = 0; k < primS; k++){
+      if (primitives[k]->type() == LSPOINTS){
+        ((gLevelsetPoints*)primitives[k])->computeLS(vert);
+      }
     }
   }
 
-  //compute and store levelset values
+  //compute and store levelset values + create new nodes
   for(unsigned int i = 0; i < gmEntities.size(); i++) {
     for(unsigned int j = 0; j < gmEntities[i]->getNumMeshVertices(); j++) {
       MVertex *vi = gmEntities[i]->getMeshVertex(j);
@@ -1470,6 +1475,9 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls,
         verticesLs(k, vi->getIndex()) = (*primitives[k])(vi->x(), vi->y(), vi->z());
       if(primS > 1)
         verticesLs(k, vi->getIndex()) = (*ls)(vi->x(), vi->y(), vi->z());
+
+      MVertex *vn = new MVertex(vi->x(), vi->y(), vi->z(), 0, vi->getNum());
+      vertexMap[vi->getNum()] = vn;
     }
   }
 
@@ -1604,6 +1612,7 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls,
   }
 
 #if 0
+  int numElements = 0;
   for(int i = 0; i < 10; i++) {
     printf(" - element type : %d\n", i);
     for(std::map<int, std::vector<MElement*> >::iterator it = elements[i].begin();
@@ -1615,7 +1624,7 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls,
         if(e->getParent()) printf(" par=%d (%d)",e->getParent()->getNum(),e->ownsParent());
         if(e->getDomain(0)) printf(" d0=%d",e->getDomain(0)->getNum());
         if(e->getDomain(1)) printf(" d1=%d",e->getDomain(1)->getNum());
-        printf("\n");
+        printf("\n"); numElements++;
       }
     }
   }
@@ -1624,13 +1633,11 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls,
     for(std::map<int, std::map<int, std::string> >::iterator it=physicals[i].begin();it!=physicals[i].end();it++)
       for(std::map<int, std::string>::iterator it2 = it->second.begin(); it2!=it->second.end(); it2++)
         printf(" dim=%d reg=%d phys=%d \"%s\"\n",i,it->first,it2->first,it2->second.c_str());
-  printf("\n");
+  printf("new Model : %d elements %d nodes\n\n",numElements,vertexMap.size());
 #endif
 
   for(newVerticesContainer::iterator it = newVertices.begin();
       it != newVertices.end(); ++it){
-    if((*it)->getNum() <= gm->getMaxVertexNumber())
-      (*it)->forceNum(cutGM->getMaxVertexNumber() + 1);
     vertexMap[(*it)->getNum()] = *it;
   }
 
diff --git a/Geo/MElementCut.h b/Geo/MElementCut.h
index a8229ea..d96fd33 100644
--- a/Geo/MElementCut.h
+++ b/Geo/MElementCut.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -70,7 +70,7 @@ class MPolyhedron : public MElement {
   {
     return (num < (int)_vertices.size()) ? _vertices[num] : _innerVertices[num - _vertices.size()];
   }
-  virtual int getNumEdges() { return _edges.size(); }
+  virtual int getNumEdges()const { return _edges.size(); }
   virtual MEdge getEdge(int num) const{ return _edges[num]; }
   virtual int getNumEdgesRep(bool curved) { return _edges.size(); }
   virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
@@ -145,7 +145,7 @@ class MPolyhedron : public MElement {
   {
     return (_orig ? _orig->getNumShapeFunctions() : 0);
   }
-  virtual int getNumPrimaryShapeFunctions()
+  virtual int getNumPrimaryShapeFunctions() const
   {
     return (_orig ? _orig->getNumPrimaryShapeFunctions() : 0);
   }
@@ -227,7 +227,7 @@ class MPolygon : public MElement {
   {
     return (num < (int)_vertices.size()) ? _vertices[num] : _innerVertices[num - _vertices.size()];
   }
-  virtual int getNumEdges() { return _edges.size(); }
+  virtual int getNumEdges()const { return _edges.size(); }
   virtual MEdge getEdge(int num) const{ return _edges[num]; }
   virtual int getNumEdgesRep(bool curved) { return getNumEdges(); }
   virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
@@ -295,7 +295,7 @@ class MPolygon : public MElement {
   {
     return (_orig ? _orig->getNumShapeFunctions() : 0);
   }
-  virtual int getNumPrimaryShapeFunctions()
+  virtual int getNumPrimaryShapeFunctions() const
   {
     return (_orig ? _orig->getNumPrimaryShapeFunctions() : 0);
   }
diff --git a/Geo/MElementOctree.cpp b/Geo/MElementOctree.cpp
index 04f24c6..360e6af 100644
--- a/Geo/MElementOctree.cpp
+++ b/Geo/MElementOctree.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -117,6 +117,7 @@ MElementOctree::MElementOctree(std::vector<MElement*> &v) : _gm(0), _elems(v)
   Octree_Arrange(_octree);
 }
 
+
 MElementOctree::~MElementOctree()
 {
   Octree_Delete(_octree);
diff --git a/Geo/MElementOctree.h b/Geo/MElementOctree.h
index 3777a0c..a517f8b 100644
--- a/Geo/MElementOctree.h
+++ b/Geo/MElementOctree.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MFace.cpp b/Geo/MFace.cpp
index c46bc19..fa0e733 100644
--- a/Geo/MFace.cpp
+++ b/Geo/MFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MFace.h b/Geo/MFace.h
index 0e09369..f08b552 100644
--- a/Geo/MFace.h
+++ b/Geo/MFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MFaceHash.h b/Geo/MFaceHash.h
index d9b3e6a..31d44e3 100644
--- a/Geo/MFaceHash.h
+++ b/Geo/MFaceHash.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MHexahedron.cpp b/Geo/MHexahedron.cpp
index 31f5e74..2c0469e 100644
--- a/Geo/MHexahedron.cpp
+++ b/Geo/MHexahedron.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -7,10 +7,12 @@
 #include "Numeric.h"
 #include "Context.h"
 #include "BasisFactory.h"
-#include "nodalBasis.h"
 #include "polynomialBasis.h"
 #include "MQuadrangle.h"
+
+#if defined(HAVE_MESH)
 #include "qualityMeasures.h"
+#endif
 
 int MHexahedron::getVolumeSign()
 {
@@ -38,34 +40,10 @@ void MHexahedron::getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
 
 double MHexahedron::angleShapeMeasure()
 {
-
 #if defined(HAVE_MESH)
-   double angleMax = 0.0;
-   double angleMin = M_PI;
-   double zeta = 0.0;
-   for (int i=0; i<getNumFaces(); i++){
-     std::vector<MVertex*> vv;
-     vv.push_back(getFace(i).getVertex(0));
-     vv.push_back(getFace(i).getVertex(1));
-     vv.push_back(getFace(i).getVertex(2));
-     vv.push_back(getFace(i).getVertex(3));
-     // MVertex *v0 = new MVertex(0, 0, 0); vv.push_back(v0);
-     // MVertex *v1 = new MVertex(1., 0, 0);vv.push_back(v1);
-     // MVertex *v2 = new MVertex(2., 1., 0);vv.push_back(v2);
-     // MVertex *v3 = new MVertex(1, 1., 0);vv.push_back(v3);
-     for (int j=0; j<4; j++){
-       SVector3 a(vv[(j+2)%4]->x()-vv[(j+1)%4]->x(),vv[(j+2)%4]->y()-vv[(j+1)%4]->y(),vv[(j+2)%4]->z()-vv[(j+1)%4]->z()  );
-       SVector3 b(vv[(j+1)%4]->x()-vv[(j)%4]->x(),  vv[(j+1)%4]->y()-vv[(j)%4]->y(),  vv[(j+1)%4]->z()-vv[(j)%4]->z()  );
-       double angle = acos( dot(a,b)/(norm(a)*norm(b))); //*180/M_PI;
-       angleMax = std::max(angleMax, angle);
-       angleMin = std::min(angleMin, angle);
-     }
-     //printf("angle max =%g min =%g \n", angleMax*180/M_PI, angleMin*180/M_PI);
-   }
-   zeta = 1.-std::max((angleMax-0.5*M_PI)/(0.5*M_PI),(0.5*M_PI-angleMin)/(0.5*M_PI));
-   return zeta;
+  return qmHexahedron::angles(this);
 #else
-   return 1.;
+   return 0.;
 #endif
 
 }
@@ -74,7 +52,8 @@ double MHexahedron::getInnerRadius()
   //Only for vertically aligned elements (not inclined)
   double innerRadius=std::numeric_limits<double>::max();
   for (int i=0; i<getNumFaces(); i++){
-    MQuadrangle quad(getFace(i).getVertex(0), getFace(i).getVertex(1), getFace(i).getVertex(2), getFace(i).getVertex(3));
+    MQuadrangle quad(getFace(i).getVertex(0), getFace(i).getVertex(1),
+                     getFace(i).getVertex(2), getFace(i).getVertex(3));
     innerRadius=std::min(innerRadius,quad.getInnerRadius());
   }
   return innerRadius;
@@ -163,17 +142,23 @@ static void _myGetEdgeRep(MHexahedron *hex, int num, double *x, double *y, doubl
   n[0] = n[1] = 1 ;
 }
 
-void MHexahedron20::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MHexahedron20::getEdgeRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MHexahedron27::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MHexahedron27::getEdgeRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MHexahedronN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MHexahedronN::getEdgeRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getEdgeRep(false, num, x, y, z, n);
 }
@@ -368,19 +353,22 @@ void _myGetFaceRep(MHexahedron *hex, int num, double *x, double *y, double *z,
 }
 
 
-void MHexahedron20::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MHexahedron20::getFaceRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getFaceRep(false, num, x, y, z, n);
 }
 
-void MHexahedron27::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MHexahedron27::getFaceRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getFaceRep(false, num, x, y, z, n);
 }
 
-void MHexahedronN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MHexahedronN::getFaceRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MHexahedron::getFaceRep(false, num, x, y, z, n);
@@ -388,16 +376,19 @@ void MHexahedronN::getFaceRep(bool curved, int num, double *x, double *y, double
 
 int MHexahedron20::getNumFacesRep(bool curved)
 {
-  return curved ? 6 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 12;
+  return curved ? 6 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 12;
 }
 
 
 int MHexahedron27::getNumFacesRep(bool curved)
 {
-  return curved ? 6 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 12;
+  return curved ? 6 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 12;
 }
 
 int MHexahedronN::getNumFacesRep(bool curved)
 {
-  return curved ? 6 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 12;
+  return curved ? 6 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 12;
 }
diff --git a/Geo/MHexahedron.h b/Geo/MHexahedron.h
index 94fd92b..28c5c5b 100644
--- a/Geo/MHexahedron.h
+++ b/Geo/MHexahedron.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -65,7 +65,7 @@ class MHexahedron : public MElement {
     static const int map[8] = {2, 3, 7, 6, 0, 1, 5, 4};
     return getVertex(map[num]);
   }
-  virtual int getNumEdges(){ return 12; }
+  virtual int getNumEdges()const{ return 12; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_hexa(num, 0)], _v[edges_hexa(num, 1)]);
@@ -267,6 +267,12 @@ class MHexahedron20 : public MHexahedron {
                                 19, 14, 11, 15, 13, 8, 16, 17, 10};
     return getVertex(map[num]);
   }
+  virtual MVertex *getVertexVTK(int num)
+  {
+    static const int map[20] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 13,
+                                9, 16, 18, 19, 17, 10, 12, 14, 15};
+    return getVertex(map[num]);
+  }
   virtual int getNumEdgeVertices() const { return 12; }
   virtual int getNumEdgesRep(bool curved);
   virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n);
@@ -372,6 +378,12 @@ class MHexahedron27 : public MHexahedron {
                                 23, 21, 1, 9, 11, 19, 16, 4, 12, 14, 22, 10, 13};
     return getVertex(map[num]);
   }
+  virtual MVertex *getVertexVTK(int num)
+  {
+    static const int map[27] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 13, 9, 16, 18, 19,
+                                17, 10, 12, 14,15, 22, 23, 21, 24, 20, 25, 26};
+    return getVertex(map[num]);
+  }
   virtual int getNumEdgeVertices() const { return 12; }
   virtual int getNumFaceVertices() const { return 6; }
   virtual int getNumVolumeVertices() const { return 1; }
@@ -486,14 +498,14 @@ class MHexahedronN : public MHexahedron {
   virtual int getNumEdgeVertices() const { return 12 * (_order - 1); }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return 6 * (_order - 1)*(_order - 1);
   }
   virtual int getNumVolumeVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return (_order - 1) * (_order - 1) * (_order - 1);
@@ -508,7 +520,7 @@ class MHexahedronN : public MHexahedron {
   }
   virtual void getFaceVertices(const int num, std::vector<MVertex*> &v) const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0) {
+    if (getIsAssimilatedSerendipity()) {
       v.resize(4 * _order);
     }
     else {
diff --git a/Geo/MLine.cpp b/Geo/MLine.cpp
index 1299cb4..8df65e3 100644
--- a/Geo/MLine.cpp
+++ b/Geo/MLine.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -46,7 +46,8 @@ int MLine3::getNumEdgesRep(bool curved)
   return curved ? CTX::instance()->mesh.numSubEdges : 1;
 }
 
-void MLine3::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MLine3::getEdgeRep(bool curved, int num,
+                        double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) {
     int numSubEdges = CTX::instance()->mesh.numSubEdges;
@@ -107,8 +108,10 @@ void MLineN::discretize(double tol, std::vector<SPoint3> &dpts, std::vector<doub
   if (order == 3) {
     SPoint3 p0 = getVertex(0)->point();
     SPoint3 p3 = getVertex(1)->point();
-    SPoint3 p1 = p0 * (-5./6) + p3 * (1./3) + getVertex(2)->point() * 3. - getVertex(3)->point() * 1.5;
-    SPoint3 p2 = p0 * (1./3) + p3 * (-5./6) - getVertex(2)->point() * 1.5 + getVertex(3)->point() * 3.;
+    SPoint3 p1 = p0 * (-5./6) + p3 * (1./3) + getVertex(2)->point() * 3. -
+      getVertex(3)->point() * 1.5;
+    SPoint3 p2 = p0 * (1./3) + p3 * (-5./6) - getVertex(2)->point() * 1.5 +
+      getVertex(3)->point() * 3.;
     decasteljau(tol, p0, p1, p2, p3, dpts, ts);
     for (size_t i = 0; i < ts.size(); ++i)
       ts[i] = -1 + 2 * ts[i];
diff --git a/Geo/MLine.h b/Geo/MLine.h
index 378a4d6..cb4251b 100644
--- a/Geo/MLine.h
+++ b/Geo/MLine.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -47,7 +47,7 @@ class MLine : public MElement {
   {
     ithVertex = _v[0] == vertex ? 0 : 1;
   }
-  virtual int getNumEdges(){ return 1; }
+  virtual int getNumEdges()const{ return 1; }
   virtual MEdge getEdge(int num) const{ return MEdge(_v[0], _v[1]); }
   virtual int getNumEdgesRep(bool curved){ return 1; }
   virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
@@ -206,6 +206,13 @@ class MLineN : public MLine {
     Msg::Error("no tag matches a line with %d vertices", 8+_vs.size());
     return 0;
   }
+  virtual void reverse()
+  {
+    MVertex *tmp = _v[0]; _v[0] = _v[1]; _v[1] = tmp;
+    std::vector<MVertex*> inv;
+    inv.insert(inv.begin(), _vs.rbegin(), _vs.rend());
+    _vs = inv;
+  }
   virtual void getNode(int num, double &u, double &v, double &w) const
   {
     num < 2 ? MLine::getNode(num, u, v, w) : MElement::getNode(num, u, v, w);
diff --git a/Geo/MPoint.h b/Geo/MPoint.h
index df733f1..301f7a2 100644
--- a/Geo/MPoint.h
+++ b/Geo/MPoint.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,7 +33,7 @@ class MPoint : public MElement {
   virtual MVertex *getVertex(int num){ return _v[0]; }
   virtual const MVertex *getVertex(int num) const { return _v[0]; }
   virtual void setVertex(int num,  MVertex *v){ _v[0] = v; }
-  virtual int getNumEdges(){ return 0; }
+  virtual int getNumEdges()const{ return 0; }
   virtual MEdge getEdge(int num) const{ return MEdge(); }
   virtual int getNumEdgesRep(bool curved){ return 0; }
   virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n){}
diff --git a/Geo/MPrism.cpp b/Geo/MPrism.cpp
index 41c2b69..6e3ffb0 100644
--- a/Geo/MPrism.cpp
+++ b/Geo/MPrism.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,6 +8,10 @@
 #include "BasisFactory.h"
 #include "Context.h"
 
+#if defined(HAVE_MESH)
+#include "qualityMeasures.h"
+#endif
+
 int MPrism::getVolumeSign()
 {
   double mat[3][3];
@@ -122,8 +126,8 @@ void MPrism::getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) c
 }
 
 static void _myGetEdgeRep(MPrism *pri, int num, double *x, double *y, double *z,
-                          SVector3 *n, int numSubEdges) {
-
+                          SVector3 *n, int numSubEdges)
+{
   //const int numSubEdges = CTX::instance()->mesh.numSubEdges;
   static double pp[6][3] = {
     {0,0,-1},{1,0,-1},{0,1,-1},
@@ -159,36 +163,43 @@ static void _myGetEdgeRep(MPrism *pri, int num, double *x, double *y, double *z,
   n[0] = n[1] = 1 ;
 }
 
-
-void MPrism15::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MPrism15::getEdgeRep(bool curved, int num,
+                          double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MPrism18::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MPrism18::getEdgeRep(bool curved, int num,
+                          double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MPrismN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n) {
+void MPrismN::getEdgeRep(bool curved, int num,
+                         double *x, double *y, double *z, SVector3 *n)
+{
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getEdgeRep(false, num, x, y, z, n);
 }
 
-int MPrism15::getNumEdgesRep(bool curved) {
+int MPrism15::getNumEdgesRep(bool curved)
+{
   return curved ? 9 * CTX::instance()->mesh.numSubEdges : 9;
 }
 
-int MPrism18::getNumEdgesRep(bool curved) {
+int MPrism18::getNumEdgesRep(bool curved)
+{
   return curved ? 9 * CTX::instance()->mesh.numSubEdges : 9;
 }
 
-int MPrismN::getNumEdgesRep(bool curved) {
+int MPrismN::getNumEdgesRep(bool curved)
+{
   return curved ? 9 * CTX::instance()->mesh.numSubEdges : 9;
 }
 
-
-void _myGetFaceRep(MPrism *pri, int num, double *x, double *y, double *z,
+static void _myGetFaceRep(MPrism *pri, int num, double *x, double *y, double *z,
                           SVector3 *n, int numSubEdges)
 {
   static double pp[6][3] = {
@@ -348,7 +359,8 @@ void _myGetFaceRep(MPrism *pri, int num, double *x, double *y, double *z,
       pri->pnt(U3, V3, W3, pnt3);
     }
 
-  } else {
+  }
+  else {
     int ix = 0, iy = 0;
     int nbt = 0;
     for (int i = 0; i < numSubEdges; i++){
@@ -406,55 +418,60 @@ void _myGetFaceRep(MPrism *pri, int num, double *x, double *y, double *z,
   n[2] = n[0];
 }
 
-void MPrism15::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MPrism15::getFaceRep(bool curved, int num,
+                          double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getFaceRep(false, num, x, y, z, n);
 }
 
-void MPrism18::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MPrism18::getFaceRep(bool curved, int num,
+                          double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getFaceRep(false, num, x, y, z, n);
 }
 
-void MPrismN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MPrismN::getFaceRep(bool curved, int num,
+                         double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPrism::getFaceRep(false, num, x, y, z, n);
 }
 
-int MPrism15::getNumFacesRep(bool curved) {
-  return curved ? 4 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 8;
+int MPrism15::getNumFacesRep(bool curved)
+{
+  return curved ? 4 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 8;
 }
 
-int MPrism18::getNumFacesRep(bool curved) {
-  return curved ? 4 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 8;
+int MPrism18::getNumFacesRep(bool curved)
+{
+  return curved ? 4 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 8;
 }
 
-int MPrismN::getNumFacesRep(bool curved) {
-  return curved ? 4 * (CTX::instance()->mesh.numSubEdges * CTX::instance()->mesh.numSubEdges * 2) : 8;
+int MPrismN::getNumFacesRep(bool curved)
+{
+  return curved ? 4 * (CTX::instance()->mesh.numSubEdges *
+                       CTX::instance()->mesh.numSubEdges * 2) : 8;
 }
 
-namespace {
-
-void _addEdgeNodes(int num, bool reverse, int order, const std::vector<MVertex*> &vs,
-                   int &ind, std::vector<MVertex*> &v)
+static void _addEdgeNodes(int num, bool reverse, int order,
+                          const std::vector<MVertex*> &vs,
+                          int &ind, std::vector<MVertex*> &v)
 {
-
   const int nNode = order-1, startNode = num*nNode, endNode = startNode+nNode-1;
 
   if (reverse)
     for (int i=endNode; i>=startNode; i--, ind++) v[ind] = vs[i];
   else
     for (int i=startNode; i<=endNode; i++, ind++) v[ind] = vs[i];
-
 }
 
-void _addFaceNodes(int num, int order, const std::vector<MVertex*> &vs,
-                   int &ind, std::vector<MVertex*> &v)
+static void _addFaceNodes(int num, int order, const std::vector<MVertex*> &vs,
+                          int &ind, std::vector<MVertex*> &v)
 {
-
   const int nNodeEd = order-1, nNodeTri = (order-2)*(order-1)/2;
 
   int startNode, endNode;
@@ -469,9 +486,6 @@ void _addFaceNodes(int num, int order, const std::vector<MVertex*> &vs,
   }
 
   for (int i=startNode; i<endNode; i++, ind++) v[ind] = vs[i];
-
-}
-
 }
 
 // To be tested
@@ -510,42 +524,18 @@ void MPrismN::getFaceVertices(const int num, std::vector<MVertex*> &v) const
   int ind = nEdge;
 
   // Add edge nodes
-  for (int iE=0; iE<nEdge; iE++) _addEdgeNodes(edge[num][iE],reverse[num][iE],_order,_vs,ind,v);
+  for (int iE=0; iE<nEdge; iE++)
+    _addEdgeNodes(edge[num][iE],reverse[num][iE],_order,_vs,ind,v);
 
   // Add face nodes
   _addFaceNodes(num,_order,_vs,ind,v);
-
-}
-
-static double scaled_jacobian(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
-  double val;
-  double l1,l2,l3;
-  SVector3 vec1,vec2,vec3;
-
-  vec1 = SVector3(b->x()-a->x(),b->y()-a->y(),b->z()-a->z());
-  vec2 = SVector3(c->x()-a->x(),c->y()-a->y(),c->z()-a->z());
-  vec3 = SVector3(d->x()-a->x(),d->y()-a->y(),d->z()-a->z());
-
-  l1 = vec1.norm();
-  l2 = vec2.norm();
-  l3 = vec3.norm();
-
-  val = dot(vec1,crossprod(vec2,vec3));
-  return fabs(val)/(l1*l2*l3);
 }
 
-double MPrism::gammaShapeMeasure() {
-  MVertex *a = getVertex(0),*b= getVertex(1),*c= getVertex(2);
-  MVertex *d = getVertex(3),*e= getVertex(4),*f= getVertex(5);
-  const double j [6] = {
-    scaled_jacobian(a,b,c,d),
-    scaled_jacobian(b,a,c,e),
-    scaled_jacobian(c,a,b,f),
-    scaled_jacobian(d,a,e,f),
-    scaled_jacobian(e,b,d,f),
-    scaled_jacobian(f,c,d,e)};  
-  const double result = *std::min_element(j,j+6);
-  printf("%12.5E\n",result);
-  return result;
+double MPrism::gammaShapeMeasure()
+{
+#if defined(HAVE_MESH)
+  return qmPrism::minNCJ(this);
+#else
+  return 0.;
+#endif
 }
-
diff --git a/Geo/MPrism.h b/Geo/MPrism.h
index df37180..a827966 100644
--- a/Geo/MPrism.h
+++ b/Geo/MPrism.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -66,7 +66,7 @@ class MPrism : public MElement {
   virtual MVertex *getVertex(int num){ return _v[num]; }
   virtual const MVertex *getVertex(int num)const{ return _v[num]; }
   virtual void setVertex(int num,   MVertex *v){ _v[num] = v; }
-  virtual int getNumEdges(){ return 9; }
+  virtual int getNumEdges()const{ return 9; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_prism(num, 0)], _v[edges_prism(num, 1)]);
@@ -413,14 +413,14 @@ class MPrismN : public MPrism {
   virtual int getNumEdgeVertices() const { return 9*(_order-1); }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       {int n = _order-1; return (n-1 + 3*n) * n;}
   }
   virtual int getNumVolumeVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       {int n = _order-1; return n * (n * (n+1) / 2);}
diff --git a/Geo/MPyramid.cpp b/Geo/MPyramid.cpp
index 1d2af2d..52d6bcc 100644
--- a/Geo/MPyramid.cpp
+++ b/Geo/MPyramid.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,28 +33,23 @@ void MPyramid::getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
   *pts = getGQPyrPts(pOrder);
 }
 
-const JacobianBasis* MPyramid::getJacobianFuncSpace(int o) const
+const JacobianBasis* MPyramid::getJacobianFuncSpace(int order) const
 {
-  // FIXME add other order and see MPyramid::getFunctionSpace for 'design'
-  int order = (o == -1) ? getPolynomialOrder() : o;
-
-  switch (order) {
-    case 1: return BasisFactory::getJacobianBasis(MSH_PYR_5);
-    case 2: return BasisFactory::getJacobianBasis(MSH_PYR_14);
-    case 3: return BasisFactory::getJacobianBasis(MSH_PYR_30);
-    default: Msg::Error("Order %d pyramid function space not implemented", order); break;
-  }
+  if (order == -1) return BasisFactory::getJacobianBasis(getTypeForMSH());
 
-  return 0;
+  int tag = ElementType::getTag(TYPE_PYR, order);
+  return tag ? BasisFactory::getJacobianBasis(tag) : NULL;
 }
 
 MPyramidN::~MPyramidN() {}
 
-int MPyramidN::getNumEdgesRep(bool curved) {
+int MPyramidN::getNumEdgesRep(bool curved)
+{
   return curved ? 8 * CTX::instance()->mesh.numSubEdges : 8;
 }
 
-void MPyramidN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MPyramidN::getEdgeRep(bool curved, int num,
+                           double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) {
     int numSubEdges = CTX::instance()->mesh.numSubEdges;
@@ -90,7 +85,8 @@ void MPyramidN::getEdgeRep(bool curved, int num, double *x, double *y, double *z
 }
 
 
-int MPyramidN::getNumFacesRep(bool curved) {
+int MPyramidN::getNumFacesRep(bool curved)
+{
   return curved ? 6 * SQU(CTX::instance()->mesh.numSubEdges) : 6;
 }
 
@@ -330,7 +326,8 @@ static void _myGetFaceRep(MPyramid *pyr, int num, double *x, double *y, double *
   }
 }
 
-void MPyramidN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MPyramidN::getFaceRep(bool curved, int num,
+                           double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MPyramid::getFaceRep(false, num, x, y, z, n);
diff --git a/Geo/MPyramid.h b/Geo/MPyramid.h
index 7bfdc27..6b26d9f 100644
--- a/Geo/MPyramid.h
+++ b/Geo/MPyramid.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -70,7 +70,7 @@ class MPyramid : public MElement {
   virtual const MVertex *getVertex(int num) const{ return _v[num]; }
   virtual void setVertex(int num,  MVertex *v){ _v[num] = v; }
   virtual const JacobianBasis* getJacobianFuncSpace(int o=-1) const;
-  virtual int getNumEdges(){ return 8; }
+  virtual int getNumEdges()const{ return 8; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_pyramid(num, 0)], _v[edges_pyramid(num, 1)]);
@@ -249,7 +249,7 @@ class MPyramidN : public MPyramid {
   virtual int getNumEdgeVertices() const { return 8 * (_order - 1); }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return (_order-1)*(_order-1) + 4 * ((_order - 1) * (_order - 2)) / 2;
@@ -264,7 +264,7 @@ class MPyramidN : public MPyramid {
   }
   virtual void getFaceVertices(const int num, std::vector<MVertex*> &v) const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0) {
+    if (getIsAssimilatedSerendipity()) {
       num == 4 ? v.resize(4 * _order)
                : v.resize(3 * _order);
     }
@@ -290,7 +290,7 @@ class MPyramidN : public MPyramid {
   }
   virtual int getNumVolumeVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return (_order-2) * ((_order-2)+1) * (2*(_order-2)+1) / 6;
diff --git a/Geo/MQuadrangle.cpp b/Geo/MQuadrangle.cpp
index 56aa05f..e5258ba 100644
--- a/Geo/MQuadrangle.cpp
+++ b/Geo/MQuadrangle.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -24,15 +24,18 @@ const JacobianBasis* MQuadrangle::getJacobianFuncSpace(int order) const
   return tag ? BasisFactory::getJacobianBasis(tag) : NULL;
 }
 
-int MQuadrangleN::getNumEdgesRep(bool curved){
+int MQuadrangleN::getNumEdgesRep(bool curved)
+{
   return curved ? 4 * CTX::instance()->mesh.numSubEdges : 4;
 }
 
-int MQuadrangle8::getNumEdgesRep(bool curved){
+int MQuadrangle8::getNumEdgesRep(bool curved)
+{
   return curved ? 4 * CTX::instance()->mesh.numSubEdges : 4;
 }
 
-int MQuadrangle9::getNumEdgesRep(bool curved){
+int MQuadrangle9::getNumEdgesRep(bool curved)
+{
   return curved ? 4 * CTX::instance()->mesh.numSubEdges : 4;
 }
 
@@ -83,30 +86,39 @@ static void _myGetEdgeRep(MQuadrangle *q, int num, double *x, double *y, double
   z[0] = pnt1.z(); z[1] = pnt2.z();
 }
 
-void MQuadrangleN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MQuadrangleN::getEdgeRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getEdgeRep(false, num, x, y, z, n);
 }
-void MQuadrangle8::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+
+void MQuadrangle8::getEdgeRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getEdgeRep(false, num, x, y, z, n);
 }
-void MQuadrangle9::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+
+void MQuadrangle9::getEdgeRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getEdgeRep(false, num, x, y, z, n);
 }
 
-
-int MQuadrangleN::getNumFacesRep(bool curved){
+int MQuadrangleN::getNumFacesRep(bool curved)
+{
   return curved ? 2*SQU(CTX::instance()->mesh.numSubEdges) : 2;
 }
-int MQuadrangle8::getNumFacesRep(bool curved){
+
+int MQuadrangle8::getNumFacesRep(bool curved)
+{
   return curved ? 2*SQU(CTX::instance()->mesh.numSubEdges) : 2;
 }
-int MQuadrangle9::getNumFacesRep(bool curved){
+
+int MQuadrangle9::getNumFacesRep(bool curved)
+{
   return curved ? 2*SQU(CTX::instance()->mesh.numSubEdges) : 2;
 }
 
@@ -162,17 +174,22 @@ static void _myGetFaceRep(MQuadrangle *t, int num, double *x, double *y, double
   z[0] = pnt1.z(); z[1] = pnt2.z(); z[2] = pnt3.z();
 }
 
-void MQuadrangleN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MQuadrangleN::getFaceRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getFaceRep(false, num, x, y, z, n);
 }
-void MQuadrangle8::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+
+void MQuadrangle8::getFaceRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getFaceRep(false, num, x, y, z, n);
 }
-void MQuadrangle9::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+
+void MQuadrangle9::getFaceRep(bool curved, int num,
+                              double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MQuadrangle::getFaceRep(false, num, x, y, z, n);
@@ -186,65 +203,36 @@ void MQuadrangle::getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
 
 double  MQuadrangle::etaShapeMeasure()
 {
-  double AR = 1;//(minEdge()/maxEdge());
-
-  SVector3 v01 (_v[1]->x()-_v[0]->x(),_v[1]->y()-_v[0]->y(),_v[1]->z()-_v[0]->z());
-  SVector3 v12 (_v[2]->x()-_v[1]->x(),_v[2]->y()-_v[1]->y(),_v[2]->z()-_v[1]->z());
-  SVector3 v23 (_v[3]->x()-_v[2]->x(),_v[3]->y()-_v[2]->y(),_v[3]->z()-_v[2]->z());
-  SVector3 v30 (_v[0]->x()-_v[3]->x(),_v[0]->y()-_v[3]->y(),_v[0]->z()-_v[3]->z());
-
-  SVector3 a = crossprod(v01,v12);
-  SVector3 b = crossprod(v12,v23);
-  SVector3 c = crossprod(v23,v30);
-  SVector3 d = crossprod(v30,v01);
-
-  double sign = 1.0;
-  if (dot(a,b) < 0 || dot(a,c) < 0 || dot(a,d) < 0 )sign = -1;
-  // FIXME ...
-  //  if (a.z() > 0 || b.z() > 0 || c.z() > 0 || d.z() > 0) sign = -1;
-
-  double a1 = 180 * angle3Vertices(_v[0], _v[1], _v[2]) / M_PI;
-  double a2 = 180 * angle3Vertices(_v[1], _v[2], _v[3]) / M_PI;
-  double a3 = 180 * angle3Vertices(_v[2], _v[3], _v[0]) / M_PI;
-  double a4 = 180 * angle3Vertices(_v[3], _v[0], _v[1]) / M_PI;
-
-  a1 = std::min(180.,a1);
-  a2 = std::min(180.,a2);
-  a3 = std::min(180.,a3);
-  a4 = std::min(180.,a4);
-  double angle = fabs(90. - a1);
-  angle = std::max(fabs(90. - a2),angle);
-  angle = std::max(fabs(90. - a3),angle);
-  angle = std::max(fabs(90. - a4),angle);
-
-  return sign*(1.-angle/90) * AR;
+#if defined(HAVE_MESH)
+  return qmQuadrangle::eta(this);
+#else
+  return 0.;
+#endif
 }
 
-/// a shape measure for quadrangles
-/// assume (for now) 2D elements --
-///  sf = (1 \pm xi) (1 \pm eta) / 4
-///  dsf_xi  =  \pm (1 \pm  eta) / 4
-///             1 + eta , -(1+eta) , -(1-eta), 1-eta
-///  dsf_eta =  \pm (1 \pm  xi)  / 4
-///             1 + xi , 1 - xi ,  -(1-xi), -(1+xi)
 double MQuadrangle::gammaShapeMeasure(){
-  return etaShapeMeasure();
+#if defined(HAVE_MESH)
+  return qmQuadrangle::gamma(this);
+#else
+  return 0.;
+#endif
 }
 
-
 double MQuadrangle::angleShapeMeasure()
 {
 #if defined(HAVE_MESH)
-  return qmQuadrangleAngles(this);
+  return qmQuadrangle::angles(this);
 #else
   return 1.;
 #endif
 }
+
 double MQuadrangle::getOuterRadius()
 {
-  // TO DO!!!!!!!!!!!!! (BRUNO SENY)
+  // FIXME: TODO! (BRUNO SENY)
   return 1.0;
 }
+
 double MQuadrangle::getInnerRadius()
 {
 #if defined(HAVE_LAPACK)
diff --git a/Geo/MQuadrangle.h b/Geo/MQuadrangle.h
index 187e6c6..1f04ca4 100644
--- a/Geo/MQuadrangle.h
+++ b/Geo/MQuadrangle.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -63,7 +63,7 @@ class MQuadrangle : public MElement {
     static const int map[4] = {0, 1, 3, 2};
     return getVertex(map[num]);
   }
-  virtual int getNumEdges(){ return 4; }
+  virtual int getNumEdges()const{ return 4; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_quad(num, 0)], _v[edges_quad(num, 1)]);
@@ -375,7 +375,7 @@ class MQuadrangleN : public MQuadrangle {
   virtual const MVertex *getVertex(int num) const{ return num < 4 ? _v[num] : _vs[num - 4]; }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return  (_order - 1) * (_order - 1);
@@ -432,7 +432,7 @@ class MQuadrangleN : public MQuadrangle {
   virtual int getTypeForVTK() const
   {
     if(_order== 2 && _vs.size() + 4 == 9) return 28;
-    if(_order== 2 && _vs.size() + 4 == 8)  return 23;
+    if(_order== 2 && _vs.size() + 4 == 8) return 23;
     return MQuadrangle::getTypeForVTK();
   }
   virtual void reverse()
diff --git a/Geo/MSubElement.cpp b/Geo/MSubElement.cpp
index ae58a39..1c24787 100644
--- a/Geo/MSubElement.cpp
+++ b/Geo/MSubElement.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -64,7 +64,7 @@ double MSubTetrahedron::getJacobian(double u, double v, double w, double jac[3][
   if(_orig) return _orig->getJacobian(u, v, w, jac);
   return 0;
 }
-double MSubTetrahedron::getPrimaryJacobian(double u, double v, double w, double jac[3][3])
+double MSubTetrahedron::getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
 {
   if(_orig) return _orig->getPrimaryJacobian(u, v, w, jac);
   return 0;
@@ -76,7 +76,7 @@ int MSubTetrahedron::getNumShapeFunctions() const
   return 0;
 }
 
-int MSubTetrahedron::getNumPrimaryShapeFunctions()
+int MSubTetrahedron::getNumPrimaryShapeFunctions() const
 {
   if(_orig) return _orig->getNumPrimaryShapeFunctions();
   return 0;
@@ -303,7 +303,7 @@ double MSubTriangle::getJacobian(double u, double v, double w, double jac[3][3])
   if(_orig) return _orig->getJacobian(u, v, w, jac);
   return 0;
 }
-double MSubTriangle::getPrimaryJacobian(double u, double v, double w, double jac[3][3])
+double MSubTriangle::getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
 {
   if(_orig) return _orig->getPrimaryJacobian(u, v, w, jac);
   return 0;
@@ -315,7 +315,7 @@ int MSubTriangle::getNumShapeFunctions() const
   return 0;
 }
 
-int MSubTriangle::getNumPrimaryShapeFunctions()
+int MSubTriangle::getNumPrimaryShapeFunctions() const
 {
   if(_orig) return _orig->getNumPrimaryShapeFunctions();
   return 0;
@@ -531,7 +531,7 @@ double MSubLine::getJacobian(double u, double v, double w, double jac[3][3]) con
   if(_orig) return _orig->getJacobian(u, v, w, jac);
   return 0;
 }
-double MSubLine::getPrimaryJacobian(double u, double v, double w, double jac[3][3])
+double MSubLine::getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
 {
   if(_orig) return _orig->getPrimaryJacobian(u, v, w, jac);
   return 0;
@@ -543,7 +543,7 @@ int MSubLine::getNumShapeFunctions() const
   return 0;
 }
 
-int MSubLine::getNumPrimaryShapeFunctions()
+int MSubLine::getNumPrimaryShapeFunctions() const
 {
   if(_orig) return _orig->getNumPrimaryShapeFunctions();
   return 0;
@@ -723,7 +723,7 @@ double MSubPoint::getJacobian(double u, double v, double w, double jac[3][3]) co
   if(_orig) return _orig->getJacobian(u, v, w, jac);
   return 0;
 }
-double MSubPoint::getPrimaryJacobian(double u, double v, double w, double jac[3][3])
+double MSubPoint::getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
 {
   if(_orig) return _orig->getPrimaryJacobian(u, v, w, jac);
   return 0;
@@ -735,7 +735,7 @@ int MSubPoint::getNumShapeFunctions() const
   return 0;
 }
 
-int MSubPoint::getNumPrimaryShapeFunctions()
+int MSubPoint::getNumPrimaryShapeFunctions() const
 {
   if(_orig) return _orig->getNumPrimaryShapeFunctions();
   return 0;
diff --git a/Geo/MSubElement.h b/Geo/MSubElement.h
index 9415ead..90140b4 100644
--- a/Geo/MSubElement.h
+++ b/Geo/MSubElement.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -51,9 +51,9 @@ class MSubTetrahedron : public MTetrahedron
   virtual double getJacobian(const fullMatrix<double> &gsf, double jac[3][3]) const;
   virtual double getJacobian(const std::vector<SVector3> &gsf, double jac[3][3])const;
   virtual double getJacobian(double u, double v, double w, double jac[3][3]) const;
-  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]);
+  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const;
   virtual int getNumShapeFunctions() const;
-  virtual int getNumPrimaryShapeFunctions();
+  virtual int getNumPrimaryShapeFunctions() const;
   virtual const MVertex* getShapeFunctionNode(int i) const;
   virtual MVertex* getShapeFunctionNode(int i);
   virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
@@ -109,9 +109,9 @@ class MSubTriangle : public MTriangle
   virtual double getJacobian(const fullMatrix<double> &gsf, double jac[3][3]) const;
   virtual double getJacobian(const std::vector<SVector3> &gsf, double jac[3][3])const;
   virtual double getJacobian(double u, double v, double w, double jac[3][3])const;
-  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]);
+  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const;
   virtual int getNumShapeFunctions() const;
-  virtual int getNumPrimaryShapeFunctions();
+  virtual int getNumPrimaryShapeFunctions() const;
   virtual const MVertex* getShapeFunctionNode(int i) const;
   virtual MVertex* getShapeFunctionNode(int i);
   virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
@@ -167,9 +167,9 @@ class MSubLine : public MLine
   virtual double getJacobian(const fullMatrix<double> &gsf, double jac[3][3]) const;
   virtual double getJacobian(const std::vector<SVector3> &gsf, double jac[3][3])const;
   virtual double getJacobian(double u, double v, double w, double jac[3][3]) const;
-  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]);
+  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const;
   virtual int getNumShapeFunctions() const;
-  virtual int getNumPrimaryShapeFunctions();
+  virtual int getNumPrimaryShapeFunctions() const;
   virtual const MVertex* getShapeFunctionNode(int i) const;
   virtual MVertex* getShapeFunctionNode(int i);
   virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
@@ -225,9 +225,9 @@ class MSubPoint : public MPoint
   virtual double getJacobian(const fullMatrix<double> &gsf, double jac[3][3]) const;
   virtual double getJacobian(const std::vector<SVector3> &gsf, double jac[3][3])const;
   virtual double getJacobian(double u, double v, double w, double jac[3][3]) const;
-  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]);
+  virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const;
   virtual int getNumShapeFunctions() const;
-  virtual int getNumPrimaryShapeFunctions();
+  virtual int getNumPrimaryShapeFunctions() const;
   virtual const MVertex* getShapeFunctionNode(int i) const;
   virtual MVertex* getShapeFunctionNode(int i);
   virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
diff --git a/Geo/MTetrahedron.cpp b/Geo/MTetrahedron.cpp
index 43e5587..acadac8 100644
--- a/Geo/MTetrahedron.cpp
+++ b/Geo/MTetrahedron.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -67,7 +67,7 @@ double MTetrahedron::gammaShapeMeasure()
 {
 #if defined(HAVE_MESH)
   double vol;
-  return qmTet(this, QMTET_2, &vol);
+  return qmTetrahedron::qm(this, qmTetrahedron::QMTET_GAMMA, &vol);
 #else
   return 0.;
 #endif
@@ -77,7 +77,7 @@ double MTetrahedron::etaShapeMeasure()
 {
 #if defined(HAVE_MESH)
   double vol;
-  return qmTet(this, QMTET_3, &vol);
+  return qmTetrahedron::qm(this, qmTetrahedron::QMTET_ETA, &vol);
 #else
   return 0.;
 #endif
@@ -148,13 +148,15 @@ static void _myGetEdgeRep(MTetrahedron *tet, int num, double *x, double *y, doub
   n[0] = n[1] = tet->getFace(f[iEdge]).normal();
 }
 
-void MTetrahedron10::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTetrahedron10::getEdgeRep(bool curved, int num,
+                                double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTetrahedron::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MTetrahedronN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTetrahedronN::getEdgeRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTetrahedron::getEdgeRep(false, num, x, y, z, n);
@@ -247,13 +249,15 @@ static void _myGetFaceRep(MTetrahedron *tet, int num, double *x, double *y, doub
   n[2] = n[0];
 }
 
-void MTetrahedronN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTetrahedronN::getFaceRep(bool curved, int num,
+                               double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTetrahedron::getFaceRep(false, num, x, y, z, n);
 }
 
-void MTetrahedron10::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTetrahedron10::getFaceRep(bool curved, int num,
+                                double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTetrahedron::getFaceRep(false, num, x, y, z, n);
diff --git a/Geo/MTetrahedron.h b/Geo/MTetrahedron.h
index 721b880..ebed2a7 100644
--- a/Geo/MTetrahedron.h
+++ b/Geo/MTetrahedron.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -62,7 +62,7 @@ class MTetrahedron : public MElement {
   virtual MVertex *getVertex(int num){ return _v[num]; }
   virtual const MVertex *getVertex(int num) const { return _v[num]; }
   virtual void setVertex(int num,  MVertex *v){ _v[num] = v; }
-  virtual int getNumEdges(){ return 6; }
+  virtual int getNumEdges()const{ return 6; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_tetra(num, 0)], _v[edges_tetra(num, 1)]);
@@ -239,6 +239,11 @@ class MTetrahedron10 : public MTetrahedron {
     static const int map[10] = {0, 1, 2, 3, 4, 5, 6, 7, 9, 8};
     return getVertex(map[num]);
   }
+  virtual MVertex *getVertexVTK(int num)
+  {
+    static const int map[10] = {0, 1, 2, 3, 4, 5, 6, 7, 9, 8};
+    return getVertex(map[num]);
+  }
   virtual MVertex *getVertexDIFF(int num){ return getVertexBDF(num); }
   virtual MVertex *getVertexINP(int num){ return getVertexBDF(num); }
   virtual int getNumEdgeVertices() const { return 6; }
@@ -333,7 +338,7 @@ class MTetrahedronN : public MTetrahedron {
   virtual int getNumEdgeVertices() const { return 6 * (_order - 1); }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return  4 * ((_order - 1) * (_order - 2)) / 2;
@@ -348,7 +353,7 @@ class MTetrahedronN : public MTetrahedron {
   }
   virtual void getFaceVertices(const int num, std::vector<MVertex*> &v) const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0) {
+    if (getIsAssimilatedSerendipity()) {
       v.resize(3 * _order);
     }
     else {
@@ -379,7 +384,7 @@ class MTetrahedronN : public MTetrahedron {
   }
   virtual int getNumVolumeVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return ((_order - 1) * (_order - 2) * (_order - 3)) / 6;
diff --git a/Geo/MTriangle.cpp b/Geo/MTriangle.cpp
index 587d7a1..7e82b4b 100644
--- a/Geo/MTriangle.cpp
+++ b/Geo/MTriangle.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -65,7 +65,7 @@ double MTriangle::getOuterRadius()
 double MTriangle::angleShapeMeasure()
 {
 #if defined(HAVE_MESH)
-  return qmTriangleAngles(this);
+  return qmTriangle::angles(this);
 #else
   return 0.;
 #endif
@@ -73,20 +73,18 @@ double MTriangle::angleShapeMeasure()
 
 double MTriangle::etaShapeMeasure()
 {
-  double a1 = 180 * angle3Vertices(_v[0], _v[1], _v[2]) / M_PI;
-  double a2 = 180 * angle3Vertices(_v[1], _v[2], _v[0]) / M_PI;
-  double a3 = 180 * angle3Vertices(_v[2], _v[0], _v[1]) / M_PI;
-
-  double amin = std::min(std::min(a1,a2),a3);
-  double angle = fabs(60. - amin);
-  return 1.-angle/60;
+#if defined(HAVE_MESH)
+  return qmTriangle::eta(this);
+#else
+  return 0.;
+#endif
 }
 
 
 double MTriangle::gammaShapeMeasure()
 {
 #if defined(HAVE_MESH)
-  return qmTriangle(this, QMTRI_RHO);
+  return qmTriangle::gamma(this);
 #else
   return 0.;
 #endif
@@ -167,29 +165,32 @@ static void _myGetEdgeRep(MTriangle *t, int num, double *x, double *y, double *z
   }
 }
 
-void MTriangleN::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTriangleN::getEdgeRep(bool curved, int num,
+                            double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTriangle::getEdgeRep(false, num, x, y, z, n);
 }
 
-void MTriangle6::getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTriangle6::getEdgeRep(bool curved, int num,
+                            double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTriangle::getEdgeRep(false, num, x, y, z, n);
 }
 
-int MTriangle6::getNumFacesRep(bool curved) {
+int MTriangle6::getNumFacesRep(bool curved)
+{
   return curved ? SQU(CTX::instance()->mesh.numSubEdges) : 1;
 }
-int MTriangleN::getNumFacesRep(bool curved) {
+int MTriangleN::getNumFacesRep(bool curved)
+{
   return curved ? SQU(CTX::instance()->mesh.numSubEdges) : 1;
 }
 
 static void _myGetFaceRep(MTriangle *t, int num, double *x, double *y, double *z,
                           SVector3 *n, int numSubEdges)
 {
-
   // on the first layer, we have (numSubEdges-1) * 2 + 1 triangles
   // on the second layer, we have (numSubEdges-2) * 2 + 1 triangles
   // on the ith layer, we have (numSubEdges-1-i) * 2 + 1 triangles
@@ -249,12 +250,14 @@ static void _myGetFaceRep(MTriangle *t, int num, double *x, double *y, double *z
   z[0] = pnt1.z(); z[1] = pnt2.z(); z[2] = pnt3.z();
 }
 
-void MTriangleN::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTriangleN::getFaceRep(bool curved, int num,
+                            double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTriangle::getFaceRep(false, num, x, y, z, n);
 }
-void MTriangle6::getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
+void MTriangle6::getFaceRep(bool curved, int num,
+                            double *x, double *y, double *z, SVector3 *n)
 {
   if (curved) _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
   else MTriangle::getFaceRep(false, num, x, y, z, n);
diff --git a/Geo/MTriangle.h b/Geo/MTriangle.h
index 3b8fba8..f68a3e0 100644
--- a/Geo/MTriangle.h
+++ b/Geo/MTriangle.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -67,7 +67,7 @@ class MTriangle : public MElement {
     if(_v[2] != v1 && _v[2] != v2) return _v[2];
     return 0;
   }
-  virtual int getNumEdges(){ return 3; }
+  virtual int getNumEdges()const{ return 3; }
   virtual MEdge getEdge(int num) const
   {
     return MEdge(_v[edges_tri(num, 0)], _v[edges_tri(num, 1)]);
@@ -278,7 +278,7 @@ class MTriangleN : public MTriangle {
   virtual const MVertex *getVertex(int num) const { return num < 3 ? _v[num] : _vs[num - 3]; }
   virtual int getNumFaceVertices() const
   {
-    if (ElementType::SerendipityFromTag(getTypeForMSH()) > 0)
+    if (getIsAssimilatedSerendipity())
       return 0;
     else
       return  (_order - 1) * (_order - 2) / 2;
@@ -327,7 +327,10 @@ class MTriangleN : public MTriangle {
     Msg::Error("no tag matches a p%d triangle with %d vertices", _order, 3+_vs.size());
     return 0;
   }
-  virtual int getTypeForVTK() const { return (_order==2) ? 22 : MTriangle::getTypeForVTK(); }
+  virtual int getTypeForVTK() const
+  {
+    return (_order == 2) ? 22 : MTriangle::getTypeForVTK();
+  }
   virtual void reverse()
   {
     MVertex *tmp;
diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp
index 52ba59c..9363d2d 100644
--- a/Geo/MVertex.cpp
+++ b/Geo/MVertex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -14,24 +14,6 @@
 #include "GmshMessage.h"
 #include "StringUtils.h"
 
-double MVertexLessThanLexicographic::tolerance = 1.e-6;
-
-bool MVertexLessThanLexicographic::operator()(const MVertex *v1, const MVertex *v2) const
-{
-  if(v1->x() - v2->x() >  tolerance) return true;
-  if(v1->x() - v2->x() < -tolerance) return false;
-  if(v1->y() - v2->y() >  tolerance) return true;
-  if(v1->y() - v2->y() < -tolerance) return false;
-  if(v1->z() - v2->z() >  tolerance) return true;
-  return false;
-}
-
-bool MVertexLessThanNum::operator()(const MVertex *v1, const MVertex *v2) const
-{
-  if(v1->getNum() < v2->getNum()) return true;
-  return false;
-}
-
 double angle3Vertices(const MVertex *p1, const MVertex *p2, const MVertex *p3)
 {
   SVector3 a(p1->x() - p2->x(), p1->y() - p2->y(), p1->z() - p2->z());
@@ -349,13 +331,24 @@ void MVertex::writeSU2(FILE *fp, int dim, double scalingFactor)
             z() * scalingFactor, _index - 1);
 }
 
-std::set<MVertex*, MVertexLessThanLexicographic>::iterator
-MVertex::linearSearch(std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+bool MVertexLessThanNum::operator()(const MVertex *v1, const MVertex *v2) const
+{
+  if(v1->getNum() < v2->getNum()) return true;
+  return false;
+}
+
+double MVertexLessThanLexicographic::tolerance = 1.e-6;
+
+bool MVertexLessThanLexicographic::operator()(const MVertex *v1, const MVertex *v2) const
 {
-  for(std::set<MVertex*, MVertexLessThanLexicographic>::iterator it = pos.begin();
-      it != pos.end(); ++it)
-    if(distance(*it) < MVertexLessThanLexicographic::tolerance) return it;
-  return pos.end();
+  // you should not use this unless you know what you are doing; to create
+  // unique vertices, use MVertexRTree
+  if(v1->x() - v2->x() >  tolerance) return true;
+  if(v1->x() - v2->x() < -tolerance) return false;
+  if(v1->y() - v2->y() >  tolerance) return true;
+  if(v1->y() - v2->y() < -tolerance) return false;
+  if(v1->z() - v2->z() >  tolerance) return true;
+  return false;
 }
 
 static void getAllParameters(MVertex *v, GFace *gf, std::vector<SPoint2> &params)
@@ -375,7 +368,6 @@ static void getAllParameters(MVertex *v, GFace *gf, std::vector<SPoint2> &params
     for(std::list<GEdge*>::iterator it = ed.begin(); it != ed.end(); it++){
       if((*it)->isSeam(gf)) {
         Range<double> range = (*it)->parBounds(0);
-	//	printf("%d %d %d\n",gv->tag(),(*it)->getBeginVertex()->tag(),(*it)->getEndVertex()->tag());
         if (gv == (*it)->getBeginVertex()){
           params.push_back((*it)->reparamOnFace(gf, range.low(),-1));
           params.push_back((*it)->reparamOnFace(gf, range.low(), 1));
diff --git a/Geo/MVertex.h b/Geo/MVertex.h
index c4049fe..945be23 100644
--- a/Geo/MVertex.h
+++ b/Geo/MVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,17 +18,6 @@ class GEdge;
 class GFace;
 class MVertex;
 
-class MVertexLessThanLexicographic{
- public:
-  static double tolerance;
-  bool operator()(const MVertex *v1, const MVertex *v2) const;
-};
-
-class MVertexLessThanNum{
- public:
-  bool operator()(const MVertex *v1, const MVertex *v2) const;
-};
-
 // A mesh vertex.
 class MVertex{
  protected:
@@ -99,10 +88,6 @@ class MVertex{
     return sqrt(dx * dx + dy * dy + dz * dz);
   }
 
-  // linear coordinate search for the vertex in a set
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator
-  linearSearch(std::set<MVertex*, MVertexLessThanLexicographic> &pos);
-
   // IO routines
   void writeMSH(FILE *fp, bool binary=false, bool saveParametric=false,
                 double scalingFactor=1.0);
@@ -159,6 +144,17 @@ class MFaceVertex : public MVertex{
   }
 };
 
+class MVertexLessThanLexicographic{
+ public:
+  static double tolerance;
+  bool operator()(const MVertex *v1, const MVertex *v2) const;
+};
+
+class MVertexLessThanNum{
+ public:
+  bool operator()(const MVertex *v1, const MVertex *v2) const;
+};
+
 bool reparamMeshEdgeOnFace(MVertex *v1, MVertex *v2, GFace *gf,
                            SPoint2 &param1, SPoint2 &param2);
 bool reparamMeshVertexOnFace(MVertex *v, const GFace *gf, SPoint2 &param,
@@ -167,7 +163,8 @@ bool reparamMeshVertexOnEdge(MVertex *v, const GEdge *ge, double &param);
 
 double angle3Vertices(const MVertex *p1, const MVertex *p2, const MVertex *p3);
 
-inline double distance (MVertex *v1, MVertex *v2){
+inline double distance (MVertex *v1, MVertex *v2)
+{
   const double dx = v1->x() - v2->x();
   const double dy = v1->y() - v2->y();
   const double dz = v1->z() - v2->z();
diff --git a/Geo/MVertexBoundaryLayerData.cpp b/Geo/MVertexBoundaryLayerData.cpp
index 29aece2..da73d9d 100644
--- a/Geo/MVertexBoundaryLayerData.cpp
+++ b/Geo/MVertexBoundaryLayerData.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MVertexBoundaryLayerData.h b/Geo/MVertexBoundaryLayerData.h
index 368de9b..0aff0f4 100644
--- a/Geo/MVertexBoundaryLayerData.h
+++ b/Geo/MVertexBoundaryLayerData.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MVertexPositionSet.h b/Geo/MVertexPositionSet.h
deleted file mode 100644
index d8f3fc2..0000000
--- a/Geo/MVertexPositionSet.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-//
-// See the LICENSE.txt file for license information. Please report all
-// bugs and problems to the public mailing list <gmsh at geuz.org>.
-
-#ifndef _MVERTEX_POSITION_SET_
-#define _MVERTEX_POSITION_SET_
-
-#include <vector>
-#include "GmshMessage.h"
-#include "MVertex.h"
-
-#if defined(HAVE_ANN)
-#include "ANN/ANN.h"
-
-// Stores MVertices in a kd-tree so we can query unique vertices (up
-// to a prescribed tolerance). The constructor tags all the vertices
-// with 0; find() tags the returned vertex with -1; if no
-// negatively-tagged vertex exists, find() returns the closest vertex
-// up to the prescribed tolerance.
-class MVertexPositionSet{
- private:
-  ANNkd_tree *_kdtree;
-  ANNpointArray _zeronodes;
-  ANNidxArray _index;
-  ANNdistArray _dist;
-  int _maxDuplicates;
-  std::vector<MVertex*> &_vertices;
- public:
-  MVertexPositionSet(std::vector<MVertex*> &vertices, int maxDuplicates=10)
-    : _kdtree(0), _maxDuplicates(maxDuplicates), _vertices(vertices)
-  {
-    int totpoints = vertices.size();
-    if(!totpoints) return;
-    if(_maxDuplicates > totpoints) _maxDuplicates = totpoints;
-    _zeronodes = annAllocPts(totpoints, 3);
-    for(int i = 0; i < totpoints; i++){
-      vertices[i]->setIndex(0);
-      _zeronodes[i][0] = vertices[i]->x();
-      _zeronodes[i][1] = vertices[i]->y();
-      _zeronodes[i][2] = vertices[i]->z();
-    }
-    _kdtree = new ANNkd_tree(_zeronodes, totpoints, 3);
-    _index = new ANNidx[_maxDuplicates];
-    _dist = new ANNdist[_maxDuplicates];
-  }
-  ~MVertexPositionSet()
-  {
-    if(!_kdtree) return;
-    delete _kdtree;
-    annDeallocPts(_zeronodes);
-    delete [] _index;
-    delete [] _dist;
-  }
-  MVertex *find(double x, double y, double z, double tolerance)
-  {
-    if(!_kdtree) return 0;
-    double xyz[3] = {x, y, z};
-    _kdtree->annkSearch(xyz, _maxDuplicates, _index, _dist);
-    for(int i = 0; i < _maxDuplicates; i++){
-      if(_index[i] >= 0 && sqrt(_dist[i]) < tolerance &&
-         _vertices[_index[i]]->getIndex() < 0)
-        return _vertices[_index[i]];
-    }
-    if(_index[0] >= 0 && sqrt(_dist[0]) < tolerance){
-      //      printf("tol %g dist %g x %g %g %g\n",tolerance,_dist[0],x,y,z);
-      _vertices[_index[0]]->setIndex(-1);
-      return _vertices[_index[0]];
-    }
-    Msg::Error("Could not find vertex (%g,%g,%g) (tol %g)",
-               x, y, z, tolerance);
-    return 0;
-  }
-};
-
-#else
-
-class MVertexPositionSet{
- public:
-  MVertexPositionSet(std::vector<MVertex*> &vertices, int maxDuplicates=10){}
-  ~MVertexPositionSet(){}
-  MVertex *find(double x, double y, double z, double tolerance)
-  {
-    Msg::Error("Gmsh must be compiled with ANN to use MVertexPositionSet");
-    return 0;
-  }
-};
-
-#endif
-
-#endif
diff --git a/Geo/MVertexRTree.h b/Geo/MVertexRTree.h
new file mode 100644
index 0000000..e2e4f67
--- /dev/null
+++ b/Geo/MVertexRTree.h
@@ -0,0 +1,75 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _MVERTEX_RTREE_
+#define _MVERTEX_RTREE_
+
+#include <vector>
+#include "GmshMessage.h"
+#include "MVertex.h"
+#include "rtree.h"
+
+// Stores MVertex pointers in an R-Tree so we can query unique vertices by their
+// coordinates, up to a prescribed tolerance.
+class MVertexRTree{
+ private:
+  RTree<MVertex*, double, 3, double> *_rtree;
+  double _tol;
+  static bool rtree_callback(MVertex *v, void *ctx)
+  {
+    MVertex **out = static_cast<MVertex**>(ctx);
+    *out = v;
+    return false; // we're done searching
+  }
+ public:
+  MVertexRTree(double tolerance = 1.e-8)
+  {
+    _rtree = new RTree<MVertex*, double, 3, double>();
+    _tol = tolerance;
+  }
+  ~MVertexRTree()
+  {
+    _rtree->RemoveAll();
+    delete _rtree;
+  }
+  int insert(MVertex *v, bool warnIfExists=false)
+  {
+    MVertex *out;
+    double _min[3] = {v->x() - _tol, v->y() - _tol, v->z() - _tol};
+    double _max[3] = {v->x() + _tol, v->y() + _tol, v->z() + _tol};
+    if(!_rtree->Search(_min, _max, rtree_callback, &out)){
+      _rtree->Insert(_min, _max, v);
+      return 0;
+    }
+    else if(warnIfExists){
+      Msg::Warning("Vertex %d (%.16g, %.16g, %.16g) already exists in the "
+                   "mesh with tolerance %g", v->getNum(),
+                   v->x(), v->y(), v->z(), _tol);
+    }
+    return 1; // one vertex not inserted
+  }
+  int insert(std::vector<MVertex*> &v, bool warnIfExists=false)
+  {
+    int num = 0;
+    for(unsigned int i = 0; i < v.size(); i++)
+      num += insert(v[i], warnIfExists);
+    return num; // number of vertices not inserted
+  }
+  MVertex *find(double x, double y, double z)
+  {
+    MVertex *out;
+    double _min[3] = {x - _tol, y - _tol, z - _tol};
+    double _max[3] = {x + _tol, y + _tol, z + _tol};
+    if(_rtree->Search(_min, _max, rtree_callback, &out))
+      return out;
+    return 0;
+  }
+  unsigned int size()
+  {
+    return _rtree->Count();
+  }
+};
+
+#endif
diff --git a/Geo/MZone.cpp b/Geo/MZone.cpp
index 89c68d6..90bc74d 100644
--- a/Geo/MZone.cpp
+++ b/Geo/MZone.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MZone.h b/Geo/MZone.h
index a071dbf..ade1648 100644
--- a/Geo/MZone.h
+++ b/Geo/MZone.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MZoneBoundary.cpp b/Geo/MZoneBoundary.cpp
index 4e6b59e..62cb082 100644
--- a/Geo/MZoneBoundary.cpp
+++ b/Geo/MZoneBoundary.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/MZoneBoundary.h b/Geo/MZoneBoundary.h
index a465142..b820def 100644
--- a/Geo/MZoneBoundary.h
+++ b/Geo/MZoneBoundary.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp
index 5e86977..0ef6479 100644
--- a/Geo/OCCEdge.cpp
+++ b/Geo/OCCEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -45,6 +45,16 @@ OCCEdge::~OCCEdge()
   model()->getOCCInternals()->unbind(c);
 }
 
+SBoundingBox3d OCCEdge::bounds() const
+{
+  Bnd_Box b;
+  BRepBndLib::Add(c, b);
+  double xmin, ymin, zmin, xmax, ymax, zmax;
+  b.Get(xmin, ymin, zmin, xmax, ymax, zmax);
+  SBoundingBox3d bbox(xmin, ymin, zmin, xmax, ymax, zmax);
+  return bbox;
+}
+
 Range<double> OCCEdge::parBounds(int i) const
 {
   return Range<double>(s0, s1);
diff --git a/Geo/OCCEdge.h b/Geo/OCCEdge.h
index ba176b2..b0ed3f1 100644
--- a/Geo/OCCEdge.h
+++ b/Geo/OCCEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -28,6 +28,7 @@ class OCCEdge : public GEdge {
  public:
   OCCEdge(GModel *model, TopoDS_Edge _e, int num, GVertex *v1, GVertex *v2);
   virtual ~OCCEdge();
+  virtual SBoundingBox3d bounds() const;
   virtual Range<double> parBounds(int i) const;
   virtual GeomType geomType() const;
   virtual bool degenerate(int) const { return BRep_Tool::Degenerated(c); }
diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp
index 125774a..353a9eb 100644
--- a/Geo/OCCFace.cpp
+++ b/Geo/OCCFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -28,7 +28,11 @@
 #include <BRepMesh_FastDiscret.hxx>
 
 #if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6)
-#include <BOPInt_Context.hxx>
+#  if (OCC_VERSION_MINOR < 8)
+#  include <BOPInt_Context.hxx>
+#  else
+#  include <IntTools_Context.hxx>
+#  endif
 #include <BOPTools_AlgoTools2D.hxx>
 #include <BOPTools_AlgoTools.hxx>
 #else
@@ -66,6 +70,12 @@ void OCCFace::setup()
       if(!e){
 	Msg::Error("Unknown edge in face %d", tag());
       }
+      else if(edge.Orientation() == TopAbs_INTERNAL){
+        Msg::Info("Adding embedded edge %d", e->tag());
+        embedded_edges.push_back(e);
+        OCCEdge *occe = (OCCEdge*)e;
+        occe->setTrimmed(this);
+      }
       else{
         l_wire.push_back(e);
         Msg::Debug("Edge %d (%d --> %d) ori %d", e->tag(),
@@ -119,6 +129,30 @@ void OCCFace::setup()
   //          (*it)->getBeginVertex()->tag(), (*it)->getEndVertex()->tag(),
   //          (*it)->isSeam(this));
   // }
+
+  /*
+  for(exp2.Init(s, TopAbs_VERTEX); exp2.More(); exp2.Next()){
+    TopoDS_Vertex vertex = TopoDS::Vertex(exp2.Current());
+    GVertex *v = model()->getOCCInternals()->getOCCVertexByNativePtr(model(), vertex);
+    if(!v){
+      Msg::Error("Unknown vertex in face %d", tag());
+    }
+    else if(vertex.Orientation() == TopAbs_INTERNAL){
+      Msg::Info("Adding embedded vertex %d", v->tag());
+      embedded_vertices.push_back(v);
+    }
+  }
+  */
+}
+
+SBoundingBox3d OCCFace::bounds() const
+{
+  Bnd_Box b;
+  BRepBndLib::Add(s, b);
+  double xmin, ymin, zmin, xmax, ymax, zmax;
+  b.Get(xmin, ymin, zmin, xmax, ymax, zmax);
+  SBoundingBox3d bbox(xmin, ymin, zmin, xmax, ymax, zmax);
+  return bbox;
 }
 
 Range<double> OCCFace::parBounds(int i) const
@@ -455,7 +489,7 @@ bool OCCFace::buildSTLTriangulation(bool force)
 void OCCFace::replaceEdgesInternal(std::list<GEdge*> &new_edges)
 {
 
-#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6)
+#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) && (OCC_VERSION_MINOR < 8)
   Handle(BOPInt_Context) myContext = new BOPInt_Context;
 #elif defined(OCC_VERSION_HEX) && OCC_VERSION_HEX >= 0x060503
   Handle(IntTools_Context) myContext = new IntTools_Context;
diff --git a/Geo/OCCFace.h b/Geo/OCCFace.h
index d51baa2..c438cfb 100644
--- a/Geo/OCCFace.h
+++ b/Geo/OCCFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -31,6 +31,7 @@ class OCCFace : public GFace {
  public:
   OCCFace(GModel *m, TopoDS_Face s, int num);
   virtual ~OCCFace();
+  virtual SBoundingBox3d bounds() const;
   Range<double> parBounds(int i) const;
   virtual GPoint point(double par1, double par2) const;
   virtual GPoint closestPoint(const SPoint3 & queryPoint,
diff --git a/Geo/OCCIncludes.h b/Geo/OCCIncludes.h
index 9f05b63..814b5b1 100644
--- a/Geo/OCCIncludes.h
+++ b/Geo/OCCIncludes.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/OCCRegion.cpp b/Geo/OCCRegion.cpp
index d4df942..44644cd 100644
--- a/Geo/OCCRegion.cpp
+++ b/Geo/OCCRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -47,6 +47,16 @@ void OCCRegion::setup()
   Msg::Debug("OCC Region %d with %d faces", tag(), l_faces.size());
 }
 
+SBoundingBox3d OCCRegion::bounds() const
+{
+  Bnd_Box b;
+  BRepBndLib::Add(s, b);
+  double xmin, ymin, zmin, xmax, ymax, zmax;
+  b.Get(xmin, ymin, zmin, xmax, ymax, zmax);
+  SBoundingBox3d bbox(xmin, ymin, zmin, xmax, ymax, zmax);
+  return bbox;
+}
+
 GEntity::GeomType OCCRegion::geomType() const
 {
   return Unknown;
diff --git a/Geo/OCCRegion.h b/Geo/OCCRegion.h
index 2fcd174..809d7c9 100644
--- a/Geo/OCCRegion.h
+++ b/Geo/OCCRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,6 +19,7 @@ class OCCRegion : public GRegion {
  public:
   OCCRegion(GModel *m, TopoDS_Solid s, int num);
   virtual ~OCCRegion();
+  virtual SBoundingBox3d bounds() const;
   virtual GeomType geomType() const;
   ModelType getNativeType() const { return OpenCascadeModel; }
   void * getNativePtr() const { return (void*)&s; }
diff --git a/Geo/OCCVertex.cpp b/Geo/OCCVertex.cpp
index ae941cb..6f53779 100644
--- a/Geo/OCCVertex.cpp
+++ b/Geo/OCCVertex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/OCCVertex.h b/Geo/OCCVertex.h
index 7845c45..4430a6f 100644
--- a/Geo/OCCVertex.h
+++ b/Geo/OCCVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/OCC_Connect.cpp b/Geo/OCC_Connect.cpp
index ff37000..2c3dbe6 100644
--- a/Geo/OCC_Connect.cpp
+++ b/Geo/OCC_Connect.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,12 +6,12 @@
 // Contributed by Mark van Doesburg, Technolution B.V.
 
 #include "OCC_Connect.h"
-
 #include <vector>
 #include <list>
 #include <deque>
 #include <iostream>
 #include <iterator>
+#include <algorithm>
 
 #if defined(HAVE_OCC)
 
diff --git a/Geo/OCC_Connect.h b/Geo/OCC_Connect.h
index bb9f45c..77404b2 100644
--- a/Geo/OCC_Connect.h
+++ b/Geo/OCC_Connect.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Pair.h b/Geo/Pair.h
index 2c3dcff..861c23f 100644
--- a/Geo/Pair.h
+++ b/Geo/Pair.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/Range.h b/Geo/Range.h
index d837472..ad7c52c 100644
--- a/Geo/Range.h
+++ b/Geo/Range.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/SBoundingBox3d.h b/Geo/SBoundingBox3d.h
index f3e1336..7badffd 100644
--- a/Geo/SBoundingBox3d.h
+++ b/Geo/SBoundingBox3d.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/SGEOMIncludes.h b/Geo/SGEOMIncludes.h
index 0ced426..d742609 100644
--- a/Geo/SGEOMIncludes.h
+++ b/Geo/SGEOMIncludes.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/SOrientedBoundingBox.cpp b/Geo/SOrientedBoundingBox.cpp
index 76d000d..0a4af41 100644
--- a/Geo/SOrientedBoundingBox.cpp
+++ b/Geo/SOrientedBoundingBox.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -384,8 +384,10 @@ SOrientedBoundingBox* SOrientedBoundingBox::buildOBB(std::vector<SPoint3> vertic
       bool okay = true;
       for (std::vector<Segment>::iterator seg = convex_hull.begin();
            seg != convex_hull.end(); seg++) {
-        if ( ((*seg).from == segs[j].from && (*seg).from == segs[j].to) ||
-             ((*seg).from == segs[j].to && (*seg).from == segs[j].from)) {
+        if ( ((*seg).from == segs[j].from && (*seg).from == segs[j].to)
+             // FIXME:
+             // || ((*seg).from == segs[j].to && (*seg).from == segs[j].from)
+             ) {
           convex_hull.erase(seg);
           okay = false;
           break;
diff --git a/Geo/SOrientedBoundingBox.h b/Geo/SOrientedBoundingBox.h
index c028546..767dc57 100644
--- a/Geo/SOrientedBoundingBox.h
+++ b/Geo/SOrientedBoundingBox.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/SPoint2.h b/Geo/SPoint2.h
index 4eb8599..f7dab5b 100644
--- a/Geo/SPoint2.h
+++ b/Geo/SPoint2.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -29,7 +29,7 @@ class SPoint2 {
   void operator+=(const SPoint2 &p);
   void operator-=(const SPoint2 &p);
   void operator*=(double mult);
-  SPoint2 operator*(double mult);
+  SPoint2 operator*(double mult)const;
   operator double *() { return P; }
   bool operator < (const SPoint2  &other) const
   {
@@ -79,7 +79,7 @@ inline void SPoint2::operator-=(const SPoint2 &p)
 inline void SPoint2::operator*=(double mult)
 { P[0] *= mult; P[1] *= mult; }
 
-inline SPoint2 SPoint2::operator*(double mult)
+inline SPoint2 SPoint2::operator*(double mult)const
 { return SPoint2(P[0]*mult, P[1]*mult); }
 
 inline double SPoint2::distance(const SPoint2 &p)const
diff --git a/Geo/SPoint3.h b/Geo/SPoint3.h
index bb1102a..f34d136 100644
--- a/Geo/SPoint3.h
+++ b/Geo/SPoint3.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -44,6 +44,8 @@ class SPoint3 {
     if (P[2] < p.P[2]) return true;
     return false;
   }
+  const double* data() const{return P;}
+  double* data() {return P;}
 };
 
 inline SPoint3 operator + (const SPoint3 &a, const SPoint3 &b)
diff --git a/Geo/STensor3.cpp b/Geo/STensor3.cpp
index fc55716..f61aeb9 100644
--- a/Geo/STensor3.cpp
+++ b/Geo/STensor3.cpp
@@ -1,11 +1,13 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
-// compute the largest inscribed ellipsoid...
+#include <algorithm>
 #include "STensor3.h"
 
+// compute the largest inscribed ellipsoid
+
 void SMetric3::print (const char *s) const
 {
   printf(" metric %s : %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E \n", s,
@@ -38,7 +40,8 @@ SMetric3 intersection (const SMetric3 &m1, const SMetric3 &m2)
 
   // Correction from the PhD thesis of Frederic Alauzet p.16
   // If m2 = alpha*m1, then take the largest metric
-  static const double eps = 1.e-2;                              // Tolerance to detect triple eigenvalue (i.e. proportional metrics)
+  static const double eps = 1.e-2;  // Tolerance to detect triple eigenvalue
+                                    // (i.e. proportional metrics)
   const double max_eig = std::max(S(0), std::max(S(1), S(2)));
   const double min_eig = std::min(S(0), std::min(S(1), S(2)));
   const double range_eig = fabs((max_eig-min_eig)/max_eig);
diff --git a/Geo/STensor3.h b/Geo/STensor3.h
index 220fde1..06b0ea5 100644
--- a/Geo/STensor3.h
+++ b/Geo/STensor3.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -220,6 +220,8 @@ class STensor3 {
   inline double get_m13(){ return _val[2]; }
   inline double get_m23(){ return _val[5]; }
   inline double get_m33(){ return _val[8]; }
+  inline const double* data() const {return _val;}
+  inline double* data() {return _val;}
   void getMat(fullMatrix<double> &mat) const
   {
     for (int i = 0; i < 3; i++){
@@ -279,6 +281,10 @@ class STensor3 {
     return ithis;
   }
 
+  void operator = (const STensor3 &other){
+    for (int i = 0; i < 9; i++) _val[i] = other._val[i];
+  }
+
   STensor3 operator + (const STensor3 &other) const
   {
     STensor3 res(*this);
@@ -350,6 +356,14 @@ class STensor3 {
     }
     return sqrt(sqr);
   }
+  STensor3 dev() const{
+    double p= trace()/3.;
+    STensor3 de(*this);
+    de(0,0) -= p;
+    de(1,1) -= p;
+    de(2,2) -= p;
+    return de;
+  }
 };
 
 // tensor product
diff --git a/Geo/SVector3.h b/Geo/SVector3.h
index 815752d..c423f47 100644
--- a/Geo/SVector3.h
+++ b/Geo/SVector3.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -89,7 +89,8 @@ class SVector3 {
       return 2;
     }
   }
-
+  const double* data() const {return P.data();}
+  double* data() {return P.data();}
 };
 
 inline double dot(const SVector3 &a, const SVector3 &b)
@@ -128,6 +129,9 @@ inline SVector3 operator+(const SVector3 &a,const SVector3 &b)
 inline SVector3 operator-(const SVector3 &a,const SVector3 &b)
 { return SVector3(a[0] - b[0], a[1] - b[1], a[2] - b[2]); }
 
+inline SVector3 operator-(const SVector3 &a)
+{ return SVector3(-a[0], -a[1], -a[2]); }
+
 
 inline void buildOrthoBasis_naive(SVector3 &dir, SVector3 &dir1, SVector3 &dir2)
 {
diff --git a/Geo/boundaryLayersData.cpp b/Geo/boundaryLayersData.cpp
index dc0f707..deb4be0 100644
--- a/Geo/boundaryLayersData.cpp
+++ b/Geo/boundaryLayersData.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -735,25 +735,26 @@ bool buildAdditionalPoints2D(GFace *gf)
       }
     }
   }
-  // DEBUG STUFF
 
+  // DEBUG STUFF
   char name[256];
-  sprintf(name,"points_face_%d.pos",gf->tag());
+  sprintf(name, "points_face_%d.pos", gf->tag());
   FILE *f = Fopen (name,"w");
-  fprintf(f,"View \"\" {\n");
-  for (std::set<MVertex*>::iterator it = _vertices.begin(); it != _vertices.end() ; ++it){
-    MVertex *v = *it;
-    for (int i=0;i<_columns->getNbColumns(v);i++){
-      const BoundaryLayerData &data = _columns->getColumn(v,i);
-      for (unsigned int j = 0; j < data._column.size(); j++){
-	MVertex *blv = data._column[j];
-	fprintf(f,"SP(%g,%g,%g){%d};\n",blv->x(),blv->y(),blv->z(),v->getNum());
+  if(f){
+    fprintf(f,"View \"\" {\n");
+    for (std::set<MVertex*>::iterator it = _vertices.begin(); it != _vertices.end() ; ++it){
+      MVertex *v = *it;
+      for (int i=0;i<_columns->getNbColumns(v);i++){
+        const BoundaryLayerData &data = _columns->getColumn(v,i);
+        for (unsigned int j = 0; j < data._column.size(); j++){
+          MVertex *blv = data._column[j];
+          fprintf(f,"SP(%g,%g,%g){%d};\n",blv->x(),blv->y(),blv->z(),v->getNum());
+        }
       }
     }
+    fprintf(f,"};\n");
+    fclose (f);
   }
-  fprintf(f,"};\n");
-  fclose (f);
-
   // END OF DEBUG STUFF
 
   return 1;
@@ -1328,22 +1329,22 @@ bool buildAdditionalPoints3D(GRegion *gr)
   }
 
   // DEBUG STUFF
-
-  FILE *f = fopen ("POINTS3D.pos","w");
-  fprintf(f,"View \"\" {\n");
-  for (std::set<MVertex*>::iterator it = _vertices.begin(); it != _vertices.end() ; ++it){
-    MVertex *v = *it;
-    for (int i=0;i<_columns->getNbColumns(v);i++){
-      const BoundaryLayerData &data = _columns->getColumn(v,i);
-      for (unsigned int j=0;j<data._column.size();j++){
-	MVertex *blv = data._column[j];
-	fprintf(f,"SP(%g,%g,%g){%d};\n",blv->x(),blv->y(),blv->z(),v->getNum());
+  FILE *f = Fopen("POINTS3D.pos","w");
+  if(f){
+    fprintf(f,"View \"\" {\n");
+    for (std::set<MVertex*>::iterator it = _vertices.begin(); it != _vertices.end() ; ++it){
+      MVertex *v = *it;
+      for (int i=0;i<_columns->getNbColumns(v);i++){
+        const BoundaryLayerData &data = _columns->getColumn(v,i);
+        for (unsigned int j=0;j<data._column.size();j++){
+          MVertex *blv = data._column[j];
+          fprintf(f,"SP(%g,%g,%g){%d};\n",blv->x(),blv->y(),blv->z(),v->getNum());
+        }
       }
     }
+    fprintf(f,"};\n");
+    fclose (f);
   }
-  fprintf(f,"};\n");
-  fclose (f);
-
   // END OF DEBUG STUFF
 
   return true;
diff --git a/Geo/boundaryLayersData.h b/Geo/boundaryLayersData.h
index 160c1e5..fcd1722 100644
--- a/Geo/boundaryLayersData.h
+++ b/Geo/boundaryLayersData.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/closestPoint.cpp b/Geo/closestPoint.cpp
index 2b3816d..373e205 100644
--- a/Geo/closestPoint.cpp
+++ b/Geo/closestPoint.cpp
@@ -1,3 +1,8 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #include "closestPoint.h"
 #include "GEntity.h"
 #include "GEdge.h"
diff --git a/Geo/closestPoint.h b/Geo/closestPoint.h
index b80b6f9..fce9fb6 100644
--- a/Geo/closestPoint.h
+++ b/Geo/closestPoint.h
@@ -1,10 +1,19 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _CLOSEST_POINT_H_
 #define _CLOSEST_POINT_H_
+
 #include "GmshConfig.h"
+
 #if defined(HAVE_ANN)
 #include "ANN/ANN.h"
 #endif
+
 #include "SPoint3.h"
+
 class GEntity;
 class closestPointFinder
 {
diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp
index dd91060..2b74888 100644
--- a/Geo/discreteEdge.cpp
+++ b/Geo/discreteEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteEdge.h b/Geo/discreteEdge.h
index d0abcfe..054eb8b 100644
--- a/Geo/discreteEdge.h
+++ b/Geo/discreteEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index da1dbde..9221f47 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteFace.h b/Geo/discreteFace.h
index a182037..01ecba9 100644
--- a/Geo/discreteFace.h
+++ b/Geo/discreteFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteRegion.cpp b/Geo/discreteRegion.cpp
index f6e2285..082139c 100644
--- a/Geo/discreteRegion.cpp
+++ b/Geo/discreteRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteRegion.h b/Geo/discreteRegion.h
index f73ca49..b27b026 100644
--- a/Geo/discreteRegion.h
+++ b/Geo/discreteRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/discreteVertex.h b/Geo/discreteVertex.h
index e5a2435..a2aa5f8 100644
--- a/Geo/discreteVertex.h
+++ b/Geo/discreteVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/findLinks.cpp b/Geo/findLinks.cpp
index d724282..3203a3b 100644
--- a/Geo/findLinks.cpp
+++ b/Geo/findLinks.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/findLinks.h b/Geo/findLinks.h
index dff9b48..3996146 100644
--- a/Geo/findLinks.h
+++ b/Geo/findLinks.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierEdge.cpp b/Geo/fourierEdge.cpp
index 08b1e47..d621d7d 100644
--- a/Geo/fourierEdge.cpp
+++ b/Geo/fourierEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierEdge.h b/Geo/fourierEdge.h
index 8f4c31e..a240ae9 100644
--- a/Geo/fourierEdge.h
+++ b/Geo/fourierEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierFace.cpp b/Geo/fourierFace.cpp
index 02b4b4c..99418cc 100644
--- a/Geo/fourierFace.cpp
+++ b/Geo/fourierFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierFace.h b/Geo/fourierFace.h
index f01e696..b4cf4d7 100644
--- a/Geo/fourierFace.h
+++ b/Geo/fourierFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierProjectionFace.cpp b/Geo/fourierProjectionFace.cpp
index 48d0479..1be2dc7 100644
--- a/Geo/fourierProjectionFace.cpp
+++ b/Geo/fourierProjectionFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierProjectionFace.h b/Geo/fourierProjectionFace.h
index 7bf8fa1..6b07850 100644
--- a/Geo/fourierProjectionFace.h
+++ b/Geo/fourierProjectionFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/fourierVertex.h b/Geo/fourierVertex.h
index 6b42147..4c77b76 100644
--- a/Geo/fourierVertex.h
+++ b/Geo/fourierVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshEdge.cpp b/Geo/gmshEdge.cpp
index 4d99633..0881787 100644
--- a/Geo/gmshEdge.cpp
+++ b/Geo/gmshEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshEdge.h b/Geo/gmshEdge.h
index c66d33c..16cd8e8 100644
--- a/Geo/gmshEdge.h
+++ b/Geo/gmshEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshEdgeDiscretize.cpp b/Geo/gmshEdgeDiscretize.cpp
index b85e429..f6d1b10 100644
--- a/Geo/gmshEdgeDiscretize.cpp
+++ b/Geo/gmshEdgeDiscretize.cpp
@@ -1,3 +1,8 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #include <cstdio>
 #include <cmath>
 #include <vector>
@@ -7,18 +12,19 @@
 #include "gmshEdge.h"
 #include "Geo.h"
 
-
 class discreteList {
   std::vector<std::pair<SPoint3, double> > _pts;
   std::vector<int> _next;
-  public:
-  int insertPoint(int pos, const SPoint3 &pt, double t) {
+public:
+  int insertPoint(int pos, const SPoint3 &pt, double t)
+  {
     _pts.push_back(std::make_pair(pt, t));
     _next.push_back(_next[pos + 1]);
     _next[pos + 1] = _pts.size() - 1;
     return _pts.size() - 1;
   }
-  void sort(std::vector<SPoint3> &spts, std::vector<double> &ts) {
+  void sort(std::vector<SPoint3> &spts, std::vector<double> &ts)
+  {
     spts.clear();
     spts.reserve(_pts.size());
     ts.clear();
@@ -28,12 +34,15 @@ class discreteList {
       ts.push_back(_pts[p].second);
     }
   }
-  discreteList() {
+  discreteList()
+  {
     _next.push_back(-1);
   }
 };
 
-static void decasteljau(double tol, discreteList &discrete, int pos, const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2, const SPoint3 &p3, double t0, double t3)
+static void decasteljau(double tol, discreteList &discrete, int pos,
+                        const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                        const SPoint3 &p3, double t0, double t3)
 {
   SVector3 d30 = p3 - p0;
   SVector3 d13 = p1 - p3;
@@ -60,7 +69,9 @@ static void decasteljau(double tol, discreteList &discrete, int pos, const SPoin
   decasteljau(tol, discrete, newpos, p0123, p123, p23, p3, t0123, t3);
 }
 
-static int discretizeBezier(double tol, discreteList &discrete, int pos, const SPoint3 pt[4], double t0, double t3, bool insertFirstPoint)
+static int discretizeBezier(double tol, discreteList &discrete, int pos,
+                            const SPoint3 pt[4], double t0, double t3,
+                            bool insertFirstPoint)
 {
   if (insertFirstPoint)
     pos = discrete.insertPoint(pos, pt[0], t0);
@@ -69,7 +80,9 @@ static int discretizeBezier(double tol, discreteList &discrete, int pos, const S
   return newp;
 }
 
-static int discretizeBSpline(double tol, discreteList &discrete, int pos, const SPoint3 pt[4], double t0, double t3, bool insertFirstPoint)
+static int discretizeBSpline(double tol, discreteList &discrete, int pos,
+                             const SPoint3 pt[4], double t0, double t3,
+                             bool insertFirstPoint)
 {
   SPoint3 bpt[4] = {
     SPoint3((pt[0] + 4 * pt[1]  + pt[2]) * (1./6.)),
@@ -80,7 +93,9 @@ static int discretizeBSpline(double tol, discreteList &discrete, int pos, const
   return discretizeBezier(tol, discrete, pos, bpt, t0, t3, insertFirstPoint);
 }
 
-static int discretizeCatmullRom(double tol, discreteList &discrete, int pos, const SPoint3 pt[4], double t0, double t3, bool insertFirstPoint)
+static int discretizeCatmullRom(double tol, discreteList &discrete, int pos,
+                                const SPoint3 pt[4], double t0, double t3,
+                                bool insertFirstPoint)
 {
   SPoint3 bpt[4] = {
     pt[1],
@@ -98,99 +113,101 @@ static inline SPoint3 curveGetPoint(Curve *c, int i)
   return SPoint3(v->Pos.X, v->Pos.Y, v->Pos.Z);
 }
 
-static void discretizeCurve(Curve *c, double tol, std::vector<SPoint3> &pts, std::vector<double> &ts)
+static void discretizeCurve(Curve *c, double tol, std::vector<SPoint3> &pts,
+                            std::vector<double> &ts)
 {
   discreteList discrete;
   switch(c->Typ) {
-    case MSH_SEGM_LINE :
-      {
-        int NPt = List_Nbr(c->Control_Points);
-        pts.resize(NPt);
-        ts.resize(NPt);
-        for (int i = 0; i < NPt; ++i) {
-          pts[i]= curveGetPoint(c, i);
-          ts[i] = i / (double) (NPt - 1);
-        }
-        return;
+  case MSH_SEGM_LINE :
+    {
+      int NPt = List_Nbr(c->Control_Points);
+      pts.resize(NPt);
+      ts.resize(NPt);
+      for (int i = 0; i < NPt; ++i) {
+        pts[i]= curveGetPoint(c, i);
+        ts[i] = i / (double) (NPt - 1);
       }
-    case MSH_SEGM_BEZIER :
-      {
-        int back = -1;
-        int NbCurves = (List_Nbr(c->Control_Points) - 1) / 3;
-        for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
-          double t1 = (iCurve) / (double)(NbCurves);
-          double t2 = (iCurve+1) / (double)(NbCurves);
-          SPoint3 pt[4];
-          for(int i = 0; i < 4; i++) {
-            pt[i] = curveGetPoint(c, iCurve * 3 + i);
-          }
-          back = discretizeBezier(tol, discrete, back, pt, t1, t2, iCurve == 0);
+      return;
+    }
+  case MSH_SEGM_BEZIER :
+    {
+      int back = -1;
+      int NbCurves = (List_Nbr(c->Control_Points) - 1) / 3;
+      for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
+        double t1 = (iCurve) / (double)(NbCurves);
+        double t2 = (iCurve+1) / (double)(NbCurves);
+        SPoint3 pt[4];
+        for(int i = 0; i < 4; i++) {
+          pt[i] = curveGetPoint(c, iCurve * 3 + i);
         }
-        break;
+        back = discretizeBezier(tol, discrete, back, pt, t1, t2, iCurve == 0);
       }
-    case MSH_SEGM_BSPLN:
-      {
-        int back = -1;
-        bool periodic = (c->end == c->beg);
-        int NbControlPoints = List_Nbr(c->Control_Points);
-        int NbCurves = NbControlPoints + (periodic ? -1 : 1);
-        SPoint3 pt[4];
-        for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
-          double t1 = (iCurve) / (double)(NbCurves);
-          double t2 = (iCurve+1) / (double)(NbCurves);
-          for(int i = 0; i < 4; i++) {
-            int k;
-            if (periodic) {
-              k = (iCurve - 1 + i) % (NbControlPoints - 1);
-              if (k < 0)
-                k += NbControlPoints - 1;
-            }
-            else {
-              k = std::max(0, std::min(iCurve - 2 + i, NbControlPoints -1));
-            }
-            pt[i] = curveGetPoint(c, k);
+      break;
+    }
+  case MSH_SEGM_BSPLN:
+    {
+      int back = -1;
+      bool periodic = (c->end == c->beg);
+      int NbControlPoints = List_Nbr(c->Control_Points);
+      int NbCurves = NbControlPoints + (periodic ? -1 : 1);
+      SPoint3 pt[4];
+      for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
+        double t1 = (iCurve) / (double)(NbCurves);
+        double t2 = (iCurve+1) / (double)(NbCurves);
+        for(int i = 0; i < 4; i++) {
+          int k;
+          if (periodic) {
+            k = (iCurve - 1 + i) % (NbControlPoints - 1);
+            if (k < 0)
+              k += NbControlPoints - 1;
           }
-          back = discretizeBSpline(tol, discrete, back, pt, t1, t2, iCurve == 0);
+          else {
+            k = std::max(0, std::min(iCurve - 2 + i, NbControlPoints -1));
+          }
+          pt[i] = curveGetPoint(c, k);
         }
-        break;
+        back = discretizeBSpline(tol, discrete, back, pt, t1, t2, iCurve == 0);
       }
-    case MSH_SEGM_SPLN:
-      {
-        int NbCurves = List_Nbr(c->Control_Points) - 1;
-        SPoint3 pt[4];
-        int back = -1;
-        for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
-          double t1 = (iCurve) / (double)(NbCurves);
-          double t2 = (iCurve+1) / (double)(NbCurves);
-          pt[1] = curveGetPoint(c, iCurve);
-          pt[2] = curveGetPoint(c, iCurve + 1);
-          if(iCurve == 0) {
-            if(c->beg == c->end)
-              pt[0] = curveGetPoint(c, NbCurves - 1);
-            else
-              pt[0] = SPoint3(pt[1] * 2 - pt[2]);
-          }
+      break;
+    }
+  case MSH_SEGM_SPLN:
+    {
+      int NbCurves = List_Nbr(c->Control_Points) - 1;
+      SPoint3 pt[4];
+      int back = -1;
+      for (int iCurve = 0; iCurve < NbCurves; ++iCurve) {
+        double t1 = (iCurve) / (double)(NbCurves);
+        double t2 = (iCurve+1) / (double)(NbCurves);
+        pt[1] = curveGetPoint(c, iCurve);
+        pt[2] = curveGetPoint(c, iCurve + 1);
+        if(iCurve == 0) {
+          if(c->beg == c->end)
+            pt[0] = curveGetPoint(c, NbCurves - 1);
           else
-            pt[0] = curveGetPoint(c, iCurve - 1);
-          if(iCurve == NbCurves - 1) {
-            if(c->beg == c->end)
-              pt[3] = curveGetPoint(c, 1);
-            else
-              pt[3] = SPoint3(2 * pt[2] - pt[1]);
-          }
+            pt[0] = SPoint3(pt[1] * 2 - pt[2]);
+        }
+        else
+          pt[0] = curveGetPoint(c, iCurve - 1);
+        if(iCurve == NbCurves - 1) {
+          if(c->beg == c->end)
+            pt[3] = curveGetPoint(c, 1);
           else
-            pt[3] = curveGetPoint(c, iCurve + 2);
-          back = discretizeCatmullRom(tol, discrete, back, pt, t1, t2, iCurve == 0);
+            pt[3] = SPoint3(2 * pt[2] - pt[1]);
         }
-        break;
+        else
+          pt[3] = curveGetPoint(c, iCurve + 2);
+        back = discretizeCatmullRom(tol, discrete, back, pt, t1, t2, iCurve == 0);
       }
-    default :
-      Msg::Fatal("not implemented");
+      break;
+    }
+  default :
+    Msg::Fatal("not implemented");
   }
   discrete.sort(pts, ts);
 }
 
-void gmshEdge::discretize(double tol, std::vector<SPoint3> &dpts, std::vector<double> &ts)
+void gmshEdge::discretize(double tol, std::vector<SPoint3>
+                          &dpts, std::vector<double> &ts)
 {
   discretizeCurve(c, tol, dpts, ts);
 }
diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp
index 39fa658..a4002f1 100644
--- a/Geo/gmshFace.cpp
+++ b/Geo/gmshFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -26,6 +26,7 @@ gmshFace::gmshFace(GModel *m, Surface *face)
   resetMeshAttributes();
 
   edgeCounterparts = s->edgeCounterparts;
+  affineTransform = s->affineTransform;
 
   std::vector<GEdge*> eds;
   std::vector<int> nums;
diff --git a/Geo/gmshFace.h b/Geo/gmshFace.h
index 733025f..b90feb9 100644
--- a/Geo/gmshFace.h
+++ b/Geo/gmshFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshLevelset.cpp b/Geo/gmshLevelset.cpp
index 96599d5..76864c3 100644
--- a/Geo/gmshLevelset.cpp
+++ b/Geo/gmshLevelset.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -27,13 +27,13 @@ void insertActiveCells(double x, double y, double z, double rmax,
 {
   int id1 = box.getCellContainingPoint(x - rmax, y - rmax, z - rmax);
   int id2 = box.getCellContainingPoint(x + rmax, y + rmax, z + rmax);
-  int i1, j1 ,k1;
+  int i1, j1, k1;
   box.getCellIJK(id1, i1, j1, k1);
   int i2, j2, k2;
   box.getCellIJK(id2, i2, j2, k2);
-  for (int i = i1; i <= i2; i++)
-    for (int j = j1; j <= j2; j++)
-      for (int k = k1; k <= k2; k++)
+  for(int i = i1; i <= i2; i++)
+    for(int j = j1; j <= j2; j++)
+      for(int k = k1; k <= k2; k++)
         box.insertActiveCell(box.getCellIndex(i, j, k));
 }
 
@@ -116,15 +116,15 @@ void computeLevelset(GModel *gm, cartesianBox<double> &box)
 {
   std::vector<SPoint3> nodes;
   std::vector<int> indices;
-  for (cartesianBox<double>::valIter it = box.nodalValuesBegin();
-       it != box.nodalValuesEnd(); ++it){
+  for(cartesianBox<double>::valIter it = box.nodalValuesBegin();
+      it != box.nodalValuesEnd(); ++it){
     nodes.push_back(box.getNodeCoordinates(it->first));
     indices.push_back(it->first);
   }
   //Msg::Info("  %d nodes in the grid at level %d", (int)nodes.size(), box.getLevel());
   std::vector<double> dist, localdist;
   std::vector<SPoint3> dummy;
-  for (GModel::fiter fit = gm->firstFace(); fit != gm->lastFace(); fit++){
+  for(GModel::fiter fit = gm->firstFace(); fit != gm->lastFace(); fit++){
     if((*fit)->geomType() == GEntity::DiscreteSurface){
       for(unsigned int k = 0; k < (*fit)->getNumMeshElements(); k++){
         std::vector<double> iDistances;
@@ -144,7 +144,7 @@ void computeLevelset(GModel *gm, cartesianBox<double> &box)
         if(dist.empty())
           dist = localdist;
         else{
-          for (unsigned int j = 0; j < localdist.size(); j++){
+          for(unsigned int j = 0; j < localdist.size(); j++){
             dist[j] = (fabs(dist[j]) < fabs(localdist[j])) ? dist[j] : localdist[j];
           }
         }
@@ -158,7 +158,7 @@ void computeLevelset(GModel *gm, cartesianBox<double> &box)
     }
   }
 
-  for (unsigned int j = 0; j < dist.size(); j++)
+  for(unsigned int j = 0; j < dist.size(); j++)
     box.setNodalValue(indices[j], dist[j]);
 
   if(box.getChildBox()) computeLevelset(gm, *box.getChildBox());
@@ -203,16 +203,16 @@ inline double evalRadialFnDer(int p, int index, double dx, double dy, double dz,
                               double ep)
 {
   double r2 = dx*dx+dy*dy+dz*dz; //r^2
-  switch (index) {
+  switch(index) {
   case 0 : // GA
-    switch (p) {
+    switch(p) {
     case 0: return exp(-ep*ep*r2);
     case 1: return -2*ep*ep*dx*exp(-ep*ep*r2); // _x
     case 2: return -2*ep*ep*dy*exp(-ep*ep*r2); // _y
     case 3: return -2*ep*ep*dz*exp(-ep*ep*r2); // _z
     }
   case 1 : //MQ
-    switch (p) {
+    switch(p) {
     case 0: return sqrt(1+ep*ep*r2);
     case 1: return ep*ep*dx/sqrt(1+ep*ep*r2);
     case 2: return ep*ep*dy/sqrt(1+ep*ep*r2);
@@ -225,13 +225,15 @@ inline double evalRadialFnDer(int p, int index, double dx, double dy, double dz,
 inline void printNodes(fullMatrix<double> &myNodes, fullMatrix<double> &surf)
 {
   FILE * xyz = Fopen("myNodes.pos","w");
-  fprintf(xyz,"View \"\"{\n");
-  for(int itv = 1; itv != myNodes.size1(); ++itv){
-    fprintf(xyz,"SP(%g,%g,%g){%g};\n", myNodes(itv,0), myNodes(itv,1),
-            myNodes(itv,2), surf(itv,0));
+  if(xyz){
+    fprintf(xyz,"View \"\"{\n");
+    for(int itv = 1; itv != myNodes.size1(); ++itv){
+      fprintf(xyz,"SP(%g,%g,%g){%g};\n", myNodes(itv,0), myNodes(itv,1),
+              myNodes(itv,2), surf(itv,0));
+    }
+    fprintf(xyz,"};\n");
+    fclose(xyz);
   }
-  fprintf(xyz,"};\n");
-  fclose(xyz);
 }
 
 // extrude a list of the primitive levelsets with a "Level-order traversal sequence"
@@ -396,16 +398,16 @@ gLevelsetPlane::gLevelsetPlane(const gLevelsetPlane &lv)
 
 // level set defined by points (RBF interpolation)
 fullMatrix<double> gLevelsetPoints::generateRbfMat(int p, int index,
-						   const fullMatrix<double> &nodes1,
-						   const fullMatrix<double> &nodes2) const
+                                                   const fullMatrix<double> &nodes1,
+                                                   const fullMatrix<double> &nodes2) const
 {
   int m = nodes2.size1();
   int n = nodes1.size1();
   fullMatrix<double> rbfMat(m,n);
 
   double eps =0.5/delta;
-  for (int i = 0; i < m; i++) {
-    for (int j = 0; j < n; j++) {
+  for(int i = 0; i < m; i++) {
+    for(int j = 0; j < n; j++) {
       double dx = nodes2(i,0)-nodes1(j,0);
       double dy = nodes2(i,1)-nodes1(j,1);
       double dz = nodes2(i,2)-nodes1(j,2);
@@ -417,15 +419,15 @@ fullMatrix<double> gLevelsetPoints::generateRbfMat(int p, int index,
 }
 
 void gLevelsetPoints::RbfOp(int p, int index,
-			    const fullMatrix<double> &cntrs,
-			    const fullMatrix<double> &nodes,
-			    fullMatrix<double> &D,
-			    bool isLocal) const
+                            const fullMatrix<double> &cntrs,
+                            const fullMatrix<double> &nodes,
+                            fullMatrix<double> &D,
+                            bool isLocal) const
 {
   fullMatrix<double> rbfMatB = generateRbfMat(p,index, cntrs,nodes);
 
   fullMatrix<double> rbfInvA;
-  if (isLocal){
+  if(isLocal){
     rbfInvA = generateRbfMat(0,index, cntrs,cntrs);
     rbfInvA.invertInPlace();
   }
@@ -450,8 +452,8 @@ void gLevelsetPoints::evalRbfDer(int p, int index,
 }
 
 void gLevelsetPoints::setup_level_set(const fullMatrix<double> &cntrs,
-				      fullMatrix<double> &level_set_nodes,
-				      fullMatrix<double> &level_set_funvals)
+                                      fullMatrix<double> &level_set_nodes,
+                                      fullMatrix<double> &level_set_funvals)
 {
   int numNodes = cntrs.size1();
   int nTot = 3*numNodes;
@@ -464,17 +466,17 @@ void gLevelsetPoints::setup_level_set(const fullMatrix<double> &cntrs,
   // Computes the normal vectors to the surface at each node
   double dist_min = 1.e6;
   double dist_max = 1.e-6;
-  for (int i = 0; i < numNodes; ++i){
+  for(int i = 0; i < numNodes; ++i){
     ONES(i,0)=1.0;
     cntrsPlus(i,0) = cntrs(i,0);
     cntrsPlus(i,1) = cntrs(i,1);
     cntrsPlus(i,2) = cntrs(i,2);
     for(int j = i+1; j < numNodes; j++){
       double dist = sqrt((cntrs(i,0)-cntrs(j,0))*(cntrs(i,0)-cntrs(j,0))+
-    			 (cntrs(i,1)-cntrs(j,1))*(cntrs(i,1)-cntrs(j,1))+
-			 (cntrs(i,2)-cntrs(j,2))*(cntrs(i,2)-cntrs(j,2)));
-      if (dist<dist_min) dist_min = dist;
-      if (dist>dist_max) dist_max = dist;
+                         (cntrs(i,1)-cntrs(j,1))*(cntrs(i,1)-cntrs(j,1))+
+                         (cntrs(i,2)-cntrs(j,2))*(cntrs(i,2)-cntrs(j,2)));
+      if(dist<dist_min) dist_min = dist;
+      if(dist>dist_max) dist_max = dist;
     }
   }
   ONES(numNodes,0) = -1.0;
@@ -486,7 +488,7 @@ void gLevelsetPoints::setup_level_set(const fullMatrix<double> &cntrs,
   evalRbfDer(1, 1, cntrsPlus,cntrs,ONES,sx, true);
   evalRbfDer(2, 1, cntrsPlus,cntrs,ONES,sy, true);
   evalRbfDer(3, 1, cntrsPlus,cntrs,ONES,sz, true);
-  for (int i = 0; i < numNodes; ++i){
+  for(int i = 0; i < numNodes; ++i){
     normFactor = sqrt(sx(i,0)*sx(i,0)+sy(i,0)*sy(i,0)+sz(i,0)*sz(i,0));
     sx(i,0) = sx(i,0)/normFactor;
     sy(i,0) = sy(i,0)/normFactor;
@@ -494,8 +496,8 @@ void gLevelsetPoints::setup_level_set(const fullMatrix<double> &cntrs,
     norms(i,0) = sx(i,0);norms(i,1) = sy(i,0);norms(i,2) = sz(i,0);
   }
 
-  for (int i = 0; i < numNodes; ++i){
-    for (int j = 0; j < 3; ++j){
+  for(int i = 0; i < numNodes; ++i){
+    for(int j = 0; j < 3; ++j){
       level_set_nodes(i,j) = cntrs(i,j);
       level_set_nodes(i+numNodes,j) = cntrs(i,j)-delta*norms(i,j);
       level_set_nodes(i+2*numNodes,j) = cntrs(i,j)+delta*norms(i,j);
@@ -530,7 +532,7 @@ gLevelsetPoints::gLevelsetPoints(const gLevelsetPoints &lv)
 double gLevelsetPoints::operator()(double x, double y, double z) const
 {
   if(mapP.empty())
-    Msg::Info("Levelset Points: call computeLS() before calling operator()");
+    Msg::Info("Levelset Points : call computeLS() before calling operator()\n");
 
   SPoint3 sp(x,y,z);
   std::map<SPoint3,double>::const_iterator it = mapP.find(sp);
@@ -549,13 +551,13 @@ double gLevelsetPoints::operator()(double x, double y, double z) const
 void gLevelsetPoints::computeLS(std::vector<MVertex*> &vert)
 {
   fullMatrix<double> xyz_eval(vert.size(), 3), surf_eval(vert.size(), 1);
-  for (unsigned int i = 0; i < vert.size(); i++){
+  for(unsigned int i = 0; i < vert.size(); i++){
     xyz_eval(i,0) = vert[i]->x();
     xyz_eval(i,1) = vert[i]->y();
     xyz_eval(i,2) = vert[i]->z();
   }
   evalRbfDer(0, 1, points, xyz_eval, surf, surf_eval);
-  for (unsigned int i = 0; i < vert.size(); i++){
+  for(unsigned int i = 0; i < vert.size(); i++){
     mapP[SPoint3(vert[i]->x(), vert[i]->y(),vert[i]->z())] = surf_eval(i,0);
   }
 }
@@ -718,7 +720,7 @@ gLevelsetShamrock::gLevelsetShamrock(double _xmid, double _ymid, double _zmid,
   // creating the iso-zero
   double angle = 0.;
   double r;
-  while (angle<=2.*M_PI){
+  while(angle<=2.*M_PI){
     r = a+b*sin(c*angle);
     iso_x.push_back(r*sin(angle)+xmid);
     iso_y.push_back(r*cos(angle)+xmid);
@@ -739,13 +741,13 @@ double gLevelsetShamrock::operator()(double x, double y, double z) const
   std::vector<double>::const_iterator itminx = iso_x.begin();
   std::vector<double>::const_iterator itminy = iso_y.begin();
   itx++;ity++;
-  for (;itx!=itxen;itx++,ity++){
+  for(;itx!=itxen;itx++,ity++){
     xi = *itx;
     yi = *ity;
     dx = x-xi;
     dy = y-yi;
     d = sqrt(dx*dx+dy*dy);
-    if (distance>d){
+    if(distance>d){
       distance = d;
       itminx = itx;
       itminy = ity;
@@ -756,7 +758,7 @@ double gLevelsetShamrock::operator()(double x, double y, double z) const
   SVector3 t,p;
   p(0) = (*itminx) - x;
   p(1) = (*itminy) - y;
-  if (itminx==(itxen-1)){
+  if(itminx==(itxen-1)){
     t(0) = iso_x[0] - (*itminx);
     t(1) = iso_y[0] - (*itminy);
   }
@@ -767,7 +769,7 @@ double gLevelsetShamrock::operator()(double x, double y, double z) const
   double vectprod = (p(0)*t(1) - p(1)*t(0));
   double sign = (vectprod < 0.) ? -1. : 1.;
 
-  return (sign*distance);
+  return sign * distance;
 }
 
 gLevelsetPopcorn::gLevelsetPopcorn(double _xc, double _yc, double _zc, double _r0,
@@ -782,19 +784,19 @@ gLevelsetPopcorn::gLevelsetPopcorn(double _xc, double _yc, double _zc, double _r
   zc = _zc;
 }
 
-double gLevelsetPopcorn::operator() (double x, double y, double z) const
+double gLevelsetPopcorn::operator()(double x, double y, double z) const
 {
-  double s2 = (sigma)*(sigma);
+  double s2 = sigma * sigma;
   double r = sqrt((x-xc)*(x-xc)+(y-yc)*(y-yc)+(z-zc)*(z-zc));
   //printf("z=%g zc=%g r=%g \n", z, zc, r);
   double  val = r - r0;
-  for (int k = 0; k< 5; k++){
+  for(int k = 0; k< 5; k++){
     double xk = r0/sqrt(5.0)*(2.*cos(2*k*M_PI/5.0));
     double yk = r0/sqrt(5.0)*(2.*sin(2*k*M_PI/5.0));
     double zk = r0/sqrt(5.0);
     val -=  A*exp(-((x-xc-xk)*(x-xc-xk)+(y-yc-yk)*(y-yc-yk)+(z-zc-zk)*(z-zc-zk))/s2);
   }
-  for (int k = 5; k< 10; k++){
+  for(int k = 5; k< 10; k++){
     double xk = r0/sqrt(5.0)*(2.*cos((2.*(k-5.)-1.)*M_PI/5.0));
     double yk = r0/sqrt(5.0)*(2.*sin((2.*(k-5.)-1.)*M_PI/5.0));
     double zk = -r0/sqrt(5.0);
@@ -816,7 +818,7 @@ gLevelsetMathEval::gLevelsetMathEval(std::string f, int tag)
   _expr = new mathEvaluator(expressions, variables);
 }
 
-double gLevelsetMathEval::operator() (double x, double y, double z) const
+double gLevelsetMathEval::operator()(double x, double y, double z) const
 {
   std::vector<double> values(3), res(1);
   values[0] = x;
@@ -838,7 +840,7 @@ gLevelsetMathEvalAll::gLevelsetMathEvalAll(std::vector<std::string> expressions,
   _expr = new mathEvaluator(expressions, variables);
 }
 
-double gLevelsetMathEvalAll::operator() (double x, double y, double z) const
+double gLevelsetMathEvalAll::operator()(double x, double y, double z) const
 {
   std::vector<double> values(3), res(13);
   values[0] = x;
@@ -891,26 +893,26 @@ gLevelsetDistMesh::gLevelsetDistMesh(GModel *gm, std::string physical, int nbClo
 {
   std::map<int, std::vector<GEntity*> > groups [4];
   gm->getPhysicalGroups(groups);
-  for (GModel::piter it = gm->firstPhysicalName() ;
+  for(GModel::piter it = gm->firstPhysicalName();
        it != gm->lastPhysicalName() ; ++it){
-    if (it->second == physical){
+    if(it->second == physical){
       _entities = groups[it->first.first][it->first.second];
     }
   }
-  if (_entities.size() == 0){
+  if(_entities.size() == 0){
     Msg::Error("distanceToMesh: the physical name '%s' does not exist in the GModel",
                physical.c_str());
   }
 
   //setup
   std::set<MVertex *> _all;
-  for (unsigned int i=0;i<_entities.size();i++){
-    for (unsigned int k = 0; k < _entities[i]->getNumMeshElements(); k++) {
+  for(unsigned int i = 0; i < _entities.size(); i++){
+    for(unsigned int k = 0; k < _entities[i]->getNumMeshElements(); k++) {
       MElement *e = _entities[i]->getMeshElement(k);
-      for (int j = 0; j<  e->getNumVertices();j++){
-	MVertex *v = _entities[i]->getMeshElement(k)->getVertex(j);
-	_all.insert(v);
-	_v2e.insert (std::make_pair(v,e));
+      for(int j = 0; j<  e->getNumVertices();j++){
+        MVertex *v = _entities[i]->getMeshElement(k)->getVertex(j);
+        _all.insert(v);
+        _v2e.insert(std::make_pair(v, e));
       }
     }
   }
@@ -918,7 +920,7 @@ gLevelsetDistMesh::gLevelsetDistMesh(GModel *gm, std::string physical, int nbClo
   nodes = annAllocPts(_all.size(), 3);
   std::set<MVertex*>::iterator itp = _all.begin();
   int ind = 0;
-  while (itp != _all.end()){
+  while(itp != _all.end()){
     MVertex* pt = *itp;
     nodes[ind][0] = pt->x();
     nodes[ind][1] = pt->y();
@@ -931,55 +933,101 @@ gLevelsetDistMesh::gLevelsetDistMesh(GModel *gm, std::string physical, int nbClo
 
 gLevelsetDistMesh::~gLevelsetDistMesh()
 {
-  if (_kdtree) {
+  if(_kdtree) {
     ANNpointArray nodes = _kdtree->thePoints();
     annDeallocPts(nodes);
-   delete _kdtree;
+    delete _kdtree;
   }
-
 }
 
-double gLevelsetDistMesh::operator () (double x, double y, double z) const
+double gLevelsetDistMesh::operator()(double x, double y, double z) const
 {
-  std::vector<ANNidx> _index(_nbClose);
-  std::vector<ANNdist> _dist(_nbClose);
-  double point[3] = {x,y,z};
-  _kdtree->annkSearch(point, _nbClose, &_index[0], &_dist[0]);
+  std::vector<ANNidx> index(_nbClose);
+  std::vector<ANNdist> dist(_nbClose);
+  double point[3] = {x, y, z};
+  SPoint3 pt(x, y, z);
+  _kdtree->annkSearch(point, _nbClose, &index[0], &dist[0]); // squared distances
   std::set<MElement*> elements;
-  for (int i=0;i<_nbClose;i++){
-    int iVertex = _index[i];
+  for(int i = 0; i < _nbClose; i++){
+    int iVertex = index[i];
     MVertex *v = _vertices[iVertex];
-    for (std::multimap<MVertex*,MElement*>::const_iterator itm =
-           _v2e.lower_bound(v); itm != _v2e.upper_bound(v); ++itm)
-      elements.insert (itm->second);
+    for(std::multimap<MVertex*,MElement*>::const_iterator itm =
+         _v2e.lower_bound(v); itm != _v2e.upper_bound(v); ++itm)
+      elements.insert(itm->second);
   }
   double minDistance = 1.e22;
-  SPoint3 closest;
-  for (std::set<MElement*>::iterator it = elements.begin();
-       it != elements.end();++it){
+  SPoint3 closestPoint;
+  std::vector<MElement*> closestElements;
+  for(std::set<MElement*>::iterator it = elements.begin();
+       it != elements.end(); ++it){
     double distance = 0.;
     MVertex *v1 = (*it)->getVertex(0);
     MVertex *v2 = (*it)->getVertex(1);
     SPoint3 p1(v1->x(), v1->y(), v1->z());
     SPoint3 p2(v2->x(), v2->y(), v2->z());
-    SPoint3 pt;
-    if ((*it)->getDim() == 1){
-      signedDistancePointLine(p1, p2,SPoint3(x,y,z),distance,pt);
+    SPoint3 closePt;
+    if((*it)->getDim() == 1){
+      signedDistancePointLine(p1, p2, pt, distance, closePt); // !! > 0
     }
-    else if ((*it)->getDim() == 2){
+    else if((*it)->getDim() == 2){
       MVertex *v3 = (*it)->getVertex(2);
       SPoint3 p3(v3->x(), v3->y(), v3->z());
-      signedDistancePointTriangle(p1, p2, p3,SPoint3(x,y,z),distance,pt);
+      if(p1 == p2 || p1 == p3 || p2 == p3) distance = 1.e22;
+      else signedDistancePointTriangle(p1, p2, p3, pt, distance, closePt);
     }
     else{
-      Msg::Error("Cannot compute a dsitance to an entity of dimension %d",
+      Msg::Error("Cannot compute a distance to an entity of dimension %d\n",
                  (*it)->getDim());
     }
-    if (fabs(distance) < fabs(minDistance)){
-      minDistance=distance;
+    if ((*it)->getDim() == 2) {
+      if(fabs(distance) == fabs(minDistance)){
+        closestElements.push_back(*it);
+      }
+      if(fabs(distance) < fabs(minDistance)){
+        closestPoint = closePt;
+        minDistance = distance;
+        closestElements.clear();
+        closestElements.push_back(*it);
+      }
     }
   }
-  return -1.0*minDistance;
+  if(closestElements.size() > 1){
+    SVector3 vd(closestPoint, pt);
+    SVector3 meanNorm(0., 0., 0.); // angle weighted mean normal
+    if(closestElements.size() == 2){ // closestPoint on edge
+      meanNorm = closestElements[0]->getFace(0).normal() + closestElements[1]->getFace(0).normal();
+    }
+    else{ // closestPoint on vertex
+      for(unsigned int i = 0; i < closestElements.size(); i++){
+        double alpha = 0.;
+        SPoint3 p1; bool found = false;
+        for(int j = 0; j < closestElements[i]->getNumEdges(); j++){
+          SPoint3 ep0 = closestElements[i]->getEdge(j).getVertex(0)->point();
+          SPoint3 ep1 = closestElements[i]->getEdge(j).getVertex(1)->point();
+          if(closestPoint == ep0){
+            if(!found) {p1 = ep1; found = true;}
+            else {
+              alpha = angle (SVector3(closestPoint, p1), SVector3(closestPoint, ep1));
+              break;
+            }
+          }
+          if(closestPoint == ep1){
+            if(!found) {p1 = ep0; found = true;}
+            else {
+              alpha = angle (SVector3(closestPoint, p1), SVector3(closestPoint, ep0));
+              break;
+            }
+          }
+        }
+        meanNorm = meanNorm + alpha * closestElements[i]->getFace(0).normal();
+      }
+    }
+    double dotDN = dot(vd, closestElements[0]->getFace(0).normal());
+    double dotDE = dot(vd, meanNorm);
+    if(dotDN * dotDE < 0.) minDistance *= -1.;
+  }
+
+  return -1.0 * minDistance;
 }
 #endif
 
@@ -997,7 +1045,7 @@ gLevelsetPostView::gLevelsetPostView(int index, int tag)
   }
 }
 
-double gLevelsetPostView::operator () (double x, double y, double z) const
+double gLevelsetPostView::operator()(double x, double y, double z) const
 {
   if(!_octree) return 1.;
   double val = 1.;
@@ -1019,7 +1067,7 @@ gLevelsetGenCylinder::gLevelsetGenCylinder(const double *pt, const double *dir,
   translate(pt);
 }
 
-gLevelsetGenCylinder::gLevelsetGenCylinder (const gLevelsetGenCylinder& lv)
+gLevelsetGenCylinder::gLevelsetGenCylinder(const gLevelsetGenCylinder& lv)
   : gLevelsetQuadric(lv){}
 
 gLevelsetEllipsoid::gLevelsetEllipsoid(const double *pt, const double *dir,
@@ -1085,6 +1133,42 @@ gLevelsetTools::gLevelsetTools(const gLevelsetTools &lv) : gLevelset(lv)
     children[i] = _children[i]->clone();
 }
 
+gLevelsetYarn::gLevelsetYarn(int dim, int phys, double minA, double majA, int type, int tag)
+  : gLevelsetPrimitive(tag) //, minorAxis(minA), majorAxis(majA), typeLs(type)
+{
+  std::map<int, std::vector<GEntity*> > groups;
+  GModel::current()->getPhysicalGroups(dim, groups);
+  entities = groups[phys];
+  if(!entities.size())
+    printf("No physical %d found for levelset yarn!\n", phys);
+}
+
+double gLevelsetYarn::operator()(double x, double y, double z) const
+{
+  double dist = 0.0;
+  for(unsigned int i = 0; i < entities.size(); i++){
+    GEntity *g = entities[i];
+    for(unsigned int j = 0; j < g->getNumMeshElements(); j++){
+      MElement *e = g->getMeshElement(j);
+      MVertex *v1 = e->getVertex(0);
+      MVertex *v2 = e->getVertex(1);
+      SPoint3 p1(v1->x(), v1->y(), v1->z());
+      SPoint3 p2(v2->x(), v2->y(), v2->z());
+      /*if(e->getType() == TYPE_LIN){
+        signedDistancesPointsEllipseLine(iDistances, iDistancesE, iIsInYarn, iClosePts,
+                                         pts, p1, p2, majorAxis, minorAxis,
+                                         majorAxis, minorAxis, typeLs);
+      }
+      else if(e->getType() == TYPE_TRI){
+        MVertex *v3 = e->getVertex(2);
+        SPoint3 p3(v3->x(),v3->y(),v3->z());
+        signedDistancesPointsTriangle(iDistances, iClosePts, pts, p1, p2, p3);
+      }*/
+    }
+  }
+  return dist;
+}
+
 gLevelsetImproved::gLevelsetImproved(const gLevelsetImproved &lv)
   : gLevelset(lv)
 {
@@ -1248,7 +1332,6 @@ void gLevelsetNACA00::getClosestBndPoint(double x, double y, double z,
                                          double &xb, double &yb, double &curvRad,
                                          bool &in) const
 {
-
   static const int maxIter = 100;
   static const double tol = 1.e-10;
 
@@ -1258,7 +1341,7 @@ void gLevelsetNACA00::getClosestBndPoint(double x, double y, double z,
   // Point translated according to airfoil origin and symmetry
   const double xt = x-_x0, yt = fabs(y-_y0);
 
-  if (xt-_c > 1.21125*_t*yt) {
+  if(xt-_c > 1.21125*_t*yt) {
     // Behind line normal to airfoil at trailing edge, closest boundary point is
     // trailing edge...
     xb = _x0+_c;
@@ -1269,7 +1352,7 @@ void gLevelsetNACA00::getClosestBndPoint(double x, double y, double z,
     const double fact = 5.*_t*_c;
     double xtb = std::max(xt,tolr), ytb;
     double dyb, ddyb;
-    for (int it=0; it<maxIter; it++) {
+    for(int it=0; it<maxIter; it++) {
       const double xbr = xtb/_c, sxbr = sqrt(xbr), xbr32 = xbr*sxbr,
         xbr2 = xbr*xbr, xbr3 = xbr2*xbr, xbr4 = xbr2*xbr2;
       ytb = fact*(0.2969*sxbr-0.1260*xbr-0.3516*xbr2+0.2843*xbr3-0.1036*xbr4);
@@ -1280,9 +1363,9 @@ void gLevelsetNACA00::getClosestBndPoint(double x, double y, double z,
       const double dDistSq = -2.*(xx+dyb*yy);
       const double ddDistSq = 2.*(1.-ddyb*yy+dyb*dyb);
       const double mIncr = dDistSq/ddDistSq;
-      if (fabs(mIncr) < tolr) break;
+      if(fabs(mIncr) < tolr) break;
       else xtb -= mIncr;
-      if (xtb < tolr) xtb = tolr;
+      if(xtb < tolr) xtb = tolr;
       if (xtb > _c-tolr) xtb = _c-tolr;
     }
     xb = _x0+xtb;
@@ -1292,7 +1375,7 @@ void gLevelsetNACA00::getClosestBndPoint(double x, double y, double z,
   }
 }
 
-double gLevelsetNACA00::operator() (double x, double y, double z) const
+double gLevelsetNACA00::operator()(double x, double y, double z) const
 {
   double xb, yb, curvRadb;
   bool in;
@@ -1303,8 +1386,8 @@ double gLevelsetNACA00::operator() (double x, double y, double z) const
   return in ? -sqrt(distSq) : sqrt(distSq);
 }
 
-void gLevelsetNACA00::gradient (double x, double y, double z,
-                                double & dfdx, double & dfdy, double & dfdz) const
+void gLevelsetNACA00::gradient(double x, double y, double z,
+                               double & dfdx, double & dfdy, double & dfdz) const
 {
   double xb, yb, curvRadb;
   bool in;
diff --git a/Geo/gmshLevelset.h b/Geo/gmshLevelset.h
index 581148c..66538c7 100644
--- a/Geo/gmshLevelset.h
+++ b/Geo/gmshLevelset.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -54,11 +54,11 @@ class ANNkd_tree;
 
 class gLevelset : public simpleFunction<double>
 {
-protected:
-  // negative values of the levelset are inside the domain.
+ protected:
+   // negative values of the levelset are inside the domain.
   static const short insideDomain = -1;
   int tag_; // must be greater than 0
-public:
+ public:
   gLevelset() : tag_(-1) {}
   gLevelset(const gLevelset &);
   virtual ~gLevelset(){}
@@ -69,15 +69,15 @@ public:
   virtual double operator() (double x, double y, double z) const = 0;
   bool isInsideDomain(const double &x, const double &y, const double &z) const
   {
-    return this->operator()(x,y,z) * insideDomain > 0.;
+    return this->operator()(x, y, z) * insideDomain > 0.;
   }
   bool isOutsideDomain(const double &x, const double &y, const double &z) const
   {
-    return this->operator()(x,y,z) * insideDomain < 0.;
+    return this->operator()(x, y, z) * insideDomain < 0.;
   }
   bool isOnBorder(const double &x, const double &y, const double &z) const
   {
-    return this->operator()(x,y,z) == 0.;
+    return this->operator()(x, y, z) == 0.;
   }
   virtual std::vector<gLevelset *> getChildren() const = 0;
   virtual double choose (double d1, double d2) const = 0;
@@ -85,12 +85,12 @@ public:
   virtual bool isPrimitive() const = 0;
   void setTag(int t) { tag_ = t; }
   virtual int getTag() const { return tag_; }
-  void getPrimitives(std::vector<gLevelset *> &primitives) ;
-  void getPrimitivesPO(std::vector<gLevelset *> &primitives) ;
-  void getRPN(std::vector<gLevelset *> &gLsRPN) ;
-  double H (const double &x, const double &y, const double &z) const
+  void getPrimitives(std::vector<gLevelset *> &primitives);
+  void getPrimitivesPO(std::vector<gLevelset *> &primitives);
+  void getRPN(std::vector<gLevelset *> &gLsRPN);
+  double H(const double &x, const double &y, const double &z) const
   {
-    if (isInsideDomain(x,y,z) || isOnBorder(x,y,z)) return 1.0;
+    if(isInsideDomain(x, y, z) || isOnBorder(x, y, z)) return 1.0;
     return 0.0;
   }
   void print() const
@@ -120,24 +120,22 @@ public:
 
 class gLevelsetPrimitive : public gLevelset
 {
-public:
+ public:
   gLevelsetPrimitive() : gLevelset() {}
   gLevelsetPrimitive(const gLevelsetPrimitive &lv) : gLevelset(lv) {}
   gLevelsetPrimitive(int tag) {
-    if (tag < 1) {
+    if(tag < 1) {
       printf("Tag of the levelset (%d) must be greater than 0.\n", tag);
       tag = abs(tag);
     }
     tag_ = tag;
   }
-  virtual double operator () (double x, double y, double z) const = 0;
-  std::vector<gLevelset *> getChildren() const
-  {
+  virtual double operator()(double x, double y, double z) const = 0;
+  std::vector<gLevelset *> getChildren() const {
     std::vector<gLevelset *> p; return p;
   }
-  double choose (double d1, double d2) const
-  {
-    Msg::Error("Cannot use function \"choose\" with a primitive!");
+  double choose(double d1, double d2) const {
+    Msg::Error("Cannot use function \"choose\" with a primitive!\n");
     return d1;
   }
   virtual int type() const = 0;
@@ -146,12 +144,12 @@ public:
 
 class gLevelsetSphere : public gLevelsetPrimitive
 {
-protected:
+ protected:
   double xc, yc, zc, r;
-public:
-  gLevelsetSphere (const double &x, const double &y, const double &z,
-                   const double &R, int tag=1);
-  virtual double operator () (double x, double y, double z) const
+ public:
+  gLevelsetSphere(const double &x, const double &y, const double &z,
+                  const double &R, int tag = 1);
+  virtual double operator()(double x, double y, double z) const
   {
     if(r >= 0.)
       return sqrt((xc - x) * (xc - x) + (yc - y) * (yc - y) +
@@ -159,12 +157,12 @@ public:
     return (- r - sqrt((xc - x) * (xc - x) + (yc - y) * (yc - y) +
                        (zc - z) * (zc - z)));
   }
-  void gradient (double x, double y, double z,
-                 double & dfdx, double & dfdy, double & dfdz) const;
-  void hessian (double x, double y, double z,
-                double & dfdxx, double & dfdxy, double & dfdxz,
-                double & dfdyx, double & dfdyy, double & dfdyz,
-                double & dfdzx, double & dfdzy, double & dfdzz  ) const;
+  void gradient(double x, double y, double z,
+                double &dfdx, double &dfdy, double &dfdz) const;
+  void hessian(double x, double y, double z,
+               double &dfdxx, double &dfdxy, double &dfdxz,
+               double &dfdyx, double &dfdyy, double &dfdyz,
+               double &dfdzx, double &dfdzy, double &dfdzz) const;
   int type() const { return SPHERE; }
 };
 
@@ -172,24 +170,24 @@ class gLevelsetPlane : public gLevelsetPrimitive
 {
  protected:
   double a, b, c, d;
-public:
+ public:
   // define the plane _a*x+_b*y+_c*z+_d, with outward normal (a,b,c)
-  gLevelsetPlane (const double _a, const double _b, const double _c,
-                  const double _d, int tag=1)
+  gLevelsetPlane(const double _a, const double _b, const double _c,
+                 const double _d, int tag = 1)
     : gLevelsetPrimitive(tag), a(_a), b(_b), c(_c), d(_d) {}
   // define the plane passing through the point pt and with outward normal norm
-  gLevelsetPlane (const std::vector<double> &pt, const std::vector<double> &norm,
-                  int tag=1);
-  gLevelsetPlane (const double *pt, const double *norm, int tag=1);
+  gLevelsetPlane(const std::vector<double> &pt, const std::vector<double> &norm,
+                 int tag = 1);
+  gLevelsetPlane(const double *pt, const double *norm, int tag = 1);
   // define the plane passing through the 3 points pt1,pt2,pt3 and with outward
   // normal (pt1,pt2)x(pt1,pt3)
-  gLevelsetPlane (const double *pt1, const double *pt2, const double *pt3,
-                  int tag=1);
+  gLevelsetPlane(const double *pt1, const double *pt2, const double *pt3,
+                 int tag = 1);
   // copy constructor
   gLevelsetPlane(const gLevelsetPlane &lv);
-  virtual gLevelset * clone() const{ return new gLevelsetPlane(*this); }
+  virtual gLevelset * clone() const { return new gLevelsetPlane(*this); }
   // return negative value inward and positive value outward
-  virtual double operator() (double x, double y, double z) const
+  virtual double operator()(double x, double y, double z) const
   {
     return a * x + b * y + c * z + d;
   }
@@ -198,99 +196,99 @@ public:
 
 class gLevelsetPoints : public gLevelsetPrimitive
 {
-protected:
+ protected:
   fullMatrix<double> points;
   fullMatrix<double> surf;
   fullMatrix<double> matAInv;
   double delta;
-  std::map<SPoint3,double> mapP;
+  std::map<SPoint3, double> mapP;
   fullMatrix<double> generateRbfMat(int p, int index,
-				    const fullMatrix<double> &nodes1,
-				    const fullMatrix<double> &nodes2) const;
+                                    const fullMatrix<double> &nodes1,
+                                    const fullMatrix<double> &nodes2) const;
   void RbfOp(int p, int index,
-	     const fullMatrix<double> &cntrs,
-	     const fullMatrix<double> &nodes,
-	     fullMatrix<double> &D,
-	     bool isLocal = false) const;
+             const fullMatrix<double> &cntrs,
+             const fullMatrix<double> &nodes,
+             fullMatrix<double> &D,
+             bool isLocal = false) const;
   void evalRbfDer(int p, int index,
-		  const fullMatrix<double> &cntrs,
-		  const fullMatrix<double> &nodes,
-		  const fullMatrix<double> &fValues,
-		fullMatrix<double> &fApprox, bool isLocal = false) const;
+                  const fullMatrix<double> &cntrs,
+                  const fullMatrix<double> &nodes,
+                  const fullMatrix<double> &fValues,
+                  fullMatrix<double> &fApprox, bool isLocal = false) const;
   void setup_level_set(const fullMatrix<double> &cntrs,
-		       fullMatrix<double> &level_set_nodes,
-		       fullMatrix<double> &level_set_funvals);
+                       fullMatrix<double> &level_set_nodes,
+                       fullMatrix<double> &level_set_funvals);
 
-public:
+ public:
   // define the data points
-  gLevelsetPoints(fullMatrix<double> &_centers, int tag=1);
+  gLevelsetPoints(fullMatrix<double> &_centers, int tag = 1);
   // copy constructor
   gLevelsetPoints(const gLevelsetPoints &lv);
-  virtual gLevelset * clone() const{return new gLevelsetPoints(*this);}
+  virtual gLevelset * clone() const { return new gLevelsetPoints(*this); }
   // return negative value inward and positive value outward
-  virtual double operator() (double x, double y, double z) const;
+  virtual double operator()(double x, double y, double z) const;
   void computeLS(std::vector<MVertex*> &vert);
-  int type() const {return LSPOINTS;}
+  int type() const { return LSPOINTS; }
 };
 
 class gLevelsetQuadric : public gLevelsetPrimitive
 {
-protected:
+ protected:
   double A[3][3], B[3], C;
-  void translate (const double transl[3]);
-  void rotate (const double rotate[3][3]);
-  void computeRotationMatrix (const double dir[3], double t[3][3]);
-  void computeRotationMatrix (const double dir1[3], const double dir2[3] ,
-                              double t[3][3]);
-  void Ax (const double x[3], double res[3], double fact=1.0);
-  void xAx (const double x[3], double &res, double fact=1.0);
-  void init ();
-public:
-  gLevelsetQuadric(int tag=1) : gLevelsetPrimitive(tag) {init(); }
+  void translate(const double transl[3]);
+  void rotate(const double rotate[3][3]);
+  void computeRotationMatrix(const double dir[3], double t[3][3]);
+  void computeRotationMatrix(const double dir1[3], const double dir2[3],
+                             double t[3][3]);
+  void Ax(const double x[3], double res[3], double fact = 1.0);
+  void xAx(const double x[3], double &res, double fact = 1.0);
+  void init();
+ public:
+  gLevelsetQuadric(int tag = 1) : gLevelsetPrimitive(tag) { init(); }
   gLevelsetQuadric(const gLevelsetQuadric &);
   virtual ~gLevelsetQuadric() {}
-  double operator () (double x, double y, double z) const;
+  double operator()(double x, double y, double z) const;
   virtual int type() const = 0;
 };
 
 class gLevelsetGenCylinder : public gLevelsetQuadric
 {
-public:
-  gLevelsetGenCylinder (const double *pt, const double *dir, const double &R,
-                        int tag=1);
-  gLevelsetGenCylinder (const gLevelsetGenCylinder& );
-  virtual gLevelset * clone() const{ return new gLevelsetGenCylinder(*this); }
-  int type() const {return GENCYLINDER;}
+ public:
+  gLevelsetGenCylinder(const double *pt, const double *dir, const double &R,
+                       int tag = 1);
+  gLevelsetGenCylinder(const gLevelsetGenCylinder &);
+  virtual gLevelset * clone() const { return new gLevelsetGenCylinder(*this); }
+  int type() const { return GENCYLINDER; }
 };
 
 class gLevelsetEllipsoid : public gLevelsetQuadric
 {
-public:
-  gLevelsetEllipsoid (const double *pt, const double *dir, const double &a,
-                      const double &b, const double &c, int tag=1);
-  gLevelsetEllipsoid (const gLevelsetEllipsoid& );
-  virtual gLevelset * clone() const{ return new gLevelsetEllipsoid(*this); }
+ public:
+  gLevelsetEllipsoid(const double *pt, const double *dir, const double &a,
+                     const double &b, const double &c, int tag = 1);
+  gLevelsetEllipsoid(const gLevelsetEllipsoid &);
+  virtual gLevelset * clone() const { return new gLevelsetEllipsoid(*this); }
   int type() const { return ELLIPS; }
 };
 
 class gLevelsetCone : public gLevelsetQuadric
 {
-public:
-  gLevelsetCone (const double *pt, const double *dir, const double &angle, int tag=1);
-  gLevelsetCone (const gLevelsetCone& );
-  virtual gLevelset * clone() const{ return new gLevelsetCone(*this); }
+ public:
+  gLevelsetCone(const double *pt, const double *dir, const double &angle, int tag = 1);
+  gLevelsetCone(const gLevelsetCone &);
+  virtual gLevelset * clone() const { return new gLevelsetCone(*this); }
   int type() const { return CONE; }
 };
 
 class gLevelsetGeneralQuadric : public gLevelsetQuadric
 {
-public:
-  gLevelsetGeneralQuadric (const double *pt, const double *dir, const double &x2,
-                           const double &y2, const double &z2, const double &z,
-                           const double &c, int tag=1);
-  gLevelsetGeneralQuadric (const gLevelsetGeneralQuadric& );
-  virtual gLevelset * clone() const{ return new gLevelsetGeneralQuadric(*this); }
-  int type() const {return QUADRIC;}
+ public:
+  gLevelsetGeneralQuadric(const double *pt, const double *dir,
+                          const double &x2, const double &y2, const double &z2,
+                          const double &z, const double &c, int tag = 1);
+  gLevelsetGeneralQuadric(const gLevelsetGeneralQuadric &);
+  virtual gLevelset * clone() const { return new gLevelsetGeneralQuadric(*this); }
+  int type() const { return QUADRIC; }
 };
 
 class gLevelsetPopcorn: public gLevelsetPrimitive
@@ -299,11 +297,11 @@ class gLevelsetPopcorn: public gLevelsetPrimitive
   double sigma;
   double r0;
   double xc, yc, zc;
-public:
+ public:
   gLevelsetPopcorn(double xc, double yc, double zc, double r0, double A,
-                   double sigma, int tag=1);
-  ~gLevelsetPopcorn(){}
-  double operator () (double x, double y, double z) const;
+                   double sigma, int tag = 1);
+  ~gLevelsetPopcorn() {}
+  double operator()(double x, double y, double z) const;
   int type() const { return UNKNOWN; }
 };
 
@@ -316,51 +314,51 @@ class gLevelsetShamrock: public gLevelsetPrimitive
   double xmid, a, b;
   int c;
   std::vector<double> iso_x, iso_y;
-public:
+ public:
   gLevelsetShamrock(double xmid, double ymid, double zmid, double a, double b,
-                    int c=3, int tag=1);
-  ~gLevelsetShamrock(){}
-  double operator () (double x, double y, double z) const;
+                    int c = 3, int tag = 1);
+  ~gLevelsetShamrock() {}
+  double operator()(double x, double y, double z) const;
   int type() const { return UNKNOWN; }
 };
 
 class gLevelsetMathEval: public gLevelsetPrimitive
 {
   mathEvaluator *_expr;
-public:
-  gLevelsetMathEval(std::string f, int tag=1);
-  ~gLevelsetMathEval(){ if (_expr) delete _expr; }
-  double operator () (double x, double y, double z) const;
+ public:
+  gLevelsetMathEval(std::string f, int tag = 1);
+  ~gLevelsetMathEval() { if(_expr) delete _expr; }
+  double operator()(double x, double y, double z) const;
   int type() const { return UNKNOWN; }
 };
 
 class gLevelsetMathEvalAll: public gLevelsetPrimitive
 {
   mathEvaluator *_expr;
-public:
-  gLevelsetMathEvalAll(std::vector<std::string> f, int tag=1);
-  ~gLevelsetMathEvalAll(){ if (_expr) delete _expr; }
-  double operator() (double x, double y, double z) const;
-  void gradient (double x, double y, double z,
-		double & dfdx, double & dfdy, double & dfdz) const;
-  void hessian (double x, double y, double z,
-		double & dfdxx, double & dfdxy, double & dfdxz,
-		double & dfdyx, double & dfdyy, double & dfdyz,
-		double & dfdzx, double & dfdzy, double & dfdzz	) const;
+ public:
+  gLevelsetMathEvalAll(std::vector<std::string> f, int tag = 1);
+  ~gLevelsetMathEvalAll() { if(_expr) delete _expr; }
+  double operator()(double x, double y, double z) const;
+  void gradient(double x, double y, double z,
+                double &dfdx, double &dfdy, double &dfdz) const;
+  void hessian(double x, double y, double z,
+               double &dfdxx, double &dfdxy, double &dfdxz,
+               double &dfdyx, double &dfdyy, double &dfdyz,
+               double &dfdzx, double &dfdzy, double &dfdzz) const;
   int type() const { return UNKNOWN; }
 };
 
 class gLevelsetSimpleFunction: public gLevelsetPrimitive
 {
   simpleFunction<double> *_f;
-public:
-  gLevelsetSimpleFunction(simpleFunction<double> *f, int tag=1){
+ public:
+  gLevelsetSimpleFunction(simpleFunction<double> *f, int tag = 1) {
     _f = f;
   }
-  ~gLevelsetSimpleFunction(){}
-  double operator () (double x, double y, double z) const
+  ~gLevelsetSimpleFunction() {}
+  double operator()(double x, double y, double z) const
   {
-    return (*_f)(x,y,z);
+    return (*_f)(x, y, z);
   }
   int type() const { return UNKNOWN; }
 };
@@ -371,13 +369,13 @@ class gLevelsetDistMesh: public gLevelsetPrimitive
   const int _nbClose;
   std::vector<GEntity*> _entities;
   std::vector<MVertex*> _vertices;
-  std::multimap<MVertex*,MElement*> _v2e;
+  std::multimap<MVertex*, MElement*> _v2e;
   ANNkd_tree *_kdtree;
-public :
-  gLevelsetDistMesh(GModel *gm, std::string physical, int nbClose = 5, int tag=1);
-  double operator () (double x, double y, double z) const;
+ public :
+  gLevelsetDistMesh(GModel *gm, std::string physical, int nbClose = 5, int tag = 1);
+  double operator()(double x, double y, double z) const;
   ~gLevelsetDistMesh();
-  int type() const { return UNKNOWN; }
+  int type() const { return LSMESH; }
 };
 #endif
 
@@ -386,14 +384,46 @@ class gLevelsetPostView : public gLevelsetPrimitive
 {
   int _viewIndex;
   OctreePost *_octree;
-public:
-  gLevelsetPostView(int index, int tag=1) ;
-  ~gLevelsetPostView(){ if(_octree) delete _octree;}
-  double operator () (double x, double y, double z) const;
+ public:
+  gLevelsetPostView(int index, int tag = 1);
+  ~gLevelsetPostView() { if(_octree) delete _octree; }
+  double operator()(double x, double y, double z) const;
   int type() const { return UNKNOWN; }
 };
 #endif
 
+class gLevelsetNACA00 : public gLevelsetPrimitive
+{
+  double _x0, _y0, _c, _t;
+ public:
+  gLevelsetNACA00(double x0, double y0, double c, double t);
+  ~gLevelsetNACA00() {}
+  double operator()(double x, double y, double z) const;
+  void gradient(double x, double y, double z,
+                double &dfdx, double &dfdy, double &dfdz) const;
+  void hessian(double x, double y, double z,
+               double &dfdxx, double &dfdxy, double &dfdxz,
+               double &dfdyx, double &dfdyy, double &dfdyz,
+               double &dfdzx, double &dfdzy, double &dfdzz) const;
+  int type() const { return UNKNOWN; }
+ private:
+  void getClosestBndPoint(const double x, const double y, const double z,
+                          double &xb, double &yb, double &curvRad,
+                          bool &in) const;
+};
+
+class gLevelsetYarn : public gLevelsetPrimitive
+{
+  //double minorAxis, majorAxis;
+  //int typeLs;
+  std::vector<GEntity*> entities;
+ public:
+  gLevelsetYarn(int dim, int phys, double minA, double majA, int type, int tag = 1);
+  ~gLevelsetYarn() {}
+  double operator()(double x, double y, double z) const;
+  int type() const { return UNKNOWN; }
+};
+
 // TOOLS
 
 class gLevelsetTools : public gLevelset
@@ -401,32 +431,35 @@ class gLevelsetTools : public gLevelset
 protected:
   std::vector<gLevelset *> children;
   bool _delChildren;//flag to delete only if called from gmsh Parser
-public:
-  gLevelsetTools () {}
-  gLevelsetTools (const std::vector<gLevelset *> &p, bool delC=false)
+ public:
+  gLevelsetTools() {}
+  gLevelsetTools(const std::vector<gLevelset *> &p, bool delC = false)
   {
-    children = p; _delChildren=delC;
+    children = p; _delChildren = delC;
   }
-  gLevelsetTools (const gLevelsetTools &);
-  virtual ~gLevelsetTools () {
-    if (_delChildren){
+  gLevelsetTools(const gLevelsetTools &);
+  virtual ~gLevelsetTools()
+  {
+    if(_delChildren){
       for(int i = 0; i < (int)children.size(); i++)
-	delete children[i];
+        delete children[i];
     }
   }
-  double operator () (double x, double y, double z) const {
+  double operator()(double x, double y, double z) const
+  {
     double d = (*children[0])(x, y, z);
-    for (int i = 1; i < (int)children.size(); i++){
+    for(int i = 1; i < (int)children.size(); i++){
       double dt = (*children[i])(x, y, z);
       d = choose(d, dt);
     }
     return d;
   }
-  std::vector<gLevelset *> getChildren() const {
+  std::vector<gLevelset *> getChildren() const
+  {
     if(children.size() != 1) return children;
     return children[0]->getChildren();
   }
-  virtual double choose (double d1, double d2) const = 0;
+  virtual double choose(double d1, double d2) const = 0;
   virtual int type2() const = 0;
   virtual int type() const
   {
@@ -447,17 +480,17 @@ public:
 
 class gLevelsetReverse : public gLevelset
 {
-protected:
+ protected:
   gLevelset *ls;
-public:
-  gLevelsetReverse (gLevelset *p) : ls(p){}
-  double operator () (double x, double y, double z) const
+ public:
+  gLevelsetReverse(gLevelset *p) : ls(p) {}
+  double operator()(double x, double y, double z) const
   {
     return -(*ls)(x, y, z);
   }
   std::vector<gLevelset *> getChildren() const { return ls->getChildren(); }
-  bool isPrimitive() const {return ls->isPrimitive();}
-  virtual double choose (double d1, double d2) const { return -ls->choose(d1,d2); }
+  bool isPrimitive() const { return ls->isPrimitive(); }
+  virtual double choose(double d1, double d2) const { return -ls->choose(d1, d2); }
   virtual int type() const { return ls->type(); }
   int getTag() const { return ls->getTag(); }
 };
@@ -466,14 +499,14 @@ public:
 // others as tools that cut it
 class gLevelsetCut : public gLevelsetTools
 {
-public:
-  gLevelsetCut (std::vector<gLevelset *> p, bool delC=false)
-    : gLevelsetTools(p,delC) {}
-  double choose (double d1, double d2) const
+ public:
+  gLevelsetCut(std::vector<gLevelset *> p, bool delC = false)
+    : gLevelsetTools(p, delC) {}
+  double choose(double d1, double d2) const
   {
     return (d1 > -d2) ? d1 : -d2; // greater of d1 and -d2
   }
-  gLevelsetCut(const gLevelsetCut &lv) : gLevelsetTools(lv){}
+  gLevelsetCut(const gLevelsetCut &lv) : gLevelsetTools(lv) {}
   virtual gLevelset * clone() const { return new gLevelsetCut(*this); }
   int type2() const { return CUT; }
 };
@@ -481,12 +514,13 @@ public:
 // This levelset takes the minimum
 class gLevelsetUnion : public gLevelsetTools
 {
-public:
-  gLevelsetUnion (std::vector<gLevelset *> p, bool delC=false)
-    : gLevelsetTools(p,delC) { }
-  gLevelsetUnion(const gLevelsetUnion &lv):gLevelsetTools(lv){}
-  virtual gLevelset * clone() const{return new gLevelsetUnion(*this);}
-  double choose (double d1, double d2) const
+ public:
+  gLevelsetUnion(std::vector<gLevelset *> p, bool delC = false)
+    : gLevelsetTools(p, delC) {}
+  gLevelsetUnion(const gLevelsetUnion &lv) : gLevelsetTools(lv) {}
+  virtual gLevelset * clone() const{ return new gLevelsetUnion(*this); }
+
+  double choose(double d1, double d2) const
   {
     return (d1 < d2) ? d1 : d2; // lesser of d1 and d2
   }
@@ -496,13 +530,13 @@ public:
 // This levelset takes the maximum
 class gLevelsetIntersection : public gLevelsetTools
 {
-public:
-  gLevelsetIntersection (std::vector<gLevelset *> p, bool delC=false)
-  : gLevelsetTools(p,delC) { }
-  gLevelsetIntersection(const gLevelsetIntersection &lv):gLevelsetTools(lv) { }
+ public:
+  gLevelsetIntersection(std::vector<gLevelset *> p, bool delC = false)
+    : gLevelsetTools(p, delC) {}
+  gLevelsetIntersection(const gLevelsetIntersection &lv) : gLevelsetTools(lv) {}
   virtual gLevelset *clone() const { return new gLevelsetIntersection(*this); }
-  double choose (double d1, double d2) const
-  {
+
+  double choose(double d1, double d2) const {
     return (d1 > d2) ? d1 : d2; // greater of d1 and d2
   }
   int type2() const { return INTER; }
@@ -511,21 +545,21 @@ public:
 // Crack defined by a normal and a tangent levelset
 class gLevelsetCrack : public gLevelsetTools
 {
-public:
-  gLevelsetCrack (std::vector<gLevelset *> p, bool delC=false)
+ public:
+  gLevelsetCrack(std::vector<gLevelset *> p, bool delC = false)
   {
-    if (p.size() != 2)
+    if(p.size() != 2)
       printf("Error : gLevelsetCrack needs 2 levelsets\n");
     children.push_back(p[0]);
     children.push_back(new gLevelsetReverse(p[0]));
     if(p[1]) children.push_back(p[1]);
     _delChildren = delC;
   }
-  double choose (double d1, double d2) const
+  double choose(double d1, double d2) const
   {
     return (d1 > d2) ? d1 : d2; // greater of d1 and d2
   }
-  int type2() const {return CRACK;}
+  int type2() const { return CRACK; }
 };
 
 
@@ -533,21 +567,21 @@ public:
 
 class gLevelsetImproved : public gLevelset
 {
-protected:
+ protected:
   gLevelset *Ls;
-public:
-  gLevelsetImproved(){}
+ public:
+  gLevelsetImproved() {}
   gLevelsetImproved(const gLevelsetImproved &lv);
-  double operator() (double x, double y, double z) const { return (*Ls)(x, y, z); }
+  double operator()(double x, double y, double z) const { return (*Ls)(x, y, z); }
   std::vector<gLevelset *> getChildren() const { return Ls->getChildren(); }
-  double choose (double d1, double d2) const { return Ls->choose(d1, d2); }
+  double choose(double d1, double d2) const { return Ls->choose(d1, d2); }
   virtual int type() const = 0;
-  bool isPrimitive() const {return Ls->isPrimitive();}
+  bool isPrimitive() const { return Ls->isPrimitive(); }
 };
 
 class gLevelsetBox : public gLevelsetImproved
 {
-public:
+ public:
   // create a box with parallel faces :
   //    pt is a corner of the box,
   //    dir1 is the direction of the first edge starting from pt,
@@ -564,7 +598,7 @@ public:
   //                         face normal to dir1 and     including pt : tag+5
   gLevelsetBox(const double *pt, const double *dir1, const double *dir2,
                const double *dir3, const double &a, const double &b,
-               const double &c, int tag=1);
+               const double &c, int tag = 1);
   // create a box with the 8 vertices (pt1,...,pt8).
   // check if the faces are planar.
   // tags of the faces are : face(pt5,pt6,pt7,pt8) : tag+0
@@ -575,15 +609,15 @@ public:
   //                         face(pt1,pt5,pt8,pt4) : tag+5
   gLevelsetBox(const double *pt1, const double *pt2, const double *pt3,
                const double *pt4, const double *pt5, const double *pt6,
-               const double *pt7, const double *pt8, int tag=1);
+               const double *pt7, const double *pt8, int tag = 1);
   gLevelsetBox(const gLevelsetBox &);
-  virtual gLevelset * clone() const{return new gLevelsetBox(*this);}
+  virtual gLevelset * clone() const { return new gLevelsetBox(*this); }
   int type() const { return BOX; }
 };
 
 class gLevelsetCylinder : public gLevelsetImproved
 {
-public:
+ public:
   // create a cylinder : pt is the point in the middle of the cylinder base,
   //                     dir is the direction of the cylinder axis,
   //                     R is the outer radius of the cylinder,
@@ -591,11 +625,11 @@ public:
   // tags of the faces are : exterior face :             tag+0
   //                         plane face including pt :   tag+1
   //                         plane face opposite to pt : tag+2
-  gLevelsetCylinder (const std::vector<double> &pt,
-                     const std::vector<double> &dir, const double &R,
-                     const double &H, int tag=1);
-  gLevelsetCylinder (const double *pt, const double *dir, const double &R,
-                     const double &H, int tag=1);
+  gLevelsetCylinder(const std::vector<double> &pt,
+                    const std::vector<double> &dir, const double &R,
+                    const double &H, int tag = 1);
+  gLevelsetCylinder(const double *pt, const double *dir, const double &R,
+                    const double &H, int tag = 1);
   // create a cylinder : pt is the point in the middle of the cylinder base,
   //                     dir is the direction of the cylinder axis,
   //                     R is the outer radius of the cylinder,
@@ -605,16 +639,16 @@ public:
   //                         plane face including pt :   tag+1
   //                         plane face opposite to pt : tag+2
   //                         interior face :             tag+3
-  gLevelsetCylinder (const double *pt, const double *dir, const double &R,
-                     const double &r, const double &H, int tag=1);
+  gLevelsetCylinder(const double *pt, const double *dir, const double &R,
+                    const double &r, const double &H, int tag = 1);
   gLevelsetCylinder(const gLevelsetCylinder &);
-  virtual gLevelset * clone() const{return new gLevelsetCylinder(*this);}
+  virtual gLevelset * clone() const { return new gLevelsetCylinder(*this); }
   int type() const { return CYLINDER; }
 };
 
 class gLevelsetConrod : public gLevelsetImproved
 {
-public:
+ public:
   // create a connecting rod :
   //    pt is the point in the middle of the first bore,
   //    dir1 is the direction of the rod,
@@ -643,24 +677,24 @@ public:
   //                         top      face of the second cylinder : tag+11
   //                         interior face of the first  cylinder : tag+12
   //                         interior face of the second cylinder : tag+13
-  gLevelsetConrod (const double *pt, const double *dir1, const double *dir2,
-                   const double &H1, const double &H2, const double &H3,
-                   const double &R1, const double &r1, const double &R2,
-                   const double &r2, const double &L1, const double &L2,
-                   const double &E, int tag=1);
+  gLevelsetConrod(const double *pt, const double *dir1, const double *dir2,
+                  const double &H1, const double &H2, const double &H3,
+                  const double &R1, const double &r1, const double &R2,
+                  const double &r2, const double &L1, const double &L2,
+                  const double &E, int tag = 1);
   gLevelsetConrod(const gLevelsetConrod &);
-  virtual gLevelset * clone() const{ return new gLevelsetConrod(*this); }
+  virtual gLevelset * clone() const { return new gLevelsetConrod(*this); }
   int type() const { return CONROD; }
 };
 
 /*
 class gLevelsetDisk : public gLevelsetTools
 {
-public:
-   // define the disk of given radius centered at a point pt and with outward
-   // normal norm
-  gLevelsetDisk (std::vector<double> pt, std::vector<double> dir,
-                 const double R, bool delC=false)
+ public:
+  // define the disk of given radius centered at a point pt and with outward
+  // normal norm
+  gLevelsetDisk(std::vector<double> pt, std::vector<double> dir,
+                const double R, bool delC = false)
   {
     double *ptP, *normP;
     ptP[0] = pt[0]; ptP[1] = pt[1]; ptP[2] = pt[2];
@@ -679,32 +713,12 @@ public:
     children.push_back(cyl);
     _delChildren = delC;
   }
-  double choose (double d1, double d2) const
+  double choose(double d1, double d2) const
   {
     return (d1 > d2) ? d1 : d2; // greater of d1 and d2
   }
-  int type2() const {return DISK;}
+  int type2() const { return DISK; }
 };
 */
 
-class gLevelsetNACA00: public gLevelsetPrimitive
-{
-  double _x0, _y0, _c, _t;
-public:
-  gLevelsetNACA00(double x0, double y0, double c, double t);
-  ~gLevelsetNACA00() {}
-  double operator () (double x, double y, double z) const;
-  void gradient (double x, double y, double z,
-    double & dfdx, double & dfdy, double & dfdz) const;
-  void hessian (double x, double y, double z,
-    double & dfdxx, double & dfdxy, double & dfdxz,
-    double & dfdyx, double & dfdyy, double & dfdyz,
-    double & dfdzx, double & dfdzy, double & dfdzz  ) const;
-  int type() const { return UNKNOWN; }
-private:
-  void getClosestBndPoint(const double x, const double y, const double z,
-                          double &xb, double &yb, double &curvRad,
-                          bool &in) const;
-};
-
 #endif
diff --git a/Geo/gmshRegion.cpp b/Geo/gmshRegion.cpp
index efbbef7..26ab7f9 100644
--- a/Geo/gmshRegion.cpp
+++ b/Geo/gmshRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshRegion.h b/Geo/gmshRegion.h
index 902da6a..c48ae87 100644
--- a/Geo/gmshRegion.h
+++ b/Geo/gmshRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshSurface.cpp b/Geo/gmshSurface.cpp
index 098c49c..0169dc6 100644
--- a/Geo/gmshSurface.cpp
+++ b/Geo/gmshSurface.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshSurface.h b/Geo/gmshSurface.h
index 5f0818a..5222b8f 100644
--- a/Geo/gmshSurface.h
+++ b/Geo/gmshSurface.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/gmshVertex.cpp b/Geo/gmshVertex.cpp
index cb3d4ff..668bc0b 100644
--- a/Geo/gmshVertex.cpp
+++ b/Geo/gmshVertex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,6 +15,12 @@
 gmshVertex::gmshVertex(GModel *m, Vertex *_v)
   : GVertex(m, _v->Num, _v->lc), v(_v)
 {
+  resetMeshAttributes();
+}
+
+void gmshVertex::resetMeshAttributes()
+{
+  meshSize = v->lc;
 }
 
 void gmshVertex::setPosition(GPoint &p)
@@ -42,16 +48,14 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
 
   Surface *s = (Surface*)face->getNativePtr();
 
-  //  printf("coucou HERE I AM %d\n",s->Typ);
-
   if(s->geometry){
     // It is not always right if it is periodic.
-    if(l_edges.size() == 1 && 
+    if(l_edges.size() == 1 &&
        (*l_edges.begin())->getBeginVertex() ==
        (*l_edges.begin())->getEndVertex()){
       Range<double> bb = (*l_edges.begin())->parBounds(0);
       return (*l_edges.begin())->reparamOnFace(face, bb.low(), dir);
-    } 
+    }
     return v->pntOnGeometry;
   }
 
@@ -60,7 +64,7 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
     for(int i = 0; i < 4; i++)
       List_Read(s->Generatrices, i, &C[i]);
 
-    double U, V;    
+    double U, V;
     if ((C[0]->beg == v && C[3]->beg == v) ||
         (C[0]->end == v && C[3]->beg == v) ||
         (C[0]->beg == v && C[3]->end == v) ||
@@ -95,12 +99,11 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
     return SPoint2(U, V);
   }
   else if(s->Typ ==  MSH_SURF_TRIC){
-    //    printf("coucou HERE I AM TRIC\n");
     Curve *C[3];
     for(int i = 0; i < 3; i++)
       List_Read(s->Generatrices, i, &C[i]);
 
-    double U, V;    
+    double U, V;
     if ((C[0]->beg == v && C[2]->beg == v) ||
         (C[0]->end == v && C[2]->beg == v) ||
         (C[0]->beg == v && C[2]->end == v) ||
@@ -125,7 +128,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
       Msg::Info("Reparameterizing point %d on face %d", v->Num, s->Num);
       return GVertex::reparamOnFace(face, dir);
     }
-    //    printf("coucou1 %g %g\n",U,V);
     return SPoint2(U, V);
   }
   else{
diff --git a/Geo/gmshVertex.h b/Geo/gmshVertex.h
index 101875e..bc89f01 100644
--- a/Geo/gmshVertex.h
+++ b/Geo/gmshVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -16,7 +16,8 @@ class gmshVertex : public GVertex {
  public:
   gmshVertex(GModel *m, Vertex *_v);
   virtual ~gmshVertex() {}
-  virtual GPoint point() const 
+  virtual void resetMeshAttributes();
+  virtual GPoint point() const
   {
     return GPoint(v->Pos.X, v->Pos.Y, v->Pos.Z, this);
   }
@@ -27,7 +28,7 @@ class gmshVertex : public GVertex {
   virtual GeomType geomType() const;
   ModelType getNativeType() const { return GmshModel; }
   void *getNativePtr() const { return v; }
-  virtual void setPrescribedMeshSizeAtVertex(double l) 
+  virtual void setPrescribedMeshSizeAtVertex(double l)
   {
     meshSize = l;
     v->lc = meshSize;
diff --git a/Geo/intersectCurveSurface.cpp b/Geo/intersectCurveSurface.cpp
index 0d1ba82..4ae3bc7 100644
--- a/Geo/intersectCurveSurface.cpp
+++ b/Geo/intersectCurveSurface.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/intersectCurveSurface.h b/Geo/intersectCurveSurface.h
index 2c70b5f..d64917b 100644
--- a/Geo/intersectCurveSurface.h
+++ b/Geo/intersectCurveSurface.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/partitionEdge.h b/Geo/partitionEdge.h
index c3113e5..24b6901 100644
--- a/Geo/partitionEdge.h
+++ b/Geo/partitionEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/partitionFace.h b/Geo/partitionFace.h
index d622a7f..f29ce23 100644
--- a/Geo/partitionFace.h
+++ b/Geo/partitionFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Geo/partitionVertex.h b/Geo/partitionVertex.h
index a576f9b..04f1db0 100644
--- a/Geo/partitionVertex.h
+++ b/Geo/partitionVertex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/CMakeLists.txt b/Graphics/CMakeLists.txt
index 68b94a6..b7cd6ea 100644
--- a/Graphics/CMakeLists.txt
+++ b/Graphics/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/Camera.cpp b/Graphics/Camera.cpp
index 74c47fd..4e8b9ea 100644
--- a/Graphics/Camera.cpp
+++ b/Graphics/Camera.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,6 +9,7 @@
 #include <iostream>
 #include <stdio.h>
 #include <math.h>
+#include <algorithm>
 #include "Camera.h"
 #include "Gmsh.h"
 #include "GmshConfig.h"
@@ -34,7 +35,7 @@ void Camera::init()
   glFnear=.0001*distance;
   glFfar=10000*distance;
   this->update();
-   
+
 }
 
 void Camera::alongX()
@@ -152,11 +153,11 @@ void Camera::update()
   right.x = front.y * up.z - front.z * up.y;
   right.y = front.z * up.x - front.x * up.z;
   right.z = front.x * up.y - front.y * up.x;
-    
+
   up.x = right.y * front.z - right.z * front.y;
   up.y = right.z * front.x - right.x * front.z;
   up.z = right.x * front.y - right.y * front.x;
-   
+
   ref_distance = distance;
   normalize(up);
   normalize(right);
@@ -171,23 +172,23 @@ void Camera::update()
   ndfl = glFnear / focallength;
 }
 
-void Camera::affiche() 
+void Camera::affiche()
 {
-  std::cout<<"  ------------ GENERAL PARAMETERS ------------"   <<std::endl ;       
-  std::cout<<"  CTX aperture "<< CTX::instance()->camera_aperture <<std::endl ;    
-  std::cout<<"  CTX eyesep ratio "<< CTX::instance()->eye_sep_ratio <<std::endl ;    
-  std::cout<<"  CTX focallength ratio "<< CTX::instance()->focallength_ratio <<std::endl ;    
-  std::cout<<"  ------------ CAMERA PARAMETERS ------------"   <<std::endl ;         
-  std::cout<<"  position "<<  position.x<<","<<position.y<<","<<position.z <<std::endl ;    
-  std::cout<<"  front "<<  front.x<<","<<front.y<<","<<front.z <<std::endl;              
-  std::cout<<"  up "<< up.x<<","<<up.y<<","<<up.z <<std::endl;                 
-  std::cout<<"  right "<< right.x<<","<<right.y<<","<<right.z  <<std::endl;              
-  std::cout<<"  target "<<  target.x<<","<<target.y<<","<<target.z <<std::endl;   
-  std::cout<<"  focallength_ratio "<<focallength_ratio <<std::endl;  
-  std::cout<<"  focallength "<<focallength <<std::endl;  
-  std::cout<<"  aperture "<<aperture <<std::endl;     
-  std::cout<<"  eyesep_ratio "<<eye_sep_ratio <<std::endl;       
-  std::cout<<"  eyesep "<<eyesep <<std::endl;       
+  std::cout<<"  ------------ GENERAL PARAMETERS ------------"   <<std::endl ;
+  std::cout<<"  CTX aperture "<< CTX::instance()->camera_aperture <<std::endl ;
+  std::cout<<"  CTX eyesep ratio "<< CTX::instance()->eye_sep_ratio <<std::endl ;
+  std::cout<<"  CTX focallength ratio "<< CTX::instance()->focallength_ratio <<std::endl ;
+  std::cout<<"  ------------ CAMERA PARAMETERS ------------"   <<std::endl ;
+  std::cout<<"  position "<<  position.x<<","<<position.y<<","<<position.z <<std::endl ;
+  std::cout<<"  front "<<  front.x<<","<<front.y<<","<<front.z <<std::endl;
+  std::cout<<"  up "<< up.x<<","<<up.y<<","<<up.z <<std::endl;
+  std::cout<<"  right "<< right.x<<","<<right.y<<","<<right.z  <<std::endl;
+  std::cout<<"  target "<<  target.x<<","<<target.y<<","<<target.z <<std::endl;
+  std::cout<<"  focallength_ratio "<<focallength_ratio <<std::endl;
+  std::cout<<"  focallength "<<focallength <<std::endl;
+  std::cout<<"  aperture "<<aperture <<std::endl;
+  std::cout<<"  eyesep_ratio "<<eye_sep_ratio <<std::endl;
+  std::cout<<"  eyesep "<<eyesep <<std::endl;
   std::cout<<"  screenwidth "<<screenwidth <<std::endl;
   std::cout<<"  screenheight "<<screenheight <<std::endl;
   std::cout<<"  distance "<<distance <<std::endl;
@@ -199,7 +200,7 @@ void Camera::affiche()
   std::cout<<"  Lc "<< Lc<<std::endl;
   std::cout<<"  eye_sep_ratio "<<eye_sep_ratio <<std::endl;
   std::cout<<"  closeness "<< closeness<<std::endl;
-  std::cout<<"  glFnear "<< glFnear <<std::endl; 
+  std::cout<<"  glFnear "<< glFnear <<std::endl;
   std::cout<<"  glFfar "<< glFfar <<std::endl;
   std::cout<<"  radians "<<radians <<std::endl;
   std::cout<<"  wd2 "<<wd2 <<std::endl;
@@ -230,21 +231,21 @@ void Camera::zoom(double& factor)
 void Camera::rotate(double* q)
 {
   this->update();
-  // rotation projection in global coordinates  
+  // rotation projection in global coordinates
   Quaternion omega;
   omega.x = q[0] * right.x + q[1] * up.x - q[2] * front.x;
   omega.y = q[0] * right.y + q[1] * up.y - q[2] * front.y;
   omega.z = q[0] * right.z + q[1] * up.z - q[2] * front.z;
   omega.w = q[3];
   normalize(omega);
-  Quaternion conj = conjugate(omega);  
+  Quaternion conj = conjugate(omega);
   front = omega * front * conj;
   up = omega * up * conj;
   right = omega * right * conj;
   normalize(front);
   normalize(up);
   normalize(right);
-  //actualize camera position 
+  //actualize camera position
   position = target - distance * front;
   this->update();
 }
@@ -275,7 +276,7 @@ void Camera::move_and_look(double _movfront,double _movright,double _movup,
   Quaternion omega;
   omega = omega_up * omega_right * omega_front;
   normalize(omega);
-  Quaternion conj = conjugate(omega);  
+  Quaternion conj = conjugate(omega);
   front = omega * front * conj;
   up = omega * up * conj;
   right = omega * right * conj;
@@ -307,10 +308,10 @@ void Camera::move_and_look(double _movfront,double _movright,double _movup,
 ////////////////////////////////////////////////////////////////
 //                 QUATERNION and XYZ functions
 ////////////////////////////////////////////////////////////////
- 
+
 double length(Quaternion &q)
-{ 
-  return  sqrt(q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w); 
+{
+  return  sqrt(q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w);
 }
 
 double length(XYZ &p)
@@ -330,14 +331,14 @@ void normalize_axe(Quaternion &q)
     l = 0.;
   }
   if(l != 0. ){
-    q.x /= l; q.y /= l; q.z /= l; 
+    q.x /= l; q.y /= l; q.z /= l;
    }
 }
 void normalize(Quaternion &q)
 {
   double L = length(q);
-    q.x /= L; q.y /= L; q.z /= L; q.w /= L; 
-  
+    q.x /= L; q.y /= L; q.z /= L; q.w /= L;
+
 }
 
 void normalize(XYZ &p)
@@ -346,7 +347,7 @@ void normalize(XYZ &p)
   p.x /= L; p.y /= L; p.z /= L;
 }
 
-XYZ::XYZ (const Quaternion &R) : x(R.x), y(R.y), z(R.z){} 
+XYZ::XYZ (const Quaternion &R) : x(R.x), y(R.y), z(R.z){}
 
 XYZ::XYZ(double _x,double _y,double _z) : x(_x),y(_y),z(_z){}
 
@@ -363,7 +364,7 @@ void rotate(Quaternion omega,XYZ axe)
 }
 
 XYZ operator* (const double &a, const XYZ &T)
-{ 
+{
   XYZ res(T);
   res.x *= a;
   res.y *= a;
@@ -372,7 +373,7 @@ XYZ operator* (const double &a, const XYZ &T)
 }
 
 XYZ operator+ (const XYZ &L, const XYZ &R)
-{ 
+{
   XYZ res(L);
   res.x += R.x;
   res.y += R.y;
@@ -380,7 +381,7 @@ XYZ operator+ (const XYZ &L, const XYZ &R)
   return res;
 }
 XYZ operator- (const XYZ &L, const XYZ &R)
-{ 
+{
   XYZ res(L);
   res.x -= R.x;
   res.y -= R.y;
@@ -388,7 +389,7 @@ XYZ operator- (const XYZ &L, const XYZ &R)
   return res;
 }
 XYZ operator- (const XYZ &R)
-{ 
+{
   XYZ res;
   res.x = -R.x;
   res.y = -R.y;
@@ -402,7 +403,7 @@ Quaternion::Quaternion(const XYZ &R, const double &A) {
   x=R.x*sin(A);
   y=R.y*sin(A);
   z=R.z*sin(A);
-  w=cos(A); 
+  w=cos(A);
 }
 Quaternion::Quaternion(): x(0.), y(0.),z(0.),w(1.) {}
 
diff --git a/Graphics/Camera.h b/Graphics/Camera.h
index 63af211..8f8bfde 100644
--- a/Graphics/Camera.h
+++ b/Graphics/Camera.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/PixelBuffer.h b/Graphics/PixelBuffer.h
index 3ca6794..43248f0 100644
--- a/Graphics/PixelBuffer.h
+++ b/Graphics/PixelBuffer.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/ReadImg.cpp b/Graphics/ReadImg.cpp
index 55c8cb5..d403a93 100644
--- a/Graphics/ReadImg.cpp
+++ b/Graphics/ReadImg.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/ReadImg.h b/Graphics/ReadImg.h
index 74335e7..08e8c0c 100644
--- a/Graphics/ReadImg.h
+++ b/Graphics/ReadImg.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/drawAxes.cpp b/Graphics/drawAxes.cpp
index d0e796f..2ef021b 100644
--- a/Graphics/drawAxes.cpp
+++ b/Graphics/drawAxes.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp
index 845431a..c6734f5 100644
--- a/Graphics/drawContext.cpp
+++ b/Graphics/drawContext.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -24,6 +24,7 @@
 #include <FL/Fl_JPEG_Image.H>
 #include <FL/Fl_PNG_Image.H>
 #include <FL/gl.h>
+#include "openglWindow.h"
 #endif
 
 #if defined(HAVE_POPPLER)
@@ -32,8 +33,10 @@
 
 drawContextGlobal *drawContext::_global = 0;
 
-drawContext::drawContext(drawTransform *transform)
-  : _transform(transform)
+extern SPoint2 getGraph2dDataPointForTag(unsigned int);
+
+drawContext::drawContext(openglWindow *window, drawTransform *transform)
+  : _transform(transform), _openglWindow(window)
 {
   // initialize from temp values in global context
   for(int i = 0; i < 3; i++){
@@ -63,6 +66,17 @@ drawContext::~drawContext()
   invalidateQuadricsAndDisplayLists();
 }
 
+bool drawContext::isHighResolution()
+{
+  // this must be dynamic: the high resolution can change when a window is moved
+  // across displays
+#if defined(HAVE_FLTK)
+  return _openglWindow->pixel_w() > _openglWindow->w();
+#else
+  return false;
+#endif
+}
+
 drawContextGlobal *drawContext::global()
 {
   if(!_global) _global = new drawContextGlobal(); // create dummy default
@@ -286,6 +300,7 @@ void drawContext::draw3d()
   drawBackgroundImage(true);
   drawMesh();
   drawPost();
+  drawGraph2d(true);
 }
 
 void drawContext::draw2d()
@@ -296,6 +311,7 @@ void drawContext::draw2d()
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
+
   glOrtho((double)viewport[0], (double)viewport[2],
           (double)viewport[1], (double)viewport[3],
           -100., 100.); // in pixels, so we can draw some 3D glyphs
@@ -306,11 +322,10 @@ void drawContext::draw2d()
   glMatrixMode(GL_MODELVIEW);
 
   glLoadIdentity();
-  drawGraph2d();
+  drawGraph2d(false);
   drawText2d();
   if(CTX::instance()->post.draw && !CTX::instance()->stereo)
     drawScales();
-
   if(CTX::instance()->smallAxes)
     drawSmallAxes();
 }
@@ -466,8 +481,8 @@ void drawContext::drawBackgroundImage(bool threeD)
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
   glEnable(GL_TEXTURE_2D);
   glBindTexture(GL_TEXTURE_2D, _bgImageTexture);
+  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
   glBegin(GL_QUADS);
-  glColor4ubv((GLubyte *) & CTX::instance()->color.bg);
   if(threeD){
     glTexCoord2f(1.0f, 1.0f); glVertex2d(x+w, y);
     glTexCoord2f(1.0f, 0.0f); glVertex2d(x+w, y+h);
@@ -740,21 +755,26 @@ void drawContext::initPosition()
 // Takes a cursor position in window coordinates and returns the line (given by
 // a point and a unit direction vector), in real space, that corresponds to that
 // cursor position
-void drawContext::unproject(double x, double y, double p[3], double d[3])
+void drawContext::unproject(double winx, double winy, double p[3], double d[3])
 {
+  if(isHighResolution()){
+    winx *= 2; // true pixels
+    winy *= 2;
+  }
+
   GLint vp[4];
   glGetIntegerv(GL_VIEWPORT, vp);
 
-  y = vp[3] - y;
+  winy = vp[3] - winy;
 
   GLdouble x0, y0, z0, x1, y1, z1;
 
   // we use the stored model and proj matrices instead of directly
   // getGetDouble'ing the matrices since unproject can be called in or after
   // draw2d
-  if(!gluUnProject(x, y, 0.0, model, proj, vp, &x0, &y0, &z0))
+  if(!gluUnProject(winx, winy, 0.0, model, proj, vp, &x0, &y0, &z0))
     Msg::Warning("unproject1 failed");
-  if(!gluUnProject(x, y, 1.0, model, proj, vp, &x1, &y1, &z1))
+  if(!gluUnProject(winx, winy, 1.0, model, proj, vp, &x1, &y1, &z1))
     Msg::Warning("unproject2 failed");
 
   p[0] = x0;
@@ -769,24 +789,24 @@ void drawContext::unproject(double x, double y, double p[3], double d[3])
   d[2] /= len;
 }
 
-void drawContext::viewport2World(double win[3], double xyz[3])
+void drawContext::viewport2World(double vp[3], double xyz[3])
 {
   GLint viewport[4];
   GLdouble model[16], proj[16];
   glGetIntegerv(GL_VIEWPORT, viewport);
   glGetDoublev(GL_PROJECTION_MATRIX, proj);
   glGetDoublev(GL_MODELVIEW_MATRIX, model);
-  gluUnProject(win[0], win[1], win[2], model, proj, viewport, &xyz[0], &xyz[1], &xyz[2]);
+  gluUnProject(vp[0], vp[1], vp[2], model, proj, viewport, &xyz[0], &xyz[1], &xyz[2]);
 }
 
-void drawContext::world2Viewport(double xyz[3], double win[3])
+void drawContext::world2Viewport(double xyz[3], double vp[3])
 {
   GLint viewport[4];
   GLdouble model[16], proj[16];
   glGetIntegerv(GL_VIEWPORT, viewport);
   glGetDoublev(GL_PROJECTION_MATRIX, proj);
   glGetDoublev(GL_MODELVIEW_MATRIX, model);
-  gluProject(xyz[0], xyz[1], xyz[2], model, proj, viewport, &win[0], &win[1], &win[2]);
+  gluProject(xyz[0], xyz[1], xyz[2], model, proj, viewport, &vp[0], &vp[1], &vp[2]);
 }
 
 class hit{
@@ -827,7 +847,8 @@ bool drawContext::select(int type, bool multiple, bool mesh,
                          std::vector<GEdge*> &edges,
                          std::vector<GFace*> &faces,
                          std::vector<GRegion*> &regions,
-                         std::vector<MElement*> &elements)
+                         std::vector<MElement*> &elements,
+                         std::vector<SPoint2> &points)
 {
   vertices.clear();
   edges.clear();
@@ -839,9 +860,9 @@ bool drawContext::select(int type, bool multiple, bool mesh,
   // maximum number of possible hits
   GModel *m = GModel::current();
   int eles = (mesh && CTX::instance()->pickElements) ? 4 * m->getNumMeshElements() : 0;
+  int views = PView::list.size() * 100;
   int size = 7 * (m->getNumVertices() + m->getNumEdges() + m->getNumFaces() +
-                  m->getNumRegions() + eles);
-
+                  m->getNumRegions() + eles) + views;
   if(!size) return false; // the model is empty, don't bother!
 
   // allocate selection buffer
@@ -854,11 +875,28 @@ bool drawContext::select(int type, bool multiple, bool mesh,
   glRenderMode(GL_SELECT);
   glInitNames();
   glPushMatrix();
+
+  // 3d stuff
   initProjection(x, y, w, h);
   initPosition();
   drawGeom();
   if(mesh) drawMesh();
+  drawGraph2d(true);
+
+  // 2d stuff
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPickMatrix((GLdouble)x, (GLdouble)(viewport[3] - y),
+                (GLdouble)w, (GLdouble)h, (GLint *)viewport);
+  glOrtho((double)viewport[0], (double)viewport[2],
+          (double)viewport[1], (double)viewport[3],
+          -100., 100.); // in pixels, so we can draw some 3D glyphs
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  drawGraph2d(false);
+
   glPopMatrix();
+
   GLint numhits = glRenderMode(GL_RENDER);
   render_mode = drawContext::GMSH_RENDER;
 
@@ -984,12 +1022,20 @@ bool drawContext::select(int type, bool multiple, bool mesh,
           if(!multiple) return true;
         }
         break;
+      case 4:
+        {
+          int tag = hits[i].ient;
+          SPoint2 p = getGraph2dDataPointForTag(tag);
+          points.push_back(p);
+          if(!multiple) return true;
+        }
+        break;
       }
     }
   }
 
   if(vertices.size() || edges.size() || faces.size() ||
-     regions.size() || elements.size())
+     regions.size() || elements.size() || points.size())
     return true;
   return false;
 }
diff --git a/Graphics/drawContext.h b/Graphics/drawContext.h
index 2f1285f..d641f5d 100644
--- a/Graphics/drawContext.h
+++ b/Graphics/drawContext.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -10,6 +10,7 @@
 #include <vector>
 #include <set>
 #include "SBoundingBox3d.h"
+#include "SPoint2.h"
 #include "Camera.h"
 
 #if defined(WIN32)
@@ -33,6 +34,7 @@ class GEdge;
 class GFace;
 class GRegion;
 class MElement;
+class openglWindow;
 
 class drawTransform {
  public:
@@ -111,6 +113,7 @@ class drawContext {
   std::set<GModel*> _hiddenModels;
   std::set<PView*> _hiddenViews;
   GLuint _bgImageTexture, _bgImageW, _bgImageH;
+  openglWindow *_openglWindow;
  public:
   Camera camera;
   double r[3]; // current Euler angles (in degrees!)
@@ -126,8 +129,9 @@ class drawContext {
   enum RenderMode {GMSH_RENDER=1, GMSH_SELECT=2, GMSH_FEEDBACK=3};
   int render_mode; // current rendering mode
  public:
-  drawContext(drawTransform *transform=0);
+  drawContext(openglWindow *window, drawTransform *transform=0);
   ~drawContext();
+  bool isHighResolution();
   void copyViewAttributes(drawContext *other)
   {
     camera = other->camera;
@@ -187,13 +191,13 @@ class drawContext {
   void initProjection(int xpick=0, int ypick=0, int wpick=0, int hpick=0);
   void initRenderModel();
   void initPosition();
-  void unproject(double x, double y, double p[3], double d[3]);
-  void viewport2World(double win[3], double xyz[3]);
-  void world2Viewport(double xyz[3], double win[3]);
+  void unproject(double winx, double winy, double p[3], double d[3]);
+  void viewport2World(double vp[3], double xyz[3]);
+  void world2Viewport(double xyz[3], double vp[3]);
   bool select(int type, bool multiple, bool mesh, int x, int y, int w, int h,
               std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges,
               std::vector<GFace*> &faces, std::vector<GRegion*> &regions,
-              std::vector<MElement*> &elements);
+              std::vector<MElement*> &elements, std::vector<SPoint2> &points);
   int fix2dCoordinates(double *x, double *y);
   void draw3d();
   void draw2d();
@@ -203,7 +207,7 @@ class drawContext {
   void drawBackgroundGradient();
   void drawBackgroundImage(bool moving);
   void drawText2d();
-  void drawGraph2d();
+  void drawGraph2d(bool inModelCoordinates);
   void drawAxis(double xmin, double ymin, double zmin,
                 double xmax, double ymax, double zmax,
                 int nticks, int mikado);
diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp
index 4da3101..917a558 100644
--- a/Graphics/drawGeom.cpp
+++ b/Graphics/drawGeom.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -53,14 +53,21 @@ class drawGVertex {
       glPushName(v->tag());
     }
 
+    double ps = CTX::instance()->geom.pointSize;
+    double sps = CTX::instance()->geom.selectedPointSize;
+    if(_ctx->isHighResolution()){
+      ps *= CTX::instance()->highResolutionPointSizeFactor;
+      sps *= CTX::instance()->highResolutionPointSizeFactor;
+    }
+
     if(v->getSelection()) {
-      glPointSize((float)CTX::instance()->geom.selectedPointSize);
+      glPointSize((float)sps);
       gl2psPointSize((float)(CTX::instance()->geom.selectedPointSize *
                              CTX::instance()->print.epsPointSizeFactor));
       glColor4ubv((GLubyte *) & CTX::instance()->color.geom.selection);
     }
     else {
-      glPointSize((float)CTX::instance()->geom.pointSize);
+      glPointSize((float)ps);
       gl2psPointSize((float)(CTX::instance()->geom.pointSize *
                              CTX::instance()->print.epsPointSizeFactor));
       glColor4ubv((GLubyte *) & CTX::instance()->color.geom.point);
@@ -80,11 +87,9 @@ class drawGVertex {
     if(CTX::instance()->geom.points) {
       if(CTX::instance()->geom.pointType > 0) {
         if(v->getSelection())
-          _ctx->drawSphere(CTX::instance()->geom.selectedPointSize, x, y, z,
-                           CTX::instance()->geom.light);
+          _ctx->drawSphere(sps, x, y, z, CTX::instance()->geom.light);
         else
-          _ctx->drawSphere(CTX::instance()->geom.pointSize, x, y, z,
-                           CTX::instance()->geom.light);
+          _ctx->drawSphere(ps, x, y, z, CTX::instance()->geom.light);
       }
       else {
         glBegin(GL_POINTS);
@@ -94,7 +99,7 @@ class drawGVertex {
     }
 
     if(CTX::instance()->geom.pointsNum) {
-      double offset = (0.5 * CTX::instance()->geom.pointSize +
+      double offset = (0.5 * ps +
                        0.1 * CTX::instance()->glFontSize) * _ctx->pixel_equiv_x;
       drawEntityLabel(_ctx, v, x, y, z, offset);
     }
@@ -466,7 +471,6 @@ class drawGRegion {
   void operator () (GRegion *r)
   {
     if(!r->getVisibility()) return;
-    //    if(r->geomType() == GEntity::DiscreteVolume) return;
 
     bool select = (_ctx->render_mode == drawContext::GMSH_SELECT &&
                    r->model() == GModel::current());
diff --git a/Graphics/drawGlyph.cpp b/Graphics/drawGlyph.cpp
index 641c8ff..553071c 100644
--- a/Graphics/drawGlyph.cpp
+++ b/Graphics/drawGlyph.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -23,7 +23,7 @@ void drawContext::drawString(const std::string &s, const std::string &font_name,
   if(valid == GL_FALSE) return; // the primitive is culled
 
   // change the raster position only if not creating TeX files
-  if(align > 0 && (!CTX::instance()->printing || 
+  if(align > 0 && (!CTX::instance()->printing ||
                    CTX::instance()->print.fileFormat != FORMAT_TEX)){
     GLdouble pos[4];
     glGetDoublev(GL_CURRENT_RASTER_POSITION, pos);
@@ -31,21 +31,27 @@ void drawContext::drawString(const std::string &s, const std::string &font_name,
     drawContext::global()->setFont(font_enum, font_size);
     double width = drawContext::global()->getStringWidth(s.c_str());
     double height = drawContext::global()->getStringHeight();
+    // width and height must here be computed in true pixel coordinates, because
+    // viewport2world uses the actual, pixel-sized (not FLTK-sized) viewport
+    if(isHighResolution()){
+      width *= 2;
+      height *= 2;
+    }
     switch(align){
-    case 1: w[0] -= width/2.;                     break; // bottom center
-    case 2: w[0] -= width;                        break; // bottom right
-    case 3:                    w[1] -= height;    break; // top left
-    case 4: w[0] -= width/2.;  w[1] -= height;    break; // top center
-    case 5: w[0] -= width;     w[1] -= height;    break; // top right
-    case 6:                    w[1] -= height/2.; break; // center left
-    case 7: w[0] -= width/2.;  w[1] -= height/2.; break; // center center
-    case 8: w[0] -= width;     w[1] -= height/2.; break; // center right
+    case 1: w[0] -= width/2.;                    break; // bottom center
+    case 2: w[0] -= width;                       break; // bottom right
+    case 3:                   w[1] -= height;    break; // top left
+    case 4: w[0] -= width/2.; w[1] -= height;    break; // top center
+    case 5: w[0] -= width;    w[1] -= height;    break; // top right
+    case 6:                   w[1] -= height/2.; break; // center left
+    case 7: w[0] -= width/2.; w[1] -= height/2.; break; // center center
+    case 8: w[0] -= width;    w[1] -= height/2.; break; // center right
     default: break;
     }
     viewport2World(w, x);
     glRasterPos3d(x[0], x[1], x[2]);
   }
-  
+
   if(!CTX::instance()->printing){
     drawContext::global()->setFont(font_enum, font_size);
     drawContext::global()->drawString(s.c_str());
@@ -68,7 +74,7 @@ void drawContext::drawString(const std::string &s, const std::string &font_name,
       }
       gl2psTextOpt(tmp.c_str(), font_name.c_str(), font_size, opt, 0.);
     }
-    else if(CTX::instance()->print.epsQuality && 
+    else if(CTX::instance()->print.epsQuality &&
             (CTX::instance()->print.fileFormat == FORMAT_PS ||
              CTX::instance()->print.fileFormat == FORMAT_EPS ||
              CTX::instance()->print.fileFormat == FORMAT_PDF ||
@@ -84,7 +90,7 @@ void drawContext::drawString(const std::string &s, const std::string &font_name,
 
 void drawContext::drawString(const std::string &s)
 {
-  drawString(s, CTX::instance()->glFont, CTX::instance()->glFontEnum, 
+  drawString(s, CTX::instance()->glFont, CTX::instance()->glFontEnum,
              CTX::instance()->glFontSize, 0);
 }
 
@@ -166,7 +172,6 @@ void drawContext::drawEllipsoid(double x, double y, double z, float v0[3], float
 void drawContext::drawSphere(double size, double x, double y, double z, int light)
 {
   double ss = size * pixel_equiv_x / s[0]; // size is in pixels
-
   if(light) glEnable(GL_LIGHTING);
   glPushMatrix();
   glTranslated(x, y, z);
@@ -176,8 +181,8 @@ void drawContext::drawSphere(double size, double x, double y, double z, int ligh
   glDisable(GL_LIGHTING);
 }
 
-void drawContext::drawTaperedCylinder(double width, double val1, double val2, 
-                                      double ValMin, double ValMax, 
+void drawContext::drawTaperedCylinder(double width, double val1, double val2,
+                                      double ValMin, double ValMax,
                                       double *x, double *y, double *z, int light)
 {
   if(light) glEnable(GL_LIGHTING);
@@ -242,7 +247,7 @@ void drawContext::drawCylinder(double width, double *x, double *y, double *z, in
 
 static void drawSimpleVector(int arrow, int fill,
                              double x, double y, double z,
-                             double dx, double dy, double dz, 
+                             double dx, double dy, double dz,
                              double d, int light)
 {
   double n[3], t[3], u[3];
@@ -288,7 +293,7 @@ static void drawSimpleVector(int arrow, int fill,
       glVertex3d(x, y, z);
       glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);
       glEnd();
-      
+
       if(light && fill) glEnable(GL_LIGHTING);
       glBegin(GL_TRIANGLES);
       if(light) glNormal3dv(u);
@@ -296,19 +301,19 @@ static void drawSimpleVector(int arrow, int fill,
       glVertex3d(x + f2 * dx + b * (t[0]), y + f2 * dy + b * (t[1]),
                  z + f2 * dz + b * (t[2]));
       glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);
-      
+
       glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);
       glVertex3d(x + f2 * dx + b * (-t[0]), y + f2 * dy + b * (-t[1]),
                  z + f2 * dz + b * (-t[2]));
       glVertex3d(x + dx, y + dy, z + dz);
-      
+
       if(light) glNormal3dv(t);
       glVertex3d(x + dx, y + dy, z + dz);
       glVertex3d(x + f2 * dx + b * (-u[0]), y + f2 * dy + b * (-u[1]),
                  z + f2 * dz + b * (-u[2]));
       glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);
 
-      glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);      
+      glVertex3d(x + f1 * dx, y + f1 * dy, z + f1 * dz);
       glVertex3d(x + f2 * dx + b * (u[0]), y + f2 * dy + b * (u[1]),
                  z + f2 * dz + b * (u[2]));
       glVertex3d(x + dx, y + dy, z + dz);
@@ -390,17 +395,17 @@ static void drawSimpleVector(int arrow, int fill,
       glVertex3d(x+b*(-t[0]), y+b*(-t[1]), z+b*(-t[2]));
       glVertex3d(x+b*(u[0]),  y+b*(u[1]),  z+b*(u[2]));
       glEnd();
-      
+
       glBegin(GL_LINES);
       glVertex3d(x+b*(t[0]),  y+b*(t[1]),  z+b*(t[2]));
       glVertex3d(x+dx,        y+dy,        z+dz);
-      
+
       glVertex3d(x+b*(-u[0]), y+b*(-u[1]), z+b*(-u[2]));
       glVertex3d(x+dx,        y+dy,        z+dz);
-      
+
       glVertex3d(x+b*(-t[0]), y+b*(-t[1]), z+b*(-t[2]));
       glVertex3d(x+dx,        y+dy,        z+dz);
-      
+
       glVertex3d (x+b*(u[0]), y+b*(u[1]),  z+b*(u[2]));
       glVertex3d(x+dx,        y+dy,        z+dz);
       glEnd();
@@ -409,8 +414,8 @@ static void drawSimpleVector(int arrow, int fill,
 
 }
 
-void drawContext::drawArrow3d(double x, double y, double z, 
-                              double dx, double dy, double dz, 
+void drawContext::drawArrow3d(double x, double y, double z,
+                              double dx, double dy, double dz,
                               double length, int light)
 {
   double zdir[3] = {0., 0., 1.};
@@ -423,7 +428,7 @@ void drawContext::drawArrow3d(double x, double y, double z,
     axis[1] = 1.;
     axis[2] = 0.;
   }
-  double phi = 180. * myacos(cosphi) / M_PI; 
+  double phi = 180. * myacos(cosphi) / M_PI;
 
   if(light) glEnable(GL_LIGHTING);
   glPushMatrix();
@@ -544,13 +549,13 @@ void drawContext::drawBox(double xmin, double ymin, double zmin,
   if(labels){
     char label[256];
     double offset = 0.3 * CTX::instance()->glFontSize * pixel_equiv_x;
-    glRasterPos3d(xmin + offset / s[0], 
-                  ymin + offset / s[1], 
+    glRasterPos3d(xmin + offset / s[0],
+                  ymin + offset / s[1],
                   zmin + offset / s[2]);
     sprintf(label, "(%g,%g,%g)", xmin, ymin, zmin);
     drawString(label);
-    glRasterPos3d(xmax + offset / s[0], 
-                  ymax + offset / s[1], 
+    glRasterPos3d(xmax + offset / s[0],
+                  ymax + offset / s[1],
                   zmax + offset / s[2]);
     sprintf(label, "(%g,%g,%g)", xmax, ymax, zmax);
     drawString(label);
@@ -590,7 +595,7 @@ void drawContext::drawPlaneInBoundingBox(double xmin, double ymin, double zmin,
     {5, 6, 7, 11},
     {8, 9, 10, 11}
   };
-  
+
   double n[3] = {a,b,c}, ll = 50;
   norme(n);
   if(CTX::instance()->arrowRelStemRadius)
@@ -639,7 +644,7 @@ void drawContext::drawPlaneInBoundingBox(double xmin, double ymin, double zmin,
     glNormal3d(n[0], n[1], n[2]);
     for(int j = 0; j < n_shade; j++){
       glVertex3d(p_shade[j].x, p_shade[j].y, p_shade[j].z);
-    }   
+    }
     glEnd();
     glDisable(GL_LIGHTING);
     glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, twoside);
diff --git a/Graphics/drawGraph2d.cpp b/Graphics/drawGraph2d.cpp
index 92debef..cd14718 100644
--- a/Graphics/drawGraph2d.cpp
+++ b/Graphics/drawGraph2d.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "drawContext.h"
 #include "PView.h"
 #include "PViewOptions.h"
@@ -201,7 +202,7 @@ static bool getGraphData(PView *p, std::vector<double> &x, double &xmin,
 
 static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop,
                           double width, double height, double xmin, double xmax,
-                          int tic, int overlay)
+                          double tic, int overlay, bool inModelCoordinates)
 {
   PViewData *data = p->getData();
   PViewOptions *opt = p->getOptions();
@@ -212,7 +213,7 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop,
 
   if(width <= 0 || height <= 0) return;
 
-  if(!overlay){
+  if(!overlay && !inModelCoordinates){
     int alpha = CTX::instance()->unpackAlpha(opt->color.background2d);
     if(alpha != 0){
       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -234,7 +235,17 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop,
   // height above ref. point
   double font_a = font_h - drawContext::global()->getStringDescent();
 
-  glPointSize((float)CTX::instance()->pointSize);
+  if(inModelCoordinates){
+    double ss = ctx->pixel_equiv_x / ctx->s[0];
+    font_h *= ss;
+    font_a *= ss;
+  }
+
+  double ps = CTX::instance()->pointSize;
+  if(ctx->isHighResolution())
+    ps *= CTX::instance()->highResolutionPointSizeFactor;
+
+  glPointSize((float)ps);
   gl2psPointSize((float)(CTX::instance()->pointSize *
                          CTX::instance()->print.epsPointSizeFactor));
 
@@ -339,8 +350,9 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop,
     int nb = opt->axesTics[0];
     char tmp[256];
     sprintf(tmp, opt->axesFormat[0].c_str(), -M_PI * 1.e4);
-    if((nb - 1) * drawContext::global()->getStringWidth(tmp) > width)
-      nb = (int)(width / drawContext::global()->getStringWidth(tmp)) + 1;
+    double ww = drawContext::global()->getStringWidth(tmp);
+    if(inModelCoordinates) ww *= ctx->pixel_equiv_x / ctx->s[0];
+    if((nb - 1) * ww > width) nb = (int)(width / ww) + 1;
     if(nb == 1) nb++;
 
     double dx = width / (double)(nb - 1);
@@ -385,10 +397,28 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop,
 
 }
 
+static std::map<SPoint2, unsigned int> tags;
+static std::map<unsigned int, SPoint2> tags_rev;
+
+static unsigned int getTagForGraph2dDataPoint(SPoint2 p)
+{
+  std::map<SPoint2, unsigned int>::iterator it = tags.find(p);
+  if(it != tags.end()) return it->second;
+  int t = tags.size();
+  tags[p] = t;
+  tags_rev[t] = p;
+  return t;
+}
+
+SPoint2 getGraph2dDataPointForTag(unsigned int tag)
+{
+  return tags_rev[tag];
+}
+
 static void addGraphPoint(drawContext *ctx, PView *p, double xleft, double ytop,
                           double width, double height, double x, double y,
                           double xmin, double xmax, double ymin, double ymax,
-                          bool numeric, bool sphere)
+                          bool numeric, bool singlePoint, bool inModelCoordinates)
 {
   PViewOptions *opt = p->getOptions();
 
@@ -409,29 +439,58 @@ static void addGraphPoint(drawContext *ctx, PView *p, double xleft, double ytop,
   if(y >= ymin && y <= ymax){
     unsigned int col = opt->getColor(y, ymin, ymax, true);
     glColor4ubv((GLubyte *) &col);
+
+    if(singlePoint && ctx->render_mode == drawContext::GMSH_SELECT){
+      glPushName(4);
+      glPushName(getTagForGraph2dDataPoint(SPoint2(x, y)));
+    }
+
     if(numeric){
-      glRasterPos2d(px + 3, py + 3);
+      double offset = 3;
+      if(inModelCoordinates) offset *= ctx->pixel_equiv_x / ctx->s[0];
+      glRasterPos2d(px + offset, py + offset);
       char label[256];
       sprintf(label, opt->format.c_str(), y);
       ctx->drawString(label);
     }
-    else if(sphere)
-      ctx->drawSphere(opt->pointSize, px, py, 0, 10, 10, opt->light);
-    else
+    else if(singlePoint && (opt->pointType == 1 || opt->pointType == 3)){
+      double ps = CTX::instance()->pointSize;
+      if(ctx->isHighResolution())
+        ps *= CTX::instance()->highResolutionPointSizeFactor;
+      if(inModelCoordinates)
+        ctx->drawSphere(ps, px, py, 0, opt->light);
+      else
+        ctx->drawSphere(ps, px, py, 0, 10, 10, opt->light);
+    }
+    else{
+      if(singlePoint) glBegin(GL_POINTS);
       glVertex2d(px, py);
+      if(singlePoint) glEnd();
+    }
+
+    if(singlePoint && ctx->render_mode == drawContext::GMSH_SELECT){
+      glPopName();
+      glPopName();
+    }
+
   }
 }
 
 static void drawGraphCurves(drawContext *ctx, PView *p, double xleft, double ytop,
                             double width, double height, std::vector<double> &x,
                             double xmin, double xmax,
-                            std::vector<std::vector<double> > &y)
+                            std::vector<std::vector<double> > &y,
+                            bool inModelCoordinates)
 {
   if(width <= 0 || height <= 0) return;
 
   PViewOptions *opt = p->getOptions();
 
-  glPointSize((float)opt->pointSize);
+  double ps = CTX::instance()->pointSize;
+  if(ctx->isHighResolution())
+    ps *= CTX::instance()->highResolutionPointSizeFactor;
+
+  glPointSize((float)ps);
   gl2psPointSize((float)(opt->pointSize * CTX::instance()->print.epsPointSizeFactor));
 
   glLineWidth((float)opt->lineWidth);
@@ -448,7 +507,8 @@ static void drawGraphCurves(drawContext *ctx, PView *p, double xleft, double yto
       glBegin(GL_LINE_STRIP);
       for(unsigned int j = 0; j < x.size(); j++)
         addGraphPoint(ctx, p, xleft, ytop, width, height, x[j], y[i][j],
-                      xmin, xmax, opt->tmpMin, opt->tmpMax, false, false);
+                      xmin, xmax, opt->tmpMin, opt->tmpMax, false, false,
+                      inModelCoordinates);
       glEnd();
       if(opt->useStipple){
         glDisable(GL_LINE_STIPPLE);
@@ -460,25 +520,25 @@ static void drawGraphCurves(drawContext *ctx, PView *p, double xleft, double yto
   if(opt->intervalsType == PViewOptions::Iso ||
      opt->intervalsType == PViewOptions::Discrete ||
      opt->intervalsType == PViewOptions::Numeric){
-    bool sphere =  (opt->pointType == 1 || opt->pointType == 3);
-    if(!sphere) glBegin(GL_POINTS);
     for(unsigned int i = 0; i < y.size(); i++)
       for(unsigned int j = 0; j < x.size(); j++)
         addGraphPoint(ctx, p, xleft, ytop, width, height, x[j], y[i][j],
-                      xmin, xmax, opt->tmpMin, opt->tmpMax, false, sphere);
-    if(!sphere) glEnd();
+                      xmin, xmax, opt->tmpMin, opt->tmpMax, false, true,
+                      inModelCoordinates);
   }
 
   if(opt->intervalsType == PViewOptions::Numeric){
     for(unsigned int i = 0; i < y.size(); i++)
       for(unsigned int j = 0; j < x.size(); j++)
         addGraphPoint(ctx, p, xleft, ytop, width, height, x[j], y[i][j],
-                      xmin, xmax, opt->tmpMin, opt->tmpMax, true, false);
+                      xmin, xmax, opt->tmpMin, opt->tmpMax, true, true,
+                      inModelCoordinates);
   }
 }
 
 static void drawGraph(drawContext *ctx, PView *p, double xleft, double ytop,
-                      double width, double height, int tic, int overlay=0)
+                      double width, double height, double tic, int overlay=0,
+                      bool inModelCoordinates=false)
 {
   std::vector<double> x;
   std::vector<std::vector<double> > y;
@@ -511,11 +571,13 @@ static void drawGraph(drawContext *ctx, PView *p, double xleft, double ytop,
     opt->tmpMax = log10(opt->tmpMax);
   }
 
-  drawGraphAxes(ctx, p, xleft, ytop, width, height, xmin, xmax, tic, overlay);
-  drawGraphCurves(ctx, p, xleft, ytop, width, height, x, xmin, xmax, y);
+  drawGraphAxes(ctx, p, xleft, ytop, width, height, xmin, xmax, tic, overlay,
+                inModelCoordinates);
+  drawGraphCurves(ctx, p, xleft, ytop, width, height, x, xmin, xmax, y,
+                  inModelCoordinates);
 }
 
-void drawContext::drawGraph2d()
+void drawContext::drawGraph2d(bool inModelCoordinates)
 {
   std::vector<PView*> graphs;
   for(unsigned int i = 0; i < PView::list.size(); i++){
@@ -529,8 +591,8 @@ void drawContext::drawGraph2d()
 
   drawContext::global()->setFont(CTX::instance()->glFontEnum,
                                  CTX::instance()->glFontSize);
-  const int tic = 5; // size of tic marks and interline
-  const int mx = 25, my = 5; // x- and y-margin
+  double tic = 5; // size of tic marks and interline
+  double mx = 25, my = 5; // x- and y-margin
   double xsep = 0., ysep = drawContext::global()->getStringHeight() + tic;
   char label[1024];
   for(unsigned int i = 0; i < graphs.size(); i++){
@@ -540,6 +602,15 @@ void drawContext::drawGraph2d()
   }
   xsep += tic;
 
+  if(inModelCoordinates){
+    double ss = pixel_equiv_x / s[0];
+    tic *= ss;
+    mx *= ss;
+    my *= ss;
+    xsep *= ss;
+    ysep *= ss;
+  }
+
   //  +------------------winw-------------------+
   //  |       my+3*ysep                         |
   //  |mx+xsep+---w---+mx+2*xsep+---w---+mx+xsep|
@@ -564,7 +635,15 @@ void drawContext::drawGraph2d()
     double y = viewport[1] + my + 3 * ysep;
     PView *p = graphs[i];
     PViewOptions *opt = graphs[i]->getOptions();
-    if(opt->autoPosition == 1){ // automatic
+    if(opt->autoPosition == 0 && !inModelCoordinates){ // manual
+      double x = opt->position[0], y = opt->position[1];
+      int center = fix2dCoordinates(&x, &y);
+      drawGraph(this, p,
+                x - (center & 1 ? opt->size[0] / 2. : 0),
+                y + (center & 2 ? opt->size[1] / 2. : 0),
+                opt->size[0], opt->size[1], tic);
+    }
+    else if(opt->autoPosition == 1 && !inModelCoordinates){ // automatic
       if(graphs.size() == 1){
         double w = winw - 2 * mx - 2 * xsep;
         double h = winh - 2 * my - 7 * ysep;
@@ -584,7 +663,7 @@ void drawContext::drawGraph2d()
         drawGraph(this, p, x, viewport[3] - y, w, h, tic);
       }
     }
-    else if(opt->autoPosition >= 2 && opt->autoPosition <= 11){
+    else if(opt->autoPosition >= 2 && opt->autoPosition <= 11 && !inModelCoordinates){
       // top left (2), top right (3), bottom left (4), bottom right (5), top
       // half (6), bottom half (7), left half (8), right half (9), full (10),
       // top third (11)
@@ -607,13 +686,9 @@ void drawContext::drawGraph2d()
       if(opt->axes)
         overlay[opt->autoPosition] += (opt->axesLabel[0].size() ? 2 : 1);
     }
-    else{ // manual
-      double x = opt->position[0], y = opt->position[1];
-      int center = fix2dCoordinates(&x, &y);
-      drawGraph(this, p,
-                x - (center & 1 ? opt->size[0] / 2. : 0),
-                y + (center & 2 ? opt->size[1] / 2. : 0),
-                opt->size[0], opt->size[1], tic);
+    else if(opt->autoPosition == 12 && inModelCoordinates){ // in model coordinates
+      drawGraph(this, p, opt->position[0], opt->position[1] + opt->size[1],
+                opt->size[0], opt->size[1], tic, 0, true);
     }
   }
 }
diff --git a/Graphics/drawMesh.cpp b/Graphics/drawMesh.cpp
index b1f5d08..e93a501 100644
--- a/Graphics/drawMesh.cpp
+++ b/Graphics/drawMesh.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp
index 387501a..c436eac 100644
--- a/Graphics/drawPost.cpp
+++ b/Graphics/drawPost.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/drawScales.cpp b/Graphics/drawScales.cpp
index 386704c..c6d273b 100644
--- a/Graphics/drawScales.cpp
+++ b/Graphics/drawScales.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "drawContext.h"
 #include "PView.h"
 #include "PViewOptions.h"
@@ -10,7 +11,7 @@
 #include "Context.h"
 #include "gl2ps.h"
 
-static void drawScaleBar(PView *p, double xmin, double ymin, double width, 
+static void drawScaleBar(PView *p, double xmin, double ymin, double width,
                          double height, double tic, int horizontal)
 {
   PViewOptions *opt = p->getOptions();
@@ -91,7 +92,7 @@ static void drawScaleValues(drawContext *ctx, PView *p, double xmin, double ymin
   drawContext::global()->setFont(CTX::instance()->glFontEnum,
                                  CTX::instance()->glFontSize);
   double font_h = drawContext::global()->getStringHeight(); // total font height
-  double font_a = drawContext::global()->getStringHeight() - 
+  double font_a = drawContext::global()->getStringHeight() -
     drawContext::global()->getStringDescent(); // height above ref pt
 
   char label[1024];
@@ -153,19 +154,19 @@ static void drawScaleValues(drawContext *ctx, PView *p, double xmin, double ymin
   }
 }
 
-static void drawScaleLabel(drawContext *ctx, PView *p, double xmin, double ymin, 
+static void drawScaleLabel(drawContext *ctx, PView *p, double xmin, double ymin,
                            double width, double height, double tic, int horizontal)
 {
   PViewOptions *opt = p->getOptions();
   PViewData *data;
-  
+
   // requested by Laurent: but is this really what we should be doing?
   if(opt->externalViewIndex >= 0 && opt->externalViewIndex < (int)PView::list.size())
     data = PView::list[opt->externalViewIndex]->getData();
   else
     data = p->getData();
 
-  drawContext::global()->setFont(CTX::instance()->glFontEnum, 
+  drawContext::global()->setFont(CTX::instance()->glFontEnum,
                                  CTX::instance()->glFontSize);
   double font_h = drawContext::global()->getStringHeight();
 
@@ -178,22 +179,22 @@ static void drawScaleLabel(drawContext *ctx, PView *p, double xmin, double ymin,
     sprintf(label, "%s (%s)", data->getName().c_str(), tmp);
   }
   else if((opt->showTime == 3 && nt > 1) || opt->showTime == 4){
-    sprintf(label, "%s (%d/%d)", data->getName().c_str(), opt->timeStep, 
+    sprintf(label, "%s (%d/%d)", data->getName().c_str(), opt->timeStep,
             data->getNumTimeSteps() - 1);
   }
   else
     sprintf(label, "%s", data->getName().c_str());
- 
+
   if(horizontal){
     glRasterPos2d(xmin + width / 2., ymin + height + tic + 1.4 * font_h);
-    ctx->drawString(label, CTX::instance()->glFontTitle, 
+    ctx->drawString(label, CTX::instance()->glFontTitle,
                     CTX::instance()->glFontEnumTitle,
                     CTX::instance()->glFontSizeTitle, 1);
   }
   else{
     glRasterPos2d(xmin, ymin - 2 * font_h);
-    ctx->drawString(label, CTX::instance()->glFontTitle, 
-                    CTX::instance()->glFontEnumTitle, 
+    ctx->drawString(label, CTX::instance()->glFontTitle,
+                    CTX::instance()->glFontEnumTitle,
                     CTX::instance()->glFontSizeTitle, 0);
   }
 }
@@ -233,14 +234,14 @@ void drawContext::drawScales()
   for(unsigned int i = 0; i < PView::list.size(); i++){
     PViewData *data = PView::list[i]->getData();
     PViewOptions *opt = PView::list[i]->getOptions();
-    if(!data->getDirty() && opt->visible && opt->showScale && 
+    if(!data->getDirty() && opt->visible && opt->showScale &&
        opt->type == PViewOptions::Plot3D && data->getNumElements() &&
        isVisible(PView::list[i]))
       scales.push_back(PView::list[i]);
   }
   if(scales.empty()) return;
 
-  drawContext::global()->setFont(CTX::instance()->glFontEnum, 
+  drawContext::global()->setFont(CTX::instance()->glFontEnum,
                                  CTX::instance()->glFontSize);
   char label[1024];
   double maxw = 0.;
@@ -257,7 +258,7 @@ void drawContext::drawScales()
     PView *p = scales[i];
     PViewData *data = p->getData();
     PViewOptions *opt = p->getOptions();
-    
+
     if(!opt->autoPosition) {
       double w = opt->size[0], h = opt->size[1];
       double x = opt->position[0], y = opt->position[1] - h;
@@ -280,8 +281,8 @@ void drawContext::drawScales()
         if(w < 20.) w = 20.;
         double h = bar_size;
         double x = xc - (i % 2 ? -xsep / 1.5 : w + xsep / 1.5);
-        double y = viewport[1] + ysep + 
-          (i / 2) * (bar_size + tic + 
+        double y = viewport[1] + ysep +
+          (i / 2) * (bar_size + tic +
                      2 * drawContext::global()->getStringHeight() + ysep);
         drawScale(this, p, x, y, w, h, tic, 1);
       }
diff --git a/Graphics/gl2gif.cpp b/Graphics/gl2gif.cpp
index 6d8b5ea..bb10a41 100644
--- a/Graphics/gl2gif.cpp
+++ b/Graphics/gl2gif.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2gif.h b/Graphics/gl2gif.h
index c9acd0e..3347981 100644
--- a/Graphics/gl2gif.h
+++ b/Graphics/gl2gif.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2jpeg.cpp b/Graphics/gl2jpeg.cpp
index 8890f05..9010645 100644
--- a/Graphics/gl2jpeg.cpp
+++ b/Graphics/gl2jpeg.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2jpeg.h b/Graphics/gl2jpeg.h
index e33b88d..fa920f4 100644
--- a/Graphics/gl2jpeg.h
+++ b/Graphics/gl2jpeg.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2pgf.cpp b/Graphics/gl2pgf.cpp
index e352ea5..d427bb7 100644
--- a/Graphics/gl2pgf.cpp
+++ b/Graphics/gl2pgf.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2pgf.h b/Graphics/gl2pgf.h
index 22e905f..c9c8918 100644
--- a/Graphics/gl2pgf.h
+++ b/Graphics/gl2pgf.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2png.cpp b/Graphics/gl2png.cpp
index 26eadfe..9b43eff 100644
--- a/Graphics/gl2png.cpp
+++ b/Graphics/gl2png.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2png.h b/Graphics/gl2png.h
index 3ce7e7d..7b88963 100644
--- a/Graphics/gl2png.h
+++ b/Graphics/gl2png.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2ppm.cpp b/Graphics/gl2ppm.cpp
index 56a19bb..644dc43 100644
--- a/Graphics/gl2ppm.cpp
+++ b/Graphics/gl2ppm.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2ppm.h b/Graphics/gl2ppm.h
index ba97a6d..dd6aa61 100644
--- a/Graphics/gl2ppm.h
+++ b/Graphics/gl2ppm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2yuv.cpp b/Graphics/gl2yuv.cpp
index 38690e9..ed5e316 100644
--- a/Graphics/gl2yuv.cpp
+++ b/Graphics/gl2yuv.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Graphics/gl2yuv.h b/Graphics/gl2yuv.h
index 5fd2d32..2b18145 100644
--- a/Graphics/gl2yuv.h
+++ b/Graphics/gl2yuv.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index 357759a..917723d 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,7 +18,10 @@
 void outputScalarField(std::list<BDS_Face*> t, const char *iii, int param, GFace *gf)
 {
   FILE *f = Fopen(iii, "w");
-  if(!f) return;
+  if(!f){
+    Msg::Error("Could not open file '%s'", iii);
+    return;
+  }
   fprintf(f, "View \"scalar\" {\n");
   std::list<BDS_Face*>::iterator tit = t.begin();
   std::list<BDS_Face*>::iterator tite = t.end();
@@ -323,12 +326,12 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, bool &_fatal,
 
     if (selfIntersection) return 0;
 
-//   if(ix > 300){
-//     Msg::Warning("edge %d %d cannot be recovered after %d iterations, trying again",
-//        num1, num2, ix);
-//     ix = 0;
-//   }
-//   printf("%d %d\n",intersected.size(),ix);
+    // if(ix > 300){
+    //   Msg::Warning("edge %d %d cannot be recovered after %d iterations, trying again",
+    //      num1, num2, ix);
+    //   ix = 0;
+    // }
+    // printf("%d %d\n",intersected.size(),ix);
 
     if(!intersected.size() || ix > 1000){
       BDS_Edge *eee = find_edge(num1, num2);
@@ -779,10 +782,10 @@ bool BDS_SwapEdgeTestQuality::operator () (BDS_Point *_p1, BDS_Point *_p2, BDS_P
   double cosnq; prosca(n, q, &cosnq);
   double cosonq; prosca(on, oq, &cosonq);
 
-  double qa1 = qmTriangle(_p1, _p2, _p3, QMTRI_RHO);
-  double qa2 = qmTriangle(_q1, _q2, _q3, QMTRI_RHO);
-  double qb1 = qmTriangle(_op1, _op2, _op3, QMTRI_RHO);
-  double qb2 = qmTriangle(_oq1, _oq2, _oq3, QMTRI_RHO);
+  double qa1 = qmTriangle::gamma(_p1, _p2, _p3);
+  double qa2 = qmTriangle::gamma(_q1, _q2, _q3);
+  double qb1 = qmTriangle::gamma(_op1, _op2, _op3);
+  double qb2 = qmTriangle::gamma(_oq1, _oq2, _oq3);
 
   // we swap for a better configuration
   double mina = std::min(qa1,qa2);
@@ -1113,8 +1116,8 @@ bool BDS_Mesh::collapse_edge_parametric(BDS_Edge *e, BDS_Point *p)
         pt[1][nt] = (pts[1] == p) ? o : pts[1];
         pt[2][nt] = (pts[2] == p) ? o : pts[2];
 
-//      double qnew = qmTriangle(pt[0][nt], pt[1][nt], pt[2][nt], QMTRI_RHO);
-//      double qold = qmTriangle(pts[0], pts[1], pts[2], QMTRI_RHO);
+//      double qnew = qmTriangle::gamma(pt[0][nt], pt[1][nt], pt[2][nt]);
+//      double qold = qmTriangle::gamma(pts[0], pts[1], pts[2]);
 //      if(qold > 1.e-4 && qnew < 1.e-4) return false;
         nt++;
 //      pt[0][nt] = (pts[0] == p) ? o->iD : pts[0]->iD;
@@ -1263,14 +1266,14 @@ bool BDS_Mesh::smooth_point_centroid(BDS_Point *p, GFace *gf, bool test_quality)
       p->X = gp.x();
       p->Y = gp.y();
       p->Z = gp.z();
-      newWorst = std::min(newWorst, qmTriangle(*it, QMTRI_RHO));
+      newWorst = std::min(newWorst, qmTriangle::gamma(*it));
       double norm1[3],norm2[3];
       normal_triangle(n[0], n[1], n[2], norm1);
       p->X = oldX;
       p->Y = oldY;
       p->Z = oldZ;
       normal_triangle(n[0], n[1], n[2], norm2);
-      oldWorst = std::min(oldWorst, qmTriangle(*it, QMTRI_RHO));
+      oldWorst = std::min(oldWorst, qmTriangle::gamma(*it));
       double ps;
       prosca(norm1, norm2, &ps);
       double threshold = (isSphere ? 0.95 : 0.5);
diff --git a/Mesh/BDS.h b/Mesh/BDS.h
index 354bcc1..98d169b 100644
--- a/Mesh/BDS.h
+++ b/Mesh/BDS.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/BGMBase.cpp b/Mesh/BGMBase.cpp
new file mode 100644
index 0000000..232102b
--- /dev/null
+++ b/Mesh/BGMBase.cpp
@@ -0,0 +1,289 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "BGMBase.h"
+
+#include <iostream>
+#include "OS.h"
+#include "GPoint.h"
+#include "GFace.h"
+#include "GmshDefines.h"
+#include "MElementOctree.h"
+
+void BGMBase::export_scalar(const std::string &filename,
+                            const DoubleStorageType &_whatToPrint) const
+{
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+
+  fprintf(f,"View \"Background Mesh\"{\n");
+
+  const MElement *elem;
+  int nvertex;
+  int type;
+
+  for(unsigned int i=0;i<getNumMeshElements();i++){
+    elem = getElement(i);
+    nvertex = elem->getNumVertices();
+    type = elem->getType();
+    const char *s = 0;
+    switch(type){
+      case TYPE_PNT: s = "SP"; break;
+      case TYPE_LIN: s = "SL"; break;
+      case TYPE_TRI: s = "ST"; break;
+      case TYPE_QUA: s = "SQ"; break;
+      case TYPE_TET: s = "SS"; break;
+      case TYPE_HEX: s = "SH"; break;
+      case TYPE_PRI: s = "SI"; break;
+      case TYPE_PYR: s = "SY"; break;
+      default: throw;
+    }
+
+    fprintf(f,"%s(",s);
+    const MVertex *v;
+    std::vector<double> values(nvertex);
+    for (int iv=0;iv<nvertex;iv++){
+      v = elem->getVertex(iv);
+      values[iv] = get_nodal_value(v,_whatToPrint);
+      //GPoint p = gf->point(SPoint2(v->x(),v->y()));
+      GPoint p = get_GPoint_from_MVertex(v);
+      fprintf(f,"%g,%g,%g",p.x(),p.y(),p.z());
+      if (iv!=nvertex-1) fprintf(f,",");
+      else fprintf(f,"){");
+    }
+    for (int iv=0;iv<nvertex;iv++){
+      fprintf(f,"%g",values[iv]);
+      if (iv!=nvertex-1) fprintf(f,",");
+      else fprintf(f,"};\n");
+    }
+  }
+  fprintf(f,"};\n");
+  fclose(f);
+}
+
+void BGMBase::export_vector(const std::string &filename,
+                            const VectorStorageType &_whatToPrint) const
+{
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+
+  fprintf(f,"View \"Background Mesh\"{\n");
+
+  const MElement *elem;
+  int nvertex;
+  int type;
+
+  for(unsigned int i=0;i<getNumMeshElements();i++){
+    elem = getElement(i);
+    nvertex = elem->getNumVertices();
+    type = elem->getType();
+    const char *s = 0;
+    switch(type){
+      case TYPE_PNT: s = "VP"; break;
+      case TYPE_LIN: s = "VL"; break;
+      case TYPE_TRI: s = "VT"; break;
+      case TYPE_QUA: s = "VQ"; break;
+      case TYPE_TET: s = "VS"; break;
+      case TYPE_HEX: s = "VH"; break;
+      case TYPE_PRI: s = "VI"; break;
+      case TYPE_PYR: s = "VY"; break;
+      default: throw;
+    }
+
+    fprintf(f,"%s(",s);
+    const MVertex *v;
+    std::vector<double> values(nvertex*3);
+    for (int iv=0;iv<nvertex;iv++){
+      v = elem->getVertex(iv);
+      std::vector<double> temp = get_nodal_value(v,_whatToPrint);
+      for (int j=0;j<3;j++)
+        values[iv*3+j] = temp[j];
+      GPoint p = get_GPoint_from_MVertex(v);
+      fprintf(f,"%g,%g,%g",p.x(),p.y(),p.z());
+      if (iv!=nvertex-1) fprintf(f,",");
+      else fprintf(f,"){");
+    }
+    for (int iv=0;iv<nvertex;iv++){
+      for (int j=0;j<3;j++){
+        fprintf(f,"%g",values[iv*3+j]);
+        if (!((iv==nvertex-1)&&(j==2))) fprintf(f,",");
+        else fprintf(f,"};\n");
+      }
+    }
+  }
+  fprintf(f,"};\n");
+  fclose(f);
+}
+
+
+void BGMBase::export_tensor_as_vectors(const std::string &filename,
+                                       const TensorStorageType &_whatToPrint) const
+{
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+
+  fprintf(f,"View \"Background Mesh\"{\n");
+
+  TensorStorageType::const_iterator it = _whatToPrint.begin();
+  const char *s = "VP";
+  MVertex *v;
+  for (;it!=_whatToPrint.end();it++){// for all vertices
+    v = it->first;
+    GPoint p = get_GPoint_from_MVertex(v);
+    for (int i=0;i<3;i++){
+      fprintf(f,"%s(%g,%g,%g){%g,%g,%g};\n",s,p.x(),p.y(),p.z(),
+              (it->second)(0,i),(it->second)(1,i),(it->second)(2,i));
+      fprintf(f,"%s(%g,%g,%g){%g,%g,%g};\n",s,p.x(),p.y(),p.z(),
+              -(it->second)(0,i),-(it->second)(1,i),-(it->second)(2,i));
+    }
+  }
+  fprintf(f,"};\n");
+  fclose(f);
+}
+
+BGMBase::BGMBase(int dim,GEntity *_gf):octree(NULL),gf(_gf), DIM(dim), order(1)
+{
+}
+
+BGMBase::~BGMBase()
+{
+}
+
+bool BGMBase::inDomain (double u, double v, double w)
+{
+  return (findElement(u, v, w) != NULL);
+}
+
+const MElement* BGMBase::findElement(double u, double v, double w, bool strict)
+{
+  return (getOctree()->find(u, v, w, DIM, strict));
+}
+
+std::vector<double> BGMBase::get_field_value(double u, double v, double w,
+                                             const VectorStorageType &data)
+{
+  MElement *e = const_cast<MElement*>(findElement(u, v, w ));
+  if (!e) return std::vector<double>(3,-1000.);
+  std::vector<std::vector<double> > val = get_nodal_values(e,data);
+  std::vector<double> element_uvw = get_element_uvw_from_xyz(e,u,v,w);
+
+  std::vector<double> res(3);
+  for (int j=0;j<3;j++){
+    std::vector<double> values(e->getNumVertices());
+    for (int i=0;i<e->getNumVertices();i++) values[i]=val[i][j];
+    res[j] = e->interpolate(&values[0], element_uvw[0], element_uvw[1],
+                            element_uvw[2], 1, order);
+  }
+  return res;
+}
+
+double BGMBase::get_field_value(double u, double v, double w,
+                                const DoubleStorageType &data)
+{
+  MElement *e = const_cast<MElement*>(findElement(u, v, w));
+  if (!e) return -1000.;
+  std::vector<double> val = get_nodal_values(e,data);
+  std::vector<double> element_uvw = get_element_uvw_from_xyz(e,u,v,w);
+  std::vector<double> values(e->getNumVertices());
+  for (int i=0;i<e->getNumVertices();i++)
+    values[i]=val[i];
+
+  return e->interpolate(&values[0], element_uvw[0], element_uvw[1],
+                        element_uvw[2], 1, order);
+}
+
+double BGMBase::size(double u, double v, double w)
+{
+  return get_field_value(u,v,w,sizeField);
+}
+
+double BGMBase::size(const MVertex *v)
+{
+  return get_nodal_value(v,sizeField);
+}
+
+std::vector<double> BGMBase::get_nodal_value(const MVertex *v,
+                                             const VectorStorageType &data) const
+{
+  VectorStorageType::const_iterator itfind = data.find(const_cast<MVertex*>(v));
+  if (itfind==data.end()){
+    Msg::Error("Unknown vertex %d in BGMBase::get_nodal_value", v->getNum());
+    return std::vector<double>(3,0.);
+  }
+  return itfind->second;
+}
+
+double BGMBase::get_nodal_value(const MVertex *v,const DoubleStorageType &data) const
+{
+  DoubleStorageType::const_iterator itfind = data.find(const_cast<MVertex*>(v));
+  if (itfind==data.end()){
+    Msg::Error("Unknown vertex %d in BGMBase::get_nodal_value", v->getNum());
+    return 0.;
+  }
+  return itfind->second;
+}
+
+std::vector<std::vector<double> >
+BGMBase::get_nodal_values(const MElement *e,const VectorStorageType &data) const
+{
+  std::vector<std::vector<double> > res(e->getNumVertices());
+
+  for (int i=0;i<e->getNumVertices();i++){
+    VectorStorageType::const_iterator itfind = data.find(const_cast<MVertex*>(e->getVertex(i)));
+    for (int j=0;j<3;j++)
+      res[i].push_back((itfind->second)[j]);
+  }
+  return res;
+}
+
+std::vector<double> BGMBase::get_nodal_values(const MElement *e,
+                                              const DoubleStorageType &data) const
+{
+  std::vector<double> res(e->getNumVertices(),0.);
+
+  for (int i=0;i<e->getNumVertices();i++)
+    res[i] = (data.find(const_cast<MVertex*>(e->getVertex(i))))->second;
+  return res;
+}
+
+std::vector<double> BGMBase::get_element_uvw_from_xyz (const MElement *e, double x,
+                                                       double y, double z) const
+{
+  double element_uvw[3];
+  double xyz[3] = {x, y, z};
+  e->xyz2uvw(xyz, element_uvw);
+  std::vector<double> res(3,0.);
+  for (int i=0;i<3;i++) {
+    res[i] = element_uvw[i];
+  }
+  return res;
+}
+
+std::set<MVertex*> BGMBase::get_vertices_of_maximum_dim(int dim)
+{
+  std::set<MVertex*> bnd_vertices;
+  for(unsigned int i=0;i<gf->getNumMeshElements();i++){
+    MElement* element = gf->getMeshElement(i);
+    for(int j=0;j<element->getNumVertices();j++){
+      MVertex *vertex = element->getVertex(j);
+      if (vertex->onWhat()->dim() <= dim)bnd_vertices.insert(vertex);
+    }
+  }
+  return bnd_vertices;
+}
+
+GEntity* BGMBase::getBackgroundGEntity()
+{
+  return gf;
+}
diff --git a/Mesh/BGMBase.h b/Mesh/BGMBase.h
new file mode 100644
index 0000000..5cf5dea
--- /dev/null
+++ b/Mesh/BGMBase.h
@@ -0,0 +1,97 @@
+// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _BACKGROUND_MESH_BASE_H_
+#define _BACKGROUND_MESH_BASE_H_
+
+
+#include <string>
+#include <map>
+#include <vector>
+#include <set>
+#include "STensor3.h"
+
+#include "MElement.h"
+#include "simpleFunction.h"
+
+//#include <tr1/unordered_map>
+//#include <tr1/unordered_set>
+
+
+class MElementOctree;
+class GFace;
+class GRegion;
+class GVertex;
+class GEdge;
+class GPoint;
+class MElement;
+class MVertex;
+class GEntity;
+
+class BGMBase{
+  public:
+    typedef MVertex* hash_key_ptr;
+//    typedef tr1::unordered_map<hash_key_ptr, STensor3 > TensorStorageType;
+//    typedef tr1::unordered_map<hash_key_ptr, double > DoubleStorageType;
+//    typedef tr1::unordered_map<hash_key_ptr, vector<double> > VectorStorageType;
+    typedef std::map<hash_key_ptr, STensor3 > TensorStorageType;
+    typedef std::map<hash_key_ptr, double > DoubleStorageType;
+    typedef std::map<hash_key_ptr, std::vector<double> > VectorStorageType;
+
+  protected:
+    mutable MElementOctree *octree;
+    GEntity *gf;
+    
+    
+    DoubleStorageType sizeField;  // an attached size field
+
+
+    int DIM,order;
+
+    virtual void export_scalar(const std::string &filename, const DoubleStorageType&) const;
+    virtual void export_vector(const std::string &filename, const VectorStorageType&) const;
+    virtual void export_tensor_as_vectors(const std::string &filename, const TensorStorageType &_whatToPrint)const;
+    
+    virtual void propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane = false)=0;
+    virtual void computeSizeField()=0;
+    virtual GPoint get_GPoint_from_MVertex(const MVertex *) const=0;
+    virtual const MElement* getElement(unsigned int i)const=0;
+    virtual unsigned int getNumMeshElements()const=0;
+
+    virtual std::vector<double> get_nodal_values(const MElement *e,const DoubleStorageType &data)const;
+    virtual std::vector<std::vector<double> > get_nodal_values(const MElement *e,const VectorStorageType &data)const;
+
+    virtual std::vector<double> get_nodal_value(const MVertex *v,const VectorStorageType &data)const;
+    virtual double get_nodal_value(const MVertex *v,const DoubleStorageType &data)const;
+
+    virtual std::vector<double> get_element_uvw_from_xyz (const MElement *e, double x, double y,double z) const;
+    
+    virtual double get_field_value(double u, double v, double w, const DoubleStorageType &data);
+    virtual std::vector<double> get_field_value(double u, double v, double w, const VectorStorageType &data);
+
+  
+  public:
+    BGMBase(int dim,GEntity *_gf);
+    ~BGMBase();
+    
+    virtual MElementOctree* getOctree()=0;
+
+    virtual GEntity* getBackgroundGEntity();
+
+    virtual double size(double u, double v, double w=0.);// get the size field, element interpolation
+    virtual double size(const MVertex *v);// get the nodal size field
+
+    virtual bool inDomain (double u, double v, double w=0.);
+
+    virtual inline void exportSizeField(const std::string &filename) const{export_scalar(filename,sizeField);};
+
+    // warning: these are "3D", "real" vertices, not copies in a parametric domain
+    virtual std::set<MVertex*> get_vertices_of_maximum_dim(int dim);
+    virtual const MElement* findElement(double u, double v, double w=0.,bool strict=true);
+
+};
+
+
+#endif
diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp
index 70509ca..e943c4d 100644
--- a/Mesh/BackgroundMesh.cpp
+++ b/Mesh/BackgroundMesh.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -31,429 +31,10 @@
 #include "linearSystemPETSc.h"
 #endif
 
-// computes the characteristic length of the mesh at a vertex in order
-// to have the geometry captured with accuracy. A parameter called
-// CTX::instance()->mesh.minCircPoints tells the minimum number of points per
-// radius of curvature
-
 #if defined(HAVE_ANN)
 static int _NBANN = 2;
 #endif
 
-SMetric3 buildMetricTangentToCurve(SVector3 &t, double l_t, double l_n)
-{
-  if (l_t == 0.0) return SMetric3(1.e-22);
-  SVector3 a;
-  if (fabs(t(0)) <= fabs(t(1)) && fabs(t(0)) <= fabs(t(2))){
-    a = SVector3(1,0,0);
-  }
-  else if (fabs(t(1)) <= fabs(t(0)) && fabs(t(1)) <= fabs(t(2))){
-    a = SVector3(0,1,0);
-  }
-  else{
-    a = SVector3(0,0,1);
-  }
-  SVector3 b = crossprod (t,a);
-  SVector3 c = crossprod (b,t);
-  b.normalize();
-  c.normalize();
-  t.normalize();
-  SMetric3 Metric (1./(l_t*l_t),1./(l_n*l_n),1./(l_n*l_n),t,b,c);
-  //  printf("bmttc %g %g %g %g %g\n",l_t,l_n,Metric(0,0),Metric(0,1),Metric(1,1));
-  return Metric;
-}
-
-SMetric3 buildMetricTangentToSurface(SVector3 &t1, SVector3 &t2,
-                                     double l_t1, double l_t2, double l_n)
-{
-  t1.normalize();
-  t2.normalize();
-  SVector3 n = crossprod (t1,t2);
-  n.normalize();
-
-  l_t1 = std::max(l_t1, CTX::instance()->mesh.lcMin);
-  l_t2 = std::max(l_t2, CTX::instance()->mesh.lcMin);
-  l_t1 = std::min(l_t1, CTX::instance()->mesh.lcMax);
-  l_t2 = std::min(l_t2, CTX::instance()->mesh.lcMax);
-  SMetric3 Metric (1./(l_t1*l_t1),1./(l_t2*l_t2),1./(l_n*l_n),t1,t2,n);
-  return Metric;
-}
-
-SMetric3 max_edge_curvature_metric(const GVertex *gv)
-{
-  SMetric3 val (1.e-12);
-  std::list<GEdge*> l_edges = gv->edges();
-  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
-       ite != l_edges.end(); ++ite){
-    GEdge *_myGEdge = *ite;
-    Range<double> range = _myGEdge->parBounds(0);
-    SMetric3 cc;
-    if (gv == _myGEdge->getBeginVertex()) {
-      SVector3 t = _myGEdge->firstDer(range.low());
-      t.normalize();
-      double l_t = ((2 * M_PI) /( fabs(_myGEdge->curvature(range.low()))
-				*  CTX::instance()->mesh.minCircPoints ));
-      double l_n = 1.e12;
-      cc = buildMetricTangentToCurve(t,l_t,l_n);
-    }
-    else {
-      SVector3 t = _myGEdge->firstDer(range.high());
-      t.normalize();
-      double l_t = ((2 * M_PI) /( fabs(_myGEdge->curvature(range.high()))
-				  *  CTX::instance()->mesh.minCircPoints ));
-      double l_n = 1.e12;
-      cc = buildMetricTangentToCurve(t,l_t,l_n);
-    }
-    val = intersection(val,cc);
-  }
-  return val;
-}
-
-SMetric3 max_edge_curvature_metric(const GEdge *ge, double u)
-{
-  SVector3 t =  ge->firstDer(u);
-  t.normalize();
-  double l_t = ((2 * M_PI) /( fabs(ge->curvature(u))
-			      *  CTX::instance()->mesh.minCircPoints ));
-  double l_n = 1.e12;
-  return buildMetricTangentToCurve(t,l_t,l_n);
-}
-
-static double max_edge_curvature(const GVertex *gv)
-{
-  double val = 0;
-  std::list<GEdge*> l_edges = gv->edges();
-  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
-       ite != l_edges.end(); ++ite){
-    GEdge *_myGEdge = *ite;
-    Range<double> range = _myGEdge->parBounds(0);
-    double cc;
-    if (gv == _myGEdge->getBeginVertex()) cc = _myGEdge->curvature(range.low());
-    else cc = _myGEdge->curvature(range.high());
-    val = std::max(val, cc);
-  }
-  return val;
-}
-
-static double max_surf_curvature(const GEdge *ge, double u)
-{
-  double val = 0;
-  std::list<GFace *> faces = ge->faces();
-  std::list<GFace *>::iterator it = faces.begin();
-  while(it != faces.end()){
-    if ((*it)->geomType() != GEntity::CompoundSurface &&
-        (*it)->geomType() != GEntity::DiscreteSurface){
-      SPoint2 par = ge->reparamOnFace((*it), u, 1);
-      double cc = (*it)->curvature(par);
-      val = std::max(cc, val);
-    }
-    ++it;
-  }
-  return val;
-}
-
-
-// static double max_surf_curvature_vertex(const GVertex *gv)
-// {
-//   double val = 0;
-//   std::list<GEdge*> l_edges = gv->edges();
-//   for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
-//        ite != l_edges.end(); ++ite){
-//     GEdge *_myGEdge = *ite;
-//     Range<double> bounds = _myGEdge->parBounds(0);
-//     if (gv == _myGEdge->getBeginVertex())
-//       val = std::max(val, max_surf_curvature(_myGEdge, bounds.low()));
-//     else
-//       val = std::max(val, max_surf_curvature(_myGEdge, bounds.high()));
-//   }
-//   return val;
-// }
-
-
-SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v,
-					   bool surface_isotropic,
-					   double d_normal ,
-					   double d_tangent_max)
-{
-  if (gf->geomType() == GEntity::Plane)return SMetric3(1.e-12);
-  double cmax, cmin;
-  SVector3 dirMax,dirMin;
-  cmax = gf->curvatures(SPoint2(u, v),&dirMax, &dirMin, &cmax,&cmin);
-  if (cmin == 0)cmin =1.e-12;
-  if (cmax == 0)cmax =1.e-12;
-  double lambda1 =  ((2 * M_PI) /( fabs(cmin) *  CTX::instance()->mesh.minCircPoints ) );
-  double lambda2 =  ((2 * M_PI) /( fabs(cmax) *  CTX::instance()->mesh.minCircPoints ) );
-  SVector3 Z = crossprod(dirMax,dirMin);
-  if (surface_isotropic)  lambda2 = lambda1 = std::min(lambda2,lambda1);
-  dirMin.normalize();
-  dirMax.normalize();
-  Z.normalize();
-  lambda1 = std::max(lambda1, CTX::instance()->mesh.lcMin);
-  lambda2 = std::max(lambda2, CTX::instance()->mesh.lcMin);
-  lambda1 = std::min(lambda1, CTX::instance()->mesh.lcMax);
-  lambda2 = std::min(lambda2, CTX::instance()->mesh.lcMax);
-  double lambda3 = std::min(d_normal, CTX::instance()->mesh.lcMax);
-  lambda3 = std::max(lambda3, CTX::instance()->mesh.lcMin);
-  lambda1 = std::min(lambda1, d_tangent_max);
-  lambda2 = std::min(lambda2, d_tangent_max);
-
-  SMetric3 curvMetric (1./(lambda1*lambda1),1./(lambda2*lambda2),
-		       1./(lambda3*lambda3),
-                       dirMin, dirMax, Z );
-  return curvMetric;
-}
-
-static SMetric3 metric_based_on_surface_curvature(const GEdge *ge, double u, bool iso_surf)
-{
-  const GEdgeCompound* ptrCompoundEdge = dynamic_cast<const GEdgeCompound*>(ge);
-  if (ptrCompoundEdge){
-    double cmax, cmin;
-    SVector3 dirMax,dirMin;
-    cmax = ptrCompoundEdge->curvatures(u,&dirMax, &dirMin, &cmax,&cmin);
-    if (cmin == 0)cmin =1.e-12;
-    if (cmax == 0)cmax =1.e-12;
-    double lambda2 =  ((2 * M_PI) /( fabs(cmax) *  CTX::instance()->mesh.minCircPoints ) );
-    double lambda1 =  ((2 * M_PI) /( fabs(cmin) *  CTX::instance()->mesh.minCircPoints ) );
-    SVector3 Z = crossprod(dirMax,dirMin);
-
-    lambda1 = std::max(lambda1, CTX::instance()->mesh.lcMin);
-    lambda2 = std::max(lambda2, CTX::instance()->mesh.lcMin);
-    lambda1 = std::min(lambda1, CTX::instance()->mesh.lcMax);
-    lambda2 = std::min(lambda2, CTX::instance()->mesh.lcMax);
-
-    SMetric3 curvMetric (1. / (lambda1 * lambda1), 1. / (lambda2 * lambda2),
-                         1.e-12, dirMin, dirMax, Z);
-    return curvMetric;
-  }
-  else{
-    SMetric3 mesh_size(1.e-12);
-    std::list<GFace *> faces = ge->faces();
-    std::list<GFace *>::iterator it = faces.begin();
-    // we choose the metric eigenvectors to be the ones
-    // related to the edge ...
-    SMetric3 curvMetric = max_edge_curvature_metric(ge, u);
-    while(it != faces.end()){
-      if (((*it)->geomType() != GEntity::CompoundSurface) &&
-          ((*it)->geomType() != GEntity::DiscreteSurface)){
-        SPoint2 par = ge->reparamOnFace((*it), u, 1);
-        SMetric3 m = metric_based_on_surface_curvature (*it, par.x(), par.y(), iso_surf);
-        curvMetric = intersection_conserveM1(curvMetric,m);
-      }
-      ++it;
-    }
-
-    return curvMetric;
-  }
-}
-
-static SMetric3 metric_based_on_surface_curvature(const GVertex *gv, bool iso_surf)
-{
-  SMetric3 mesh_size(1.e-15);
-  std::list<GEdge*> l_edges = gv->edges();
-  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
-       ite != l_edges.end(); ++ite){
-    GEdge *_myGEdge = *ite;
-    Range<double> bounds = _myGEdge->parBounds(0);
-
-    // ES: Added extra if condition to use the code below only with compund curves
-    // This is because we want to call the function
-    // metric_based_on_surface_curvature(const GEdge *ge, double u) for the case when
-    // ge is a compound edge
-    if (_myGEdge->geomType() == GEntity::CompoundCurve){
-      if (gv == _myGEdge->getBeginVertex())
-        mesh_size = intersection
-          (mesh_size,
-           metric_based_on_surface_curvature(_myGEdge, bounds.low(), iso_surf));
-      else
-        mesh_size = intersection
-          (mesh_size,
-           metric_based_on_surface_curvature(_myGEdge, bounds.high(), iso_surf));
-    }
-  }
-  return mesh_size;
-}
-
-// the mesh vertex is classified on a model vertex.  we compute the
-// maximum of the curvature of model faces surrounding this point if
-// it is classified on a model edge, we do the same for all model
-// faces surrounding it if it is on a model face, we compute the
-// curvature at this location
-
-static double LC_MVertex_CURV(GEntity *ge, double U, double V)
-{
-  double Crv = 0;
-  switch(ge->dim()){
-  case 0:
-    Crv = max_edge_curvature((const GVertex *)ge);
-    //Crv = std::max(max_surf_curvature_vertex((const GVertex *)ge), Crv);
-    // Crv = max_surf_curvature((const GVertex *)ge);
-    break;
-  case 1:
-    {
-      GEdge *ged = (GEdge *)ge;
-      Crv = ged->curvature(U);
-      Crv = std::max(Crv, max_surf_curvature(ged, U));
-      // Crv = max_surf_curvature(ged, U);
-    }
-    break;
-  case 2:
-    {
-      GFace *gf = (GFace *)ge;
-      Crv = gf->curvature(SPoint2(U, V));
-    }
-    break;
-  }
-  double lc = Crv > 0 ? 2 * M_PI / Crv / CTX::instance()->mesh.minCircPoints : MAX_LC;
-  return lc;
-}
-
-SMetric3 LC_MVertex_CURV_ANISO(GEntity *ge, double U, double V)
-{
-  bool iso_surf = CTX::instance()->mesh.lcFromCurvature == 2;
-
-  switch(ge->dim()){
-  case 0: return metric_based_on_surface_curvature((const GVertex *)ge, iso_surf);
-  case 1: return metric_based_on_surface_curvature((const GEdge *)ge, U, iso_surf);
-  case 2: return metric_based_on_surface_curvature((const GFace *)ge, U, V, iso_surf);
-  }
-  Msg::Error("Curvature control impossible to compute for a volume!");
-  return SMetric3();
-}
-
-// compute the mesh size at a given vertex due to prescribed sizes at
-// mesh vertices
-static double LC_MVertex_PNTS(GEntity *ge, double U, double V)
-{
-  switch(ge->dim()){
-  case 0:
-    {
-      GVertex *gv = (GVertex *)ge;
-      double lc = gv->prescribedMeshSizeAtVertex();
-      // FIXME we might want to remove this to make all lc treatment consistent
-      if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
-      return lc;
-    }
-  case 1:
-    {
-      GEdge *ged = (GEdge *)ge;
-      GVertex *v1 = ged->getBeginVertex();
-      GVertex *v2 = ged->getEndVertex();
-      if (v1 && v2){
-        Range<double> range = ged->parBounds(0);
-        double a = (U - range.low()) / (range.high() - range.low());
-        double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() +
-          (a) * v2->prescribedMeshSizeAtVertex() ;
-        // FIXME we might want to remove this to make all lc treatment consistent
-        if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
-        return lc;
-      }
-      else
-        return MAX_LC;
-    }
-  default:
-    return MAX_LC;
-  }
-}
-
-// This is the only function that is used by the meshers
-double BGM_MeshSize(GEntity *ge, double U, double V,
-                    double X, double Y, double Z)
-{
-  // default lc (mesh size == size of the model)
-  double l1 = CTX::instance()->lc;
-
-  // lc from points
-  double l2 = MAX_LC;
-  if(CTX::instance()->mesh.lcFromPoints && ge->dim() < 2)
-    l2 = LC_MVertex_PNTS(ge, U, V);
-
-  // lc from curvature
-  double l3 = MAX_LC;
-  if(CTX::instance()->mesh.lcFromCurvature && ge->dim() < 3)
-    l3 = LC_MVertex_CURV(ge, U, V);
-
-  // lc from fields
-  double l4 = MAX_LC;
-  FieldManager *fields = ge->model()->getFields();
-  if(fields->getBackgroundField() > 0){
-    Field *f = fields->get(fields->getBackgroundField());
-    if(f) l4 = (*f)(X, Y, Z, ge);
-  }
-
-  // take the minimum, then constrain by lcMin and lcMax
-  double lc = std::min(std::min(std::min(l1, l2), l3), l4);
-  lc = std::max(lc, CTX::instance()->mesh.lcMin);
-  lc = std::min(lc, CTX::instance()->mesh.lcMax);
-
-  if(lc <= 0.){
-    Msg::Error("Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)",
-               lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax);
-    lc = l1;
-  }
-
-  //Msg::Debug("BGM X,Y,Z=%g,%g,%g L4=%g L3=%g L2=%g L1=%g LC=%g LFINAL=%g DIM =%d ",
-  //X, Y, Z, l4, l3, l2, l1, lc, lc * CTX::instance()->mesh.lcFactor, ge->dim());
-
-  //Emi fix
-  //if (lc == l1) lc /= 10.;
-
-  return lc * CTX::instance()->mesh.lcFactor;
-}
-
-
-// anisotropic version of the background field
-SMetric3 BGM_MeshMetric(GEntity *ge,
-                        double U, double V,
-                        double X, double Y, double Z)
-{
-
-  // Metrics based on element size
-  // Element size  = min. between default lc and lc from point (if applicable), constrained by lcMin and lcMax
-  double lc = CTX::instance()->lc;
-  if(CTX::instance()->mesh.lcFromPoints && ge->dim() < 2) lc = std::min(lc, LC_MVertex_PNTS(ge, U, V));
-  lc = std::max(lc, CTX::instance()->mesh.lcMin);
-  lc = std::min(lc, CTX::instance()->mesh.lcMax);
-  if(lc <= 0.){
-    Msg::Error("Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)",
-               lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax);
-    lc = CTX::instance()->lc;
-  }
-  SMetric3 m0(1./(lc*lc));
-
-  // Intersect with metrics from fields if applicable
-  FieldManager *fields = ge->model()->getFields();
-  SMetric3 m1 = m0;
-  if(fields->getBackgroundField() > 0){
-    Field *f = fields->get(fields->getBackgroundField());
-    if(f) {
-      SMetric3 l4;
-      if (!f->isotropic()) (*f)(X, Y, Z, l4, ge);
-      else {
-        const double L = (*f)(X, Y, Z, ge);
-        l4 = SMetric3(1/(L*L));
-      }
-      m1 = intersection(l4, m0);
-    }
-  }
-
-  // Intersect with metrics from curvature if applicable
-  SMetric3 m = (CTX::instance()->mesh.lcFromCurvature && ge->dim() < 3) ?
-      intersection(m1, LC_MVertex_CURV_ANISO(ge, U, V)) : m1;
-
-  return m;
-
-}
-
-bool Extend1dMeshIn2dSurfaces()
-{
-  return CTX::instance()->mesh.lcExtendFromBoundary ? true : false;
-}
-
-bool Extend2dMeshIn3dVolumes()
-{
-  return CTX::instance()->mesh.lcExtendFromBoundary ? true : false;
-}
-
 void backgroundMesh::set(GFace *gf)
 {
   if (_current) delete _current;
@@ -509,7 +90,8 @@ backgroundMesh::backgroundMesh(GFace *_gf, bool cfd)
       else newv = it->second;
       news[j] = newv;
     }
-    _triangles.push_back(new MTriangle(news[0],news[1],news[2]));
+    MTriangle *T2D = new MTriangle(news[0],news[1],news[2]);
+    _triangles.push_back(T2D);
   }
 
 #if defined(HAVE_ANN)
@@ -569,8 +151,9 @@ backgroundMesh::~backgroundMesh()
 }
 
 static void propagateValuesOnFace(GFace *_gf,
-    std::map<MVertex*,double> &dirichlet,
-    bool in_parametric_plane = false)
+                                  std::map<MVertex*,double> &dirichlet,
+				  simpleFunction<double> *ONE,
+				  bool in_parametric_plane = false)
 {
 #if defined(HAVE_SOLVER)
   linearSystem<double> *_lsys = 0;
@@ -594,7 +177,6 @@ static void propagateValuesOnFace(GFace *_gf,
     myAssembler.fixVertex(itv->first, 0, 1, itv->second);
   }
 
-
   // Number vertices
   std::set<MVertex*> vs;
   for (unsigned int k = 0; k < _gf->triangles.size(); k++)
@@ -616,8 +198,7 @@ static void propagateValuesOnFace(GFace *_gf,
     myAssembler.numberVertex(*it, 0, 1);
 
   // Assemble
-  simpleFunction<double> ONE(1.0);
-  laplaceTerm l(0, 1, &ONE);
+  laplaceTerm l(0, 1, ONE);
   for (unsigned int k = 0; k < _gf->triangles.size(); k++){
     MTriangle *t = _gf->triangles[k];
     SElement se(t);
@@ -673,7 +254,8 @@ void backgroundMesh::propagate1dMesh(GFace *_gf)
     }
   }
 
-  propagateValuesOnFace(_gf, sizes);
+  simpleFunction<double> ONE(1.0);
+  propagateValuesOnFace(_gf, sizes,&ONE);
 
   std::map<MVertex*,MVertex*>::iterator itv2 = _2Dto3D.begin();
   for ( ; itv2 != _2Dto3D.end(); ++itv2){
@@ -765,16 +347,100 @@ void backgroundMesh::propagateCrossFieldByDistance(GFace *_gf)
 #endif
 }
 
-inline double myAngle (const SVector3 &a, const SVector3 &b, const SVector3 &d){
+inline double myAngle (const SVector3 &a, const SVector3 &b, const SVector3 &d)
+{
   double cosTheta = dot(a,b);
   double sinTheta = dot(crossprod(a,b),d);
   return atan2 (sinTheta,cosTheta);
 }
 
+// smoothness = h * (|grad (cos 4 a)| + |grad (sin 4 a)|)
+// smoothness is of order 1 if not smooth
+// smoothness is of order h/L if smooth
+// h --> mesh size
+// L --> domain size
+double backgroundMesh::getSmoothness(MElement *e)
+{
+  MVertex *v0 = _3Dto2D[e->getVertex(0)];
+  MVertex *v1 = _3Dto2D[e->getVertex(1)];
+  MVertex *v2 = _3Dto2D[e->getVertex(2)];
+  std::map<MVertex*,double> :: const_iterator i0 = _angles.find (v0);
+  std::map<MVertex*,double> :: const_iterator i1 = _angles.find (v1);
+  std::map<MVertex*,double> :: const_iterator i2 = _angles.find (v2);
+  double a[3] = {cos(4*i0->second),cos(4*i1->second),cos(4*i2->second)};
+  double b[3] = {sin(4*i0->second),sin(4*i1->second),sin(4*i2->second)};
+  //      printf("coucou\n");
+  double f[3];
+  e->interpolateGrad(a,0,0,0,f);
+  const double gradcos = sqrt (f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);
+  e->interpolateGrad(b,0,0,0,f);
+  //const double gradsin = sqrt (f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);
+  const double h = e->maxEdge();
+  return (gradcos /*+ gradsin*/) * h;
+}
+
+double backgroundMesh::getSmoothness(double u, double v, double w)
+{
+  MElement *e = _octree->find(u, v, w, 2, true);
+  if (!e) return -1.0;
+  MVertex *v0 = e->getVertex(0);
+  MVertex *v1 = e->getVertex(1);
+  MVertex *v2 = e->getVertex(2);
+  std::map<MVertex*,double> :: const_iterator i0 = _angles.find (v0);
+  std::map<MVertex*,double> :: const_iterator i1 = _angles.find (v1);
+  std::map<MVertex*,double> :: const_iterator i2 = _angles.find (v2);
+  double a[3] = {cos(4*i0->second),cos(4*i1->second),cos(4*i2->second)};
+  double b[3] = {sin(4*i0->second),sin(4*i1->second),sin(4*i2->second)};
+  //      printf("coucou\n");
+  double f[3];
+  e->interpolateGrad(a,0,0,0,f);
+  const double gradcos = sqrt (f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);
+  e->interpolateGrad(b,0,0,0,f);
+  //const double gradsin = sqrt (f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);
+  const double h = e->maxEdge();
+  return (gradcos /*+ gradsin*/) * h;
+}
 
 void backgroundMesh::propagateCrossField(GFace *_gf)
 {
+  propagateCrossFieldHJ (_gf);
+  // solve the non liear problem
+  constantPerElement<double> C;
+  int ITER = 0;
+  //  int NSMOOTH = _gf->triangles.size();
+  while(0){
+    //    int NSMOOTH_NOW = 0;
+    for (unsigned int i = 0; i < _gf->triangles.size(); i++){
+      double smoothness = getSmoothness (_gf->triangles[i]);
+      double val = smoothness < .5 ? 1.0 : 1.e-3 ;//exp(-absf/10);
+      C.set(_gf->triangles[i],val);
+    }
+    //    if (NSMOOTH_NOW == NSMOOTH) break;
+    //    NSMOOTH = NSMOOTH_NOW;
+    //    break;
+    _angles.clear();
+    propagateCrossField (_gf,&C);
+    if (++ITER > 0)break;
+  }
+  //  printf("converged in %d iterations\n", ITER);
+#if 0 // debug print
+  char name[256];
+  sprintf(name, "cross-%d-%d.pos", _gf->tag(), ITER);
+  print(name, 0, 1);
+  sprintf(name, "smooth-%d-%d.pos", _gf->tag(), ITER);
+  print(name, _gf, 2);
+#endif
+}
 
+void backgroundMesh::propagateCrossFieldHJ(GFace *_gf)
+{
+  simpleFunction<double> ONE(1.0);
+  propagateCrossField (_gf, &ONE);
+
+}
+
+void backgroundMesh::propagateCrossField(GFace *_gf, simpleFunction<double> *ONE)
+{
   std::map<MVertex*,double> _cosines4,_sines4;
 
   std::list<GEdge*> e;
@@ -816,8 +482,8 @@ void backgroundMesh::propagateCrossField(GFace *_gf)
     }
   }
 
-  propagateValuesOnFace(_gf,_cosines4,false);
-  propagateValuesOnFace(_gf,_sines4,false);
+  propagateValuesOnFace(_gf,_cosines4,ONE,false);
+  propagateValuesOnFace(_gf,_sines4,ONE,false);
 
   std::map<MVertex*,MVertex*>::iterator itv2 = _2Dto3D.begin();
   for ( ; itv2 != _2Dto3D.end(); ++itv2){
@@ -863,7 +529,7 @@ void backgroundMesh::updateSizes(GFace *_gf)
     }
   }
   const double _beta = 1.3;
-  for (int i=0;i<0;i++){
+  for (int i=0;i<3;i++){
     std::set<MEdge,Less_Edge>::iterator it = edges.begin();
     for ( ; it != edges.end(); ++it){
       MVertex *v0 = it->getVertex(0);
@@ -980,39 +646,57 @@ double backgroundMesh::getAngle(double u, double v, double w) const
 }
 
 void backgroundMesh::print(const std::string &filename, GFace *gf,
-    const std::map<MVertex*,double> &_whatToPrint) const
+                           const std::map<MVertex*,double> &_whatToPrint, int smooth)
 {
-  FILE *f = Fopen (filename.c_str(),"w");
-  fprintf(f,"View \"Background Mesh\"{\n");
-  for(unsigned int i=0;i<_triangles.size();i++){
-    MVertex *v1 = _triangles[i]->getVertex(0);
-    MVertex *v2 = _triangles[i]->getVertex(1);
-    MVertex *v3 = _triangles[i]->getVertex(2);
-    std::map<MVertex*,double>::const_iterator itv1 = _whatToPrint.find(v1);
-    std::map<MVertex*,double>::const_iterator itv2 = _whatToPrint.find(v2);
-    std::map<MVertex*,double>::const_iterator itv3 = _whatToPrint.find(v3);
-    if (!gf){
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+  fprintf(f, "View \"Background Mesh\"{\n");
+  if (smooth){
+    for(unsigned int i = 0; i < gf->triangles.size(); i++){
+      MVertex *v1 = gf->triangles[i]->getVertex(0);
+      MVertex *v2 = gf->triangles[i]->getVertex(1);
+      MVertex *v3 = gf->triangles[i]->getVertex(2);
+      double x = getSmoothness (gf->triangles[i]);
       fprintf(f,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n",
-          v1->x(),v1->y(),v1->z(),
-          v2->x(),v2->y(),v2->z(),
-          v3->x(),v3->y(),v3->z(),itv1->second,itv2->second,itv3->second);
+	      v1->x(), v1->y(), v1->z(),
+	      v2->x(), v2->y(), v2->z(),
+	      v3->x(), v3->y(), v3->z(), x, x, x);
     }
-    else {
-
-      GPoint p1 = gf->point(SPoint2(v1->x(),v1->y()));
-      GPoint p2 = gf->point(SPoint2(v2->x(),v2->y()));
-      GPoint p3 = gf->point(SPoint2(v3->x(),v3->y()));
-      fprintf(f,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n",
-          p1.x(),p1.y(),p1.z(),
-          p2.x(),p2.y(),p2.z(),
-          p3.x(),p3.y(),p3.z(),itv1->second,itv2->second,itv3->second);
+  }
+  else {
+    for(unsigned int i = 0; i < _triangles.size(); i++){
+      MVertex *v1 = _triangles[i]->getVertex(0);
+      MVertex *v2 = _triangles[i]->getVertex(1);
+      MVertex *v3 = _triangles[i]->getVertex(2);
+      std::map<MVertex*,double>::const_iterator itv1 = _whatToPrint.find(v1);
+      std::map<MVertex*,double>::const_iterator itv2 = _whatToPrint.find(v2);
+      std::map<MVertex*,double>::const_iterator itv3 = _whatToPrint.find(v3);
+      if (!gf){
+	fprintf(f,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n",
+		v1->x(), v1->y(), v1->z(),
+		v2->x(), v2->y(), v2->z(),
+		v3->x(), v3->y(), v3->z(), itv1->second, itv2->second, itv3->second);
+      }
+      else {
+	GPoint p1 = gf->point(SPoint2(v1->x(),v1->y()));
+	GPoint p2 = gf->point(SPoint2(v2->x(),v2->y()));
+	GPoint p3 = gf->point(SPoint2(v3->x(),v3->y()));
+	fprintf(f,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n",
+		p1.x(), p1.y(), p1.z(),
+		p2.x(), p2.y(), p2.z(),
+		p3.x(), p3.y(), p3.z(), itv1->second, itv2->second, itv3->second);
+      }
     }
   }
-  fprintf(f,"};\n");
+  fprintf(f, "};\n");
   fclose(f);
 }
 
 MElementOctree* backgroundMesh::get_octree(){
+
   return _octree;
 }
 
diff --git a/Mesh/BackgroundMesh.h b/Mesh/BackgroundMesh.h
index 69526e3..7080c95 100644
--- a/Mesh/BackgroundMesh.h
+++ b/Mesh/BackgroundMesh.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,31 +6,30 @@
 #ifndef _BACKGROUND_MESH_H_
 #define _BACKGROUND_MESH_H_
 
-#include "STensor3.h"
+#include <math.h>
 #include <vector>
 #include <list>
 #include "simpleFunction.h"
+#include "BackgroundMeshTools.h"
 
 #if defined(HAVE_ANN)
-#include <ANN/ANN.h>
+#include "ANN/ANN.h"
 class ANNkd_tree;
 #endif
 
 class MElementOctree;
 class GFace;
-class GVertex;
 class GEdge;
 class MElement;
 class MVertex;
-class GEntity;
 
-struct crossField2d 
+struct crossField2d
 {
   double _angle;
   static void normalizeAngle (double &angle) {
-    if (angle < 0) 
+    if (angle < 0)
       while ( angle <  0 ) angle += (M_PI * .5);
-    else if (angle >= M_PI * .5) 
+    else if (angle >= M_PI * .5)
       while ( angle >= M_PI * .5 ) angle -= (M_PI * .5);
   }
   crossField2d (MVertex*, GEdge*);
@@ -45,11 +44,11 @@ class backgroundMesh : public simpleFunction<double>
   MElementOctree *_octree;
   std::vector<MVertex*> _vertices;
   std::vector<MElement*> _triangles;
-  std::map<MVertex*,double> _sizes;  
+  std::map<MVertex*,double> _sizes;
   std::map<MVertex*,MVertex*> _3Dto2D;
   std::map<MVertex*,MVertex*> _2Dto3D;
-  std::map<MVertex*,double> _distance;  
-  std::map<MVertex*,double> _angles;  
+  std::map<MVertex*,double> _distance;
+  std::map<MVertex*,double> _angles;
   static backgroundMesh * _current;
   backgroundMesh(GFace *, bool dist = false);
   ~backgroundMesh();
@@ -69,18 +68,23 @@ class backgroundMesh : public simpleFunction<double>
   static backgroundMesh *current () { return _current; }
   static void setSizeFactor (double s) {sizeFactor = s;}
   void propagate1dMesh(GFace *);
+  void propagateCrossField(GFace *, simpleFunction<double> *);
+  void propagateCrossFieldHJ(GFace *);
   void propagateCrossField(GFace *);
   void propagateCrossFieldByDistance(GFace *);
   void updateSizes(GFace *);
   double operator () (double u, double v, double w) const; // returns mesh size
   bool inDomain (double u, double v, double w) const; // returns true if in domain
-  double getAngle(double u, double v, double w) const ; 
-  void print(const std::string &filename, GFace *gf, 
-              const std::map<MVertex*, double>&) const;
-  void print(const std::string &filename, GFace *gf, int choice = 0) const
+  double getAngle(double u, double v, double w) const ;
+  double getSmoothness(double u, double v, double w)  ;
+  double getSmoothness(MElement*) ;
+  void print(const std::string &filename, GFace *gf,
+	     const std::map<MVertex*, double>&, int smooth = 0) ;
+  void print(const std::string &filename, GFace *gf, int choice = 0)
   {
     switch(choice) {
     case 0 : print(filename, gf, _sizes); return;
+    case 2 : print(filename, gf, _sizes, 1); return;
     default : print(filename, gf, _angles); return;
     }
   }
@@ -97,17 +101,4 @@ class backgroundMesh : public simpleFunction<double>
   std::vector<MElement*>::const_iterator end_triangles()const{return _triangles.end();}
 };
 
-SMetric3 buildMetricTangentToCurve (SVector3 &t, double l_t, double l_n);
-SMetric3 buildMetricTangentToSurface (SVector3 &t1, SVector3 &t2, double l_t1, double l_t2, double l_n);
-double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double Z);
-SMetric3 BGM_MeshMetric(GEntity *ge, double U, double V, double X, double Y, double Z);
-bool Extend1dMeshIn2dSurfaces();
-bool Extend2dMeshIn3dVolumes();
-SMetric3 max_edge_curvature_metric(const GVertex *gv);
-SMetric3 max_edge_curvature_metric(const GEdge *ge, double u, double &l);
-SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v, 
-					   bool surface_isotropic = false,
-					   double d_normal = 1.e12,
-					   double d_tangent_max = 1.e12);
-
 #endif
diff --git a/Mesh/BackgroundMesh2D.cpp b/Mesh/BackgroundMesh2D.cpp
new file mode 100644
index 0000000..c023bc0
--- /dev/null
+++ b/Mesh/BackgroundMesh2D.cpp
@@ -0,0 +1,734 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "BackgroundMesh2D.h"
+#include "BackgroundMeshTools.h"
+
+#include "GmshMessage.h"
+#include "GModel.h"
+#include "GVertex.h"
+#include "GEdge.h"
+#include "GEdgeCompound.h"
+#include "GFace.h"
+#include "GFaceCompound.h"
+#include "MElement.h"
+#include "MElementOctree.h"
+#include "MTriangle.h"
+#include "MVertex.h"
+#include "Numeric.h"
+#include "MLine.h"
+#include "MTriangle.h"
+#include "Field.h"
+#include "OS.h"
+#include "Context.h"
+#include "meshGFaceOptimize.h"
+
+#if defined(HAVE_SOLVER)
+#include "dofManager.h"
+#include "laplaceTerm.h"
+#include "linearSystemGMM.h"
+#include "linearSystemCSR.h"
+#include "linearSystemFull.h"
+#include "linearSystemPETSc.h"
+#endif
+
+class evalDiffusivityFunction : public simpleFunction<double>{
+public:
+  evalDiffusivityFunction(frameFieldBackgroundMesh2D *_bgm, double t=0.95)
+    : bgm(_bgm),threshold(t){};
+  double operator () (double u, double v, double w) const
+  {
+    return ((bgm->get_smoothness(u,v) >= threshold) ? 1. : 1.e-3);
+  }
+private:
+  frameFieldBackgroundMesh2D *bgm;
+  const double threshold;
+};
+
+//TODO: move this fct ???
+/* applies rotations of amplitude pi to set the
+   angle in the first quadrant (in [0,pi/2[ ) */
+void normalizeAngle(double &angle)
+{
+  if (angle < 0)
+    while ( angle <  0 ) angle += (M_PI * .5);
+  else if (angle >= M_PI * .5)
+    while ( angle >= M_PI * .5 ) angle -= (M_PI * .5);
+}
+
+void backgroundMesh2D::create_face_mesh()
+{
+  quadsToTriangles(dynamic_cast<GFace*>(gf), 100000);
+
+  // storing the initial mesh from GFace
+  tempTR.clear();
+  GFace *face = dynamic_cast<GFace*>(gf);
+  for(unsigned int i = 0; i < face->triangles.size(); i++)
+    tempTR.push_back(new MTriangle(face->triangles[i]->getVertex(0), face->triangles[i]->getVertex(1), face->triangles[i]->getVertex(2)));
+
+  // avoid computing curvatures on the fly : only on the
+  // BGM computes once curvatures at each node
+  //  Disable curvature control
+  int CurvControl = CTX::instance()->mesh.lcFromCurvature;
+  CTX::instance()->mesh.lcFromCurvature = 0;
+  //  Create a background mesh
+  bowyerWatson(face,4000);
+  //  Re-enable curv control if asked
+  CTX::instance()->mesh.lcFromCurvature = CurvControl;
+
+  // creates a copy of GFace's vertices and triangles
+  create_mesh_copy();
+}
+
+
+MElementOctree* backgroundMesh2D::getOctree()
+{
+  if(!octree){
+    Msg::Debug("Rebuilding BackgroundMesh element octree");
+    octree = new MElementOctree(elements);
+  }
+  return octree;
+}
+
+const MElement* backgroundMesh2D::getElement(unsigned int i)const
+{
+  return elements[i];
+}
+
+void backgroundMesh2D::reset(bool erase_2D3D)
+{
+  unset();
+
+  // create face mesh - this was previously done for old backgroundmesh in buildBackGroundMesh !
+  create_face_mesh();
+
+  // computes the mesh sizes at nodes
+  if (CTX::instance()->mesh.lcFromPoints){
+    computeSizeField();
+  }
+  else
+    for (std::map<MVertex*, MVertex*>::iterator itv2 = _2Dto3D.begin() ; itv2 != _2Dto3D.end(); ++itv2)
+      sizeField[itv2->first] = CTX::instance()->mesh.lcMax;
+
+  // ensure that other criteria are fullfilled
+  updateSizes();
+
+  if (erase_2D3D){
+    _3Dto2D.clear();
+    _2Dto3D.clear();
+  }
+}
+
+
+void backgroundMesh2D::unset(){
+  for (unsigned int i = 0; i < vertices.size(); i++) delete vertices[i];
+  for (unsigned int i = 0; i < getNumMeshElements(); i++) delete elements[i];
+  if (octree)delete octree;
+  octree=NULL;
+}
+
+
+void backgroundMesh2D::create_mesh_copy(){
+  // TODO: useful to extend it to other elements ???
+  //std::set<SPoint2> myBCNodes;
+  GFace *face = dynamic_cast<GFace*>(gf);
+  for (unsigned int i = 0; i < face->triangles.size(); i++){
+    MTriangle *e = face->triangles[i];
+    MVertex *news[3];
+    for (int j=0;j<3;j++){
+      MVertex *v = e->getVertex(j);
+      std::map<MVertex*,MVertex*>::iterator it = _3Dto2D.find(v);
+      MVertex *newv =0;
+      if (it == _3Dto2D.end()){
+        SPoint2 p;
+        reparamMeshVertexOnFace(v, face, p);
+        newv = new MVertex (p.x(), p.y(), 0.0);// creates new vertex with xyz= u,v,0.
+        vertices.push_back(newv);
+        _3Dto2D[v] = newv;
+        _2Dto3D[newv] = v;
+        //if(v->onWhat()->dim()<2) myBCNodes.insert(p);
+      }
+      else newv = it->second;
+      news[j] = newv;
+    }
+    elements.push_back(new MTriangle(news[0],news[1],news[2]));
+  }
+}
+
+
+GPoint backgroundMesh2D::get_GPoint_from_MVertex(const MVertex *v)const{
+  return dynamic_cast<GFace*>(gf)->point(SPoint2(v->x(),v->y()));
+}
+
+
+backgroundMesh2D::backgroundMesh2D(GFace *_gf, bool erase_2D3D):BGMBase(2,_gf),sizeFactor(1.)
+{
+  reset(erase_2D3D);
+
+  if (erase_2D3D){
+    // now, the new mesh has been copied in local in backgroundMesh2D, deleting the mesh
+    // from GFace, back to the previous one !
+    GFace *face = dynamic_cast<GFace*>(gf);
+    face->triangles = tempTR;
+  }
+}
+
+backgroundMesh2D::~backgroundMesh2D()
+{
+  unset();
+}
+
+
+void backgroundMesh2D::propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane){
+#if defined(HAVE_SOLVER)
+  linearSystem<double> *_lsys = 0;
+#if defined(HAVE_PETSC) && !defined(HAVE_TAUCS)
+  _lsys = new linearSystemPETSc<double>;
+#elif defined(HAVE_GMM) && !defined(HAVE_TAUCS)
+  linearSystemGmm<double> *_lsysb = new linearSystemGmm<double>;
+  _lsysb->setGmres(1);
+  _lsys = _lsysb;
+#elif defined(HAVE_TAUCS)
+  _lsys = new linearSystemCSRTaucs<double>;
+#else
+  _lsys = new linearSystemFull<double>;
+#endif
+
+  dofManager<double> myAssembler(_lsys);
+
+  // fix boundary conditions
+  DoubleStorageType::iterator itv = dirichlet.begin();
+  for ( ; itv != dirichlet.end(); ++itv){
+    myAssembler.fixVertex(itv->first, 0, 1, itv->second);
+  }
+
+  // Number vertices
+  std::set<MVertex*> vs;
+  GFace *face = dynamic_cast<GFace*>(gf);
+  for (unsigned int k = 0; k < face->triangles.size(); k++)
+    for (int j=0;j<3;j++)vs.insert(face->triangles[k]->getVertex(j));
+  for (unsigned int k = 0; k < face->quadrangles.size(); k++)
+    for (int j=0;j<4;j++)vs.insert(face->quadrangles[k]->getVertex(j));
+
+
+  std::map<MVertex*,SPoint3> theMap;
+  if ( in_parametric_plane) {
+    for (std::set<MVertex*>::iterator it = vs.begin(); it != vs.end(); ++it){
+      SPoint2 p;
+      reparamMeshVertexOnFace ( *it, face, p);
+      theMap[*it] = SPoint3((*it)->x(),(*it)->y(),(*it)->z());
+      (*it)->setXYZ(p.x(),p.y(),0.0);
+    }
+  }
+
+  for (std::set<MVertex*>::iterator it = vs.begin(); it != vs.end(); ++it)
+    myAssembler.numberVertex(*it, 0, 1);
+
+  // Assemble
+  laplaceTerm l(0, 1, &eval_diffusivity);
+  for (unsigned int k = 0; k < face->triangles.size(); k++){
+    MTriangle *t = face->triangles[k];
+    SElement se(t);
+    l.addToMatrix(myAssembler, &se);
+  }
+
+  // Solve
+  if (myAssembler.sizeOfR()){
+    _lsys->systemSolve();
+  }
+
+  // save solution
+  for (std::set<MVertex*>::iterator it = vs.begin(); it != vs.end(); ++it){
+    myAssembler.getDofValue(*it, 0, 1, dirichlet[*it]);
+  }
+
+  if ( in_parametric_plane) {
+    for (std::set<MVertex*>::iterator it = vs.begin(); it != vs.end(); ++it){
+      SPoint3 p = theMap[(*it)];
+      (*it)->setXYZ(p.x(),p.y(),p.z());
+    }
+  }
+  delete _lsys;
+#endif
+}
+
+
+void backgroundMesh2D::computeSizeField(){
+  GFace *face = dynamic_cast<GFace*>(gf);
+  list<GEdge*> e;// = face->edges();
+  replaceMeshCompound(face, e);
+  list<GEdge*>::const_iterator it = e.begin();
+  DoubleStorageType sizes;
+
+  for( ; it != e.end(); ++it ){
+    if (!(*it)->isSeam(face)){
+      for(unsigned int i = 0; i < (*it)->lines.size(); i++ ){
+        MVertex *v1 = (*it)->lines[i]->getVertex(0);
+        MVertex *v2 = (*it)->lines[i]->getVertex(1);
+        if (v1 != v2){
+          double d = sqrt((v1->x() - v2->x()) * (v1->x() - v2->x()) +
+              (v1->y() - v2->y()) * (v1->y() - v2->y()) +
+              (v1->z() - v2->z()) * (v1->z()  -v2->z()));
+          for (int k=0;k<2;k++){
+            MVertex *v = (*it)->lines[i]->getVertex(k);
+            DoubleStorageType::iterator itv = sizes.find(v);
+            if (itv == sizes.end())
+              sizes[v] = log(d);
+            else
+              itv->second = 0.5 * (itv->second + log(d));
+          }
+        }
+      }
+    }
+  }
+
+  simpleFunction<double> ONE(1.0);
+  propagateValues(sizes,ONE);
+
+  std::map<MVertex*,MVertex*>::iterator itv2 = _2Dto3D.begin();
+  for ( ; itv2 != _2Dto3D.end(); ++itv2){
+    MVertex *v_2D = itv2->first;
+    MVertex *v_3D = itv2->second;
+    sizeField[v_2D] = exp(sizes[v_3D]);
+  }
+}
+
+
+inline double myAngle (const SVector3 &a, const SVector3 &b, const SVector3 &d){
+  double cosTheta = dot(a,b);
+  double sinTheta = dot(crossprod(a,b),d);
+  return atan2 (sinTheta,cosTheta);
+}
+
+
+void backgroundMesh2D::updateSizes(){
+  DoubleStorageType::iterator itv = sizeField.begin();
+  for ( ; itv != sizeField.end(); ++itv){
+    SPoint2 p;
+    MVertex *v = _2Dto3D[itv->first];
+    double lc;
+    if (v->onWhat()->dim() == 0){
+      lc = sizeFactor * BGM_MeshSize(v->onWhat(), 0,0,v->x(),v->y(),v->z());
+    }
+    else if (v->onWhat()->dim() == 1){
+      double u;
+      v->getParameter(0, u);
+      lc = sizeFactor * BGM_MeshSize(v->onWhat(), u, 0, v->x(), v->y(), v->z());
+    }
+    else{
+      GFace *face = dynamic_cast<GFace*>(gf);
+      reparamMeshVertexOnFace(v, face, p);
+      lc = sizeFactor * BGM_MeshSize(face, p.x(), p.y(), v->x(), v->y(), v->z());
+    }
+    // printf("2D -- %g %g 3D -- %g %g\n",p.x(),p.y(),v->x(),v->y());
+    itv->second = min(lc,itv->second);
+    itv->second = max(itv->second,  sizeFactor * CTX::instance()->mesh.lcMin);
+    itv->second = min(itv->second,  sizeFactor * CTX::instance()->mesh.lcMax);
+  }
+  // do not allow large variations in the size field
+  // (Int. J. Numer. Meth. Engng. 43, 1143-1165 (1998) MESH GRADATION
+  // CONTROL, BOROUCHAKI, HECHT, FREY)
+  std::set<MEdge,Less_Edge> edges;
+  for (unsigned int i = 0; i < getNumMeshElements(); i++){
+    for (int j = 0; j < getElement(i)->getNumEdges(); j++){
+      edges.insert(getElement(i)->getEdge(j));
+    }
+  }
+  const double _beta = 1.3;
+  for (int i=0;i<0;i++){
+    std::set<MEdge,Less_Edge>::iterator it = edges.begin();
+    for ( ; it != edges.end(); ++it){
+      MVertex *v0 = it->getVertex(0);
+      MVertex *v1 = it->getVertex(1);
+      MVertex *V0 = _2Dto3D[v0];
+      MVertex *V1 = _2Dto3D[v1];
+      DoubleStorageType::iterator s0 = sizeField.find(V0);
+      DoubleStorageType::iterator s1 = sizeField.find(V1);
+      if (s0->second < s1->second)s1->second = min(s1->second,_beta*s0->second);
+      else s0->second = min(s0->second,_beta*s1->second);
+    }
+  }
+}
+
+
+
+
+
+frameFieldBackgroundMesh2D::frameFieldBackgroundMesh2D(GFace *_gf):backgroundMesh2D(_gf,false)
+{
+  reset();
+
+  // now, the new mesh has been copied in local in backgroundMesh2D, deleting the mesh
+  // from GFace, back to the previous one !
+  GFace *face = dynamic_cast<GFace*>(gf);
+  face->triangles = tempTR;
+}
+
+frameFieldBackgroundMesh2D::~frameFieldBackgroundMesh2D(){}
+
+void frameFieldBackgroundMesh2D::reset(bool erase_2D3D)
+{
+  // computes cross field
+  simpleFunction<double> ONE(1.0);
+  computeCrossField(ONE);
+  computeSmoothness();
+
+//  evalDiffusivityFunction eval_diff(this);
+//  exportSmoothness("smoothness_iter_0.pos");
+//  for (int i=1;i<30;i++){
+//    computeCrossField(eval_diff);
+//    computeSmoothness();
+//
+//    stringstream ss;
+//    ss << "smoothness_iter_" << i << ".pos";
+//    exportSmoothness(ss.str());
+//
+//    stringstream sscf;
+//    sscf << "crossfield_iter_" << i << ".pos";
+//    exportCrossField(sscf.str());
+//  }
+
+  if (erase_2D3D){
+    _3Dto2D.clear();
+    _2Dto3D.clear();
+  }
+}
+
+double frameFieldBackgroundMesh2D::get_smoothness(MVertex *v)
+{
+  return get_nodal_value(v,smoothness);
+}
+
+double frameFieldBackgroundMesh2D::get_smoothness(double u, double v)
+{
+  return get_field_value(u,v,0.,smoothness);
+}
+
+double frameFieldBackgroundMesh2D::angle(MVertex *v)
+{
+  return get_nodal_value(v,angles);
+}
+
+double frameFieldBackgroundMesh2D::angle(double u, double v)
+{
+  MElement *e = const_cast<MElement*>(findElement(u, v));
+  if (!e) return -1000.0;
+  std::vector<double> val = get_nodal_values(e,angles);
+  std::vector<double> element_uvw = get_element_uvw_from_xyz(e,u,v,0.);
+  std::vector<double> cosvalues(e->getNumVertices()), sinvalues(e->getNumVertices());
+  for (int i=0;i<e->getNumVertices();i++){
+    cosvalues[i]=cos(4*val[i]);
+    sinvalues[i]=sin(4*val[i]);
+  }
+  double cos4 = e->interpolate(&cosvalues[0], element_uvw[0], element_uvw[1], element_uvw[2], 1, order);
+  double sin4 = e->interpolate(&sinvalues[0], element_uvw[0], element_uvw[1], element_uvw[2], 1, order);
+  double a = atan2(sin4,cos4)/4.0;
+  normalizeAngle (a);
+  return a;
+}
+
+void frameFieldBackgroundMesh2D::computeCrossField(simpleFunction<double> &eval_diffusivity)
+{
+  angles.clear();
+
+  DoubleStorageType _cosines4,_sines4;
+
+  list<GEdge*> e;
+  GFace *face = dynamic_cast<GFace*>(gf);
+  replaceMeshCompound(face, e);
+
+  list<GEdge*>::const_iterator it = e.begin();
+
+  for( ; it != e.end(); ++it ){
+    if (!(*it)->isSeam(face)){
+      for(unsigned int i = 0; i < (*it)->lines.size(); i++ ){
+        MVertex *v[2];
+        v[0] = (*it)->lines[i]->getVertex(0);
+        v[1] = (*it)->lines[i]->getVertex(1);
+        SPoint2 p1,p2;
+        reparamMeshEdgeOnFace(v[0],v[1],face,p1,p2);
+        Pair<SVector3, SVector3> der = face->firstDer((p1+p2)*.5);
+        SVector3 t1 = der.first();
+        SVector3 t2 = der.second();
+        SVector3 n = crossprod(t1,t2);
+        n.normalize();
+        SVector3 d1(v[1]->x()-v[0]->x(),v[1]->y()-v[0]->y(),v[1]->z()-v[0]->z());
+        t1.normalize();
+        d1.normalize();
+        double _angle = myAngle (t1,d1,n);
+        normalizeAngle (_angle);
+        for (int i=0;i<2;i++){
+          DoubleStorageType::iterator itc = _cosines4.find(v[i]);
+          DoubleStorageType::iterator its = _sines4.find(v[i]);
+          if (itc != _cosines4.end()){
+            itc->second  = 0.5*(itc->second + cos(4*_angle));
+            its->second  = 0.5*(its->second + sin(4*_angle));
+          }
+          else {
+            _cosines4[v[i]] = cos(4*_angle);
+            _sines4[v[i]] = sin(4*_angle);
+          }
+        }
+      }
+    }
+  }
+
+  propagateValues(_cosines4,eval_diffusivity,false);
+  propagateValues(_sines4,eval_diffusivity,false);
+
+  std::map<MVertex*,MVertex*>::iterator itv2 = _2Dto3D.begin();
+  for ( ; itv2 != _2Dto3D.end(); ++itv2){
+    MVertex *v_2D = itv2->first;
+    MVertex *v_3D = itv2->second;
+    double angle = atan2(_sines4[v_3D],_cosines4[v_3D]) / 4.0;
+    normalizeAngle (angle);
+    angles[v_2D] = angle;
+  }
+}
+
+void frameFieldBackgroundMesh2D::eval_crossfield(double u, double v, STensor3 &cf)
+{
+  double quadAngle  = angle(u,v);
+  Pair<SVector3, SVector3> dirs = compute_crossfield_directions(u,v,quadAngle);
+  SVector3 n = crossprod(dirs.first(),dirs.second());
+
+  for (int i=0;i<3;i++){
+    cf(i,0) = dirs.first()[i];
+    cf(i,1) = dirs.second()[i];
+    cf(i,2) = n[i];
+  }
+
+  //  SVector3 t1,t2,n;
+  //  GFace *face = dynamic_cast<GFace*>(gf);
+  //  Pair<SVector3, SVector3> der = face->firstDer(SPoint2(u,v));
+  //  SVector3 s1 = der.first();
+  //  SVector3 s2 = der.second();
+  //  n = crossprod(s1,s2);
+  //  n.normalize();
+  //  s1.normalize();
+  //  s2=crossprod(n,s1);
+  //  t1 = s1 * cos(quadAngle) + s2 * sin(quadAngle) ;
+  //  t1.normalize();
+  //  t2 = crossprod(n,t1);
+  //  for (int i=0;i<3;i++){
+  //    cf(i,0) = t1[i];
+  //    cf(i,1) = t2[i];
+  //    cf(i,2) = n[i];
+  //  }
+}
+
+void frameFieldBackgroundMesh2D::eval_crossfield(MVertex *vert, STensor3 &cf)
+{
+  SPoint2 parampoint;
+  GFace *face = dynamic_cast<GFace*>(gf);
+  reparamMeshVertexOnFace(vert, face, parampoint);
+  return eval_crossfield(parampoint[0], parampoint[1], cf);
+}
+
+void frameFieldBackgroundMesh2D::computeSmoothness()
+{
+  smoothness.clear();
+
+  // build vertex -> neighbors table
+  std::multimap<MVertex*,MVertex*> vertex2vertex;
+  for (std::vector<MElement*>::iterator it = beginelements();it!=endelements();it++){
+    MElement *e = *it;
+    for (int i=0;i<e->getNumVertices();i++){
+      MVertex *current = e->getVertex(i);
+      for (int j=0;j<e->getNumVertices();j++){
+        if (i==j) continue;
+        MVertex *neighbor = e->getVertex(j);
+        vertex2vertex.insert(make_pair(current,neighbor));
+      }
+    }
+  }
+
+  // compute smoothness
+  for (std::vector<MVertex*>::iterator it = beginvertices();it!=endvertices();it++){
+    MVertex *v = *it;
+    double angle_current = angle(v);
+    // compare to all neighbors...
+    std::pair<std::multimap<MVertex*,MVertex*>::iterator, std::multimap<MVertex*,MVertex*>::iterator> range = vertex2vertex.equal_range(v);
+    double minangle,totalangle=0.;
+    int N=0;
+    for (std::multimap<MVertex*,MVertex*>::iterator itneighbor = range.first;itneighbor!=range.second;itneighbor++){
+      N++;
+      minangle=M_PI/2;
+      MVertex *v_nb = itneighbor->second;
+      double angle_nb = angle(v_nb);
+      // angle comparison...
+      minangle = std::min(minangle, fabs(angle_current-angle_nb));
+      minangle = std::min(minangle, fabs(angle_current-(angle_nb+M_PI/2.)));
+      minangle = std::min(minangle, fabs(angle_current-(angle_nb-M_PI/2.)));
+      totalangle += minangle;
+    }
+    totalangle /= N;
+    smoothness[v] = 1. - (totalangle/M_PI*2);
+  }
+}
+
+void frameFieldBackgroundMesh2D::exportCrossField(const std::string &filename)
+{
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+  fprintf(f,"View \"Cross Field\"{\n");
+  std::vector<double> deltas(2);
+  deltas[0] = 0.;
+  deltas[1] = M_PI;
+
+  for (std::vector<MVertex*>::iterator it = beginvertices();it!=endvertices();it++){
+    MVertex *v = *it;
+    double angle_current = angle(v);
+    GPoint p = get_GPoint_from_MVertex(v);
+    for (int i=0;i<2;i++){
+      Pair<SVector3, SVector3> dirs = compute_crossfield_directions(v->x(),v->y(),angle_current+deltas[i]);
+      fprintf(f,"VP(%g,%g,%g) {%g,%g,%g};\n",p.x(),p.y(),p.z(),dirs.first()[0], dirs.first()[1], dirs.first()[2]);
+      fprintf(f,"VP(%g,%g,%g) {%g,%g,%g};\n",p.x(),p.y(),p.z(),dirs.second()[0], dirs.second()[1], dirs.second()[2]);
+    }
+  }
+  fprintf(f,"};\n");
+  fclose(f);
+}
+
+// returns the cross field as a pair of othogonal vectors (NOT in parametric coordinates, but real 3D coordinates)
+Pair<SVector3, SVector3> frameFieldBackgroundMesh2D::compute_crossfield_directions(double u,double v, double angle_current)
+{
+  // get the unit normal at that point
+  GFace *face = dynamic_cast<GFace*>(gf);
+  Pair<SVector3, SVector3> der = face->firstDer(SPoint2(u,v));
+  SVector3 s1 = der.first();
+  SVector3 s2 = der.second();
+  SVector3 n = crossprod(s1,s2);
+  n.normalize();
+
+  SVector3 basis_u = s1; basis_u.normalize();
+  SVector3 basis_v = crossprod(n,basis_u);
+
+  // normalize vector t1 that is tangent to gf at uv
+  SVector3 t1 = basis_u * cos(angle_current) + basis_v * sin(angle_current) ;
+  t1.normalize();
+
+  // compute the second direction t2 and normalize (t1,t2,n) is the tangent frame
+  SVector3 t2 = crossprod(n,t1);
+  t2.normalize();
+
+  return Pair<SVector3,SVector3>(SVector3(t1[0],t1[1],t1[2]),
+      SVector3(t2[0],t2[1],t2[2]));
+}
+
+bool frameFieldBackgroundMesh2D::compute_RK_infos(double u,double v, double x, double y, double z, RK_form &infos)
+{
+
+  // check if point is in domain
+  if (!inDomain(u,v)) return false;
+
+  // get stored angle
+
+  double angle_current = angle(u,v);
+
+  // compute t1,t2: cross field directions
+
+  // get the unit normal at that point
+  GFace *face = dynamic_cast<GFace*>(gf);
+  Pair<SVector3, SVector3> der = face->firstDer(SPoint2(u,v));
+  SVector3 s1 = der.first();
+  SVector3 s2 = der.second();
+  SVector3 n = crossprod(s1,s2);
+  n.normalize();
+  SVector3 basis_u = s1; basis_u.normalize();
+  SVector3 basis_v = crossprod(n,basis_u);
+  // normalize vector t1 that is tangent to gf at uv
+  SVector3 t1 = basis_u * cos(angle_current) + basis_v * sin(angle_current) ;
+  t1.normalize();
+  // compute the second direction t2 and normalize (t1,t2,n) is the tangent frame
+  SVector3 t2 = crossprod(n,t1);
+  t2.normalize();
+
+  // get metric
+
+  double L = size(u,v);
+  infos.metricField = SMetric3(1./(L*L));
+  FieldManager *fields = gf->model()->getFields();
+  if(fields->getBackgroundField() > 0){
+    Field *f = fields->get(fields->getBackgroundField());
+    if (!f->isotropic()){
+      (*f)(x,y,z, infos.metricField,gf);
+    }
+    else {
+      L = (*f)(x,y,z,gf);
+      infos.metricField = SMetric3(1./(L*L));
+    }
+  }
+  double M = dot(s1,s1);
+  double N = dot(s2,s2);
+  double E = dot(s1,s2);
+  // compute the first fundamental form i.e. the metric tensor at the point
+  // M_{ij} = s_i \cdot s_j
+  double metric[2][2] = {{M,E},{E,N}};
+
+  // get sizes
+
+  double size_1 = sqrt(1. / dot(t1,infos.metricField,t1));
+  double size_2 = sqrt(1. / dot(t2,infos.metricField,t2));
+
+  // compute covariant coordinates of t1 and t2 - cross field directions in parametric domain
+  double covar1[2],covar2[2];
+  // t1 = a s1 + b s2 -->
+  // t1 . s1 = a M + b E
+  // t1 . s2 = a E + b N --> solve the 2 x 2 system
+  // and get covariant coordinates a and b
+  double rhs1[2] = {dot(t1,s1),dot(t1,s2)};
+  bool singular = false;
+  if (!sys2x2(metric,rhs1,covar1)){
+    Msg::Info("Argh surface %d %g %g %g -- %g %g %g -- %g %g",gf->tag(),s1.x(),s1.y(),s1.z(),s2.x(),s2.y(),s2.z(),size_1,size_2);
+    covar1[1] = 1.0; covar1[0] = 0.0;
+    singular = true;
+  }
+  double rhs2[2] = {dot(t2,s1),dot(t2,s2)};
+  if (!sys2x2(metric,rhs2,covar2)){
+    Msg::Info("Argh surface %d %g %g %g -- %g %g %g",gf->tag(),s1.x(),s1.y(),s1.z(),s2.x(),s2.y(),s2.z());
+    covar2[0] = 1.0; covar2[1] = 0.0;
+    singular = true;
+  }
+
+  // transform the sizes with respect to the metric
+  // consider a vector v of size 1 in the parameter plane
+  // its length is sqrt (v^T M v) --> if I want a real size
+  // of size1 in direction v, it should be sqrt(v^T M v) * size1
+  double l1 = sqrt(covar1[0]*covar1[0]+covar1[1]*covar1[1]);
+  double l2 = sqrt(covar2[0]*covar2[0]+covar2[1]*covar2[1]);
+
+  covar1[0] /= l1;covar1[1] /= l1;
+  covar2[0] /= l2;covar2[1] /= l2;
+
+  double size_param_1  = size_1 / sqrt (  M*covar1[0]*covar1[0]+
+      2*E*covar1[1]*covar1[0]+
+      N*covar1[1]*covar1[1]);
+  double size_param_2  = size_2 / sqrt (  M*covar2[0]*covar2[0]+
+      2*E*covar2[1]*covar2[0]+
+      N*covar2[1]*covar2[1]);
+  if (singular){
+    size_param_1 = size_param_2 = std::min (size_param_1,size_param_2);
+  }
+
+
+  // filling form...
+
+  infos.t1 = t1;
+  infos.h.first  = size_1;
+  infos.h.second = size_2;
+  infos.paramh.first  = size_param_1;
+  infos.paramh.second = size_param_2;
+  infos.paramt1 = SPoint2(covar1[0],covar1[1]);
+  infos.paramt2 = SPoint2(covar2[0],covar2[1]);
+  infos.angle = angle_current;
+  infos.localsize = L;
+  infos.normal = n;
+
+  return true;
+}
diff --git a/Mesh/BackgroundMesh2D.h b/Mesh/BackgroundMesh2D.h
new file mode 100644
index 0000000..3b1712d
--- /dev/null
+++ b/Mesh/BackgroundMesh2D.h
@@ -0,0 +1,140 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _BACKGROUND_MESH2D_H_
+#define _BACKGROUND_MESH2D_H_
+
+
+#include <string>
+#include <map>
+#include <vector>
+#include "Pair.h"
+#include "STensor3.h"
+
+#include "BGMBase.h"
+
+class MTriangle;
+
+using namespace std;
+
+/*
+   The backgroundMesh2D creates a bunch of triangles on the parametric space of a GFace.
+   Those triangles are local to the backgroundMesh2D so that
+   they do not depend on the actual mesh that can be deleted.
+   It extends the sizefield from the edges.
+ */
+class backgroundMesh2D : public BGMBase {
+  protected:
+    virtual void propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane = false);
+    virtual void computeSizeField();
+
+    virtual inline unsigned int getNumMeshElements()const{return elements.size();}
+    virtual const MElement* getElement(unsigned int i)const;
+
+    virtual GPoint get_GPoint_from_MVertex(const MVertex *) const;
+
+    // only 2D:
+    void updateSizes();
+    // copy the mesh stored in GFace in local
+    void create_mesh_copy();
+    // creates a mesh of GFace and store it in local !!!, does not store the mesh in GFace !
+    void create_face_mesh();
+
+    double sizeFactor;
+
+
+    std::vector<MTriangle*> tempTR;
+    vector<MElement*> elements;
+    vector<MVertex*> vertices;
+
+    map<MVertex*,MVertex*> _3Dto2D;
+    map<MVertex*,MVertex*> _2Dto3D;
+
+
+  public:
+    backgroundMesh2D(GFace *, bool erase_2D3D=true);
+    virtual ~backgroundMesh2D();
+
+    virtual MElementOctree* getOctree();
+
+    // TODO: only 2D
+    virtual void reset(bool erase_2D3D=true);// deletes everything and rebuild with GFace*
+    virtual void unset();// deletes everything... called by destructor.
+
+    // not used !!!! TODO !!!
+    void setSizeFactor (double s) {sizeFactor = s;}
+
+
+    virtual vector<MVertex*>::iterator beginvertices(){return vertices.begin();}
+    virtual vector<MVertex*>::iterator endvertices(){return vertices.end();}
+    virtual vector<MElement*>::iterator beginelements(){return elements.begin();}
+    virtual vector<MElement*>::iterator endelements(){return elements.end();}
+    virtual vector<MVertex*>::const_iterator beginvertices()const{return vertices.begin();}
+    virtual vector<MVertex*>::const_iterator endvertices()const{return vertices.end();}
+    virtual vector<MElement*>::const_iterator beginelements()const{return elements.begin();}
+    virtual vector<MElement*>::const_iterator endelements()const{return elements.end();}
+
+};
+
+
+class RK_form{// informations for RK at one point
+  public:
+    RK_form(){
+    }
+//    RK_form(const RK_form &other){
+//      t1 = other.t1;
+//      t2 = other.t2;
+//      h.first = other.h.first;
+//      h.second = other.h.second;
+//      paramh.first = other.paramh.first;
+//      paramh.second = other.paramh.second;
+//      paramt1 = other.paramt1;
+//      paramt2 = other.paramt2;
+//      angle = other.angle;
+//    }
+
+    SMetric3 metricField;
+    SVector3 t1, t2;// 3D cross field directions
+    SVector3 normal;// 3D cross field directions
+    pair<double,double> h;// 3D sizes
+    pair<double,double> paramh;// sizes in parametric domain
+    SPoint2 paramt1,paramt2;
+    double angle,localsize;
+};
+
+
+
+class frameFieldBackgroundMesh2D : public backgroundMesh2D{
+  private:
+    // specification for cross field
+    DoubleStorageType angles;  // an attached angle
+    DoubleStorageType smoothness;
+
+    void computeCrossField(simpleFunction<double> &eval_diffusivity);
+    void computeSmoothness();
+
+  public:
+    frameFieldBackgroundMesh2D(GFace *_gf);
+    virtual ~frameFieldBackgroundMesh2D();
+
+    virtual void reset(bool erase_2D3D=true);
+
+    double angle(double u, double v);
+    double angle(MVertex *v);
+
+    double get_smoothness(double u, double v);
+    double get_smoothness(MVertex *v);
+
+    void eval_crossfield(double u, double v, STensor3 &cf);
+    void eval_crossfield(MVertex *vert, STensor3 &cf);
+
+    void exportCrossField(const string &filename);
+    Pair<SVector3, SVector3> compute_crossfield_directions(double u,double v, double angle_current);
+    bool compute_RK_infos(double u,double v, double x, double y, double z,RK_form &infos);
+
+    inline void exportSmoothness(const string &filename) const{export_scalar(filename,smoothness);};
+};
+
+#endif
diff --git a/Mesh/BackgroundMesh3D.cpp b/Mesh/BackgroundMesh3D.cpp
new file mode 100644
index 0000000..9ff8296
--- /dev/null
+++ b/Mesh/BackgroundMesh3D.cpp
@@ -0,0 +1,1170 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include <fstream>
+#include <algorithm>
+#include <iostream>
+#include <string>
+#include <numeric>
+#include "BackgroundMesh3D.h"
+#include "MElement.h"
+#include "GFace.h"
+#include "GRegion.h"
+#include "BackgroundMeshManager.h"
+#include "BackgroundMesh2D.h"
+#include "MElementOctree.h"
+#include "MTetrahedron.h"
+#include "OS.h"
+
+#if defined(HAVE_PETSC)
+#include "dofManager.h"
+#include "laplaceTerm.h"
+#include "linearSystemPETSc.h"
+#include "linearSystemFull.h"
+#endif
+
+using namespace std;
+
+static int signof(int i)
+{
+  return ((i < 0) ? -1 : 1);
+}
+
+// TODO: virer les trucs "vertextorank", mettre cette classe-ci :
+
+//class evalDiffusivity3DFunction : public simpleFunction<double>{
+//  public:
+//    evalDiffusivity3DFunction(frameFieldBackgroundMesh3D *_bgm, double t=0.95):bgm(_bgm),threshold(t){};
+//    double operator () (double u, double v, double w) const{
+//      return ((bgm->get_smoothness(u,v) >= threshold) ? 1. : 1.e-3);
+//    }
+//  private:
+//    frameFieldBackgroundMesh2D *bgm;
+//    const double threshold;
+//};
+
+backgroundMesh3D::backgroundMesh3D(GRegion *_gr)
+ : BGMBase(3,_gr), debug(false), verbose(false)
+{
+  computeSizeField();
+}
+
+backgroundMesh3D::~backgroundMesh3D()
+{
+}
+
+void backgroundMesh3D::computeSizeField()
+{
+  cout << "backgroundMesh3D::computeSizeField() " << endl;
+
+  // fills dirichlet BC
+  GRegion *region = dynamic_cast<GRegion*>(gf);
+  list<GFace*> faces = region->faces();
+  MVertex *v;
+  MElement *e;
+
+  for (list<GFace*>::iterator it=faces.begin();it!=faces.end();it++){// for all GFace
+    GFace *face = *it;
+    frameFieldBackgroundMesh2D *bgm2d = dynamic_cast<frameFieldBackgroundMesh2D*>(BGMManager::get(face));
+    for (unsigned int i=0;i<face->getNumMeshElements();i++){// for all elements
+      e = face->getMeshElement(i);
+      if (e->getDim()!=2) continue;// of dim=2
+      for (int iv=0;iv<e->getNumVertices();iv++){
+        v = e->getVertex(iv);
+        SPoint2 p;
+        reparamMeshVertexOnFace(v, face, p);
+        sizeField[v] = bgm2d->size(p.x(),p.y());
+        //        cout << "sets sizefield for vertex " << v << endl;
+      }
+    }
+  }
+
+  // propagate
+  simpleFunction<double> ONE(1.0);
+  propagateValues(sizeField,ONE);
+
+  //  cout << "backgroundMesh3D::size of sizeField: " << sizeField.size()  << endl;
+}
+
+void backgroundMesh3D::propagateValues(DoubleStorageType &dirichlet,
+                                       simpleFunction<double> &eval_diffusivity,
+                                       bool in_parametric_plane)
+{
+  // same as Size_field::solve()
+  GRegion *gr = dynamic_cast<GRegion*>(gf);
+
+#if defined(HAVE_PETSC)
+  linearSystem<double>* system = 0;
+  system = new linearSystemPETSc<double>;
+
+  size_t i;
+  int count;
+  int count2;
+  double val;
+  double volume;
+  std::set<MVertex*> interior;
+  std::set<MVertex*>::iterator it;
+  DoubleStorageType::iterator it2;
+
+  dofManager<double> assembler(system);
+
+  count = 0;
+  for(it2=dirichlet.begin();it2!=dirichlet.end();it2++){
+    assembler.fixVertex(it2->first,0,1,it2->second);
+    count++;
+  }
+  //printf("\n");
+  //printf("number of boundary vertices = %d\n",count);
+
+  for(i=0;i<gr->tetrahedra.size();i++){
+    interior.insert(gr->tetrahedra[i]->getVertex(0));
+    interior.insert(gr->tetrahedra[i]->getVertex(1));
+    interior.insert(gr->tetrahedra[i]->getVertex(2));
+    interior.insert(gr->tetrahedra[i]->getVertex(3));
+  }
+
+  for(it=interior.begin();it!=interior.end();it++){
+    it2 = dirichlet.find(*it);
+    if(it2==dirichlet.end()){
+      assembler.numberVertex(*it,0,1);
+    }
+  }
+
+  for(i=0;i<gr->tetrahedra.size();i++){
+    gr->tetrahedra[i]->setVolumePositive();
+  }
+
+  count2 = 0;
+  volume = 0.0;
+  laplaceTerm term(0,1,&eval_diffusivity);
+  for(i=0;i<gr->tetrahedra.size();i++){
+    SElement se(gr->tetrahedra[i]);
+    term.addToMatrix(assembler,&se);
+    count2++;
+    volume = volume + gr->tetrahedra[i]->getVolume();
+  }
+  //printf("number of tetrahedra = %d\n",count2);
+  //printf("volume = %f\n",volume);
+
+  if(assembler.sizeOfR()){
+    system->systemSolve();
+  }
+
+  for(it=interior.begin();it!=interior.end();it++){
+    assembler.getDofValue(*it,0,1,val);
+    dirichlet.insert(std::pair<MVertex*,double>(*it,val));
+  }
+
+  delete system;
+#endif
+}
+
+GPoint backgroundMesh3D::get_GPoint_from_MVertex(const MVertex *v)const
+{
+  return GPoint(v->x(),v->y(),v->z(),dynamic_cast<GRegion*>(gf));
+}
+
+MVertex* backgroundMesh3D::get_nearest_neighbor(const MVertex *v)
+{
+  double distance;
+  return get_nearest_neighbor(v->x(),v->y(),v->z(), distance);
+}
+
+MVertex* backgroundMesh3D::get_nearest_neighbor(const double* xyz)
+{
+  double distance;
+  return get_nearest_neighbor(xyz, distance);
+}
+
+MVertex* backgroundMesh3D::get_nearest_neighbor(double x, double y, double z)
+{
+  double distance;
+  return get_nearest_neighbor(x,y,z,distance);
+}
+
+MVertex* backgroundMesh3D::get_nearest_neighbor(double x, double y, double z,
+                                                double &distance )
+{
+  double xyz[3] = {x,y,z};
+  return get_nearest_neighbor(xyz, distance);
+}
+
+MElementOctree* backgroundMesh3D::getOctree()
+{
+  if(!octree){
+    GRegion *gr = dynamic_cast<GRegion*>(gf);
+    Msg::Debug("Rebuilding BackgroundMesh element octree");
+    std::vector<MElement*> copy;// !!!
+    for (std::vector<MTetrahedron*>::iterator it = gr->tetrahedra.begin();
+         it!=gr->tetrahedra.end();it++){
+      copy.push_back(*it);
+    }
+    octree = new MElementOctree(copy);
+  }
+  return octree;
+}
+
+MVertex* backgroundMesh3D::get_nearest_neighbor(const double* xyz, double & distance )
+{
+  // using the octree instead of ANN, faster.
+  MElement *elem = const_cast<MElement*>(findElement(xyz[0],xyz[1],xyz[2]));
+  if (!elem) return NULL;
+  vector<MVertex*> candidates(elem->getNumVertices());
+  vector<double> distances(elem->getNumVertices());
+  SPoint3 p(xyz[0],xyz[1],xyz[2]);
+  for (int i=0;i<elem->getNumVertices();i++){
+    MVertex *v = elem->getVertex(i);
+    candidates[i] = v;
+    distances[i] = p.distance(v->point());
+  }
+  vector<double>::iterator itmax = std::max_element(distances.begin(),distances.end());
+  return candidates[std::distance(distances.begin(),itmax)];
+
+  //  map<double,MVertex*> distances;
+  //  SPoint3 p(xyz[0],xyz[1],xyz[2]);
+  //  for (int i=0;i<elem->getNumVertices();i++){
+  //    MVertex *v = elem->getVertex(i);
+  //    distances.insert(make_pair(p.distance(v->point()),v));
+  //  }
+  //  map<double,MVertex*>::iterator it = distances.begin();
+  //  distance = it->first;
+  //  return it->second;
+}
+
+vector<montripletbis> frameFieldBackgroundMesh3D::permutation = vector<montripletbis>();
+
+frameFieldBackgroundMesh3D::frameFieldBackgroundMesh3D(GRegion *_gr):backgroundMesh3D(_gr)
+{
+  //  readValue("param.dat","SMOOTHCF",smooth_the_crossfield);
+  smooth_the_crossfield = true;
+
+  // for the different "quaternion" permutations...
+  if (permutation.empty()){
+    permutation.push_back(montripletbis( 1, 2, 3));
+    permutation.push_back(montripletbis( 2,-1, 3));
+    permutation.push_back(montripletbis(-1,-2, 3));
+    permutation.push_back(montripletbis(-2, 1, 3));
+    permutation.push_back(montripletbis( 2, 1,-3));
+    permutation.push_back(montripletbis(-1, 2,-3));
+    permutation.push_back(montripletbis(-2,-1,-3));
+    permutation.push_back(montripletbis( 1,-2,-3));
+  }
+
+  build_vertex_to_element_table();
+
+  int max_recursion_level=1;
+  if ((max_recursion_level>3)||(max_recursion_level<1)) throw;
+  build_neighbors(max_recursion_level);
+
+  initiate_ANN_research();
+  initiate_crossfield();
+
+  if (smooth_the_crossfield){
+    computeCrossField();
+  }
+  else{
+    computeSmoothnessOnlyFromBoundaries();
+  }
+}
+
+frameFieldBackgroundMesh3D::~frameFieldBackgroundMesh3D()
+{
+#if defined(HAVE_ANN)
+  if(annTreeBnd) delete annTreeBnd;
+  if(dataPtsBnd) annDeallocPts(dataPtsBnd);
+#endif
+}
+
+void frameFieldBackgroundMesh3D::initiate_ANN_research()
+{
+#ifdef HAVE_ANN
+  // ANN research for 2D !!!
+  int maxPts = listOfBndVertices.size();
+  dataPtsBnd= annAllocPts(maxPts, 3);
+  int i=0;
+  MVertex *v;
+  for (set<MVertex*>::iterator it = listOfBndVertices.begin();it!=listOfBndVertices.end();it++){
+    v= *it;
+    for (int k=0; k< 3; ++k)
+      dataPtsBnd[i][k] = (v->point())[k];
+    ++i;
+  }
+  annTreeBnd=new ANNkd_tree(dataPtsBnd, maxPts  ,  3);
+#endif
+  return;
+}
+
+void frameFieldBackgroundMesh3D::computeSmoothnessOnlyFromBoundaries()
+{
+  // this is used when the crossfield is not smoothed !!!
+  // otherwise, the smoothness is computed on the fly while smoothing the cf !
+
+  smoothness_threshold = 0.;
+  MVertex* current;
+  set<MVertex*> neighbors;
+  multimap<double,MVertex*> themap;
+  SVector3 mean_axis(0.);
+  double mean_angle=0.;
+  vector<double> vectorial_smoothness(3);
+
+  for (vert2elemtype::iterator it_vertex=vert2elem.begin();
+       it_vertex!=vert2elem.end();it_vertex++){// for all vertices
+    themap.clear();
+    neighbors.clear();
+    current = it_vertex->first;
+    pair<graphtype::iterator,graphtype::iterator> range = graph.equal_range(current);
+    graphtype::iterator  itgraph = range.first;
+    for (;itgraph!=range.second;itgraph++){// for all neighbors
+      neighbors.insert(itgraph->second.second);
+    }
+    for (set<MVertex*>::iterator it= neighbors.begin();it!=neighbors.end();it++){
+      themap.insert(make_pair(1.,*it));
+    }
+
+    TensorStorageType::iterator itcurrent = crossField.find(current);
+    STensor3 &ref = itcurrent->second;
+    multimap<double,MVertex*>::iterator it_neighbors_begin = themap.begin();
+
+    crossFieldSmoothness[current] = compare_to_neighbors
+      (current->point(), ref, it_neighbors_begin, themap.end(), mean_axis,
+       mean_angle,vectorial_smoothness);
+    //    crossFieldVectorialSmoothness[current] = vectorial_smoothness;
+  }
+}
+
+void frameFieldBackgroundMesh3D::computeCrossField()
+{
+  // TODO: mettre des parametres façon gmsh ???
+  // reading parameters
+  int Niter = 3;
+  double norme_threshold = 1.;
+  double localangle_threshold = 1.;
+
+  Niter=40;
+  norme_threshold = 3.e-2;
+  localangle_threshold=5.e-3;
+  smoothness_threshold=0.85;
+  double percentage_threshold = 0.98;
+
+  vector<double> scal_prods;
+  vector<double> signs;
+  vector<double> angles;
+  STensor3 identity(1.);
+
+  if (debug) exportCrossField("cf_initial.pos");
+
+  // initiation
+  multimap<double,MVertex*> rank,rank_temp;
+  map<MVertex*,bool> vertex_is_still;
+  map<MVertex*,double> vertex_movement;
+  MVertex *current;
+  for (vert2elemtype::iterator it_vertex=vert2elem.begin();
+       it_vertex!=vert2elem.end();it_vertex++){
+    current = it_vertex->first;
+    if (current->onWhat()->dim()<=2)
+      vertex_is_still[current] = true;
+    else
+      vertex_is_still[current] = false;
+    rank.insert(make_pair(0.,current));
+  }
+
+  // OLD - NEW COMPARISON
+  map<MVertex*,double> vertex_to_rank;
+  for (vert2elemtype::iterator it_vertex=vert2elem.begin();
+       it_vertex!=vert2elem.end();it_vertex++){// for all vertices
+    //vertex_to_rank[it_vertex->first] = 0.;
+    vertex_to_rank[it_vertex->first] = 1.;
+    rank.insert(make_pair(0.,it_vertex->first));
+  }
+  // END OLD - NEW COMPARISON
+
+  double percentage_not_done=0.;
+  double norme = 10.*norme_threshold;
+  double norme_inf=10.*norme_threshold;
+  int iIter=0;
+  SVector3 mean_axis(0.);
+  double mean_angle=0.;
+  vector<double> vectorial_smoothness(3);
+  //  vector<int> nb_local_iterations;
+
+  // main smoothing loop
+  while (((norme_inf>norme_threshold) &&
+          (percentage_not_done<percentage_threshold)) &&
+         (iIter<Niter)){// for maximum Niter iterations, or until convergence
+    //    nb_local_iterations.clear();
+    angles.clear();
+    norme_inf=0.;
+    int counter_done=0;
+    int counter_not_done=0;
+    while (rank.size()){// for all vertices, i.e. all cavities
+      //    for (vert2elemtype::iterator
+      //it_vertex=vert2elem.begin();it_vertex!=vert2elem.end();it_vertex++)//
+      //for all vertices, i.e. all cavities MVertex *current = it_vertex->first;
+      current = (rank.begin())->second;
+      rank.erase((rank.begin()));
+
+      // smooth 3D vertices only
+      if (current->onWhat()->dim()<=2){
+        if (verbose) cout << "-------------------- discard point "
+                          << current->getNum() << "  on dim "
+                          << current->onWhat()->dim() << "   coord ("
+                          << current->x() << "," << current->y() << ","
+                          << current->z()<< ")" << endl;
+        continue;
+      }
+
+      TensorStorageType::iterator itcurrent = crossField.find(current);
+      STensor3 &ref = itcurrent->second;
+      if (verbose) cout << "-------------------- working on point "
+                        << current->getNum() << "  on dim "
+                        << current->onWhat()->dim() << "   coord ("
+                        << current->x() << "," << current->y() << ","
+                        << current->z()<< ")" << endl;
+
+      pair<graphtype::iterator,  graphtype::iterator> range = graph.equal_range(current);
+      graphtype::iterator itgraph = range.first;
+      bool all_neighbors_still=true;// if nothing has changed since previous
+                                    // iteration: nothing to do !
+      for (;itgraph!=range.second;itgraph++){// for all neighbors
+        if (vertex_is_still[itgraph->second.second]==false){
+          all_neighbors_still = false;
+          break;
+        }
+      }
+
+      // neighbors didn't move, and current didn't move either -> nothing to do !
+      if (all_neighbors_still && vertex_is_still[current]){
+        vertex_movement[current] = 0.;
+        rank_temp.insert(make_pair(0.,current));
+        counter_not_done++;
+        continue;
+      }
+
+      // OLD - NEW COMPARISON
+      multimap<double,MVertex*> neighbors_to_trust;
+      itgraph = range.first;
+      for (;itgraph!=range.second;itgraph++){// for all neighbors
+        neighbors_to_trust.insert(make_pair(vertex_to_rank[itgraph->second.second],
+                                            itgraph->second.second));
+        //  if (vertex_to_rank[itgraph->second.second] <= 1. /180.*M_PI){
+        //     neighbors_to_trust.insert(make_pair(vertex_to_rank[itgraph->second.second],
+        //                                         itgraph->second.second));
+        //  }
+      }
+      if (!neighbors_to_trust.size()){
+        rank_temp.insert(make_pair(M_PI,current));
+        vertex_to_rank[current] = M_PI;
+        continue;
+      }
+      // END OLD - NEW COMPARISON
+
+      counter_done++;
+
+      double angle_to_go;;
+
+      int Nlocaliter=0;
+      STensor3 ref_original(ref);
+
+      for (;Nlocaliter<20;Nlocaliter++){// iterations, convergence of the local cavity...
+        multimap<double,MVertex*>::iterator it_neighbors_to_trust = neighbors_to_trust.begin();
+        crossFieldSmoothness[current] = compare_to_neighbors
+          (current->point(), ref, it_neighbors_to_trust, neighbors_to_trust.end(),
+           mean_axis,mean_angle,vectorial_smoothness);
+        //  crossFieldVectorialSmoothness[current] = vectorial_smoothness;
+
+        // rotating directions to align closest vectors...
+        angle_to_go = mean_angle;
+        ref = apply_rotation(mean_axis,angle_to_go,ref);
+        // cout << " iter " << Nlocaliter << ": mean_angle = " << mean_angle <<
+        //                endl;
+        if (fabs(mean_angle)<localangle_threshold/3.) break;
+      }
+      //  nb_local_iterations.push_back(Nlocaliter+1);
+      if (verbose) cout << "iIter " << iIter << ", Nlocaliter = " << Nlocaliter << endl;
+
+      // computing the total rotation
+      //get_min_rotation_matrix(ref_original, ref, mean_angle, mean_axis,localangle_threshold,true);
+      get_min_rotation_matrix(ref_original, ref, mean_angle, mean_axis,localangle_threshold);//,true);
+      norme_inf = max(norme_inf,mean_angle);
+      //            cout << "  #local_iter=" << Nlocaliter << "  final mean_angle = " << mean_angle << "  threshold=" << localangle_threshold << "  condition :" << (mean_angle <= localangle_threshold) << endl;
+
+      angles.push_back(mean_angle);
+      vertex_is_still[current] = (mean_angle <= localangle_threshold);
+      vertex_movement[current] = mean_angle;
+      rank_temp.insert(make_pair(mean_angle,current));
+      // OLD - NEW COMPARISON
+      //vertex_to_rank[current] = mean_angle;
+      vertex_to_rank[current] = crossFieldSmoothness[current];
+      //      // HACK
+      //        vertex_to_rank[current] = 0.;
+      // END OLD - NEW COMPARISON
+
+    }// end vertices loop
+
+    rank = rank_temp;
+    rank_temp.clear();
+
+    norme = std::accumulate(angles.begin(),angles.end(),0.);
+    if (angles.size()) norme = norme/M_PI*180./angles.size();
+    percentage_not_done = ((double)counter_not_done)/(counter_done+counter_not_done);
+    cout << "   --- iter " << iIter << " NormeInf=" << norme_inf
+         << " mean Angle=" << norme << " counter_not_done="
+         << counter_not_done << " NotDone (%)="
+         << (percentage_not_done*100.) << " %" << endl;
+    //    cout << "Average number of local iterations: "
+    //          << ((double)std::accumulate(nb_local_iterations.begin(),
+    //               nb_local_iterations.end(),0))/nb_local_iterations.size() << endl;
+
+    //if (debug){
+    double temp = log10(Niter);
+    stringstream ss;
+    ss << "cf_iter_" << setfill('0') << setw ((int)(ceil(temp))) << iIter << ".pos";
+    exportCrossField(ss.str().c_str());
+    //}
+
+    iIter++;
+  }// end Niter iterations
+
+  // also computes smoothness for boundary points
+  for (vert2elemtype::iterator it_vertex=vert2elem.begin();
+       it_vertex!=vert2elem.end();it_vertex++){
+    current = it_vertex->first;
+    if (current->onWhat()->dim()<=2){
+      TensorStorageType::iterator itcurrent = crossField.find(current);
+      STensor3 &ref = itcurrent->second;
+      pair<graphtype::iterator,  graphtype::iterator> range = graph.equal_range(current);
+      graphtype::iterator itgraph = range.first;
+
+      multimap<double,MVertex*> neighbors_to_trust;
+      itgraph = range.first;
+      for (;itgraph!=range.second;itgraph++){// for all neighbors
+        neighbors_to_trust.insert(make_pair(0.,itgraph->second.second));
+      }
+      crossFieldSmoothness[current] = compare_to_neighbors
+        (current->point(), ref, neighbors_to_trust.begin(),
+         neighbors_to_trust.end(), mean_axis,mean_angle,vectorial_smoothness);
+
+      //crossFieldSmoothness[current] = compare_to_neighbors
+      //     (current->point(), ref, itgraph, range.second, mean_axis,
+      //       mean_angle,vectorial_smoothness);
+      //      crossFieldVectorialSmoothness[current] = vectorial_smoothness;
+    }
+  }
+}
+
+//STensor3 frameFieldBackgroundMesh3D::get_random_cross()const{
+//  SVector3 vec1(rand()%10000/9999. , rand()%10000/9999. , rand()%10000/9999. );
+//  vec1.normalize();
+//  SVector3 ref(1.,0.,0.);
+//  SVector3 vec2 = crossprod(ref,vec1);
+//  vec2.normalize();
+//  SVector3 vec3 = crossprod(vec1,vec2);
+//  vec3.normalize();
+//  STensor3 random_cross;
+//  for (int j=0;j<3;j++){
+//    random_cross(j,0) = vec1(j);
+//    random_cross(j,1) = vec2(j);
+//    random_cross(j,2) = vec3(j);
+//  }
+//  return random_cross;
+//}
+
+void frameFieldBackgroundMesh3D::initiate_crossfield()
+{
+  crossField.clear();
+  MVertex *v;
+
+  // first, for boundaries :
+  GRegion *gr = dynamic_cast<GRegion*>(gf);
+  list<GFace*> faces = gr->faces();
+  // here, not using the gm2D since we are interested by the new 2D vertices,
+  // not the old (now erased) ones... alternative would be to reset the 2DBGM...
+  for (list<GFace*>::iterator it=faces.begin();it!=faces.end();it++){// for all GFace
+    GFace *face = *it;
+    frameFieldBackgroundMesh2D *bgm2d =
+      dynamic_cast<frameFieldBackgroundMesh2D*>(BGMManager::get(face));
+    // initializing the vertices on the faces
+    for (unsigned int i=0;i<face->getNumMeshElements();i++){// for all elements
+      MElement *e = face->getMeshElement(i);
+      if (e->getDim()!=2) continue;// of dim=2
+
+      for (int iv=0;iv<e->getNumVertices();iv++){
+        v = e->getVertex(iv);
+
+        // if already done: continue
+        TensorStorageType::iterator itfind =  crossField.find(v);
+        if (itfind!=crossField.end()) continue;
+
+        STensor3 cf;
+        bgm2d->eval_crossfield(v,cf);
+        crossField[v] = cf;
+      }
+    }
+  }
+
+  // then, for volume :
+  for (unsigned int i=0;i<gr->getNumMeshElements();i++){// for all elements
+    MElement *e = gr->getMeshElement(i);
+    if (e->getDim()!=3) continue;
+
+    for (int iv=0;iv<e->getNumVertices();iv++){
+      v = e->getVertex(iv);
+
+      // if not in volume: continue
+      if (v->onWhat()->dim()<=2) continue;
+      // if already done: continue
+      TensorStorageType::iterator itfind =  crossField.find(v);
+      if (itfind!=crossField.end()) continue;
+      MVertex *closer_on_bnd = get_nearest_neighbor_on_boundary(v);
+      crossField[v] = crossField[closer_on_bnd];// prend l'info Bnd (ANN) la plus proche...
+    }
+  }
+}
+
+MVertex* frameFieldBackgroundMesh3D::get_nearest_neighbor_on_boundary(MVertex* v)
+{
+  double distance;
+  return get_nearest_neighbor_on_boundary(v,distance);
+}
+
+MVertex* frameFieldBackgroundMesh3D::get_nearest_neighbor_on_boundary
+  (MVertex* v, double &distance)
+{
+#ifdef HAVE_ANN
+  ANNpoint q = annAllocPt(3);
+  for (int k=0; k< 3; ++k)
+    q[k] = v->point()[k];
+  ANNidxArray  nn_idx = new ANNidx[1];
+  ANNdistArray dists  = new ANNdist[1];
+  annTreeBnd->annkSearch(q, 1, nn_idx, dists );
+  distance = sqrt(dists [0]);
+  int i = nn_idx[0];
+  delete [] nn_idx;
+  delete []  dists;
+  annDeallocPt(q);
+
+  set<MVertex*>::iterator it = listOfBndVertices.begin();
+  std::advance(it,i);
+  return (*it);
+#else
+  return NULL;
+#endif
+}
+
+double frameFieldBackgroundMesh3D::get_smoothness(double x, double y, double z)
+{
+  return get_field_value(x,y,z,crossFieldSmoothness);
+};
+
+double frameFieldBackgroundMesh3D::get_approximate_smoothness(double x, double y, double z)
+{
+  return crossFieldSmoothness[get_nearest_neighbor(x,y,z)];
+}
+
+double frameFieldBackgroundMesh3D::get_approximate_smoothness(MVertex *v)
+{
+  return get_approximate_smoothness(v->x(),v->y(),v->z());
+}
+
+double frameFieldBackgroundMesh3D::get_smoothness(MVertex *v)
+{
+  return get_nodal_value(v,crossFieldSmoothness);
+};
+
+void frameFieldBackgroundMesh3D::eval_approximate_crossfield(double x, double y,
+                                                             double z, STensor3 &cf)
+{
+  cf = crossField[get_nearest_neighbor(x,y,z)];
+};
+
+void frameFieldBackgroundMesh3D::eval_approximate_crossfield(const MVertex *vert,
+                                                             STensor3 &cf)
+{
+  // check if vertex is ours...
+  TensorStorageType::const_iterator itfind = crossField.find(const_cast<MVertex*>(vert));
+  if (itfind != crossField.end())
+    cf = itfind->second;
+  else// if not, find closest
+    eval_approximate_crossfield(vert->x(),vert->y(),vert->z(),cf);
+};
+
+
+void frameFieldBackgroundMesh3D::get_vectorial_smoothness(double x, double y, double z,
+                                                          SVector3 &cf)
+{
+  vector<double>res = get_field_value(x,y,z,crossFieldVectorialSmoothness);
+  for (int i=0;i<3;i++) cf(i)=res[i];
+};
+
+void frameFieldBackgroundMesh3D::get_vectorial_smoothness(const MVertex *vert, SVector3 &cf)
+{
+  vector<double> res = get_nodal_value(vert,crossFieldVectorialSmoothness);
+  for (int i=0;i<3;i++) cf(i)=res[i];
+};
+
+double frameFieldBackgroundMesh3D::get_vectorial_smoothness(const int idir, double x,
+                                                            double y, double z)
+{
+  vector<double>res = get_field_value(x,y,z,crossFieldVectorialSmoothness);
+  return res[idir];
+};
+
+double frameFieldBackgroundMesh3D::get_vectorial_smoothness(const int idir,
+                                                            const MVertex *vert)
+{
+  vector<double> res = get_nodal_value(vert,crossFieldVectorialSmoothness);
+  return res[idir];
+};
+
+void frameFieldBackgroundMesh3D::build_vertex_to_element_table()
+{
+  GRegion *gr = dynamic_cast<GRegion*>(gf);
+  MElement *e;
+  MVertex *v;
+
+  //    cout << "build_vertex_to_element_table nbelem=" << gr->getNumMeshElements() << endl;
+
+  for (unsigned int i=0;i<gr->getNumMeshElements();i++){// for all elements
+    e = gr->getMeshElement(i);
+    if (e->getDim()!=3) continue;// of dim=3
+    //    cout << "elem " << i << endl;
+    for (int iv=0;iv<e->getNumVertices();iv++){// for all vertices
+      v = e->getVertex(iv);
+      vert2elem[v].insert(e);
+      elem2vert[e].insert(v);
+      //      cout << "node " << iv << " on " << v->onWhat()->dim() << endl;
+      if (v->onWhat()->dim()<=2){
+        //        cout << "adding " << endl;
+        listOfBndVertices.insert(v);
+      }
+    }
+  }
+}
+
+const MElement* backgroundMesh3D::getElement(unsigned int i)const
+{
+  GRegion *gr = dynamic_cast<GRegion*>(gf);
+  return gr->getMeshElement(i);
+}
+
+unsigned int backgroundMesh3D::getNumMeshElements()const
+{
+  GRegion *gr = dynamic_cast<GRegion*>(gf);
+  return gr->getNumMeshElements();
+}
+
+// this function fills the multimap "graph": vertex to direct neighbors, or
+// indirect neighbors, depending on the "max_recursion_level".
+void frameFieldBackgroundMesh3D::build_neighbors(const int &max_recursion_level)
+{
+  set<MVertex*> visited,start;
+  set<MElement*> visited_elements;
+  multimap<int,MVertex*> proximity;
+  //int counter=0;
+
+  for (vert2elemtype::iterator it_vertex=vert2elem.begin();
+       it_vertex!=vert2elem.end();it_vertex++){// for all vertices
+    MVertex *current_vertex = it_vertex->first;
+    visited.clear();
+    visited_elements.clear();
+    visited.insert(current_vertex);
+    start.clear();
+    start.insert(current_vertex);
+    proximity.clear();
+
+    get_recursive_neighbors(start, visited, visited_elements, proximity, max_recursion_level);
+
+    for (multimap<int,MVertex*>::iterator it1 = proximity.begin();it1!=proximity.end();it1++){
+      graph.insert(make_pair(current_vertex, make_pair(it1->first,it1->second)));
+    }
+
+    //    if (debug){// check
+    //      if (verbose) cout << "vertex (" << counter++ << "): " << current_vertex->getNum() << "  connected to " << it_vertex->second.size() << " elements, coord: (" << current_vertex->x() << "," << current_vertex->y() << "," << current_vertex->z() << ")" << endl;
+    //      set<MVertex*> allvertex;
+    //      for (multimap<int,MVertex*>::iterator it1 = proximity.begin();it1!=proximity.end();it1++){
+    //        if (verbose) {
+    //          for (int i=0;i<it1->first;i++) cout << "  ";
+    //          cout << it1->first << "  :  " << it1->second->getNum() << endl;
+    //        }
+    //        set<MVertex*>::iterator itfind = allvertex.find(it1->second);
+    //        if (itfind!=allvertex.end()){
+    //          cerr << " ERROR : vertex duplicate !!!" << endl;
+    //          throw;
+    //        }
+    //        allvertex.insert(it1->second);
+    //      }
+    //    }// end check
+  }
+}
+
+void frameFieldBackgroundMesh3D::get_recursive_neighbors
+   (set<MVertex*> &start, set<MVertex*> &visited, set<MElement*> &visited_elements,
+    multimap<int,MVertex*> &proximity, int max_level, int level)
+{
+  level++;
+  if (level>max_level) return;
+
+  set<MVertex*> new_vertices;
+
+  for (set<MVertex*>::iterator it_start=start.begin();
+       it_start!=start.end();it_start++){// for all initial vertices
+    MVertex *current = *it_start;
+    //      cout << "get_recursive_neighbors : on vertex " << current->getNum()
+    //      << " (" << current << ")" << endl;
+    vert2elemtype::iterator itfind = vert2elem.find(current);
+    if (itfind==vert2elem.end()) continue;
+    set<MElement*>::iterator it_elem = itfind->second.begin();
+    for (;it_elem!=itfind->second.end();it_elem++){// for all connected elements
+      MElement *current_elem = *it_elem;
+      //        cout << "    get_recursive_neighbors : on elem " << current_elem;
+      set<MElement*>::iterator itfindelem = visited_elements.find(current_elem);
+      if (itfindelem!=visited_elements.end()){// element already visited
+        //          cout << " ... already visited ! " << endl;
+        continue;
+      }
+      //        cout << current_elem->getNum() << endl;
+      for (int i=0;i<current_elem->getNumVertices();i++){
+        MVertex *ver = current_elem->getVertex(i);
+        set<MVertex*>::iterator itfind_vertex = visited.find(ver);
+        if (itfind_vertex!=visited.end()) continue;// vertex already visited
+        proximity.insert(make_pair(level, ver));
+        new_vertices.insert(ver);
+        visited.insert(ver);
+      }
+      visited_elements.insert(current_elem);
+    }
+  }
+
+  get_recursive_neighbors(new_vertices, visited, visited_elements,
+                          proximity, max_level, level);
+}
+
+double frameFieldBackgroundMesh3D::compare_to_neighbors
+  (SPoint3 current, STensor3 &ref, multimap<double,MVertex*>::iterator itbegin,
+   multimap<double,MVertex*>::iterator itend, SVector3 &mean_axis,
+   double &mean_angle, vector<double> &vectorial_smoothness)
+{
+  for (int i=0;i<3;i++) mean_axis(i)=0.;
+  multimap<double,MVertex*>::iterator it = itbegin;
+  SVector3 rotation_axis;
+  double minimum_angle;
+  MVertex *neighbor;
+  vector<double>all_angle;
+  vector<SVector3>all_axis;
+  TensorStorageType::iterator itneighbor;
+
+  //  vectorial_smoothness.assign(3,0.);
+  //  vector<double> temp(3);
+
+  vector<double> ponderations_vec;
+
+  vector<double> alternative;
+
+  for (;it!=itend;it++){// for all trusted neighbors
+    //neighbor = it->second.second;
+    neighbor = it->second;
+    //ponderations_vec.push_back(1.);
+    ponderations_vec.push_back((fabs(it->first) >= smoothness_threshold) ? 1. : 1.e-3);
+    //ponderations_vec.push_back(((fabs(it->first) >= smoothness_threshold) ?
+    //1. : 1.e-3) / (current.distance(neighbor->point())));
+    itneighbor = crossField.find(neighbor);
+    STensor3 &neibcross = itneighbor->second;
+
+    get_min_rotation_matrix(neibcross, ref, minimum_angle, rotation_axis);
+    all_axis.push_back(rotation_axis);
+    all_angle.push_back(minimum_angle);
+    alternative.push_back(fabs(minimum_angle));
+
+    //    // now, computing vectorial smoothness
+    //    for (int j=0;j<3;j++){// for every cross field vector
+    //      temp.assign(3,0.);
+    //      for (int ivec=0;ivec<3;ivec++){// for every neighbor vector
+    //        for (int k=0;k<3;k++){
+    //          temp[ivec] += (neibcross(k,ivec)*ref(k,j));// scalar products
+    //        }
+    //        temp[ivec] = fabs(temp[ivec]);
+    //      }
+    //      vectorial_smoothness[j] += acos(fmin(*std::max_element(temp.begin(),temp.end()),1.));
+    //    }
+
+
+  }
+
+  // Watch out !!!      acos(mean_angle)  !=  mean_acos    ->     second option gives better results, better contrast between smooth and not smooth
+  //  for (int j=0;j<3;j++){
+  //    vectorial_smoothness[j] = (1. - (vectorial_smoothness[j]/all_angle.size())/M_PI*4.);// between 0 (not smooth) and 1 (smooth)
+  //  }
+
+
+  // ----------------------------------------------------------------------------
+  // Watch out !!!  The following definition of smoothness may change A LOT !!!
+  // ----------------------------------------------------------------------------
+  // may seem against intuition in some case, but min gives much better results
+  // finally... mean angle !!!
+
+  //  double smoothness_scalar = (*std::max_element(vectorial_smoothness.begin(),vectorial_smoothness.end()));
+  //  double smoothness_scalar = (*std::min_element(vectorial_smoothness.begin(),vectorial_smoothness.end()));
+  double smoothness_scalar = 1. - (std::accumulate(alternative.begin(),alternative.end(),0.)/alternative.size())/M_PI*4.;// APPROXIMATELY between 0 (not smooth) and 1 (smooth), (sometimes <0, always > 1).
+
+  vector<double>::iterator itan=all_angle.begin();
+  vector<double>::iterator itpond=ponderations_vec.begin();
+
+  for (vector<SVector3>::iterator ita = all_axis.begin();ita!=all_axis.end();ita++,itan++,itpond++){
+    //mean_axis += ((*ita)*(*itan));
+    mean_axis += ((*ita)*(*itan))*(*itpond);
+  }
+
+  //mean_angle = mean_axis.norm()/all_angle.size();
+  double pond_total = std::accumulate(ponderations_vec.begin(),ponderations_vec.end(),0.);
+  mean_angle = mean_axis.norm()/pond_total;
+  mean_axis.normalize();
+
+  return smoothness_scalar;
+}
+
+STensor3 frameFieldBackgroundMesh3D::apply_rotation
+   (const SVector3 &axis, const double &angle, const STensor3 &thecross)
+{
+  double rotmat[3][3];
+  STensor3 res2;
+  get_rotation_matrix(angle,axis,&rotmat[0][0]);
+
+
+  //    cout << "from matrice, rotation of " << angle/M_PI*180 << "° axis(" << axis(0) << "," << axis(1) << "," << axis(2) << ")" << endl;
+  //        cout << "rotation matrix is :" << endl;
+  //        for (int i=0;i<3;i++){
+  //          for (int j=0;j<3;j++)
+  //            cout << rotmat[i][j] << " ";
+  //          cout << endl;
+  //        }
+  //
+
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      for (int k=0;k<3;k++)
+        res2(i,j) += rotmat[i][k] * thecross(k,j);
+  //  return res;
+
+
+  //  cout << "result:" << endl;
+  //    for (int i=0;i<3;i++){
+  //      for (int j=0;j<3;j++)
+  //        cout << res2(i,j) << " ";
+  //      cout << endl;
+  //    }
+
+
+  //  STensor3 res;
+  //  double crossv[4],q[4],qconj[4],resq[4];
+  //  double coss = cos(angle/2.);
+  //  double sinn = sin(angle/2.);
+  //  q[0] = coss;
+  //  q[1] = sinn*axis[0];
+  //  q[2] = sinn*axis[1];
+  //  q[3] = sinn*axis[2];
+  //  qconj[0] = q[0];
+  //  for (int i=1;i<4;i++) qconj[i] = -q[i];
+  //
+  //  for (int i=0;i<3;i++){
+  //    crossv[0] = 0.;
+  //    crossv[1] = thecross(0,i);
+  //    crossv[2] = thecross(1,i);
+  //    crossv[3] = thecross(2,i);
+  //
+  ////    quat_prod(q,crossv,resq);
+  ////    quat_prod(resq,qconj,resq);
+  //    quat_prod(crossv,qconj,resq);
+  //    quat_prod(q,resq,resq);
+  //    for (int j=0;j<3;j++)
+  //      res(j,i)=resq[j+1];
+  //
+  //  }
+  //  cout << "from quat:" << endl;
+  //  for (int i=0;i<3;i++){
+  //    for (int j=0;j<3;j++)
+  //      cout << res(j,i) << " ";
+  //    cout << endl;
+  //  }
+  //  cout << "w="<<resq[0] << endl;
+  return res2;
+
+
+  //  STensor3 res;
+  //  double coss = cos(angle);
+  //  double sinn = sin(angle);
+  //  SVector3 temp;
+  //  for (int i=0;i<3;i++){
+  //    SVector3 v(thecross(0,i),thecross(1,i),thecross(2,i));
+  //    temp = axis*my_scal_prod(axis,v);
+  //    SVector3 vres = (v - temp)*coss + crossprod(axis,v)*sinn + temp;
+  //    for (int j=0;j<3;j++)
+  //      res(j,i)=vres(j);
+  //  }
+  //  return res;
+}
+
+
+// TODO: ce genre de fct... mettre dans une classe FrameField ? Ou bien juste un
+// set de fcts à part ? Parce que ça devient bizarre d'avoir ça dans un BGM ???
+void frameFieldBackgroundMesh3D::get_rotation_matrix
+  (const double &angle_to_go, const SVector3 &rotvec, double* rotmat)
+{
+  double c = cos(angle_to_go);
+  double s = sin(angle_to_go);
+  double temp01 = rotvec[0]*rotvec[1]*(1.-c);
+  double temp02 = rotvec[0]*rotvec[2]*(1.-c);
+  double temp12 = rotvec[1]*rotvec[2]*(1.-c);
+  double square0 = rotvec[0]*rotvec[0];
+  double square1 = rotvec[1]*rotvec[1];
+  double square2 = rotvec[2]*rotvec[2];
+  rotmat[0] = square0 +(1.-square0)*c;
+  rotmat[1] = temp01-rotvec[2]*s;
+  rotmat[2] = temp02+rotvec[1]*s;
+  rotmat[3] = temp01+rotvec[2]*s;
+  rotmat[4] = square1 +(1.-square1)*c;
+  rotmat[5] = temp12-rotvec[0]*s;
+  rotmat[6] = temp02-rotvec[1]*s;
+  rotmat[7] = temp12+rotvec[0]*s;
+  rotmat[8] = square2 +(1.-square2)*c;
+}
+
+void frameFieldBackgroundMesh3D::get_min_rotation_matrix
+  (const STensor3 &reference, const STensor3 &thecross, double &minimum_angle,
+   SVector3 &rotation_axis, double threshold, bool debugflag)
+{
+  minimum_angle = M_PI/2.;
+  pair<int,int> p;
+
+  for (unsigned int iperm=0;iperm<permutation.size();iperm++){
+    if (minimum_angle<threshold) break;
+    for (int i_rotation_perm=0;i_rotation_perm<3;i_rotation_perm++){
+      double a;
+      SVector3 v;
+      get_rotation_angle_and_axis(reference,thecross,a,v,i_rotation_perm,permutation[iperm]);
+      if (debugflag){
+        if (fabs(a)<M_PI/2.){
+          cout << "     temp parameters:  angle=" << a*180./M_PI
+               << "pair=(" << iperm << "," << i_rotation_perm << ") axis=("
+               << v(0) << "," << v(1) << "," << v(2) << ")" << endl;
+        }
+        else
+          cout << "     temp parameters:  angle=" << a*180./M_PI << endl;
+      }
+      if (fabs(a)<fabs(minimum_angle)){
+        p = make_pair(iperm,i_rotation_perm);
+        minimum_angle = a;
+        rotation_axis = v;
+      }
+
+      if (minimum_angle<threshold) break;
+    }
+  }
+  //  cout << "pair=(" << p.first << "," << p.second << ")" << endl;
+  if (debugflag){
+    cout << " ---> MIN parameters:  angle=" << minimum_angle*180./M_PI
+         << " axis=(" << rotation_axis(0) << "," << rotation_axis(1)
+         << "," << rotation_axis(2) << ")" << endl;
+  }
+  return;
+}
+
+
+// compute the angle and axis of rotation between two (unit-orthogonal) cross
+// fields using crossfield vectors permutations defined by modulo and trip The
+// rotation matrix between cross fields C and M is R = C M^T
+void frameFieldBackgroundMesh3D::get_rotation_angle_and_axis
+  (const STensor3 &reference, const STensor3 &thecross, double &minimum_angle,
+   SVector3 &rotation_axis, int modulo, montripletbis &trip)
+{
+  //double MT[3][3],C[3][3],R[3][3];
+  double C[3][3],R[3][3];
+
+  for (int i=0;i<3;i++){
+    for (int j=0;j<3;j++){
+      C[i][j] = signof(trip(j)) * thecross(i,((abs(trip(j))-1)+modulo)%3);
+      //MT[j][i] = reference(i,j);//transpose !
+    }
+  }
+
+  //  ////////////////////
+  //  for (int k=0;k<2;k++){
+  //    double test1 = C[0][k]*C[0][k]*C[1][k]*C[1][k] +  C[0][k]*C[0][k]*C[2][k]*C[2][k] +  C[2][k]*C[2][k]*C[1][k]*C[1][k];
+  //    double test2 = reference(0,k)*reference(0,k)*reference(1,k)*reference(1,k) +  reference(0,k)*reference(0,k)*reference(2,k)*reference(2,k) +  reference(2,k)*reference(2,k)*reference(1,k)*reference(1,k);
+  //    cout << "    --- k=" << k << " test1=" << test1 << endl;
+  //    cout << "    --- k=" << k << " test2=" << test2 << endl;
+  //  }
+  //  ////////////////////
+
+  // computing the trace for the angle...
+  // MT is transpose of reference !!!
+  //  R[0][0] = C[0][0]*MT[0][0] + C[0][1]*MT[1][0] + C[0][2]*MT[2][0];
+  //  R[1][1] = C[1][0]*MT[0][1] + C[1][1]*MT[1][1] + C[1][2]*MT[2][1];
+  //  R[2][2] = C[2][0]*MT[0][2] + C[2][1]*MT[1][2] + C[2][2]*MT[2][2];
+  R[0][0] = C[0][0]*reference(0,0) + C[0][1]*reference(0,1) + C[0][2]*reference(0,2);
+  R[1][1] = C[1][0]*reference(1,0) + C[1][1]*reference(1,1) + C[1][2]*reference(1,2);
+  R[2][2] = C[2][0]*reference(2,0) + C[2][1]*reference(2,1) + C[2][2]*reference(2,2);
+
+  // computing rotation angle
+  double trace = R[0][0] + R[1][1] + R[2][2];
+  minimum_angle = acos(max(min(0.5*(trace-1.),1.),-1.));// tjrs > 0
+
+  //  cout << "minimum_angle=" << minimum_angle << " trace=" << trace << endl;
+
+  if (fabs(minimum_angle)>M_PI/2.) return;// no need to continue...
+
+  // computing rotation axis
+  // computing the remaining terms, not on diagonal
+  if (fabs(minimum_angle)<1.e-6){
+    rotation_axis(0)=0.;
+    rotation_axis(1)=0.;
+    rotation_axis(2)=1.;
+    return;
+  }
+
+  R[0][1] = C[0][0]*reference(1,0) + C[0][1]*reference(1,1) + C[0][2]*reference(1,2);
+  R[0][2] = C[0][0]*reference(2,0) + C[0][1]*reference(2,1) + C[0][2]*reference(2,2);
+  R[1][0] = C[1][0]*reference(0,0) + C[1][1]*reference(0,1) + C[1][2]*reference(0,2);
+  R[1][2] = C[1][0]*reference(2,0) + C[1][1]*reference(2,1) + C[1][2]*reference(2,2);
+  R[2][0] = C[2][0]*reference(0,0) + C[2][1]*reference(0,1) + C[2][2]*reference(0,2);
+  R[2][1] = C[2][0]*reference(1,0) + C[2][1]*reference(1,1) + C[2][2]*reference(1,2);
+
+  double factor = -0.5/sin(minimum_angle);
+  rotation_axis(0) = (R[2][1]-R[1][2])*factor;
+  rotation_axis(1) = (R[0][2]-R[2][0])*factor;
+  rotation_axis(2) = (R[1][0]-R[0][1])*factor;
+  return;
+}
+
+void frameFieldBackgroundMesh3D::exportVectorialSmoothness(const string &filename)
+{
+  FILE *f = Fopen(filename.c_str(), "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", filename.c_str());
+    return;
+  }
+
+  fprintf(f, "View \"Background Mesh\"{\n");
+
+  set<const MVertex*> done;
+
+  for (unsigned int ie = 0; ie < getNumMeshElements(); ie++){// for all elements
+    const MElement *e = getElement(ie);
+    for (int iv = 0; iv < e->getNumVertices(); iv++){
+      const MVertex *v = e->getVertex(iv);
+      set<const MVertex*>::iterator itfind = done.find(v);
+      if (itfind!=done.end()) continue;
+      done.insert(v);
+      STensor3 cf;
+      eval_approximate_crossfield(v,cf);
+      for (int i = 0; i < 3; i++){
+        double vs = get_vectorial_smoothness(i,v);
+        fprintf(f,"VP(%g,%g,%g){%g,%g,%g};\n", v->x(), v->y(), v->z(),
+                cf(0,i)*vs,cf(1,i)*vs,cf(2,i)*vs);
+      }
+    }
+  }
+  fprintf(f,"};\n");
+  fclose(f);
+}
diff --git a/Mesh/BackgroundMesh3D.h b/Mesh/BackgroundMesh3D.h
new file mode 100644
index 0000000..9b70f5d
--- /dev/null
+++ b/Mesh/BackgroundMesh3D.h
@@ -0,0 +1,163 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _BACKGROUND_MESH3D_H_
+#define _BACKGROUND_MESH3D_H_
+
+#include <set>
+#include <vector>
+#include <map>
+#include <fstream>
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+#include <numeric>
+#include "BGMBase.h"
+#include "pointInsertion.h"
+
+#if defined(HAVE_ANN)
+#include "ANN/ANN.h"
+class ANNkd_tree;
+#endif
+
+// TODO: do we really need to build the graph vertex2elem-> vertex 2 neighbors ?
+// This was useful for the smoothness computation, if we want to take into
+// account vertices at a given topological distance... but using distance=1, it
+// seems to work... ?!
+
+class montripletbis{
+public:
+  ~montripletbis(){};
+  montripletbis(int a,int b, int c):vec(3){
+    vec[0] = a;
+    vec[1] = b;
+    vec[2] = c;
+  };
+  inline int operator()(int i)const{return vec[i];}
+private:
+  std::vector<int> vec;
+};
+
+
+// difference with BackgroundMesh2D: no copy of components, working directly on the vertices and elements of GRegion
+
+class backgroundMesh3D : public BGMBase {
+protected:
+  virtual void computeSizeField();
+  virtual void propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane = false);
+  virtual GPoint get_GPoint_from_MVertex(const MVertex *) const;
+
+  virtual const MElement* getElement(unsigned int i)const;
+  virtual unsigned int getNumMeshElements()const;
+
+  const bool debug;
+  const bool verbose;
+
+public:
+
+  backgroundMesh3D(GRegion *_gr);
+  virtual ~backgroundMesh3D();
+
+  virtual MElementOctree* getOctree();
+
+  virtual MVertex* get_nearest_neighbor(const double* xyz, double & distance );
+  virtual MVertex* get_nearest_neighbor(const double* xyz);
+  virtual MVertex* get_nearest_neighbor(const MVertex *v);
+  virtual MVertex* get_nearest_neighbor(double x, double y, double z);
+  virtual MVertex* get_nearest_neighbor(double x, double y, double z, double &distance );
+};
+
+
+
+class frameFieldBackgroundMesh3D : public backgroundMesh3D{
+public:
+  //    typedef tr1::unordered_map<hash_key_ptr, std::set<MElement*> > vert2elemtype;
+  //    typedef tr1::unordered_map<MElement*, std::set<MVertex*> > elem2verttype;
+  typedef std::map<hash_key_ptr, std::set<MElement*> > vert2elemtype;
+  typedef std::map<MElement*, std::set<MVertex*> > elem2verttype;
+  typedef std::multimap<MVertex*, std::pair<int,MVertex*> > graphtype;
+
+protected:
+  bool smooth_the_crossfield;
+
+  void initiate_crossfield();
+  void initiate_ANN_research();
+  void computeCrossField();
+  void computeSmoothnessOnlyFromBoundaries();
+
+  void build_vertex_to_element_table();
+
+  // fills the multimap "graph": vertex to direct neighbors, or indirect neighbors, depending on the "max_recursion_level".
+  void build_neighbors(const int &max_recursion_level);
+
+  // function called only by "build_neighbors", recursively recovering vertices neighbors.
+  void get_recursive_neighbors(std::set<MVertex*> &start, std::set<MVertex*> &visited, std::set<MElement*> &visited_elements, std::multimap<int,MVertex*> &proximity, int max_level, int level=0);
+
+
+  double compare_to_neighbors(SPoint3 current, STensor3 &ref, std::multimap<double,MVertex*>::iterator itbegin, std::multimap<double,MVertex*>::iterator itend, SVector3 &mean_axis,double &mean_angle, std::vector<double> &vectorial_smoothness);
+  STensor3 apply_rotation(const SVector3 &axis, const double &angle, const STensor3 &thecross);
+  void get_rotation_matrix(const double &angle_to_go, const SVector3 &rotvec, double* rotmat);
+  void get_min_rotation_matrix(const STensor3 &reference, const STensor3 &thecross, double &minimum_angle, SVector3 &rotation_axis, double threshold=-1., bool debugflag=false);
+  void get_rotation_angle_and_axis(const STensor3 &reference, const STensor3 &thecross, double &minimum_angle, SVector3 &rotation_axis, int modulo, montripletbis &trip);
+
+
+
+  TensorStorageType crossField;
+  DoubleStorageType crossFieldSmoothness;
+  VectorStorageType crossFieldVectorialSmoothness;
+  vert2elemtype vert2elem;
+  elem2verttype elem2vert;
+
+  std::set<MVertex*> listOfBndVertices;
+  graphtype graph;
+  double smoothness_threshold;
+
+  static std::vector<montripletbis> permutation;
+
+#if defined(HAVE_ANN)
+  ANNkd_tree* annTree;
+  ANNpointArray dataPts;
+  ANNkd_tree* annTreeBnd;
+  ANNpointArray dataPtsBnd;
+#endif
+
+public:
+  frameFieldBackgroundMesh3D(GRegion *_gf);
+  virtual ~frameFieldBackgroundMesh3D();
+
+  MVertex* get_nearest_neighbor_on_boundary(MVertex* v);
+  MVertex* get_nearest_neighbor_on_boundary(MVertex* v, double &distance);
+
+  //    bool findvertex(const MVertex *v)const{
+  //      std::map<MVertex*,double>::const_iterator it = sizeField.find(const_cast<MVertex*>(v));
+  //      if (it==sizeField.end()) return false;
+  //      return true;
+  //    };
+
+  double get_smoothness(double x, double y, double z);
+  double get_smoothness(MVertex *v);
+
+  double get_approximate_smoothness(double x, double y, double z);
+  double get_approximate_smoothness(MVertex *v);
+
+  void eval_approximate_crossfield(double x, double y, double z, STensor3 &cf);
+  void eval_approximate_crossfield(const MVertex *vert, STensor3 &cf);
+
+  void get_vectorial_smoothness(double x, double y, double z, SVector3 &cf);
+  void get_vectorial_smoothness(const MVertex *vert, SVector3 &cf);
+  double get_vectorial_smoothness(const int idir, double x, double y, double z);
+  double get_vectorial_smoothness(const int idir, const MVertex *vert);
+
+  inline void exportCrossField(const std::string &filename){export_tensor_as_vectors(filename,crossField);};
+  inline void exportSmoothness(const std::string &filename) const{export_scalar(filename,crossFieldSmoothness);};
+  void exportVectorialSmoothness(const std::string &filename);
+
+  //  private:
+  //    STensor3 get_random_cross()const;
+
+};
+
+
+#endif
diff --git a/Mesh/BackgroundMeshManager.cpp b/Mesh/BackgroundMeshManager.cpp
new file mode 100644
index 0000000..0926f33
--- /dev/null
+++ b/Mesh/BackgroundMeshManager.cpp
@@ -0,0 +1,65 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "BackgroundMeshManager.h"
+#include "BGMBase.h"
+#include "BackgroundMesh2D.h"
+#include "GEntity.h"
+#include "GFace.h"
+#include "GRegion.h"
+#include "BackgroundMesh3D.h"
+
+map<GEntity*,BGMBase*> BGMManager::data = map<GEntity*,BGMBase*>();
+BGMBase* BGMManager::latest2Dbgm = NULL;
+bool BGMManager::use_cross_field = true;
+
+void BGMManager::set_use_cross_field(bool b)
+{
+  if (b && (BGMManager::use_cross_field==false)){// need to change...
+    data.clear();
+  }
+  BGMManager::use_cross_field = b;
+}
+
+BGMBase* BGMManager::get(GRegion* gf)
+{
+  map<GEntity*,BGMBase*>::iterator itfind = data.find(gf);
+  if (itfind!=data.end()){
+    return itfind->second;
+  }
+
+  BGMBase *bgm;
+  if (use_cross_field){
+    bgm = new frameFieldBackgroundMesh3D(gf);
+  }
+  else{
+    bgm = new backgroundMesh3D(gf);
+  }
+  data.insert(make_pair(gf,bgm));
+  return bgm;
+}
+
+BGMBase* BGMManager::get(GFace* gf)
+{
+  map<GEntity*,BGMBase*>::iterator itfind = data.find(gf);
+  if (itfind!=data.end()){
+    latest2Dbgm = itfind->second;
+    return itfind->second;
+  }
+
+  BGMBase *bgm;
+  if (use_cross_field)
+    bgm = new frameFieldBackgroundMesh2D(gf);
+  else
+    bgm = new backgroundMesh2D(gf);
+  data.insert(make_pair(gf,bgm));
+  latest2Dbgm = bgm;
+  return bgm;
+}
+
+BGMBase* BGMManager::current2D()
+{
+  return latest2Dbgm;
+};
diff --git a/Mesh/BackgroundMeshManager.h b/Mesh/BackgroundMeshManager.h
new file mode 100644
index 0000000..30388b2
--- /dev/null
+++ b/Mesh/BackgroundMeshManager.h
@@ -0,0 +1,30 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _BACKGROUND_MESH_MANAGER_H_
+#define _BACKGROUND_MESH_MANAGER_H_
+
+#include <map>
+#include "BGMBase.h"
+
+using namespace std;
+
+class GEntity;
+class GFace;
+class GRegion;
+
+class BGMManager{
+public:
+  static BGMBase* get(GFace *gf);
+  static BGMBase* get(GRegion *gf);
+  static BGMBase* current2D();
+  static void set_use_cross_field(bool b);
+private:
+  static bool use_cross_field;
+  static BGMBase *latest2Dbgm;
+  static map<GEntity*,BGMBase*> data;
+};
+
+#endif
diff --git a/Mesh/BackgroundMeshTools.cpp b/Mesh/BackgroundMeshTools.cpp
new file mode 100644
index 0000000..2c49999
--- /dev/null
+++ b/Mesh/BackgroundMeshTools.cpp
@@ -0,0 +1,411 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "BackgroundMeshTools.h"
+#include "GFace.h"
+#include "GVertex.h"
+#include "GEdge.h"
+#include "GEdgeCompound.h"
+#include "GEntity.h"
+#include "Context.h"
+#include "Field.h"
+#include "GModel.h"
+
+static double max_surf_curvature(const GEdge *ge, double u)
+{
+  double val = 0;
+  std::list<GFace *> faces = ge->faces();
+  std::list<GFace *>::iterator it = faces.begin();
+  while(it != faces.end()){
+    if ((*it)->geomType() != GEntity::CompoundSurface &&
+        (*it)->geomType() != GEntity::DiscreteSurface){
+      SPoint2 par = ge->reparamOnFace((*it), u, 1);
+      double cc = (*it)->curvature(par);
+      val = std::max(cc, val);
+    }
+    ++it;
+  }
+  return val;
+}
+
+static double max_edge_curvature(const GVertex *gv)
+{
+  double val = 0;
+  std::list<GEdge*> l_edges = gv->edges();
+  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
+       ite != l_edges.end(); ++ite){
+    GEdge *_myGEdge = *ite;
+    Range<double> range = _myGEdge->parBounds(0);
+    double cc;
+    if (gv == _myGEdge->getBeginVertex()) cc = _myGEdge->curvature(range.low());
+    else cc = _myGEdge->curvature(range.high());
+    val = std::max(val, cc);
+  }
+  return val;
+}
+
+// the mesh vertex is classified on a model vertex.  we compute the
+// maximum of the curvature of model faces surrounding this point if
+// it is classified on a model edge, we do the same for all model
+// faces surrounding it if it is on a model face, we compute the
+// curvature at this location
+
+static double LC_MVertex_CURV(GEntity *ge, double U, double V)
+{
+  double Crv = 0;
+  switch(ge->dim()){
+  case 0:
+    Crv = max_edge_curvature((const GVertex *)ge);
+    //Crv = std::max(max_surf_curvature_vertex((const GVertex *)ge), Crv);
+    // Crv = max_surf_curvature((const GVertex *)ge);
+    break;
+  case 1:
+    {
+      GEdge *ged = (GEdge *)ge;
+      Crv = ged->curvature(U);
+      Crv = std::max(Crv, max_surf_curvature(ged, U));
+      // Crv = max_surf_curvature(ged, U);
+    }
+    break;
+  case 2:
+    {
+      GFace *gf = (GFace *)ge;
+      Crv = gf->curvature(SPoint2(U, V));
+    }
+    break;
+  }
+  double lc = Crv > 0 ? 2 * M_PI / Crv / CTX::instance()->mesh.minCircPoints : MAX_LC;
+  return lc;
+}
+
+SMetric3 max_edge_curvature_metric(const GEdge *ge, double u)
+{
+  SVector3 t =  ge->firstDer(u);
+  t.normalize();
+  double l_t = ((2 * M_PI) /( fabs(ge->curvature(u))
+			      *  CTX::instance()->mesh.minCircPoints ));
+  double l_n = 1.e12;
+  return buildMetricTangentToCurve(t,l_t,l_n);
+}
+
+static SMetric3 metric_based_on_surface_curvature(const GEdge *ge, double u, bool iso_surf)
+{
+  const GEdgeCompound* ptrCompoundEdge = dynamic_cast<const GEdgeCompound*>(ge);
+  if (ptrCompoundEdge){
+    double cmax, cmin;
+    SVector3 dirMax,dirMin;
+    cmax = ptrCompoundEdge->curvatures(u,&dirMax, &dirMin, &cmax,&cmin);
+    if (cmin == 0)cmin =1.e-12;
+    if (cmax == 0)cmax =1.e-12;
+    double lambda2 =  ((2 * M_PI) /( fabs(cmax) *  CTX::instance()->mesh.minCircPoints ) );
+    double lambda1 =  ((2 * M_PI) /( fabs(cmin) *  CTX::instance()->mesh.minCircPoints ) );
+    SVector3 Z = crossprod(dirMax,dirMin);
+
+    lambda1 = std::max(lambda1, CTX::instance()->mesh.lcMin);
+    lambda2 = std::max(lambda2, CTX::instance()->mesh.lcMin);
+    lambda1 = std::min(lambda1, CTX::instance()->mesh.lcMax);
+    lambda2 = std::min(lambda2, CTX::instance()->mesh.lcMax);
+
+    SMetric3 curvMetric (1. / (lambda1 * lambda1), 1. / (lambda2 * lambda2),
+                         1.e-12, dirMin, dirMax, Z);
+    return curvMetric;
+  }
+  else{
+    SMetric3 mesh_size(1.e-12);
+    std::list<GFace *> faces = ge->faces();
+    std::list<GFace *>::iterator it = faces.begin();
+    // we choose the metric eigenvectors to be the ones
+    // related to the edge ...
+    SMetric3 curvMetric = max_edge_curvature_metric(ge, u);
+    while(it != faces.end()){
+      if (((*it)->geomType() != GEntity::CompoundSurface) &&
+          ((*it)->geomType() != GEntity::DiscreteSurface)){
+        SPoint2 par = ge->reparamOnFace((*it), u, 1);
+        SMetric3 m = metric_based_on_surface_curvature (*it, par.x(), par.y(), iso_surf);
+        curvMetric = intersection_conserveM1(curvMetric,m);
+      }
+      ++it;
+    }
+
+    return curvMetric;
+  }
+}
+
+static SMetric3 metric_based_on_surface_curvature(const GVertex *gv, bool iso_surf)
+{
+  SMetric3 mesh_size(1.e-15);
+  std::list<GEdge*> l_edges = gv->edges();
+  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
+       ite != l_edges.end(); ++ite){
+    GEdge *_myGEdge = *ite;
+    Range<double> bounds = _myGEdge->parBounds(0);
+
+    // ES: Added extra if condition to use the code below only with compund curves
+    // This is because we want to call the function
+    // metric_based_on_surface_curvature(const GEdge *ge, double u) for the case when
+    // ge is a compound edge
+    if (_myGEdge->geomType() == GEntity::CompoundCurve){
+      if (gv == _myGEdge->getBeginVertex())
+        mesh_size = intersection
+          (mesh_size,
+           metric_based_on_surface_curvature(_myGEdge, bounds.low(), iso_surf));
+      else
+        mesh_size = intersection
+          (mesh_size,
+           metric_based_on_surface_curvature(_myGEdge, bounds.high(), iso_surf));
+    }
+  }
+  return mesh_size;
+}
+
+SMetric3 LC_MVertex_CURV_ANISO(GEntity *ge, double U, double V)
+{
+  bool iso_surf = CTX::instance()->mesh.lcFromCurvature == 2;
+
+  switch(ge->dim()){
+  case 0: return metric_based_on_surface_curvature((const GVertex *)ge, iso_surf);
+  case 1: return metric_based_on_surface_curvature((const GEdge *)ge, U, iso_surf);
+  case 2: return metric_based_on_surface_curvature((const GFace *)ge, U, V, iso_surf);
+  }
+  Msg::Error("Curvature control impossible to compute for a volume!");
+  return SMetric3();
+}
+
+// compute the mesh size at a given vertex due to prescribed sizes at
+// mesh vertices
+static double LC_MVertex_PNTS(GEntity *ge, double U, double V)
+{
+  switch(ge->dim()){
+  case 0:
+    {
+      GVertex *gv = (GVertex *)ge;
+      double lc = gv->prescribedMeshSizeAtVertex();
+      // FIXME we might want to remove this to make all lc treatment consistent
+      if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
+      return lc;
+    }
+  case 1:
+    {
+      GEdge *ged = (GEdge *)ge;
+      GVertex *v1 = ged->getBeginVertex();
+      GVertex *v2 = ged->getEndVertex();
+      if (v1 && v2){
+        Range<double> range = ged->parBounds(0);
+        double a = (U - range.low()) / (range.high() - range.low());
+        double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() +
+          (a) * v2->prescribedMeshSizeAtVertex() ;
+
+        // FIXME we might want to remove this to make all lc treatment consistent
+        if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
+        return lc;
+      }
+      else
+        return MAX_LC;
+    }
+  default:
+    return MAX_LC;
+  }
+}
+
+SMetric3 buildMetricTangentToCurve(SVector3 &t, double l_t, double l_n)
+{
+  if (l_t == 0.0) return SMetric3(1.e-22);
+  SVector3 a;
+  if (fabs(t(0)) <= fabs(t(1)) && fabs(t(0)) <= fabs(t(2))){
+    a = SVector3(1,0,0);
+  }
+  else if (fabs(t(1)) <= fabs(t(0)) && fabs(t(1)) <= fabs(t(2))){
+    a = SVector3(0,1,0);
+  }
+  else{
+    a = SVector3(0,0,1);
+  }
+  SVector3 b = crossprod (t,a);
+  SVector3 c = crossprod (b,t);
+  b.normalize();
+  c.normalize();
+  t.normalize();
+  SMetric3 Metric (1./(l_t*l_t),1./(l_n*l_n),1./(l_n*l_n),t,b,c);
+  //  printf("bmttc %g %g %g %g %g\n",l_t,l_n,Metric(0,0),Metric(0,1),Metric(1,1));
+  return Metric;
+}
+
+SMetric3 buildMetricTangentToSurface(SVector3 &t1, SVector3 &t2,
+                                     double l_t1, double l_t2, double l_n)
+{
+  t1.normalize();
+  t2.normalize();
+  SVector3 n = crossprod (t1,t2);
+  n.normalize();
+
+  l_t1 = std::max(l_t1, CTX::instance()->mesh.lcMin);
+  l_t2 = std::max(l_t2, CTX::instance()->mesh.lcMin);
+  l_t1 = std::min(l_t1, CTX::instance()->mesh.lcMax);
+  l_t2 = std::min(l_t2, CTX::instance()->mesh.lcMax);
+  SMetric3 Metric (1./(l_t1*l_t1),1./(l_t2*l_t2),1./(l_n*l_n),t1,t2,n);
+  return Metric;
+}
+
+// This is the only function that is used by the meshers
+double BGM_MeshSize(GEntity *ge, double U, double V,
+                    double X, double Y, double Z)
+{
+  // default lc (mesh size == size of the model)
+  double l1 = CTX::instance()->lc;
+
+  // lc from points
+  double l2 = MAX_LC;
+  if(CTX::instance()->mesh.lcFromPoints && ge->dim() < 2)
+    l2 = LC_MVertex_PNTS(ge, U, V);
+
+  // lc from curvature
+  double l3 = MAX_LC;
+  if(CTX::instance()->mesh.lcFromCurvature && ge->dim() < 3)
+    l3 = LC_MVertex_CURV(ge, U, V);
+
+  // lc from fields
+  double l4 = MAX_LC;
+  FieldManager *fields = ge->model()->getFields();
+  if(fields->getBackgroundField() > 0){
+    Field *f = fields->get(fields->getBackgroundField());
+    if(f) l4 = (*f)(X, Y, Z, ge);
+  }
+
+  // take the minimum, then constrain by lcMin and lcMax
+  double lc = std::min(std::min(std::min(l1, l2), l3), l4);
+  lc = std::max(lc, CTX::instance()->mesh.lcMin);
+  lc = std::min(lc, CTX::instance()->mesh.lcMax);
+
+  if(lc <= 0.){
+    Msg::Error("Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)",
+               lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax);
+    lc = l1;
+  }
+
+  //Msg::Debug("BGM X,Y,Z=%g,%g,%g L4=%g L3=%g L2=%g L1=%g LC=%g LFINAL=%g DIM =%d ",
+  //X, Y, Z, l4, l3, l2, l1, lc, lc * CTX::instance()->mesh.lcFactor, ge->dim());
+
+  //Emi fix
+  //if (lc == l1) lc /= 10.;
+
+  return lc * CTX::instance()->mesh.lcFactor;
+}
+
+// anisotropic version of the background field
+SMetric3 BGM_MeshMetric(GEntity *ge,
+                        double U, double V,
+                        double X, double Y, double Z)
+{
+
+  // Metrics based on element size
+
+  // Element size = min. between default lc and lc from point (if applicable),
+  // constrained by lcMin and lcMax
+  double lc = CTX::instance()->lc;
+  if(CTX::instance()->mesh.lcFromPoints && ge->dim() < 2) lc = std::min(lc, LC_MVertex_PNTS(ge, U, V));
+  lc = std::max(lc, CTX::instance()->mesh.lcMin);
+  lc = std::min(lc, CTX::instance()->mesh.lcMax);
+  if(lc <= 0.){
+    Msg::Error("Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)",
+               lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax);
+    lc = CTX::instance()->lc;
+  }
+  SMetric3 m0(1./(lc*lc));
+
+  // Intersect with metrics from fields if applicable
+  FieldManager *fields = ge->model()->getFields();
+  SMetric3 m1 = m0;
+  if(fields->getBackgroundField() > 0){
+    Field *f = fields->get(fields->getBackgroundField());
+    if(f) {
+      SMetric3 l4;
+      if (!f->isotropic()) (*f)(X, Y, Z, l4, ge);
+      else {
+        const double L = (*f)(X, Y, Z, ge);
+        l4 = SMetric3(1/(L*L));
+      }
+      m1 = intersection(l4, m0);
+    }
+  }
+
+  // Intersect with metrics from curvature if applicable
+  SMetric3 m = (CTX::instance()->mesh.lcFromCurvature && ge->dim() < 3) ?
+      intersection(m1, LC_MVertex_CURV_ANISO(ge, U, V)) : m1;
+
+  return m;
+}
+
+bool Extend1dMeshIn2dSurfaces()
+{
+  return CTX::instance()->mesh.lcExtendFromBoundary ? true : false;
+}
+
+bool Extend2dMeshIn3dVolumes()
+{
+  return CTX::instance()->mesh.lcExtendFromBoundary ? true : false;
+}
+
+SMetric3 max_edge_curvature_metric(const GVertex *gv)
+{
+  SMetric3 val (1.e-12);
+  std::list<GEdge*> l_edges = gv->edges();
+  for (std::list<GEdge*>::const_iterator ite = l_edges.begin();
+       ite != l_edges.end(); ++ite){
+    GEdge *_myGEdge = *ite;
+    Range<double> range = _myGEdge->parBounds(0);
+    SMetric3 cc;
+    if (gv == _myGEdge->getBeginVertex()) {
+      SVector3 t = _myGEdge->firstDer(range.low());
+      t.normalize();
+      double l_t = ((2 * M_PI) /( fabs(_myGEdge->curvature(range.low()))
+				*  CTX::instance()->mesh.minCircPoints ));
+      double l_n = 1.e12;
+      cc = buildMetricTangentToCurve(t,l_t,l_n);
+    }
+    else {
+      SVector3 t = _myGEdge->firstDer(range.high());
+      t.normalize();
+      double l_t = ((2 * M_PI) /( fabs(_myGEdge->curvature(range.high()))
+				  *  CTX::instance()->mesh.minCircPoints ));
+      double l_n = 1.e12;
+      cc = buildMetricTangentToCurve(t,l_t,l_n);
+    }
+    val = intersection(val,cc);
+  }
+  return val;
+}
+
+SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v,
+					   bool surface_isotropic,
+					   double d_normal ,
+					   double d_tangent_max)
+{
+  if (gf->geomType() == GEntity::Plane)return SMetric3(1.e-12);
+  double cmax, cmin;
+  SVector3 dirMax,dirMin;
+  cmax = gf->curvatures(SPoint2(u, v),&dirMax, &dirMin, &cmax,&cmin);
+  if (cmin == 0)cmin =1.e-12;
+  if (cmax == 0)cmax =1.e-12;
+  double lambda1 =  ((2 * M_PI) /( fabs(cmin) *  CTX::instance()->mesh.minCircPoints ) );
+  double lambda2 =  ((2 * M_PI) /( fabs(cmax) *  CTX::instance()->mesh.minCircPoints ) );
+  SVector3 Z = crossprod(dirMax,dirMin);
+  if (surface_isotropic)  lambda2 = lambda1 = std::min(lambda2,lambda1);
+  dirMin.normalize();
+  dirMax.normalize();
+  Z.normalize();
+  lambda1 = std::max(lambda1, CTX::instance()->mesh.lcMin);
+  lambda2 = std::max(lambda2, CTX::instance()->mesh.lcMin);
+  lambda1 = std::min(lambda1, CTX::instance()->mesh.lcMax);
+  lambda2 = std::min(lambda2, CTX::instance()->mesh.lcMax);
+  double lambda3 = std::min(d_normal, CTX::instance()->mesh.lcMax);
+  lambda3 = std::max(lambda3, CTX::instance()->mesh.lcMin);
+  lambda1 = std::min(lambda1, d_tangent_max);
+  lambda2 = std::min(lambda2, d_tangent_max);
+
+  SMetric3 curvMetric (1./(lambda1*lambda1),1./(lambda2*lambda2),
+		       1./(lambda3*lambda3),
+                       dirMin, dirMax, Z );
+  return curvMetric;
+}
diff --git a/Mesh/BackgroundMeshTools.h b/Mesh/BackgroundMeshTools.h
new file mode 100644
index 0000000..f36d58a
--- /dev/null
+++ b/Mesh/BackgroundMeshTools.h
@@ -0,0 +1,30 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _BACKGROUND_MESH_TOOLS_H_
+#define _BACKGROUND_MESH_TOOLS_H_
+
+#include "STensor3.h"
+
+class GFace;
+class GVertex;
+class GEdge;
+class GEntity;
+
+SMetric3 buildMetricTangentToCurve(SVector3 &t, double l_t, double l_n);
+SMetric3 buildMetricTangentToSurface(SVector3 &t1, SVector3 &t2, double l_t1,
+                                     double l_t2, double l_n);
+double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double Z);
+SMetric3 BGM_MeshMetric(GEntity *ge, double U, double V, double X, double Y, double Z);
+bool Extend1dMeshIn2dSurfaces();
+bool Extend2dMeshIn3dVolumes();
+SMetric3 max_edge_curvature_metric(const GVertex *gv);
+SMetric3 max_edge_curvature_metric(const GEdge *ge, double u, double &l);
+SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v,
+                                           bool surface_isotropic = false,
+                                           double d_normal = 1.e12,
+                                           double d_tangent_max = 1.e12);
+
+#endif
diff --git a/Mesh/BoundaryLayers.cpp b/Mesh/BoundaryLayers.cpp
index 741d67d..c6de33d 100644
--- a/Mesh/BoundaryLayers.cpp
+++ b/Mesh/BoundaryLayers.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/BoundaryLayers.h b/Mesh/BoundaryLayers.h
index 96dcec5..71bff7e 100644
--- a/Mesh/BoundaryLayers.h
+++ b/Mesh/BoundaryLayers.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/CMakeLists.txt b/Mesh/CMakeLists.txt
index 1afc759..c1cef52 100644
--- a/Mesh/CMakeLists.txt
+++ b/Mesh/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,7 +18,14 @@ set(SRC
       meshGRegionExtruded.cpp  meshGRegionCarveHole.cpp 
       meshGRegionLocalMeshMod.cpp meshGRegionMMG3D.cpp
     meshMetric.cpp
+    BackgroundMeshTools.cpp 
     BackgroundMesh.cpp 
+    BGMBase.cpp 
+    BackgroundMesh2D.cpp 
+    BackgroundMesh3D.cpp 
+    BackgroundMeshManager.cpp 
+    pointInsertionRTreeTools.cpp 
+    pointInsertion.cpp 
     qualityMeasures.cpp 
     BoundaryLayers.cpp 
     BDS.cpp 
diff --git a/Mesh/CenterlineField.cpp b/Mesh/CenterlineField.cpp
index 0326e0e..e776297 100644
--- a/Mesh/CenterlineField.cpp
+++ b/Mesh/CenterlineField.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,7 +33,7 @@
 #include "discreteFace.h"
 #include "GEdgeCompound.h"
 #include "GFaceCompound.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "meshGFace.h"
 #include "meshGEdge.h"
 #include "MQuadrangle.h"
@@ -44,8 +44,7 @@
 #include "meshGRegion.h"
 
 #if defined(HAVE_ANN)
-#include <ANN/ANN.h>
-
+#include "ANN/ANN.h"
 
 static void erase(std::vector<MLine*>& lines, MLine* l)
 {
@@ -575,8 +574,9 @@ void Centerline::computeRadii()
 
 void Centerline::buildKdTree()
 {
-  FILE * f = Fopen("myPOINTS.pos","w");
-  fprintf(f, "View \"\"{\n");
+  FILE *f = Fopen("myPOINTS.pos","w");
+
+  if(f) fprintf(f, "View \"\"{\n");
 
   int nbPL = 3;  //10 points per line
   //int nbNodes  = (lines.size()+1) + (nbPL*lines.size());
@@ -586,35 +586,37 @@ void Centerline::buildKdTree()
   int ind = 0;
   std::map<MVertex*, int>::iterator itp = colorp.begin();
   while (itp != colorp.end()){
-     MVertex *v = itp->first;
-     nodes[ind][0] = v->x();
-     nodes[ind][1] = v->y();
-     nodes[ind][2] = v->z();
-     itp++; ind++;
+    MVertex *v = itp->first;
+    nodes[ind][0] = v->x();
+    nodes[ind][1] = v->y();
+    nodes[ind][2] = v->z();
+    itp++; ind++;
   }
   for(unsigned int k = 0; k < lines.size(); ++k){
-   MVertex *v0 = lines[k]->getVertex(0);
-   MVertex *v1 = lines[k]->getVertex(1);
-   SVector3 P0(v0->x(),v0->y(), v0->z());
-   SVector3 P1(v1->x(),v1->y(), v1->z());
-   for (int j= 1; j < nbPL+1; j++){
-     double inc = (double)j/(double)(nbPL+1);
-     SVector3 Pj = P0+inc*(P1-P0);
-     nodes[ind][0] = Pj.x();
-     nodes[ind][1] = Pj.y();
-     nodes[ind][2] = Pj.z();
-     ind++;
-   }
- }
+    MVertex *v0 = lines[k]->getVertex(0);
+    MVertex *v1 = lines[k]->getVertex(1);
+    SVector3 P0(v0->x(),v0->y(), v0->z());
+    SVector3 P1(v1->x(),v1->y(), v1->z());
+    for (int j= 1; j < nbPL+1; j++){
+      double inc = (double)j/(double)(nbPL+1);
+      SVector3 Pj = P0+inc*(P1-P0);
+      nodes[ind][0] = Pj.x();
+      nodes[ind][1] = Pj.y();
+      nodes[ind][2] = Pj.z();
+      ind++;
+    }
+  }
 
- kdtree = new ANNkd_tree(nodes, nbNodes, 3);
+  kdtree = new ANNkd_tree(nodes, nbNodes, 3);
 
- for(int i = 0; i < nbNodes; ++i){
-   fprintf(f, "SP(%g,%g,%g){%g};\n",
-	   nodes[i][0], nodes[i][1],nodes[i][2],1.0);
- }
- fprintf(f,"};\n");
- fclose(f);
+  if(f){
+    for(int i = 0; i < nbNodes; ++i){
+      fprintf(f, "SP(%g,%g,%g){%g};\n",
+              nodes[i][0], nodes[i][1],nodes[i][2],1.0);
+    }
+    fprintf(f,"};\n");
+    fclose(f);
+  }
 }
 
 void Centerline::createSplitCompounds()
@@ -1033,9 +1035,10 @@ bool Centerline::cutByDisk(SVector3 &PT, SVector3 &NORM, double &maxRad)
       // char name[256];
       // sprintf(name, "myCUT-%d.pos", step);
       // FILE * f2 = Fopen(name,"w");
-      // fprintf(f2, "View \"\"{\n");
-      // std::set<MEdge,Less_Edge>::iterator itp =  newCut.begin();
-      // while (itp != newCut.end()){
+      // if(f2){
+      //   fprintf(f2, "View \"\"{\n");
+      //   std::set<MEdge,Less_Edge>::iterator itp =  newCut.begin();
+      //   while (itp != newCut.end()){
       // 	MEdge l = *itp;
       // 	fprintf(f2, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n",
       // 		  l.getVertex(0)->x(), l.getVertex(0)->y(), l.getVertex(0)->z(),
@@ -1045,6 +1048,7 @@ bool Centerline::cutByDisk(SVector3 &PT, SVector3 &NORM, double &maxRad)
       // 	}
       // 	fprintf(f2,"};\n");
       // 	fclose(f2);
+      // }
     }
   }
 
@@ -1282,46 +1286,51 @@ void Centerline::computeCrossField(double x,double y,double z,
 void Centerline::printSplit() const
 {
   FILE * f = Fopen("mySPLIT.pos","w");
-  fprintf(f, "View \"\"{\n");
-  for(unsigned int i = 0; i < edges.size(); ++i){
-    std::vector<MLine*> lines = edges[i].lines;
-    for(unsigned int k = 0; k < lines.size(); ++k){
-      MLine *l = lines[k];
-      fprintf(f, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n",
-	      l->getVertex(0)->x(), l->getVertex(0)->y(), l->getVertex(0)->z(),
-	      l->getVertex(1)->x(), l->getVertex(1)->y(), l->getVertex(1)->z(),
-	      (double)edges[i].tag, (double)edges[i].tag);
+  if(f){
+    fprintf(f, "View \"\"{\n");
+    for(unsigned int i = 0; i < edges.size(); ++i){
+      std::vector<MLine*> lines = edges[i].lines;
+      for(unsigned int k = 0; k < lines.size(); ++k){
+        MLine *l = lines[k];
+        fprintf(f, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n",
+                l->getVertex(0)->x(), l->getVertex(0)->y(), l->getVertex(0)->z(),
+                l->getVertex(1)->x(), l->getVertex(1)->y(), l->getVertex(1)->z(),
+                (double)edges[i].tag, (double)edges[i].tag);
+      }
     }
+    fprintf(f,"};\n");
+    fclose(f);
   }
-  fprintf(f,"};\n");
-  fclose(f);
 
   // FILE * f3 = Fopen("myJUNCTIONS.pos","w");
-  // fprintf(f3, "View \"\"{\n");
-  //  std::set<MVertex*>::const_iterator itj = junctions.begin();
-  //  while (itj != junctions.end()){
-  //    MVertex *v =  *itj;
-  //    fprintf(f3, "SP(%g,%g,%g){%g};\n",
+  // if(f3){
+  //   fprintf(f3, "View \"\"{\n");
+  //    std::set<MVertex*>::const_iterator itj = junctions.begin();
+  //    while (itj != junctions.end()){
+  //      MVertex *v =  *itj;
+  //      fprintf(f3, "SP(%g,%g,%g){%g};\n",
   // 	     v->x(),  v->y(), v->z(),
   // 	     (double)v->getNum());
-  //    itj++;
+  //      itj++;
+  //   }
+  //   fprintf(f3,"};\n");
+  //   fclose(f3);
   // }
-  // fprintf(f3,"};\n");
-  // fclose(f3);
 
   FILE * f4 = Fopen("myRADII.pos","w");
-  fprintf(f4, "View \"\"{\n");
-  for(unsigned int i = 0; i < lines.size(); ++i){
-    MLine *l = lines[i];
-    std::map<MLine*,double>::const_iterator itc =  radiusl.find(l);
-    fprintf(f4, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n",
- 	    l->getVertex(0)->x(), l->getVertex(0)->y(), l->getVertex(0)->z(),
- 	    l->getVertex(1)->x(), l->getVertex(1)->y(), l->getVertex(1)->z(),
- 	    itc->second,itc->second);
+  if(f4){
+    fprintf(f4, "View \"\"{\n");
+    for(unsigned int i = 0; i < lines.size(); ++i){
+      MLine *l = lines[i];
+      std::map<MLine*,double>::const_iterator itc =  radiusl.find(l);
+      fprintf(f4, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n",
+              l->getVertex(0)->x(), l->getVertex(0)->y(), l->getVertex(0)->z(),
+              l->getVertex(1)->x(), l->getVertex(1)->y(), l->getVertex(1)->z(),
+              itc->second,itc->second);
+    }
+    fprintf(f4,"};\n");
+    fclose(f4);
   }
-  fprintf(f4,"};\n");
-  fclose(f4);
-
 }
 
 #endif
diff --git a/Mesh/CenterlineField.h b/Mesh/CenterlineField.h
index 25275f3..ced1494 100644
--- a/Mesh/CenterlineField.h
+++ b/Mesh/CenterlineField.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/DivideAndConquer.cpp b/Mesh/DivideAndConquer.cpp
index 9794a33..e0c69e4 100644
--- a/Mesh/DivideAndConquer.cpp
+++ b/Mesh/DivideAndConquer.cpp
@@ -19,7 +19,7 @@
 #include "DivideAndConquer.h"
 #include "Numeric.h"
 #include "robustPredicates.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "OS.h"
 #include "GPoint.h"
 #include "GFace.h"
@@ -571,8 +571,12 @@ void DocRecord::voronoiCell(PointNumero pt, std::vector<SPoint2> &pts) const
 void DocRecord::makePosView(std::string fileName, GFace *gf)
 {
   FILE *f = Fopen(fileName.c_str(),"w");
-   if (_adjacencies){
-    fprintf(f,"View \"voronoi\" {\n");
+  if(!f){
+    Msg::Error("Could not open file '%s'", fileName.c_str());
+    return;
+  }
+  if (_adjacencies){
+    fprintf(f, "View \"voronoi\" {\n");
     for(PointNumero i = 0; i < numPoints; i++) {
       std::vector<SPoint2> pts;
       double pc[2] = {(double)points[i].where.h, (double)points[i].where.v};
@@ -607,7 +611,11 @@ void DocRecord::makePosView(std::string fileName, GFace *gf)
 void DocRecord::printMedialAxis(Octree *_octree, std::string fileName, GFace *gf, GEdge *ge)
 {
   FILE *f = Fopen(fileName.c_str(),"w");
-   if (_adjacencies){
+  if(!f){
+    Msg::Error("Could not open file '%s'", fileName.c_str());
+    return;
+  }
+  if (_adjacencies){
     fprintf(f,"View \"medial axis\" {\n");
     for(PointNumero i = 0; i < numPoints; i++) {
       std::vector<SPoint2> pts;
@@ -625,8 +633,8 @@ void DocRecord::printMedialAxis(Octree *_octree, std::string fileName, GFace *gf
 	  GPoint p1(pp1.x(), pp1.y(), 0.0);
 	  GPoint p2(pp2.x(), pp2.y(), 0.0);
 	  if (gf) {
-	     p1 = gf->point(p1.x(), p1.y());
-	     p2 = gf->point(p2.x(), p2.y());
+            p1 = gf->point(p1.x(), p1.y());
+            p2 = gf->point(p2.x(), p2.y());
 	  }
 	  double P1[3] = {p1.x(), p1.y(), p1.z()};
 	  double P2[3] = {p2.x(), p2.y(), p2.z()};
@@ -642,14 +650,13 @@ void DocRecord::printMedialAxis(Octree *_octree, std::string fileName, GFace *gf
 		    p1.x(), p1.y(), p1.z(),
 		    p2.x(), p2.y(), p2.z(),
 		    (double)i, (double)i);
-	 }
+          }
         }
-       }
+      }
     }
     fprintf(f,"};\n");
   }
   fclose(f);
-
 }
 
 void centroidOfOrientedBox(std::vector<SPoint2> &pts, const double &angle,
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index 988ed80..4cfd48f 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -14,6 +14,7 @@
 #include <string>
 #include <string.h>
 #include <sstream>
+#include <algorithm>
 #include "GmshConfig.h"
 #include "Context.h"
 #include "Field.h"
@@ -22,7 +23,7 @@
 #include "GmshMessage.h"
 #include "Numeric.h"
 #include "mathEvaluator.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "CenterlineField.h"
 #include "STensor3.h"
 #include "meshMetric.h"
@@ -485,7 +486,7 @@ class CylinderField : public Field
   }
 };
 
-class SphereField : public Field
+class BallField : public Field
 {
   double v_in, v_out;
   double xc,yc,zc;
@@ -494,35 +495,33 @@ class SphereField : public Field
  public:
   std::string getDescription()
   {
-    return "The value of this field is VIn inside a sphere, VOut outside. "
-      "The sphere is given by\n\n"
+    return "The value of this field is VIn inside a spherical ball, VOut outside. "
+      "The ball is defined by\n\n"
       "  ||dX||^2 < R^2 &&\n"
       "  dX = (X - XC)^2 + (Y-YC)^2 + (Z-ZC)^2";
   }
-  SphereField()
+  BallField()
   {
     v_in = v_out = xc = yc = zc = R = 0;
 
     options["VIn"] = new FieldOptionDouble
-      (v_in, "Value inside the sphere");
+      (v_in, "Value inside the ball");
     options["VOut"] = new FieldOptionDouble
-      (v_out, "Value outside the sphere");
+      (v_out, "Value outside the ball");
 
     options["XCenter"] = new FieldOptionDouble
-      (xc, "X coordinate of the sphere center");
+      (xc, "X coordinate of the ball center");
     options["YCenter"] = new FieldOptionDouble
-      (yc, "Y coordinate of the sphere center");
+      (yc, "Y coordinate of the ball center");
     options["ZCenter"] = new FieldOptionDouble
-      (zc, "Z coordinate of the sphere center");
-
+      (zc, "Z coordinate of the ball center");
 
     options["Radius"] = new FieldOptionDouble
       (R,"Radius");
-
   }
   const char *getName()
   {
-    return "Sphere";
+    return "Ball";
   }
   double operator() (double x, double y, double z, GEntity *ge=0)
   {
@@ -1298,19 +1297,20 @@ class PostViewField : public Field
     if(!octree->searchTensorWithTol(x, y, z, l, 0, 0, 0.05))
       Msg::Info("No tensor element found containing point (%g,%g,%g)", x, y, z);
     if(crop_negative_values){
-      for(int i = 0; i < 9; i++){
-        if(l[i] <= 0) l[i] = MAX_LC;
+      if(l[0] <= 0 && l[1] <= 0 && l[2] <= 0 &&
+         l[3] <= 0 && l[4] <= 0 && l[5] <= 0 &&
+         l[6] <= 0 && l[7] <= 0 && l[8] <= 0){
+        for(int i = 0; i < 9; i++) l[i] = MAX_LC;
+      }
+      else{
+        for(int i = 0; i < 9; i++){
+          if(l[i] <= 0) l[i] = 0;
+        }
       }
     }
-    metr(0, 0) = l[0];
-    metr(0, 1) = l[1];
-    metr(0, 2) = l[2];
-    metr(1, 0) = l[3];
-    metr(1, 1) = l[4];
-    metr(1, 2) = l[5];
-    metr(2, 0) = l[6];
-    metr(2, 1) = l[7];
-    metr(2, 2) = l[8];
+    metr(0, 0) = l[0]; metr(0, 1) = l[1]; metr(0, 2) = l[2];
+    metr(1, 0) = l[3]; metr(1, 1) = l[4]; metr(1, 2) = l[5];
+    metr(2, 0) = l[6]; metr(2, 1) = l[7]; metr(2, 2) = l[8];
   }
   const char *getName()
   {
@@ -1539,12 +1539,13 @@ class MaxField : public Field
 class RestrictField : public Field
 {
   int iField;
-  std::list<int> edges, faces, regions;
+  std::list<int> vertices, edges, faces, regions;
  public:
   RestrictField()
   {
     iField = 1;
     options["IField"] = new FieldOptionInt(iField, "Field index");
+    options["VerticesList"] = new FieldOptionList(vertices, "Point indices");
     options["EdgesList"] = new FieldOptionList(edges, "Curve indices");
     options["FacesList"] = new FieldOptionList(faces, "Surface indices");
     options["RegionsList"] = new FieldOptionList(regions, "Volume indices");
@@ -1552,14 +1553,15 @@ class RestrictField : public Field
   std::string getDescription()
   {
     return "Restrict the application of a field to a given list of geometrical "
-      "curves, surfaces or volumes.";
+      "points, curves, surfaces or volumes.";
   }
   double operator() (double x, double y, double z, GEntity *ge=0)
   {
     Field *f = (GModel::current()->getFields()->get(iField));
     if(!f || iField == id) return MAX_LC;
     if(!ge) return (*f) (x, y, z);
-    if((ge->dim() == 0) ||
+    if((ge->dim() == 0 && std::find
+        (vertices.begin(), vertices.end(), ge->tag()) != vertices.end()) ||
        (ge->dim() == 1 && std::find
         (edges.begin(), edges.end(), ge->tag()) != edges.end()) ||
        (ge->dim() == 2 && std::find
@@ -1821,7 +1823,6 @@ class AttractorField : public Field
           it != faces_id.end(); ++it) {
 	GFace *f = GModel::current()->getFaceByTag(*it);
 	if (f){
-
 	  if (f->mesh_vertices.size()){
 	    for (unsigned int i=0;i<f->mesh_vertices.size();i++){
 	      MVertex *v = f->mesh_vertices[i];
@@ -1848,7 +1849,7 @@ class AttractorField : public Field
         ((points.size()) ? points.size() :
          n_nodes_by_edge * n_nodes_by_edge * faces_id.size());
 
-      Msg::Info("%d points found in points clouds (%d edges)", totpoints,
+      Msg::Info("%d points found in point clouds (%d edges)", totpoints,
                 (int)edges_id.size());
 
       if(totpoints){
@@ -2031,7 +2032,8 @@ void BoundaryLayerField::setupFor2d(int iF)
 	 it != ed.end() ; ++it){
       bool isIn = false;
       int iE = (*it)->tag();
-      bool found = std::find ( edges_id_saved.begin(),edges_id_saved.end(),iE ) != edges_id_saved.end();
+      bool found = std::find(edges_id_saved.begin(), edges_id_saved.end(), iE) !=
+        edges_id_saved.end();
       //      printf("edges %d found %d\n",iE,found);
       // this edge is a BL Edge
       if (found){
@@ -2041,15 +2043,17 @@ void BoundaryLayerField::setupFor2d(int iF)
 	else {
 	  // more than one face and
 	  std::list<GFace*>::iterator itf = fc.begin();
-	  bool found_this = std::find ( faces_id_saved.begin(),faces_id_saved.end(),iF ) != faces_id_saved.end();
+	  bool found_this = std::find(faces_id_saved.begin(), faces_id_saved.end(), iF) !=
+            faces_id_saved.end();
 	  if (!found_this)isIn = true;
 	  else {
 	    bool foundAll = true;
 	    for ( ; itf != fc.end() ; ++itf){
 	      int iF2 = (*itf)->tag();
-	      foundAll &= std::find ( faces_id_saved.begin(),faces_id_saved.end(),iF2 ) != faces_id_saved.end();
+	      foundAll &= std::find(faces_id_saved.begin(), faces_id_saved.end(), iF2) !=
+                faces_id_saved.end();
 	    }
-	    if (foundAll)isIn = true;
+	    if(foundAll) isIn = true;
 	  }
 	}
       }
@@ -2059,8 +2063,7 @@ void BoundaryLayerField::setupFor2d(int iF)
 	nodes_id.push_back ((*it)->getEndVertex()->tag());
       }
     }
-    //    printf("face %d %d BL Edges\n", iF, (int)edges_id.size());
-
+    // printf("face %d %d BL Edges\n", iF, (int)edges_id.size());
     removeAttractors();
   }
 }
@@ -2071,10 +2074,8 @@ void BoundaryLayerField::setupFor3d()
   removeAttractors();
 }
 
-
 double BoundaryLayerField::operator() (double x, double y, double z, GEntity *ge)
 {
-
   if (update_needed){
     for(std::list<int>::iterator it = nodes_id.begin();
 	it != nodes_id.end(); ++it) {
@@ -2110,8 +2111,8 @@ double BoundaryLayerField::operator() (double x, double y, double z, GEntity *ge
 }
 
 // assume that the closest point is one of the model vertices
-void BoundaryLayerField::computeFor1dMesh (double x, double y, double z,
-					   SMetric3 &metr)
+void BoundaryLayerField::computeFor1dMesh(double x, double y, double z,
+                                          SMetric3 &metr)
 {
   double xpk = 0., ypk = 0., zpk = 0.;
   double distk = 1.e22;
@@ -2300,7 +2301,7 @@ FieldManager::FieldManager()
 #endif
   map_type_name["Box"] = new FieldFactoryT<BoxField>();
   map_type_name["Cylinder"] = new FieldFactoryT<CylinderField>();
-  map_type_name["Sphere"] = new FieldFactoryT<SphereField>();
+  map_type_name["Ball"] = new FieldFactoryT<BallField>();
   map_type_name["Frustum"] = new FieldFactoryT<FrustumField>();
   map_type_name["LonLat"] = new FieldFactoryT<LonLatField>();
 #if defined(HAVE_POST)
@@ -2397,3 +2398,40 @@ void FieldManager::setBackgroundMesh(int iView)
   (*this)[id] = f;
   _background_field = id;
 }
+    
+
+
+
+GenericField::GenericField(){};
+
+
+GenericField::~GenericField(){};
+
+
+double GenericField::operator() (double x, double y, double z, GEntity *ge){
+  std::vector<double> sizes(cbs.size());
+  std::vector<ptrfunction>::iterator itcbs = cbs.begin();
+  std::vector<void*>::iterator itdata = user_data.begin();
+//  std::cout << "#callbacks=" << cbs.size() << std::endl;
+//  std::cout << "#user_data=" << user_data.size() << std::endl;
+  for (std::vector<double>::iterator it = sizes.begin();it!=sizes.end();it++,itdata++,itcbs++){
+    bool ok = (*itcbs)(x,y,z,(*itdata),(*it));
+    if (!ok){
+      Msg::Warning("GenericField::ERROR from callback ");
+      std::cout << "GenericField::ERROR from callback number " << std::distance(sizes.begin(),it) << std::endl;
+    }
+//    std::cout << "callback " << std::distance(sizes.begin(),it) << ": size set to " << *it << std::endl;
+  }
+//  std::cout << "   ----> min = " << (*std::min_element(sizes.begin(),sizes.end())) << std::endl;
+  return (*std::min_element(sizes.begin(),sizes.end()));
+}
+
+
+
+void GenericField::setCallbackWithData(ptrfunction fct, void *data){
+  user_data.push_back(data);
+  cbs.push_back(fct);
+}
+
+
+
diff --git a/Mesh/Field.h b/Mesh/Field.h
index 1e87afd..1a2f78d 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,6 +8,7 @@
 
 #include <string>
 #include <map>
+#include <vector>
 #include <list>
 #include "GmshConfig.h"
 #include "STensor3.h"
@@ -336,4 +337,27 @@ template<class F> class FieldFactoryT : public FieldFactory {
   Field * operator()() { return new F; }
 };
 
+
+
+// the class GenericField contains a set of void* functions, which give a mesh size
+// All these functions are called when calling operator() ; then, the minimum size is returned.
+class GenericField : public Field{
+  public:
+    // callback prototypes:
+    // this callback is called with a void* previously given to the GenericField !
+    typedef bool (*ptrfunction)(double, double, double, void*, double&);
+
+    GenericField();
+    ~GenericField();
+    virtual double operator() (double x, double y, double z, GEntity *ge=0);
+    virtual const char *getName(){return "GenericField";};
+    
+    // sets the callbacks
+    void setCallbackWithData(ptrfunction fct, void *data);
+
+  private:
+    std::vector<ptrfunction> cbs;// the callbacks
+    std::vector<void*> user_data;// the data to be sent to the callbacks
+};
+
 #endif
diff --git a/Mesh/FieldPython.h b/Mesh/FieldPython.h
index f6ca53c..67772ec 100644
--- a/Mesh/FieldPython.h
+++ b/Mesh/FieldPython.h
@@ -1,8 +1,14 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _FIELD_PYTHON_H_
 #define _FIELD_PYTHON_H_
 
 #include "Field.h"
 #include "Python.h"
+
 class FieldPython : public Field
 {
   PyObject *_callback;
@@ -56,4 +62,5 @@ class FieldPython : public Field
     }
   }
 };
+
 #endif
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index c1fc939..daeaf2f 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -36,6 +36,8 @@
 #include "simple3D.h"
 #include "yamakawa.h"
 
+#include "pointInsertion.h"
+
 #if defined(HAVE_OPTHOM)
 #include "OptHomRun.h"
 #include "OptHomElastic.h"
@@ -49,43 +51,32 @@
 template<class T>
 static void GetQualityMeasure(std::vector<T*> &ele,
                               double &gamma, double &gammaMin, double &gammaMax,
-                              double &eta, double &etaMin, double &etaMax,
+                              double &minSICN, double &minSICNMin, double &minSICNMax,
                               double &rho, double &rhoMin, double &rhoMax,
-                              double &disto, double &distoMin, double &distoMax,
-                              double &scaledJacMin, double &scaledJacMax,
-                              double quality[4][100])
+                              double quality[3][100])
 {
   for(unsigned int i = 0; i < ele.size(); i++){
     double g = ele[i]->gammaShapeMeasure();
     gamma += g;
     gammaMin = std::min(gammaMin, g);
     gammaMax = std::max(gammaMax, g);
-    double e = ele[i]->etaShapeMeasure();
-    eta += e;
-    etaMin = std::min(etaMin, e);
-    etaMax = std::max(etaMax, e);
+    double s = ele[i]->minSICNShapeMeasure();
+    minSICN += s;
+    minSICNMin = std::min(minSICNMin, s);
+    minSICNMax = std::max(minSICNMax, s);
     double r = ele[i]->rhoShapeMeasure();
     rho += r;
     rhoMin = std::min(rhoMin, r);
     rhoMax = std::max(rhoMax, r);
-    double jmin,jmax; ele[i]->scaledJacRange(jmin,jmax);
-    double d = jmin;
-    disto += d;
-    distoMin = std::min(distoMin, d);
-    distoMax = std::max(distoMax, d);
-    scaledJacMin = std::min(scaledJacMin, jmin);
-    scaledJacMax = std::max(scaledJacMax, jmax);
-
     for(int j = 0; j < 100; j++){
-      if(g > j / 100. && g <= (j + 1) / 100.) quality[0][j]++;
-      if(e > j / 100. && e <= (j + 1) / 100.) quality[1][j]++;
+      if(s > (2*j-100) / 100. && s <= (2*j-98) / 100.) quality[0][j]++;
+      if(g > j / 100. && g <= (j + 1) / 100.) quality[1][j]++;
       if(r > j / 100. && r <= (j + 1) / 100.) quality[2][j]++;
-      if(d > j / 100. && d <= (j + 1) / 100.) quality[3][j]++;
     }
   }
 }
 
-void GetStatistics(double stat[50], double quality[4][100])
+void GetStatistics(double stat[50], double quality[3][100])
 {
   for(int i = 0; i < 50; i++) stat[i] = 0.;
 
@@ -107,9 +98,11 @@ void GetStatistics(double stat[50], double quality[4][100])
     stat[4] += (*it)->mesh_vertices.size();
 
   for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){
+    // TODO: make this an option! if((*it)->getVisibility()){
     stat[5] += (*it)->mesh_vertices.size();
     stat[7] += (*it)->triangles.size();
     stat[8] += (*it)->quadrangles.size();
+    //}
   }
 
   for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){
@@ -128,45 +121,36 @@ void GetStatistics(double stat[50], double quality[4][100])
     for(int i = 0; i < 3; i++)
       for(int j = 0; j < 100; j++)
         quality[i][j] = 0.;
+    double minSICN = 0., minSICNMin = 1., minSICNMax = -1.;
     double gamma = 0., gammaMin = 1., gammaMax = 0.;
-    double eta = 0., etaMin = 1., etaMax = 0.;
     double rho = 0., rhoMin = 1., rhoMax = 0.;
-    double disto = 0., distoMin=1., distoMax = 0.;
-    double jmin = 1.e22, jmax = -1.e22;
 
     double N = stat[9] + stat[10] + stat[11] + stat[12];
     if(N){ // if we have 3D elements
       for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){
         GetQualityMeasure((*it)->tetrahedra, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax, jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
         GetQualityMeasure((*it)->hexahedra, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax, jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
         GetQualityMeasure((*it)->prisms, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax,jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
         GetQualityMeasure((*it)->pyramids, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax, jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
       }
     }
     else{ // 2D elements
       N = stat[7] + stat[8];
       for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){
         GetQualityMeasure((*it)->quadrangles, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax, jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
         GetQualityMeasure((*it)->triangles, gamma, gammaMin, gammaMax,
-                          eta, etaMin, etaMax, rho, rhoMin, rhoMax,
-                          disto, distoMin, distoMax, jmin, jmax, quality);
+                          minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, quality);
       }
     }
     if(N){
-      stat[17] = gamma / N ;  stat[18] = gammaMin;  stat[19] = gammaMax;
-      stat[20] = eta / N ;    stat[21] = etaMin;    stat[22] = etaMax;
-      stat[23] = rho / N ;    stat[24] = rhoMin;    stat[25] = rhoMax;
-      stat[46] = disto / N ;  stat[47] = distoMin;  stat[48] = distoMax;
+      stat[17] = minSICN / N; stat[18] = minSICNMin; stat[19] = minSICNMax;
+      stat[20] = gamma / N;   stat[21] = gammaMin;   stat[22] = gammaMax;
+      stat[23] = rho / N;     stat[24] = rhoMin;     stat[25] = rhoMax;
     }
   }
 
@@ -237,8 +221,8 @@ static void Mesh0D(GModel *m)
     GVertex *gv = *it;
     if (gv->meshMaster() != gv->tag()){
       if (gv->correspondingVertices.empty()){
-	GVertex *master = m->getVertexByTag(abs(gv->meshMaster()));
-	if(master)gv->correspondingVertices[gv->mesh_vertices[0]] = (master->mesh_vertices[0]);
+        GVertex *master = m->getVertexByTag(abs(gv->meshMaster()));
+        if(master)gv->correspondingVertices[gv->mesh_vertices[0]] = (master->mesh_vertices[0]);
       }
     }
   }
@@ -262,8 +246,8 @@ static void Mesh1D(GModel *m)
     int nPending = 0;
     for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); ++it){
       if ((*it)->meshStatistics.status == GEdge::PENDING){
-	mesher(*it);
-	nPending++;
+        mesher(*it);
+        nPending++;
       }
       if(!nIter) Msg::ProgressMeter(nPending, nTot, false, "Meshing 1D...");
     }
@@ -278,13 +262,18 @@ static void Mesh1D(GModel *m)
 
 static void PrintMesh2dStatistics(GModel *m)
 {
-
   FILE *statreport = 0;
   if(CTX::instance()->createAppendMeshStatReport == 1)
     statreport = Fopen(CTX::instance()->meshStatReportFileName.c_str(), "w");
   else if(CTX::instance()->createAppendMeshStatReport == 2)
     statreport = Fopen(CTX::instance()->meshStatReportFileName.c_str(), "a");
-  else return;
+  else
+    return;
+
+  if(statreport){
+    Msg::Error("Could not open file '%s'", CTX::instance()->meshStatReportFileName.c_str());
+    return;
+  }
 
   double worst = 1, best = 0, avg = 0;
   double e_long = 0, e_short = 1.e22, e_avg = 0;
@@ -310,7 +299,7 @@ static void PrintMesh2dStatistics(GModel *m)
       e_long = std::max((*it)->meshStatistics.longest_edge_length, e_long);
       e_short = std::min((*it)->meshStatistics.smallest_edge_length, e_short);
       if ((*it)->meshStatistics.status == GFace::FAILED ||
-	  (*it)->meshStatistics.status == GFace::PENDING) nUnmeshed++;
+          (*it)->meshStatistics.status == GFace::PENDING) nUnmeshed++;
       nTotT += (*it)->meshStatistics.nbTriangle;
       nTotE += (*it)->meshStatistics.nbEdge;
       nTotGoodLength += (*it)->meshStatistics.nbGoodLength;
@@ -362,15 +351,15 @@ static void Mesh2D(GModel *m)
 #pragma omp parallel for schedule (dynamic)
 #endif
       for(size_t K = 0 ; K < temp.size() ; K++){
-	if (temp[K]->meshStatistics.status == GFace::PENDING){
+        if (temp[K]->meshStatistics.status == GFace::PENDING){
           backgroundMesh::current()->unset();
-	  meshGFace mesher(true);
-	  mesher(temp[K]);
-
+          meshGFace mesher(true);
+          mesher(temp[K]);
 #if defined(HAVE_BFGS)
           if(CTX::instance()->mesh.optimizeLloyd){
             if (temp[K]->geomType()==GEntity::CompoundSurface ||
-                temp[K]->geomType()==GEntity::Plane || temp[K]->geomType()==GEntity::RuledSurface) {
+                temp[K]->geomType()==GEntity::Plane ||
+                temp[K]->geomType()==GEntity::RuledSurface) {
               if (temp[K]->meshAttributes.method != MESH_TRANSFINITE &&
                   !temp[K]->meshAttributes.extrude) {
                 smoothing smm(CTX::instance()->mesh.optimizeLloyd,6);
@@ -386,14 +375,13 @@ static void Mesh2D(GModel *m)
             }
           }
 #endif
-
 #if defined(_OPENMP)
 #pragma omp critical
 #endif
-	  {
-	    nPending++;
-	  }
-	}
+          {
+            nPending++;
+          }
+        }
         if(!nIter) Msg::ProgressMeter(nPending, nTot, false, "Meshing 2D...");
       }
 #if defined(_OPENMP)
@@ -405,11 +393,11 @@ static void Mesh2D(GModel *m)
           backgroundMesh::current()->unset();
           meshGFace mesher(true);
           mesher(*it);
-
 #if defined(HAVE_BFGS)
           if(CTX::instance()->mesh.optimizeLloyd){
             if ((*it)->geomType()==GEntity::CompoundSurface ||
-                (*it)->geomType()==GEntity::Plane || (*it)->geomType()==GEntity::RuledSurface) {
+                (*it)->geomType()==GEntity::Plane ||
+                (*it)->geomType()==GEntity::RuledSurface) {
               if ((*it)->meshAttributes.method != MESH_TRANSFINITE &&
                   !(*it)->meshAttributes.extrude) {
                 smoothing smm(CTX::instance()->mesh.optimizeLloyd,6);
@@ -425,7 +413,6 @@ static void Mesh2D(GModel *m)
             }
           }
 #endif
-
           nPending++;
         }
         if(!nIter) Msg::ProgressMeter(nPending, nTot, false, "Meshing 2D...");
@@ -460,10 +447,10 @@ static void FindConnectedRegions(std::vector<GRegion*> &delaunay,
       oneDomain.insert(r);
       std::list<GFace*> faces = r->faces();
       for (std::list<GFace*> :: iterator it = faces.begin(); it != faces.end() ; ++it){
-	GFace *gf = *it;
-	GRegion *other = gf->getRegion(0) == r ? gf->getRegion(1) : gf->getRegion(0);
-	if (other != 0 && oneDomain.find(other) == oneDomain.end())
-	  _stack.push (other);
+        GFace *gf = *it;
+        GRegion *other = gf->getRegion(0) == r ? gf->getRegion(1) : gf->getRegion(0);
+        if (other != 0 && oneDomain.find(other) == oneDomain.end())
+          _stack.push (other);
       }
     }
     std::vector<GRegion*> temp1,temp2;
@@ -476,7 +463,7 @@ static void FindConnectedRegions(std::vector<GRegion*> &delaunay,
     delaunay=temp1;
   }
   Msg::Info("Delaunay Meshing %d volumes with %d connected components",
-	    nbVolumes,connected.size());
+            nbVolumes,connected.size());
 }
 
 static void Mesh3D(GModel *m)
@@ -506,42 +493,75 @@ static void Mesh3D(GModel *m)
   FindConnectedRegions(delaunay, connected);
 
   // remove quads elements for volumes that are recombined
-  // pragma OMP ICI ??
+  // pragma OMP here ?
   for(unsigned int i = 0; i < connected.size(); i++){
-    for(unsigned j=0;j<connected[i].size();j++){
+    for(unsigned j = 0; j < connected[i].size(); j++){
       GRegion *gr = connected[i][j];
       if(CTX::instance()->mesh.recombine3DAll || gr->meshAttributes.recombine3D){
-	std::list<GFace*> f = gr->faces();
-	for (std::list<GFace*>::iterator it = f.begin();
-	     it != f.end() ; ++it) quadsToTriangles (*it,1000000);
+        std::list<GFace*> f = gr->faces();
+        for(std::list<GFace*>::iterator it = f.begin(); it != f.end() ; ++it)
+          quadsToTriangles(*it, 1000000);
       }
     }
   }
 
-  // pragma OMP ICI ??
+  double time_recombination = 0., vol_element_recombination = 0.;
+  double vol_hexa_recombination = 0.;
+  int nb_elements_recombination = 0, nb_hexa_recombination = 0;
+
+  // pragma OMP here ?
   for(unsigned int i = 0; i < connected.size(); i++){
     MeshDelaunayVolume(connected[i]);
 
-    //Additional code for hex mesh begin
-    for(unsigned j=0;j<connected[i].size();j++){
+    // additional code for experimental hex mesh
+    for(unsigned j = 0; j < connected[i].size(); j++){
       GRegion *gr = connected[i][j];
-      //R-tree
+      bool treat_region_ok = false;
       if(CTX::instance()->mesh.algo3d == ALGO_3D_RTREE){
-	Filler f;
-	f.treat_region(gr);
+        if (old_algo_hexa()){
+          Filler f;
+          f.treat_region(gr);
+          treat_region_ok = true;
+        }
+        else{
+          Filler3D f;
+          treat_region_ok = f.treat_region(gr);
+        }
       }
-      //Recombine3D into hex
-      if(CTX::instance()->mesh.recombine3DAll || gr->meshAttributes.recombine3D){
-	Recombinator rec;
-	rec.execute();
-	Supplementary sup;
-	sup.execute();
-	PostOp post;
-	post.execute(0);
+      if(treat_region_ok && (CTX::instance()->mesh.recombine3DAll ||
+                             gr->meshAttributes.recombine3D)){
+        double a = Cpu();
+        Recombinator rec;
+        rec.execute(gr);
+        Supplementary sup;
+        sup.execute(gr);
+        PostOp post;
+        post.execute(gr,0);
+        nb_elements_recombination += post.get_nb_elements();
+        nb_hexa_recombination += post.get_nb_hexahedra();
+        vol_element_recombination += post.get_vol_elements();
+        vol_hexa_recombination += post.get_vol_hexahedra();
+        // partial export
+        stringstream ss;
+        ss << "yamakawa_part_";
+        ss << gr->tag();
+        ss << ".msh";
+        export_gregion_mesh(gr, ss.str().c_str());
+        time_recombination += (Cpu() - a);
       }
     }
   }
 
+  if(CTX::instance()->mesh.recombine3DAll){
+    Msg::Info("RECOMBINATION timing:");
+    Msg::Info(" --- CUMULATIVE TIME RECOMBINATION : %g s.", time_recombination);
+    Msg::Info("RECOMBINATION CUMULATIVE STATISTICS:");
+    Msg::Info(".... Percentage of hexahedra   (#) : %g",
+              nb_hexa_recombination*100./nb_elements_recombination);
+    Msg::Info(".... Percentage of hexahedra (Vol) : %g",
+              vol_hexa_recombination*100./vol_element_recombination);
+  }
+
   // Ensure that all volume Jacobians are positive
   m->setAllVolumesPositive();
 
diff --git a/Mesh/Generator.h b/Mesh/Generator.h
index a9cb4ec..2d4fa2a 100644
--- a/Mesh/Generator.h
+++ b/Mesh/Generator.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp
index 2a5a988..c16285c 100644
--- a/Mesh/HighOrder.cpp
+++ b/Mesh/HighOrder.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -58,6 +58,8 @@ static bool computeEquidistantParameters(GEdge *ge, double u0, double uN, int N,
     u[i] = u[i - 1] + du;
   }
 
+  //return true;
+
   // create the tangent matrix
   const int M = N - 2;
   fullMatrix<double> J(M, M);
@@ -101,116 +103,109 @@ static bool computeEquidistantParameters(GEdge *ge, double u0, double uN, int N,
 }
 
 static bool computeEquidistantParameters(GFace *gf, double u0, double uN,
-                                         double v0, double vN, int N,
+                                         double v0, double vN, SPoint3 &p0,
+                                         SPoint3 &pN, int N, bool geodesic,
                                          double *u, double *v)
 {
-  double t[100];
-  // initialize the points by equal subdivision of geodesics
-  u[0] = u0;
-  v[0] = v0;
-  t[0] = 0;
-  for (int i = 1; i < N; i++){
-    t[i] = (double)i / (N - 1);
-    SPoint2 p = gf->geodesic(SPoint2(u0, v0), SPoint2(uN, vN), t[i]);
-    u[i] = p.x();
-    v[i] = p.y();
+  const int NI = N-1;
+  u[0] = u0; v[0] = v0;
+  u[NI] = uN; v[NI] = vN;
+  const double fact = 1./(double)NI;
+  for (int i = 1; i < NI; i++){
+    const double t = i*fact;
+    u[i] = u0 + (uN-u0)*t;
+    v[i] = v0 + (vN-v0)*t;
+    if (geodesic) {
+      SPoint3 pc(t*pN + (1.-t)*p0);
+      double guess[2] = {u[i], v[i]};
+      GPoint gp = gf->closestPoint(pc, guess);
+      if(gp.succeeded()){
+        u[i] = gp.u();
+        v[i] = gp.v();
+      }
+    }
   }
-  u[N] = uN;
-  v[N] = vN;
-  t[N] = 1.0;
-
   return true;
 }
 
-
 // --------- Creation of high-order edge vertices -----------
 
-static bool getEdgeVerticesonGeo(GEdge *ge, MVertex *v0, MVertex *v1, std::vector<MVertex*> &ve, int nPts = 1)
+static bool getEdgeVerticesonGeo(GEdge *ge, MVertex *v0, MVertex *v1,
+                                 std::vector<MVertex*> &ve, int nPts = 1)
 {
-    double u0 = 0., u1 = 0., US[100];
-    bool reparamOK = reparamMeshVertexOnEdge(v0, ge, u0);
-    if(ge->periodic(0) && ge->getEndVertex()->getNumMeshVertices() > 0 &&
-       v1 == ge->getEndVertex()->mesh_vertices[0])
-      u1 = ge->parBounds(0).high();
-    else
-      reparamOK &= reparamMeshVertexOnEdge(v1, ge, u1);
-
-    if(reparamOK){
-      double relax = 1.;
-      while (1){
-        if(computeEquidistantParameters(ge, std::min(u0,u1), std::max(u0,u1),
-                                        nPts + 2, US, relax))
-          break;
-
-        relax /= 2.0;
-        if(relax < 1.e-2) break;
-      }
-      if(relax < 1.e-2){
-        Msg::Warning
-          ("Failed to compute equidistant parameters (relax = %g, value = %g) "
-           "for edge %d-%d parametrized with %g %g on GEdge %d",
-           relax, US[1], v0->getNum(), v1->getNum(),u0,u1,ge->tag());
-        reparamOK = false;
-      }
+  static const double relaxFail = 1e-2;
+  double u0 = 0., u1 = 0., US[100];
+  bool reparamOK = reparamMeshVertexOnEdge(v0, ge, u0);
+  if(ge->periodic(0) && ge->getEndVertex()->getNumMeshVertices() > 0 &&
+     v1 == ge->getEndVertex()->mesh_vertices[0])
+    u1 = ge->parBounds(0).high();
+  else
+    reparamOK &= reparamMeshVertexOnEdge(v1, ge, u1);
+
+  if (reparamOK) {
+    double uMin = std::min(u0, u1), uMax = std::max(u0, u1);
+    bool failed = true;
+    double relax = 1.;
+    while (failed && (relax > relaxFail)) {
+      failed = !computeEquidistantParameters(ge, uMin, uMax, nPts + 2, US, relax);
+      relax *= 0.5;
     }
-    else
-      Msg::Error("Cannot reparam a mesh Vertex in high order meshing");
-    if (!reparamOK) return false;
-
-    for(int j = 0; j < nPts; j++) {
-      MVertex *v;
-      int count = u0<u1? j + 1 : nPts + 1  - (j + 1);
-      GPoint pc = ge->point(US[count]);
-      v = new MEdgeVertex(pc.x(), pc.y(), pc.z(), ge,US[count]);
-      // this destroys the ordering of the mesh vertices on the edge
-      ve.push_back(v);
+    if (failed) {
+      Msg::Warning
+        ("Failed to compute equidistant parameters (relax = %g, value = %g) "
+         "for edge %d-%d parametrized with %g %g on GEdge %d",
+         relax, US[1], v0->getNum(), v1->getNum(),u0,u1,ge->tag());
+      US[0] = uMin;
+      const double du = (uMax - uMin) / (nPts+1);
+      for (int i = 1; i <= nPts; i++) US[i] = US[i - 1] + du;
     }
+  }
+  else
+    Msg::Error("Cannot reparam a mesh Vertex in high order meshing");
+  if (!reparamOK) return false;
 
-    return true;
+  for(int j = 0; j < nPts; j++) {
+    MVertex *v;
+    int count = u0<u1? j + 1 : nPts + 1  - (j + 1);
+    GPoint pc = ge->point(US[count]);
+    v = new MEdgeVertex(pc.x(), pc.y(), pc.z(), ge,US[count]);
+    // this destroys the ordering of the mesh vertices on the edge
+    ve.push_back(v);
+  }
+
+  return true;
 }
 
-static bool getEdgeVerticesonGeo(GFace *gf, MVertex *v0, MVertex *v1, std::vector<MVertex*> &ve, int nPts = 1)
+static bool getEdgeVerticesonGeo(GFace *gf, MVertex *v0, MVertex *v1,
+                                 std::vector<MVertex*> &ve, int nPts = 1)
 {
-      SPoint2 p0, p1;
-      double US[100], VS[100];
-      bool reparamOK = reparamMeshEdgeOnFace(v0, v1, gf, p0, p1);
-      if(reparamOK) {
-        if (nPts >= 30)
-          computeEquidistantParameters(gf, p0[0], p1[0], p0[1], p1[1], nPts + 2, US, VS);
-        else {
-          US[0]      =  p0[0];
-          VS[0]      =  p0[1];
-          US[nPts+1] =  p1[0];
-          VS[nPts+1] =  p1[1];
-          for(int j = 0; j < nPts; j++){
-            const double t = (double)(j + 1) / (nPts + 1);
-            SPoint3 pc(t*v1->x()+(1.-t)*v0->x(),
-                       t*v1->y()+(1.-t)*v0->y(),
-                       t*v1->z()+(1.-t)*v0->z());
-            SPoint2 guess = p0 * (1.-t) + p1 * t;
-            GPoint gp = gf->closestPoint(pc, guess);
-            if(gp.succeeded()){
-              US[j+1] = gp.u();
-              VS[j+1] = gp.v();
-            }
-            else{
-              US[j+1] = guess.x();
-              VS[j+1] = guess.y();
-            }
-          }
-        }
-      }
-      else
-        Msg::Error("Cannot reparam a mesh Vertex in high order meshing");
-      if (!reparamOK) return false;
+  SPoint2 p0, p1;
+  double US[100], VS[100];
+  bool reparamOK = reparamMeshEdgeOnFace(v0, v1, gf, p0, p1);
+  if(reparamOK) {
+    SPoint3 pnt0, pnt1;
+    if (nPts >= 30)
+      computeEquidistantParameters(gf, p0[0], p1[0], p0[1], p1[1],
+                                   pnt0, pnt1, nPts + 2, false, US, VS);
+    else {
+      pnt0 = v0->point();
+      pnt1 = v1->point();
+      computeEquidistantParameters(gf, p0[0], p1[0], p0[1], p1[1],
+                                   pnt0, pnt1, nPts + 2, true, US, VS);
+    }
+  }
+  else {
+    Msg::Error("Cannot reparam a mesh Vertex in high order meshing");
+    return false;
+  }
 
-      for(int j = 0; j < nPts; j++){
-        GPoint pc = gf->point(US[j + 1], VS[j + 1]);
-        MVertex *v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, US[j + 1], VS[j + 1]);
-        ve.push_back(v);
-      }
+  for(int j = 0; j < nPts; j++){
+    GPoint pc = gf->point(US[j + 1], VS[j + 1]);
+    MVertex *v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, US[j + 1], VS[j + 1]);
+    ve.push_back(v);
+  }
 
-      return true;
+  return true;
 }
 
 static void interpVerticesInExistingEdge(GEntity *ge, const MElement *edgeEl,
@@ -253,12 +248,14 @@ static void getEdgeVertices(GEdge *ge, MElement *ele, std::vector<MVertex*> &ve,
   const bool increasing = getMinMaxVert(veOld[0], veOld[1], vMin, vMax);
   std::pair<MVertex*, MVertex*> p(vMin, vMax);
   std::vector<MVertex*> veEdge;
+  // Get vertices on geometry if asked
   bool gotVertOnGeo = linear ? false :
-                      getEdgeVerticesonGeo(ge, veOld[0], veOld[1], veEdge, nPts);       // Get vertices on geometry if asked
-  if (!gotVertOnGeo)                                                                    // If not on geometry, create from mesh interpolation
+    getEdgeVerticesonGeo(ge, veOld[0], veOld[1], veEdge, nPts);
+  // If not on geometry, create from mesh interpolation
+  if (!gotVertOnGeo)
     interpVerticesInExistingEdge(ge, ele, veEdge, nPts);
   newHOVert.insert(newHOVert.end(), veEdge.begin(), veEdge.end());
-  if(increasing)                                          // Add newly created vertices to list
+  if(increasing) // Add newly created vertices to list
     edgeVertices[p].insert(edgeVertices[p].end(), veEdge.begin(), veEdge.end());
   else
     edgeVertices[p].insert(edgeVertices[p].end(), veEdge.rbegin(), veEdge.rend());
@@ -281,21 +278,23 @@ static void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve,
     const bool increasing = getMinMaxVert(veOld[0], veOld[1], vMin, vMax);
     std::pair<MVertex*, MVertex*> p(vMin, vMax);
     std::vector<MVertex*> veEdge;
-    if(edgeVertices.count(p)) {                                                             // Vertices already exist
+    if(edgeVertices.count(p)) { // Vertices already exist
       if(increasing)
         veEdge.assign(edgeVertices[p].begin(), edgeVertices[p].end());
       else
         veEdge.assign(edgeVertices[p].rbegin(), edgeVertices[p].rend());
     }
-    else {                                                                                  // Vertices do not exist, create them
+    else { // Vertices do not exist, create them
+      // Get vertices on geometry if asked
       bool gotVertOnGeo = linear ? false :
-                          getEdgeVerticesonGeo(gf, veOld[0], veOld[1], veEdge, nPts);       // Get vertices on geometry if asked
-      if (!gotVertOnGeo) {                                                                   // If not on geometry, create from mesh interpolation
+        getEdgeVerticesonGeo(gf, veOld[0], veOld[1], veEdge, nPts);
+      if (!gotVertOnGeo) {
+        // If not on geometry, create from mesh interpolation
         const MLineN edgeEl(veOld, ele->getPolynomialOrder());
         interpVerticesInExistingEdge(gf, &edgeEl, veEdge, nPts);
       }
       newHOVert.insert(newHOVert.end(), veEdge.begin(), veEdge.end());
-      if(increasing)                                                                        // Add newly created vertices to list
+      if(increasing) // Add newly created vertices to list
         edgeVertices[p].insert(edgeVertices[p].end(), veEdge.begin(), veEdge.end());
       else
         edgeVertices[p].insert(edgeVertices[p].end(), veEdge.rbegin(), veEdge.rend());
@@ -306,7 +305,8 @@ static void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve,
 
 // Get new interior vertices for an edge in a 3D element
 static void getEdgeVertices(GRegion *gr, MElement *ele, std::vector<MVertex*> &ve,
-                            std::vector<MVertex*> &newHOVert, edgeContainer &edgeVertices,
+                            std::vector<MVertex*> &newHOVert,
+                            edgeContainer &edgeVertices,
                             bool linear, int nPts = 1)
 {
   for(int i = 0; i < ele->getNumEdges(); i++) {
@@ -316,17 +316,17 @@ static void getEdgeVertices(GRegion *gr, MElement *ele, std::vector<MVertex*> &v
     const bool increasing = getMinMaxVert(veOld[0], veOld[1], vMin, vMax);
     std::pair<MVertex*, MVertex*> p(vMin, vMax);
     std::vector<MVertex*> veEdge;
-    if(edgeVertices.count(p)) {                                                             // Vertices already exist
+    if(edgeVertices.count(p)) { // Vertices already exist
       if(increasing)
         veEdge.assign(edgeVertices[p].begin(), edgeVertices[p].end());
       else
         veEdge.assign(edgeVertices[p].rbegin(), edgeVertices[p].rend());
     }
-    else {                                                                                  // Vertices do not exist, create them
+    else { // Vertices do not exist, create them
       const MLineN edgeEl(veOld, ele->getPolynomialOrder());
       interpVerticesInExistingEdge(gr, &edgeEl, veEdge, nPts);
       newHOVert.insert(newHOVert.end(), veEdge.begin(), veEdge.end());
-      if(increasing)                                                                        // Add newly created vertices to list
+      if(increasing) // Add newly created vertices to list
         edgeVertices[p].insert(edgeVertices[p].end(), veEdge.begin(), veEdge.end());
       else
         edgeVertices[p].insert(edgeVertices[p].end(), veEdge.rbegin(), veEdge.rend());
@@ -335,7 +335,6 @@ static void getEdgeVertices(GRegion *gr, MElement *ele, std::vector<MVertex*> &v
   }
 }
 
-
 // --------- Creation of high-order face vertices -----------
 
 static void reorientTrianglePoints(std::vector<MVertex*> &vtcs, int orientation,
@@ -441,9 +440,9 @@ static void reorientQuadPoints(std::vector<MVertex*> &vtcs, int orientation,
   }
 }
 
-static int getNewFacePointsInVolume(MElement *incomplete, int nPts, fullMatrix<double> &points)
+static int getNewFacePointsInVolume(MElement *incomplete, int nPts,
+                                    fullMatrix<double> &points)
 {
-
   int startFace = 0;
 
   switch (incomplete->getType()){
@@ -589,25 +588,6 @@ static void interpVerticesInExistingFace(GEntity *ge, const MElement *faceEl,
   }
 }
 
-
-//static void interpVerticesInIncompleteFace(GRegion *gr, const MFace &face, const std::vector<MVertex*> &ve,
-//                                           std::vector<MVertex*> &veFace, int nPts)
-//{
-//  MElement *incomplete;
-//
-//  fullMatrix<double> points;
-//  int start = getNewFacePointsInFace(face.getNumVertices(), nPts, points);
-//  for (int k = start; k < points.size1(); k++) {
-//    double t1 = points(k, 0);
-//    double t2 = points(k, 1);
-//    SPoint3 pos;
-//    incomplete->pnt(t1, t2, 0, pos);
-//    MVertex* v = new MVertex(pos.x(), pos.y(), pos.z(), gr);
-//    veFace.push_back(v);
-//  }
-//  delete incomplete;
-//}
-
 // Get new interior vertices for a 2D element
 static void getFaceVertices(GFace *gf, MElement *incomplete, MElement *ele,
                             std::vector<MVertex*> &vf, std::vector<MVertex*> &newHOVert,
@@ -619,9 +599,9 @@ static void getFaceVertices(GFace *gf, MElement *incomplete, MElement *ele,
 
   MFace face = ele->getFace(0);
   std::vector<MVertex*> veFace;
-  if (!linear)                                                                      // Get vertices on geometry if asked...
+  if (!linear) // Get vertices on geometry if asked...
     getFaceVerticesOnGeo(gf, incomplete, ele, veFace, nPts);
-  else                                                                              // ... otherwise, create from mesh interpolation
+  else // ... otherwise, create from mesh interpolation
     interpVerticesInExistingFace(gf, ele, veFace, nPts);
   newHOVert.insert(newHOVert.end(), veFace.begin(), veFace.end());
   faceVertices[face].insert(faceVertices[face].end(), veFace.begin(), veFace.end());
@@ -642,11 +622,12 @@ static void getFaceVertices(GRegion *gr, MElement *incomplete, MElement *ele,
     int numVert = (face.getNumVertices() == 3) ? nPts * (nPts-1) / 2 : nPts * nPts;
     std::vector<MVertex*> veFace;
     faceContainer::iterator fIter = faceVertices.find(face);
-    if(fIter != faceVertices.end()){                                                      // Vertices already exist
+    if(fIter != faceVertices.end()){ // Vertices already exist
       std::vector<MVertex*> vtcs = fIter->second;
       int orientation;
       bool swap;
-      if (fIter->first.computeCorrespondence(face, orientation, swap)) {                  // Check correspondence and apply permutation if needed
+      if (fIter->first.computeCorrespondence(face, orientation, swap)) {
+        // Check correspondence and apply permutation if needed
         if(face.getNumVertices() == 3 && nPts > 1)
           reorientTrianglePoints(vtcs, orientation, swap);
         else if(face.getNumVertices() == 4)
@@ -656,8 +637,8 @@ static void getFaceVertices(GRegion *gr, MElement *incomplete, MElement *ele,
         Msg::Error("Error in face lookup for recuperation of high order face nodes");
       veFace.assign(vtcs.begin(), vtcs.end());
     }
-    else {                                                                                // Vertices do not exist, create them by interpolation
-      if (linear) {                                                                       // Interpolate on existing mesh
+    else { // Vertices do not exist, create them by interpolation
+      if (linear) { // Interpolate on existing mesh
         std::vector<MVertex*> vfOld;
         ele->getFaceVertices(i,vfOld);
         MElement *faceEl;
@@ -669,7 +650,7 @@ static void getFaceVertices(GRegion *gr, MElement *incomplete, MElement *ele,
         delete faceEl;
       }
       else {
-        if (incomplete) {                                                                 // Interpolate in incomplete 3D element if given
+        if (incomplete) { // Interpolate in incomplete 3D element if given
           for(int k = index; k < index + numVert; k++){
             MVertex *v;
             const double t1 = points(k, 0);
@@ -681,7 +662,7 @@ static void getFaceVertices(GRegion *gr, MElement *incomplete, MElement *ele,
             veFace.push_back(v);
           }
         }
-        else {                                                                            // TODO: Interpolate in incomplete face constructed on the fly
+        else { // TODO: Interpolate in incomplete face constructed on the fly
 //          std::vector<MVertex*> &vtcs = faceVertices[face];
 //          fullMatrix<double> points;
 //          int start = getNewFacePointsInFace(face.getNumVertices(), nPts, points);
@@ -742,12 +723,10 @@ static void getFaceVertices(GRegion *gr, MElement *incomplete, MElement *ele,
   }
 }
 
-
 // --------- Creation of high-order volume vertices -----------
 
 static int getNewVolumePoints(MElement *incomplete, int nPts, fullMatrix<double> &points)
 {
-
   int startInter = 0;
 
   switch (incomplete->getType()){
@@ -767,7 +746,8 @@ static int getNewVolumePoints(MElement *incomplete, int nPts, fullMatrix<double>
       Msg::Error("getFaceAndInteriorVertices not implemented for order %i", nPts+1);
       break;
     }
-    startInter = ((nPts+2)*(nPts+3)*(nPts+4)-(nPts-2)*(nPts-1)*(nPts))/6;  // = 4+6*(p-1)+4*(p-2)*(p-1)/2 = 4*(p+1)*(p+2)/2-6*(p-1)-2*4 = 2*p*p+2
+    startInter = ((nPts+2)*(nPts+3)*(nPts+4)-(nPts-2)*(nPts-1)*(nPts))/6;
+    // = 4+6*(p-1)+4*(p-2)*(p-1)/2 = 4*(p+1)*(p+2)/2-6*(p-1)-2*4 = 2*p*p+2
     break;
   case TYPE_HEX :
     switch (nPts){
@@ -784,7 +764,8 @@ static int getNewVolumePoints(MElement *incomplete, int nPts, fullMatrix<double>
       Msg::Error("getFaceAndInteriorVertices not implemented for order %i", nPts+1);
       break;
     }
-    startInter = (nPts+2)*(nPts+2)*(nPts+2) - (nPts)*(nPts)*(nPts) ; // = 6*(p-1)*(p-1)+12*(p-1)+8 = 6*(p+1)*(p+1)-12*(p-1)-2*8 = 6*p*p+2
+    startInter = (nPts+2)*(nPts+2)*(nPts+2) - (nPts)*(nPts)*(nPts) ;
+    // = 6*(p-1)*(p-1)+12*(p-1)+8 = 6*(p+1)*(p+1)-12*(p-1)-2*8 = 6*p*p+2
     break;
   case TYPE_PRI :
     switch (nPts){
@@ -801,7 +782,9 @@ static int getNewVolumePoints(MElement *incomplete, int nPts, fullMatrix<double>
       Msg::Error("getFaceAndInteriorVertices not implemented for order %i", nPts+1);
       break;
     }
-    startInter = 4*(nPts+1)*(nPts+1)+2;  // = 4*p*p+2 = 6+9*(p-1)+2*(p-2)*(p-1)/2+3*(p-1)*(p-1) = 2*(p+1)*(p+2)/2+3*(p+1)*(p+1)-9*(p-1)-2*6
+    startInter = 4*(nPts+1)*(nPts+1)+2;
+    // = 4*p*p+2 = 6+9*(p-1)+2*(p-2)*(p-1)/2+3*(p-1)*(p-1)
+    // = 2*(p+1)*(p+2)/2+3*(p+1)*(p+1)-9*(p-1)-2*6
     break;
   case TYPE_PYR:
     switch (nPts){
@@ -829,7 +812,8 @@ static int getNewVolumePoints(MElement *incomplete, int nPts, fullMatrix<double>
 
 // Get new interior vertices for a 3D element (except pyramid)
 static void getVolumeVertices(GRegion *gr, MElement *incomplete, MElement *ele,
-                              std::vector<MVertex*> &vr,  std::vector<MVertex*> &newHOVert,
+                              std::vector<MVertex*> &vr,
+                              std::vector<MVertex*> &newHOVert,
                               bool linear, int nPts = 1)
 {
   fullMatrix<double> points;
@@ -849,8 +833,10 @@ static void getVolumeVertices(GRegion *gr, MElement *incomplete, MElement *ele,
 }
 
 // Get new interior vertices for a pyramid
-static void getVolumeVerticesPyramid(GRegion *gr, MElement *ele, const std::vector<MVertex*> &ve,
-                                     std::vector<MVertex*> &vr, std::vector<MVertex*> &newHOVert,
+static void getVolumeVerticesPyramid(GRegion *gr, MElement *ele,
+                                     const std::vector<MVertex*> &ve,
+                                     std::vector<MVertex*> &vr,
+                                     std::vector<MVertex*> &newHOVert,
                                      bool linear, int nPts = 1)
 {
   vr.reserve((nPts-1)*(nPts)*(2*(nPts-1)+1)/6);
@@ -976,16 +962,19 @@ static void setHighOrder(GEdge *ge, std::vector<MVertex*> &newHOVert,
     std::vector<MVertex*> ve;
     getEdgeVertices(ge, l, ve, newHOVert, edgeVertices, linear, nbPts);
     if(nbPts == 1)
-      lines2.push_back(new MLine3(l->getVertex(0), l->getVertex(1), ve[0], l->getPartition()));
+      lines2.push_back(new MLine3(l->getVertex(0), l->getVertex(1),
+                                  ve[0], l->getPartition()));
     else
-      lines2.push_back(new MLineN(l->getVertex(0), l->getVertex(1), ve, l->getPartition()));
+      lines2.push_back(new MLineN(l->getVertex(0), l->getVertex(1),
+                                  ve, l->getPartition()));
     delete l;
   }
   ge->lines = lines2;
   ge->deleteVertexArrays();
 }
 
-static MTriangle *setHighOrder(MTriangle *t, GFace *gf, std::vector<MVertex*> &newHOVert,
+static MTriangle *setHighOrder(MTriangle *t, GFace *gf,
+                               std::vector<MVertex*> &newHOVert,
                                edgeContainer &edgeVertices,
                                faceContainer &faceVertices,
                                bool linear, bool incomplete, int nPts)
@@ -1008,7 +997,8 @@ static MTriangle *setHighOrder(MTriangle *t, GFace *gf, std::vector<MVertex*> &n
   }
 }
 
-static MQuadrangle *setHighOrder(MQuadrangle *q, GFace *gf, std::vector<MVertex*> &newHOVert,
+static MQuadrangle *setHighOrder(MQuadrangle *q, GFace *gf,
+                                 std::vector<MVertex*> &newHOVert,
                                  edgeContainer &edgeVertices,
                                  faceContainer &faceVertices,
                                  bool linear, bool incomplete, int nPts)
diff --git a/Mesh/HighOrder.h b/Mesh/HighOrder.h
index 5d2ccea..50e464f 100644
--- a/Mesh/HighOrder.h
+++ b/Mesh/HighOrder.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/Levy3D.cpp b/Mesh/Levy3D.cpp
index fcb9f8c..f5f0e4f 100644
--- a/Mesh/Levy3D.cpp
+++ b/Mesh/Levy3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/Levy3D.h b/Mesh/Levy3D.h
index ec2b8ea..768d7bb 100644
--- a/Mesh/Levy3D.h
+++ b/Mesh/Levy3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/QuadTriExtruded2D.cpp b/Mesh/QuadTriExtruded2D.cpp
index 0af4758..befecbc 100644
--- a/Mesh/QuadTriExtruded2D.cpp
+++ b/Mesh/QuadTriExtruded2D.cpp
@@ -1,36 +1,37 @@
-/**************************************************************************************************
+/*******************************************************************************
 QuadTriExtruded2D.cpp
 
 The code in this file was written by Dr. Trevor S. Strickler.
 email: <trevor.strickler at gmail.com>
 
-This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements.
+This file is part of the QuadTri contribution to Gmsh. QuadTri allows the
+conformal interface of quadrangle faces to triangle faces using pyramids and
+other mesh elements.
 
-See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
+See READMEQUADTRI.txt for more information. The license information is in
+LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to
-Christophe Geuzaine and J.-F. Remacle with the understanding that
-his contribution shall be cited appropriately.
+Trevor S. Strickler hereby transfers copyright of QuadTri files to Christophe
+Geuzaine and J.-F. Remacle with the understanding that his contribution shall be
+cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-Gmsh is available at: www.geuz.org/gmsh
+All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine,
+J.-F. Remacle Gmsh is available at: www.geuz.org/gmsh
 
-For Gmsh license information, see the LICENSE.txt file for license information. Please report all
-Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
+For Gmsh license information, see the LICENSE.txt file for license
+information. Please report all Gmsh bugs and problems to the public mailing list
+<gmsh at geuz.org>.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option)
-any later version, with or without the exception given in the
-LICENSE.txt file supplied with this code and with Gmsh.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License, Version 2, as published by the Free
+Software Foundation, or (at your option) any later version, with or without the
+exception given in the LICENSE.txt file supplied with this code and with Gmsh.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
-****************************************************************************************************/
+********************************************************************************/
 
 #include "QuadTriExtruded2D.h"
 
@@ -42,44 +43,41 @@ static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3,
   to->triangles.push_back(newTri);
 }
 
-
-
-// The function that tests whether a 2D surface is a lateral of a valid QuadToTri
-// region and whether there are conflicts. If surface is not part of valid QuadToTri region
-// or if there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces()
-// makes this DIFFICULT. Also, the tri_quad_flag determins whether the surface
-// should be meshed with triangles or quadrangles:
+// The function that tests whether a 2D surface is a lateral of a valid
+// QuadToTri region and whether there are conflicts. If surface is not part of
+// valid QuadToTri region or if there are QuadToTri conflicts, return 0.  Note
+// that RemoveDuplicateSurfaces() makes this DIFFICULT. Also, the tri_quad_flag
+// determins whether the surface should be meshed with triangles or quadrangles:
 // tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles.
 // Added 2010-12-09.
-int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral )
+int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral)
 {
   (*tri_quad_flag) = 0;
   (*detectQuadToTriLateral) = false;
 
   GModel *model = face->model();
 
-
   ExtrudeParams *ep = face->meshAttributes.extrude;
 
-  if( !ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == EXTRUDED_ENTITY) ){
+  if(!ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == EXTRUDED_ENTITY)){
     Msg::Error("In IsValidQuadToTriLateral(), face %d is not a structured extrusion.",
                face->tag() );
     return 0;
   }
 
-  GEdge *face_source = model->getEdgeByTag( std::abs( ep->geo.Source ) );
-  if( !face_source ){
+  GEdge *face_source = model->getEdgeByTag(std::abs(ep->geo.Source));
+  if(!face_source){
     Msg::Error("In IsValidQuadToTriLateral(), face %d has no source edge.",
-               face->tag() );
+               face->tag());
   }
 
-  // It seems the member pointers to neighboring regions for extruded lateral faces are not set.
-  // For now, have to loop through
-  // ALL the regions to see if the presently considered face belongs to the region and if
-  // any neighboring region is QUADTRI.
-  // The following loop will find all the regions that the face bounds, and determine
-  // whether the face is a lateral of the region (including whether the region is even extruded).
-  // After that information is determined, function can test for QuadToTri neighbor conflicts.
+  // It seems the member pointers to neighboring regions for extruded lateral
+  // faces are not set.  For now, have to loop through ALL the regions to see if
+  // the presently considered face belongs to the region and if any neighboring
+  // region is QUADTRI.  The following loop will find all the regions that the
+  // face bounds, and determine whether the face is a lateral of the region
+  // (including whether the region is even extruded).  After that information is
+  // determined, function can test for QuadToTri neighbor conflicts.
 
   std::vector<GRegion *> lateral_regions;
   std::vector<GRegion *> adjacent_regions;
@@ -87,26 +85,26 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
   int numLateralRegions = 0;
 
   numRegions = GetNeighborRegionsOfFace(face, adjacent_regions);
-  for( int i_reg = 0; i_reg < numRegions; i_reg++ ){
+  for(int i_reg = 0; i_reg < numRegions; i_reg++){
     GRegion *region = adjacent_regions[i_reg];
 
     // is region in the current model's region's or is it deleted?
-    if( !FindVolume( ( region->tag() ) ) )
+    if(!FindVolume((region->tag())))
       continue;
 
     // is the region mesh extruded?
-    if( !region->meshAttributes.extrude ||
-        ( region->meshAttributes.extrude &&
-          !region->meshAttributes.extrude->mesh.ExtrudeMesh ) )
+    if(!region->meshAttributes.extrude ||
+        (region->meshAttributes.extrude &&
+         !region->meshAttributes.extrude->mesh.ExtrudeMesh))
       continue;
-    if( region->meshAttributes.extrude->geo.Mode != EXTRUDED_ENTITY )
+    if(region->meshAttributes.extrude->geo.Mode != EXTRUDED_ENTITY)
       continue;
 
     // Test whether the face is a lateral
-    if( IsSurfaceALateralForRegion(region, face) ){
+    if(IsSurfaceALateralForRegion(region, face)){
       lateral_regions.push_back(region);
       numLateralRegions++;
-      if( region->meshAttributes.extrude->mesh.QuadToTri )
+      if(region->meshAttributes.extrude->mesh.QuadToTri)
         (*detectQuadToTriLateral) = true;
     }
 
@@ -114,7 +112,7 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
 
   // MAIN test of whether this is even a quadToTri extrusion lateral
   // the only return 0 path that is NOT an error
-  if( !(*detectQuadToTriLateral) )
+  if(!(*detectQuadToTriLateral))
     return 0;
 
   // now will start conflict checks
@@ -127,18 +125,17 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
 
   bool detect_conflict = false;
 
-
   // Set the tri_quad_flag that lets ExtrudeMesh override ep->Recombine;
   // tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles.
 
   // if this face is a free surface:
   if( adjacent_regions.size() == 1 ){
-    if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
-        lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB ){
+    if(lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
+       lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB ){
       (*tri_quad_flag) = 1;
     }
-    if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
-        lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 ){
+    if(lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
+       lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 ){
       (*tri_quad_flag) = 2;
     }
     else
@@ -165,25 +162,25 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
     // neighboring extrusion.
     else if( adj_ep && adj_ep->mesh.ExtrudeMesh &&
              model->getFaceByTag( std::abs( adj_ep->geo.Source ) ) == face ){
-      if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
-          lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB )
+      if(lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB ||
+         lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB )
         (*tri_quad_flag) = 1;
-      else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
-               lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 )
+      else if(lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
+              lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_ADDVERTS_1 )
         (*tri_quad_flag) = 2;
       else
         (*tri_quad_flag) = 0;
     }
     // if both neighbors are structured but none of the previous apply:
-    else if( adj_ep && adj_ep->mesh.ExtrudeMesh ){
-      if( (adj_ep && !adj_ep->mesh.QuadToTri && adj_ep->mesh.Recombine) ||
-          (ep && !ep->mesh.QuadToTri && ep->mesh.Recombine) )
+    else if(adj_ep && adj_ep->mesh.ExtrudeMesh){
+      if((adj_ep && !adj_ep->mesh.QuadToTri && adj_ep->mesh.Recombine) ||
+         (ep && !ep->mesh.QuadToTri && ep->mesh.Recombine))
         (*tri_quad_flag) = 1;
-      else if( (adj_ep && !adj_ep->mesh.QuadToTri && !adj_ep->mesh.Recombine) ||
-               (ep && !ep->mesh.QuadToTri && !ep->mesh.Recombine) )
+      else if((adj_ep && !adj_ep->mesh.QuadToTri && !adj_ep->mesh.Recombine) ||
+              (ep && !ep->mesh.QuadToTri && !ep->mesh.Recombine))
         (*tri_quad_flag) = 2;
       // if both are quadToTri ALWAYS try to recombine
-      else if( ep->mesh.QuadToTri && adj_ep && adj_ep->mesh.QuadToTri )
+      else if(ep->mesh.QuadToTri && adj_ep && adj_ep->mesh.QuadToTri)
         (*tri_quad_flag) = 1;
       else
         (*tri_quad_flag) = 0;
@@ -199,24 +196,21 @@ int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToT
    (*tri_quad_flag) = 0;
   }
 
-  if( detect_conflict )
+  if(detect_conflict)
     return 0;
   else
     return 1;
 
 }
 
-
-
-// The function that tests whether a surface is a QuadToTri top surface and whether
-// there are conflicts. If surface is not a top for a valid QuadToTri region or if
-// there are QuadToTri conflicts, return 0.
-// if the surface turns out to be the source of a toroidal loop extrusion (which will then
-// NOT have geo.Mode == COPIED_ENTITY), return 2 (this will require special meshing considerations).
-// Note that RemoveDuplicateSurfaces() makes this DIFFICULT.
-// Also, the type of QuadToTri interface is placed into the
-// pointer argument quadToTri. .
-// Added 2010-12-09.
+// The function that tests whether a surface is a QuadToTri top surface and
+// whether there are conflicts. If surface is not a top for a valid QuadToTri
+// region or if there are QuadToTri conflicts, return 0.  if the surface turns
+// out to be the source of a toroidal loop extrusion (which will then NOT have
+// geo.Mode == COPIED_ENTITY), return 2 (this will require special meshing
+// considerations).  Note that RemoveDuplicateSurfaces() makes this DIFFICULT.
+// Also, the type of QuadToTri interface is placed into the pointer argument
+// quadToTri. .  Added 2010-12-09.
 int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
 {
   (*quadToTri) = NO_QUADTRI;
@@ -226,18 +220,16 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
 
   GModel *model = face->model();
 
-  // First thing is first: determine if this is a toroidal quadtri extrusion.  if so, can skip the  rest
-
-
-  // It seems the member pointers to neighboring regions for extruded top faces are not set.
-  // For now, have to loop through
-  // ALL the regions to see if the presently considered face belongs to the region.
-  // The following loop will find all the regions that the face bounds, and determine
-  // whether the face is a top face of the region (including whether the region is even extruded).
-  // After that information is determined, function can test for QuadToTri neighbor conflicts.
-
-
+  // First thing is first: determine if this is a toroidal quadtri extrusion.
+  // if so, can skip the rest
 
+  // It seems the member pointers to neighboring regions for extruded top faces
+  // are not set.  For now, have to loop through ALL the regions to see if the
+  // presently considered face belongs to the region.  The following loop will
+  // find all the regions that the face bounds, and determine whether the face
+  // is a top face of the region (including whether the region is even
+  // extruded).  After that information is determined, function can test for
+  // QuadToTri neighbor conflicts.
 
   // first determine if this is toroidal quadtotri
   is_toroidal_quadtri = IsInToroidalQuadToTri(face);
@@ -252,7 +244,7 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
     int numTopRegions = 0;
     std::set<GRegion *, GEntityLessThan>::iterator itreg;
 
-    for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ )
+    for(itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++)
       all_regions.push_back( (*itreg) );
 
     for(unsigned int i_reg = 0; i_reg < all_regions.size(); i_reg++ ){
@@ -278,7 +270,8 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
 	continue;
 
       // is region a structured extruded?
-      if( !(region->meshAttributes.extrude && region->meshAttributes.extrude->mesh.ExtrudeMesh &&
+      if( !(region->meshAttributes.extrude &&
+            region->meshAttributes.extrude->mesh.ExtrudeMesh &&
 	    region->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY) )
 	continue;
 
@@ -312,8 +305,9 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
     }
 
     if( ep->mesh.QuadToTri == 0){
-      Msg::Error("In IsValidQuadToTriTop(), surface %d was determined to be the top surface "
-		"for a QuadToTri extrusion, but does not have QuadToTri parameters set within itself.",
+      Msg::Error("In IsValidQuadToTriTop(), surface %d was determined to be the "
+                 "top surface for a QuadToTri extrusion, but does not have "
+                 "QuadToTri parameters set within itself.",
 		face->tag() );
       return 0;
     }
@@ -331,23 +325,22 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
       return 0;
     }
 
-
-    if( top_regions.size() ){
+    if(top_regions.size()){
       (*quadToTri) = top_regions[0]->meshAttributes.extrude->mesh.QuadToTri;
     }
 
     // Make sure that face is the top for only one region. if not, then there will likely
     // be conflicts (two regions extruded into each other).
-    if( top_regions.size() > 1 ){
+    if(top_regions.size() > 1){
       Msg::Error("In IsValidQuadToTriTop(), QuadToTri top surface %d identified as top "
-		"surface for more than one region. Likely conflict.",  face->tag() );
+                 "surface for more than one region. Likely conflict.",  face->tag() );
       return 0;
     }
 
   }  // end of else that executes if NOT toroidal extrusion
 
-
-  // this is technically redundant...but if changes are made, it's good to keep this here at the end for safety
+    // this is technically redundant...but if changes are made, it's good to
+    // keep this here at the end for safety
   if( !(*detectQuadToTriTop) )
     return 0;
 
@@ -360,69 +353,58 @@ int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop)
 
 }
 
-
 // this function specifically meshes a quadToTri top in an unstructured way
 // return 1 if success, return 0 if failed.
 // Added 2010-12-20
-static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to,
-                                   std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to, MVertexRTree &pos)
 {
-
   // if the source is all triangles, then just return 1.
-  if( from->triangles.size() && !from->quadrangles.size() )
+  if(from->triangles.size() && !from->quadrangles.size())
     return 1;
 
-  if( !to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri  )
+  if(!to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri)
     return 0;
 
-
   // in weird case of NO quads and NO tri
-  if( !from->triangles.size() && !from->quadrangles.size() )
+  if(!from->triangles.size() && !from->quadrangles.size())
     return 0;
 
-
   // make set of source edge vertices
-  std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge;
+  MVertexRTree pos_src_edge(CTX::instance()->geom.tolerance * CTX::instance()->lc);
   QuadToTriInsertFaceEdgeVertices(from, pos_src_edge);
 
   // Loop through all the quads and make the triangles with diagonals running
   // in a selected direction.
 
   to->triangles.reserve(to->triangles.size()+from->quadrangles.size()*2);
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
 
   for(unsigned int i = 0; i < from->quadrangles.size(); i++){
     std::vector<MVertex*> verts;
     for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){
       MVertex *v = from->quadrangles[i]->getVertex(j);
-      MVertex tmp(v->x(), v->y(), v->z(), 0, -1);
+      double x = v->x(), y = v->y(), z = v->z();
       ExtrudeParams *ep = to->meshAttributes.extrude;
       ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
-                  tmp.x(), tmp.y(), tmp.z());
-      itp = pos.find(&tmp);
-      if(itp == pos.end()){ // FIXME: workaround
-        Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-        itp = tmp.linearSearch(pos);
-      }
-      if(itp == pos.end()) {
+                  x, y, z);
+      MVertex *tmp = pos.find(x, y, z);
+      if(!tmp) {
         Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-            tmp.x(), tmp.y(), tmp.z(), to->tag());
-        to->triangles.reserve(to->triangles.size()+1);
+                   x, y, z, to->tag());
+        to->triangles.reserve(to->triangles.size() + 1);
         return 0;
       }
-      verts.push_back(*itp);
+      verts.push_back(tmp);
     }
 
-
-    if( verts.size() != 4 ){
+    if(verts.size() != 4){
       Msg::Error("During mesh of QuadToTri surface %d, %d vertices found "
                  "in quad of source surface %d.", to->tag(), verts.size(),
                  from->tag() );
       return 0;
     }
 
-
-    // draw other diagonals to minimize difference in average edge length with diagonal length, in quadrature
+    // draw other diagonals to minimize difference in average edge length with
+    // diagonal length, in quadrature
 
     double mag_sq_ave = 0.0;
     for( int p = 0; p < 4; p++ ){
@@ -447,79 +429,73 @@ static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to,
   return 1;
 }
 
-
-// This function meshes the top surface of a QuadToTri extrusion.  It returns 0 if it is given a
-// non-quadToTri extrusion or if it fails.
+// This function meshes the top surface of a QuadToTri extrusion.  It returns 0
+// if it is given a non-quadToTri extrusion or if it fails.
 // Args:
-//       'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set
-//       of vertex positions for the top surface.
-int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
-                             MVertexLessThanLexicographic> &pos )
+//       'GFace *to' is the top surface to mesh,
+//       'from' is the source surface
+//       'pos' is a tree of vertex positions for the top surface.
+int MeshQuadToTriTopSurface(GFace *from, GFace *to, MVertexRTree &pos)
 {
-  if( !to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri  )
+  if(!to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri)
    return 0;
 
   // if the source is all triangles, then just let this function is not needed. Return 1.
-  if( from->triangles.size() && !from->quadrangles.size() )
+  if(from->triangles.size() && !from->quadrangles.size())
     return 1;
 
   // in weird case of NO quads and NO tri
-  if( !from->triangles.size() && !from->quadrangles.size() )
+  if(!from->triangles.size() && !from->quadrangles.size())
     return 0;
 
-
   ExtrudeParams *ep = to->meshAttributes.extrude;
-  if( !ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == COPIED_ENTITY) ){
+  if(!ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == COPIED_ENTITY)){
     Msg::Error("In MeshQuadToTriTopSurface(), incomplete or no "
-		"extrude information for top face %d.", to->tag() );
+               "extrude information for top face %d.", to->tag() );
     return 0;
   }
 
   // is this a quadtri extrusion with added vertices?
   bool is_addverts = false;
-  if( ep && (ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1 || ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB) )
+  if(ep && (ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1 ||
+            ep->mesh.QuadToTri == QUADTRI_ADDVERTS_1_RECOMB))
     is_addverts = true;
 
-  // execute this section if
-  // IF this is a 'no new vertices' quadToTri, mesh the surfaces according to this modified
-  // least point value method: if a 3 boundary point quad, draw diagonals from middle corner toward
-  // interior.  If a a 2- or 1- point boundary quad, draw toward lowest pointer number NOT on boundary.
-  // All interior quad, draw diagonal to vertex with lowest pointer number.
+  // execute this section if IF this is a 'no new vertices' quadToTri, mesh the
+  // surfaces according to this modified least point value method: if a 3
+  // boundary point quad, draw diagonals from middle corner toward interior.  If
+  // a a 2- or 1- point boundary quad, draw toward lowest pointer number NOT on
+  // boundary.  All interior quad, draw diagonal to vertex with lowest pointer
+  // number.
 
-  if( !is_addverts ){
-    std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge;
+  if(!is_addverts){
+    MVertexRTree pos_src_edge(CTX::instance()->geom.tolerance * CTX::instance()->lc);
     QuadToTriInsertFaceEdgeVertices(from, pos_src_edge);
-    std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
 
     // loop through each element source quadrangle and extrude
     for(unsigned int i = 0; i < from->quadrangles.size(); i++){
       std::vector<MVertex*> verts;
       for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){
         MVertex *v = from->quadrangles[i]->getVertex(j);
-        MVertex tmp(v->x(), v->y(), v->z(), 0, -1);
+        double x = v->x(), y = v->y(), z = v->z();
         ExtrudeParams *ep = to->meshAttributes.extrude;
         ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
-                    tmp.x(), tmp.y(), tmp.z());
-        itp = pos.find(&tmp);
-        if(itp == pos.end()){ // FIXME: workaround
-          Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-          itp = tmp.linearSearch(pos);
-        }
-        if(itp == pos.end()) {
+                    x, y, z);
+        MVertex *tmp = pos.find(x, y, z);
+        if(!tmp) {
           Msg::Error("In MeshQuadToTriTopSurface(), Could not find "
                      "extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-              tmp.x(), tmp.y(), tmp.z(), to->tag());
-          to->triangles.reserve(to->triangles.size()+1);
+                     x, y, z, to->tag());
+          to->triangles.reserve(to->triangles.size() + 1);
           return 0;
         }
-        verts.push_back(*itp);
+        verts.push_back(tmp);
       }
 
-
-      if( verts.size() != 4 ){
+      if(verts.size() != 4){
         Msg::Error("During mesh of QuadToTri surface %d, %d vertices found "
                    "in quad of source surface %d.", to->tag(), verts.size(),
-                   from->tag() );
+                   from->tag());
         return 0;
       }
 
@@ -530,8 +506,10 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
       int edge_verts_count = 0;
       //int skip_index = 0;
       int bnd_indices[4];
-      for( int p = 0; p < element->getNumVertices(); p++ ){
-        if( pos_src_edge.find( element->getVertex(p) ) != pos_src_edge.end() ){
+      for(int p = 0; p < element->getNumVertices(); p++){
+        if(pos_src_edge.find(element->getVertex(p)->x(),
+                             element->getVertex(p)->y(),
+                             element->getVertex(p)->z())){
           edge_verts_count++;
           bnd_indices[p] = 1;
         }
@@ -543,21 +521,22 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
 
       // Apply modified lowest vertex pointer diagonalization
       int low_index = -1;
-      if( edge_verts_count == 3 || edge_verts_count == 2 || edge_verts_count == 1 ){
-        for( int p = 0; p < 4; p++ ){
-          if( !bnd_indices[p] && verts[p] != element->getVertex(p) ){
-            if( low_index < 0 )
+      if(edge_verts_count == 3 || edge_verts_count == 2 || edge_verts_count == 1){
+        for(int p = 0; p < 4; p++ ){
+          if(!bnd_indices[p] && verts[p] != element->getVertex(p)){
+            if(low_index < 0 )
               low_index = p;
-            else if( verts[p] < verts[low_index] )
+            else if(verts[p] < verts[low_index])
               low_index = p;
           }
         }
-        if( low_index < 0 ) // what if they are all degenerate?  Avoid the out-of-bounds error.
+        if(low_index < 0) // what if they are all degenerate?  Avoid the
+                          // out-of-bounds error.
           low_index = 0;
       }
 
       // lowest possible vertex pointer, regardless of if on edge or not
-      else if( edge_verts_count == 4 || edge_verts_count == 0 )
+      else if(edge_verts_count == 4 || edge_verts_count == 0)
         low_index = getIndexForLowestVertexPointer(verts);
 
       addTriangle( verts[low_index],verts[(low_index+1)%verts.size()],
@@ -569,49 +548,44 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
   }
 
 
-  // AFTER THIS POINT IN FUNCTION, CODE IS ALL FOR 'ADD INTERNAL VERTEX' EXTRUSIONS (Less restrictive).
+  // AFTER THIS POINT IN FUNCTION, CODE IS ALL FOR 'ADD INTERNAL VERTEX'
+  // EXTRUSIONS (Less restrictive).
 
   // if source face is unstructured, can try to make the top mesh a little neater
   GFace *root_source = findRootSourceFaceForFace( from );
   ExtrudeParams *ep_src = root_source->meshAttributes.extrude;
   bool struct_root = false;
-  if( root_source &&
-      ( (ep_src && ep_src->mesh.ExtrudeMesh && ep_src->geo.Mode == EXTRUDED_ENTITY) ||
-        root_source->meshAttributes.method == MESH_TRANSFINITE ) )
+  if(root_source &&
+     ((ep_src && ep_src->mesh.ExtrudeMesh && ep_src->geo.Mode == EXTRUDED_ENTITY) ||
+      root_source->meshAttributes.method == MESH_TRANSFINITE))
     struct_root = true;
 
-  if( !struct_root && MeshQuadToTriTopUnstructured(from, to, pos) )
+  if(!struct_root && MeshQuadToTriTopUnstructured(from, to, pos)){
     return 1;
-
-  // And top surface for the 'added internal vertex' method can be meshed quite easily
+  }
   else{
-    std::set<MVertex *, MVertexLessThanLexicographic >::iterator itp;
-    // loop through each element source quadrangle and extrude
+    // And top surface for the 'added internal vertex' method can be meshed
+    // quite easily. Loop through each element source quadrangle and extrude
     for(unsigned int i = 0; i < from->quadrangles.size(); i++){
       std::vector<MVertex*> verts;
       for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){
         MVertex *v = from->quadrangles[i]->getVertex(j);
-        MVertex tmp(v->x(), v->y(), v->z(), 0, -1);
+        double x = v->x(), y = v->y(), z = v->z();
         ExtrudeParams *ep = to->meshAttributes.extrude;
         ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
-                    tmp.x(), tmp.y(), tmp.z());
-        itp = pos.find(&tmp);
-        if(itp == pos.end()){ // FIXME: workaround
-          Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-          itp = tmp.linearSearch(pos);
-        }
-        if(itp == pos.end()) {
+                    x, y, z);
+        MVertex *tmp = pos.find(x, y, z);
+        if(!tmp) {
           Msg::Error("In MeshQuadToTriTopSurface(), Could not find "
                      "extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-              tmp.x(), tmp.y(), tmp.z(), to->tag());
-          to->triangles.reserve(to->triangles.size()+1);
+                     x, y, z, to->tag());
+          to->triangles.reserve(to->triangles.size() + 1);
           return 0;
         }
-        verts.push_back(*itp);
+        verts.push_back(tmp);
       }
 
-
-      if( verts.size() != 4 ){
+      if(verts.size() != 4){
         Msg::Error("During mesh of QuadToTri surface %d, %d vertices found "
                    "in quad of source surface %d.", to->tag(), verts.size(),
                    from->tag() );
@@ -626,5 +600,4 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*,
   }
 
   return 0;
-
 }
diff --git a/Mesh/QuadTriExtruded2D.h b/Mesh/QuadTriExtruded2D.h
index 3b1a05d..9a6b26f 100644
--- a/Mesh/QuadTriExtruded2D.h
+++ b/Mesh/QuadTriExtruded2D.h
@@ -1,36 +1,37 @@
-/************************************************************************************************** 
+/*******************************************************************************
 QuadTriExtruded2D.h
 
 The code in this file was written by Dr. Trevor S. Strickler.
-email: <trevor.strickler at gmail.com> 
+email: <trevor.strickler at gmail.com>
 
-This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements. 
+This file is part of the QuadTri contribution to Gmsh. QuadTri allows the
+conformal interface of quadrangle faces to triangle faces using pyramids and
+other mesh elements.
 
-See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
+See READMEQUADTRI.txt for more information. The license information is in
+LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to 
-Christophe Geuzaine and J.-F. Remacle with the understanding that 
-his contribution shall be cited appropriately.
+Trevor S. Strickler hereby transfers copyright of QuadTri files to Christophe
+Geuzaine and J.-F. Remacle with the understanding that his contribution shall be
+cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-Gmsh is available at: www.geuz.org/gmsh
+All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine,
+J.-F. Remacle Gmsh is available at: www.geuz.org/gmsh
 
-For Gmsh license information, see the LICENSE.txt file for license information. Please report all
-Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
+For Gmsh license information, see the LICENSE.txt file for license
+information. Please report all Gmsh bugs and problems to the public mailing list
+<gmsh at geuz.org>.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option) 
-any later version, with or without the exception given in the 
-LICENSE.txt file supplied with this code and with Gmsh.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License, Version 2, as published by the Free
+Software Foundation, or (at your option) any later version, with or without the
+exception given in the LICENSE.txt file supplied with this code and with Gmsh.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+********************************************************************************/
 
-****************************************************************************************************/
 #if !defined(_QTEXTR2D_H_)
 #define _QTEXTR2D_H_
 
@@ -53,33 +54,27 @@ GNU General Public License for more details.
 #include <math.h>
 #include "QuadTriUtils.h"
 
-
-
-// The function that tests whether a 2D surface is a lateral of a valid QuadToTri 
-// region and whether there are conflicts. If surface is not part of valid QuadToTri region 
-// or if there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces() 
-// makes this DIFFICULT. Also, the tri_quad_flag determins whether the surface
-// should be meshed with triangles or quadrangles:
-// tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles. 
+// The function that tests whether a 2D surface is a lateral of a valid
+// QuadToTri region and whether there are conflicts. If surface is not part of
+// valid QuadToTri region or if there are QuadToTri conflicts, return 0.  Note
+// that RemoveDuplicateSurfaces() makes this DIFFICULT. Also, the tri_quad_flag
+// determins whether the surface should be meshed with triangles or quadrangles:
+// tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles.
 // Added 2010-12-09.
-int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral );
+int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral);
 
-
-// The function that tests whether a surface is a QuadToTri top surface and whether
-// there are conflicts. If surface is not a top for a valid QuadToTri region or if 
-// there are QuadToTri conflicts, return 0.  Note that RemoveDuplicateSurfaces() 
-// makes this DIFFICULT. Also, the type of QuadToTri interface is placed into the 
-// pointer argument quadToTri. .
-// Added 2010-12-09.
+// The function that tests whether a surface is a QuadToTri top surface and
+// whether there are conflicts. If surface is not a top for a valid QuadToTri
+// region or if there are QuadToTri conflicts, return 0.  Note that
+// RemoveDuplicateSurfaces() makes this DIFFICULT. Also, the type of QuadToTri
+// interface is placed into the pointer argument quadToTri. .  Added 2010-12-09.
 int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop);
 
 
-// This function meshes the top surface of a QuadToTri extrusion.  It returns 0 if it is given a 
-// non-quadToTri extrusion or if it fails.  
-// Args: 
-//       'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set  
-//       of vertex positions for the top surface.
-int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, 
-                             MVertexLessThanLexicographic> &pos );
+// This function meshes the top surface of a QuadToTri extrusion.  It returns 0
+// if it is given a non-quadToTri extrusion or if it fails.  Args: 'GFace *to'
+// is the top surface to mesh, 'from' is the source surface, 'pos' is a tree
+// of vertex positions for the top surface.
+int MeshQuadToTriTopSurface(GFace *from, GFace *to, MVertexRTree &pos);
 
 #endif
diff --git a/Mesh/QuadTriExtruded3D.cpp b/Mesh/QuadTriExtruded3D.cpp
index cab245c..b81b4b5 100644
--- a/Mesh/QuadTriExtruded3D.cpp
+++ b/Mesh/QuadTriExtruded3D.cpp
@@ -1,36 +1,37 @@
-/**************************************************************************************************
+/*******************************************************************************
 QuadTriExtruded3D.cpp
 
 The code in this file was written by Dr. Trevor S. Strickler.
 email: <trevor.strickler at gmail.com>
 
-This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements.
+This file is part of the QuadTri contribution to Gmsh. QuadTri allows the
+conformal interface of quadrangle faces to triangle faces using pyramids and
+other mesh elements.
 
-See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
+See READMEQUADTRI.txt for more information. The license information is in
+LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to
-Christophe Geuzaine and J.-F. Remacle with the understanding that
-his contribution shall be cited appropriately.
+Trevor S. Strickler hereby transfers copyright of QuadTri files to Christophe
+Geuzaine and J.-F. Remacle with the understanding that his contribution shall be
+cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-Gmsh is available at: www.geuz.org/gmsh
+All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine,
+J.-F. Remacle Gmsh is available at: www.geuz.org/gmsh
 
-For Gmsh license information, see the LICENSE.txt file for license information. Please report all
-Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
+For Gmsh license information, see the LICENSE.txt file for license
+information. Please report all Gmsh bugs and problems to the public mailing list
+<gmsh at geuz.org>.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option)
-any later version, with or without the exception given in the
-LICENSE.txt file supplied with this code and with Gmsh.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License, Version 2, as published by the Free
+Software Foundation, or (at your option) any later version, with or without the
+exception given in the LICENSE.txt file supplied with this code and with Gmsh.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
-****************************************************************************************************/
+********************************************************************************/
 
 #include "QuadTriExtruded3D.h"
 
@@ -67,7 +68,6 @@ static void addHexahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4,
   to->hexahedra.push_back(newElem);
 }
 
-
 // Does the pair of MVertex pointers v1 and v2 exist in the set 'edges'?
 static int edgeExists(MVertex *v1, MVertex *v2,
                       std::set<std::pair<MVertex*, MVertex*> > &edges)
@@ -76,7 +76,6 @@ static int edgeExists(MVertex *v1, MVertex *v2,
   return edges.count(p);
 }
 
-
 // Create the pair of MVertex pointers v1 and v2 exist in the set 'edges.'
 static void createEdge(MVertex *v1, MVertex *v2,
                        std::set<std::pair<MVertex*, MVertex*> > &edges)
@@ -85,11 +84,11 @@ static void createEdge(MVertex *v1, MVertex *v2,
   edges.insert(p);
 }
 
-
-// Create the entry for a forbidden edge in forbidden_edges (note that all four verts are
-// forbidden, but only store two, using lowest vertex pointer diagonal).
+// Create the entry for a forbidden edge in forbidden_edges (note that all four
+// verts are forbidden, but only store two, using lowest vertex pointer
+// diagonal).
 static void createForbidden(std::vector<MVertex*> v,
-                       std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges)
+                            std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges)
 {
   if( v.size() != 4 ){
     Msg::Error("In createForbidden(), number of vertices not equal 4.");
@@ -105,9 +104,10 @@ static void createForbidden(std::vector<MVertex*> v,
 }
 
 
-// Is the given vector of quad vertices forbidden to diagonalize (it is in forbidden_edges)?
+// Is the given vector of quad vertices forbidden to diagonalize (it is in
+// forbidden_edges)?
 static int forbiddenExists(std::vector<MVertex*> v,
-                       std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges)
+                           std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges)
 {
 
   if( v.size() != 4 ){
@@ -124,7 +124,6 @@ static int forbiddenExists(std::vector<MVertex*> v,
   return forbidden_edges.count(pair);
 }
 
-
 // delete a pair of vertex pointers v1 and v2 from 'edges.'
 static void deleteEdge(MVertex *v1, MVertex *v2,
                        std::set<std::pair<MVertex*, MVertex*> > &edges)
@@ -133,16 +132,15 @@ static void deleteEdge(MVertex *v1, MVertex *v2,
   edges.erase(p);
 }
 
-
-// Get the two mesh vertices extruded from vertices v0 and v1 on a lateral face at layer j, element k.
-// Added 2010-01-26
-static std::vector<MVertex*> getExtrudedLateralVertices( MVertex *v0, MVertex *v1, GEntity *entity,
-                                     unsigned int j, unsigned int k, ExtrudeParams *loop_ep,
-                                     std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+// Get the two mesh vertices extruded from vertices v0 and v1 on a lateral face
+// at layer j, element k.  Added 2010-01-26
+static std::vector<MVertex*> getExtrudedLateralVertices(MVertex *v0, MVertex *v1,
+                                                        GEntity *entity,
+                                                        unsigned int j, unsigned int k,
+                                                        ExtrudeParams *loop_ep,
+                                                        MVertexRTree &pos)
 {
-
   std::vector<MVertex*> verts;
-  std::set<MVertex *, MVertexLessThanLexicographic>::iterator itp;
   double x[4] = {v0->x(), v1->x(), v0->x(), v1->x()};
   double y[4] = {v0->y(), v1->y(), v0->y(), v1->y()};
   double z[4] = {v0->z(), v1->z(), v0->z(), v1->z()};
@@ -151,37 +149,28 @@ static std::vector<MVertex*> getExtrudedLateralVertices( MVertex *v0, MVertex *v
     loop_ep->Extrude(j, k + 1, x[p + 2], y[p + 2], z[p + 2]);
   }
   for(int p = 0; p < 4; p++){
-    MVertex tmp(x[p], y[p], z[p], 0, -1);
-    itp = pos.find(&tmp);
-    if(itp == pos.end()){ // FIXME: workaround
-      Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-      itp = tmp.linearSearch(pos);
-    }
-    if(itp == pos.end()){
+    MVertex *tmp = pos.find(x[p], y[p], z[p]);
+    if(!tmp){
       Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d",
-                  tmp.x(), tmp.y(), tmp.z(), entity->tag());
-
+                 x[p], y[p], z[p], entity->tag());
       verts.clear();
       return verts;
     }
-    verts.push_back(*itp);
+    verts.push_back(tmp);
   }
 
   return verts;
-
 }
 
-
-// Get the extruded vertices from MElement *elem at layer j, element k.
-// Added 2010-01-26
-static int get2DExtrudedVertices( MElement *elem, ExtrudeParams *ep, unsigned int j, unsigned int k,
-                                  std::set<MVertex*, MVertexLessThanLexicographic> &pos,
-                                  std::vector<MVertex *> &verts )
+// Get the extruded vertices from MElement *elem at layer j, element k.  Added
+// 2010-01-26
+static int get2DExtrudedVertices(MElement *elem, ExtrudeParams *ep,
+                                 unsigned int j, unsigned int k,
+                                 MVertexRTree &pos, std::vector<MVertex *> &verts)
 {
   std::vector<MVertex*> source_verts;
-  elem->getVertices( source_verts );
+  elem->getVertices(source_verts);
 
-  std::set<MVertex *, MVertexLessThanLexicographic>::iterator itp;
   int sz = source_verts.size();
   std::vector<double> x(sz), y(sz), z(sz);
   for( int p = 0; p < sz; p++ ){
@@ -191,35 +180,24 @@ static int get2DExtrudedVertices( MElement *elem, ExtrudeParams *ep, unsigned in
   }
   for(int p = 0; p < sz; p++){
     ep->Extrude(j, k, x[p], y[p], z[p]);
-    MVertex tmp(x[p], y[p], z[p], 0, -1);
-    itp = pos.find(&tmp);
-    if(itp == pos.end()){ // FIXME: workaround
-      Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-      itp = tmp.linearSearch(pos);
-    }
-    if(itp == pos.end()){
+    MVertex *tmp = pos.find(x[p], y[p], z[p]);
+    if(!tmp){
       Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g).",
-                  tmp.x(), tmp.y(), tmp.z() );
-
+                 x[p], y[p], z[p]);
       verts.clear();
       return verts.size();
     }
-    verts.push_back(*itp);
+    verts.push_back(tmp);
   }
 
   return verts.size();
-
 }
 
-
-// Copied from meshGRegionExtruded.cpp, By Geuzaine, Remacle...
-// Extrudes a set of source vertices in 3D
-// added 2010-01-18
+// Copied from meshGRegionExtruded.cpp, By Geuzaine, Remacle...  Extrudes a set
+// of source vertices in 3D added 2010-01-18
 static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k,
-                               std::set<MVertex*, MVertexLessThanLexicographic> &pos,
-                               std::vector<MVertex*> &verts)
+                               MVertexRTree &pos, std::vector<MVertex*> &verts)
 {
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   double x[8], y[8], z[8];
   int n = ele->getNumVertices();
   for(int p = 0; p < n; p++){
@@ -233,26 +211,19 @@ static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k,
     ep->Extrude(j, k + 1, x[p + n], y[p + n], z[p + n]);
   }
   for(int p = 0; p < 2 * n; p++){
-    MVertex tmp(x[p], y[p], z[p], 0, -1);
-    itp = pos.find(&tmp);
-    if(itp == pos.end()){ // FIXME: workaround
-      Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-      itp = tmp.linearSearch(pos);
-    }
-    if(itp == pos.end())
+    MVertex *tmp = pos.find(x[p], y[p], z[p]);
+    if(!tmp)
       Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g)",
-                 tmp.x(), tmp.y(), tmp.z());
+                 x[p], y[p], z[p]);
     else
-      verts.push_back(*itp);
+      verts.push_back(tmp);
   }
   return verts.size();
 }
 
-
 // Determines whether the region is a valid QuadToTri region.  Performs some
-// basic checks, including whether there is a valid top, valid source,
-// and that the surfaces serving as laterals are structured
-// Added 2010-12-30
+// basic checks, including whether there is a valid top, valid source, and that
+// the surfaces serving as laterals are structured Added 2010-12-30
 bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
 {
   ExtrudeParams *ep = region->meshAttributes.extrude;
@@ -263,22 +234,22 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
   GModel *model = region->model();
 
   // find source face
-  GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) );
+  GFace *reg_source = model->getFaceByTag(std::abs(ep->geo.Source));
   if( !reg_source ){
     Msg::Error("In IsValidQuadToTriRegion(), could not find source face "
-               "%d for region %d.", std::abs( ep->geo.Source ),
-               region->tag() );
+               "%d for region %d.", std::abs(ep->geo.Source),
+               region->tag());
     return false;
   }
-  
+
   bool is_toroidal = IsInToroidalQuadToTri(reg_source);
   GFace *root = findRootSourceFaceForFace(reg_source);
-  
+
   // Find a source surface. Then find a COPIED_ENTITY that is the top surface.
-  // Then determine if all the laterals are either all quad or all triangle.
-  // If shared laterals are all static (quad or non subdivide triangles),
-  // set the allNonGlobalSharedLaterals argument to true.
-  // If any lateral is unstructured, error.
+  // Then determine if all the laterals are either all quad or all triangle.  If
+  // shared laterals are all static (quad or non subdivide triangles), set the
+  // allNonGlobalSharedLaterals argument to true.  If any lateral is
+  // unstructured, error.
 
   bool foundTop = false, foundSource = false,
                   foundNoStruct = false, foundRoot = false;
@@ -288,7 +259,7 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
 
   (*allNonGlobalSharedLaterals) = true;
 
-  
+
   for( it = faces.begin(); it != faces.end(); it++ ){
     ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude;
     if( (*it) == root )
@@ -309,7 +280,7 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
       else if( top_source_tmp == reg_source &&
                !IsSurfaceALateralForRegion(region, *it) )
         foundTop = true;
-     
+
     }
     // This is a check to see if there are lateral surface triangles that need to be edged globally in subdivide operation
     else if( IsSurfaceALateralForRegion(region, *it) ){
@@ -332,7 +303,7 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
   // if didn't find the copied entity, maybe this is toroidal and the top has been replaced
   if( is_toroidal && !foundTop && foundRoot && root != reg_source )
     foundTop = true;
-  
+
   // test for errors
   bool detectConflict = false;
   if( !foundTop ){
@@ -367,15 +338,15 @@ bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals)
 // Ordering of faces starts with the lateral face containing verts[0] and verts[1], then goes in order
 // of increasing vertex index around element. Finally, the bottom, then the top.
 // Added 2010-01-21
-static std::map<std::string, std::vector<int> > getFaceTypes(GRegion *gr, MElement *elem, int j, int k,
-                                     std::vector<MVertex *> &verts,
-                                     std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge,
-                                     std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                     std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                     std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                     std::vector<bool> &vert_bnd, std::vector<int> &nfix1,
-                                     std::vector<int> &nfix2, std::vector<int> &nadj1,
-                                     std::vector<int> &nadj2, std::vector<int> &free_flag )
+static std::map<std::string, std::vector<int> >
+getFaceTypes(GRegion *gr, MElement *elem, int j, int k,
+             std::vector<MVertex *> &verts,
+             std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+             std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+             std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+             std::vector<bool> &vert_bnd, std::vector<int> &nfix1,
+             std::vector<int> &nfix2, std::vector<int> &nadj1,
+             std::vector<int> &nadj2, std::vector<int> &free_flag )
 {
   std::map<std::string, std::vector<int> > face_types;
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -878,12 +849,11 @@ static void bruteForceEdgeQuadToTriPrism( GRegion *gr, MElement *elem,
 
   return;
 
-}  // end of bruteForceEdgeQuadToTriPrism()
-
+}
 
 
 // Divide hexahedron degenerated at two points (degenerate face is a line) by brute force
-static void addEdgesForQuadToTriTwoPtDegenHexa( GRegion *gr, MElement *elem, ExtrudeParams *ep,
+static void addEdgesForQuadToTriTwoPtDegenHexa(GRegion *gr, MElement *elem, ExtrudeParams *ep,
                                                int j, int k, std::vector<MVertex *> verts,
                                                std::map<std::string, std::vector<int> > &face_types,
                                                std::set<std::pair<MVertex*, MVertex*> > &edges_new,
@@ -893,7 +863,6 @@ static void addEdgesForQuadToTriTwoPtDegenHexa( GRegion *gr, MElement *elem, Ext
                                                std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
                                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                               std::set<MVertex*, MVertexLessThanLexicographic> &pos,
                                                std::vector<int> nfix1, std::vector<int> nfix2,
                                                std::vector<int> nadj1, std::vector<int> nadj2,
                                                std::vector<int> free_flag )
@@ -1204,7 +1173,7 @@ static void addEdgesForQuadToTriTwoPtDegenHexa( GRegion *gr, MElement *elem, Ext
 
   return;
 
-}  // end of addEdgesForQuadToTriTwoPtDegenHexa()
+}
 
 
 // Divide a hexahedron degenerate at one point (one degenerate corner) by brute force.
@@ -1218,7 +1187,6 @@ static void addEdgesForQuadToTriOnePtDegenHexa( GRegion *gr, MElement *elem, Ext
                                                std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
                                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                               std::set<MVertex*, MVertexLessThanLexicographic> &pos,
                                                std::vector<int> nfix1, std::vector<int> nfix2,
                                                std::vector<int> nadj1, std::vector<int> nadj2,
                                                std::vector<int> free_flag )
@@ -1538,12 +1506,11 @@ static void addEdgesForQuadToTriOnePtDegenHexa( GRegion *gr, MElement *elem, Ext
     problems_new[elem].insert(jkpair);
   }
 
-}  // end of addEdgesForQuadToTriOnePtDegenHexa()
-
+}
 
 
 // Divide a fully non-degenerate hexahedron by brute force.
-static void addEdgesForQuadToTriFullHexa( GRegion *gr, MElement *elem, ExtrudeParams *ep,
+static void addEdgesForQuadToTriFullHexa(GRegion *gr, MElement *elem, ExtrudeParams *ep,
                                          int j, int k, std::vector<MVertex *> verts,
                                          std::map<std::string, std::vector<int> > &face_types,
                                          std::set<std::pair<MVertex*, MVertex*> > &edges_new,
@@ -1553,10 +1520,9 @@ static void addEdgesForQuadToTriFullHexa( GRegion *gr, MElement *elem, ExtrudePa
                                          std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                                          std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
                                          std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                         std::set<MVertex*, MVertexLessThanLexicographic> &pos,
                                          std::vector<int> nfix1, std::vector<int> nfix2,
                                          std::vector<int> nadj1, std::vector<int> nadj2,
-                                         std::vector<int> free_flag )
+                                         std::vector<int> free_flag)
 {
 
   // There are 4 main possibilities for minimum diags to guarantee slice:
@@ -2064,26 +2030,25 @@ static void addEdgesForQuadToTriFullHexa( GRegion *gr, MElement *elem, ExtrudePa
     problems_new[elem].insert(jkpair);
   }
 
-}  // end of addEdgesForQuadToTriFullHexa();
+}
 
 
 // Generate face diagonals to subdivide hexahedra by BRUTE FORCE.  Not recommended for general use, but it
 // is required for some elements which have all vertices on an external region boundary.
 // Added 2010-01-29
-static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem,
-                                     int j, int k, std::vector<MVertex *> verts,
-                                      std::map<std::string, std::vector<int> > &face_types,
-                                      std::set<std::pair<MVertex*, MVertex*> > &edges_new,
-                                      std::set<std::pair<MVertex*, MVertex*> > &forbidden_new,
-                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                      std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                      std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                      std::set<MVertex*, MVertexLessThanLexicographic> &pos,
-                                      std::vector<int> nfix1, std::vector<int> nfix2,
-                                      std::vector<int> nadj1, std::vector<int> nadj2,
-                                      std::vector<int> free_flag )
+static void bruteForceEdgeQuadToTriHexa(GRegion *gr, MElement *elem,
+                                        int j, int k, std::vector<MVertex *> verts,
+                                        std::map<std::string, std::vector<int> > &face_types,
+                                        std::set<std::pair<MVertex*, MVertex*> > &edges_new,
+                                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_new,
+                                        std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                                        std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+                                        std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                        std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                        std::vector<int> nfix1, std::vector<int> nfix2,
+                                        std::vector<int> nadj1, std::vector<int> nadj2,
+                                        std::vector<int> free_flag)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -2220,10 +2185,10 @@ static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem,
   // First shape: A PRISM
   // Only two possibilities.  Either the bottom can be divided along same diagonal as the top,
   // or the one quad side can be divided joining the top diagonal. Otherwise, problem.
-  if( face_types["degen"].size() ){
-    addEdgesForQuadToTriTwoPtDegenHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
-                                 quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
-                                 problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag );
+  if(face_types["degen"].size()){
+    addEdgesForQuadToTriTwoPtDegenHexa(gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
+                                       quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
+                                       problems, nfix1, nfix2, nadj1, nadj2, free_flag);
     return;
   }
 
@@ -2231,9 +2196,9 @@ static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem,
   // Since this shape can be divided to create legitimate tets and/or pyramids,
   // let us try it.
   if( !face_types["degen"].size() && face_types["single_tri"].size() == 2 ){
-    addEdgesForQuadToTriOnePtDegenHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
-                                 quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
-                                 problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag );
+    addEdgesForQuadToTriOnePtDegenHexa(gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
+                                       quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
+                                       problems, nfix1, nfix2, nadj1, nadj2, free_flag);
     return;
   }
 
@@ -2243,30 +2208,27 @@ static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem,
   // 2. One PAIR of opposite diagonals, ABSOLUTELY ALL OTHER FACES FORBIDDEN
   // 2. Two PAIRS of opposite diags
   // 3. One PAIR of opposite diags PLUS a vertex with two ADDITIONAL diags meeting on it.
-  if( !face_types["single_tri"].size() && !face_types["degen"].size() ){
-
-    addEdgesForQuadToTriFullHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
-                                  quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
-                                  problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag );
+  if(!face_types["single_tri"].size() && !face_types["degen"].size()){
+    addEdgesForQuadToTriFullHexa(gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new,
+                                 quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new,
+                                 problems, nfix1, nfix2, nadj1, nadj2, free_flag);
     return;
   }
-
-} // end of bruteForceEdgeQuadToTriHexa()
-
+}
 
 
 // This is a shortcut function to simply copy face diagonals all the way up a vertical column of extruded elements.
 // This function may not save very many operations, but it is going to stay...
-static int ExtrudeDiags( GRegion *gr, std::vector<MVertex*> v, unsigned int j_start,
-                                    unsigned int k_start, unsigned int j_top, unsigned int k_top,
-                                    MElement *elem, ExtrudeParams *loop_ep,
-                                    std::set<std::pair<MVertex*, MVertex*> > &edges_new,
-                                    std::set<std::pair<MVertex*, MVertex*> > &forbidden_new,
-                                    std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                    std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                    std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                    std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                    std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int ExtrudeDiags(GRegion *gr, std::vector<MVertex*> v, unsigned int j_start,
+                        unsigned int k_start, unsigned int j_top, unsigned int k_top,
+                        MElement *elem, ExtrudeParams *loop_ep,
+                        std::set<std::pair<MVertex*, MVertex*> > &edges_new,
+                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_new,
+                        std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                        std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                        std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                        std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                        MVertexRTree &pos)
 {
 
   if( !loop_ep || !loop_ep->mesh.QuadToTri || !loop_ep->mesh.ExtrudeMesh ){
@@ -2366,10 +2328,10 @@ static int ExtrudeDiags( GRegion *gr, std::vector<MVertex*> v, unsigned int j_st
 // Fixed edges include top surface diagonals and any lateral surface diagonals that cannot be swapped.
 // Added 2010-01-24
 static bool QuadToTriGetRegionDiags(GRegion *gr,
-                           std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges,
-                           std::set<std::pair<MVertex*,MVertex*> > &forbidden_edges,
-                           std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags,
-                           std::set<MVertex *, MVertexLessThanLexicographic>  &pos)
+                                    std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges,
+                                    std::set<std::pair<MVertex*,MVertex*> > &forbidden_edges,
+                                    std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags,
+                                    MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -2400,7 +2362,7 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
   bool is_toroidal = IsInToroidalQuadToTri(reg_source);
   if( is_toroidal )
     root_face = findRootSourceFaceForFace(reg_source);
-  
+
   for( it = faces.begin(); it != faces.end(); it++ ){
     ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude;
     if( (*it) == root_face )
@@ -2451,26 +2413,27 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
 
       // take care of forbidden edges
       // test whether this surface is a lateral bounded by two quadtri regions.
-      // if so, and the other is not already meshed, 
-      // then don't make these forbidden.  This is worked out in a 
+      // if so, and the other is not already meshed,
+      // then don't make these forbidden.  This is worked out in a
       // lateral remesh later
       std::vector<GRegion *> adj_regions;
       int numNeighbors = 0;
       numNeighbors = GetNeighborRegionsOfFace((*it), adj_regions);
       int ind_notcurrent = adj_regions[0] == gr ? 1 : 0;
-      if( !( numNeighbors == 2 && adj_regions[0]->meshAttributes.extrude && adj_regions[1]->meshAttributes.extrude &&
-	  adj_regions[0]->meshAttributes.extrude->mesh.ExtrudeMesh && adj_regions[1]->meshAttributes.extrude->mesh.ExtrudeMesh &&
-	  adj_regions[0]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY  && adj_regions[1]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY &&
-	  adj_regions[0]->meshAttributes.extrude->mesh.QuadToTri && adj_regions[1]->meshAttributes.extrude->mesh.QuadToTri  &&
-	  IsSurfaceALateralForRegion(adj_regions[ind_notcurrent], *it) &&
-	  !adj_regions[ind_notcurrent]->getNumMeshElements() ) ){
-	for( unsigned int i = 0; i < (*it)->quadrangles.size(); i++){
+      if(!(numNeighbors == 2 && adj_regions[0]->meshAttributes.extrude && adj_regions[1]->meshAttributes.extrude &&
+           adj_regions[0]->meshAttributes.extrude->mesh.ExtrudeMesh && adj_regions[1]->meshAttributes.extrude->mesh.ExtrudeMesh &&
+           adj_regions[0]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY  &&
+           adj_regions[1]->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY &&
+           adj_regions[0]->meshAttributes.extrude->mesh.QuadToTri && adj_regions[1]->meshAttributes.extrude->mesh.QuadToTri  &&
+           IsSurfaceALateralForRegion(adj_regions[ind_notcurrent], *it) &&
+           !adj_regions[ind_notcurrent]->getNumMeshElements())){
+	for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++){
           std::vector<MVertex*> v;
 	  (*it)->quadrangles[i]->getVertices(v);
 	  createForbidden(v, forbidden_edges );
 	}
       }
-      
+
       // at this point, if there are no triangles, continue
       if( !(*it)->triangles.size() )
         continue;
@@ -2592,7 +2555,7 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
             }
             else if( !(*it)->quadrangles.size() )
               Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal in lateral surface %d.", (*it)->tag() );
-	  
+
             index_guess += 2;
              /*
 
@@ -2620,14 +2583,14 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
               else
                 createEdge( elemEdge_tmp.first, elemEdge_tmp.second, lat_tri_diags );
               */
-	  
+
           }
         }
       }
 
     }
   }
-    
+
   // Insert diagonals of the top surface into quadToTri_edges;
   unsigned int index_guess = reg_source->triangles.size();
   if( reg_top->quadrangles.size() && !is_toroidal ){
@@ -2636,27 +2599,25 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
     return false;
   }
 
-  for( unsigned int i = 0; i < reg_source->quadrangles.size(); i++){
+  for(unsigned int i = 0; i < reg_source->quadrangles.size(); i++){
     int j_top = ep->mesh.NbLayer-1;
     int k_top = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1];
-
     MElement *elem = reg_source->quadrangles[i];
     std::vector<MVertex *> verts;
-    get2DExtrudedVertices( elem, ep, j_top, k_top, pos, verts );
-    if( verts.size() != 4 ) break;
-    if( !is_toroidal ){
+    get2DExtrudedVertices(elem, ep, j_top, k_top, pos, verts);
+    if(verts.size() != 4) break;
+    if(!is_toroidal){
       // Find diagonal:
       std::pair<int,int> diag(0,0);
-      diag = FindDiagonalEdgeIndices( verts, reg_top, false, index_guess );
-      if( diag.first || diag.second )
-	createEdge( verts[diag.first], verts[diag.second], quadToTri_edges );
+      diag = FindDiagonalEdgeIndices(verts, reg_top, false, index_guess);
+      if(diag.first || diag.second)
+	createEdge( verts[diag.first], verts[diag.second], quadToTri_edges);
       else
-	  Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on top surface %d, but should have.", reg_top->tag() );
+        Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on top surface %d, but should have.", reg_top->tag() );
       index_guess += 2;
     }
     else
       createForbidden(verts, forbidden_edges);
-
   }
   return true;
 }
@@ -2665,16 +2626,14 @@ static bool QuadToTriGetRegionDiags(GRegion *gr,
 // For use in QuadToTriEdgeGenerator:  Controls BRUTE FORCE edging of elements with ALL vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
-                                               CategorizedSourceElements &cat_src_elems,
-                                               std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                               std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                               std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                               std::map<MElement*, std::set<std::pair<unsigned int,
-                                                        unsigned int> > > &problems,
-                                               std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int makeEdgesForElemsWithAllVertsOnBnd(GRegion *gr, bool is_addverts,
+                                              CategorizedSourceElements &cat_src_elems,
+                                              std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                              std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+                                              std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                                              std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                              MVertexRTree &pos)
 {
-
   ExtrudeParams *ep = gr->meshAttributes.extrude;
 
   if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){
@@ -2685,29 +2644,29 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
   }
 
   GModel *model = gr->model();
-  if( !model ){
+  if(!model){
     Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), invalid model for region "
                "%d.", gr->tag() );
     return 0;
   }
 
-  GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) );
-  if( !reg_source  ){
+  GFace *reg_source = model->getFaceByTag(std::abs(ep->geo.Source));
+  if(!reg_source){
     Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), invalid source face for region "
-               "%d.", gr->tag() );
+               "%d.", gr->tag());
     return 0;
   }
 
-  if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){
-    Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), too many elements in the CategorizedSourceElements "
-               " structure for given source face %d.", reg_source->tag() );
+  if(gr != cat_src_elems.region || reg_source != cat_src_elems.source_face){
+    Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), too many elements in the "
+               "CategorizedSourceElements structure for given source face %d.",
+               reg_source->tag());
     return 0;
   }
 
   // find edge verts of source face
-  std::set<MVertex *, MVertexLessThanLexicographic> pos_src_edge;
-  QuadToTriInsertFaceEdgeVertices(reg_source, pos_src_edge );
-
+  MVertexRTree pos_src_edge(CTX::instance()->geom.tolerance * CTX::instance()->lc);
+  QuadToTriInsertFaceEdgeVertices(reg_source, pos_src_edge);
 
   // while Loop to diagonalize 3-boundary point triangles and 4-boundary point quadrangles:
   bool finish_all_tri = false;
@@ -2808,7 +2767,7 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
             }
 
             if( !s ){
-              face_types = getFaceTypes( gr, elem, j, k, verts, pos_src_edge, quadToTri_edges,
+              face_types = getFaceTypes( gr, elem, j, k, verts, quadToTri_edges,
                                          forbidden_edges, lat_tri_diags, vert_bnd, nfix1, nfix2,
                                          nadj1, nadj2, free_flag);
 
@@ -2854,14 +2813,14 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
                     problems.erase( elem );
                   break;
                 }
-                face_types = getFaceTypes( gr, elem, j, k, verts, pos_src_edge, quadToTri_edges,
-                                           forbidden_edges, lat_tri_diags, vert_bnd, nfix1, nfix2,
-                                           nadj1, nadj2, free_flag);
-
-                bruteForceEdgeQuadToTriHexa( gr, elem, j, k, verts, face_types, edges_new,
-                                             forbidden_new, quadToTri_edges, forbidden_edges,
-                                             lat_tri_diags, problems_new, problems, pos, nfix1, nfix2,
-                                             nadj1, nadj2, free_flag);
+                face_types = getFaceTypes(gr, elem, j, k, verts, quadToTri_edges,
+                                          forbidden_edges, lat_tri_diags, vert_bnd, nfix1, nfix2,
+                                          nadj1, nadj2, free_flag);
+
+                bruteForceEdgeQuadToTriHexa(gr, elem, j, k, verts, face_types, edges_new,
+                                            forbidden_new, quadToTri_edges, forbidden_edges,
+                                            lat_tri_diags, problems_new, problems, nfix1, nfix2,
+                                            nadj1, nadj2, free_flag);
               }
               //IMPORTANT
               num_edged++;
@@ -2903,21 +2862,18 @@ static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_addverts,
 
   return 1;
 
-}  // end of makeEdgesForElemsWithAllVertsOnBnd
-
-
+}
 
 
 // For use in QuadToTriEdgeGenerator:  Does the edging of prisms with some but not all vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
-                                       std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                       std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                       std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                       std::map<MElement*, std::set<std::pair<unsigned int,
-                                                unsigned int> > > &problems,
-                                       std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int makeEdgesForOtherBndPrisms(GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
+                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                      std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+                                      std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                      MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -3031,20 +2987,18 @@ static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_addverts, Categorize
 
   return 1;
 
-}  // end of makeEdgesForOtherBndPrisms()
-
+}
 
 
 // For use in QuadToTriEdgeGenerator:  Does the edging of hexahedra with some but not all vertices
 // on a lateral boundary surface.
 // Added 04/08/2011
-static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
-                                     std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                     std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                     std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                     std::map<MElement*, std::set<std::pair<unsigned int,
-                                              unsigned int> > > &problems,
-                                     std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int makeEdgesForOtherBndHexa(GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
+                                    std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                    std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+                                    std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                                    std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                    MVertexRTree &pos)
 {
 
   // Edge creation for extruded quadrangles with some but not all vertices on a boundary.
@@ -3276,9 +3230,9 @@ static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_addverts, CategorizedS
       createEdge( verts[skip+elem_size], verts[(skip+2)%elem_size+elem_size], quadToTri_edges );
       createEdge( verts[skip+elem_size], verts[(skip+2)%elem_size+elem_size], edges_new );
       // copies the diags in edges_new on up the extrusion but NOT on the top surface
-      ExtrudeDiags( gr, verts, j_start, k_start, j_top_start, k_top_start,
-                    elem, ep, edges_new, forbidden_new,
-                    quadToTri_edges, forbidden_edges, problems_new, problems, pos);
+      ExtrudeDiags(gr, verts, j_start, k_start, j_top_start, k_top_start,
+                   elem, ep, edges_new, forbidden_new,
+                   quadToTri_edges, forbidden_edges, problems_new, problems, pos);
     }
 
     // finally, top diagonal and other two laterals for 1 bnd point quad
@@ -3355,18 +3309,18 @@ static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_addverts, CategorizedS
 
   return 1;
 
-} // end of makeEdgesForOtherBndHexa()
+}
 
 
 // For use in QuadToTriEdgeGenerator:  Does the lateral edging of internal elements that touch
 // a pivot vertex of a hexahedral element that has ONE SOURCE vertex on a lateral boundary surface.
 // See inside function for a definition of the "pivot vertex."
 // Added 04/08/2011
- static int makeEdgesForElemsTouchPivotVert( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
-                                       std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                       std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
-                                       std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
-                                       std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int makeEdgesForElemsTouchPivotVert(GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
+                                           std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                           std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
+                                           std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges,
+                                           MVertexRTree &pos)
 {
 
   //  Draw diagonals toward the "pivot vertex" of a hexahedron whose source quad has only one
@@ -3582,15 +3536,15 @@ static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_addverts, CategorizedS
 
   return 1;
 
-}  // end of makeEdgesForElemsTouchPivotVert()
+}
 
 
 // For use in QuadToTriEdgeGenerator:  Does the lateral edging of internal elements in the top extrusion
 // layer by lowest vertex pointer value in TOP FACE.
 // Added 04/08/2011
-static int makeEdgesInternalTopLayer( GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
-                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                      std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static int makeEdgesInternalTopLayer(GRegion *gr, bool is_addverts, CategorizedSourceElements &cat_src_elems,
+                                     std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                     MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -3673,7 +3627,7 @@ static int makeEdgesInternalTopLayer( GRegion *gr, bool is_addverts, Categorized
 
   return 1;
 
-} // End of makeEdgesInternalTopLayer()
+}
 
 
 // Generate the set of QuadToTri diagonal edges to subdivide elements,
@@ -3683,7 +3637,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
                            std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
                            std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags,
                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                           std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+                           MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -3702,7 +3656,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
     return 0;
   }
 
-  
+
   // number of extrusion layers
   int num_layers = 0;
   for( int p = 0; p < ep->mesh.NbLayer; p++ )
@@ -3725,8 +3679,8 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
   // need for toroidal loop extrusions...top layer treated specially
   bool is_toroidal = IsInToroidalQuadToTri(reg_source);
-  
-  
+
+
   std::list<GFace *> reg_faces = gr->faces();
   std::list<GFace *>::iterator itf = reg_faces.begin();
 
@@ -3744,9 +3698,9 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
       foundRoot = true;
     if( reg_top && (foundRoot || !is_toroidal) )
       break;
-    
+
   }
-  
+
   if( is_toroidal && !reg_top && foundRoot && root != reg_source )
     reg_top = root;
   if( !reg_top ){
@@ -3760,7 +3714,7 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
   // insert ALL fixed edges into quadToTri_edges, all forbidden edges on recombined quads
   // into forbidden_edges, and insert into lat_tri_diags ALL lateral diagonal edges.
-  QuadToTriGetRegionDiags( gr, quadToTri_edges, forbidden_edges, lat_tri_diags, pos );
+  QuadToTriGetRegionDiags( gr, quadToTri_edges, forbidden_edges, lat_tri_diags, pos);
   /*unsigned int Rnum = gr->tag()-1;
   std::vector<MVertex*> verts;
   MElement *elem;
@@ -3827,21 +3781,21 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
   // BRUTE FORCE diagonalization of elements with all vertices on a lateral boundary of region:
   // This has to be done for all cases with such elements if
-  if( !makeEdgesForElemsWithAllVertsOnBnd( gr, is_addverts, cat_src_elems, quadToTri_edges,
-                                           lat_tri_diags, forbidden_edges, problems, pos ) ){
-     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the elements in region %d "
-                "with all vertices on a lateral boundary", gr->tag() );
-     return 0;
+  if(!makeEdgesForElemsWithAllVertsOnBnd(gr, is_addverts, cat_src_elems, quadToTri_edges,
+                                         lat_tri_diags, forbidden_edges, problems, pos)){
+    Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the elements in region %d "
+               "with all vertices on a lateral boundary", gr->tag());
+    return 0;
   }
 
   // now do the "elegant" diagonalization of all the rest of the surface elements....
 
 
   // Extrude source triangles that are on the source boundary edges and find any diagonals
-  if( !makeEdgesForOtherBndPrisms( gr, is_addverts, cat_src_elems, quadToTri_edges,
-                                   lat_tri_diags, forbidden_edges, problems, pos ) ){
+  if(!makeEdgesForOtherBndPrisms(gr, is_addverts, cat_src_elems, quadToTri_edges,
+                                 lat_tri_diags, forbidden_edges, problems, pos)){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the prism extrusions in region %d with "
-               "source triangles having some but not all vertices on the boundary", gr->tag() );
+               "source triangles having some but not all vertices on the boundary", gr->tag());
     return 0;
   }
 
@@ -3854,8 +3808,8 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
 
   // Edge creation for extruded quadrangles with some but not all vertices on a boundary.
-  if( !makeEdgesForOtherBndHexa( gr, is_addverts, cat_src_elems, quadToTri_edges,
-                                 lat_tri_diags, forbidden_edges, problems, pos ) ){
+  if(!makeEdgesForOtherBndHexa(gr, is_addverts, cat_src_elems, quadToTri_edges,
+                               lat_tri_diags, forbidden_edges, problems, pos)){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the hexahedral extrusions in region %d with "
                "source quads having some but not all vertices on the boundary", gr->tag() );
     return 0;
@@ -3865,8 +3819,8 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
   // Find diagonals for elements touching a "pivot vertex" of a hexa element that has
   // a source quad with only one vertex on a lateral boundary (see inside makeEdgesForOtherBndHexa() and
   // makeEdgesForElemsTouchingPivotVert() for details of "pivot vertex".
-  if( !makeEdgesForElemsTouchPivotVert( gr, is_addverts, cat_src_elems, quadToTri_edges,
-                                        lat_tri_diags, forbidden_edges, pos ) ){
+  if(!makeEdgesForElemsTouchPivotVert(gr, is_addverts, cat_src_elems, quadToTri_edges,
+                                      lat_tri_diags, forbidden_edges, pos)){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for "
                "the elements in region %d touching a \'pivot vertex\' of a "
                "hexa element with source quad having one vertex on a boundary.", gr->tag() );
@@ -3875,20 +3829,20 @@ int QuadToTriEdgeGenerator(GRegion *gr,  CategorizedSourceElements &cat_src_elem
 
   // Mesh internal elements in the top layer (just add lateral diagonals for the
   // Do this by lowest pointer in top surface
-  if( !is_toroidal && !makeEdgesInternalTopLayer( gr, is_addverts, cat_src_elems, quadToTri_edges, pos ) ){
+  if(!is_toroidal && !makeEdgesInternalTopLayer(gr, is_addverts, cat_src_elems, quadToTri_edges, pos)){
     Msg::Error("In QuadToTriEdgeGenerator(), failed to make internal edges "
-               "in top extrusion layer of region %d.", gr->tag() );
+               "in top extrusion layer of region %d.", gr->tag());
     return 0;
   }
 
   return 1;
 
-}  // End of QuadToTriEdgeGenerator()
+}
 
 
 // Remesh the lateral 2D faces of QuadToTri regions using edges in quadToTri_edges as contraints
 // Added 2010-01-24
-static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges )
+static bool QuadToTriLateralRemesh(GRegion *gr, std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -3912,10 +3866,10 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
   // If shared laterals are all static (quad or non subdivide triangles),
   // set the allStaticSharedLaterals argument to true.
   // If any lateral is unstructured, error.
-  
+
   bool is_toroidal = IsInToroidalQuadToTri(reg_source);
   GFace *root = findRootSourceFaceForFace(reg_source);
-  
+
   bool foundTop = false, foundRoot = false;
   GFace *reg_top = NULL;
   std::list<GFace *> faces = gr->faces();
@@ -3973,11 +3927,11 @@ static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVe
 
 
 // Adds the face- or body-center vertices needed for some QuadToTri elements
-static bool addBodyCenteredVertices( GRegion *to, CategorizedSourceElements &c,
-                                           std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                           std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                           bool is_addverts, unsigned int lat_tri_diags_size,
-                                           std::set<MVertex *, MVertexLessThanLexicographic> &pos )
+static bool addBodyCenteredVertices(GRegion *to, CategorizedSourceElements &c,
+                                    std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                    std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                    bool is_addverts, unsigned int lat_tri_diags_size,
+                                    MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = to->meshAttributes.extrude;
@@ -4124,8 +4078,8 @@ static bool addBodyCenteredVertices( GRegion *to, CategorizedSourceElements &c,
 // Meshes either a prism or a hexahedral set of mesh vertices with an internal vertex
 // created here in the function.
 // Added 2010-03-30
-static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1,
-                                    std::vector<int> n2, std::set<MVertex *, MVertexLessThanLexicographic> &pos )
+static void MeshWithInternalVertex(GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1,
+                                   std::vector<int> n2, MVertexRTree &pos)
 {
 
   int v_size = v.size();
@@ -4148,24 +4102,18 @@ static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<M
 
   // find the internal vertex
   std::vector<double> centroid = QtFindVertsCentroid(v);
-  MVertex tmp(centroid[0], centroid[1], centroid[2], 0, -1);
 
   // it's too dangerous to use the 'new' command in here even with body-centered vertices.
 
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
-  itp = pos.find(&tmp);
-  if(itp == pos.end()){ // FIXME: workaround
-    Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-    itp = tmp.linearSearch(pos);
-  }
-  if(itp == pos.end()){
+  MVertex *tmp = pos.find(centroid[0], centroid[1], centroid[2]);
+  if(!tmp){
     Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d",
-                tmp.x(), tmp.y(), tmp.z(), to->tag());
+               centroid[0], centroid[1], centroid[2], to->tag());
     Msg::Error("MeshWithInternalVertex() failed to find body-centered vertex.");
     return;
   }
 
-  MVertex *v_int = (*itp);
+  MVertex *v_int = tmp;
 
   // build all pyramids/tetra
   for( int p = 0; p < n_lat; p++ ){
@@ -4213,161 +4161,15 @@ static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<M
 
 }
 
-// Meshes either a prism or a hexahedral set of mesh vertices with face centered vertices
-// Can pick top or bottom faces to have the vertex, or both, based on the top_flag and bottom_flag args.
-// created here in the code
-// Added 2010-04-05
-/*static void MeshWithFaceCenteredVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1,
-                                        std::vector<int> n2, bool bottom_flag, bool top_flag,
-                                        std::set<MVertex *, MVertexLessThanLexicographic> &pos )
-{
-
-  int v_size = v.size();
-  int n_lat_tmp;
-  if( v_size == 6 )
-    n_lat_tmp = 3;
-  else if( v_size == 8 )
-    n_lat_tmp = 4;
-  else{
-    Msg::Error("In MeshWithFaceCenteredVertex(), number of element vertices does not equal 6 or 8.");
-    return;
-  }
-
-  const int n_lat = n_lat_tmp;
-
-  if( !top_flag && !bottom_flag ){
-    Msg::Error("In MeshWithFaceCenteredVertex(), neither the top nor the bottom face were selected for vertex creation.");
-    return;
-  }
-
-  if( (n_lat == 3 && n1.size() != 3) || (n_lat == 4 && n2.size() != 6) ){
-    Msg::Error("In MeshWithFaceCenteredVertex(), size of diagonal node vectors is not does not equal 3 or 6.");
-    return;
-  }
-
-  std::vector<MVertex *> face_vertices;
-  // create the face-centered vertices
-  for( int s = 0; s < 2; s++ ){
-    if( (!s && !bottom_flag) || (s && !top_flag) )
-      continue;
-    std::vector<MVertex *> v_face;
-    v_face.assign(n_lat, (MVertex*)(NULL) );
-    int add = !s ? 0 : n_lat;
-    for( int t = 0; t < n_lat; t++ )
-      v_face[t] = v[t+add];
-
-    std::vector<double> centroid = QtFindVertsCentroid(v_face);
-    MVertex tmp(centroid[0], centroid[1], centroid[2], 0, -1);
-
-    // it's too dangerous to use the 'new' command in here on face-centered vertices.
-
-    std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
-    itp = pos.find(&tmp);
-    if(itp == pos.end()){ // FIXME: workaround
-      Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-      itp = tmp.linearSearch(pos);
-    }
-    if(itp == pos.end()){
-      Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d",
-                  tmp.x(), tmp.y(), tmp.z(), to->tag());
-      Msg::Error("MeshWithFaceCenteredVertex() failed to find face-centered vertex.");
-      return;
-    }
-
-    face_vertices.push_back(*itp);
-
-  }
-
-  // If just one face-centered vertex, make a pyramid/tetra (or base-divided pyramid )
-  // with the face-centered vertex as the apex. Fill in
-  // pyramids/tetra aroud it laterally.
-  if( face_vertices.size() == 1 ){
-    int base, add;
-    if( top_flag ){
-      base = n_lat;
-      add = 0;
-    }
-    else{
-      base = n_lat+1;
-      add = n_lat;
-    }
-    if( n_lat == 4 && n1[base] >= 0 ){
-      addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-add+1)%n_lat+add], face_vertices[0], to, source );
-      addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-add+n_lat-1)%n_lat+add], face_vertices[0], to, source );
-    }
-    else if( n_lat == 4 )
-      addPyramid( v[0+add], v[1+add], v[2+add], v[3+add], face_vertices[0], to, source );
-    else
-      addTetrahedron( v[0+add], v[1+add], v[2+add], face_vertices[0], to, source );
-
-    for( int p = 0; p < n_lat; p++ ){
-      int p2 = (p+1)%n_lat;
-      if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] )
-        continue;
-      else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){
-        MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2];
-        MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p];
-        MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat];
-        addTetrahedron( v_dup, v_non_dup, v_non_dup2, face_vertices[0], to, source );
-      }
-      else if( n1[p] >= 0 ){
-        int add_2 = n1[p] < n_lat ? n_lat : -n_lat;
-        addTetrahedron( v[n1[p]], v[n2[p]], v[n1[p]+add_2], face_vertices[0], to, source );
-        addTetrahedron( v[n1[p]], v[n2[p]], v[n2[p]-add_2], face_vertices[0], to, source );
-      }
-      else
-        addPyramid( v[p], v[p+n_lat], v[p2+n_lat], v[p2], face_vertices[0], to, source );
-    }
-    return;
-  }
-
-   // If two face-centered vertices, make prisms around the central axis formed by the face-centered vertices.
-  // Divide the prisms on the two inside faces to make the validity of the subdivision independent of the outer
-  // later surface states (diagonalized or not)
-  else if( face_vertices.size() == 2 ){
-    for( int p = 0; p < n_lat; p++ ){
-      int p2 = (p+1)%n_lat;
-      if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] ){
-        addTetrahedron( v[p], v[p2], face_vertices[0], face_vertices[1], to, source );
-      }
-      else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){
-        MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2];
-        MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p];
-        MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat];
-        addTetrahedron( v_non_dup, v_non_dup2, face_vertices[1], v_dup, to, source );
-        addTetrahedron( v_non_dup, face_vertices[0], face_vertices[1], v_dup, to, source );
-      }
-      else{
-        addTetrahedron( v[p], v[(p+1)%n_lat], face_vertices[1], face_vertices[0], to, source );
-        if( n1[p] >= 0 ){
-          int add_2 = n1[p] < n_lat ? n_lat : -n_lat;
-          addTetrahedron( v[n1[p]], v[n2[p]], v[n1[p]+add_2], face_vertices[1], to, source );
-          addTetrahedron( v[n1[p]], v[n2[p]], v[n2[p]-add_2], face_vertices[1], to, source );
-        }
-        else
-          addPyramid( v[p], v[p+n_lat], v[(p+1)%n_lat+n_lat], v[(p+1)%n_lat], face_vertices[1], to, source );
-      }
-    }
-    return;
-  }
-
-  // If execute to here, send error message
-  Msg::Error("MeshWithFaceCenteredVertex() failed. on region %d", to->tag() );
-
-}
-
-*/
-
-
 // Construct the elements that subdivide a prism (or degenerated prism)  in a QuadToTri interface;
 // Added 2010-01-24
 static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int j,
-                              int k, MElement* source,
-                              std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                              std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                              std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+                                      int k, MElement* source,
+                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
+                                      MVertexRTree &pos)
 {
   int dup[3];
   int m = 0;
@@ -4422,7 +4224,7 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int
   // mesh with added internal body centered vertex
   // is this prism part of a QuadToTri internal vertex extrusion and does it need to be extruded as such?
   if( is_addverts && bnd_elem && found_diags ){
-    MeshWithInternalVertex( to, source, v, n1, n2, pos );
+    MeshWithInternalVertex( to, source, v, n1, n2, pos);
     return;
   }
 
@@ -4486,32 +4288,28 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int
                " be divided without internal vertex, but was not previously detected as such. "
                " This is a bug. Please Report.");
     Msg::Error("j: %d, k: %d", j, k);
-    QtMakeCentroidVertex( v, &(to->mesh_vertices), to, pos );
+    QtMakeCentroidVertex( v, &(to->mesh_vertices), to, pos);
     std::pair<unsigned int, unsigned int> jk_pair(j,k);
     problems_new[source].insert(jk_pair);
     is_problem = true;
   }
 
   if( is_problem ){
-    MeshWithInternalVertex( to, source, v, n1, n2, pos );
+    MeshWithInternalVertex( to, source, v, n1, n2, pos);
     return;
   }
 
-
-
 }
 
 
 // Construct the elements that subdivde a two-point degenerated hexahedron (prism).
-static inline bool createTwoPtDegenHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
-                                      int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
-                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
-                                      std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static inline bool createTwoPtDegenHexElems(std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
+                                            int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
+                                            std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                            unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags)
 {
-
   if( !ep )
     return 0;
 
@@ -4596,18 +4394,16 @@ static inline bool createTwoPtDegenHexElems( std::vector<MVertex*> &v, GRegion *
 
   return 0;
 
-}  // end of createTwoPtDegenHexElems()
-
+}
 
 
 // Construct the elements that subdivide a one-point degenerated hexahedron extrusion
-static inline bool createOnePtDegenHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
-                                      int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
-                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
-                                      std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static inline bool createOnePtDegenHexElems(std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
+                                            int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
+                                            std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                            std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                            unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags)
 {
 
   if( !ep )
@@ -4838,23 +4634,20 @@ static inline bool createOnePtDegenHexElems( std::vector<MVertex*> &v, GRegion *
 
   return 0;
 
-}  // end of createOnePtDegenHexElems()
+}
 
 
 // Construct the elements that subdivide a full hexahedron extrusion.
-static inline bool createFullHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
-                                int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
-                                std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                                std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                                unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags,
-                                std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+static inline bool createFullHexElems(std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j,
+                                      int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2,
+                                      std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                      std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                      unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool found_diags)
 {
-
   if( !ep )
     return 0 ;
 
-
   // First: does this hexa have ANY dividing diagonals? If no, return
   if( !found_diags ){
      addHexahedron( v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], to, source );
@@ -5236,17 +5029,17 @@ static inline bool createFullHexElems( std::vector<MVertex*> &v, GRegion *to, Ex
 
   return 0;  // if exhaust possibilities, default to this
 
-}  // end of createFullHexElems()
+}
 
 
 // Overall function that creates the elements that subdivide any whole element extruded from a quadrangle.
 static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
-                              int k, MElement* source,
-                              std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
-                              std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
-                              std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
-                              unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+                                   int k, MElement* source,
+                                   std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges,
+                                   std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems,
+                                   std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new,
+                                   unsigned int lat_tri_diags_size, bool bnd_elem, bool is_addverts, bool diag_search,
+                                   MVertexRTree &pos)
 {
 
   int dup[4];
@@ -5270,7 +5063,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
 
   ExtrudeParams *ep = to->meshAttributes.extrude;
 
-  
+
   // variables to hold of each faces's diagonal vertex nodes
   bool found_diags = false;
   std::vector<int> n1, n2;
@@ -5315,7 +5108,7 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
 
   // Divide by new internal vertex extrusion method?
   if( is_addverts && ( found_diags || m==1 ) ){
-    MeshWithInternalVertex( to, source, v, n1, n2, pos );
+    MeshWithInternalVertex( to, source, v, n1, n2, pos);
     return;
   }
 
@@ -5323,46 +5116,46 @@ static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j,
   // The of the possibilites are for a 'no new vertex' extrusion
 
   // PRISM
-  else if( m == 2 && !is_problem ){
-    if( createTwoPtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                                  problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
+  else if(m == 2 && !is_problem){
+    if(createTwoPtDegenHexElems(v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
+                                problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags))
       return;
   }
 
   // DEGENERATE HEXAHEDRON
-  else if( m == 1 && !is_problem ){
-    if( createOnePtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                                  problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
+  else if(m == 1 && !is_problem){
+    if(createOnePtDegenHexElems(v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
+                                problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags))
       return;
   }
 
 
   // FULL HEXAHEDRON
-  else if( !is_problem ){
-    if( createFullHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
-                            problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags, pos ) )
+  else if(!is_problem){
+    if(createFullHexElems(v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems,
+                          problems_new, lat_tri_diags_size, bnd_elem, is_addverts, found_diags))
       return;
   }
 
   // now take care of unexpected failure to divide without internal vertex
-  if( !is_problem ) {
+  if(!is_problem) {
     Msg::Error("In QuadToTriHexPri(), Extruded hexahedron needs subdivision, but cannot "
                " be divided without internal vertex, and was not previously detected as such. "
                " This is a bug. Please Report.");
     Msg::Error("j: %d, k: %d", j, k);
-    QtMakeCentroidVertex( v, &(to->mesh_vertices), to, pos );
+    QtMakeCentroidVertex(v, &(to->mesh_vertices), to, pos);
     std::pair<unsigned int, unsigned int> jk_pair(j,k);
     problems_new[source].insert(jk_pair);
     is_problem = true;
   }
 
   // Mesh with internal vertex
-  if( is_problem ){
-    MeshWithInternalVertex( to, source, v, n1, n2, pos );
+  if(is_problem){
+    MeshWithInternalVertex(to, source, v, n1, n2, pos);
     return;
   }
 
-}  // end of QuadToTriPriPyrTet()
+}
 
 // reserves approximately the right amount of memory for quadToTri extrusions
 // in the element vectors in the region 'to'
@@ -5412,10 +5205,10 @@ static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from,  bool i
 */
 
 // displays for the user a list of the body centered vertices created for problem elements.
-static void listBodyCenteredVertices( GRegion *to, bool is_addverts,
-                                      std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems,
-                                      std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems_new,
-                                      std::set<MVertex*, MVertexLessThanLexicographic> *pos )
+static void listBodyCenteredVertices(GRegion *to, bool is_addverts,
+                                     std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems,
+                                     std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems_new,
+                                     MVertexRTree *pos)
 {
 
   ExtrudeParams *ep = to->meshAttributes.extrude;
@@ -5467,8 +5260,8 @@ static void listBodyCenteredVertices( GRegion *to, bool is_addverts,
           std::set<std::pair<unsigned int, unsigned int> >::iterator itset;
           for( itset = itmap->second.begin(); itset != itmap->second.end(); itset++ ){
             std::vector<MVertex *> verts;
-            getExtrudedVertices( itmap->first, ep, (*itset).first,
-                                 (*itset).second, (*pos), verts);
+            getExtrudedVertices(itmap->first, ep, (*itset).first,
+                                (*itset).second, (*pos), verts);
             // find centroid
             std::vector<double> centroid = QtFindVertsCentroid(verts);
             int_verts_count2++;
@@ -5486,10 +5279,10 @@ static void listBodyCenteredVertices( GRegion *to, bool is_addverts,
 // Function that makes all the elements in a QuadToTri region, both
 // the divided elements and the whole elements, using already-created subdivision edges.
 bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_elems,
-                            std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges,
-                            std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags,
-                            std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > &problems,
-                            std::set<MVertex *, MVertexLessThanLexicographic>  &pos)
+                             std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges,
+                             std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags,
+                             std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > &problems,
+                             MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = to->meshAttributes.extrude;
@@ -5550,8 +5343,8 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
 
 
   // Make the extra vertices needed for Some QuadToTri elements
-  if( !addBodyCenteredVertices( to, cat_src_elems, quadToTri_edges, problems, is_addverts,
-                                      lat_tri_diags_size, pos ) ){
+  if(!addBodyCenteredVertices(to, cat_src_elems, quadToTri_edges, problems, is_addverts,
+                              lat_tri_diags_size, pos)){
     Msg::Error("QuadToTriCreateElements() could not add face or body vertices for QuadToTri region %d.", to->tag() );
     return false;
   }
@@ -5590,10 +5383,10 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
         for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) {
           // keeps old allocation
           verts.resize(0);
-          if( getExtrudedVertices(elem, ep, j, k, pos, verts) == 6 ){
-            QuadToTriPriPyrTet( verts, to, j, k, elem, quadToTri_edges,
+          if(getExtrudedVertices(elem, ep, j, k, pos, verts) == 6){
+            QuadToTriPriPyrTet(verts, to, j, k, elem, quadToTri_edges,
                                problems, problems_new, lat_tri_diags_size,
-                               bnd_elem, is_addverts, 1, pos );
+                               bnd_elem, is_addverts, 1, pos);
           }
         }
       }
@@ -5637,7 +5430,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
           for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) {
             // keeps old allocation
             verts.resize(0);
-            if(getExtrudedVertices(elem, ep, j, k, pos, verts) == 8 ){
+            if(getExtrudedVertices(elem, ep, j, k, pos, verts) == 8){
               QuadToTriHexPri(verts, to, j, k, elem, quadToTri_edges,
                               problems, problems_new, lat_tri_diags_size,
                               bnd_elem, is_addverts, 1, pos);
@@ -5655,8 +5448,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
   }
 
   // List for the user any elements with internal vertices:
-  listBodyCenteredVertices( to, is_addverts, &problems, &problems_new, &pos );
-
+  listBodyCenteredVertices(to, is_addverts, &problems, &problems_new, &pos);
 
   // Now revert any elements that have positive  volume.
   // Does this even need to be done?
@@ -5699,7 +5491,7 @@ bool QuadToTriCreateElements(GRegion *to,  CategorizedSourceElements &cat_src_el
 
 // Mesh QuadToTri region from extrudeMesh() in meshGRegionExtruded.cpp
 // Added 04/08/2011:
-int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+int meshQuadToTriRegion(GRegion *gr, MVertexRTree &pos)
 {
   // Perform some checks to see if this is a valid QuadToTri region.
   // If so, a decision has to be made: if this surface is NOT laterally adjacent to
@@ -5747,14 +5539,14 @@ int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicogr
       return 0;
     }
 
-    if( !QuadToTriEdgeGenerator( gr, cat_src_elems, quadToTri_edges,
-                                 lat_tri_diags, problems, pos) ){
+    if(!QuadToTriEdgeGenerator(gr, cat_src_elems, quadToTri_edges,
+                               lat_tri_diags, problems, pos)){
       Msg::Error("In meshQuadToTriRegion(), failed to create edges for QuadToTri "
                  "region %d.", gr->tag() );
       return 0;
     }
-    if( !QuadToTriCreateElements( gr, cat_src_elems, quadToTri_edges,
-                                  lat_tri_diags, problems, pos) ){
+    if(!QuadToTriCreateElements(gr, cat_src_elems, quadToTri_edges,
+                                lat_tri_diags, problems, pos)){
       Msg::Error("In meshQuadToTriRegion, failed to create elements for QuadToTri "
                  "region %d.", gr->tag() );
       return 0;
@@ -5773,8 +5565,8 @@ int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicogr
 // The function that is called from meshGRegionExtruded.cpp to mesh QuadToTri regions
 // that are adjacent to subdivided regions, after the global Subdivide command is called.
 // Added 04/08/11.
-int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > *edges,
-                                            std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+int meshQuadToTriRegionAfterGlobalSubdivide(GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > *edges,
+                                            MVertexRTree &pos)
 {
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -5835,16 +5627,16 @@ int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVe
   }
 
   // Mesh quadToTri
-  if( !QuadToTriEdgeGenerator( gr, cat_src_elems, quadToTri_edges,
-                              lat_tri_diags, problems, pos ) ){
+  if(!QuadToTriEdgeGenerator(gr, cat_src_elems, quadToTri_edges,
+                             lat_tri_diags, problems, pos)){
     Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), edge generation failed for QuadToTri "
                "region %d.", gr->tag() );
     return 0;
   }
-  if( !QuadToTriCreateElements( gr, cat_src_elems, quadToTri_edges,
-                               lat_tri_diags, problems, pos ) ){
+  if(!QuadToTriCreateElements(gr, cat_src_elems, quadToTri_edges,
+                              lat_tri_diags, problems, pos)){
     Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), element creation failed for QuadToTri "
-               "region %d.", gr->tag() );
+               "region %d.", gr->tag());
     return 0;
   }
 
@@ -5853,4 +5645,4 @@ int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVe
   return 1;
 
 
-}  // end of meshQuadToTriRegionAfterGlobalSubdivide()
+}
diff --git a/Mesh/QuadTriExtruded3D.h b/Mesh/QuadTriExtruded3D.h
index c7efd0e..6bb19b6 100644
--- a/Mesh/QuadTriExtruded3D.h
+++ b/Mesh/QuadTriExtruded3D.h
@@ -1,36 +1,37 @@
-/************************************************************************************************** 
+/********************************************************************************
 QuadTriExtruded3D.h
 
 The code in this file was written by Dr. Trevor S. Strickler.
-email: <trevor.strickler at gmail.com> 
+email: <trevor.strickler at gmail.com>
 
-This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements. 
+This file is part of the QuadTri contribution to Gmsh. QuadTri allows the
+conformal interface of quadrangle faces to triangle faces using pyramids and
+other mesh elements.
 
-See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
+See READMEQUADTRI.txt for more information. The license information is in
+LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to 
-Christophe Geuzaine and J.-F. Remacle with the understanding that 
-his contribution shall be cited appropriately.
+Trevor S. Strickler hereby transfers copyright of QuadTri files to Christophe
+Geuzaine and J.-F. Remacle with the understanding that his contribution shall be
+cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-Gmsh is available at: www.geuz.org/gmsh
+All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine,
+J.-F. Remacle Gmsh is available at: www.geuz.org/gmsh
 
-For Gmsh license information, see the LICENSE.txt file for license information. Please report all
-Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
+For Gmsh license information, see the LICENSE.txt file for license
+information. Please report all Gmsh bugs and problems to the public mailing list
+<gmsh at geuz.org>.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option) 
-any later version, with or without the exception given in the 
-LICENSE.txt file supplied with this code and with Gmsh.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License, Version 2, as published by the Free
+Software Foundation, or (at your option) any later version, with or without the
+exception given in the LICENSE.txt file supplied with this code and with Gmsh.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
-****************************************************************************************************/
+********************************************************************************/
 
 #if !defined( _QTEXTR3D_H_ )
 #define _QTEXTR3D_H_
@@ -59,21 +60,20 @@ GNU General Public License for more details.
 #include <math.h>
 #include "QuadTriUtils.h"
 
-// Determines whether the region is a valid QuadToTri region.  Performs some 
-// basic checks, including whether there is a valid top, valid source,
-// and that the surfaces serving as laterals are structured 
-// Added 2010-12-30
+// Determines whether the region is a valid QuadToTri region.  Performs some
+// basic checks, including whether there is a valid top, valid source, and that
+// the surfaces serving as laterals are structured Added 2010-12-30
 bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals);
 
-// Mesh QuadToTri region from extrudeMesh() from meshGRegionExtruded.cpp.
-// Added 04/08/2011:
-int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicographic> &pos );
-
-// The function that is called from meshGRegionExtruded.cpp to mesh QuadToTri regions
-// that are adjacent to subdivided regions, after the global Subdivide command is called.
-// Added 04/08/11.
-int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > *edges,
-                                            std::set<MVertex*, MVertexLessThanLexicographic> &pos );
+// Mesh QuadToTri region from extrudeMesh() from meshGRegionExtruded.cpp.  Added
+// 04/08/2011:
+int meshQuadToTriRegion(GRegion *gr, MVertexRTree &pos);
 
+// The function that is called from meshGRegionExtruded.cpp to mesh QuadToTri
+// regions that are adjacent to subdivided regions, after the global Subdivide
+// command is called.  Added 04/08/11.
+int meshQuadToTriRegionAfterGlobalSubdivide(GRegion *gr,
+                                            std::set<std::pair<MVertex*, MVertex*> > *edges,
+                                            MVertexRTree &pos);
 
 #endif
diff --git a/Mesh/QuadTriTransfinite3D.cpp b/Mesh/QuadTriTransfinite3D.cpp
index 3a262bf..b0b9d54 100644
--- a/Mesh/QuadTriTransfinite3D.cpp
+++ b/Mesh/QuadTriTransfinite3D.cpp
@@ -13,7 +13,7 @@ Trevor S. Strickler hereby transfers copyright of QuadTri files to
 Christophe Geuzaine and J.-F. Remacle with the understanding that
 his contribution shall be cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+All reused or original Gmsh code is Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 Gmsh is available at: www.geuz.org/gmsh
 
 For Gmsh license information, see the LICENSE.txt file for license information. Please report all
diff --git a/Mesh/QuadTriTransfinite3D.h b/Mesh/QuadTriTransfinite3D.h
index 889f742..76056b0 100644
--- a/Mesh/QuadTriTransfinite3D.h
+++ b/Mesh/QuadTriTransfinite3D.h
@@ -13,7 +13,7 @@ Trevor S. Strickler hereby transfers copyright of QuadTri files to
 Christophe Geuzaine and J.-F. Remacle with the understanding that 
 his contribution shall be cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+All reused or original Gmsh code is Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 Gmsh is available at: www.geuz.org/gmsh
 
 For Gmsh license information, see the LICENSE.txt file for license information. Please report all
diff --git a/Mesh/QuadTriUtils.cpp b/Mesh/QuadTriUtils.cpp
index ff34f06..0ddfdd3 100644
--- a/Mesh/QuadTriUtils.cpp
+++ b/Mesh/QuadTriUtils.cpp
@@ -1,65 +1,41 @@
-/**************************************************************************************************
+/*******************************************************************************
 QuadTriUtils.cpp
 
 The code in this file was written by Dr. Trevor S. Strickler.
 email: <trevor.strickler at gmail.com>
 
-This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements.
+This file is part of the QuadTri contribution to Gmsh. QuadTri allows the
+conformal interface of quadrangle faces to triangle faces using pyramids and
+other mesh elements.
 
-See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
+See READMEQUADTRI.txt for more information. The license information is in
+LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to
-Christophe Geuzaine and J.-F. Remacle with the understanding that
-his contribution shall be cited appropriately.
+Trevor S. Strickler hereby transfers copyright of QuadTri files to Christophe
+Geuzaine and J.-F. Remacle with the understanding that his contribution shall be
+cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
-Gmsh is available at: www.geuz.org/gmsh
+All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine,
+J.-F. Remacle Gmsh is available at: www.geuz.org/gmsh
 
-For Gmsh license information, see the LICENSE.txt file for license information. Please report all
-Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
+For Gmsh license information, see the LICENSE.txt file for license
+information. Please report all Gmsh bugs and problems to the public mailing list
+<gmsh at geuz.org>.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option)
-any later version, with or without the exception given in the
-LICENSE.txt file supplied with this code and with Gmsh.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License, Version 2, as published by the Free
+Software Foundation, or (at your option) any later version, with or without the
+exception given in the LICENSE.txt file supplied with this code and with Gmsh.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
-****************************************************************************************************/
+********************************************************************************/
 #include <stdlib.h>
 #include "QuadTriUtils.h"
 
 
-// This is a member function for the element map in ExtrudeParams.
-// This allows insertion of a whole vector at once.
-/*void ExtrudeParams::
-ExtrusionElementMap::addExtrudedElemVector(MElement* source, std::vector<MElement*> *extrudedVector )
-{
-  std::map<MElement*,std::vector<MElement*> >::iterator it = _extrudedElements.find(source);
-
-  if(it != _extrudedElements.end()){
-    it->second.reserve(it->second.size()+extrudedVector->size());
-    it->second.insert(it->second.end(), extrudedVector->begin(), extrudedVector->end());
-  }
-  else {
-    int totalNbElems = 0;
-    for (int i = 0; i <_parent->mesh.NbLayer;i++)
-      totalNbElems += _parent->mesh.NbElmLayer[i];
-    unsigned int new_cap = totalNbElems > extrudedVector->size() ? totalNbElems : extrudedVector->size();
-    // automatically creates source key in map (single argument 'insert' is also logarithmic too, just like this).
-    std::vector<MElement*> *vec = &(_extrudedElements[source]);
-    vec->reserve( new_cap );
-    vec->insert( vec->end(), extrudedVector->begin(), extrudedVector->end());
-  }
-
-}*/
-
-
 // By Geuzaine, Remacle...
 static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3,
                         GFace *to)
@@ -68,17 +44,17 @@ static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3,
   to->triangles.push_back(newTri);
 }
 
-// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at 
+// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at
 // least one QuadToTri region...
 int IsInToroidalQuadToTri(GFace *face)
 {
-   if( !face )
+   if(!face)
      return false;
-   
+
    GModel *model = face->model();
-   
+
    bool is_toroidal = false, is_quadtri = false, is_noaddverts = false;
-   
+
    // Find the root face first...then step back through extrusions as far as can find
    // another structured region.  If there is a single quadtri region, and this is a torus that
    // extrudes back onto the root source surface, then return true.
@@ -86,7 +62,7 @@ int IsInToroidalQuadToTri(GFace *face)
    root_face = findRootSourceFaceForFace(face);
    unsigned int numRegions = 0;
    std::vector<GRegion*> adj_extruded_reg;
-   
+
    //find the two regions adjacent to the root face. If this is a structured torus, then both regions
    // should be structured extrusions and BOTH should have the same root face
    std::set<GRegion *, GEntityLessThan>::iterator itreg;
@@ -104,10 +80,10 @@ int IsInToroidalQuadToTri(GFace *face)
       // does face belong to region and if so is it a structured extrusion?
       std::list<GFace *> region_faces = std::list<GFace *>( region->faces() );
       if( std::find( region_faces.begin(), region_faces.end(), root_face ) !=
-	    region_faces.end() && region->meshAttributes.extrude && 
+	    region_faces.end() && region->meshAttributes.extrude &&
 	  region->meshAttributes.extrude->mesh.ExtrudeMesh &&
 	  region->meshAttributes.extrude->geo.Mode == EXTRUDED_ENTITY ){
-	
+
 	adj_extruded_reg.push_back(region);
 	numRegions++;
       }
@@ -115,9 +91,9 @@ int IsInToroidalQuadToTri(GFace *face)
 	continue;
     }
     // if there are two structured extruded regions adjacent to the root face,
-    // then find the one that is NOT extruded from the root directly.  Then follow this 
+    // then find the one that is NOT extruded from the root directly.  Then follow this
     // face as far as possible back to the source.
-    
+
     GRegion *last_region = 0;
     GFace *last_reg_source = 0;
     bool found_first = 0, found_last = 0;
@@ -125,12 +101,12 @@ int IsInToroidalQuadToTri(GFace *face)
       for( int ind = 0; ind <= 1; ind++ ){
 	ExtrudeParams *adj_ep = adj_extruded_reg[ind]->meshAttributes.extrude;
 	GFace *reg_source = 0;
-	
+
 	if( adj_ep && adj_ep->mesh.ExtrudeMesh ){
 	  reg_source = model->getFaceByTag(std::abs( adj_ep->geo.Source ) );
           if( adj_ep->mesh.QuadToTri ){
 	    is_quadtri = true;
-	    if( adj_ep->mesh.QuadToTri == QUADTRI_NOVERTS_1 || 
+	    if( adj_ep->mesh.QuadToTri == QUADTRI_NOVERTS_1 ||
 	        adj_ep->mesh.QuadToTri == QUADTRI_NOVERTS_1_RECOMB )
 	      is_noaddverts = true;
 	  }
@@ -153,7 +129,7 @@ int IsInToroidalQuadToTri(GFace *face)
       }
     }
 
-    //walk back around to beginning if possible 
+    //walk back around to beginning if possible
     if( last_region && found_first && found_last ){
       GFace *iter_face = last_reg_source;
       GFace *iter_source_face = 0;
@@ -164,7 +140,7 @@ int IsInToroidalQuadToTri(GFace *face)
 	counter++;
 	if( iter_face ){
 	  ExtrudeParams *iter_eps = iter_face->meshAttributes.extrude;
-	  if( iter_eps && iter_eps->mesh.ExtrudeMesh && 
+	  if( iter_eps && iter_eps->mesh.ExtrudeMesh &&
 	      iter_eps->geo.Mode == COPIED_ENTITY ){
 	    if( iter_eps->mesh.QuadToTri )
 	      is_quadtri = true;
@@ -192,7 +168,7 @@ int IsInToroidalQuadToTri(GFace *face)
 	}
       }
     }
-    
+
     // now return
     if( is_toroidal && is_quadtri ){
       if( !is_noaddverts )
@@ -209,37 +185,38 @@ void ReplaceBndQuadsInFace(GFace *face)
 {
   ExtrudeParams *ep = face->meshAttributes.extrude;
   bool is_struct = false;
-  if( (ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) ||
-      face->meshAttributes.method == MESH_TRANSFINITE  )
+  if((ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) ||
+     face->meshAttributes.method == MESH_TRANSFINITE)
     is_struct = true;
-  GFace *root_face = findRootSourceFaceForFace( face );
-  if( root_face == face ){
-    std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge;
+  GFace *root_face = findRootSourceFaceForFace(face);
+  if(root_face == face){
+    MVertexRTree pos_src_edge(CTX::instance()->geom.tolerance * CTX::instance()->lc);
     QuadToTriInsertFaceEdgeVertices(face, pos_src_edge);
-    std::vector<MQuadrangle*> quads2; 
+    std::vector<MQuadrangle*> quads2;
     //loop through source quads, if on boundary, delete them
     for(unsigned int i = 0; i < face->quadrangles.size(); i++){
       std::vector<MVertex*> verts;
       int num_verts = face->quadrangles[i]->getNumVertices();
       bool on_edge = false;
-      
-      for( int j = 0; j < num_verts; j++ )
+
+      for(int j = 0; j < num_verts; j++)
 	verts.push_back(face->quadrangles[i]->getVertex(j));
-      
-      for( int j = 0; j < num_verts; j++ ){
-	if( pos_src_edge.find( verts[j] ) != pos_src_edge.end() ){
+
+      for(int j = 0; j < num_verts; j++){
+	if(pos_src_edge.find(verts[j]->x(), verts[j]->y(), verts[j]->z())){
 	  on_edge = true;
 	  break;
 	}
       }
-      if( on_edge ){
+      if(on_edge){
 	delete face->quadrangles[i];
-	if( is_struct ){
-	  addTriangle( verts[0],verts[2], verts[3],face);
-	  addTriangle( verts[0],verts[1], verts[2],face);
+	if(is_struct){
+	  addTriangle(verts[0],verts[2], verts[3],face);
+	  addTriangle(verts[0],verts[1], verts[2],face);
 	}
 	else{
-	  // draw other diagonals to minimize difference in average edge length with diagonal length, in quadrature
+	  // draw other diagonals to minimize difference in average edge length
+	  // with diagonal length, in quadrature
 
 	  double mag_sq_ave = 0.0;
 	  for( int p = 0; p < 4; p++ ){
@@ -267,15 +244,12 @@ void ReplaceBndQuadsInFace(GFace *face)
     face->quadrangles.clear();
     face->quadrangles = quads2;
   }
-  
-}
 
+}
 
-// Insert all vertices on a region's source edge, including corners,
-// into pos_src_edge set.
-// Added 2010-01-09
-void QuadToTriInsertSourceEdgeVertices(GRegion *gr,
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge)
+// Insert all vertices on a region's source edge, including corners, into
+// pos_src_edge set.  Added 2010-01-09
+void QuadToTriInsertSourceEdgeVertices(GRegion *gr, MVertexRTree &pos_src_edge)
 {
   ExtrudeParams *ep = gr->meshAttributes.extrude;
   if(!ep || !ep->mesh.ExtrudeMesh || ep->geo.Mode != EXTRUDED_ENTITY){
@@ -284,45 +258,35 @@ void QuadToTriInsertSourceEdgeVertices(GRegion *gr,
     return;
   }
 
-
-  GFace *source_face = gr->model()->getFaceByTag( std::abs(ep->geo.Source) );
+  GFace *source_face = gr->model()->getFaceByTag(std::abs(ep->geo.Source));
 
   std::list<GEdge*> edges = source_face->edges();
   std::list<GEdge*>::iterator ite = edges.begin();
-  for(ite = edges.begin(); ite != edges.end(); ite++ ){
-    pos_src_edge.insert( (*ite)->mesh_vertices.begin(), (*ite)->mesh_vertices.end() );
-    pos_src_edge.insert( (*ite)->getBeginVertex()->mesh_vertices.begin(),
-                          (*ite)->getBeginVertex()->mesh_vertices.end() );
-    pos_src_edge.insert( (*ite)->getEndVertex()->mesh_vertices.begin(),
-                          (*ite)->getEndVertex()->mesh_vertices.end() );
+  for(ite = edges.begin(); ite != edges.end(); ite++){
+    pos_src_edge.insert((*ite)->mesh_vertices);
+    pos_src_edge.insert((*ite)->getBeginVertex()->mesh_vertices);
+    pos_src_edge.insert((*ite)->getEndVertex()->mesh_vertices);
   }
 }
 
-// Insert all vertices on a faces edges, including corners,
-// into pos_edges set.
+// Insert all vertices on a faces edges, including corners, into pos_edges set.
 // Added 2010-01-18
-void QuadToTriInsertFaceEdgeVertices(GFace *face,
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos_edges)
+void QuadToTriInsertFaceEdgeVertices(GFace *face, MVertexRTree &pos_edges)
 {
-
-
   std::list<GEdge*> edges = face->edges();
   std::list<GEdge*>::iterator ite = edges.begin();
   while(ite != edges.end()){
-    pos_edges.insert((*ite)->mesh_vertices.begin(), (*ite)->mesh_vertices.end());
-    pos_edges.insert((*ite)->getBeginVertex()->mesh_vertices.begin(),
-               (*ite)->getBeginVertex()->mesh_vertices.end());
-    pos_edges.insert((*ite)->getEndVertex()->mesh_vertices.begin(),
-               (*ite)->getEndVertex()->mesh_vertices.end());
+    pos_edges.insert((*ite)->mesh_vertices);
+    pos_edges.insert((*ite)->getBeginVertex()->mesh_vertices);
+    pos_edges.insert((*ite)->getEndVertex()->mesh_vertices);
     ++ite;
   }
 }
 
 
-// Constructor for the CategorizedSourceElements structure.
-// See definition of CategorizedSourceElements in QuadTriUtils.h
-// file for details.
-CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
+// Constructor for the CategorizedSourceElements structure.  See definition of
+// CategorizedSourceElements in QuadTriUtils.h file for details.
+CategorizedSourceElements::CategorizedSourceElements(GRegion *gr)
 {
   region = (GRegion*)(NULL);
   source_face = (GFace*)(NULL);
@@ -330,7 +294,7 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
 
   ExtrudeParams *ep = gr->meshAttributes.extrude;
 
-  if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){
+  if(!ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh){
     Msg::Error("In CategorizedSourceElements constructor, invalid extrusion "
                "in region %d for performing QuadToTri mesh generation.",
                gr->tag() );
@@ -338,7 +302,7 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
   }
 
   GModel *model = gr->model();
-  if( !model ){
+  if(!model){
     Msg::Error("In CategorizedSourceElements constructor, invalid model for region "
                "%d.", gr->tag() );
     return;
@@ -347,7 +311,7 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
   // now find and verify the source face
 
   GFace *source_tmp = model->getFaceByTag( std::abs( ep->geo.Source ) );
-  if( !source_tmp  ){
+  if(!source_tmp){
     Msg::Error("In CategorizedSourceElements constructor, invalid source face for region "
                "%d.", gr->tag() );
     return;
@@ -359,10 +323,9 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
   source_face = source_tmp;
 
   // get source face boundary verts
-  std::set<MVertex*, MVertexLessThanLexicographic> bnd_verts;
+  MVertexRTree bnd_verts(CTX::instance()->geom.tolerance * CTX::instance()->lc);
   QuadToTriInsertSourceEdgeVertices(gr, bnd_verts);
 
-
   unsigned int num_tri = source_face->triangles.size();
   unsigned int num_quad = source_face->quadrangles.size();
 
@@ -370,18 +333,16 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
   tri_bool.assign(num_tri*4, false);
   quad_bool.assign(num_quad*5, false);
 
-
   // keep temporary set of one boundary point quad pivot indices
   std::set<MVertex*> one_pt_quad_pivots;
 
   // now classify the source elements in the vectors
-  for( int t = 0; t < 2; t++ ){    // t = 0 loop over triangles, t=1 loop over quads
-
+  for(int t = 0; t < 2; t++){    // t = 0 loop over triangles, t=1 loop over quads
     int size = !t ? source_face->triangles.size() : source_face->quadrangles.size();
-    for( int i = 0; i < size; i++ ){   // loop over total elements in current vector
+    for(int i = 0; i < size; i++){   // loop over total elements in current vector
       std::vector<MVertex*> elem_verts;
       MElement *elem;
-      if( !t ){
+      if(!t){
         elem = source_face->triangles[i];
         elem->getVertices(elem_verts);
       }
@@ -393,31 +354,31 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
       int bnd_count = 0;
       int bnd_vert = 0;
       // get the boundary vert bool values
-      for( int k = 0; k < elem_size; k++ ){
-        if( bnd_verts.find(elem_verts[k]) != bnd_verts.end() ){
+      for(int k = 0; k < elem_size; k++){
+        if(bnd_verts.find(elem_verts[k]->x(), elem_verts[k]->y(), elem_verts[k]->z())){
           if( !t ) tri_bool[4*i+k+1] = true;
           else     quad_bool[5*i+k+1] = true;
           bnd_vert = k;
           bnd_count++;
         }
       }
-      if( bnd_count ){
-        if( !t ) tri_bool[4*i] = true;
-        else     quad_bool[5*i] = true;
+      if(bnd_count){
+        if(!t) tri_bool[4*i] = true;
+        else   quad_bool[5*i] = true;
       }
 
       // Place element vector indices into appropriate set
-      if( !bnd_count )
+      if(!bnd_count)
         (!t) ? internal_tri.insert(i) : internal_quad.insert(i);
-      else if( bnd_count == 1 || bnd_count == 2 ||
-              (bnd_count == 3 && t) )
+      else if(bnd_count == 1 || bnd_count == 2 ||
+              (bnd_count == 3 && t))
         (!t) ? other_bnd_tri.insert(i) : other_bnd_quad.insert(i);
-      else if( (bnd_count == 3 && !t) || bnd_count == 4 ){
+      else if((bnd_count == 3 && !t) || bnd_count == 4){
         (!t) ? three_bnd_pt_tri.insert(i) : four_bnd_pt_quad.insert(i);
       }
 
       // if a one boundary point quad, record it in one_pt_quads set
-      if( t && bnd_count == 1 ){
+      if(t && bnd_count == 1){
         one_pt_quad_pivots.insert(elem_verts[(bnd_vert+2)%4]);
       }
     }
@@ -435,28 +396,28 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
   for( int s = 0; s < 2; s++ ){
     for( int q = 0; q < 2; q++ ){
       std::set<unsigned int> *int_elems;
-      if( !s ){
-        if( !q ) int_elems = &internal_tri;
+      if(!s){
+        if(!q) int_elems = &internal_tri;
         else  continue;
       }
       else
         int_elems = !q ? &internal_quad : &other_bnd_quad;
 
-      for( it_int = (*int_elems).begin(); it_int != (*int_elems).end(); it_int++ ){
+      for(it_int = (*int_elems).begin(); it_int != (*int_elems).end(); it_int++){
         std::vector<MVertex*> verts;
-        if( !s )
+        if(!s)
           source_face->triangles[(*it_int)]->getVertices(verts);
         else
           source_face->quadrangles[(*it_int)]->getVertices(verts);
 
         // for t == s == 1 (other_bnd_quads), only retain those with two boundary verts
-        if( s && q ){
+        if(s && q){
           int bnd_count = 0;
-          for(unsigned int k = 0; k < verts.size(); k++ ){
-            if( quad_bool[5*(*it_int)+k+1] )
+          for(unsigned int k = 0; k < verts.size(); k++){
+            if(quad_bool[5*(*it_int)+k+1])
               bnd_count++;
           }
-          if( bnd_count != 2 )
+          if(bnd_count != 2)
             continue;
         }
 
@@ -467,17 +428,17 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
         // will sometimes choose the wrong pivot.
         std::set<MVertex*>::iterator it_piv;
         bool found = false;
-        for( it_piv = one_pt_quad_pivots.begin(); it_piv != one_pt_quad_pivots.end(); it_piv++ ){
-          for(unsigned int t = 0; t < verts.size(); t++ ){
-            if( (*it_piv) == verts[t] ) {
+        for(it_piv = one_pt_quad_pivots.begin(); it_piv != one_pt_quad_pivots.end(); it_piv++){
+          for(unsigned int t = 0; t < verts.size(); t++){
+            if((*it_piv) == verts[t]) {
               found = true;
-              if( !s ){
+              if(!s){
                 internal_tri_touch_one_bnd_pt_quad.insert(*it_int);
                 tri_bool[4*(*it_int)] = true;
                 tri_bool[4*(*it_int)+t+1] = true;
               }
               else{
-                if( !q ){
+                if(!q){
                   internal_quad_touch_one_bnd_pt_quad.insert(*it_int);
                   quad_bool[5*(*it_int)] = true;
                   quad_bool[5*(*it_int)+t+1] = true;
@@ -488,19 +449,17 @@ CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
               break;
             }
           }
-          if( found ) break;
+          if(found) break;
         }
       }
     }
   }
 
-} // end of CategorizedSourceElements::CategorizedSourceElements( GRegion *gr )
-
+}
 
 // Find centroid of vertices in vector v, return in vector
-std::vector<double> QtFindVertsCentroid( std::vector<MVertex*> v )
+std::vector<double> QtFindVertsCentroid(std::vector<MVertex*> v)
 {
-
   std::vector<double> v_return;
   const int v_size = v.size();
 
@@ -538,15 +497,13 @@ std::vector<double> QtFindVertsCentroid( std::vector<MVertex*> v )
   v_return.push_back(z);
 
   return v_return;
-
 }
 
 // Add a new vertex at the centroid of a vector of vertices (this goes into a region
 // Added 2010-02-06
-MVertex* QtMakeCentroidVertex( std::vector<MVertex*> v, std::vector<MVertex*> *target,
-                             GEntity *entity, std::set<MVertex*, MVertexLessThanLexicographic> &pos )
+MVertex* QtMakeCentroidVertex(std::vector<MVertex*> v, std::vector<MVertex*> *target,
+                              GEntity *entity, MVertexRTree &pos)
 {
-
   int v_size = v.size();
   if( v_size != 6 && v_size != 8 && v_size != 3 && v_size != 4){
     Msg::Error("In makeCentroidVertex(), number of vertices does not equal 3, 4, 6, or 8.");
@@ -563,28 +520,24 @@ MVertex* QtMakeCentroidVertex( std::vector<MVertex*> v, std::vector<MVertex*> *t
   }
 
   // make new vertex
-  MVertex tmp(x, y, z, 0, -1);
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp = pos.find(&tmp);
+  MVertex *tmp = pos.find(x, y, z);
   MVertex *v_int;
   // simple check if it exists
-  if(itp == pos.end()){
+  if(!tmp){
     v_int = new MVertex(x, y, z, entity);
     target->push_back(v_int);
     pos.insert(v_int);
   }
   else
-    v_int = (*itp);
+    v_int = tmp;
 
   return (v_int);
-
 }
 
-
 // Finds the index of the lowest valued pointer in a vector of MVertex pointers
 // Added 2011-03-10
-int getIndexForLowestVertexPointer( std::vector<MVertex*> v )
+int getIndexForLowestVertexPointer(std::vector<MVertex*> v)
 {
-
   int ind_low = 0;
   int v_size = v.size();
   for( int i = 1; i < v_size; i++ ){
@@ -594,7 +547,6 @@ int getIndexForLowestVertexPointer( std::vector<MVertex*> v )
   return ind_low;
 }
 
-
 // Given 4 verts on a face, find an existent diagonal, if any.
 // Two possible methods:  If the 'index_guess' argument is the index of the correct triangle,
 // finding it is simple. If not, have to do a complete pedantic search.
@@ -653,7 +605,6 @@ std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts,
 
 }
 
-
 // Get number of regions neighboring a face
 int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors)
 {
@@ -698,7 +649,6 @@ int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors)
 // Trevor Strickler 12/09/10
 int IsSurfaceALateralForRegion(GRegion *region, GFace *face)
 {
-
   // NOTE: don't necessarily require the face to be extruded! just in the position
   //  of lateral is all we care about here.
   ExtrudeParams *ep = face->meshAttributes.extrude;
@@ -731,7 +681,6 @@ int IsSurfaceALateralForRegion(GRegion *region, GFace *face)
       region_faces.end() )
     return 0;
 
-
   // if this face is a COPIED_ENTITY with source = region source face, this is the top.  Exit.
   if( ep && ep->geo.Mode == COPIED_ENTITY &&
       reg_source == model->getFaceByTag(std::abs(ep->geo.Source)))
@@ -899,6 +848,3 @@ void fill_touch_bnd( int touch_bnd[], std::vector<bool> vert_bnd, int n_lat )
   }
 }
 
-
-
-
diff --git a/Mesh/QuadTriUtils.h b/Mesh/QuadTriUtils.h
index d3205b1..b9b5f73 100644
--- a/Mesh/QuadTriUtils.h
+++ b/Mesh/QuadTriUtils.h
@@ -1,19 +1,19 @@
-/************************************************************************************************** 
+/**************************************************************************************************
 QuadTriUtils.h
 
 The code in this file was written by Dr. Trevor S. Strickler.
-email: <trevor.strickler at gmail.com> 
+email: <trevor.strickler at gmail.com>
 
 This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface
-of quadrangle faces to triangle faces using pyramids and other mesh elements. 
+of quadrangle faces to triangle faces using pyramids and other mesh elements.
 
 See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt.
 
-Trevor S. Strickler hereby transfers copyright of QuadTri files to 
-Christophe Geuzaine and J.-F. Remacle with the understanding that 
+Trevor S. Strickler hereby transfers copyright of QuadTri files to
+Christophe Geuzaine and J.-F. Remacle with the understanding that
 his contribution shall be cited appropriately.
 
-All reused or original Gmsh code is Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+All reused or original Gmsh code is Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 Gmsh is available at: www.geuz.org/gmsh
 
 For Gmsh license information, see the LICENSE.txt file for license information. Please report all
@@ -21,8 +21,8 @@ Gmsh bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License, Version 2,
-as published by the Free Software Foundation, or (at your option) 
-any later version, with or without the exception given in the 
+as published by the Free Software Foundation, or (at your option)
+any later version, with or without the exception given in the
 LICENSE.txt file supplied with this code and with Gmsh.
 
 This program is distributed in the hope that it will be useful,
@@ -45,6 +45,7 @@ GNU General Public License for more details.
 #include "GModel.h"
 #include "GmshDefines.h"
 #include "MVertex.h"
+#include "MVertexRTree.h"
 #include "Context.h"
 #include "GModel.h"
 #include "meshGFace.h"
@@ -68,9 +69,9 @@ GNU General Public License for more details.
 // four_bnd_pt_quad : quadrangle vector indices for quads with four vertices on a surface boundary edge
 // other_bnd_pt_tri, other_bnd_pt_quad : vector indices of the respective elements that have some
 //                                       but not all vertices on a boundary edge.
-// internal_quad_touch_one_bnd_pt_quad : quad vector indices of quads that share a vertex with a 
+// internal_quad_touch_one_bnd_pt_quad : quad vector indices of quads that share a vertex with a
 //                                       one boundary point quad.
-// internal_tri_touch_one_bnd_pt_quad  : triangle vector indices of triangles that share a vertex with a 
+// internal_tri_touch_one_bnd_pt_quad  : triangle vector indices of triangles that share a vertex with a
 //                                       one boundary point quad.
 // two_pt_bnd_quad_touch_one_bnd_pt_quad : set of indices to quads with two points on a boundary that also touch quads
 //                                         with one point on a boundary.
@@ -82,22 +83,22 @@ GNU General Public License for more details.
 // tri_bool, quad_bool : These vectors hold bits to tell which vertices in which elements are on the boundary, OR
 //             in the case of the [*]_touch_one_bnd_pt_quad elements, what vertex is the non-boundary 'pivot' vertex shared
 //             with a quad having one point on a boundary (diagonals are drawn to the pivot vertex in the single layer quadToTri
-//             method). 
-//             Format: In tri_bool, there are 4*(number of triangles) elements. Each source triangle of index i has  
+//             method).
+//             Format: In tri_bool, there are 4*(number of triangles) elements. Each source triangle of index i has
 //             four consecutive bool in tri_bool, beginning at i*4.  The first bool is true if the triangle touches an edge
-//             boundary (or touches a one boundary point quad). The other bools correspond to triangle vertices, in order 
-//             of appearance in the triangle's own vertex vector, and are true if the corresponding vertex is on the boundary. 
+//             boundary (or touches a one boundary point quad). The other bools correspond to triangle vertices, in order
+//             of appearance in the triangle's own vertex vector, and are true if the corresponding vertex is on the boundary.
 //             Everything about tri_bool applies to quad_bool, but there are 5 bool per quad, accessed starting at i*5.
-// 
+//
 
 struct CategorizedSourceElements{
  public:
-  GRegion *region; 
+  GRegion *region;
   GFace *source_face;
   bool valid;
-  std::set<unsigned int> three_bnd_pt_tri, four_bnd_pt_quad, 
+  std::set<unsigned int> three_bnd_pt_tri, four_bnd_pt_quad,
                          other_bnd_tri, other_bnd_quad;
-  std::set<unsigned int> internal_tri_touch_one_bnd_pt_quad, 
+  std::set<unsigned int> internal_tri_touch_one_bnd_pt_quad,
                          internal_quad_touch_one_bnd_pt_quad,
                          two_bnd_pt_quad_touch_one_bnd_pt_quad;
 
@@ -107,7 +108,7 @@ struct CategorizedSourceElements{
   CategorizedSourceElements( GRegion *gr );
 };
 
-// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at 
+// this determines if a face is a non-lateral face in a structured toroidal volume extrusion with at
 // least one QuadToTri region...
 int IsInToroidalQuadToTri(GFace *face);
 
@@ -124,34 +125,32 @@ ExtrusionElementMap::addExtrudedElemVector(MElement* source, std::vector<MElemen
 // Insert all vertices on a region's source edge, including corners,
 // into pos_src_edge set.
 // Added 2010-01-09
-void QuadToTriInsertSourceEdgeVertices(GRegion *gr, 
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge);
+void QuadToTriInsertSourceEdgeVertices(GRegion *gr, MVertexRTree &pos_src_edge);
 
 // Insert all vertices on a faces edges, including corners,
 // into pos_edges set.
 // Added 2010-01-18
-void QuadToTriInsertFaceEdgeVertices(GFace *face, 
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos_edges);
+void QuadToTriInsertFaceEdgeVertices(GFace *face, MVertexRTree &pos_edges);
 
 // Find centroid of vertices in vector v, return in vector
-std::vector<double> QtFindVertsCentroid( std::vector<MVertex*> v );
+std::vector<double> QtFindVertsCentroid(std::vector<MVertex*> v);
 
 // Add a new vertex at the centroid of a vector of vertices (this goes into a region
 // Added 2010-02-06
-MVertex* QtMakeCentroidVertex( std::vector<MVertex*> v, std::vector<MVertex*> *target, 
-                             GEntity *entity, std::set<MVertex*, MVertexLessThanLexicographic> &pos );
+MVertex* QtMakeCentroidVertex(std::vector<MVertex*> v, std::vector<MVertex*> *target,
+                              GEntity *entity, MVertexRTree &pos);
 
 // Finds the index of the lowest valued pointer in a vector of MVertex pointers
 // Added 2011-03-10
-int getIndexForLowestVertexPointer( std::vector<MVertex*> v );
+int getIndexForLowestVertexPointer(std::vector<MVertex*> v);
 
 
 // Given 4 verts on a face, find an existent diagonal, if any.
 // Two possible methods:  If the 'index_guess' argument is the index of the correct triangle,
 // finding it is simple. If not, have to do a complete pedantic search.
 // Added 2010-01-26
-std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts, GFace *face, bool lateral, 
-                                             unsigned int index_guess = 0 );
+std::pair<int, int> FindDiagonalEdgeIndices(std::vector<MVertex*> verts, GFace *face, bool lateral,
+                                            unsigned int index_guess = 0);
 
 // Get number of regions neighboring a face
 int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors);
@@ -162,7 +161,7 @@ int IsSurfaceALateralForRegion(GRegion *region, GFace *face);
 
 
 // Function to determine if a face is a top surface for a region.  It returns 1
-// if the face is COPIED_ENTITY with source = region's source and if face belongs to region. 
+// if the face is COPIED_ENTITY with source = region's source and if face belongs to region.
 // Otherwise, return 0 (NOTE: ReplaceDuplicateSurfaces() can remove a top surface
 // and replace it.  If that happens, this will return 0.  That is INTENDED for THIS function.
 // Added 2010-12-13
@@ -173,12 +172,12 @@ int IsSurfaceATopForRegion(GRegion *region, GFace *face);
 GFace* findRootSourceFaceForFace(GFace *face);
 
 
-// Input is vert_bnd[], which describes some 2D element: vert_bnd[i] is true if 
-// the ith vertex the element touches a lateral edge boundary of the surface the 
-// element is in. 
-// Output is touch_bnd[]: Each element of touch_bnd[] corresponds to an edge of 
+// Input is vert_bnd[], which describes some 2D element: vert_bnd[i] is true if
+// the ith vertex the element touches a lateral edge boundary of the surface the
+// element is in.
+// Output is touch_bnd[]: Each element of touch_bnd[] corresponds to an edge of
 // the element described by vert_bnd[].  Edge i of touch_bnd[] is formed by
-// vertices i and (i+1)%element_size of the element. The value of touch_bnd[i] is non-zero 
+// vertices i and (i+1)%element_size of the element. The value of touch_bnd[i] is non-zero
 // if that edge touches a boundary edge of the surface that the element is in.
 // Added 2011-03-10
 void fill_touch_bnd( int touch_bnd[], std::vector<bool> vert_bnd, int n_lat );
diff --git a/Mesh/Voronoi3D.cpp b/Mesh/Voronoi3D.cpp
index b8cc605..e2420d6 100644
--- a/Mesh/Voronoi3D.cpp
+++ b/Mesh/Voronoi3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/Voronoi3D.h b/Mesh/Voronoi3D.h
index 974849e..cba92fa 100644
--- a/Mesh/Voronoi3D.h
+++ b/Mesh/Voronoi3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/cross3D.h b/Mesh/cross3D.h
index d270090..fbb8576 100644
--- a/Mesh/cross3D.h
+++ b/Mesh/cross3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -39,6 +39,7 @@ public:
   double re() const{ return v[3]; }
   SVector3 im() const{ return SVector3(v[0], v[1], v[2]); }
   Qtn conj() { v[0] *= -1.; v[1] *= -1.; v[2] *= -1.; return *this; }
+  Qtn opp() { v[0] *= -1.; v[1] *= -1.; v[2] *= -1.; v[3] *= -1.; return *this; }
   double operator [](const unsigned int i) const { return v[i]; }
   void storeProduct(const Qtn &x, const Qtn &y);
   Qtn operator *(const Qtn &x) const;
@@ -137,6 +138,8 @@ public:
     scnd = im(R*scnd*conj(R));
     return *this;
   }
+  Qtn correspQuat();
+  Qtn rotationDirectTo(const cross3D &y) const;
   Qtn rotationTo(const cross3D &y) const;
   Qtn rotationToOnSurf(const cross3D &y) const;
 };
@@ -182,6 +185,71 @@ cross3D cross3D::get(int k) const{
   return cross3D(a,b);
 }
 
+Qtn cross3D::correspQuat(){
+	/*
+	   returns the quaternion representing the rotation from the canonical basis to this
+	 */
+	SVector3 frst = SVector3(1,0,0);
+	SVector3 scnd = SVector3(0,1,0);
+	cross3D xx = cross3D(frst,scnd);
+	cross3D yy = *this;
+	Qtn R = xx.rotationDirectTo(yy);
+	return R;
+
+}
+
+Qtn cross3D::rotationDirectTo(const cross3D &y) const{
+	  double dmin, th1, th2;
+	  SVector3 axis;
+	  Qtn Rxy1, Rxy2;
+
+	  cross3D xx = *this;
+	  cross3D yy = y;
+
+	  //ind1 = 0; jmin=0; dmin = angle(xx.get(kmin).frst, vect[jmin]);
+	  dmin = angle(xx.frst, yy.frst);
+
+	  th1 = dmin;
+
+	  if(th1 > 1e-8)
+	    axis = crossprod(xx.frst, yy.frst).unit();
+	  else {
+	    axis = SVector3(1,0,0);
+	    th1 = 0.;
+	  }
+
+	  Rxy1 = Qtn(axis, th1);
+	  xx.rotate(Rxy1);
+
+	  dmin = angle(xx.scnd, yy.scnd);
+	  // xx.scnd and yy.scnd now form the smallest angle among the 4^2 possible.
+
+	  th2 = dmin;
+
+	  if(th2 > 1e-8)
+	    axis = crossprod(xx.scnd, yy.scnd).unit();
+	  else {
+	    axis = SVector3(1,0,0);
+	    th2 = 0.;
+	  }
+
+	  Rxy2 = Qtn(axis, th2);
+	  Qtn R = Rxy2*Rxy1;
+
+	  // test
+	  double theta = eulerAngleFromQtn(R);
+	  if(theta > 1.07 /*0.988*/){ //
+	    std::cout << "Ouch! th1 = " << th1 << " th2 = " << th2 << std::endl;
+	    std::cout << "x = " << *this << std::endl;
+	    std::cout << "y = " << y << std::endl;
+	    std::cout << "R = " << R << std::endl;
+	    std::cout << "u = " << eulerAngleFromQtn(R) << std::endl;
+	    std::cout << "axis = " << eulerAxisFromQtn(R) << std::endl;
+	  }
+
+	  return R;
+}
+
 Qtn cross3D::rotationTo(const cross3D &y) const{
   /* x.rotationTo(y) returns a quaternion R representing the rotation 
      such that y = R x, x = conj(R) y
@@ -326,6 +394,93 @@ STensor3 convert(const cross3D x){
   return m;
 }
 
+double computeSetSmoothness(std::vector<cross3D > S){
+	  /* this->frst and y.frst are assumed to be the normal to the face
+	     R1 is the rotation such that R1(this->frst) = y.frst.
+	     R2 is then the rotation such that R2 o R1(this->scnd) = y.scnd
+	  */
+	double result = 1.0;
+	double qmean[4];
+	qmean[0] = 0.0;
+	qmean[1] = 0.0;
+	qmean[2] = 0.0;
+	qmean[3] = 0.0;
+	std::vector<cross3D>::iterator it1 = S.begin();
+	cross3D cInit = (*it1);
+	Qtn qInit = cInit.correspQuat();
+	for (it1 = S.begin();it1 != S.end();it1++){
+		//pour chaque element du set
+		cross3D cTmp = (*it1);
+		Qtn qTmp = cTmp.correspQuat();
+		double prodVecMin = 0.0;
+		for (unsigned int i = 1;i < 24;i++){
+			//on trouve la cross appropriee
+			Qtn qTmpi = cTmp.get(i).correspQuat();
+			double prodVeci = 0.0;
+			for (unsigned int j = 0;j < 4;j++){
+				prodVeci += qInit.v[j] * qTmpi.v[j];
+			}
+			if (prodVeci >= 0.0){
+				if (prodVeci > prodVecMin){
+					prodVecMin = prodVeci;
+					qTmp = qTmpi;
+				}
+			}
+			else{
+				prodVeci = - prodVeci;
+				qTmpi = qTmpi.opp();
+				if (prodVeci > prodVecMin){
+					prodVecMin = prodVeci;
+					qTmp = qTmpi;
+				}
+			}
+		}
+		//on a trouve le quat approprie
+		for (unsigned int j = 0;j < 4;j++){
+			qmean[j] += qTmp[j];
+		}
+	}
+	double normQt = sqrt(qmean[0] * qmean[0] + qmean[1] * qmean[1] + qmean[2] * qmean[2] + qmean[3] * qmean[3]);
+	if (normQt != 0.0){
+		for (unsigned int j = 0;j < 4;j++){
+			qmean[j] = qmean[j] / normQt;
+		}
+	}
+	for (it1 = S.begin();it1 != S.end();it1++){
+		//pour chaque element du set
+		cross3D cTmp = (*it1);
+		Qtn qTmp = cTmp.correspQuat();
+		double prodVecMin = 0.0;
+		for (unsigned int i = 0;i < 24;i++){
+			//on trouve la cross appropriee
+			Qtn qTmpi = cTmp.get(i).correspQuat();
+			double prodVeci = 0.0;
+			for (unsigned int j = 0;j < 4;j++){
+				prodVeci += qmean[j] * qTmpi.v[j];
+			}
+			if (prodVeci >= 0.0){
+				if (prodVeci > prodVecMin){
+					prodVecMin = prodVeci;
+					qTmp = qTmpi;
+				}
+			}
+			else{
+				prodVeci = - prodVeci;
+				qTmpi = qTmpi.opp();
+				if (prodVeci > prodVecMin){
+					prodVecMin = prodVeci;
+					qTmp = qTmpi;
+				}
+			}
+		}
+		//on a trouve le quat approprie
+		if (prodVecMin < result){
+			result = prodVecMin;
+		}
+	}
+	return result;
+}
+
 
 
 #endif
diff --git a/Mesh/directions3D.cpp b/Mesh/directions3D.cpp
index dcc1b3f..ce39d1f 100644
--- a/Mesh/directions3D.cpp
+++ b/Mesh/directions3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -33,27 +33,27 @@ void Frame_field::init_region(GRegion* gr){
   GFace* gf;
   std::list<GFace*> faces;
   std::list<GFace*>::iterator it;
-	
+
   Nearest_point::init_region(gr);
-	
+
   faces = gr->faces();
-	
+
   field.clear();
   labels.clear();
-	
+
   for(it=faces.begin();it!=faces.end();it++){
     gf = *it;
 	init_face(gf);
   }
-	
+
   ANNpointArray duplicate = annAllocPts(field.size(),3);
-	
+
   for(i=0;i<field.size();i++){
     duplicate[i][0] = field[i].first.x();
 	duplicate[i][1] = field[i].first.y();
 	duplicate[i][2] = field[i].first.z();
   }
-	
+
   kd_tree = new ANNkd_tree(duplicate,field.size(),3);
 #endif
 }
@@ -67,12 +67,12 @@ void Frame_field::init_face(GFace* gf){
   SVector3 v2;
   SVector3 v3;
   STensor3 m(1.0);
-	
+
   for(i=0;i<gf->storage1.size();i++){
     point = gf->storage1[i];
 	v1 = gf->storage2[i];
 	v2 = gf->storage3[i];
-		
+
 	v1.normalize();
 	v2.normalize();
 	v3 = crossprod(v1,v2);
@@ -98,7 +98,7 @@ STensor3 Frame_field::search(double x,double y,double z){
   double distance1;
   double distance2;
   double e2;
-	
+
   index1 = 0;
   index2 = 0;
   distance1 = 1000000.0;
@@ -108,31 +108,31 @@ STensor3 Frame_field::search(double x,double y,double z){
   ANNpoint query;
   ANNidxArray indices;
   ANNdistArray distances;
-	
+
   if(field.size()<=1){
     return STensor3(1.0);
   }
-	
+
   query = annAllocPt(3);
   query[0] = x;
   query[1] = y;
   query[2] = z;
-	
+
   indices = new ANNidx[2];
   distances = new ANNdist[2];
-	
+
   double e = 0.0;
   kd_tree->annkSearch(query,2,indices,distances,e);
   index1 = indices[0];
   index2 = indices[1];
   distance1 = distances[0];
   distance2 = distances[1];
-	
+
   annDeallocPt(query);
   delete[] indices;
   delete[] distances;
 #endif
-  
+
   if(fabs(sqrt(distance2)-sqrt(distance1))<e2){
     if(labels[index2]<labels[index1]){
 	  return field[index2].second;
@@ -155,21 +155,21 @@ STensor3 Frame_field::combine(double x,double y,double z){
   SVector3 vec1,vec2,vec3;
   SVector3 final1,final2;
   STensor3 m(1.0),m2(1.0);
-	
+
   m = search(x,y,z);
   m2 = m;
   ok = Nearest_point::search(x,y,z,vec);
   vec.normalize();
-	
+
   if(ok){
     vec1 = SVector3(m.get_m11(),m.get_m21(),m.get_m31());
 	vec2 = SVector3(m.get_m12(),m.get_m22(),m.get_m32());
 	vec3 = SVector3(m.get_m13(),m.get_m23(),m.get_m33());
-		
+
 	val1 = fabs(dot(vec,vec1));
 	val2 = fabs(dot(vec,vec2));
 	val3 = fabs(dot(vec,vec3));
-		
+
 	if(val1<=val2 && val1<=val3){
 	  other = vec1;
 	}
@@ -179,12 +179,12 @@ STensor3 Frame_field::combine(double x,double y,double z){
 	else{
 	  other = vec3;
 	}
-		
+
 	final1 = crossprod(vec,other);
 	final1.normalize();
 	final2 = crossprod(vec,final1);
 	final2.normalize();
-	
+
     m2.set_m11(vec.x());
 	m2.set_m21(vec.y());
 	m2.set_m31(vec.z());
@@ -195,7 +195,7 @@ STensor3 Frame_field::combine(double x,double y,double z){
 	m2.set_m23(final2.y());
 	m2.set_m33(final2.z());
   }
-	
+
   return m2;
 }
 
@@ -216,17 +216,17 @@ void Frame_field::print_field1(){
   SPoint3 point;
   SPoint3 p1,p2,p3,p4,p5,p6;
   STensor3 m(1.0);
-	
+
   k = 0.05;
   std::ofstream file("frame1.pos");
   file << "View \"cross field\" {\n";
   color1 = 10.0;
   color2 = 20.0;
-	
+
   for(i=0;i<field.size();i++){
     point = field[i].first;
 	m = field[i].second;
-		
+
 	p1 = SPoint3(point.x() + k*m.get_m11(),
 				 point.y() + k*m.get_m21(),
 				 point.z() + k*m.get_m31());
@@ -245,7 +245,7 @@ void Frame_field::print_field1(){
 	p6 = SPoint3(point.x() - k*m.get_m13(),
 				 point.y() - k*m.get_m23(),
 				 point.z() - k*m.get_m33());
-		
+
 	print_segment(point,p1,color1,color2,file);
 	print_segment(point,p2,color1,color2,file);
 	print_segment(point,p3,color1,color2,file);
@@ -253,7 +253,7 @@ void Frame_field::print_field1(){
 	print_segment(point,p5,color1,color2,file);
 	print_segment(point,p6,color1,color2,file);
   }
-	
+
   file << "};\n";
 }
 
@@ -269,13 +269,13 @@ void Frame_field::print_field2(GRegion* gr){
   MVertex* vertex;
   MElement* element;
   STensor3 m(1.0);
-	
+
   k = 0.05;
   std::ofstream file("frame2.pos");
   file << "View \"cross field\" {\n";
   color1 = 10.0;
   color2 = 20.0;
-	
+
   for(i=0;i<gr->getNumMeshElements();i++){
     element = gr->getMeshElement(i);
 	for(j=0;j<element->getNumVertices();j++){
@@ -283,7 +283,7 @@ void Frame_field::print_field2(GRegion* gr){
 	  if(vertex->onWhat()->dim()>2){
 	    point = SPoint3(vertex->x(),vertex->y(),vertex->z());
 		m = search(vertex->x(),vertex->y(),vertex->z());
-				
+
 		p1 = SPoint3(point.x() + k*m.get_m11(),
 					 point.y() + k*m.get_m21(),
 					 point.z() + k*m.get_m31());
@@ -302,7 +302,7 @@ void Frame_field::print_field2(GRegion* gr){
 		p6 = SPoint3(point.x() - k*m.get_m13(),
 					 point.y() - k*m.get_m23(),
 					 point.z() - k*m.get_m33());
-				
+
 		print_segment(point,p1,color1,color2,file);
 		print_segment(point,p2,color1,color2,file);
 		print_segment(point,p3,color1,color2,file);
@@ -312,7 +312,7 @@ void Frame_field::print_field2(GRegion* gr){
 	  }
     }
   }
-	
+
   file << "};\n";
 }
 
@@ -674,6 +674,89 @@ double Frame_field::findBarycenter(std::map<MVertex*, std::set<MVertex*> >::cons
   return energy;
 }
 
+void Frame_field::buildSmoothness(){
+	GModel *m = GModel::current();
+	std::vector<GEntity*> entities;
+	m->getEntities(entities);
+	//pour commencer on va creer une map de connectique des Mvertex
+	std::map<MVertex*, std::vector<MVertex* > > Neighbours;
+	for(unsigned int i = 0; i < entities.size(); i++){
+		GEntity* eTmp = entities[i];
+		for (unsigned int j = 0; j < eTmp->getNumMeshElements();j++){
+			MElement* elem = eTmp->getMeshElement(j);
+			for (int k = 0;k < elem->getNumVertices();k++){
+				for (int l = k;l < elem->getNumVertices();l++){
+					if (k != l){
+						MVertex* v1 = elem->getVertex(k);
+						MVertex* v2 = elem->getVertex(l);
+						Neighbours[v1].push_back(v2);
+						Neighbours[v2].push_back(v1);
+					}
+				}
+			}
+		}
+	}
+	for(unsigned int i = 0; i < entities.size(); i++){
+		for (unsigned int j = 0;j < entities[i]->mesh_vertices.size();j++){
+			//on va traiter chaque noeud
+			std::set<MVertex*> V1;
+			std::set<MVertex*> V2;
+			std::set<MVertex*> V3;
+			MVertex* v0 = entities[i]->mesh_vertices[j];
+			V1.insert(v0);
+			std::vector<MVertex* > v0vec = Neighbours[v0];
+			for (unsigned int k = 0;k < v0vec.size();k++){
+				V1.insert(v0vec[k]);
+			}
+			for (std::set<MVertex*>::iterator itSet = V1.begin();itSet != V1.end();itSet++){
+				MVertex* vTmp = (*itSet);
+				V2.insert(vTmp);
+				v0vec = Neighbours[vTmp];
+				for (unsigned int k = 0;k < v0vec.size();k++){
+					V2.insert(v0vec[k]);
+				}
+			}
+			for (std::set<MVertex*>::iterator itSet = V2.begin();itSet != V2.end();itSet++){
+				MVertex* vTmp = (*itSet);
+				V3.insert(vTmp);
+				v0vec = Neighbours[vTmp];
+				for (unsigned int k = 0;k < v0vec.size();k++){
+					V3.insert(v0vec[k]);
+				}
+			}
+			//we have all three set here, time to compute the smoothnesses for each one
+			std::vector<cross3D> C1;
+			std::vector<cross3D> C2;
+			std::vector<cross3D> C3;
+			double S1 = 0.0;
+			double S2 = 0.0;
+			double S3 = 0.0;
+			for (std::set<MVertex*>::iterator itSet = V1.begin();itSet != V1.end();itSet++){
+				MVertex* vTmp = (*itSet);
+				STensor3 tTmp = crossField[vTmp];
+				cross3D cTmp = cross3D(tTmp);
+				C1.push_back(cTmp);
+			}
+			for (std::set<MVertex*>::iterator itSet = V2.begin();itSet != V2.end();itSet++){
+				MVertex* vTmp = (*itSet);
+				STensor3 tTmp = crossField[vTmp];
+				cross3D cTmp = cross3D(tTmp);
+				C2.push_back(cTmp);
+			}
+			for (std::set<MVertex*>::iterator itSet = V3.begin();itSet != V3.end();itSet++){
+				MVertex* vTmp = (*itSet);
+				STensor3 tTmp = crossField[vTmp];
+				cross3D cTmp = cross3D(tTmp);
+				C3.push_back(cTmp);
+			}
+			S1 = computeSetSmoothness(C1);
+			S2 = computeSetSmoothness(C2);
+			S3 = computeSetSmoothness(C3);
+			double finalSmoothness = (9.0 * S1 + 3.0 * S2 + S3) / 13.0 ;
+			crossFieldSmoothness[v0] = finalSmoothness;
+		}
+	}
+}
 
 double Frame_field::smoothFace(GFace *gf, int n){
   double energy=0;
@@ -774,8 +857,8 @@ void Frame_field::recur_connect_vert(FILE *fi, int count,
 				     MVertex *v,
 				     STensor3 &cross,
 				     std::multimap<MVertex*,MVertex*> &v2v,
-				     std::set<MVertex*> &touched){
-
+				     std::set<MVertex*> &touched)
+{
   if (touched.find(v) != touched.end()) return;
   touched.insert(v);
 
@@ -787,70 +870,71 @@ void Frame_field::recur_connect_vert(FILE *fi, int count,
     MVertex *nextV = it->second;
     if (touched.find(nextV) == touched.end()){
 
-    //compute dot product (N0,R0,A0) dot (Ni,Ri,Ai)^T
-    //where N,R,A are the 3 directions
-    std::map<MVertex*, STensor3>::iterator iter = crossField.find(nextV);
-    STensor3 nextCross = iter->second;
-    STensor3 nextCrossT = nextCross.transpose();
-    STensor3 prod = cross.operator*=(nextCrossT);
-    fullMatrix<double> mat(3,3); prod.getMat(mat);
-
-    //find biggest dot product
-    fullVector<int> Id(3);
-    Id(0) = Id(1) = Id(2) = 0;
-    for (int j = 0; j < 3; j++){
-      double maxVal = 0.0;
-      for (int i = 0; i < 3; i++){
-	double val = fabs(mat(i,j));
-	if( val > maxVal ){
-	  maxVal  = val;
-	  Id(j) = i;
-	}
+      //compute dot product (N0,R0,A0) dot (Ni,Ri,Ai)^T
+      //where N,R,A are the 3 directions
+      std::map<MVertex*, STensor3>::iterator iter = crossField.find(nextV);
+      STensor3 nextCross = iter->second;
+      STensor3 nextCrossT = nextCross.transpose();
+      STensor3 prod = cross.operator*=(nextCrossT);
+      fullMatrix<double> mat(3,3); prod.getMat(mat);
+
+      //find biggest dot product
+      fullVector<int> Id(3);
+      Id(0) = Id(1) = Id(2) = 0;
+      for (int j = 0; j < 3; j++){
+        double maxVal = 0.0;
+        for (int i = 0; i < 3; i++){
+          double val = fabs(mat(i,j));
+          if( val > maxVal ){
+            maxVal  = val;
+            Id(j) = i;
+          }
+        }
       }
-    }
 
-   //check
-    if (Id(0) +Id(1)+ Id(2) != 3 || (Id(0) == 1 && Id(1)==1 && Id(2)==1)) {
-      std::cout << "This should not happen: sum should be 0+1+2" << std::endl;
-      printf("Id =%d %d %d \n", Id(0), Id(1), Id(2));
-      return;
-    }
+      //check
+      if (Id(0) +Id(1)+ Id(2) != 3 || (Id(0) == 1 && Id(1)==1 && Id(2)==1)) {
+        std::cout << "This should not happen: sum should be 0+1+2" << std::endl;
+        printf("Id =%d %d %d \n", Id(0), Id(1), Id(2));
+        return;
+      }
 
-    //create new cross
-    fullMatrix<double> newmat(3,3);
-    for (int i = 0; i < 3; i++){
-     for (int j = 0; j < 3; j++){
-       newmat(i,j) = nextCross(Id(i),j) ;
-     }
-    }
+      //create new cross
+      fullMatrix<double> newmat(3,3);
+      for (int i = 0; i < 3; i++){
+        for (int j = 0; j < 3; j++){
+          newmat(i,j) = nextCross(Id(i),j) ;
+        }
+      }
 
-    STensor3 newcross(0.0);
-    newcross.setMat(newmat);
-    crossField[iter->first] = newcross;
-
-    //print info
-    printf("************** COUNT = %d \n", count);
-   if (Id(0) == 0 && Id(1) == 1 && Id(2) == 2)
-     printf("orient OK Id=%d %d %d\n", Id(0), Id(1), Id(2));
-   else{
-     printf("change orientation  Id=%d %d %d \n",  Id(0), Id(1), Id(2));
-     cross.print("cross ");
-     nextCross.print("nextCross ");
-     prod.print("product");
-     newcross.print("newcross");
-   }
+      STensor3 newcross(0.0);
+      newcross.setMat(newmat);
+      crossField[iter->first] = newcross;
 
-   fprintf(fi,"SP(%g,%g,%g) {%g};\n",nextV->x(),nextV->y(),nextV->z(), (double)count);
+      //print info
+      printf("************** COUNT = %d \n", count);
+      if (Id(0) == 0 && Id(1) == 1 && Id(2) == 2)
+        printf("orient OK Id=%d %d %d\n", Id(0), Id(1), Id(2));
+      else{
+        printf("change orientation  Id=%d %d %d \n",  Id(0), Id(1), Id(2));
+        cross.print("cross ");
+        nextCross.print("nextCross ");
+        prod.print("product");
+        newcross.print("newcross");
+      }
 
-    //continue recursion
-    recur_connect_vert (fi, count, nextV, newcross, v2v,touched);
+      if(fi)
+        fprintf(fi,"SP(%g,%g,%g) {%g};\n",nextV->x(),nextV->y(),nextV->z(), (double)count);
+
+      //continue recursion
+      recur_connect_vert (fi, count, nextV, newcross, v2v,touched);
     }
 
   }
-
 }
-void Frame_field::continuousCrossField(GRegion *gr, GFace *gf){
 
+void Frame_field::continuousCrossField(GRegion *gr, GFace *gf)
+{
   printf("continuous cross field \n");
 
   //start from a vertex of a face
@@ -886,14 +970,16 @@ void Frame_field::continuousCrossField(GRegion *gr, GFace *gf){
   STensor3 bCross = iter->second;
 
   FILE *fi = Fopen ("cross_recur.pos","w");
-  fprintf(fi,"View \"\"{\n");
-  fprintf(fi,"SP(%g,%g,%g) {%g};\n",beginV->x(),beginV->y(),beginV->z(), 0.0);
+  if(fi){
+    fprintf(fi,"View \"\"{\n");
+    fprintf(fi,"SP(%g,%g,%g) {%g};\n",beginV->x(),beginV->y(),beginV->z(), 0.0);
+  }
   int count = 0;
-
-  recur_connect_vert (fi, count, beginV,bCross,v2v,touched);
-
-  fprintf(fi,"};\n");
-  fclose (fi);
+  recur_connect_vert(fi, count, beginV,bCross,v2v,touched);
+  if(fi){
+    fprintf(fi,"};\n");
+    fclose (fi);
+  }
   //printf("touched =%d vert =%d \n", touched.size(), vertex_to_vertices.size());
 }
 
@@ -1058,9 +1144,9 @@ void Size_field::init_region(GRegion* gr){
   ANNpoint query;
   ANNidxArray indices;
   ANNdistArray distances;
-		
+
   faces = gr->faces();
-	
+
   field.clear();
 
   for(it=faces.begin();it!=faces.end();it++){
@@ -1075,47 +1161,47 @@ void Size_field::init_region(GRegion* gr){
   }
 
   ANNpointArray duplicate = annAllocPts(field.size(),3);
-	
+
   for(i=0;i<field.size();i++){
     duplicate[i][0] = field[i].first.x();
 	duplicate[i][1] = field[i].first.y();
 	duplicate[i][2] = field[i].first.z();
   }
-	
+
   kd_tree = new ANNkd_tree(duplicate,field.size(),3);
 
   boundary.clear();
-	
+
   query = annAllocPt(3);
   indices = new ANNidx[1];
   distances = new ANNdist[1];
-  
+
   index = 0;
   e = 0.0;
-	
+
   for(it=faces.begin();it!=faces.end();it++){
     gf = *it;
-    
+
 	for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);  
-	
+      element = gf->getMeshElement(i);
+
 	  for(j=0;j<element->getNumVertices();j++){
 	    vertex = element->getVertex(j);
-	  
+
 	    query[0] = vertex->x();
 	    query[1] = vertex->y();
 	    query[2] = vertex->z();
-	
+
 	    kd_tree->annkSearch(query,1,indices,distances,e);
 	    index = indices[0];
-	
+
 	    boundary.insert(std::pair<MVertex*,double>(vertex,field[index].second));
 	  }
 	}
   }
-	
+
   octree = new MElementOctree(model);
-	
+
   annDeallocPt(query);
   delete[] indices;
   delete[] distances;
@@ -1333,7 +1419,7 @@ void Size_field::clear(){
   delete kd_tree;
   annClose();
 #endif
-	
+
 }
 
 /****************class Nearest_point****************/
@@ -1642,6 +1728,7 @@ void Nearest_point::clear(){
 std::vector<std::pair<SPoint3,STensor3> > Frame_field::field;
 std::vector<int> Frame_field::labels;
 std::map<MVertex*, STensor3> Frame_field::crossField;
+std::map<MVertex*, double> Frame_field::crossFieldSmoothness;
 std::map<MEdge, double, Less_Edge> Frame_field::crossDist;
 std::map<MVertex*,std::set<MVertex*> > Frame_field::vertex_to_vertices;
 std::map<MVertex*,std::set<MElement*> > Frame_field::vertex_to_elements;
diff --git a/Mesh/directions3D.h b/Mesh/directions3D.h
index 0046da9..a9de8ec 100644
--- a/Mesh/directions3D.h
+++ b/Mesh/directions3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -28,6 +28,7 @@ class Frame_field{
   static std::vector<std::pair<SPoint3,STensor3> > field;
   static std::vector<int> labels;
   static std::map<MVertex*, STensor3> crossField;
+  static std::map<MVertex*, double> crossFieldSmoothness;
   static std::map<MEdge, double, Less_Edge> crossDist;
   static std::vector<MVertex*> listVertices;
 #if defined(HAVE_ANN)
@@ -54,6 +55,7 @@ class Frame_field{
   static STensor3 findCross(double x, double y, double z);
   static void initFace(GFace* gf);
   static void initRegion(GRegion* gr, int n);
+  static void buildSmoothness();
   static double smoothFace(GFace *gf, int n);
   static double smoothRegion(GRegion *gr, int n);
   static double smooth();
diff --git a/Mesh/filterElements.cpp b/Mesh/filterElements.cpp
index fa25fc7..b25870d 100644
--- a/Mesh/filterElements.cpp
+++ b/Mesh/filterElements.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,9 +15,8 @@
 #include "MQuadrangle.h"
 #include "MPrism.h"
 #include "MHexahedron.h"
-
-#if defined(HAVE_RTREE)
 #include "rtree.h"
+
 void MElementBB(void *a, double *min, double *max);
 int MElementInEle(void *a, double *x);
 
@@ -221,29 +220,3 @@ void filterOverlappingElements (std::vector<MElement*> &els,
   els = newEls;
 }
 
-#else
-
-void filterOverlappingElements (std::vector<MTriangle*> &blTris,
-				std::vector<MQuadrangle*>&blQuads,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst)
-{
-  Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
-}
-
-void filterOverlappingElements (std::vector<MPrism*> &blPrisms,
-				std::vector<MHexahedron*>&blHexes,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst)
-{
-  Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
-}
-
-void filterOverlappingElements (std::vector<MElement*> &els,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst )
-{
-  Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
-}
-
-#endif
diff --git a/Mesh/filterElements.h b/Mesh/filterElements.h
index f046b37..8186196 100644
--- a/Mesh/filterElements.h
+++ b/Mesh/filterElements.h
@@ -1,23 +1,32 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _FILTER_OVERLAPPING_ELEMENTS_
 #define _FILTER_OVERLAPPING_ELEMENTS_
+
 #include <map>
 #include <vector>
+
 class MElement;
 class MPrism;
 class MHexahedron;
 class MTriangle;
 class MQuadrangle;
-void filterOverlappingElements (std::vector<MElement*> &,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst);
-void filterOverlappingElements (std::vector<MPrism*> &blPrisms,
-				std::vector<MHexahedron*>&blHexes,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst);
-void filterOverlappingElements (std::vector<MTriangle*> &blTris,
-				std::vector<MQuadrangle*>&blQuads,
-				std::map<MElement*,std::vector<MElement*> > &_elemColumns,
-				std::map<MElement*,MElement*> &_toFirst);
+
+void filterOverlappingElements(std::vector<MElement*> &,
+                               std::map<MElement*,std::vector<MElement*> > &_elemColumns,
+                               std::map<MElement*,MElement*> &_toFirst);
+void filterOverlappingElements(std::vector<MPrism*> &blPrisms,
+                               std::vector<MHexahedron*>&blHexes,
+                               std::map<MElement*,std::vector<MElement*> > &_elemColumns,
+                               std::map<MElement*,MElement*> &_toFirst);
+void filterOverlappingElements(std::vector<MTriangle*> &blTris,
+                               std::vector<MQuadrangle*>&blQuads,
+                               std::map<MElement*,std::vector<MElement*> > &_elemColumns,
+                               std::map<MElement*,MElement*> &_toFirst);
 void filterColumns(std::vector<MElement*> &elem,
 		   std::map<MElement*,std::vector<MElement*> > &_elemColumns);
+
 #endif
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index 163daeb..8ca50b2 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,7 +8,7 @@
 #include "meshGEdge.h"
 #include "GEdge.h"
 #include "MLine.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "boundaryLayersData.h"
 #include "Numeric.h"
 #include "GmshMessage.h"
@@ -318,7 +318,8 @@ static void printFandPrimitive(int tag, std::vector<IntPoint> &Points)
 */
 
 // new algo for recombining + splitting
-static int increaseN (int N){
+static int increaseN (int N)
+{
   if (((N+1)/2 - 1) % 2 != 0) return N+2;
   return N;
 }
diff --git a/Mesh/meshGEdge.h b/Mesh/meshGEdge.h
index 0c8a932..d003d82 100644
--- a/Mesh/meshGEdge.h
+++ b/Mesh/meshGEdge.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGEdgeExtruded.cpp b/Mesh/meshGEdgeExtruded.cpp
index ebc8a3c..f7451f3 100644
--- a/Mesh/meshGEdgeExtruded.cpp
+++ b/Mesh/meshGEdgeExtruded.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index ab3ef3a..2e70056 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -58,7 +58,7 @@ static void computeElementShapes(GFace *gf, double &worst, double &avg,
   nT = 0;
   greaterThan = 0;
   for(unsigned int i = 0; i < gf->triangles.size(); i++){
-    double q = qmTriangle(gf->triangles[i], QMTRI_RHO);
+    double q = qmTriangle::gamma(gf->triangles[i]);
     if(q > .9) greaterThan++;
     avg += q;
     worst = std::min(worst, q);
@@ -94,7 +94,10 @@ public:
 	  std::vector<MLine*> temp;
 	  (*ite)->mesh_vertices.clear();
 	  for(unsigned int i = 0; i< (*ite)->lines.size(); i+=2){
-	    if (i+1 >= (*ite)->lines.size())Msg::Fatal("1D mesh cannot be divided by 2");
+	    if (i+1 >= (*ite)->lines.size()){
+	      Msg::Error("1D mesh cannot be divided by 2");
+	      break;
+	    }
 	    MVertex *v1 = (*ite)->lines[i]->getVertex(0);
 	    MVertex *v2 = (*ite)->lines[i]->getVertex(1);
 	    MVertex *v3 = (*ite)->lines[i+1]->getVertex(1);
@@ -156,7 +159,7 @@ public:
 	MEdge E = _gf->quadrangles[i]->getEdge(j);
 	SPoint2 p1, p2;
 	reparamMeshEdgeOnFace(E.getVertex(0),E.getVertex(1),_gf,p1,p2);
-	std::map<MEdge, MVertex *>::iterator it = _middle.find(E);
+	std::map<MEdge, MVertex *, Less_Edge>::iterator it = _middle.find(E);
 	std::map<MEdge, MVertex *, Less_Edge>::iterator it2 = eds.find(E);
 	m[j] = p1;
 	if (it == _middle.end() && it2 == eds.end()){
@@ -328,116 +331,137 @@ static void copyMesh(GFace *source, GFace *target)
   }
 
   bool translation = true;
-  bool rotation = false;
-
   SVector3 DX;
-  int count = 0;
-  for (std::map<MVertex*, MVertex*>::iterator it = vs2vt.begin();
-       it != vs2vt.end() ; ++it){
-    MVertex *vs = it->first;
-    MVertex *vt = it->second;
-    if (count == 0)
-      DX = SVector3(vt->x() - vs->x(), vt->y() - vs->y(), vt->z() - vs->z());
-    else {
-      SVector3 DX2 = DX - SVector3 (vt->x() - vs->x(), vt->y() - vs->y(),
-                                    vt->z() - vs->z());
-      if (DX2.norm() > DX.norm() * 1.e-5) translation = false;
-    }
-    count ++;
-  }
 
+  bool rotation = false;
   double rot[3][3] ;
   myLine LINE;
   double ANGLE=0;
-  if (!translation){
-    count = 0;
-    rotation = true;
-    std::vector<SPoint3> mps, mpt;
-    for (std::map<MVertex*, MVertex*>::iterator it = vs2vt.begin();
-         it != vs2vt.end() ; ++it){
-      MVertex *vs = it->first;
-      MVertex *vt = it->second;
-      mps.push_back(SPoint3(vs->x(), vs->y(), vs->z()));
-      mpt.push_back(SPoint3(vt->x(), vt->y(), vt->z()));
-    }
-    mean_plane mean_source, mean_target;
-    computeMeanPlaneSimple(mps, mean_source);
-    computeMeanPlaneSimple(mpt, mean_target);
-    myPlane PLANE_SOURCE(SPoint3(mean_source.x,mean_source.y,mean_source.z),
-                         SVector3(mean_source.a,mean_source.b,mean_source.c));
-    myPlane PLANE_TARGET(SPoint3(mean_target.x,mean_target.y,mean_target.z),
-                         SVector3(mean_target.a,mean_target.b,mean_target.c));
-    LINE = myLine(PLANE_SOURCE, PLANE_TARGET);
-
-    // LINE is the axis of rotation
-    // let us compute the angle of rotation
-    count = 0;
+
+  bool affine = false;
+  double mat[4][4];
+
+  if(target->affineTransform.size() == 16){
+    Msg::Info("Affine transformation specified");
+    affine = true;
+    for(int i = 0; i < 4; i++)
+      for(int j = 0; j < 4; j++)
+    	mat[i][j] = target->affineTransform[4 * i + j];
+  }
+  else{
+    int count = 0;
     for (std::map<MVertex*, MVertex*>::iterator it = vs2vt.begin();
-         it != vs2vt.end(); ++it){
+	 it != vs2vt.end() ; ++it){
       MVertex *vs = it->first;
       MVertex *vt = it->second;
-      // project both points on the axis: that should be the same point !
-      SPoint3 ps = SPoint3(vs->x(), vs->y(), vs->z());
-      SPoint3 pt = SPoint3(vt->x(), vt->y(), vt->z());
-      SPoint3 p_ps = LINE.orthogonalProjection(ps);
-      SPoint3 p_pt = LINE.orthogonalProjection(pt);
-      SVector3 dist1 = ps - pt;
-      SVector3 dist2 = p_ps - p_pt;
-      if (dist1.norm() > CTX::instance()->geom.tolerance){
-        if (dist2.norm() > 1.e-8 * dist1.norm()){
-          rotation = false;
-        }
-        SVector3 t1 = ps - p_ps;
-        SVector3 t2 = pt - p_pt;
-        if (t1.norm() > 1.e-8 * dist1.norm()){
-          if (count == 0)
-            ANGLE = myAngle(t1, t2, LINE.t);
-          else {
-            double ANGLE2 = myAngle(t1, t2, LINE.t);
-            if (fabs (ANGLE2 - ANGLE) > 1.e-8){
-              rotation = false;
-            }
-          }
-          count++;
-        }
+      if (count == 0)
+	DX = SVector3(vt->x() - vs->x(), vt->y() - vs->y(), vt->z() - vs->z());
+      else {
+	SVector3 DX2 = DX - SVector3(vt->x() - vs->x(), vt->y() - vs->y(),
+				     vt->z() - vs->z());
+	if (DX2.norm() > DX.norm() * 1.e-5) translation = false;
+      }
+      count ++;
+    }
+
+    if (!translation){
+      count = 0;
+      rotation = true;
+      std::vector<SPoint3> mps, mpt;
+      for (std::map<MVertex*, MVertex*>::iterator it = vs2vt.begin();
+	   it != vs2vt.end() ; ++it){
+	MVertex *vs = it->first;
+	MVertex *vt = it->second;
+	mps.push_back(SPoint3(vs->x(), vs->y(), vs->z()));
+	mpt.push_back(SPoint3(vt->x(), vt->y(), vt->z()));
+      }
+      mean_plane mean_source, mean_target;
+      computeMeanPlaneSimple(mps, mean_source);
+      computeMeanPlaneSimple(mpt, mean_target);
+      myPlane PLANE_SOURCE(SPoint3(mean_source.x,mean_source.y,mean_source.z),
+			   SVector3(mean_source.a,mean_source.b,mean_source.c));
+      myPlane PLANE_TARGET(SPoint3(mean_target.x,mean_target.y,mean_target.z),
+			   SVector3(mean_target.a,mean_target.b,mean_target.c));
+      LINE = myLine(PLANE_SOURCE, PLANE_TARGET);
+
+      // LINE is the axis of rotation
+      // let us compute the angle of rotation
+      count = 0;
+      for (std::map<MVertex*, MVertex*>::iterator it = vs2vt.begin();
+	   it != vs2vt.end(); ++it){
+	MVertex *vs = it->first;
+	MVertex *vt = it->second;
+	// project both points on the axis: that should be the same point !
+	SPoint3 ps = SPoint3(vs->x(), vs->y(), vs->z());
+	SPoint3 pt = SPoint3(vt->x(), vt->y(), vt->z());
+	SPoint3 p_ps = LINE.orthogonalProjection(ps);
+	SPoint3 p_pt = LINE.orthogonalProjection(pt);
+	SVector3 dist1 = ps - pt;
+	SVector3 dist2 = p_ps - p_pt;
+	if (dist1.norm() > CTX::instance()->geom.tolerance){
+	  if (dist2.norm() > 1.e-8 * dist1.norm()){
+	    rotation = false;
+	  }
+	  SVector3 t1 = ps - p_ps;
+	  SVector3 t2 = pt - p_pt;
+	  if (t1.norm() > 1.e-8 * dist1.norm()){
+	    if (count == 0)
+	      ANGLE = myAngle(t1, t2, LINE.t);
+	    else {
+	      double ANGLE2 = myAngle(t1, t2, LINE.t);
+	      if (fabs (ANGLE2 - ANGLE) > 1.e-8){
+		rotation = false;
+	      }
+	    }
+	    count++;
+	  }
+	}
       }
-    }
 
-    if (rotation){
-      Msg::Info("Periodic mesh rotation found: axis (%g,%g,%g) point (%g %g %g) angle %g",
-                LINE.t.x(), LINE.t.y(), LINE.t.z(), LINE.p.x(), LINE.p.y(), LINE.p.z(),
-                ANGLE * 180 / M_PI);
-      double ux = LINE.t.x();
-      double uy = LINE.t.y();
-      double uz = LINE.t.z();
-      rot[0][0] = cos (ANGLE) + ux*ux*(1.-cos(ANGLE));
-      rot[0][1] = ux*uy*(1.-cos(ANGLE)) - uz * sin(ANGLE);
-      rot[0][2] = ux*uz*(1.-cos(ANGLE)) + uy * sin(ANGLE);
-      rot[1][0] = ux*uy*(1.-cos(ANGLE)) + uz * sin(ANGLE);
-      rot[1][1] = cos (ANGLE) + uy*uy*(1.-cos(ANGLE));
-      rot[1][2] = uy*uz*(1.-cos(ANGLE)) - ux * sin(ANGLE);
-      rot[2][0] = ux*uz*(1.-cos(ANGLE)) - uy * sin(ANGLE);
-      rot[2][1] = uy*uz*(1.-cos(ANGLE)) + ux * sin(ANGLE);
-      rot[2][2] = cos (ANGLE) + uz*uz*(1.-cos(ANGLE));
+      if (rotation){
+	Msg::Info("Periodic mesh rotation found: axis (%g,%g,%g) point (%g %g %g) angle %g",
+		  LINE.t.x(), LINE.t.y(), LINE.t.z(), LINE.p.x(), LINE.p.y(), LINE.p.z(),
+		  ANGLE * 180 / M_PI);
+	double ux = LINE.t.x();
+	double uy = LINE.t.y();
+	double uz = LINE.t.z();
+	rot[0][0] = cos (ANGLE) + ux*ux*(1.-cos(ANGLE));
+	rot[0][1] = ux*uy*(1.-cos(ANGLE)) - uz * sin(ANGLE);
+	rot[0][2] = ux*uz*(1.-cos(ANGLE)) + uy * sin(ANGLE);
+	rot[1][0] = ux*uy*(1.-cos(ANGLE)) + uz * sin(ANGLE);
+	rot[1][1] = cos (ANGLE) + uy*uy*(1.-cos(ANGLE));
+	rot[1][2] = uy*uz*(1.-cos(ANGLE)) - ux * sin(ANGLE);
+	rot[2][0] = ux*uz*(1.-cos(ANGLE)) - uy * sin(ANGLE);
+	rot[2][1] = uy*uz*(1.-cos(ANGLE)) + ux * sin(ANGLE);
+	rot[2][2] = cos (ANGLE) + uz*uz*(1.-cos(ANGLE));
+      }
+      else {
+	Msg::Error("Only rotations or translations can be currently taken into account "
+		   "automatically for periodic faces: face %d not meshed", target->tag());
+	return;
+      }
     }
-    else {
-      Msg::Error("Only rotations or translations can be currently taken into account "
-                 "for periodic faces: face %d not meshed", target->tag());
-      return;
+    else{
+      Msg::Info("Periodic mesh translation found: dx = (%g,%g,%g)",
+		DX.x(), DX.y(), DX.z());
     }
   }
-  else{
-    Msg::Info("Periodic mesh translation found: dx = (%g,%g,%g)",
-              DX.x(), DX.y(), DX.z());
-  }
 
-  // now transform !!!
+  // now transform
   for(unsigned int i = 0; i < source->mesh_vertices.size(); i++){
     MVertex *vs = source->mesh_vertices[i];
-
     SPoint2 XXX;
-    if (translation) {
-      SPoint3 tp (vs->x() + DX.x(),vs->y() + DX.y(),vs->z() + DX.z());
+    if (affine) {
+      double ps[4] = {vs->x(), vs->y(), vs->z(), 1.};
+      double res[4] = {0., 0., 0., 0.};
+      for(int i = 0; i < 4; i++)
+	for(int j = 0; j < 4; j++)
+	  res[i] += mat[i][j] * ps[j];
+      SPoint3 tp (res[0], res[1], res[2]);
+      XXX = target->parFromPoint(tp);
+    }
+    else if (translation) {
+      SPoint3 tp (vs->x() + DX.x(), vs->y() + DX.y(), vs->z() + DX.z());
       XXX = target->parFromPoint(tp);
     }
     else if (rotation){
@@ -462,10 +486,11 @@ static void copyMesh(GFace *source, GFace *target)
       vt[j] = vs2vt[vs];
     }
     if (!vt[0] || !vt[1] ||!vt[2]){
-      Msg::Fatal("Yet another error in the copyMesh procedure %p %p %p %d %d %d",
+      Msg::Error("Problem in mesh copying procedure %p %p %p %d %d %d",
 		 vt[0], vt[1], vt[2], source->triangles[i]->getVertex(0)->onWhat()->dim(),
 		 source->triangles[i]->getVertex(1)->onWhat()->dim(),
 		 source->triangles[i]->getVertex(2)->onWhat()->dim());
+      return;
     }
     target->triangles.push_back(new MTriangle(vt[0], vt[1], vt[2]));
   }
@@ -476,7 +501,7 @@ static void copyMesh(GFace *source, GFace *target)
     MVertex *v3 = vs2vt[source->quadrangles[i]->getVertex(2)];
     MVertex *v4 = vs2vt[source->quadrangles[i]->getVertex(3)];
     if (!v1 || !v2 || !v3 || !v4){
-      Msg::Fatal("Yet another error in the copymesh procedure %p %p %p %p %d %d %d %d",
+      Msg::Error("Problem in mesh copying procedure %p %p %p %p %d %d %d %d",
 		 v1, v2, v3, v4,
 		 source->quadrangles[i]->getVertex(0)->onWhat()->dim(),
 		 source->quadrangles[i]->getVertex(1)->onWhat()->dim(),
@@ -754,7 +779,7 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf)
   edges.insert(edges.begin(), embedded_edges.begin(),embedded_edges.end());
   std::list<GEdge*>::iterator ite = edges.begin();
   FILE *ff2 = Fopen ("tato.pos","w");
-  fprintf(ff2,"View \" \"{\n");
+  if(ff2) fprintf(ff2,"View \" \"{\n");
   std::set<MVertex*> verts;
   while(ite != edges.end()){
     for(unsigned int i = 0; i< (*ite)->lines.size(); i++){
@@ -787,13 +812,14 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf)
 	  MQuadrangle *qq = new MQuadrangle(v11,v21,v22,v12);
 	  myCol.push_back(qq);
 	  blQuads.push_back(qq);
-	  fprintf(ff2,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
-		  v11->x(),v11->y(),v11->z(),
-		  v12->x(),v12->y(),v12->z(),
-		  v22->x(),v22->y(),v22->z(),
-		  v21->x(),v21->y(),v21->z());
+          if(ff2)
+            fprintf(ff2,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
+                    v11->x(),v11->y(),v11->z(),
+                    v12->x(),v12->y(),v12->z(),
+                    v22->x(),v22->y(),v22->z(),
+                    v21->x(),v21->y(),v21->z());
 	}
-	//	int M = std::max(c1._column.size(),c2._column.size());
+	// int M = std::max(c1._column.size(),c2._column.size());
 	for (unsigned int l=0;l<myCol.size();l++)_columns->_toFirst[myCol[l]] = myCol[0];
 	_columns->_elemColumns[myCol[0]] = myCol;
       }
@@ -827,20 +853,22 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf)
 	  MQuadrangle *qq = new MQuadrangle(v11,v12,v22,v21);
 	  myCol.push_back(qq);
 	  blQuads.push_back(qq);
-	  fprintf(ff2,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
-		  v11->x(),v11->y(),v11->z(),
-		  v12->x(),v12->y(),v12->z(),
-		  v22->x(),v22->y(),v22->z(),
-		  v21->x(),v21->y(),v21->z());
+	  if(ff2)
+            fprintf(ff2,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
+                    v11->x(),v11->y(),v11->z(),
+                    v12->x(),v12->y(),v12->z(),
+                    v22->x(),v22->y(),v22->z(),
+                    v21->x(),v21->y(),v21->z());
 	}
 	else {
 	  MTriangle *qq = new MTriangle(v,v22,v21);
 	  myCol.push_back(qq);
 	  blTris.push_back(qq);
-	  fprintf(ff2,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
-		  v->x(),v->y(),v->z(),
-		  v22->x(),v22->y(),v22->z(),
-		  v21->x(),v21->y(),v21->z());
+          if(ff2)
+            fprintf(ff2,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1,1};\n",
+                    v->x(),v->y(),v->z(),
+                    v22->x(),v22->y(),v22->z(),
+                    v21->x(),v21->y(),v21->z());
 	}
       }
     }
@@ -848,8 +876,10 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf)
     _columns->_elemColumns[myCol[0]] = myCol;
   }
 
-  fprintf(ff2,"};\n");
-  fclose(ff2);
+  if(ff2){
+    fprintf(ff2,"};\n");
+    fclose(ff2);
+  }
 
   //  filterOverlappingElements (blTris,blQuads,_columns->_elemColumns,_columns->_toFirst);
 
@@ -875,16 +905,18 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf)
   std::set<MEdge,Less_Edge>::iterator it =  bedges.begin();
 
   FILE *ff = Fopen ("toto.pos","w");
-  fprintf(ff,"View \" \"{\n");
+  if(ff) fprintf(ff,"View \" \"{\n");
   for (; it != bedges.end(); ++it){
     ne.lines.push_back(new MLine (it->getVertex(0),it->getVertex(1)));
-    fprintf(ff,"SL (%g,%g,%g,%g,%g,%g){1,1};\n",
-	    it->getVertex(0)->x(),it->getVertex(0)->y(),it->getVertex(0)->z(),
-	    it->getVertex(1)->x(),it->getVertex(1)->y(),it->getVertex(1)->z());
+    if(ff)
+      fprintf(ff,"SL (%g,%g,%g,%g,%g,%g){1,1};\n",
+              it->getVertex(0)->x(),it->getVertex(0)->y(),it->getVertex(0)->z(),
+              it->getVertex(1)->x(),it->getVertex(1)->y(),it->getVertex(1)->z());
+  }
+  if(ff){
+    fprintf(ff,"};\n");
+    fclose(ff);
   }
-  fprintf(ff,"};\n");
-  fclose(ff);
-
   hop.push_back(&ne);
 
   deMeshGFace kil_;
@@ -1077,7 +1109,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
   }
 
   // build a set with all points of the boundaries
-  std::set<MVertex*> all_vertices, boundary;
+  std::set<MVertex*, MVertexLessThanNum> all_vertices, boundary;
   std::list<GEdge*>::iterator ite = edges.begin();
   while(ite != edges.end()){
     if((*ite)->isSeam(gf)) return false;
@@ -1152,7 +1184,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
   if(all_vertices.size() == 3){
     MVertex *vv[3];
     int i = 0;
-    for(std::set<MVertex*>::iterator it = all_vertices.begin();
+    for(std::set<MVertex*, MVertexLessThanNum>::iterator it = all_vertices.begin();
 	it != all_vertices.end(); it++){
       vv[i++] = *it;
     }
@@ -1170,7 +1202,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
   std::vector<BDS_Point*> points(all_vertices.size());
   SBoundingBox3d bbox;
   int count = 0;
-  for(std::set<MVertex*>::iterator it = all_vertices.begin();
+  for(std::set<MVertex*, MVertexLessThanNum>::iterator it = all_vertices.begin();
       it != all_vertices.end(); it++){
     MVertex *here = *it;
     GEntity *ge = here->onWhat();
@@ -1266,7 +1298,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
   {
     std::vector<MVertex*> v;
     std::vector<MTriangle*> result;
-    v.insert(v.end(),all_vertices.begin(),all_vertices.end());
+    v.insert(v.end(), all_vertices.begin(), all_vertices.end());
 
     std::map<MVertex*,SPoint3> pos;
     for(unsigned int i = 0; i < v.size(); i++) {
@@ -1334,7 +1366,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
   }
 
 
-    // effectively recover the medge
+  // effectively recover the medge
   ite = edges.begin();
   while(ite != edges.end()){
     if(!(*ite)->isMeshDegenerated()){
@@ -2122,7 +2154,6 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true)
   {
     /// FIXME FOR PERIODIC : SOME MVERTices SHOULD BE DUPLICATED ...
     /// Still to be done...
-    printf("coucou1\n");
     std::vector<MVertex*> v;
     std::map<MVertex*, BDS_Point*> recoverMapInv;
     for(unsigned int i = 0; i < edgeLoops_BDS.size(); i++){
@@ -2134,7 +2165,7 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true)
       }
     }
 
-    printf("coucou2 %d verices\n",v.size());
+    //    printf("coucou2 %d verices\n",v.size());
     std::map<MVertex*,SPoint3> pos;
     for(unsigned int i = 0; i < v.size(); i++) {
       MVertex *v0 = v[i];
@@ -2815,6 +2846,64 @@ void partitionAndRemesh(GFaceCompound *gf)
 #endif
 }
 
+static bool getGFaceNormalFromVert(GFace *gf, MElement *el, SVector3 &nf)
+{
+  bool found = false;
+  for (int iElV = 0; iElV < el->getNumVertices(); iElV++) {
+    MVertex *v = el->getVertex(iElV);
+    SPoint2 param;
+    if(v->onWhat() == gf && v->getParameter(0, param[0]) &&
+       v->getParameter(1, param[1])) {
+      nf = gf->normal(param);
+      found = true;
+      break;
+    }
+  }
+  return found;
+}
+
+static bool getGFaceNormalFromBary(GFace *gf, MElement *el, SVector3 &nf)
+{
+  SPoint2 param(0., 0.);
+  bool ok = true;
+  for (int j = 0; j < el->getNumVertices(); j++) {
+    SPoint2 p;
+    // FIXME: use inexact reparam because some vertices might not be
+    // exactly on the surface after the 3D Delaunay
+    ok = reparamMeshVertexOnFace(el->getVertex(j), gf, p, false);
+    if (!ok) break;
+    param += p;
+  }
+  if (ok) {
+    param *= 1. / el->getNumVertices();
+    nf = gf->normal(param);
+  }
+  return ok;
+}
+
+static void getGFaceOrientation(GFace *gf, BoundaryLayerColumns *blc,
+                                bool existBL, bool fromVert,
+                                int &orientNonBL, int &orientBL)
+{
+  for (unsigned int iEl = 0; iEl < gf->getNumMeshElements(); iEl++) {
+    MElement *e = gf->getMeshElement(iEl);
+    const bool isBLEl = existBL &&
+                        (blc->_toFirst.find(e) != blc->_toFirst.end());
+    SVector3 nf;
+    if ((!isBLEl && orientNonBL == 0) || (isBLEl && orientBL == 0)) {       // Check only if orientation of BL/non-BL el. not already known
+      const bool found = fromVert ? getGFaceNormalFromVert(gf, e, nf) :
+                                    getGFaceNormalFromBary(gf, e, nf);
+      if (found) {
+        SVector3 ne = e->getFace(0).normal();
+        const int orient = (dot(ne, nf) > 0.) ? 1 : -1;
+        if (isBLEl) orientBL = orient;
+        else orientNonBL = orient;
+      }
+    }
+    if ((orientNonBL != 0) && (orientBL != 0)) break;                       // Stop when orientation found for non-BL and BL el.
+  }
+}
+
 void orientMeshGFace::operator()(GFace *gf)
 {
   if(!gf->getNumMeshElements()) return;
@@ -2827,8 +2916,8 @@ void orientMeshGFace::operator()(GFace *gf)
      gf->geomType() == GEntity::CompoundSurface){
     // don't do anything
   }
-  else{
-    // in old versions we checked the orientation by comparing the orientation
+  else {
+    // In old versions we checked the orientation by comparing the orientation
     // of a line element on the boundary w.r.t. its connected surface
     // element. This is probably better than what follows, but
     // * it failed when the 3D Delaunay changes the 1D mesh (since we don't
@@ -2836,66 +2925,48 @@ void orientMeshGFace::operator()(GFace *gf)
     // * it failed with OpenCASCADE geometries, where surface orientions do not
     //   seem to be consistent with the orientation of the bounding edges
 
-    bool done = false;
-    // first, try to find an element with one vertex categorized on the
-    // surface and for which we have valid surface parametric
-    // coordinates
-    for(unsigned int i = 0; i < gf->getNumMeshElements(); i++){
-      MElement *e = gf->getMeshElement(i);
-      for(int j = 0; j < e->getNumVertices(); j++){
-        MVertex *v = e->getVertex(j);
-        SPoint2 param;
-        if(v->onWhat() == gf && v->getParameter(0, param[0]) &&
-           v->getParameter(1, param[1])){
-          SVector3 nf = gf->normal(param);
-          SVector3 ne = e->getFace(0).normal();
-          if(dot(ne, nf) < 0){
-            Msg::Debug("Reversing orientation of mesh in face %d (param)", gf->tag());
-            for(unsigned int k = 0; k < gf->getNumMeshElements(); k++)
-              gf->getMeshElement(k)->reverse();
-          }
-          done = true;
-          break;
-        }
-      }
-      if(done) break;
-    }
-
-    if(!done){
-      // if we could not find such an element, just try to evaluate the
-      // normal at the barycenter of an element on the surface
-      for(unsigned int i = 0; i < gf->getNumMeshElements(); i++){
-        MElement *e = gf->getMeshElement(i);
-        SPoint2 param(0., 0.);
-        bool ok = true;
-        for(int j = 0; j < e->getNumVertices(); j++){
-          SPoint2 p;
-          // FIXME: use inexact reparam because some vertices might not be
-          // exactly on the surface after the 3D Delaunay
-          ok = reparamMeshVertexOnFace(e->getVertex(j), gf, p, false);
-          if(!ok) break;
-          param += p;
-        }
-        if(ok){
-          param *= 1. / e->getNumVertices();
-          SVector3 nf = gf->normal(param);
-          SVector3 ne = e->getFace(0).normal();
-          if(dot(ne, nf) < 0){
-            Msg::Debug("Reversing 2 orientation of mesh in face %d (cog)", gf->tag());
-            for(unsigned int k = 0; k < gf->getNumMeshElements(); k++)
-              gf->getMeshElement(k)->reverse();
+    // Now: orient surface elements w.r.t. normal to geometric model.
+    // Assumes that originally, orientation is consistent among boundary layer
+    // (BL) elements, and orientation is consistent among non-BL elements, but
+    // BL and non-BL elements can be oriented differently
+
+    // Determine whether there is a boundary layer (BL)
+    BoundaryLayerColumns *blc = gf->getColumns();
+    const bool existBL = !blc->_toFirst.empty();
+
+    // Get orientation of BL and non-BL elements.
+    // First, try to get normal to GFace from vertices.
+    // If it fails, try to get normal to GFace from element barycenter
+    int orientNonBL = 0, orientBL = existBL ? 0 : 1;
+    getGFaceOrientation(gf, blc, existBL, true, orientNonBL, orientBL);
+    if ((orientNonBL == 0) || (orientBL == 0))
+      getGFaceOrientation(gf, blc, existBL, false, orientNonBL, orientBL);
+
+    // Exit if could not determine orientation of both non-BL el. and BL el.
+    if ((orientNonBL == 0) && (orientBL == 0)) {
+      Msg::Warning("Could not orient mesh in face %d", gf->tag());
+      return;
+    }
+
+    // Reverse BL and non-BL elements if needed
+    if (existBL) {                                                          // If there is a BL, test BL/non-BL elements
+      if ((orientNonBL == -1) || (orientBL == -1))
+        for (unsigned int iEl = 0; iEl < gf->getNumMeshElements(); iEl++) {
+          MElement *e = gf->getMeshElement(iEl);
+          if (blc->_toFirst.find(e) == blc->_toFirst.end()) {               // If el. outside of BL...
+            if (orientNonBL == -1) e->reverse();                            // ... reverse if needed
           }
-          done = true;
-          break;
+          else                                                              // If el. in BL
+            if (orientBL == -1) e->reverse();                               // ... reverse if needed
         }
-      }
     }
-
-    if(!done)
-      Msg::Warning("Could not orient mesh in face %d", gf->tag());
+    else                                                                    // If no BL, reverse all elements if needed
+      if (orientNonBL == -1)
+        for (unsigned int iEl = 0; iEl < gf->getNumMeshElements(); iEl++)
+          gf->getMeshElement(iEl)->reverse();
   }
 
-  // apply user-specified mesh orientation constraints
+  // Apply user-specified mesh orientation constraints
   if(gf->meshAttributes.reverseMesh)
     for(unsigned int k = 0; k < gf->getNumMeshElements(); k++)
       gf->getMeshElement(k)->reverse();
diff --git a/Mesh/meshGFace.h b/Mesh/meshGFace.h
index 857e24e..2b66d01 100644
--- a/Mesh/meshGFace.h
+++ b/Mesh/meshGFace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceBDS.cpp b/Mesh/meshGFaceBDS.cpp
index c96846e..b09b2b8 100644
--- a/Mesh/meshGFaceBDS.cpp
+++ b/Mesh/meshGFaceBDS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -234,10 +234,10 @@ bool evalSwapForOptimize(BDS_Edge *e, GFace *gf, BDS_Mesh &m)
 
   // First, evaluate what we gain in element quality if the
   // swap is performed
-  double qa1 = qmTriangle(p11, p12, p13, QMTRI_RHO);
-  double qa2 = qmTriangle(p21, p22, p23, QMTRI_RHO);
-  double qb1 = qmTriangle(p31, p32, p33, QMTRI_RHO);
-  double qb2 = qmTriangle(p41, p42, p43, QMTRI_RHO);
+  double qa1 = qmTriangle::gamma(p11, p12, p13);
+  double qa2 = qmTriangle::gamma(p21, p22, p23);
+  double qb1 = qmTriangle::gamma(p31, p32, p33);
+  double qb2 = qmTriangle::gamma(p41, p42, p43);
   double qa = std::min(qa1, qa2);
   double qb = std::min(qb1, qb2);
   double qualIndicator = qb - qa;
@@ -357,10 +357,10 @@ bool evalSwap(BDS_Edge *e, double &qa, double &qb)
 
   if(e->numfaces() != 2) return false;
   e->oppositeof (op);
-  double qa1 = qmTriangle(e->p1, e->p2, op[0], QMTRI_RHO);
-  double qa2 = qmTriangle(e->p1, e->p2, op[1], QMTRI_RHO);
-  double qb1 = qmTriangle(e->p1, op[0], op[1], QMTRI_RHO);
-  double qb2 = qmTriangle(e->p2, op[0], op[1], QMTRI_RHO);
+  double qa1 = qmTriangle::gamma(e->p1, e->p2, op[0]);
+  double qa2 = qmTriangle::gamma(e->p1, e->p2, op[1]);
+  double qb1 = qmTriangle::gamma(e->p1, op[0], op[1]);
+  double qb2 = qmTriangle::gamma(e->p2, op[0], op[1]);
   qa = std::min(qa1, qa2);
   qb = std::min(qb1, qb2);
   return true;
@@ -381,10 +381,10 @@ int edgeSwapTestQuality(BDS_Edge *e, double fact=1.1, bool force=false)
     if (!edgeSwapTestAngle(e, cos(CTX::instance()->mesh.allowSwapEdgeAngle * M_PI / 180.)))
       return -1;
 
-  double qa1 = qmTriangle(e->p1, e->p2, op[0], QMTRI_RHO);
-  double qa2 = qmTriangle(e->p1, e->p2, op[1], QMTRI_RHO);
-  double qb1 = qmTriangle(e->p1, op[0], op[1], QMTRI_RHO);
-  double qb2 = qmTriangle(e->p2, op[0], op[1], QMTRI_RHO);
+  double qa1 = qmTriangle::gamma(e->p1, e->p2, op[0]);
+  double qa2 = qmTriangle::gamma(e->p1, e->p2, op[1]);
+  double qb1 = qmTriangle::gamma(e->p1, op[0], op[1]);
+  double qb2 = qmTriangle::gamma(e->p2, op[0], op[1]);
   double qa = std::min(qa1, qa2);
   double qb = std::min(qb1, qb2);
   if(qb > fact * qa) return 1;
@@ -479,6 +479,14 @@ static void midpointsphere(GFace *gf, double u1, double v1, double u2, double v2
 }
 */
 
+bool edges_sort(std::pair<double, BDS_Edge*> a, std::pair<double, BDS_Edge*> b)
+{
+  if (a.first == b.first)
+    return ((*a.second) < (*b.second));
+  else
+    return (a.first < b.first);
+}
+
 void splitEdgePass(GFace *gf, BDS_Mesh &m, double MAXE_, int &nb_split)
 {
   std::list<BDS_Edge*>::iterator it = m.edges.begin();
@@ -494,7 +502,7 @@ void splitEdgePass(GFace *gf, BDS_Mesh &m, double MAXE_, int &nb_split)
     ++it;
   }
 
-  std::sort(edges.begin(), edges.end());
+  std::sort(edges.begin(), edges.end(), edges_sort);
 
   for (unsigned int i = 0; i < edges.size(); ++i){
     BDS_Edge *e = edges[i].second;
@@ -547,7 +555,7 @@ void collapseEdgePass(GFace *gf, BDS_Mesh &m, double MINE_, int MAXNP, int &nb_c
     ++it;
   }
 
-  std::sort(edges.begin(), edges.end());
+  std::sort(edges.begin(), edges.end(), edges_sort);
 
   for (unsigned int i = 0; i < edges.size(); i++){
     BDS_Edge *e = edges[i].second;
@@ -771,8 +779,8 @@ void invalidEdgesPeriodic(BDS_Mesh &m, std::map<BDS_Point*, MVertex*,PointLessTh
   while (it != m.edges.end()){
     BDS_Edge *e = *it;
     if (!e->deleted && e->numfaces() == 2){
-      std::map<BDS_Point*, MVertex*>::iterator itp1 = recoverMap->find(e->p1);
-      std::map<BDS_Point*, MVertex*>::iterator itp2 = recoverMap->find(e->p2);
+      std::map<BDS_Point*, MVertex*,PointLessThan>::iterator itp1 = recoverMap->find(e->p1);
+      std::map<BDS_Point*, MVertex*,PointLessThan>::iterator itp2 = recoverMap->find(e->p2);
       if (itp1 != recoverMap->end() &&
           itp2 != recoverMap->end() &&
           itp1->second == itp2->second) toSplit.insert(e);
diff --git a/Mesh/meshGFaceBDS.h b/Mesh/meshGFaceBDS.h
index 0b0db94..54eb0de 100644
--- a/Mesh/meshGFaceBDS.h
+++ b/Mesh/meshGFaceBDS.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceBamg.cpp b/Mesh/meshGFaceBamg.cpp
index 586a6c6..a528176 100644
--- a/Mesh/meshGFaceBamg.cpp
+++ b/Mesh/meshGFaceBamg.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -16,7 +16,7 @@
 #include "Context.h"
 #include <list>
 #include <map>
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "meshGFaceDelaunayInsertion.h"
 #include "Options.h"
 #include "meshGFace.h"
diff --git a/Mesh/meshGFaceBamg.h b/Mesh/meshGFaceBamg.h
index cffb95b..11a58c4 100644
--- a/Mesh/meshGFaceBamg.h
+++ b/Mesh/meshGFaceBamg.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp
index ed1e61a..14cad8f 100644
--- a/Mesh/meshGFaceDelaunayInsertion.cpp
+++ b/Mesh/meshGFaceDelaunayInsertion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -10,6 +10,8 @@
 #include "OS.h"
 #include "robustPredicates.h"
 #include "BackgroundMesh.h"
+#include "surfaceFiller.h"
+#include "pointInsertion.h"
 #include "meshGFaceDelaunayInsertion.h"
 #include "meshGFaceOptimize.h"
 #include "meshGFace.h"
@@ -23,31 +25,22 @@
 #include "GModel.h"
 #include "GFaceCompound.h"
 #include "intersectCurveSurface.h"
-#include "surfaceFiller.h"
 #include "HilbertCurve.h"
 
-double LIMIT_ = 0.5 * sqrt(2.0) * 1;
-int  N_GLOBAL_SEARCH;
-int  N_SEARCH;
-double DT_INSERT_VERTEX;
+static double LIMIT_ = 0.5 * sqrt(2.0) * 1;
+static int  N_GLOBAL_SEARCH;
+static int  N_SEARCH;
+static double DT_INSERT_VERTEX;
 int MTri3::radiusNorm = 2;
 
-/*
-static bool isBoundary(MTri3 *t, double limit_, int &active)
-{
-  if (t->isDeleted()) return false;
-  for (active = 0; active < 3; active++){
-    MTri3 *neigh = t->getNeigh(active);
-    if (!neigh) return true;
-  }
-  return false;
-}
-*/
-
 template <class ITERATOR>
 void _printTris(char *name, ITERATOR it,  ITERATOR end, bidimMeshData * data)
 {
   FILE *ff = Fopen (name,"w");
+  if(!ff){
+    Msg::Error("Could not open file '%s'", name);
+    return;
+  }
   fprintf(ff,"View\"test\"{\n");
   while ( it != end ){
     MTri3 *worst = *it;
@@ -88,7 +81,6 @@ void _printTris(char *name, ITERATOR it,  ITERATOR end, bidimMeshData * data)
   fclose (ff);
 }
 
-
 static bool isActive(MTri3 *t, double limit_, int &active)
 {
   if (t->isDeleted()) return false;
@@ -777,11 +769,8 @@ bool insertVertexB (std::list<edgeXface> &shell,
   if (fabs(oldVolume - newVolume) < 1.e-12 * oldVolume && !onePointIsTooClose){
     connectTris(new_cavity.begin(), new_cavity.end(),conn);
     //    printf("%d %d\n",shell.size(),cavity.size());
-    //    clock_t t1 = clock();
     // 30 % of the time is spent here !!!
     allTets.insert(newTris, newTris + shell.size());
-    //    clock_t t2 = clock();
-    //    __DT2 += (double)(clock()-t1)/CLOCKS_PER_SEC;
     if (activeTets){
       for (std::list<MTri3*>::iterator i = new_cavity.begin(); i != new_cavity.end(); ++i){
         int active_edge;
@@ -1521,20 +1510,29 @@ void optimalPointFrontalQuad (GFace *gf,
 }
 
 void optimalPointFrontalQuadB (GFace *gf,
-			       MTri3* worst,
-			       int active_edge,
-			       bidimMeshData &data,
-			       double newPoint[2],
-			       double metric[3])
+    MTri3* worst,
+    int active_edge,
+    bidimMeshData &data,
+    double newPoint[2],
+    double metric[3])
 {
   optimalPointFrontalQuad (gf,worst,active_edge,data,newPoint,metric);
   return;
 }
 
 void buildBackGroundMesh (GFace *gf,
-		  std::map<MVertex* , MVertex*>* equivalence,
-		  std::map<MVertex*, SPoint2> * parametricCoordinates)
+    std::map<MVertex* , MVertex*>* equivalence,
+    std::map<MVertex*, SPoint2> * parametricCoordinates)
 {
+  // TODO PEB :
+  // this is now done in the new backgroundMesh !!!
+  // on le vire ? On insère ici les operations sur le new backgmesh ?
+  // parce que les opérations qui suivent sur l'ancien BGM sont inutiles maintenant... !
+  if (!old_algo_hexa())
+    return;
+//#else
+  // END PEB + endif...
+
   //  printf("build bak mesh\n");
   quadsToTriangles(gf, 100000);
 
@@ -1543,17 +1541,17 @@ void buildBackGroundMesh (GFace *gf,
     //    std::vector<MQuadrangle*> QR;
     for(unsigned int i = 0; i < gf->triangles.size(); i++){
       TR.push_back(new MTriangle(gf->triangles[i]->getVertex(0),
-				 gf->triangles[i]->getVertex(1),
-				 gf->triangles[i]->getVertex(2)));
+            gf->triangles[i]->getVertex(1),
+            gf->triangles[i]->getVertex(2)));
     }
     /*
-    for(int i=0;i<gf->quadrangles.size();i++){
-      QR.push_back(new MQuadrangle(gf->quadrangles[i]->getVertex(0),
-				   gf->quadrangles[i]->getVertex(1),
-				   gf->quadrangles[i]->getVertex(2),
-				   gf->quadrangles[i]->getVertex(3)));
-    }
-    */
+       for(int i=0;i<gf->quadrangles.size();i++){
+       QR.push_back(new MQuadrangle(gf->quadrangles[i]->getVertex(0),
+       gf->quadrangles[i]->getVertex(1),
+       gf->quadrangles[i]->getVertex(2),
+       gf->quadrangles[i]->getVertex(3)));
+       }
+     */
     // avoid computing curvatures on the fly : only on the
     // BGM computes once curvatures at each node
     //  Disable curvature control
@@ -1578,11 +1576,12 @@ void buildBackGroundMesh (GFace *gf,
     //    gf->quadrangles = QR;
   }
 
+//#endif
 }
 
 void bowyerWatsonFrontalLayers(GFace *gf, bool quad,
-		  std::map<MVertex* , MVertex*>* equivalence,
-		  std::map<MVertex*, SPoint2> * parametricCoordinates)
+    std::map<MVertex* , MVertex*>* equivalence,
+    std::map<MVertex*, SPoint2> * parametricCoordinates)
 {
 
   std::set<MTri3*,compareTri3Ptr> AllTris;
@@ -1635,11 +1634,11 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad,
       if (!ActiveTris.size())break;
 
       /*      if (1 || gf->tag() == 1900){
-	char name[245];
-	sprintf(name,"x_GFace_%d_Layer_%d.pos",gf->tag(),ITER);
-	_printTris (name, AllTris, Us,Vs,true);
-      }
-      */
+              char name[245];
+              sprintf(name,"x_GFace_%d_Layer_%d.pos",gf->tag(),ITER);
+              _printTris (name, AllTris, Us,Vs,true);
+              }
+       */
       std::set<MTri3*,compareTri3Ptr>::iterator WORST_ITER = ActiveTris.begin();
 
       MTri3 *worst = (*WORST_ITER);
@@ -1647,38 +1646,38 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad,
       if (!worst->isDeleted() &&
           (ITERATION > max_layers ? isActive(worst, LIMIT_, active_edge) :
            isActive(worst, LIMIT_, active_edge,&_front) ) &&
-	  worst->getRadius() > LIMIT_){
-	// for (active_edge = 0 ; active_edge < 0 ; active_edge ++){
-	//   if (active_edges[active_edge])break;
-	// }
-	// Msg::Info("%7d points created -- Worst tri infinite radius is %8.3f -- "
+          worst->getRadius() > LIMIT_){
+        // for (active_edge = 0 ; active_edge < 0 ; active_edge ++){
+        //   if (active_edges[active_edge])break;
+        // }
+        // Msg::Info("%7d points created -- Worst tri infinite radius is %8.3f -- "
         //           "front size %6d", vSizes.size(), worst->getRadius(),_front.size());
-	if(ITER++ % 5000 == 0)
-	  Msg::Debug("%7d points created -- Worst tri infinite radius is %8.3f -- "
-                     "front size %6d", DATA.vSizes.size(), worst->getRadius(),_front.size());
-
-	// compute the middle point of the edge
-	double newPoint[2],metric[3]={1,0,1};
-	if (quad) optimalPointFrontalQuadB (gf,worst,active_edge,DATA,newPoint,metric);
-	else optimalPointFrontalB (gf,worst,active_edge,DATA,newPoint,metric);
-
-	//	printf("start INSERT A POINT %g %g \n",newPoint[0],newPoint[1]);
-	insertAPoint(gf, AllTris.end(), newPoint, 0, DATA, AllTris, &ActiveTris, worst);
-	//  else if (!worst->isDeleted() && worst->getRadius() > LIMIT_){
-	//    ActiveTrisNotInFront.insert(worst);
-	//  }
-	//  printf("-----------------> size %d\n",AllTris.size());
-
-	/*
-	  if(ITER % 1== 0){
-	  char name[245];
-	  sprintf(name,"frontal%d-ITER%d.pos",gf->tag(),ITER);
-	  _printTris (name, AllTris, Us,Vs,false);
-	  }
-	*/
+        if(ITER++ % 5000 == 0)
+          Msg::Debug("%7d points created -- Worst tri infinite radius is %8.3f -- "
+              "front size %6d", DATA.vSizes.size(), worst->getRadius(),_front.size());
+
+        // compute the middle point of the edge
+        double newPoint[2],metric[3]={1,0,1};
+        if (quad) optimalPointFrontalQuadB (gf,worst,active_edge,DATA,newPoint,metric);
+        else optimalPointFrontalB (gf,worst,active_edge,DATA,newPoint,metric);
+
+        //	printf("start INSERT A POINT %g %g \n",newPoint[0],newPoint[1]);
+        insertAPoint(gf, AllTris.end(), newPoint, 0, DATA, AllTris, &ActiveTris, worst);
+        //  else if (!worst->isDeleted() && worst->getRadius() > LIMIT_){
+        //    ActiveTrisNotInFront.insert(worst);
+        //  }
+        //  printf("-----------------> size %d\n",AllTris.size());
+
+        /*
+           if(ITER % 1== 0){
+           char name[245];
+           sprintf(name,"frontal%d-ITER%d.pos",gf->tag(),ITER);
+           _printTris (name, AllTris, Us,Vs,false);
+           }
+         */
       }
       else if (!worst->isDeleted() && worst->getRadius() > LIMIT_){
-	ActiveTrisNotInFront.insert(worst);
+        ActiveTrisNotInFront.insert(worst);
       }
     }
     _front.clear();
@@ -1687,397 +1686,401 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad,
     for ( ; it!=ActiveTrisNotInFront.end();++it){
       //    for ( ; it!=AllTris.end();++it){
       if((*it)->getRadius() > LIMIT_ && isActive(*it,LIMIT_,active_edge)){
-	ActiveTris.insert(*it);
-	updateActiveEdges(*it, LIMIT_, _front);
+        ActiveTris.insert(*it);
+        updateActiveEdges(*it, LIMIT_, _front);
       }
     }
     //	Msg::Info("%d active tris %d front edges %d not in front",
     //            ActiveTris.size(),_front.size(),ActiveTrisNotInFront.size());
     if (!ActiveTris.size()) break;
-  }
+    }
 
-  // char name[245];
-  // sprintf(name,"frontal%d-real.pos", gf->tag());
-  // _printTris (name, AllTris, Us, Vs,false);
-  // sprintf(name,"frontal%d-param.pos", gf->tag());
-  // _printTris (name, AllTris, Us, Vs,true);
-  transferDataStructure(gf, AllTris, DATA);
-  MTri3::radiusNorm = 2;
-  LIMIT_ = 0.5 * sqrt(2.0) * 1;
-  backgroundMesh::unset();
+    // char name[245];
+    // sprintf(name,"frontal%d-real.pos", gf->tag());
+    // _printTris (name, AllTris, Us, Vs,false);
+    // sprintf(name,"frontal%d-param.pos", gf->tag());
+    // _printTris (name, AllTris, Us, Vs,true);
+    transferDataStructure(gf, AllTris, DATA);
+    MTri3::radiusNorm = 2;
+    LIMIT_ = 0.5 * sqrt(2.0) * 1;
+
+    backgroundMesh::unset();
 #if defined(HAVE_ANN)
-  {
-    FieldManager *fields = gf->model()->getFields();
-    BoundaryLayerField *blf = 0;
-    if(fields->getBoundaryLayerField() > 0){
-      Field *bl_field = fields->get(fields->getBoundaryLayerField());
-      blf = dynamic_cast<BoundaryLayerField*> (bl_field);
-      if (blf && !blf->iRecombine)quadsToTriangles(gf,10000);
+    {
+      FieldManager *fields = gf->model()->getFields();
+      BoundaryLayerField *blf = 0;
+      if(fields->getBoundaryLayerField() > 0){
+        Field *bl_field = fields->get(fields->getBoundaryLayerField());
+        blf = dynamic_cast<BoundaryLayerField*> (bl_field);
+        if (blf && !blf->iRecombine)quadsToTriangles(gf,10000);
+      }
     }
-  }
 #endif
-}
-
-void bowyerWatsonParallelograms(GFace *gf,
-		  std::map<MVertex* , MVertex*>* equivalence,
-		  std::map<MVertex*, SPoint2> * parametricCoordinates)
-{
-  std::set<MTri3*,compareTri3Ptr> AllTris;
-  bidimMeshData DATA(equivalence, parametricCoordinates);
-  std::vector<MVertex*> packed;
-  std::vector<SMetric3> metrics;
-
-  //  printf("creating the points\n");
-  packingOfParallelograms(gf, packed, metrics);
-  //  printf("points created\n");
-
-  buildMeshGenerationDataStructures (gf, AllTris, DATA);
-
-  // delaunise the initial mesh
-  int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
-  Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
-
-  std::sort(packed.begin(), packed.end(), MVertexLessThanLexicographic());
+  }
 
-  //  printf("staring to insert points\n");
-  N_GLOBAL_SEARCH = 0;
-  N_SEARCH = 0;
-  DT_INSERT_VERTEX = 0;
-  // double t1 = Cpu();
-  MTri3 *oneNewTriangle = 0;
-  for (unsigned int i=0;i<packed.size();){
-    MTri3 *worst = *AllTris.begin();
-    if (worst->isDeleted()){
-      delete worst->tri();
-      delete worst;
-      AllTris.erase(AllTris.begin());
-    }
+  void bowyerWatsonParallelograms(GFace *gf,
+      std::map<MVertex* , MVertex*>* equivalence,
+      std::map<MVertex*, SPoint2> * parametricCoordinates)
+  {
+    std::set<MTri3*,compareTri3Ptr> AllTris;
+    bidimMeshData DATA(equivalence, parametricCoordinates);
+    std::vector<MVertex*> packed;
+    std::vector<SMetric3> metrics;
+
+    //  printf("creating the points\n");
+    // PEB MODIF
+    if (old_algo_hexa())
+      packingOfParallelograms(gf, packed, metrics);
     else{
-      double newPoint[2] ;
-      packed[i]->getParameter(0,newPoint[0]);
-      packed[i]->getParameter(1,newPoint[1]);
-      delete packed[i];
-      double metric[3];
-      //      buildMetric(gf, newPoint, metrics[i], metric);
-      buildMetric(gf, newPoint, metric);
-
-      bool success = insertAPoint(gf, AllTris.begin(), newPoint, metric, DATA , AllTris, 0, oneNewTriangle, &oneNewTriangle);
-      if (!success) oneNewTriangle = 0;
-	//      if (!success)printf("success %d %d\n",success,AllTris.size());
-      i++;
+      Filler2D f;
+      f.pointInsertion2D(gf, packed, metrics);
     }
+    // END PEB MODIF
+    //  printf("points created\n");
+
+    buildMeshGenerationDataStructures (gf, AllTris, DATA);
+
+    // delaunise the initial mesh
+    int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
+    Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
+
+    //std::sort(packed.begin(), packed.end(), MVertexLessThanLexicographic());
+    SortHilbert(packed);
+
+    //  printf("staring to insert points\n");
+    N_GLOBAL_SEARCH = 0;
+    N_SEARCH = 0;
+    DT_INSERT_VERTEX = 0;
+    double t1 = Cpu();
+    MTri3 *oneNewTriangle = 0;
+    for (unsigned int i=0;i<packed.size();){
+      MTri3 *worst = *AllTris.begin();
+      if (worst->isDeleted()){
+        delete worst->tri();
+        delete worst;
+        AllTris.erase(AllTris.begin());
+      }
+      else{
+        double newPoint[2] ;
+        packed[i]->getParameter(0,newPoint[0]);
+        packed[i]->getParameter(1,newPoint[1]);
+        delete packed[i];
+        double metric[3];
+        //      buildMetric(gf, newPoint, metrics[i], metric);
+        buildMetric(gf, newPoint, metric);
+
+        bool success = insertAPoint(gf, AllTris.begin(), newPoint, metric, DATA , AllTris, 0, oneNewTriangle, &oneNewTriangle);
+        if (!success) oneNewTriangle = 0;
+        //      if (!success)printf("success %d %d\n",success,AllTris.size());
+        i++;
+      }
 
-    if(1.0* AllTris.size() > 2.5 * DATA.vSizes.size()){
-      //      int n1 = AllTris.size();
-      std::set<MTri3*,compareTri3Ptr>::iterator itd = AllTris.begin();
-      while(itd != AllTris.end()){
-        if((*itd)->isDeleted()){
-          delete  *itd;
-          AllTris.erase(itd++);
+      if(1.0* AllTris.size() > 2.5 * DATA.vSizes.size()){
+        //      int n1 = AllTris.size();
+        std::set<MTri3*,compareTri3Ptr>::iterator itd = AllTris.begin();
+        while(itd != AllTris.end()){
+          if((*itd)->isDeleted()){
+            delete  *itd;
+            AllTris.erase(itd++);
+          }
+          else
+            itd++;
         }
-        else
-          itd++;
+        //      Msg::Info("cleaning up the memory %d -> %d", n1, AllTris.size());
       }
-      //      Msg::Info("cleaning up the memory %d -> %d", n1, AllTris.size());
-    }
 
 
-  }
-  //  printf("%d vertices \n",(int)packed.size());
-  //clock_t t2 = clock();
-  //double DT = (double)(t2-t1)/CLOCKS_PER_SEC;
-  //if (packed.size())printf("points inserted DT %12.5E points per minut : %12.5E %d global searchs %d seachs per insertion\n",DT,60.*packed.size()/DT,N_GLOBAL_SEARCH,N_SEARCH / packed.size());
-  transferDataStructure(gf, AllTris, DATA);
-  backgroundMesh::unset();
+    }
+    //  printf("%d vertices \n",(int)packed.size());
+    double t2 = Cpu();
+    double DT = (double)(t2-t1);
+    if (packed.size())
+      printf("points inserted DT %12.5E points per minute : %12.5E %d global searchs %d searchs per insertion\n",
+          DT,60.*packed.size()/DT,N_GLOBAL_SEARCH, (int)(N_SEARCH/packed.size()));
+    transferDataStructure(gf, AllTris, DATA);
+    backgroundMesh::unset();
 #if defined(HAVE_ANN)
-  {
-    FieldManager *fields = gf->model()->getFields();
-    BoundaryLayerField *blf = 0;
-    if(fields->getBoundaryLayerField() > 0){
-      Field *bl_field = fields->get(fields->getBoundaryLayerField());
-      blf = dynamic_cast<BoundaryLayerField*> (bl_field);
-      if (blf && !blf->iRecombine)quadsToTriangles(gf,10000);
+    {
+      FieldManager *fields = gf->model()->getFields();
+      BoundaryLayerField *blf = 0;
+      if(fields->getBoundaryLayerField() > 0){
+        Field *bl_field = fields->get(fields->getBoundaryLayerField());
+        blf = dynamic_cast<BoundaryLayerField*> (bl_field);
+        if (blf && !blf->iRecombine)quadsToTriangles(gf,10000);
+      }
     }
-  }
 #endif
-}
-
-
-static void initialSquare(std::vector<MVertex*> &v,
-			  MVertex *box[4],
-			  std::vector<MTri3*> &t){
-  SBoundingBox3d bbox ;
-  for (size_t i=0;i<v.size();i++){
-    MVertex *pv = v[i];
-    bbox += SPoint3(pv->x(),pv->y(),pv->z());
   }
-  bbox *= 1.3;
-  box[0] = new MVertex (bbox.min().x(),bbox.min().y(),0);
-  box[1] = new MVertex (bbox.max().x(),bbox.min().y(),0);
-  box[2] = new MVertex (bbox.max().x(),bbox.max().y(),0);
-  box[3] = new MVertex (bbox.min().x(),bbox.max().y(),0);
-  MTriangle *t0 = new MTriangle (box[0],box[1],box[2]);
-  MTriangle *t1 = new MTriangle (box[2],box[3],box[0]);
-  t.push_back(new MTri3(t0,0.0));
-  t.push_back(new MTri3(t1,0.0));
-  connectTriangles(t);
-}
 
 
-MTri3 * getTriToBreak (MVertex *v, std::vector<MTri3*> &t, int &NB_GLOBAL_SEARCH, int &ITER){
-  // last inserted is used as starting point
-  // we know it is not deleted
-  unsigned int k = t.size() - 1;
-  while(t[k]->isDeleted()){
-    k--;
-  }
-  MTri3 *start = t[k];
-  start = search4Triangle (start,v,(int)t.size(),ITER);
-  if (start)return start;
-  //  printf("Global Search has to be done\n");
-  NB_GLOBAL_SEARCH++;
-  for (size_t i = 0;i<t.size();i++){
-    if (!t[i]->isDeleted() && inCircumCircleXY(t[i]->tri(),v))return t[i];
+  static void initialSquare(std::vector<MVertex*> &v,
+      MVertex *box[4],
+      std::vector<MTri3*> &t){
+    SBoundingBox3d bbox ;
+    for (size_t i=0;i<v.size();i++){
+      MVertex *pv = v[i];
+      bbox += SPoint3(pv->x(),pv->y(),pv->z());
+    }
+    bbox *= 1.3;
+    box[0] = new MVertex (bbox.min().x(),bbox.min().y(),0);
+    box[1] = new MVertex (bbox.max().x(),bbox.min().y(),0);
+    box[2] = new MVertex (bbox.max().x(),bbox.max().y(),0);
+    box[3] = new MVertex (bbox.min().x(),bbox.max().y(),0);
+    MTriangle *t0 = new MTriangle (box[0],box[1],box[2]);
+    MTriangle *t1 = new MTriangle (box[2],box[3],box[0]);
+    t.push_back(new MTri3(t0,0.0));
+    t.push_back(new MTri3(t1,0.0));
+    connectTriangles(t);
+  }
+
+
+  MTri3 * getTriToBreak (MVertex *v, std::vector<MTri3*> &t, int &NB_GLOBAL_SEARCH, int &ITER){
+    // last inserted is used as starting point
+    // we know it is not deleted
+    unsigned int k = t.size() - 1;
+    while(t[k]->isDeleted()){
+      k--;
+    }
+    MTri3 *start = t[k];
+    start = search4Triangle (start,v,(int)t.size(),ITER);
+    if (start)return start;
+    //  printf("Global Search has to be done\n");
+    NB_GLOBAL_SEARCH++;
+    for (size_t i = 0;i<t.size();i++){
+      if (!t[i]->isDeleted() && inCircumCircleXY(t[i]->tri(),v))return t[i];
+    }
+    return 0;
   }
-  return 0;
-}
 
-bool triOnBox (MTriangle *t, MVertex *box[4]){
-  for (size_t i = 0;i<3;i++){
-    for (size_t j = 0;j<4;j++){
-      if (t->getVertex(i) == box[j])
-	return true;
+  bool triOnBox (MTriangle *t, MVertex *box[4]){
+    for (size_t i = 0;i<3;i++){
+      for (size_t j = 0;j<4;j++){
+        if (t->getVertex(i) == box[j])
+          return true;
+      }
     }
+    return false;
   }
-  return false;
-}
 
-// vertices are supposed to be sitting in the XY plane !
+  // vertices are supposed to be sitting in the XY plane !
 
-void recoverEdges (std::vector<MTri3*> &t, std::vector<MEdge> &edges);
+  void recoverEdges (std::vector<MTri3*> &t, std::vector<MEdge> &edges);
 
-void delaunayMeshIn2D(std::vector<MVertex*> &v,
-		      std::vector<MTriangle*> &result,
-		      bool removeBox,
-		      std::vector<MEdge> *edgesToRecover,
-                      bool hilbertSort)
-{
-  std::vector<MTri3*> t;
-  t.reserve (v.size()*2);
-  std::vector<edgeXface> conn;
-  std::vector<edgeXface> shell;
-  std::vector<MTri3*> cavity;
-  MVertex *box[4];
-  initialSquare (v,box,t);
-
-  int NB_GLOBAL_SEARCH = 0;
-  double AVG_ITER = 0;
-  double AVG_CAVSIZE = 0;
-
-  double t1 = Cpu();
-
-  //  Msg::Info("Delaunay 2D SORTING");
-  if(hilbertSort) SortHilbert(v);
-
-  double ta=0,tb=0,tc=0,td=0,T;
-  //  Msg::Info("Delaunay 2D INSERTING");
-  for (size_t i=0;i<v.size();i++){
-    MVertex *pv = v[i];
-
-    int NITER = 0;
-    T = Cpu();
-    MTri3 * found = getTriToBreak (pv,t,NB_GLOBAL_SEARCH,NITER);
-    ta += Cpu()-T;
-    AVG_ITER += (double)NITER;
-    if(!found) {
-      Msg::Error("Cannot insert a point in 2D Delaunay");
-      continue;
-    }
-    shell.clear();
-    cavity.clear();
-
-    T = Cpu();
-    recurFindCavity(shell, cavity, pv, found);
-    AVG_CAVSIZE += (double)cavity.size();
-    tb += Cpu()-T;
-    //double V = 0.0;
-    //for (unsigned int k=0;k<cavity.size();k++)V+=fabs(cavity[k]->tri()->getVolume());
-
-    std::vector<MTri3*> extended_cavity;
-    //double Vb = 0.0;
-
-    T = Cpu();
-    for (unsigned int count = 0; count < shell.size(); count++){
-      const edgeXface &fxt = shell[count];
-      MTriangle *tr;
-      MTri3 *t3;
-      MVertex *v0 = fxt.v[0];
-      MVertex *v1 = fxt.v[1];
-      MTri3 *otherSide = fxt.t1->getNeigh(fxt.i1);
-      if (count < cavity.size()){
-	t3 = cavity[count];
-	tr = t3->tri() ;
-	tr->setVertex(0,v0);
-	tr->setVertex(1,v1);
-	tr->setVertex(2,pv);
+  void delaunayMeshIn2D(std::vector<MVertex*> &v,
+      std::vector<MTriangle*> &result,
+      bool removeBox,
+      std::vector<MEdge> *edgesToRecover,
+      bool hilbertSort)
+  {
+    std::vector<MTri3*> t;
+    t.reserve (v.size()*2);
+    std::vector<edgeXface> conn;
+    std::vector<edgeXface> shell;
+    std::vector<MTri3*> cavity;
+    MVertex *box[4];
+    initialSquare (v,box,t);
+
+    int NB_GLOBAL_SEARCH = 0;
+    double AVG_ITER = 0;
+    double AVG_CAVSIZE = 0;
+
+    double t1 = Cpu();
+
+    //  Msg::Info("Delaunay 2D SORTING");
+    if(hilbertSort) SortHilbert(v);
+
+    double ta=0,tb=0,tc=0,td=0,T;
+    //  Msg::Info("Delaunay 2D INSERTING");
+    for (size_t i=0;i<v.size();i++){
+      MVertex *pv = v[i];
+
+      int NITER = 0;
+      T = Cpu();
+      MTri3 * found = getTriToBreak (pv,t,NB_GLOBAL_SEARCH,NITER);
+      ta += Cpu()-T;
+      AVG_ITER += (double)NITER;
+      if(!found) {
+        Msg::Error("Cannot insert a point in 2D Delaunay");
+        continue;
       }
-      else{
-	tr = new MTriangle(v0,v1,pv);
-	t3 = new MTri3(tr, 0.0);
-	t.push_back(t3);
+      shell.clear();
+      cavity.clear();
+
+      T = Cpu();
+      recurFindCavity(shell, cavity, pv, found);
+      AVG_CAVSIZE += (double)cavity.size();
+      tb += Cpu()-T;
+      //double V = 0.0;
+      //for (unsigned int k=0;k<cavity.size();k++)V+=fabs(cavity[k]->tri()->getVolume());
+
+      std::vector<MTri3*> extended_cavity;
+      //double Vb = 0.0;
+
+      T = Cpu();
+      for (unsigned int count = 0; count < shell.size(); count++){
+        const edgeXface &fxt = shell[count];
+        MTriangle *tr;
+        MTri3 *t3;
+        MVertex *v0 = fxt.v[0];
+        MVertex *v1 = fxt.v[1];
+        MTri3 *otherSide = fxt.t1->getNeigh(fxt.i1);
+        if (count < cavity.size()){
+          t3 = cavity[count];
+          tr = t3->tri() ;
+          tr->setVertex(0,v0);
+          tr->setVertex(1,v1);
+          tr->setVertex(2,pv);
+        }
+        else{
+          tr = new MTriangle(v0,v1,pv);
+          t3 = new MTri3(tr, 0.0);
+          t.push_back(t3);
+        }
+        //Vb+= fabs(tr->getVolume());
+        extended_cavity.push_back(t3);
+        if (otherSide)
+          extended_cavity.push_back(otherSide);
       }
-      //Vb+= fabs(tr->getVolume());
-      extended_cavity.push_back(t3);
-      if (otherSide)
-	extended_cavity.push_back(otherSide);
-    }
-    tc += Cpu()-T;
-    //if (fabs(Vb-V) > 1.e-8 * (Vb+V))printf("%12.5E %12.5E\n",Vb,V);
+      tc += Cpu()-T;
+      //if (fabs(Vb-V) > 1.e-8 * (Vb+V))printf("%12.5E %12.5E\n",Vb,V);
 
-    for (unsigned int k=0;k<std::min(cavity.size(),shell.size());k++){
-      cavity[k]->setDeleted(false);
-      for (unsigned int l=0;l<3;l++){
-    	cavity[k]->setNeigh(l,0);
+      for (unsigned int k=0;k<std::min(cavity.size(),shell.size());k++){
+        cavity[k]->setDeleted(false);
+        for (unsigned int l=0;l<3;l++){
+          cavity[k]->setNeigh(l,0);
+        }
       }
+      T = Cpu();
+      connectTris(extended_cavity.begin(),extended_cavity.end(),conn);
+      td += Cpu()-T;
     }
-    T = Cpu();
-    connectTris(extended_cavity.begin(),extended_cavity.end(),conn);
-    td += Cpu()-T;
-  }
 
-  double t2 = Cpu();
-  Msg::Debug("Delaunay 2D done for %d points : CPU = %g, %d global searches, AVG walk size %g , AVG cavity size %g",
-	    v.size(), t2-t1,NB_GLOBAL_SEARCH,1.+AVG_ITER/v.size(),AVG_CAVSIZE/v.size());
-  //  printf("%g %g %g %g --> %g(%g)\n",ta,tb,tc,td,t2-t1,ta+tb+tc+td);
+    double t2 = Cpu();
+    Msg::Debug("Delaunay 2D done for %d points : CPU = %g, %d global searches, AVG walk size %g , AVG cavity size %g",
+        v.size(), t2-t1,NB_GLOBAL_SEARCH,1.+AVG_ITER/v.size(),AVG_CAVSIZE/v.size());
 
-  if (edgesToRecover)recoverEdges (t,*edgesToRecover);
+    if (edgesToRecover)recoverEdges (t,*edgesToRecover);
 
-  //  FILE *f = fopen ("tri.pos","w");
-  //  fprintf(f,"View \"\"{\n");
-  for (size_t i = 0;i<t.size();i++){
-    if (t[i]->isDeleted() || (removeBox && triOnBox (t[i]->tri(),box))) delete t[i]->tri();
-    else {
-      result.push_back(t[i]->tri());
-      //      t[i]->tri()->writePOS (f, false,false,true,false,false,false);
+    for (size_t i = 0;i<t.size();i++){
+      if (t[i]->isDeleted() || (removeBox && triOnBox (t[i]->tri(),box))) delete t[i]->tri();
+      else {
+        result.push_back(t[i]->tri());
+      }
+      delete t[i];
     }
-    delete t[i];
+
+    if (removeBox){for (int i=0;i<4;i++)delete box[i];}
+    else {for (int i=0;i<4;i++)v.push_back(box[i]);}
   }
-  
-  if (removeBox){for (int i=0;i<4;i++)delete box[i];}
-  else {for (int i=0;i<4;i++)v.push_back(box[i]);}
 
-  //  fprintf(f,"};\n");
-  //  fclose(f);
-}
+  bool swapedge (MVertex *v1 ,MVertex *v2, MVertex *v3, MVertex *v4, MTri3* t1, int iLocalEdge){
+    MTri3 *t2 = t1->getNeigh(iLocalEdge);
+    if(!t2) return false;
 
-bool swapedge (MVertex *v1 ,MVertex *v2, MVertex *v3, MVertex *v4, MTri3* t1, int iLocalEdge){
-  MTri3 *t2 = t1->getNeigh(iLocalEdge);
-  if(!t2) return false;
-
-  MTriangle *t1b = new MTriangle(v2, v3, v4);
-  MTriangle *t2b = new MTriangle(v4, v3, v1);
-  double BEFORE = t1->tri()->getVolume()+t2->tri()->getVolume();
-  double AFTER  = t1b->getVolume()+t2b->getVolume();
-  //  printf("swapping %d %d %d %d %g %g\n",v1->getNum(),v2->getNum(),v3->getNum(),v4->getNum(),BEFORE,AFTER);
-  if (fabs(BEFORE-AFTER)/BEFORE > 1.e-8){
-    delete t1b;
-    delete t2b;
-    return false;
-  }
-  //  printf("volumes ok\n");
-
-  delete t1->tri();
-  delete t2->tri();
-  t1->setTri(t1b);
-  t2->setTri(t2b);
-
-  std::set<MTri3*> cavity;
-  cavity.insert(t1);
-  cavity.insert(t2);
-  for(int i = 0; i < 3; i++){
-    if(t1->getNeigh(i))
-      cavity.insert(t1->getNeigh(i));
-    if(t2->getNeigh(i))
-      cavity.insert(t2->getNeigh(i));
+    MTriangle *t1b = new MTriangle(v2, v3, v4);
+    MTriangle *t2b = new MTriangle(v4, v3, v1);
+    double BEFORE = t1->tri()->getVolume()+t2->tri()->getVolume();
+    double AFTER  = t1b->getVolume()+t2b->getVolume();
+    //  printf("swapping %d %d %d %d %g %g\n",v1->getNum(),v2->getNum(),v3->getNum(),v4->getNum(),BEFORE,AFTER);
+    if (fabs(BEFORE-AFTER)/BEFORE > 1.e-8){
+      delete t1b;
+      delete t2b;
+      return false;
+    }
+    //  printf("volumes ok\n");
+
+    delete t1->tri();
+    delete t2->tri();
+    t1->setTri(t1b);
+    t2->setTri(t2b);
+
+    std::set<MTri3*> cavity;
+    cavity.insert(t1);
+    cavity.insert(t2);
+    for(int i = 0; i < 3; i++){
+      if(t1->getNeigh(i))
+        cavity.insert(t1->getNeigh(i));
+      if(t2->getNeigh(i))
+        cavity.insert(t2->getNeigh(i));
+    }
+    std::vector<edgeXface> conn;
+    connectTris(cavity.begin(), cavity.end(), conn);
+    return true;
   }
-  std::vector<edgeXface> conn;
-  connectTris(cavity.begin(), cavity.end(), conn);
-  return true;
-}
-
-bool diffend (MVertex *v1, MVertex *v2, MVertex *p1, MVertex *p2){
-  if (v1 == p1 || v2 == p1 || v1 == p2 || v2 == p2)return false;
-  return true;
-}
 
-/*
+  bool diffend (MVertex *v1, MVertex *v2, MVertex *p1, MVertex *p2){
+    if (v1 == p1 || v2 == p1 || v1 == p2 || v2 == p2)return false;
+    return true;
+  }
 
-*/
+  /*
 
-static bool recoverEdgeBySwaps (std::vector<MTri3*> &t, MVertex *mv1, MVertex *mv2, std::vector<MEdge> &edges){
-
-  SPoint3 pv1 (mv1->x(),mv1->y(),0);
-  SPoint3 pv2 (mv2->x(),mv2->y(),0);
-  double xcc[2];
-  for (unsigned int i=0;i<t.size();i++){
-    for (unsigned int j=0;j<3;j++){
-      MVertex *v1 = t[i]->tri()->getVertex((j+2)%3);
-      MVertex *v2 = t[i]->tri()->getVertex(j);
-      MVertex *v3 = t[i]->tri()->getVertex((j+1)%3);
-      MVertex *o  = t[i]->otherSide(j);
-      if (o){
-	SPoint3 p1 (v1->x(),v1->y(),0);
-	SPoint3 p2 (v2->x(),v2->y(),0);
-	SPoint3 p3 (v3->x(),v3->y(),0);
-	SPoint3 po (o->x(),o->y(),0);
-	if (diffend(v1,v2,mv1,mv2)){
-	  if (intersection_segments (p1, p2, pv1, pv2,xcc)){
-	    //	    if (std::binary_search(edges.begin(),edges.end(),MEdge(v1,v2),Less_Edge)){
-	    //	      Msg::Error("1D mesh self intersects");
-	    //	    }
-	    if (!intersection_segments(po, p3, pv1, pv2,xcc) || (v3 == mv1 || o == mv1 || v3 == mv2 || o == mv2)){
-	      if(swapedge (v1,v2,v3,o,t[i],j))return true;
-	    }
-	  }
-	}
+   */
+
+  static bool recoverEdgeBySwaps (std::vector<MTri3*> &t, MVertex *mv1, MVertex *mv2, std::vector<MEdge> &edges){
+
+    SPoint3 pv1 (mv1->x(),mv1->y(),0);
+    SPoint3 pv2 (mv2->x(),mv2->y(),0);
+    double xcc[2];
+    for (unsigned int i=0;i<t.size();i++){
+      for (unsigned int j=0;j<3;j++){
+        MVertex *v1 = t[i]->tri()->getVertex((j+2)%3);
+        MVertex *v2 = t[i]->tri()->getVertex(j);
+        MVertex *v3 = t[i]->tri()->getVertex((j+1)%3);
+        MVertex *o  = t[i]->otherSide(j);
+        if (o){
+          SPoint3 p1 (v1->x(),v1->y(),0);
+          SPoint3 p2 (v2->x(),v2->y(),0);
+          SPoint3 p3 (v3->x(),v3->y(),0);
+          SPoint3 po (o->x(),o->y(),0);
+          if (diffend(v1,v2,mv1,mv2)){
+            if (intersection_segments (p1, p2, pv1, pv2,xcc)){
+              //	    if (std::binary_search(edges.begin(),edges.end(),MEdge(v1,v2),Less_Edge)){
+              //	      Msg::Error("1D mesh self intersects");
+              //	    }
+              if (!intersection_segments(po, p3, pv1, pv2,xcc) || (v3 == mv1 || o == mv1 || v3 == mv2 || o == mv2)){
+                if(swapedge (v1,v2,v3,o,t[i],j))return true;
+              }
+            }
+          }
+        }
       }
     }
+    return false;
   }
-  return false;
-}
 
-// recover the edges by edge swapping in the triangulation.
-// edges are not supposed to
+  // recover the edges by edge swapping in the triangulation.
+  // edges are not supposed to
 
-void recoverEdges (std::vector<MTri3*> &t, std::vector<MEdge> &edges)
-{
-  Less_Edge le;
-  std::sort(edges.begin(),edges.end(),le);
-  std::set<MEdge,Less_Edge> setOfMeshEdges;
-  for (size_t i = 0;i<t.size();i++){
-    for (int j=0;j<3;j++){
-      setOfMeshEdges.insert(t[i]->tri()->getEdge(j));
+  void recoverEdges (std::vector<MTri3*> &t, std::vector<MEdge> &edges)
+  {
+    Less_Edge le;
+    std::sort(edges.begin(),edges.end(),le);
+    std::set<MEdge,Less_Edge> setOfMeshEdges;
+    for (size_t i = 0;i<t.size();i++){
+      for (int j=0;j<3;j++){
+        setOfMeshEdges.insert(t[i]->tri()->getEdge(j));
+      }
     }
-  }
 
-  std::vector<MEdge> edgesToRecover;
-  for (unsigned int i=0;i<edges.size();i++){
-    if (setOfMeshEdges.find(edges[i])==setOfMeshEdges.end())
-      edgesToRecover.push_back(edges[i]);
-  }
+    std::vector<MEdge> edgesToRecover;
+    for (unsigned int i=0;i<edges.size();i++){
+      if (setOfMeshEdges.find(edges[i])==setOfMeshEdges.end())
+        edgesToRecover.push_back(edges[i]);
+    }
 
-  Msg::Info("%d edges to recover among %d edges",edgesToRecover.size(),edges.size());
-  //  int iter = 0;
-  //  char name[256];
-  //  sprintf(name,"iter%d.pos",iter++);
-  //  _printTris (name, t.begin(),t.end(),0);
-  for (unsigned int i=0;i<edgesToRecover.size();i++){
-    MVertex *mstart = edgesToRecover[i].getVertex(0);
-    MVertex *mend = edgesToRecover[i].getVertex(1);
-    Msg::Info("recovering edge %d %d",mstart->getNum(),mend->getNum());
-    //int iter;
-    while(recoverEdgeBySwaps (t, mstart, mend,edges)) {
-      //iter ++;
+    Msg::Info("%d edges to recover among %d edges",edgesToRecover.size(),edges.size());
+    //  int iter = 0;
+    //  char name[256];
+    //  sprintf(name,"iter%d.pos",iter++);
+    //  _printTris (name, t.begin(),t.end(),0);
+    for (unsigned int i=0;i<edgesToRecover.size();i++){
+      MVertex *mstart = edgesToRecover[i].getVertex(0);
+      MVertex *mend = edgesToRecover[i].getVertex(1);
+      Msg::Info("recovering edge %d %d",mstart->getNum(),mend->getNum());
+      //int iter;
+      while(recoverEdgeBySwaps (t, mstart, mend,edges)) {
+        //iter ++;
+      }
     }
   }
-}
diff --git a/Mesh/meshGFaceDelaunayInsertion.h b/Mesh/meshGFaceDelaunayInsertion.h
index 5338e7d..bd627df 100644
--- a/Mesh/meshGFaceDelaunayInsertion.h
+++ b/Mesh/meshGFaceDelaunayInsertion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceElliptic.cpp b/Mesh/meshGFaceElliptic.cpp
index 0783398..dab38e1 100644
--- a/Mesh/meshGFaceElliptic.cpp
+++ b/Mesh/meshGFaceElliptic.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -16,7 +16,7 @@
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "MLine.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "Numeric.h"
 #include "GmshMessage.h"
 #include "Generator.h"
@@ -27,20 +27,25 @@
 #include "fullMatrix.h"
 #include "CenterlineField.h"
 #if defined(HAVE_ANN)
-#include <ANN/ANN.h>
+#include "ANN/ANN.h"
 #endif
 
 #define TRAN_QUAD(c1,c2,c3,c4,s1,s2,s3,s4,u,v) \
     (1.-u)*c4+u*c2+(1.-v)*c1+v*c3-((1.-u)*(1.-v)*s1+u*(1.-v)*s2+u*v*s3+(1.-u)*v*s4)
 
 static void printQuads(GFace *gf, fullMatrix<SPoint2> uv,
-                       std::vector<MQuadrangle*> quads,  int iter){
-
+                       std::vector<MQuadrangle*> quads,  int iter)
+{
   if(!CTX::instance()->mesh.saveAll) return;
 
   char name[234];
-  sprintf(name,"quadUV_%d_%d.pos", gf->tag(), iter);
-  FILE *f = Fopen(name,"w");
+  sprintf(name, "quadUV_%d_%d.pos", gf->tag(), iter);
+  FILE *f = Fopen(name, "w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", name);
+    return;
+  }
+
   fprintf(f,"View \"%s\" {\n",name);
 
   for (int i = 1; i < uv.size1()-1; i++)
@@ -51,15 +56,19 @@ static void printQuads(GFace *gf, fullMatrix<SPoint2> uv,
   fclose(f);
 
   char name3[234];
-  sprintf(name3,"quadXYZ_%d_%d.pos", gf->tag(), iter);
+  sprintf(name3, "quadXYZ_%d_%d.pos", gf->tag(), iter);
   FILE *f3 = Fopen(name3,"w");
+  if(!f3){
+    Msg::Error("Could not open file '%s'", name3);
+    return;
+  }
+
   fprintf(f3,"View \"%s\" {\n",name3);
   for (unsigned int i = 0; i < quads.size(); i++){
     quads[i]->writePOS(f3,true,false,false,false,false,false);
   }
   fprintf(f3,"};\n");
   fclose(f3);
-
 }
 
 static void printParamGrid(GFace *gf, std::vector<MVertex*> vert1, std::vector<MVertex*> vert2,
@@ -83,10 +92,14 @@ static void printParamGrid(GFace *gf, std::vector<MVertex*> vert1, std::vector<M
     p2.push_back(pj);
   }
 
-
   char name[234];
   sprintf(name,"paramGrid_%d.pos", gf->tag());
   FILE *f = Fopen(name,"w");
+  if(!f){
+    Msg::Error("Could not open file '%s'", name);
+    return;
+  }
+
   fprintf(f,"View \"%s\" {\n",name);
 
   // for (unsigned int i = 0; i < p1.size(); i++)
@@ -107,8 +120,12 @@ static void printParamGrid(GFace *gf, std::vector<MVertex*> vert1, std::vector<M
   char name2[234];
   sprintf(name2,"paramEdges_%d.pos", gf->tag());
   FILE *f2 = Fopen(name2,"w");
-  fprintf(f2,"View \"%s\" {\n",name2);
+  if(!f2){
+    Msg::Error("Could not open file '%s'", name2);
+    return;
+  }
 
+  fprintf(f2,"View \"%s\" {\n",name2);
   for (unsigned int i = 0; i < e01.size(); i++){
      SPoint2 pi; reparamMeshVertexOnFace(e01[i], gf, pi);
     fprintf(f2,"SP(%g,%g,%g) {%d};\n", pi.x(), pi.y(), 0.0, 1);
@@ -144,21 +161,23 @@ static void printParamGrid(GFace *gf, std::vector<MVertex*> vert1, std::vector<M
   char name3[234];
   sprintf(name3,"quadXYZ_%d.pos", gf->tag());
   FILE *f3 = Fopen(name3,"w");
+  if(!f3){
+    Msg::Error("Could not open file '%s'", name2);
+    return;
+  }
+
   fprintf(f3,"View \"%s\" {\n",name3);
   for (unsigned int i = 0; i < quads.size(); i++){
     quads[i]->writePOS(f3,true,false,false,false,false,false);
   }
   fprintf(f3,"};\n");
   fclose(f3);
-
-  return;
-
 }
 
 static void createQuadsFromUV(GFace *gf, fullMatrix<SPoint2> &uv,
 			      std::vector<std::vector<MVertex*> > &tab,
-			      std::vector<MQuadrangle*> &newq,  std::vector<MVertex*> &newv){
-
+			      std::vector<MQuadrangle*> &newq,  std::vector<MVertex*> &newv)
+{
   newq.clear();
   newv.clear();
 
@@ -193,8 +212,8 @@ static void createQuadsFromUV(GFace *gf, fullMatrix<SPoint2> &uv,
 
 }
 static std::vector<MVertex*> saturateEdgeRegular (GFace *gf, SPoint2 p1, SPoint2 p2,
-						  int M, std::vector<SPoint2> &pe){
-
+						  int M, std::vector<SPoint2> &pe)
+{
   std::vector<MVertex*> pts;
   for (int i=1;i<M;i++){
     double s = ((double)i/((double)(M)));
@@ -210,10 +229,11 @@ static std::vector<MVertex*> saturateEdgeRegular (GFace *gf, SPoint2 p1, SPoint2
   }
   return pts;
 }
+
 static std::vector<MVertex*> saturateEdgeHarmonic (GFace *gf, SPoint2 p1, SPoint2 p2,
 						  double H,  double L,
-						  int M, std::vector<SPoint2> &pe){
-
+						  int M, std::vector<SPoint2> &pe)
+{
   std::vector<MVertex*> pts;
   for (int i=1;i<M;i++){
     double y = ((double)(i))*H/M;
@@ -239,13 +259,13 @@ static void transfiniteSmoother(GFace* gf,
 				std::vector<std::vector<MVertex*> > &tab,
 				std::vector<MQuadrangle*> &newq,
 				std::vector<MVertex*> &newv,
-				bool isPeriodic=false){
-
-   int M = uv.size1();
-   int N = uv.size2();
-   int jStart = isPeriodic ? 0 : 1;
+				bool isPeriodic=false)
+{
+  int M = uv.size1();
+  int N = uv.size2();
+  int jStart = isPeriodic ? 0 : 1;
 
-   int numSmooth = 150;
+  int numSmooth = 150;
   fullMatrix<SPoint2> uvold = uv;
   for(int k = 0; k < numSmooth; k++){
     double norm = 0.0;
@@ -293,7 +313,6 @@ static void transfiniteSmoother(GFace* gf,
   //final print
   createQuadsFromUV(gf, uv, tab, newq, newv);
   printQuads(gf, uv, newq, numSmooth);
-
 }
 
 //elliptic surface grid generator
@@ -303,8 +322,8 @@ static void ellipticSmoother( GFace* gf,
 			      std::vector<std::vector<MVertex*> > &tab,
 			      std::vector<MQuadrangle*> &newq,
 			      std::vector<MVertex*> &newv,
-			      bool isPeriodic=false){
-
+			      bool isPeriodic=false)
+{
   printQuads(gf, uv, newq, 0);
 
   int nbSmooth = 70;
@@ -395,9 +414,6 @@ static void ellipticSmoother( GFace* gf,
 
   createQuadsFromUV(gf, uv, tab, newq, newv);
   printQuads(gf, uv, newq, nbSmooth);
-
-  //exit(1);
-
 }
 
 //create initial grid points MxN using transfinite interpolation
@@ -427,7 +443,6 @@ static void createRegularGrid (GFace *gf,
 			       fullMatrix<SPoint2> &uv,
 			       std::vector<std::vector<MVertex*> > &tab)
 {
-
   int M = e23.size();
   int N = e12.size();
 
@@ -528,7 +543,8 @@ static void createRegularGridPeriodic  (GFace *gf,int sign2,
   char name3[234];
   sprintf(name3,"quadParam_%d.pos", gf->tag());
   FILE *f3 = Fopen(name3,"w");
-  fprintf(f3,"View \"%s\" {\n",name3);
+
+  if(f3) fprintf(f3,"View \"%s\" {\n",name3);
 
   tab.resize(M+2);
   for(int i = 0; i < M+2; i++) tab[i].resize(N+2);
@@ -577,24 +593,24 @@ static void createRegularGridPeriodic  (GFace *gf,int sign2,
   }
 
   //print
-  for (int i=0;i<N+2;i++)
-    for (int j=0;j<M+2;j++)
-      fprintf(f3,"SP(%g,%g,%g) {%d};\n",   uv(j,i).x(), uv(j,i).y(), 0.0, j);
-
-  fprintf(f3,"};\n");
-  fclose(f3);
+  if(f3){
+    for (int i=0;i<N+2;i++)
+      for (int j=0;j<M+2;j++)
+        fprintf(f3,"SP(%g,%g,%g) {%d};\n",   uv(j,i).x(), uv(j,i).y(), 0.0, j);
+    fprintf(f3,"};\n");
+    fclose(f3);
+  }
 
 }
 
-static void updateFaceQuads(GFace *gf, std::vector<MQuadrangle*> &quads, std::vector<MVertex*> &newv){
-
+static void updateFaceQuads(GFace *gf, std::vector<MQuadrangle*> &quads, std::vector<MVertex*> &newv)
+{
   for (unsigned int i = 0; i < quads.size(); i++){
     gf->quadrangles.push_back(quads[i]);
   }
   for(unsigned int i = 0; i < newv.size(); i++){
     gf->mesh_vertices.push_back(newv[i]);
   }
-
 }
 
 static bool computeRingVertices(GFace *gf, Centerline *center,
diff --git a/Mesh/meshGFaceElliptic.h b/Mesh/meshGFaceElliptic.h
index 5d297cb..4cddb10 100644
--- a/Mesh/meshGFaceElliptic.h
+++ b/Mesh/meshGFaceElliptic.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp
index 1b887c4..6aea952 100644
--- a/Mesh/meshGFaceExtruded.cpp
+++ b/Mesh/meshGFaceExtruded.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,6 +9,7 @@
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "ExtrudeParams.h"
+#include "MVertexRTree.h"
 #include "Context.h"
 #include "GmshMessage.h"
 #include "QuadTriExtruded2D.h"
@@ -55,7 +56,7 @@ static void createQuaTri(std::vector<MVertex*> &v, GFace *to,
 	else
 	  addQuadrangle(v[0], v[1], v[3], v[2], to);
       }
-	
+
     }
     else if(!constrainedEdges){
       addTriangle(v[0], v[1], v[3], to);
@@ -75,8 +76,7 @@ static void createQuaTri(std::vector<MVertex*> &v, GFace *to,
   }
 }
 
-static void extrudeMesh(GEdge *from, GFace *to,
-                        std::set<MVertex*, MVertexLessThanLexicographic> &pos,
+static void extrudeMesh(GEdge *from, GFace *to, MVertexRTree &pos,
                         std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges)
 {
   ExtrudeParams *ep = to->meshAttributes.extrude;
@@ -120,7 +120,6 @@ static void extrudeMesh(GEdge *from, GFace *to,
   // create elements (note that it would be faster to access the
   // *interior* nodes by direct indexing, but it's just simpler to
   // query everything by position)
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   for(unsigned int i = 0; i < from->lines.size(); i++){
     MVertex *v0 = from->lines[i]->getVertex(0);
     MVertex *v1 = from->lines[i]->getVertex(1);
@@ -135,33 +134,34 @@ static void extrudeMesh(GEdge *from, GFace *to,
           ep->Extrude(j, k + 1, x[p + 2], y[p + 2], z[p + 2]);
         }
         for(int p = 0; p < 4; p++){
-          MVertex tmp(x[p], y[p], z[p], 0, -1);
-          itp = pos.find(&tmp);
-          if(itp == pos.end()){ // FIXME: workaround
-            Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-            itp = tmp.linearSearch(pos);
-          }
-          if(itp == pos.end()){
+          MVertex *tmp = pos.find(x[p], y[p], z[p]);
+          if(!tmp){
             Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-                tmp.x(), tmp.y(), tmp.z(), to->tag());
+                       x[p], y[p], z[p], to->tag());
             return;
           }
-          verts.push_back(*itp);
+          verts.push_back(tmp);
         }
-        createQuaTri(verts, to, constrainedEdges,from->lines[i], tri_quad_flag);
+        createQuaTri(verts, to, constrainedEdges, from->lines[i], tri_quad_flag);
       }
     }
   }
 }
 
-static void copyMesh(GFace *from, GFace *to,
-                     std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+static void copyMesh(GFace *from, GFace *to, MVertexRTree &pos)
 {
   ExtrudeParams *ep = to->meshAttributes.extrude;
 
-  // create vertices
-  for(unsigned int i = 0; i < from->mesh_vertices.size(); i++){
-    MVertex *v = from->mesh_vertices[i];
+  // interior vertices
+  std::vector<MVertex*> mesh_vertices = from->mesh_vertices;
+
+  // add all embedded vertices
+  std::vector<MVertex*> embedded = from->getEmbeddedMeshVertices();
+  mesh_vertices.insert(mesh_vertices.end(), embedded.begin(), embedded.end());
+
+  // create extruded vertices
+  for(unsigned int i = 0; i < mesh_vertices.size(); i++){
+    MVertex *v = mesh_vertices[i];
     double x = v->x(), y = v->y(), z = v->z();
     ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
                 x, y, z);
@@ -179,76 +179,67 @@ static void copyMesh(GFace *from, GFace *to,
   int quadToTri_valid = IsValidQuadToTriTop(to, &quadToTri, &detectQuadToTriTop);
   bool is_toroidal = quadToTri_valid >= 2 ? true : false;
   bool is_noaddverts = quadToTri_valid == 3 ? true : false;
-  if( detectQuadToTriTop && !quadToTri_valid && !is_toroidal ){
+  if(detectQuadToTriTop && !quadToTri_valid && !is_toroidal){
     Msg::Error("In MeshGFaceExtrudedSurface::copyMesh(), Mesh of QuadToTri top "
                "surface %d likely has errors.", to->tag());
   }
-  
-  // if this is toroidal No New Vertices QuadToTri, then replace the root dependency face's boundary
-  // quads with triangles for better meshing.
-  if( is_toroidal && is_noaddverts ){
-    GFace *root = findRootSourceFaceForFace( from );
-    if( root == from ){
-      ReplaceBndQuadsInFace( root );
-      Msg::Warning("To facilitate QuadToTri interface on surface %d, source surface %d was re-meshed "
-                "with all triangles on boundary.  To avoid this, use QuadTriAddVerts instead of "
-		 "QuadTriNoNewVerts.", to->tag(), root->tag());
+
+  // if this is toroidal No New Vertices QuadToTri, then replace the root
+  // dependency face's boundary quads with triangles for better meshing.
+  if(is_toroidal && is_noaddverts){
+    GFace *root = findRootSourceFaceForFace(from);
+    if(root == from){
+      ReplaceBndQuadsInFace(root);
+      Msg::Warning("To facilitate QuadToTri interface on surface %d, source "
+                   "surface %d was re-meshed with all triangles on boundary. "
+                   "To avoid this, use QuadTriAddVerts instead of QuadTriNoNewVerts",
+                   to->tag(), root->tag());
     }
   }
-  
+
   // create triangle elements
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   for(unsigned int i = 0; i < from->triangles.size(); i++){
     std::vector<MVertex*> verts;
     for(int j = 0; j < 3; j++){
       MVertex *v = from->triangles[i]->getVertex(j);
-      MVertex tmp(v->x(), v->y(), v->z(), 0, -1);
+      double x = v->x(), y = v->y(), z = v->z();
       ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
-                  tmp.x(), tmp.y(), tmp.z());
-      itp = pos.find(&tmp);
-      if(itp == pos.end()){ // FIXME: workaround
-        Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-        itp = tmp.linearSearch(pos);
-      }
-      if(itp == pos.end()) {
+                  x, y, z);
+      MVertex *tmp = pos.find(x, y, z);
+      if(!tmp) {
         Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-            tmp.x(), tmp.y(), tmp.z(), to->tag());
+                   x, y, z, to->tag());
         return;
       }
-      verts.push_back(*itp);
+      verts.push_back(tmp);
     }
     addTriangle(verts[0], verts[1], verts[2], to);
   }
 
   // Add triangles for divided quads for QuadTri -- Trevor Strickler
   // if quadtotri and not part of a toroidal extrusion, mesh the top surface accordingly
-  if( detectQuadToTriTop && !is_toroidal ){
-    if( !MeshQuadToTriTopSurface(from, to, pos))
+  if(detectQuadToTriTop && !is_toroidal){
+    if(!MeshQuadToTriTopSurface(from, to, pos))
       Msg::Error("In MeshExtrudedSurface()::copyMesh(), mesh of QuadToTri top "
-		  "surface %d failed.", to->tag() );
+                 "surface %d failed.", to->tag() );
     return;
-  } 
-
+  }
 
   // create quadrangle elements if NOT QuadToTri and NOT toroidal
   for(unsigned int i = 0; i < from->quadrangles.size(); i++){
     std::vector<MVertex*> verts;
     for(int j = 0; j < 4; j++){
       MVertex *v = from->quadrangles[i]->getVertex(j);
-      MVertex tmp(v->x(), v->y(), v->z(), 0, -1);
+      double x = v->x(), y = v->y(), z = v->z();
       ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
-                  tmp.x(), tmp.y(), tmp.z());
-      itp = pos.find(&tmp);
-      if(itp == pos.end()){ // FIXME: workaround
-        Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-        itp = tmp.linearSearch(pos);
-      }
-      if(itp == pos.end()) {
+                  x, y, z);
+      MVertex *tmp = pos.find(x, y, z);
+      if(!tmp) {
         Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in surface %d",
-            tmp.x(), tmp.y(), tmp.z(), to->tag());
+            x, y, z, to->tag());
         return;
       }
-      verts.push_back(*itp);
+      verts.push_back(tmp);
     }
     addQuadrangle(verts[0], verts[1], verts[2], verts[3], to);
   }
@@ -264,26 +255,22 @@ int MeshExtrudedSurface(GFace *gf,
 
   Msg::Info("Meshing surface %d (extruded)", gf->tag());
 
-  // build a set with all the vertices on the boundary of the face gf
-  double old_tol = MVertexLessThanLexicographic::tolerance;
-  MVertexLessThanLexicographic::tolerance = 1.e-12 * CTX::instance()->lc;
-
-  std::set<MVertex*, MVertexLessThanLexicographic> pos;
+  // build an rtree with all the vertices on the boundary of the face gf
+  MVertexRTree pos(CTX::instance()->geom.tolerance * CTX::instance()->lc);
   std::list<GEdge*> edges = gf->edges();
   std::list<GEdge*>::iterator it = edges.begin();
   while(it != edges.end()){
-    pos.insert((*it)->mesh_vertices.begin(), (*it)->mesh_vertices.end());
-    pos.insert((*it)->getBeginVertex()->mesh_vertices.begin(),
-               (*it)->getBeginVertex()->mesh_vertices.end());
-    pos.insert((*it)->getEndVertex()->mesh_vertices.begin(),
-               (*it)->getEndVertex()->mesh_vertices.end());
+    pos.insert((*it)->mesh_vertices);
+    pos.insert((*it)->getBeginVertex()->mesh_vertices);
+    pos.insert((*it)->getEndVertex()->mesh_vertices);
     ++it;
   }
 
   // if the edges of the mesh are constrained, the vertices already
   // exist on the face--so we add them to the set
-  if(constrainedEdges)
-    pos.insert(gf->mesh_vertices.begin(), gf->mesh_vertices.end());
+  if(constrainedEdges){
+    pos.insert(gf->mesh_vertices);
+  }
 
   if(ep->geo.Mode == EXTRUDED_ENTITY) {
     // surface is extruded from a curve
@@ -310,8 +297,6 @@ int MeshExtrudedSurface(GFace *gf,
     copyMesh(from, gf, pos);
   }
 
-  MVertexLessThanLexicographic::tolerance = old_tol;
-
   gf->meshStatistics.status = GFace::DONE;
   return 1;
 }
diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp
index 6473be1..a3b716e 100644
--- a/Mesh/meshGFaceLloyd.cpp
+++ b/Mesh/meshGFaceLloyd.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp
index 9263f66..a74eb44 100644
--- a/Mesh/meshGFaceOptimize.cpp
+++ b/Mesh/meshGFaceOptimize.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,7 +15,7 @@
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "MLine.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "Numeric.h"
 #include "GmshMessage.h"
 #include "Generator.h"
@@ -148,6 +148,11 @@ void buildMeshGenerationDataStructures(GFace *gf,
 
   for(unsigned int i = 0;i < gf->triangles.size(); i++)
     setLcsInit(gf->triangles[i], vSizesMap);
+  std::map<MVertex*, double>::iterator itfind = vSizesMap.find(NULL);
+  if (itfind!=vSizesMap.end()){
+    std::cout << "***************************************** NULL" << std::endl;
+    throw;
+  }
 
   for(unsigned int i = 0;i < gf->triangles.size(); i++)
     setLcs(gf->triangles[i], vSizesMap, data);
@@ -537,7 +542,7 @@ int _removeFourTrianglesNodes(GFace *gf,bool replace_by_quads)
           for(int i=0;i<4;i++){
             newt[i] = new MTriangle(edges[i][0],edges[(i+1)%4][0],edges[(i+2)%4][0]);
             surf[i] = surfaceFaceUV(newt[i],gf);
-            qual[i] = qmTriangle(newt[i],QMTRI_RHO);
+            qual[i] = qmTriangle::gamma(newt[i]);
           }
           double q02=(fabs((surf[0]+surf[2]-surfaceRef)/surfaceRef)<1e-8) ?
             std::min(qual[0],qual[2]) : -1;
@@ -1015,10 +1020,10 @@ void createRegularMesh (GFace *gf,
   int N = e12.size();
   int M = e23.size();
 
- char name3[234];
+  char name3[234];
   sprintf(name3,"quadParam_%d.pos", gf->tag());
   FILE *f3 = Fopen(name3,"w");
-  fprintf(f3,"View \"%s\" {\n",name3);
+  if(f3) fprintf(f3,"View \"%s\" {\n",name3);
 
   //create points using transfinite interpolation
 
@@ -1054,7 +1059,7 @@ void createRegularMesh (GFace *gf,
                            c1.x(),c2.x(),c3.x(),c4.x(),u,v);
       double Vp = TRAN_QUA(p12.y(), p23.y(), p34.y(), p41.y(),
                            c1.y(),c2.y(),c3.y(),c4.y(),u,v);
-      fprintf(f3,"SP(%g,%g,%g) {%d};\n", Up, Vp, 0.0, 1);
+      if(f3) fprintf(f3,"SP(%g,%g,%g) {%d};\n", Up, Vp, 0.0, 1);
 
       // printf("v1=%d v2=%d v3=%d v4=%d \n", v1->getNum(), v2->getNum(), v3->getNum(), v4->getNum());
       // printf("c1=%g %g, c2=%g %g, c3=%g %g, c4=%g,%g \n", c1.x(),c1.y(),c2.x(),c2.y(),c3.x(),c3.y(),c4.x(),c4.y());
@@ -1064,7 +1069,7 @@ void createRegularMesh (GFace *gf,
           (p34.x() && p34.y() == -1.0) ||
           (p41.x() && p41.y() == -1.0)) {
         Msg::Error("Wrong param -1");
-        fclose(f3);
+        if(f3) fclose(f3);
         return;
       }
 
@@ -1080,9 +1085,10 @@ void createRegularMesh (GFace *gf,
     }
   }
 
-  fprintf(f3,"};\n");
-  fclose(f3);
-
+  if(f3){
+    fprintf(f3,"};\n");
+    fclose(f3);
+  }
 }
 
 void updateQuadCavity (GFace *gf,
@@ -1346,18 +1352,20 @@ struct  quadBlob {
     char name[234];
     sprintf(name,"blob%d_%d_%d.pos", iBlob, iter, method);
     FILE *f = Fopen(name,"w");
-    fprintf(f,"View \"%s\" {\n",name);
-    for (unsigned int i = 0; i < quads.size(); i++){
-      quads[i]->writePOS(f,true,false,false,false,false,false);
-    }
-    for (unsigned int i = 0; i < bnodes.size(); i++){
-      fprintf(f,"SP(%g,%g,%g) {%d};\n",
-              bnodes[i]->x(),
-              bnodes[i]->y(),
-              bnodes[i]->z(),topologicalAngle(bnodes[i]));
+    if(f){
+      fprintf(f,"View \"%s\" {\n",name);
+      for (unsigned int i = 0; i < quads.size(); i++){
+        quads[i]->writePOS(f,true,false,false,false,false,false);
+      }
+      for (unsigned int i = 0; i < bnodes.size(); i++){
+        fprintf(f,"SP(%g,%g,%g) {%d};\n",
+                bnodes[i]->x(),
+                bnodes[i]->y(),
+                bnodes[i]->z(),topologicalAngle(bnodes[i]));
+      }
+      fprintf(f,"};\n");
+      fclose(f);
     }
-    fprintf(f,"};\n");
-    fclose(f);
   }
   void smooth (int);
   bool meshable (int iter)
@@ -2021,15 +2029,18 @@ struct opti_data_vertex_relocation {
     }
   }
 
-  void print_cavity (char *name){
+  void print_cavity (char *name)
+  {
     FILE *f = Fopen(name,"w");
-    fprintf(f,"View \"\"{\n");
-    for (unsigned int i=0;i<e.size();++i){
-      MElement *el = e[i];
-      el->writePOS(f,false,false,true,false,false,false);
+    if(f){
+      fprintf(f,"View \"\"{\n");
+      for (unsigned int i=0;i<e.size();++i){
+        MElement *el = e[i];
+        el->writePOS(f,false,false,false,true,false,false);
+      }
+      fprintf(f,"};");
+      fclose (f);
     }
-    fprintf(f,"};");
-    fclose (f);
   }
 
   /// quality measure for a quad
@@ -2851,10 +2862,10 @@ bool edgeSwap(std::set<swapquad> &configs, MTri3 *t1, GFace *gf, int iLocalEdge,
   switch(cr){
   case SWCR_QUAL:
     {
-      const double triQualityRef = std::min(qmTriangle(t1->tri(), QMTRI_RHO),
-                                            qmTriangle(t2->tri(), QMTRI_RHO));
-      const double triQuality = std::min(qmTriangle(t1b, QMTRI_RHO),
-                                         qmTriangle(t2b, QMTRI_RHO));
+      const double triQualityRef = std::min(qmTriangle::gamma(t1->tri()),
+                                            qmTriangle::gamma(t2->tri()));
+      const double triQuality = std::min(qmTriangle::gamma(t1b),
+                                         qmTriangle::gamma(t2b));
       if (!edgeSwapDelProj(v1,v2,v3,v4)){
 	if(triQuality < triQualityRef){
 	  delete t1b;
@@ -3396,9 +3407,9 @@ static int _recombineIntoQuads(GFace *gf, int recur_level, bool cubicGraph = 1)
         t2n[gf->triangles[i]] = i;
         n2t[i] = gf->triangles[i];
       }
-
-      int *elist = new int [2*ecount];
-      int *elen  = new int [ecount];
+      //do not use new[] here, blossom will free it with free() and not with delete
+      int *elist = (int*)malloc(sizeof(int) * 2 * ecount);
+      int *elen  = (int*)malloc(sizeof(int) * ecount);
       for (unsigned int i = 0; i < pairs.size(); ++i){
         elist[2*i] = t2n[pairs[i].t1];
         elist[2*i+1] = t2n[pairs[i].t2];
@@ -3628,15 +3639,16 @@ void recombineIntoQuads(GFace *gf,
       if(haveParam){
         if (saveAll) gf->model()->writeMSH("smoothed.msh");
         int ITER=0;
-	//        int optistatus[6] = {0,0,0,0,0,0};
-	std::set<MEdge,Less_Edge> prioritory;
-	double exbad = -100;
+        //        int optistatus[6] = {0,0,0,0,0,0};
+        std::set<MEdge,Less_Edge> prioritory;
+        double exbad = -100;
         while(1){
-	  //          int maxCavitySize = CTX::instance()->mesh.bunin;
+	  //	  int maxCavitySize = CTX::instance()->mesh.bunin;
 	  //	  optistatus[0] = (ITERB == 1) ?splitFlatQuads(gf, .01, prioritory) : 0;
           //optistatus[1] =
 	  removeTwoQuadsNodes(gf);
-	  //optistatus[4] = _defectsRemovalBunin(gf,36);
+	  //optistatus[4] =
+	  //	  _defectsRemovalBunin(gf,maxCavitySize);
 	  //optistatus[2] =
 	  removeDiamonds(gf) ;
 	  if(haveParam)laplaceSmoothing(gf,CTX::instance()->mesh.nbSmoothing,true);
@@ -3653,8 +3665,8 @@ void recombineIntoQuads(GFace *gf,
         }
       }
       if(haveParam) {
-	laplaceSmoothing(gf,CTX::instance()->mesh.nbSmoothing, true);
-	optiSmoothing(gf,CTX::instance()->mesh.nbSmoothing,true);
+        laplaceSmoothing(gf,CTX::instance()->mesh.nbSmoothing, true);
+        optiSmoothing(gf,CTX::instance()->mesh.nbSmoothing,true);
       }
       // untangleInvalidQuads(gf,CTX::instance()->mesh.nbSmoothing);
     }
@@ -3735,24 +3747,24 @@ Temporary::~Temporary(){}
 SVector3 Temporary::compute_gradient(MElement*element)
 {
   /*double x1,y1,z1;
-  double x2,y2,z2;
-  double x3,y3,z3;
-  double x,y,z;
-  MVertex*vertex1 = element->getVertex(0);
-  MVertex*vertex2 = element->getVertex(1);
-  MVertex*vertex3 = element->getVertex(2);
-  x1 = vertex1->x();
-  y1 = vertex1->y();
-  z1 = vertex1->z();
-  x2 = vertex2->x();
-  y2 = vertex2->y();
-  z2 = vertex2->z();
-  x3 = vertex3->x();
-  y3 = vertex3->y();
-  z3 = vertex3->z();
-  x = (x1+x2+x3)/3.0;
-  y = (y1+y2+y3)/3.0;
-  z = (z1+z2+z3)/3.0;*/
+    double x2,y2,z2;
+    double x3,y3,z3;
+    double x,y,z;
+    MVertex*vertex1 = element->getVertex(0);
+    MVertex*vertex2 = element->getVertex(1);
+    MVertex*vertex3 = element->getVertex(2);
+    x1 = vertex1->x();
+    y1 = vertex1->y();
+    z1 = vertex1->z();
+    x2 = vertex2->x();
+    y2 = vertex2->y();
+    z2 = vertex2->z();
+    x3 = vertex3->x();
+    y3 = vertex3->y();
+    z3 = vertex3->z();
+    x = (x1+x2+x3)/3.0;
+    y = (y1+y2+y3)/3.0;
+    z = (z1+z2+z3)/3.0;*/
   return SVector3(0.0,1.0,0.0);
 }
 
@@ -3814,7 +3826,7 @@ SVector3 Temporary::compute_other_vector(MElement *element)
 }
 
 double Temporary::compute_alignment(const MEdge &_edge, MElement *element1,
-                                    MElement *element2)
+    MElement *element2)
 {
   //int number;
   double scalar_productA,scalar_productB;
@@ -3830,7 +3842,7 @@ double Temporary::compute_alignment(const MEdge &_edge, MElement *element1,
   vertexA = _edge.getVertex(0);
   vertexB = _edge.getVertex(1);
   edge = SVector3(vertexB->x()-vertexA->x(), vertexB->y()-vertexA->y(),
-                  vertexB->z()-vertexA->z());
+      vertexB->z()-vertexA->z());
   edge = edge * (1/norm(edge));
   scalar_productA = fabs(dot(gradient,edge));
   scalar_productB = fabs(dot(other_vector,edge));
@@ -3851,15 +3863,15 @@ void Temporary::read_data(std::string file_name)
   for(i = 0;i < data->getNumEntities(0);i++)
   {
     if(data->skipEntity(0,i)) continue;
-	for(j = 0;j < data->getNumElements(0,i);j++){
-	  if(data->skipElement(0,i,j)) continue;
-	  element = data->getElement(0,i,j);
-	  number = element->getNum();
-	  data->getValue(0,i,j,0,x);
-	  data->getValue(0,i,j,1,y);
-	  data->getValue(0,i,j,2,z);
-	  gradients[number] = SVector3(x,y,z);
-	}
+    for(j = 0;j < data->getNumElements(0,i);j++){
+      if(data->skipElement(0,i,j)) continue;
+      element = data->getElement(0,i,j);
+      number = element->getNum();
+      data->getValue(0,i,j,0,x);
+      data->getValue(0,i,j,1,y);
+      data->getValue(0,i,j,2,z);
+      gradients[number] = SVector3(x,y,z);
+    }
   }
 #endif
 }
diff --git a/Mesh/meshGFaceOptimize.h b/Mesh/meshGFaceOptimize.h
index 6dde944..b4a7515 100644
--- a/Mesh/meshGFaceOptimize.h
+++ b/Mesh/meshGFaceOptimize.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceQuadrilateralize.cpp b/Mesh/meshGFaceQuadrilateralize.cpp
index e07441d..85c7a8b 100644
--- a/Mesh/meshGFaceQuadrilateralize.cpp
+++ b/Mesh/meshGFaceQuadrilateralize.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceQuadrilateralize.h b/Mesh/meshGFaceQuadrilateralize.h
index e75561e..c8509e5 100644
--- a/Mesh/meshGFaceQuadrilateralize.h
+++ b/Mesh/meshGFaceQuadrilateralize.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGFaceTransfinite.cpp b/Mesh/meshGFaceTransfinite.cpp
index 696acf6..d07b530 100644
--- a/Mesh/meshGFaceTransfinite.cpp
+++ b/Mesh/meshGFaceTransfinite.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp
index 7bbe110..4506b33 100644
--- a/Mesh/meshGRegion.cpp
+++ b/Mesh/meshGRegion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -31,11 +31,13 @@
 #include "GFaceCompound.h"
 #include "meshGRegionMMG3D.h"
 #include "simple3D.h"
-#include "Levy3D.h"
 #include "directions3D.h"
+#include "pointInsertion.h"
+#include "Levy3D.h"
 #include "discreteFace.h"
 #include "filterElements.h"
 
+
 #if defined(HAVE_ANN)
 #include "ANN/ANN.h"
 #endif
@@ -160,10 +162,9 @@ void printVoronoi(GRegion *gr,  std::set<SPoint3> &candidates)
   }
 
   //print voronoi poles
-  FILE *outfile;
   //smooth_normals *snorm = gr->model()->normals;
-  outfile = Fopen("nodes.pos", "w");
-  fprintf(outfile, "View \"Voronoi poles\" {\n");
+  FILE *outfile = Fopen("nodes.pos", "w");
+  if(outfile) fprintf(outfile, "View \"Voronoi poles\" {\n");
   std::map<MVertex*, std::set<MTetrahedron*> >::iterator itmap = node2Tet.begin();
   for(; itmap != node2Tet.end(); itmap++){
     //MVertex *v = itmap->first;
@@ -174,35 +175,36 @@ void printVoronoi(GRegion *gr,  std::set<SPoint3> &candidates)
     for(; it != allTets.end(); it++){
       double radius =  (*it)->getCircumRadius();
       if (radius > maxRadius){
-    	maxRadius = radius;
-    	poleTet = *it;
+        maxRadius = radius;
+        poleTet = *it;
       }
     }
     //if (v->onWhat()->dim() == 2 ){
-      SPoint3 pc = poleTet->circumcenter();
-      //double nx,ny,nz;
-      // SVector3 vN = snorm->get(v->x(), v->y(), v->z(), nx,ny,nz);
-      // SVector3 pcv(pc.x()-nx, pc.y()-ny,pc.z()-nz);
-      // printf("nx=%g ny=%g nz=%g dot=%g \n",  nx,ny,nz, dot(vN, pcv));
-      // if ( dot(vN, pcv) > 0.0 )
-      double x[3] = {pc.x(), pc.y(), pc.z()};
-      double uvw[3];
-      poleTet->xyz2uvw(x, uvw);
-      //bool inside = poleTet->isInside(uvw[0], uvw[1], uvw[2]);
-      //if (inside){
-	fprintf(outfile,"SP(%g,%g,%g)  {%g};\n",
-		pc.x(), pc.y(), pc.z(), maxRadius);
-	candidates.insert(pc);
-	//}
+    SPoint3 pc = poleTet->circumcenter();
+    //double nx,ny,nz;
+    // SVector3 vN = snorm->get(v->x(), v->y(), v->z(), nx,ny,nz);
+    // SVector3 pcv(pc.x()-nx, pc.y()-ny,pc.z()-nz);
+    // printf("nx=%g ny=%g nz=%g dot=%g \n",  nx,ny,nz, dot(vN, pcv));
+    // if ( dot(vN, pcv) > 0.0 )
+    double x[3] = {pc.x(), pc.y(), pc.z()};
+    double uvw[3];
+    poleTet->xyz2uvw(x, uvw);
+    //bool inside = poleTet->isInside(uvw[0], uvw[1], uvw[2]);
+    //if (inside){
+    if(outfile)
+      fprintf(outfile,"SP(%g,%g,%g)  {%g};\n", pc.x(), pc.y(), pc.z(), maxRadius);
+    candidates.insert(pc);
+    //}
     //}
   }
-  fprintf(outfile,"};\n");
-  fclose(outfile);
+  if(outfile){
+    fprintf(outfile,"};\n");
+    fclose(outfile);
+  }
 
-  //print scalar lines
-  FILE *outfile2;
-  outfile2 = Fopen("edges.pos", "w");
-  fprintf(outfile2, "View \"Voronoi edges\" {\n");
+  // print scalar lines
+  FILE *outfile2 = Fopen("edges.pos", "w");
+  if(outfile2) fprintf(outfile2, "View \"Voronoi edges\" {\n");
   std::map<MFace, std::vector<MTetrahedron*> , Less_Face >::iterator itmap2 = face2Tet.begin();
   for(; itmap2 != face2Tet.end(); itmap2++){
     std::vector<MTetrahedron*>  allTets = itmap2->second;
@@ -212,13 +214,15 @@ void printVoronoi(GRegion *gr,  std::set<SPoint3> &candidates)
     //std::set<SPoint3>::const_iterator it1 = candidates.find(pc1);
     //std::set<SPoint3>::const_iterator it2 = candidates.find(pc2);
     //if( it1 != candidates.end() || it2 != candidates.end())
+    if(outfile2)
       fprintf(outfile2,"SL(%g,%g,%g,%g,%g,%g)  {%g,%g};\n",
-	      pc1.x(), pc1.y(), pc1.z(), pc2.x(), pc2.y(), pc2.z(),
-	      allTets[0]->getCircumRadius(),allTets[1]->getCircumRadius());
-   }
-  fprintf(outfile2,"};\n");
-  fclose(outfile2);
-
+              pc1.x(), pc1.y(), pc1.z(), pc2.x(), pc2.y(), pc2.z(),
+              allTets[0]->getCircumRadius(),allTets[1]->getCircumRadius());
+  }
+  if(outfile2){
+    fprintf(outfile2,"};\n");
+    fclose(outfile2);
+  }
 }
 
 
@@ -309,7 +313,8 @@ void buildTetgenStructure(GRegion *gr, tetgenio &in, std::vector<MVertex*> &numb
 
   in.mesh_dim = 3;
   in.firstnumber = 1;
-  in.numberofpoints = allBoundingVertices.size() + Filler::get_nbr_new_vertices() +
+  int nbvertices_filler = (old_algo_hexa()) ? Filler::get_nbr_new_vertices() : Filler3D::get_nbr_new_vertices();
+  in.numberofpoints = allBoundingVertices.size() + nbvertices_filler +
     LpSmoother::get_nbr_interior_vertices();
   in.pointlist = new REAL[in.numberofpoints * 3];
   in.pointmarkerlist = NULL;
@@ -325,9 +330,12 @@ void buildTetgenStructure(GRegion *gr, tetgenio &in, std::vector<MVertex*> &numb
     ++itv;
   }
 
-  for(int i=0;i<Filler::get_nbr_new_vertices();i++){
+  for(int i=0;i<nbvertices_filler;i++){
     MVertex* v;
-    v = Filler::get_new_vertex(i);
+    if (old_algo_hexa())
+      v = Filler::get_new_vertex(i);
+    else
+      v = Filler3D::get_new_vertex(i);
     in.pointlist[(I - 1) * 3 + 0] = v->x();
     in.pointlist[(I - 1) * 3 + 1] = v->y();
     in.pointlist[(I - 1) * 3 + 2] = v->z();
@@ -904,7 +912,7 @@ static bool modifyInitialMeshForTakingIntoAccountBoundaryLayers(GRegion *gr, spl
 
   // now treat the Wedges
   // we have to know the two target GFaces that are concerned with a GEdge
-  std::set<MEdge>::iterator ite =  edges.begin();
+  std::set<MEdge,Less_Edge>::iterator ite =  edges.begin();
   while(ite != edges.end()){
     MEdge e = *ite;
     MVertex *v1 = e.getVertex(0);
@@ -972,15 +980,17 @@ static bool modifyInitialMeshForTakingIntoAccountBoundaryLayers(GRegion *gr, spl
   // ------------------------------------------------------------------------------------
   {
     FILE *ff2 = fopen ("tato3D.pos","w");
-    fprintf(ff2,"View \" \"{\n");
-    for (unsigned int i = 0; i < blPrisms.size();i++){
-      blPrisms[i]->writePOS(ff2,1,0,0,0,0,0);
-    }
-    for (unsigned int i = 0; i < blHexes.size();i++){
-      blHexes[i]->writePOS(ff2,1,0,0,0,0,0);
+    if(ff2){
+      fprintf(ff2,"View \" \"{\n");
+      for (unsigned int i = 0; i < blPrisms.size();i++){
+        blPrisms[i]->writePOS(ff2,1,0,0,0,0,0);
+      }
+      for (unsigned int i = 0; i < blHexes.size();i++){
+        blHexes[i]->writePOS(ff2,1,0,0,0,0,0);
+      }
+      fprintf(ff2,"};\n");
+      fclose(ff2);
     }
-    fprintf(ff2,"};\n");
-    fclose(ff2);
   }
 
   for (unsigned int i = 0; i < blPrisms.size();i++){
@@ -1002,14 +1012,15 @@ static bool modifyInitialMeshForTakingIntoAccountBoundaryLayers(GRegion *gr, spl
   std::map<MFace,MElement*,Less_Face>::iterator it =  bfaces.begin();
 
   FILE *ff = fopen ("toto3D.pos","w");
-  fprintf(ff,"View \" \"{\n");
+  if(ff) fprintf(ff,"View \" \"{\n");
   for (; it != bfaces.end(); ++it){
     if (it->first.getNumVertices() == 3){
       nf->triangles.push_back(new MTriangle (it->first.getVertex(0),it->first.getVertex(1),it->first.getVertex(2)));
-      fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1};\n",
-	      it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
-	      it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
-	      it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z());
+      if(ff)
+        fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){1,1,1};\n",
+                it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
+                it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
+                it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z());
     }
     else {
 
@@ -1055,35 +1066,38 @@ static bool modifyInitialMeshForTakingIntoAccountBoundaryLayers(GRegion *gr, spl
       nf->triangles.push_back(new MTriangle (it->first.getVertex(1),it->first.getVertex(2),newv));
       nf->triangles.push_back(new MTriangle (it->first.getVertex(2),it->first.getVertex(3),newv));
       nf->triangles.push_back(new MTriangle (it->first.getVertex(3),it->first.getVertex(0),newv));
-
-      fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
-	      it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
-	      it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
-	      newv->x(),newv->y(),newv->z());
-
-      fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
-	      it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
-	      it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
-	      newv->x(),newv->y(),newv->z());
-
-      fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
-	      it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
-	      it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z(),
-	      newv->x(),newv->y(),newv->z());
-      fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
-	      it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z(),
-	      it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
-	      newv->x(),newv->y(),newv->z());
-
-      fprintf(ff,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){3,3,3,3};\n",
-	      it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
-	      it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
-	      it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
-	      it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z());
+      if(ff){
+        fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
+                it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
+                it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
+                newv->x(),newv->y(),newv->z());
+
+        fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
+                it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
+                it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
+                newv->x(),newv->y(),newv->z());
+
+        fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
+                it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
+                it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z(),
+                newv->x(),newv->y(),newv->z());
+        fprintf(ff,"ST (%g,%g,%g,%g,%g,%g,%g,%g,%g){2,2,2};\n",
+                it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z(),
+                it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
+                newv->x(),newv->y(),newv->z());
+
+        fprintf(ff,"SQ (%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){3,3,3,3};\n",
+                it->first.getVertex(0)->x(),it->first.getVertex(0)->y(),it->first.getVertex(0)->z(),
+                it->first.getVertex(1)->x(),it->first.getVertex(1)->y(),it->first.getVertex(1)->z(),
+                it->first.getVertex(2)->x(),it->first.getVertex(2)->y(),it->first.getVertex(2)->z(),
+                it->first.getVertex(3)->x(),it->first.getVertex(3)->y(),it->first.getVertex(3)->z());
+      }
     }
   }
-  fprintf(ff,"};\n");
-  fclose(ff);
+  if(ff){
+    fprintf(ff,"};\n");
+    fclose(ff);
+  }
 
   printf("discrete face with %d %d elems\n", (int)nf->triangles.size(),
          (int)nf->quadrangles.size());
@@ -1153,9 +1167,9 @@ bool CreateAnEmptyVolumeMesh(GRegion *gr)
   char opts[128];
   buildTetgenStructure(gr, in, numberedV, sqr);
   printf("tetgen structure created\n");
-  sprintf(opts, "-Ype%c",
-	  (Msg::GetVerbosity() < 3) ? 'Q':
-	  (Msg::GetVerbosity() > 6) ? 'V': '\0');
+  sprintf(opts, "-Ype%sT%g",
+	  (Msg::GetVerbosity() < 3) ? "Q" : (Msg::GetVerbosity() > 6) ? "V" : "",
+          CTX::instance()->mesh.toleranceInitialDelaunay);
   try{
     tetrahedralize(opts, &in, &out);
   }
@@ -1214,29 +1228,10 @@ void MeshDelaunayVolumeTetgen(std::vector<GRegion*> &regions)
     std::vector<MVertex*> numberedV;
     char opts[128];
     buildTetgenStructure(gr, in, numberedV, sqr);
-    if(CTX::instance()->mesh.algo3d == ALGO_3D_FRONTAL_DEL ||
-       CTX::instance()->mesh.algo3d == ALGO_3D_FRONTAL_HEX ||
-       CTX::instance()->mesh.algo3d == ALGO_3D_MMG3D ||
-       CTX::instance()->mesh.algo2d == ALGO_2D_FRONTAL_QUAD ||
-       CTX::instance()->mesh.algo2d == ALGO_2D_BAMG){
-      sprintf(opts, "Ype%c",  (Msg::GetVerbosity() < 3) ? 'Q':
-	      (Msg::GetVerbosity() > 6) ? 'V': '\0');
-      // removed -q because mesh sizes at new vertices are wrong
-      // sprintf(opts, "-q1.5pY%c",  (Msg::GetVerbosity() < 3) ? 'Q':
-      // 	 (Msg::GetVerbosity() > 6) ? 'V': '\0');
-    }
-    else if (CTX::instance()->mesh.algo3d == ALGO_3D_RTREE){
-       sprintf(opts, "S0Ype%c",  (Msg::GetVerbosity() < 3) ? 'Q':
-	       (Msg::GetVerbosity() > 6) ? 'V': '\0');
-    }
-    else {
-      sprintf(opts, "Ype%c",
-              (Msg::GetVerbosity() < 3) ? 'Q':
-              (Msg::GetVerbosity() > 6) ? 'V': '\0');
-      // removed -q because mesh sizes at new vertices are wrong
-      // sprintf(opts, "-q3.5Ype%c", (Msg::GetVerbosity() < 3) ? 'Q':
-      //        (Msg::GetVerbosity() > 6) ? 'V': '\0');*/
-    }
+    sprintf(opts, "%sYpe%sT%g",
+            CTX::instance()->mesh.algo3d == ALGO_3D_RTREE ? "S0" : "",
+            (Msg::GetVerbosity() < 3) ? "Q" : (Msg::GetVerbosity() > 6) ? "V" : "",
+            CTX::instance()->mesh.toleranceInitialDelaunay);
     try{
       tetrahedralize(opts, &in, &out);
     }
@@ -1297,9 +1292,11 @@ void MeshDelaunayVolumeTetgen(std::vector<GRegion*> &regions)
   else if(CTX::instance()->mesh.algo3d == ALGO_3D_MMG3D){
     refineMeshMMG(gr);
   }
-  else
-    if(!Filler::get_nbr_new_vertices() && !LpSmoother::get_nbr_interior_vertices()){
-      insertVerticesInRegion(gr,2000000000,!_BL);
+  else{
+      int nbvertices_filler = (old_algo_hexa()) ? Filler::get_nbr_new_vertices() : Filler3D::get_nbr_new_vertices();
+      if(!nbvertices_filler && !LpSmoother::get_nbr_interior_vertices()){
+        insertVerticesInRegion(gr,2000000000,!_BL);
+      }
     }
 
   //emi test frame field
@@ -1414,7 +1411,8 @@ namespace nglib {
 }
 using namespace nglib;
 
-static void getAllBoundingVertices(GRegion *gr, std::set<MVertex*> &allBoundingVertices)
+static void getAllBoundingVertices(GRegion *gr,
+                                   std::set<MVertex*, MVertexLessThanNum> &allBoundingVertices)
 {
   std::list<GFace*> faces = gr->faces();
   std::list<GFace*>::iterator it = faces.begin();
@@ -1437,10 +1435,10 @@ Ng_Mesh *buildNetgenStructure(GRegion *gr, bool importVolumeMesh,
   Ng_Init();
   Ng_Mesh *ngmesh = Ng_NewMesh();
 
-  std::set<MVertex*> allBoundingVertices;
+  std::set<MVertex*, MVertexLessThanNum> allBoundingVertices;
   getAllBoundingVertices(gr, allBoundingVertices);
 
-  std::set<MVertex*>::iterator itv = allBoundingVertices.begin();
+  std::set<MVertex*, MVertexLessThanNum>::iterator itv = allBoundingVertices.begin();
   int I = 1;
   while(itv != allBoundingVertices.end()){
     double tmp[3];
@@ -1562,10 +1560,9 @@ int intersect_line_triangle(double X[3], double Y[3], double Z[3] ,
   b[1] = P[1] - Y[0];
   b[2] = P[2] - Z[0];
 
-  if(!sys3x3_with_tol(mat, b, res, &det))
-    {
-      return 0;
-    }
+  if(!sys3x3_with_tol(mat, b, res, &det)){
+    return 0;
+  }
   //  printf("coucou %g %g %g\n",res[0],res[1],res[2]);
   if(res[0] >= eps_prec && res[0] <= 1.0 - eps_prec &&
      res[1] >= eps_prec && res[1] <= 1.0 - eps_prec &&
@@ -1597,8 +1594,13 @@ void meshNormalsPointOutOfTheRegion(GRegion *gr)
   std::list<GFace*> faces = gr->faces();
   std::list<GFace*>::iterator it = faces.begin();
 
-  //for (std::list<GFace*>::iterator itb = faces.begin(); itb != faces.end(); itb ++)
-  //  printf("face=%d size =%d\n", (*itb)->tag(), faces.size());
+  // perform intersection check in normalized coordinates
+  SBoundingBox3d bbox = gr->bounds();
+  double scaling = norm(SVector3(bbox.max(), bbox.min()));
+  if(!scaling){
+    Msg::Warning("Bad scaling in meshNormalsPointOutOfTheRegion");
+    scaling = 1.;
+  }
 
   double rrr[6];
   setRand(rrr);
@@ -1611,6 +1613,12 @@ void meshNormalsPointOutOfTheRegion(GRegion *gr)
       double X[3] = {t->getVertex(0)->x(), t->getVertex(1)->x(), t->getVertex(2)->x()};
       double Y[3] = {t->getVertex(0)->y(), t->getVertex(1)->y(), t->getVertex(2)->y()};
       double Z[3] = {t->getVertex(0)->z(), t->getVertex(1)->z(), t->getVertex(2)->z()};
+      for(int i = 0; i < 3; i++){
+        X[i] /= scaling;
+        Y[i] /= scaling;
+        Z[i] /= scaling;
+      }
+
       double P[3] = {(X[0] + X[1] + X[2]) / 3.,
                      (Y[0] + Y[1] + Y[2]) / 3.,
                      (Z[0] + Z[1] + Z[2]) / 3.};
@@ -1637,6 +1645,11 @@ void meshNormalsPointOutOfTheRegion(GRegion *gr)
                              t_b->getVertex(2)->y()};
             double Z_b[3] = {t_b->getVertex(0)->z(), t_b->getVertex(1)->z(),
                              t_b->getVertex(2)->z()};
+            for(int i = 0; i < 3; i++){
+              X_b[i] /= scaling;
+              Y_b[i] /= scaling;
+              Z_b[i] /= scaling;
+            }
             int inters = intersect_line_triangle(X_b, Y_b, Z_b, P, N, 1.e-9);
             nb_intersect += inters;
           }
@@ -1662,12 +1675,14 @@ void meshNormalsPointOutOfTheRegion(GRegion *gr)
   }
 
   // FILE *fp = Fopen("debug.pos", "w");
-  // fprintf(fp, "View \"debug\" {\n");
-  // for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++)
-  //   for(unsigned int i = 0; i < (*it)->triangles.size(); i++)
-  //     (*it)->triangles[i]->writePOS(fp, 1., (*it)->tag());
-  // fprintf(fp, "};\n");
-  // fclose(fp);
+  // if(fp){
+  //   fprintf(fp, "View \"debug\" {\n");
+  //   for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++)
+  //     for(unsigned int i = 0; i < (*it)->triangles.size(); i++)
+  //       (*it)->triangles[i]->writePOS(fp, 1., (*it)->tag());
+  //   fprintf(fp, "};\n");
+  //   fclose(fp);
+  // }
 }
 
 void meshGRegion::operator() (GRegion *gr)
@@ -1702,7 +1717,7 @@ void meshGRegion::operator() (GRegion *gr)
 
   // replace discreteFaces by their compounds
   {
-    std::set<GFace*> mySet;
+    std::set<GFace*, GEntityLessThan> mySet;
     std::list<GFace*>::iterator it = faces.begin();
     while(it != faces.end()){
       if((*it)->getCompound())
@@ -1778,7 +1793,7 @@ void optimizeMeshGRegionGmsh::operator() (GRegion *gr)
   if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) return;
 
   Msg::Info("Optimizing volume %d", gr->tag());
-  optimizeMesh(gr, QMTET_2);
+  optimizeMesh(gr, qmTetrahedron::QMTET_GAMMA);
 }
 
 
diff --git a/Mesh/meshGRegion.h b/Mesh/meshGRegion.h
index 5e7ab28..bd27d1c 100644
--- a/Mesh/meshGRegion.h
+++ b/Mesh/meshGRegion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGRegionCarveHole.cpp b/Mesh/meshGRegionCarveHole.cpp
index 16f3645..68ffdc8 100644
--- a/Mesh/meshGRegionCarveHole.cpp
+++ b/Mesh/meshGRegionCarveHole.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGRegionDelaunayInsertion.cpp b/Mesh/meshGRegionDelaunayInsertion.cpp
index 29d6c58..18b57cd 100644
--- a/Mesh/meshGRegionDelaunayInsertion.cpp
+++ b/Mesh/meshGRegionDelaunayInsertion.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,7 +9,7 @@
 #include "GmshMessage.h"
 #include "robustPredicates.h"
 #include "OS.h"
-#include "BackgroundMesh.h"
+//#include "BackgroundMesh.h"
 #include "meshGRegion.h"
 #include "meshGRegionLocalMeshMod.h"
 #include "meshGRegionDelaunayInsertion.h"
@@ -79,7 +79,7 @@ struct faceXtet{
     unsorted[0] = v0;
     unsorted[1] = v1;
     unsorted[2] = v2;
-    
+
     v[0] = std::min(std::min(v0,v1),v2);
     v[2] = std::max(std::max(v0,v1),v2);
     v[1] = (v0 != v[0] && v0 != v[2]) ? v0 : (v1 != v[0] && v1 != v[2]) ? v1 : v2;
@@ -130,7 +130,7 @@ void connectTets_vector2(std::vector<MTet4*> &t, std::vector<faceXtet> &conn)
   }
   if (!conn.size())return;
   std::sort(conn.begin(), conn.end());
-  
+
   for (unsigned int i=0;i<conn.size()-1;i++){
     faceXtet &f1  = conn[i];
     faceXtet &f2  = conn[i+1];
@@ -366,7 +366,7 @@ void recurFindCavity(std::vector<faceXtet> & shell,
       if (circ && (neigh->onWhat() == t->onWhat()))
         recurFindCavity(shell, cavity, v, neigh);
       else
-        shell.push_back(fxt);      
+        shell.push_back(fxt);
     }
   }
 }
@@ -378,7 +378,7 @@ void recurFindCavity(std::vector<faceXtet> & shell,
 // 			MTet4 *t,
 // 			std::stack<MTet4*> &_stack)
 // {
-  
+
 //   _stack.push(t);
 //   while(!_stack.empty()){
 //     t = _stack.top();
@@ -386,7 +386,7 @@ void recurFindCavity(std::vector<faceXtet> & shell,
 //     if (!t->isDeleted()){
 //       t->setDeleted(true);
 //       cavity.push_back(t);
-      
+
 //       for (int i = 0; i < 4; i++){
 // 	MTet4 *neigh = t->getNeigh(i) ;
 // 	faceXtet fxt (t, i);
@@ -408,19 +408,21 @@ void recurFindCavity(std::vector<faceXtet> & shell,
 void printTets (const char *fn, std::list<MTet4*> &cavity, bool force = false )
 {
   FILE *f = Fopen (fn,"w");
-  fprintf(f,"View \"\"{\n");
-  std::list<MTet4*>::iterator ittet = cavity.begin();
-  std::list<MTet4*>::iterator ittete = cavity.end();
-  while (ittet != ittete){
-    MTet4 *tet = *ittet;
-    if (force || !tet->isDeleted()){
-      MTetrahedron *t = tet->tet();
-      t->writePOS (f, false,false,true,false,false,false);
+  if(f){
+    fprintf(f,"View \"\"{\n");
+    std::list<MTet4*>::iterator ittet = cavity.begin();
+    std::list<MTet4*>::iterator ittete = cavity.end();
+    while (ittet != ittete){
+      MTet4 *tet = *ittet;
+      if (force || !tet->isDeleted()){
+        MTetrahedron *t = tet->tet();
+        t->writePOS (f, false,false,false,true,false,false);
+      }
+      ittet++;
     }
-    ittet++;
+    fprintf(f,"};\n");
+    fclose(f);
   }
-  fprintf(f,"};\n");
-  fclose(f);
 }
 
 
@@ -468,7 +470,7 @@ bool insertVertexB(std::list<faceXtet> &shell,
 
     MTet4 *t4 = myFactory.Create(tr, vSizes, vSizesBGM);
     t4->setOnWhat(t->onWhat());
-    
+
     double d1 = sqrt((it->v[0]->x() - v->x()) * (it->v[0]->x() - v->x()) +
                      (it->v[0]->y() - v->y()) * (it->v[0]->y() - v->y()) +
                      (it->v[0]->z() - v->z()) * (it->v[0]->z() - v->z()));
@@ -480,7 +482,7 @@ bool insertVertexB(std::list<faceXtet> &shell,
                      (it->v[2]->z() - v->z()) * (it->v[2]->z() - v->z()));
 
     if (d1 < LL * .05 || d2 < LL * .05 || d3 < LL * .05) onePointIsTooClose = true;
-    
+
     newTets[k++] = t4;
     // all new tets are pushed front in order to ba able to destroy
     // them if the cavity is not star shaped around the new vertex.
@@ -557,6 +559,7 @@ bool insertVertex(MVertex *v,
 static void setLcs(MTriangle *t, std::map<MVertex*, double> &vSizes,
                    std::set<MVertex*> &bndVertices)
 {
+
   for(int i = 0; i < 3; i++){
     bndVertices.insert(t->getVertex(i));
     MEdge e = t->getEdge(i);
@@ -572,6 +575,31 @@ static void setLcs(MTriangle *t, std::map<MVertex*, double> &vSizes,
     if (iti == vSizes.end() || iti->second < l) vSizes[vi] = l;
     if (itj == vSizes.end() || itj->second < l) vSizes[vj] = l;
   }
+
+  /*
+  double l = 0;
+  for(int i = 0; i < 3; i++){
+    MEdge e = t->getEdge(i);
+    MVertex *vi = e.getVertex(0);
+    MVertex *vj = e.getVertex(1);
+    double dx = vi->x()-vj->x();
+    double dy = vi->y()-vj->y();
+    double dz = vi->z()-vj->z();
+    l += sqrt(dx * dx + dy * dy + dz * dz);
+  }
+  l /= 3;
+  for(int i = 0; i < 3; i++){
+    bndVertices.insert(t->getVertex(i));
+    MEdge e = t->getEdge(i);
+    MVertex *vi = e.getVertex(0);
+    MVertex *vj = e.getVertex(1);
+    std::map<MVertex*,double>::iterator iti = vSizes.find(vi);
+    std::map<MVertex*,double>::iterator itj = vSizes.find(vj);
+    // use largest edge length
+    if (iti == vSizes.end() || iti->second > l) vSizes[vi] = l;
+    if (itj == vSizes.end() || itj->second > l) vSizes[vj] = l;
+  }
+  */
 }
 
 static void setLcs(MTetrahedron *t, std::map<MVertex*, double> &vSizes,
@@ -734,7 +762,7 @@ void non_recursive_classify(MTet4 *t, std::list<MTet4*> &theRegion,
 
 void adaptMeshGRegion::operator () (GRegion *gr)
 {
-  const qualityMeasure4Tet qm = QMTET_2;
+  const qmTetrahedron::Measures qm = qmTetrahedron::QMTET_GAMMA;
 
   typedef std::list<MTet4 *> CONTAINER ;
   CONTAINER allTets;
@@ -793,7 +821,7 @@ void adaptMeshGRegion::operator () (GRegion *gr)
       if (!(*it)->isDeleted()){
         for (int i = 0; i < 4; i++){
           for (int j = 0; j < 4; j++){
-            if (collapseVertex(newTets, *it, i, j, QMTET_2)){
+            if (collapseVertex(newTets, *it, i, j, qmTetrahedron::QMTET_GAMMA)){
               nbCollapse++; i = j = 10;
             }
           }
@@ -917,9 +945,9 @@ void adaptMeshGRegion::operator () (GRegion *gr)
 }
 
 //template <class CONTAINER, class DATA>
-void optimizeMesh(GRegion *gr, const qualityMeasure4Tet &qm)
+void optimizeMesh(GRegion *gr, const qmTetrahedron::Measures &qm)
 {
-  
+
   typedef std::list<MTet4 *> CONTAINER ;
   CONTAINER allTets;
   for(unsigned int i = 0; i < gr->tetrahedra.size(); i++){
@@ -1443,7 +1471,7 @@ void insertVerticesInRegion (GRegion *gr, int maxVert, bool _classify)
 	double qq = (*it)->getQuality();
 	if (qq < .4)
 	  for (int i = 0; i < 4; i++){
-	    if (smoothVertex(*it, i, QMTET_2)) nbReloc++;
+	    if (smoothVertex(*it, i, qmTetrahedron::QMTET_GAMMA)) nbReloc++;
 	  }
       }
     }
@@ -1505,9 +1533,9 @@ void bowyerWatsonFrontalLayers(GRegion *gr, bool hex)
   std::set<MTet4*, compareTet4Ptr> activeTets;
   int NUM = 0;
 
-  if (!backgroundMesh::current()) {
-    // TODO !!!
-  }
+//  if (!backgroundMesh::current()) {
+//    // TODO !!!
+//  }
 
   if (hex){
     LIMIT_ = sqrt(2.) * .99;
@@ -1656,7 +1684,7 @@ void bowyerWatsonFrontalLayers(GRegion *gr, bool hex)
 	double qq = (*it)->getQuality();
 	if (qq < .4)
 	  for (int i = 0; i < 4; i++){
-	    if (smoothVertex(*it, i, QMTET_2)) nbReloc++;
+	    if (smoothVertex(*it, i, qmTetrahedron::QMTET_GAMMA)) nbReloc++;
 	  }
       }
     }
@@ -1715,7 +1743,7 @@ static void initialCube (std::vector<MVertex*> &v,
 
 int straddling_segment_intersects_triangle(SPoint3 &p1,SPoint3 &p2,
 					   SPoint3 &q1,SPoint3 &q2,
-					   SPoint3 &q3) 
+					   SPoint3 &q3)
 {
   double s1 = robustPredicates::orient3d(p1, p2, q2, q3);
   double s2 = robustPredicates::orient3d(p1, p2, q3, q1);
@@ -1748,7 +1776,7 @@ static MTet4* search4Tet (MTet4 *t, MVertex *v, int _size,int & ITER) {
 	SPoint3 q1(fxt.v[0]->x(),fxt.v[0]->y(),fxt.v[0]->z());
 	SPoint3 q2(fxt.v[1]->x(),fxt.v[1]->y(),fxt.v[1]->z());
 	SPoint3 q3(fxt.v[2]->x(),fxt.v[2]->y(),fxt.v[2]->z());
-	
+
 
 	if ( straddling_segment_intersects_triangle (p1,p2,q1,q2,q3)){
 	  found = i;
@@ -1821,7 +1849,7 @@ void sanityCheck1(MTet4 *t)
   double t1 = Cpu();
 
   /// double ta=0,tb=0,tc=0,td=0,T;
-  
+
   for (size_t i=0;i<v.size();i++){
     MVertex *pv = v[i];
 
@@ -1843,7 +1871,7 @@ void sanityCheck1(MTet4 *t)
     for (unsigned int k=0;k<cavity.size();k++)V+=fabs(cavity[k]->tet()->getVolume());
 
     std::vector<MTet4*> extended_cavity;
-    double Vb = 0.0;    
+    double Vb = 0.0;
 
     //    T = Cpu();
     for (unsigned int count = 0; count < shell.size(); count++){
@@ -1860,7 +1888,7 @@ void sanityCheck1(MTet4 *t)
 	tr->setVertex(0,v0);
 	tr->setVertex(1,v1);
 	tr->setVertex(2,v2);
-	tr->setVertex(3,pv);	
+	tr->setVertex(3,pv);
       }
       else{
 	tr = new MTetrahedron(v0,v1,v2,pv);
@@ -1873,9 +1901,9 @@ void sanityCheck1(MTet4 *t)
 	extended_cavity.push_back(otherSide);
     }
     //    tc += Cpu()-T;
-    
+
     if (fabs(Vb-V) > 1.e-8 * (Vb+V))printf("%12.5E %12.5E\n",Vb,V);
-    
+
     // reuse memory --> reinitialize MTet4s
     for (unsigned int k=0;k<std::min(cavity.size(),shell.size());k++){
       cavity[k]->setDeleted(false);
@@ -1892,7 +1920,7 @@ void sanityCheck1(MTet4 *t)
   Msg::Info("Delaunay 3D done for %d points : CPU = %g, %d global searches, AVG walk size %g",v.size(), t2-t1,NB_GLOBAL_SEARCH,1.+(double)AVG_ITER/v.size());
   //  printf("%d tets allocated (to compare with 7 #V = %d)\n",t.size(),7*v.size());
   //  printf("%g %g %g %g --> %g(%g)\n",ta,tb,tc,td,t2-t1,ta+tb+tc+td);
-  
+
   //  FILE *f = fopen ("tet.pos","w");
   //  fprintf(f,"View \"\"{\n");
   for (size_t i = 0;i<t.size();i++){
@@ -1903,7 +1931,7 @@ void sanityCheck1(MTet4 *t)
     }
     delete t[i];
   }
-  
+
   if (removeBox)for (int i=0;i<8;i++)delete box[i];
   else for (int i=0;i<8;i++)v.push_back(box[i]);
 
diff --git a/Mesh/meshGRegionDelaunayInsertion.h b/Mesh/meshGRegionDelaunayInsertion.h
index 996c8c7..f3684b6 100644
--- a/Mesh/meshGRegionDelaunayInsertion.h
+++ b/Mesh/meshGRegionDelaunayInsertion.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -12,7 +12,7 @@
 #include <stack>
 #include "MTetrahedron.h"
 #include "Numeric.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "qualityMeasures.h"
 #include "robustPredicates.h"
 
@@ -72,12 +72,12 @@ class MTet4
   {
     neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
   }
-  MTet4(MTetrahedron *t, const qualityMeasure4Tet &qm) 
+  MTet4(MTetrahedron *t, const qmTetrahedron::Measures &qm)
     : deleted(false), base(t), gr(0)
   {
     neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
     double vol;
-    circum_radius = qmTet(t, qm, &vol);
+    circum_radius = qmTetrahedron::qm(t, qm, &vol);
   }
   void circumcenter(double *res)
   {
@@ -266,6 +266,6 @@ class MTet4Factory
   container &getAllTets(){ return allTets; }
 };
 
-void optimizeMesh(GRegion *gr, const qualityMeasure4Tet &qm);
+void optimizeMesh(GRegion *gr, const qmTetrahedron::Measures &qm);
 
 #endif
diff --git a/Mesh/meshGRegionExtruded.cpp b/Mesh/meshGRegionExtruded.cpp
index f4df794..50c392d 100644
--- a/Mesh/meshGRegionExtruded.cpp
+++ b/Mesh/meshGRegionExtruded.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -107,10 +107,8 @@ static void createTet(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, GRegio
 }
 
 static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k,
-                               std::set<MVertex*, MVertexLessThanLexicographic> &pos,
-                               std::vector<MVertex*> &verts)
+                               MVertexRTree &pos, std::vector<MVertex*> &verts)
 {
-  std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp;
   double x[8], y[8], z[8];
   int n = ele->getNumVertices();
   for(int p = 0; p < n; p++){
@@ -124,29 +122,30 @@ static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k,
     ep->Extrude(j, k + 1, x[p + n], y[p + n], z[p + n]);
   }
   for(int p = 0; p < 2 * n; p++){
-    MVertex tmp(x[p], y[p], z[p], 0, -1);
-    itp = pos.find(&tmp);
-    if(itp == pos.end()){ // FIXME: workaround
-      Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z());
-      itp = tmp.linearSearch(pos);
-    }
-    if(itp == pos.end())
+    MVertex *tmp = pos.find(x[p], y[p], z[p]);
+    if(!tmp)
       Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g)",
-                 tmp.x(), tmp.y(), tmp.z());
+                 x[p], y[p], z[p]);
     else
-      verts.push_back(*itp);
+      verts.push_back(tmp);
   }
   return verts.size();
 }
 
-static void extrudeMesh(GFace *from, GRegion *to,
-                        std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+static void extrudeMesh(GFace *from, GRegion *to, MVertexRTree &pos)
 {
   ExtrudeParams *ep = to->meshAttributes.extrude;
 
-  // create vertices
-  for(unsigned int i = 0; i < from->mesh_vertices.size(); i++){
-    MVertex *v = from->mesh_vertices[i];
+  // interior vertices
+  std::vector<MVertex*> mesh_vertices = from->mesh_vertices;
+
+  // add all embedded vertices
+  std::vector<MVertex*> embedded = from->getEmbeddedMeshVertices();
+  mesh_vertices.insert(mesh_vertices.end(), embedded.begin(), embedded.end());
+
+  // create extruded vertices
+  for(unsigned int i = 0; i < mesh_vertices.size(); i++){
+    MVertex *v = mesh_vertices[i];
     for(int j = 0; j < ep->mesh.NbLayer; j++) {
       for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) {
         double x = v->x(), y = v->y(), z = v->z();
@@ -165,9 +164,9 @@ static void extrudeMesh(GFace *from, GRegion *to,
     return;
   }
 
-  // create elements (note that it would be faster to access the
-  // *interior* nodes by direct indexing, but it's just simpler to
-  // query everything by position)
+  // create elements (note that it would be faster to access the *interior*
+  // nodes by direct indexing, but it's just simpler to query everything by
+  // position)
   for(unsigned int i = 0; i < from->triangles.size(); i++){
     for(int j = 0; j < ep->mesh.NbLayer; j++) {
       for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) {
@@ -195,22 +194,21 @@ static void extrudeMesh(GFace *from, GRegion *to,
   }
 }
 
-static void insertAllVertices(GRegion *gr,
-                              std::set<MVertex*, MVertexLessThanLexicographic> &pos)
+static void insertAllVertices(GRegion *gr, MVertexRTree &pos)
 {
-  pos.insert(gr->mesh_vertices.begin(), gr->mesh_vertices.end());
+  pos.insert(gr->mesh_vertices);
   std::list<GFace*> faces = gr->faces();
   std::list<GFace*>::iterator itf = faces.begin();
   while(itf != faces.end()){
-    pos.insert((*itf)->mesh_vertices.begin(), (*itf)->mesh_vertices.end());
+    pos.insert((*itf)->mesh_vertices);
+    std::vector<MVertex*> embedded = (*itf)->getEmbeddedMeshVertices();
+    pos.insert(embedded);
     std::list<GEdge*> edges = (*itf)->edges();
     std::list<GEdge*>::iterator ite = edges.begin();
     while(ite != edges.end()){
-      pos.insert((*ite)->mesh_vertices.begin(), (*ite)->mesh_vertices.end());
-      pos.insert((*ite)->getBeginVertex()->mesh_vertices.begin(),
-                 (*ite)->getBeginVertex()->mesh_vertices.end());
-      pos.insert((*ite)->getEndVertex()->mesh_vertices.begin(),
-                 (*ite)->getEndVertex()->mesh_vertices.end());
+      pos.insert((*ite)->mesh_vertices);
+      pos.insert((*ite)->getBeginVertex()->mesh_vertices);
+      pos.insert((*ite)->getEndVertex()->mesh_vertices);
       ++ite;
     }
     ++itf;
@@ -233,10 +231,8 @@ void meshGRegionExtruded::operator() (GRegion *gr)
   deMeshGRegion dem;
   dem(gr);
 
-  // build a set with all the vertices on the boundary of gr
-  double old_tol = MVertexLessThanLexicographic::tolerance;
-  MVertexLessThanLexicographic::tolerance = 1.e-12 * CTX::instance()->lc;
-  std::set<MVertex*, MVertexLessThanLexicographic> pos;
+  // build an rtree with all the vertices on the boundary of gr
+  MVertexRTree pos(CTX::instance()->geom.tolerance * CTX::instance()->lc);
   insertAllVertices(gr, pos);
 
   // volume is extruded from a surface
@@ -255,8 +251,6 @@ void meshGRegionExtruded::operator() (GRegion *gr)
     for(it = ep->mesh.Holes.begin(); it != ep->mesh.Holes.end(); it++)
       carveHole(gr, it->first, it->second.first, it->second.second);
   }
-
-  MVertexLessThanLexicographic::tolerance = old_tol;
 }
 
 static int edgeExists(MVertex *v1, MVertex *v2,
@@ -281,8 +275,7 @@ static void deleteEdge(MVertex *v1, MVertex *v2,
 }
 
 // subdivide the 3 lateral faces of each prism
-static void phase1(GRegion *gr,
-                   std::set<MVertex*, MVertexLessThanLexicographic> &pos,
+static void phase1(GRegion *gr, MVertexRTree &pos,
                    std::set<std::pair<MVertex*, MVertex*> > &edges)
 {
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -316,8 +309,7 @@ static void phase1(GRegion *gr,
 }
 
 // modify lateral edges to make them "tet-compatible"
-static void phase2(GRegion *gr,
-                   std::set<MVertex*, MVertexLessThanLexicographic> &pos,
+static void phase2(GRegion *gr, MVertexRTree &pos,
                    std::set<std::pair<MVertex*, MVertex*> > &edges,
                    std::set<std::pair<MVertex*, MVertex*> > &edges_swap,
                    int &swap)
@@ -384,8 +376,7 @@ static void phase2(GRegion *gr,
 }
 
 // create tets
-static void phase3(GRegion *gr,
-                   std::set<MVertex*, MVertexLessThanLexicographic> &pos,
+static void phase3(GRegion *gr, MVertexRTree &pos,
                    std::set<std::pair<MVertex*, MVertex*> > &edges)
 {
   ExtrudeParams *ep = gr->meshAttributes.extrude;
@@ -452,9 +443,7 @@ int SubdivideExtrudedMesh(GModel *m)
   // create a vector of quadToTri regions that have NOT been meshed
   // yet
   std::vector<GRegion*> regions, regions_quadToTri;
-  double old_tol = MVertexLessThanLexicographic::tolerance;
-  MVertexLessThanLexicographic::tolerance = 1.e-12 * CTX::instance()->lc;
-  std::set<MVertex*, MVertexLessThanLexicographic> pos;
+  MVertexRTree pos(CTX::instance()->geom.tolerance * CTX::instance()->lc);
   for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++){
     ExtrudeParams *ep = (*it)->meshAttributes.extrude;
     if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY &&
@@ -539,7 +528,7 @@ int SubdivideExtrudedMesh(GModel *m)
   // mesh the region (should already be done in ExtrudeMesh).
   for(unsigned int i = 0; i < regions_quadToTri.size(); i++){
     GRegion *gr = regions_quadToTri[i];
-    std::set<MVertex*, MVertexLessThanLexicographic> pos_local;
+    MVertexRTree pos_local(CTX::instance()->geom.tolerance * CTX::instance()->lc);
     insertAllVertices(gr, pos_local);
     meshQuadToTriRegionAfterGlobalSubdivide(gr, &edges, pos_local);
   }
@@ -565,6 +554,5 @@ int SubdivideExtrudedMesh(GModel *m)
     }
   }
 
-  MVertexLessThanLexicographic::tolerance = old_tol;
   return 1;
 }
diff --git a/Mesh/meshGRegionLocalMeshMod.cpp b/Mesh/meshGRegionLocalMeshMod.cpp
index a89b892..38db303 100644
--- a/Mesh/meshGRegionLocalMeshMod.cpp
+++ b/Mesh/meshGRegionLocalMeshMod.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -210,7 +210,7 @@ void BuildSwapPattern7(SwapPattern *sc)
 bool edgeSwap(std::vector<MTet4 *> &newTets,
               MTet4 *tet,
               int iLocalEdge,
-              const qualityMeasure4Tet &cr)
+              const qmTetrahedron::Measures &cr)
 {
   std::vector<MTet4*> cavity;
   std::vector<MTet4*> outside;
@@ -250,8 +250,8 @@ bool edgeSwap(std::vector<MTet4 *> &newTets,
     int p1 = sp.triangles[i][0];
     int p2 = sp.triangles[i][1];
     int p3 = sp.triangles[i][2];
-    tetQuality1[i] = qmTet(ring[p1], ring[p2], ring[p3], v1, cr, &(volume1[i]));
-    tetQuality2[i] = qmTet(ring[p1], ring[p2], ring[p3], v2, cr, &(volume2[i]));
+    tetQuality1[i] = qmTetrahedron::qm(ring[p1], ring[p2], ring[p3], v1, cr, &(volume1[i]));
+    tetQuality2[i] = qmTetrahedron::qm(ring[p1], ring[p2], ring[p3], v2, cr, &(volume2[i]));
   }
 
   // look for the best triangulation, i.e. the one that maximize the
@@ -318,7 +318,7 @@ bool edgeSwap(std::vector<MTet4 *> &newTets,
 }
 
 bool edgeSplit(std::vector<MTet4 *> &newTets, MTet4 *tet, MVertex *newVertex,
-               int iLocalEdge, const qualityMeasure4Tet &cr)
+               int iLocalEdge, const qmTetrahedron::Measures &cr)
 {
   std::vector<MTet4*> cavity;
   std::vector<MTet4*> outside;
@@ -352,7 +352,7 @@ bool edgeSplit(std::vector<MTet4 *> &newTets, MTet4 *tet, MVertex *newVertex,
 
 // swap a face i.e. remove a face shared by 2 tets
 bool faceSwap(std::vector<MTet4 *> &newTets, MTet4 *t1, int iLocalFace,
-              const qualityMeasure4Tet &cr)
+              const qmTetrahedron::Measures &cr)
 {
   MTet4 *t2 = t1->getNeigh(iLocalFace);
   if (!t2) return false;
@@ -383,11 +383,11 @@ bool faceSwap(std::vector<MTet4 *> &newTets, MTet4 *t1, int iLocalFace,
   double q2 = t2->getQuality();
 
   double vol3;
-  double q3 = qmTet(f1, f2, v1, v2, cr, &vol3);
+  double q3 = qmTetrahedron::qm(f1, f2, v1, v2, cr, &vol3);
   double vol4;
-  double q4 = qmTet(f2, f3, v1, v2, cr, &vol4);
+  double q4 = qmTetrahedron::qm(f2, f3, v1, v2, cr, &vol4);
   double vol5;
-  double q5 = qmTet(f3, f1, v1, v2, cr, &vol5);
+  double q5 = qmTetrahedron::qm(f3, f1, v1, v2, cr, &vol5);
 
 
   if (fabs(vol1 + vol2 - vol3 - vol4 - vol5) > 1.e-10 * (vol1 + vol2)) return false;
@@ -481,7 +481,7 @@ void buildVertexCavity_recur(MTet4 *t, MVertex *v, std::vector<MTet4*> &cavity)
 // after that crap, the sliver is trashed
 
 bool sliverRemoval(std::vector<MTet4*> &newTets, MTet4 *t,
-                   const qualityMeasure4Tet &cr)
+                   const qmTetrahedron::Measures &cr)
 {
   std::vector<MTet4*> cavity;
   std::vector<MTet4*> outside;
@@ -507,7 +507,7 @@ bool sliverRemoval(std::vector<MTet4*> &newTets, MTet4 *t,
   else if (nbSwappable == 1){
     // classical case, the sliver has 5 edges on the boundary
     // try to swap first
-    if (edgeSwap(newTets,t,iSwappable,QMTET_3))return true;
+    if (edgeSwap(newTets,t,iSwappable,qmTetrahedron::QMTET_ETA))return true;
     // if it does not work, split, smooth and collapse
     MVertex *v1 = t->tet()->getVertex(edges[iSwappable][0]);
     MVertex *v2 = t->tet()->getVertex(edges[iSwappable][1]);
@@ -516,7 +516,7 @@ bool sliverRemoval(std::vector<MTet4*> &newTets, MTet4 *t,
                                  0.5 * (v1->z() + v2->z()), t->onWhat());
     t->onWhat()->mesh_vertices.push_back(newv);
 
-    if (!edgeSplit(newTets, t, newv, iSwappable, QMTET_ONE)) return false;
+    if (!edgeSplit(newTets, t, newv, iSwappable, qmTetrahedron::QMTET_ONE)) return false;
     for (int i = 0; i < 4; i++){
       if (newTets[newTets.size() - 1]->tet()->getVertex(i) == newv){
         smoothVertex(newTets[newTets.size() - 1], i, cr);
@@ -556,7 +556,7 @@ bool collapseVertex(std::vector<MTet4 *> &newTets,
                         MTet4 *t,
                         int iVertex,
                         int iTarget,
-                        const qualityMeasure4Tet &cr,
+                        const qmTetrahedron::Measures &cr,
                         const localMeshModAction action,
                         double *minQual)
 {
@@ -609,7 +609,7 @@ bool collapseVertex(std::vector<MTet4 *> &newTets,
   }
   for (unsigned int i = 0; i < toUpdate.size(); i++){
     double vv;
-    newQuals[i] = qmTet(toUpdate[i]->tet(),cr,&vv);
+    newQuals[i] = qmTetrahedron::qm(toUpdate[i]->tet(),cr,&vv);
     worstAfter = std::min(worstAfter,newQuals[i]);
     volume_update += vv;
   }
@@ -648,7 +648,7 @@ bool collapseVertex(std::vector<MTet4 *> &newTets,
   return true;
 }
 
-bool smoothVertex(MTet4 *t, int iVertex, const qualityMeasure4Tet &cr)
+bool smoothVertex(MTet4 *t, int iVertex, const qmTetrahedron::Measures &cr)
 {
   if(t->isDeleted()){
     Msg::Error("Impossible to collapse vertex");
@@ -702,7 +702,7 @@ bool smoothVertex(MTet4 *t, int iVertex, const qualityMeasure4Tet &cr)
   }
   for (unsigned int i = 0; i < cavity.size(); i++){
     double volume;
-    newQuals[i] = qmTet(cavity[i]->tet(),cr,&volume);
+    newQuals[i] = qmTetrahedron::qm(cavity[i]->tet(),cr,&volume);
     volumeAfter += volume;
     worstAfter = std::min(worstAfter,newQuals[i]);
   }
@@ -742,7 +742,7 @@ double smoothing_objective_function_3D(double X, double Y, double Z,
   std::vector < MTet4 * >::iterator ite = ts.end();
   double qMin = 1, vol;
   while(it != ite){
-    qMin = std::min(qmTet((*it)->tet(), QMTET_2, &vol), qMin);
+    qMin = std::min(qmTetrahedron::qm((*it)->tet(), qmTetrahedron::QMTET_GAMMA, &vol), qMin);
     ++it;
   }
   v->x() = oldX;
@@ -776,7 +776,7 @@ double smooth_obj_3D(double *XYZ, void *data)
   return smoothing_objective_function_3D(XYZ[0], XYZ[1], XYZ[2], svd->v, svd->ts);
 }
 
-bool smoothVertexOptimize(MTet4 *t, int iVertex, const qualityMeasure4Tet &cr)
+bool smoothVertexOptimize(MTet4 *t, int iVertex, const qmTetrahedron::Measures &cr)
 {
   if(t->tet()->getVertex(iVertex)->onWhat()->dim() < 3) return false;
 
@@ -817,7 +817,7 @@ bool smoothVertexOptimize(MTet4 *t, int iVertex, const qualityMeasure4Tet &cr)
   }
   for(unsigned int i = 0; i < vd.ts.size(); i++){
     double volume;
-    newQuals[i] = qmTet(vd.ts[i]->tet(), cr, &volume);
+    newQuals[i] = qmTetrahedron::qm(vd.ts[i]->tet(), cr, &volume);
     volumeAfter += volume;
   }
 
diff --git a/Mesh/meshGRegionLocalMeshMod.h b/Mesh/meshGRegionLocalMeshMod.h
index a838150..9d2433c 100644
--- a/Mesh/meshGRegionLocalMeshMod.h
+++ b/Mesh/meshGRegionLocalMeshMod.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -16,28 +16,28 @@
 enum localMeshModAction {GMSH_DOIT, GMSH_EVALONLY};
 
 bool edgeSwap(std::vector<MTet4*> &newTets, MTet4 *tet, 
-              int iLocalEdge, const qualityMeasure4Tet &cr);
+              int iLocalEdge, const qmTetrahedron::Measures &cr);
 
 bool faceSwap(std::vector<MTet4*> &newTets, MTet4 *tet, 
-              int iLocalFace, const qualityMeasure4Tet &cr);
+              int iLocalFace, const qmTetrahedron::Measures &cr);
 
 bool smoothVertex(MTet4 *t, int iLocalVertex,
-                  const qualityMeasure4Tet &cr);
+                  const qmTetrahedron::Measures &cr);
 
 bool smoothVertexOptimize(MTet4 *t, int iVertex,
-                          const qualityMeasure4Tet &cr);
+                          const qmTetrahedron::Measures &cr);
 
 bool collapseVertex(std::vector<MTet4*> &newTets, MTet4 *t, 
                     int iVertex, int iTarget,
-                    const qualityMeasure4Tet &cr,
+                    const qmTetrahedron::Measures &cr,
                     const localMeshModAction = GMSH_DOIT,
                     double *result = 0);
 
 bool egeSplit(std::vector<MTet4*> &newTets, MTet4 *tet,
               MVertex *newVertex, int iLocalEdge,
-              const qualityMeasure4Tet &cr);
+              const qmTetrahedron::Measures &cr);
 
 bool sliverRemoval(std::vector<MTet4*> &newTets, MTet4 *t, 
-                   const qualityMeasure4Tet &cr);
+                   const qmTetrahedron::Measures &cr);
 
 #endif
diff --git a/Mesh/meshGRegionMMG3D.cpp b/Mesh/meshGRegionMMG3D.cpp
index 7f14197..57e72fc 100644
--- a/Mesh/meshGRegionMMG3D.cpp
+++ b/Mesh/meshGRegionMMG3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,7 +15,7 @@
 #include "MTetrahedron.h"
 #include "MTriangle.h"
 #include "MVertex.h"
-#include "BackgroundMesh.h"
+#include "BackgroundMeshTools.h"
 #include "Context.h"
 
 extern "C" {
diff --git a/Mesh/meshGRegionMMG3D.h b/Mesh/meshGRegionMMG3D.h
index cb2b649..01b2669 100644
--- a/Mesh/meshGRegionMMG3D.h
+++ b/Mesh/meshGRegionMMG3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshGRegionTransfinite.cpp b/Mesh/meshGRegionTransfinite.cpp
index 52ccf06..a592f24 100644
--- a/Mesh/meshGRegionTransfinite.cpp
+++ b/Mesh/meshGRegionTransfinite.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshMetric.cpp b/Mesh/meshMetric.cpp
index d1a13e1..a64033d 100644
--- a/Mesh/meshMetric.cpp
+++ b/Mesh/meshMetric.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshMetric.h b/Mesh/meshMetric.h
index e398d84..45c854c 100644
--- a/Mesh/meshMetric.h
+++ b/Mesh/meshMetric.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index 833609c..887b30e 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshPartition.h b/Mesh/meshPartition.h
index d605922..a4f2fa2 100644
--- a/Mesh/meshPartition.h
+++ b/Mesh/meshPartition.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshPartitionObjects.h b/Mesh/meshPartitionObjects.h
index 08c1091..8fdf9d3 100644
--- a/Mesh/meshPartitionObjects.h
+++ b/Mesh/meshPartitionObjects.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshPartitionOptions.h b/Mesh/meshPartitionOptions.h
index 6526826..a3c96fa 100644
--- a/Mesh/meshPartitionOptions.h
+++ b/Mesh/meshPartitionOptions.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/meshRefine.cpp b/Mesh/meshRefine.cpp
index 48c13fe..5a517bf 100644
--- a/Mesh/meshRefine.cpp
+++ b/Mesh/meshRefine.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -20,6 +20,11 @@
 #include "Context.h"
 #include "meshGFaceOptimize.h"
 
+void subdivide_pyramid(MElement* element,
+		       GRegion* gr, 
+		       faceContainer &faceVertices,
+		       std::vector<MHexahedron*> &dwarfs88);
+
 class MVertexLessThanParam{
  public:
   bool operator()(const MVertex *v1, const MVertex *v2) const
@@ -185,6 +190,7 @@ static void Subdivide(GFace *gf, bool splitIntoQuads, bool splitIntoHexas,
 static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVertices)
 {
   if(!splitIntoHexas){
+    // Split tets into other tets
     std::vector<MTetrahedron*> tetrahedra2;
     for(unsigned int i = 0; i < gr->tetrahedra.size(); i++){
       MTetrahedron *t = gr->tetrahedra[i];
@@ -213,6 +219,7 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti
     gr->tetrahedra = tetrahedra2;
   }
 
+  // Split hexes into other hexes.
   std::vector<MHexahedron*> hexahedra2;
   for(unsigned int i = 0; i < gr->hexahedra.size(); i++){
     MHexahedron *h = gr->hexahedra[i];
@@ -246,6 +253,7 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti
     delete h;
   }
 
+  // Split tets into other hexes.
   if(splitIntoHexas){
     for(unsigned int i = 0; i < gr->tetrahedra.size(); i++){
       MTetrahedron *t = gr->tetrahedra[i];
@@ -332,7 +340,21 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti
       }
     }
     gr->prisms.clear();
-
+    // --------------------------------------------------
+    // YAMAKAWA DIVISION OF A PYRAMID INTO 88 HEXES !!!!!
+    // --------------------------------------------------
+    std::vector<MHexahedron*> dwarfs88;
+    for(unsigned int i = 0; i < gr->pyramids.size(); i++){
+      MPyramid *p = gr->pyramids[i];
+      if(p->getNumVertices() == 14){
+	subdivide_pyramid(p,gr,faceVertices,dwarfs88);
+	for (int j=0;j<88;j++)hexahedra2.push_back(dwarfs88[j]);
+      }
+    }
+    gr->pyramids.clear();
+    // --------------------------------------------------
+    // ---- THANKS TO TRISTAN CARRIER BAUDOUIN ----------
+    // --------------------------------------------------
   }
   gr->hexahedra = hexahedra2;
 
@@ -456,3 +478,560 @@ void RefineMesh(GModel *m, bool linear, bool splitIntoQuads, bool splitIntoHexas
   double t2 = Cpu();
   Msg::StatusBar(true, "Done refining mesh (%g s)", t2 - t1);
 }
+
+
+///------ Tristan Carrier Baudouin's Contribution on Full Hex Meshing
+
+static double schneiders_x(int i){
+  double coord[105] = {
+    0.500000,
+    0.666667,
+    0.500000,
+    1.000000,
+    1.000000,
+    1.000000,
+    0.289057,
+    0.324970,
+    0.276710,
+    0.337200,
+    0.364878,
+    0.325197,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    -0.289057,
+    -0.324970,
+    -0.276710,
+    -0.337200,
+    -0.364878,
+    -0.325197,
+    -0.500000,
+    -0.666667,
+    -0.500000,
+    -1.000000,
+    -1.000000,
+    -1.000000,
+    0.084599,
+    0.263953,
+    0.442960,
+    0.310954,
+    0.000000,
+    0.000000,
+    0.118244,
+    0.212082,
+    0.244049,
+    0.213940,
+    0.040495,
+    0.110306,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    -0.118244,
+    -0.212082,
+    -0.244049,
+    -0.213940,
+    -0.040495,
+    -0.110306,
+    -0.084599,
+    -0.263953,
+    -0.442960,
+    -0.310954,
+    0.650493,
+    0.454537,
+    0.000000,
+    0.000000,
+    0.320508,
+    0.264129,
+    0.063695,
+    0.092212,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    -0.320508,
+    -0.264129,
+    -0.063695,
+    -0.092212,
+    -0.650493,
+    -0.454537,
+    0.619616,
+    0.000000,
+    0.277170,
+    0.124682,
+    0.000000,
+    0.000000,
+    -0.277170,
+    -0.124682,
+    -0.619616,
+    0.128101,
+    0.000000,
+    0.176104,
+    0.084236,
+    0.000000,
+    0.000000,
+    -0.176104,
+    -0.084236,
+    -0.128101,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.000000
+  };
+
+  return coord[i];
+}
+
+static double schneiders_y(int i){
+  double coord[105] = {
+    0.707107,
+    0.471405,
+    0.707107,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.474601,
+    0.421483,
+    0.463847,
+    0.367090,
+    0.344843,
+    0.361229,
+    0.429392,
+    0.410339,
+    0.435001,
+    0.407674,
+    0.401208,
+    0.404164,
+    0.474601,
+    0.421483,
+    0.463847,
+    0.367090,
+    0.344843,
+    0.361229,
+    0.707107,
+    0.471405,
+    0.707107,
+    0.000000,
+    0.000000,
+    0.000000,
+    0.536392,
+    0.697790,
+    0.569124,
+    0.742881,
+    0.558045,
+    0.946690,
+    0.497378,
+    0.532513,
+    0.500133,
+    0.541479,
+    0.530503,
+    0.666252,
+    0.463274,
+    0.465454,
+    0.430972,
+    0.451135,
+    0.515274,
+    0.589713,
+    0.497378,
+    0.532513,
+    0.500133,
+    0.541479,
+    0.530503,
+    0.666252,
+    0.536392,
+    0.697790,
+    0.569124,
+    0.742881,
+    0.080018,
+    0.104977,
+    0.216381,
+    0.200920,
+    0.326416,
+    0.339933,
+    0.280915,
+    0.305725,
+    0.396502,
+    0.394423,
+    0.310617,
+    0.337499,
+    0.326416,
+    0.339933,
+    0.280915,
+    0.305725,
+    0.080018,
+    0.104977,
+    0.081443,
+    0.204690,
+    0.354750,
+    0.334964,
+    0.403611,
+    0.367496,
+    0.354750,
+    0.334964,
+    0.081443,
+    0.501199,
+    0.538575,
+    0.447454,
+    0.486224,
+    0.431723,
+    0.470065,
+    0.447454,
+    0.486224,
+    0.501199,
+    0.488701,
+    0.471405,
+    0.017336,
+    0.000000,
+    0.452197,
+    0.471405,
+    0.057682,
+    0.000000,
+    1.414213,
+    0.015731,
+    0.000000
+  };
+
+  return coord[i];
+}
+
+static double schneiders_z(int i){
+  double coord[105] = {
+    0.500000,
+    0.000000,
+    -0.500000,
+    1.000000,
+    0.000000, 
+    -1.000000,
+    0.051666,
+    -0.058015,
+    -0.148140,
+    0.071987,
+    -0.057896,
+    -0.181788,
+    -0.016801,
+    -0.054195,
+    -0.104114,
+    -0.015276,
+    -0.054392,
+    -0.110605,
+    0.051666,
+    -0.058015,
+    -0.148140,
+    0.071987,
+    -0.057896,
+    -0.181788,
+    0.500000,
+    0.000000,
+    -0.500000,
+    1.000000,
+    0.000000,
+    -1.000000,
+    -0.208673,
+    -0.162945,
+    0.021476,
+    0.389516,
+    -0.157646,
+    0.159885,
+    -0.142645,
+    -0.073557,
+    -0.032793,
+    0.060339,
+    -0.136482,
+    0.043449,
+    -0.111103,
+    -0.079664,
+    -0.047879,
+    -0.008734,
+    -0.124554,
+    0.008560,
+    -0.142645,
+    -0.073557,
+    -0.032793,
+    0.060339,
+    -0.136482,
+    0.043449,
+    -0.208673,
+    -0.162945,
+    0.021476,
+    0.389516,
+    -0.041899,
+    -0.680880,
+    -0.103504,
+    -0.392255,
+    -0.065989,
+    -0.212535,
+    -0.093142,
+    -0.227139,
+    -0.056201,
+    -0.124443,
+    -0.087185,
+    -0.182164,
+    -0.065989,
+    -0.212535,
+    -0.093142,
+    -0.227139,
+    -0.041899,
+    -0.680880,
+    0.786284,
+    0.443271,
+    0.104202,
+    0.144731,
+    -0.005330,
+    0.073926,
+    0.104202,
+    0.144731,
+    0.786284,
+    -0.364254,
+    -0.282882,
+    -0.189794,
+    -0.182143,
+    -0.127036,
+    -0.148665,
+    -0.189794,
+    -0.182143,
+    -0.364254,
+    0.642222,
+    0.666667,
+    0.959658,
+    1.000000,
+    -0.455079,
+    -0.666667,
+    -0.844452,
+    -1.000000,
+    0.000000,
+    -0.009020,
+    0.000000
+  };
+
+  return coord[i];
+}
+
+static int schneiders_connect(int i,int j){
+  int n0[88] = {
+    0,1,6,7,12,13,18,19,41,39,37,
+    41,36,40,47,45,43,47,42,46,53,51,
+    49,53,48,52,35,57,55,35,54,34,34,
+    35,65,63,64,62,69,67,68,66,73,71,
+    72,70,61,75,60,74,60,61,79,78,81,
+    80,83,82,77,84,77,88,87,90,89,92,
+    91,86,93,86,57,24,95,85,2,99,84,
+    74,97,104,104,97,26,35,35,24,35,24
+  };
+
+  int n1[88] = {
+    1,2,7,8,13,14,19,20,39,6,38,
+    37,37,36,45,12,44,43,43,42,51,18,
+    50,49,49,48,57,24,56,55,55,54,40,
+    41,63,11,62,10,67,17,66,16,71,23,
+    70,22,75,29,74,28,64,65,78,9,80,
+    15,82,21,84,27,79,87,8,89,14,91,
+    20,93,26,88,35,57,94,86,85,98,77,
+    60,96,103,28,27,99,55,102,25,31,102
+  };
+
+  int n2[88] = {
+    4,5,10,11,16,17,22,23,38,7,7,
+    36,8,87,44,13,13,42,14,89,50,19,
+    19,48,20,91,56,25,25,54,26,93,46,
+    47,62,10,78,9,66,16,80,15,70,22,
+    82,21,74,28,84,27,68,69,39,6,45,
+    12,51,18,57,24,81,63,11,67,17,71,
+    23,75,29,90,33,94,33,93,98,93,76,
+    58,76,58,74,84,2,26,2,26,2,0
+  };
+
+  int n3[88] = {
+    3,4,9,10,15,16,21,22,37,38,8,
+    40,87,88,43,44,14,46,89,90,49,50,
+    20,52,91,92,55,56,26,34,93,86,52,
+    53,64,62,79,78,68,66,81,80,72,70,
+    83,82,60,74,77,84,72,73,41,39,47,
+    45,53,51,35,57,83,65,63,69,67,73,
+    71,61,75,92,94,95,0,98,99,26,96,
+    103,3,4,103,96,102,102,31,102,102,95
+  };
+
+  int n4[88] = {
+    6,7,12,13,18,19,24,25,35,33,31,
+    35,30,34,41,39,37,41,36,40,47,45,
+    43,47,42,46,53,51,49,53,48,52,86,
+    34,61,59,60,58,65,63,64,62,69,67,
+    68,66,73,71,72,70,77,60,77,76,79,
+    78,81,80,83,82,35,86,85,88,87,90,
+    89,92,91,61,84,27,97,59,5,101,74,
+    75,104,101,101,104,93,34,34,57,33,57
+  };
+
+  int n5[88] = {
+    7,8,13,14,19,20,25,26,33,0,32,
+    31,31,30,39,6,38,37,37,36,45,12,
+    44,43,43,42,51,18,50,49,49,48,88,
+    40,59,5,58,4,63,11,62,10,67,17,
+    66,16,71,23,70,22,79,64,76,3,78,
+    9,80,15,82,21,41,85,2,87,8,89,
+    14,91,20,65,77,84,96,61,59,100,60,
+    61,103,100,29,28,98,54,86,56,32,35
+  };
+
+  int n6[88] = {
+    10,11,16,17,22,23,28,29,32,1,1,
+    30,2,85,38,7,7,36,8,87,44,13,
+    13,42,14,89,50,19,19,48,20,91,90,
+    46,58,4,76,3,62,10,78,9,66,16,
+    80,15,70,22,82,21,81,68,33,0,39,
+    6,45,12,51,18,47,59,5,63,11,67,
+    17,71,23,69,76,96,76,75,100,75,58,
+    59,58,59,75,74,85,93,85,55,1,33
+  };
+
+  int n7[88] = {
+    9,10,15,16,21,22,27,28,31,32,2,
+    34,85,86,37,38,8,40,87,88,43,44,
+    14,46,89,90,49,50,20,52,91,92,92,
+    52,60,58,77,76,64,62,79,78,68,66,
+    81,80,72,70,83,82,83,72,35,33,41,
+    39,47,45,53,51,53,61,59,65,63,69,
+    67,73,71,73,96,97,3,100,101,29,103,
+    100,4,5,100,103,86,86,30,35,0,94
+  };
+
+  if(i==0){
+    return n0[j];
+  }
+  else if(i==1){
+    return n1[j];
+  }
+  else if(i==2){
+    return n2[j];
+  }
+  else if(i==3){
+    return n3[j];
+  }
+  else if(i==4){
+    return n4[j];
+  }
+  else if(i==5){
+    return n5[j];
+  }
+  else if(i==6){
+    return n6[j];
+  }
+  else{
+    return n7[j];
+  }
+}
+
+
+void subdivide_pyramid(MElement* element,
+		       GRegion* gr, 
+		       faceContainer &faceVertices,
+		       std::vector<MHexahedron*> &dwarfs88)
+{
+  unsigned int i;
+  int index1,index2,index3,index4;
+  int index5,index6,index7,index8;
+  SPoint3 point;
+  std::vector<MVertex*> v;
+
+  dwarfs88.resize(88);
+  v.resize(105);
+  
+  for (int i=0;i<105;i++)v[i] = NULL;
+  
+  v[29] = element->getVertex(0);
+  v[27] = element->getVertex(1);
+  v[3] = element->getVertex(2);
+  v[5] = element->getVertex(3);
+  v[102] = element->getVertex(4);
+
+  v[28] = element->getVertex(5);
+  v[97] = element->getVertex(8);
+  v[4] = element->getVertex(10);
+  v[101] = element->getVertex(6);
+  v[26] = element->getVertex(7);
+  v[24] = element->getVertex(9);
+  v[0] = element->getVertex(11);
+  v[2] = element->getVertex(12);
+
+  // the one in the middle of rect face
+  v[104] = element->getVertex(13);
+
+  faceContainer::iterator fIter;
+
+  fIter = faceVertices.find(MFace(v[29],v[27],v[102]));
+  if (fIter != faceVertices.end())
+    v[25] = fIter->second[0];
+  else {
+    element->pnt(0.0,-0.666667,0.471405/1.414213,point);
+    v[25] = new MVertex(point.x(),point.y(),point.z(),gr);
+    gr->addMeshVertex(v[25]);
+    faceVertices[MFace(v[29],v[27],v[102])].push_back(v[25]);
+  }
+  
+  fIter = faceVertices.find(MFace(v[27],v[3],v[102]));
+  if (fIter != faceVertices.end())
+    v[95] = fIter->second[0];
+  else {
+    element->pnt(0.666667,0.0,0.471405/1.414213,point);
+    v[95] = new MVertex(point.x(),point.y(),point.z(),gr);
+    gr->addMeshVertex(v[95]);
+    faceVertices[MFace(v[27],v[3],v[102])].push_back(v[95]);
+  }
+
+  fIter = faceVertices.find(MFace(v[3],v[5],v[102]));
+  if (fIter != faceVertices.end())
+    v[1] = fIter->second[0];
+  else {
+    element->pnt(0.0,0.666667,0.471405/1.414213,point);
+    v[1] = new MVertex(point.x(),point.y(),point.z(),gr);
+    gr->addMeshVertex(v[1]);
+    faceVertices[MFace(v[3],v[5],v[102])].push_back(v[1]);
+  }
+
+  fIter = faceVertices.find(MFace(v[5],v[29],v[102]));
+  if (fIter != faceVertices.end())
+    v[99] = fIter->second[0];
+  else {
+    element->pnt(-0.666667,0.0,0.471405/1.414213,point);
+    v[99] = new MVertex(point.x(),point.y(),point.z(),gr);
+    gr->addMeshVertex(v[99]);
+    faceVertices[MFace(v[5],v[29],v[102])].push_back(v[99]);
+  }
+  
+  for(i=0;i<105;i++){
+    if (!v[i]){
+      element->pnt(schneiders_z(i),schneiders_x(i),schneiders_y(i)/1.414213,point);
+      v[i] = new MVertex(point.x(),point.y(),point.z(),gr);
+      gr->addMeshVertex(v[i]);
+    }
+  }
+
+  for(i=0;i<88;i++){
+    index1 = schneiders_connect(0,i);
+    index2 = schneiders_connect(1,i);
+    index3 = schneiders_connect(2,i);
+    index4 = schneiders_connect(3,i);
+    index5 = schneiders_connect(4,i);
+    index6 = schneiders_connect(5,i);
+    index7 = schneiders_connect(6,i);
+    index8 = schneiders_connect(7,i);
+    
+    dwarfs88[i]=(new MHexahedron(v[index1],v[index2],
+				v[index3],v[index4],
+				v[index5],v[index6],
+				v[index7],v[index8]));
+  }
+}
+
diff --git a/Mesh/multiscalePartition.cpp b/Mesh/multiscalePartition.cpp
index 41accec..9973dd9 100644
--- a/Mesh/multiscalePartition.cpp
+++ b/Mesh/multiscalePartition.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -275,27 +275,29 @@ static void printLevel(std::vector<MElement *> &elements, int recur, int region)
 
   bool binary = false;
   FILE *fp = Fopen (fn, "w");
-  fprintf(fp, "$MeshFormat\n");
-  fprintf(fp, "%g %d %d\n", version, binary ? 1 : 0, (int)sizeof(double));
-  fprintf(fp, "$EndMeshFormat\n");
-
-  fprintf(fp,"$Nodes\n%d\n", (int)vs.size());
-  std::set<MVertex*> :: iterator it = vs.begin();
-  int index = 1;
-  for (; it != vs.end() ; ++it){
-    (*it)->setIndex(index++);
-    fprintf(fp,"%d %g %g %g\n",(*it)->getIndex(),
-            (*it)->x(),(*it)->y(),(*it)->z());
-  }
-  fprintf(fp,"$EndNodes\n");
+  if(fp){
+    fprintf(fp, "$MeshFormat\n");
+    fprintf(fp, "%g %d %d\n", version, binary ? 1 : 0, (int)sizeof(double));
+    fprintf(fp, "$EndMeshFormat\n");
+
+    fprintf(fp,"$Nodes\n%d\n", (int)vs.size());
+    std::set<MVertex*> :: iterator it = vs.begin();
+    int index = 1;
+    for (; it != vs.end() ; ++it){
+      (*it)->setIndex(index++);
+      fprintf(fp,"%d %g %g %g\n",(*it)->getIndex(),
+              (*it)->x(),(*it)->y(),(*it)->z());
+    }
+    fprintf(fp,"$EndNodes\n");
 
-  fprintf(fp,"$Elements\n%d\n", (int)elements.size());
-  for (unsigned int i = 0; i < elements.size(); i++){
-    elements[i]->writeMSH(fp, version);
-  }
-  fprintf(fp,"$EndElements\n%d\n", (int)elements.size());
+    fprintf(fp,"$Elements\n%d\n", (int)elements.size());
+    for (unsigned int i = 0; i < elements.size(); i++){
+      elements[i]->writeMSH(fp, version);
+    }
+    fprintf(fp,"$EndElements\n%d\n", (int)elements.size());
 
-  fclose(fp);
+    fclose(fp);
+  }
 }
 */
 
diff --git a/Mesh/multiscalePartition.h b/Mesh/multiscalePartition.h
index ab082ed..64984e4 100644
--- a/Mesh/multiscalePartition.h
+++ b/Mesh/multiscalePartition.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Mesh/periodical.cpp b/Mesh/periodical.cpp
index b2b3d6b..dedeaee 100644
--- a/Mesh/periodical.cpp
+++ b/Mesh/periodical.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -937,3 +937,339 @@ bool voroMetal3D::equal(double x,double y,double e){
 
   return flag;
 }
+
+
+void microstructure(const char *filename)
+{
+  int j;
+  int radical;
+  double max;
+  double xMax;
+  double yMax;
+  double zMax;
+  std::vector<double> properties;
+  if(filename){
+    std::ifstream file(filename);
+    file >> max;
+    file >> radical;
+    file >> xMax;
+    file >> yMax;
+    file >> zMax;
+    properties.clear();
+    properties.resize(4*max);
+    for(j=0;j<max;j++){
+      file >> properties[4*j];
+      file >> properties[4*j+1];
+      file >> properties[4*j+2];
+      file >> properties[4*j+3];
+    }
+    voroMetal3D vm1;
+    vm1.execute(properties,radical,0.1,xMax,yMax,zMax);
+    GModel::current()->load("MicrostructurePolycrystal3D.geo");
+    voroMetal3D vm2;
+    vm2.correspondance(0.00001,xMax,yMax,zMax);
+  }
+}
+
+void computeBestSeeds(const char *filename)
+{
+  int j;
+  int radical;
+  double max;
+  double xMax;
+  double yMax;
+  double zMax;
+  std::vector<double> properties;
+  std::cout<<"entree dans computeBestSeeds"<<std::endl;
+  if(filename){
+    std::ifstream file(filename);
+    file >> max;
+    file >> radical;
+    file >> xMax;
+    file >> yMax;
+    file >> zMax;
+    properties.clear();
+    properties.resize(4*max);
+    for(j=0;j<max;j++){
+      file >> properties[4*j];
+      file >> properties[4*j+1];
+      file >> properties[4*j+2];
+      file >> properties[4*j+3];
+    }
+    std::cout<<"Before count"<<std::endl;
+    std::vector<double> listDistances;
+    listDistances.clear();
+    int nbOfCount = 17;
+    listDistances.resize(nbOfCount);
+    for (int Count = 0; Count < nbOfCount; Count++){
+      std::cout<<"Count"<<Count<<std::endl;
+      double distMinGlobal = 0.0;
+      int jMinGlobal = 0;
+      int xORyORz = 0;
+      int posORneg = 0;
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j] += 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 1;
+          posORneg = 1;
+        }
+        delete m;
+      }
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j + 1] += 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 2;
+          posORneg = 1;
+        }
+        delete m;
+      }
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j + 2] += 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 3;
+          posORneg = 1;
+        }
+        delete m;
+      }
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j] -= 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 1;
+          posORneg = 2;
+        }
+        delete m;
+      }
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j + 1] -= 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 2;
+          posORneg = 2;
+        }
+        delete m;
+      }
+      for(j=0;j<max;j++){
+        std::cout<<"j "<<j<<std::endl;
+        std::vector<double> propertiesModified;
+        propertiesModified.clear();
+        propertiesModified.resize(4*max);
+        std::cout<<"before assign propModif"<<std::endl;
+        for(unsigned int k=0;k < properties.size();k++){
+          propertiesModified[k] = properties[k];
+        }
+        std::cout<<"after assign propModif"<<std::endl;
+        propertiesModified[4*j + 2] -= 0.01;
+        voroMetal3D vm1;
+        std::cout<<"before execute"<<std::endl;
+        //std::remove("MicrostructurePolycrystal3D.geo");
+        vm1.execute(propertiesModified,radical,0.1,xMax,yMax,zMax);
+        //GModel::current()->destroy();
+        GModel *m = new GModel();
+        //GModel::current()->load("MicrostructurePolycrystal3D.geo");
+        m->load("MicrostructurePolycrystal3D.geo");
+        double distMinTmp = 1000.0;
+        //GModel *m = GModel::current();
+        for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+          GEdge* eTmp = (*ite);
+          GVertex* vTmp1 = eTmp->getBeginVertex();
+          GVertex* vTmp2 = eTmp->getEndVertex();
+          double distTmp = sqrt((vTmp1->x() -  vTmp2->x()) * (vTmp1->x() -  vTmp2->x()) + (vTmp1->y() -  vTmp2->y()) * (vTmp1->y() -  vTmp2->y()) + (vTmp1->z() -  vTmp2->z()) * (vTmp1->z() -  vTmp2->z()));
+          if (distTmp < distMinTmp){
+            distMinTmp = distTmp;
+          }
+        }
+        if (distMinTmp > distMinGlobal){
+          distMinGlobal = distMinTmp;
+          jMinGlobal = j;
+          xORyORz = 3;
+          posORneg = 2;
+        }
+        delete m;
+      }
+      std::cout<<"distance minimale de "<<distMinGlobal<<std::endl;
+      listDistances[Count] = distMinGlobal;
+      if (xORyORz == 1){
+        if (posORneg == 1){
+          properties[4*jMinGlobal] += 0.01;
+        } else if (posORneg == 2){
+          properties[4*jMinGlobal] -= 0.01;
+        }
+      } else if (xORyORz == 2){
+        if (posORneg == 1){
+          properties[4*jMinGlobal + 1] += 0.01;
+        } else if (posORneg == 2){
+          properties[4*jMinGlobal + 1] -= 0.01;
+        }
+      } else if (xORyORz == 3){
+        if (posORneg == 1){
+          properties[4*jMinGlobal + 2] += 0.01;
+        } else if (posORneg == 2){
+          properties[4*jMinGlobal + 2] -= 0.01;
+        }
+      }
+    }
+    voroMetal3D vm1;
+    vm1.execute(properties,radical,0.1,xMax,yMax,zMax);
+    GModel::current()->load("MicrostructurePolycrystal3D.geo");
+    voroMetal3D vm2;
+    vm2.correspondance(0.00001,xMax,yMax,zMax);
+    for (unsigned int iTmp = 0; iTmp < listDistances.size();iTmp++){
+      std::cout<<"distMinGlobal "<<iTmp<<" egale a "<<listDistances[iTmp]<<std::endl;
+    }
+    std::cout<<"liste des nouveaux seeds :"<<std::endl;
+    for(unsigned int iTmp = 0; iTmp < max;iTmp++){
+      std::cout<<properties[4*iTmp]<<" "<<properties[4*iTmp + 1]<<" "<<properties[4*iTmp + 2]<<" "<<properties[4*iTmp + 3]<<std::endl;
+
+    }
+  }
+}
+
diff --git a/Mesh/periodical.h b/Mesh/periodical.h
index a794d65..57cd5ce 100644
--- a/Mesh/periodical.h
+++ b/Mesh/periodical.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -35,3 +35,9 @@ class voroMetal3D{
   void correspondance(double,double,double,double,int,bool&,double,double,double);
   bool equal(double,double,double);
 };
+
+
+void microstructure(const char *filename);
+void computeBestSeeds(const char *filename);
+
+
diff --git a/Mesh/pointInsertion.cpp b/Mesh/pointInsertion.cpp
new file mode 100644
index 0000000..c548c58
--- /dev/null
+++ b/Mesh/pointInsertion.cpp
@@ -0,0 +1,778 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Paul-Emile Bernard
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <string>
+
+#include "pointInsertion.h"
+#include "BackgroundMeshManager.h"
+#include "BackgroundMesh2D.h"
+#include "BackgroundMesh3D.h"
+#include "GFace.h"
+#include "GRegion.h"
+#include "OS.h"
+#include "Context.h"
+#include "meshGRegion.h"
+#include "pointInsertionRTreeTools.h"
+#include "intersectCurveSurface.h"
+
+//#include "google/profiler.h"
+
+using namespace std;
+
+bool old_algo_hexa(){
+  return true;
+}
+
+template<typename T>
+void print_nodal_info(string filename, map<MVertex*, T> &mapp)
+{
+  ofstream out(filename.c_str());
+
+  out << "View \"\"{" << endl;
+  for (typename map<MVertex*, T>::iterator it = mapp.begin();it!=mapp.end();it++){
+    MVertex *v = it->first;
+    out << "SP( " << v->x() << "," << v->y() << "," << v->z() << "){" << it->second << "};" << endl;;
+  }
+  out << "};" << endl;
+
+  out.close();
+}
+
+bool shoot(const SPoint2 &start, const SPoint2 &dir,
+           const double &h, SPoint2 &res)
+{
+  const int RK = 1;
+
+  if (RK==1){
+    res = start + (dir*h);
+    //    cout << "(" << start[0] << "," <<start[1] << ") -> (" << res[0] << ","
+    //    <<res[1] << ") " << endl;
+    return true;
+  }
+
+  return false;
+}
+
+bool computeFourNeighbors (frameFieldBackgroundMesh2D *bgm,
+                           MVertex *v_center, // the vertex for which we want to
+                                              // generate 4 neighbors (real
+                                              // vertex (xyz), not parametric!)
+                           SPoint2 &midpoint,
+                           bool goNonLinear, // do we compute the position in
+                                             // the real surface which is
+                                             // nonlinear
+                           SPoint2 newP[4][NUMDIR], // look into other directions
+                           SMetric3 &metricField) // the mesh metric
+{
+  // we assume that v is on surface gf, and backgroundMesh2D has been created based on gf
+
+  // get BGM and GFace
+  GFace *gf = dynamic_cast<GFace*>(bgm->getBackgroundGEntity());
+
+  // get the parametric coordinates of the point on the surface
+  reparamMeshVertexOnFace(v_center, gf, midpoint);
+
+  // get RK info on midpoint (infos in two directions...)
+  RK_form infos;
+  bgm->compute_RK_infos(midpoint[0],midpoint[1],v_center->x(), v_center->y(),
+                        v_center->z(), infos);
+  metricField = infos.metricField;
+
+  // shoot in four directions
+  SPoint2 param_vec;
+  double h;
+  for (int i=0;i<4;i++){// in four directions
+    switch (i){
+    case 0:
+      param_vec = infos.paramt1;
+      h = infos.paramh.first;
+      break;
+    case 1:
+      param_vec = infos.paramt2;
+      h = infos.paramh.second;
+      break;
+    case 2:
+      param_vec = infos.paramt1 * -1.;
+      h = infos.paramh.first;
+      break;
+    case 3:
+      param_vec = infos.paramt2 * -1.;
+      h = infos.paramh.second;
+      break;
+    }
+    shoot(midpoint,param_vec,h,newP[i][0]);
+    //    cout << "(" << midpoint[0] << "," <<midpoint[1] << ") -> (" <<
+    //    newP[i][0][0] << "," << newP[i][0][1] << ") " << endl;
+  }
+
+  // the following comes from surfaceFiller.cpp...
+  const double EPS = 1.e-7;
+  for (int j=0;j<2;j++){
+    for (int i=0;i<4;i++){
+      newP[i][0][j] += (EPS* (double)rand() / RAND_MAX);
+    }
+  }
+
+  // We could stop here. Yet, if the metric varies a lot, we can solve a
+  // nonlinear problem in order to find a better approximation in the real
+  // surface
+  if (1 && goNonLinear){
+    double L = infos.localsize;
+    double newPoint[4][2];
+    for (int j=0;j<2;j++){
+      for (int i=0;i<4;i++){
+        newPoint[i][j] = newP[i][0][j];
+      }
+    }
+    double ERR[4];
+    for (int i=0;i<4;i++){                                              //
+      //      if (newPoint[i][0] < rangeU.low())newPoint[i][0] = rangeU.low();
+      //      if (newPoint[i][0] > rangeU.high())newPoint[i][0] = rangeU.high();
+      //      if (newPoint[i][1] < rangeV.low())newPoint[i][1] = rangeV.low();
+      //      if (newPoint[i][1] > rangeV.high())newPoint[i][1] = rangeV.high();
+      GPoint pp = gf->point(newP[i][0]);
+      double D = sqrt ((pp.x() - v_center->x())*(pp.x() - v_center->x()) +
+                       (pp.y() - v_center->y())*(pp.y() - v_center->y()) +
+                       (pp.z() - v_center->z())*(pp.z() - v_center->z()) );
+      ERR[i] = 100*fabs(D-L)/(D+L);
+      //      printf("L = %12.5E D = %12.5E ERR = %12.5E\n",L,D,100*fabs(D-L)/(D+L));
+    }
+
+    surfaceFunctorGFace ss (gf);
+    SVector3 dirs[4] = {infos.t1*(-1.0),infos.t2*(-1.0),infos.t1*(1.0),infos.t2*(1.0)};
+    for (int i=0;i<4;i++){
+      if (ERR[i] > 12){
+        double uvt[3] = {newPoint[i][0],newPoint[i][1],0.0};
+        // printf("Intersecting with circle N = %g %g %g dir = %g %g %g R
+        //	  = %g p = %g %g
+        //	  %g\n",n.x(),n.y(),n.z(),dirs[i].x(),dirs[i].y(),dirs[i].z(),L,
+        //        v_center->x(),v_center->y(),v_center->z());
+        curveFunctorCircle cf (dirs[i],infos.normal,
+                               SVector3(v_center->x(),v_center->y(),v_center->z()), L);
+        if (intersectCurveSurface (cf,ss,uvt,infos.paramh.first*1.e-3)){
+          GPoint pp = gf->point(SPoint2(uvt[0],uvt[1]));
+          double D = sqrt ((pp.x() - v_center->x())*(pp.x() - v_center->x()) +
+                           (pp.y() - v_center->y())*(pp.y() - v_center->y()) +
+                           (pp.z() - v_center->z())*(pp.z() - v_center->z()) );
+          double DP = sqrt ((newPoint[i][0]-uvt[0])*(newPoint[i][0]-uvt[0]) +
+                            (newPoint[i][1]-uvt[1])*(newPoint[i][1]-uvt[1]));
+          double newErr = 100*fabs(D-L)/(D+L);
+          //	    if (v_center->onWhat() != gf && gf->tag() == 3){
+          //	      crossField2d::normalizeAngle (uvt[2]);
+          //	      printf("INTERSECT angle = %g DP %g\n",uvt[2],DP);
+          //	    }
+          if (newErr < 1 && DP < .1){
+            //	      printf("%12.5E vs %12.5E : %12.5E %12.5E vs %12.5E %12.5E
+            //	      \n",ERR[i],newErr,newPoint[i][0],newPoint[i][1],uvt[0],uvt[1]);
+            newPoint[i][0] = uvt[0];
+            newPoint[i][1] = uvt[1];
+          }
+          //	    printf("OK\n");
+        }
+        else{
+          Msg::Debug("Cannot put a new point on Surface %d",gf->tag());
+          // printf("NOT OK\n");
+        }
+      }
+    }
+
+    // return the four new vertices
+    for (int i=0;i<4;i++){
+      newP[i][0] = SPoint2(newPoint[i][0],newPoint[i][1]);
+    }
+  }
+
+  return true;
+}
+
+void computeTwoNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent,
+                         vector<MVertex*> &spawns, SVector3 dir, double h)
+{
+  // using approximate size, RK1...
+  double x = parent->x();
+  double y = parent->y();
+  double z = parent->z();
+  double newx,newy,newz;
+  GRegion *gr = dynamic_cast<GRegion*>(bgm->getBackgroundGEntity());
+
+  newx = x + h * dir(0);
+  newy = y + h * dir(1);
+  newz = z + h * dir(2);
+  spawns[0] = new MVertex(newx,newy,newz,gr,0);
+
+  newx = x - h * dir(0);
+  newy = y - h * dir(1);
+  newz = z - h * dir(2);
+  spawns[1] = new MVertex(newx,newy,newz,gr,0);
+}
+
+void computeSixNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent,
+                         vector<MVertex*> &spawns, STensor3 dir, double h)
+{
+  // using approximate size, RK1...
+  double x = parent->x();
+  double y = parent->y();
+  double z = parent->z();
+  double newx,newy,newz;
+  GRegion *gr = dynamic_cast<GRegion*>(bgm->getBackgroundGEntity());
+
+  for (int i=0;i<3;i++){
+    newx = x + h * dir(0,i);
+    newy = y + h * dir(1,i);
+    newz = z + h * dir(2,i);
+    spawns[i*2] = new MVertex(newx,newy,newz,gr,0);
+
+    newx = x - h * dir(0,i);
+    newy = y - h * dir(1,i);
+    newz = z - h * dir(2,i);
+    spawns[i*2+1] = new MVertex(newx,newy,newz,gr,0);
+  }
+}
+
+double Filler2D::time_bgm_and_smoothing = 0.;
+double Filler2D::time_insertion = 0.;
+
+Filler2D::Filler2D(){}
+
+Filler2D::~Filler2D()
+{
+  cout << "FILLER2D timing:" << endl;
+  cout << "  ------- CUMULATIVE TIME2D bgm & smoothing  : "
+       << time_bgm_and_smoothing << " s." << endl;
+  cout << "  ------- CUMULATIVE TIME2D inserting points : "
+       << time_insertion << " s." << endl;
+  cout << "  ------- TOTAL 2D TIME (new)   : "
+       << time_bgm_and_smoothing+time_insertion << " s." << endl;
+}
+
+void Filler2D::pointInsertion2D(GFace* gf,  vector<MVertex*> &packed,
+                                vector<SMetric3> &metrics)
+{
+  // NB/ do not use the mesh in GFace, use the one in backgroundMesh2D!
+
+  //  if(debug) cout << " ------------------   OLD -------------------" << endl;
+  //  stringstream ssa;
+  ////  ssa << "oldbgm_angles_" << gf->tag() << ".pos";
+  ////  backgroundMesh::current()->print(ssa.str(),gf,1);
+  //  ssa << "oldbgm_sizes_" << gf->tag() << ".pos";
+  //  backgroundMesh::current()->print(ssa.str(),gf,0);
+  //
+  //
+  //
+  //
+  //  if(debug) cout << " ------------------   NEW -------------------" << endl;
+  //  backgroundMesh2D *bgm2 = dynamic_cast<backgroundMesh2D*>(BGMManager::get(gf));
+  //  stringstream ss2;
+  //  ss2 << "basebg_sizefield_" << gf->tag() << ".pos";
+  //  bgm2->exportSizeField(ss2.str());
+  //
+  //
+  //
+  //  return;
+  //
+
+  BGMManager::set_use_cross_field(true);
+
+  const bool goNonLinear = true;
+  const bool debug=false;
+  const bool export_stuff=true;
+
+  if (debug) cout << "ENTERING POINTINSERTION2D" << endl;
+
+  double a;
+
+  // acquire background mesh
+  if(debug) cout << "pointInsertion2D: recover BGM" << endl;
+  a=Cpu();
+  frameFieldBackgroundMesh2D *bgm =
+    dynamic_cast<frameFieldBackgroundMesh2D*>(BGMManager::get(gf));
+  time_bgm_and_smoothing += (Cpu() - a);
+
+  if (!bgm){
+    Msg::Error("BGM dynamic cast failed in filler2D::pointInsertion2D");
+    return;
+  }
+
+  // export BGM size field
+  if(export_stuff){
+    cout << "pointInsertion2D: export size field " << endl;
+    stringstream ss;
+    ss << "bg2D_sizefield_" << gf->tag() << ".pos";
+    bgm->exportSizeField(ss.str());
+
+    cout << "pointInsertion2D : export crossfield " << endl;
+    stringstream sscf;
+    sscf << "bg2D_crossfield_" << gf->tag() << ".pos";
+    bgm->exportCrossField(sscf.str());
+
+    cout << "pointInsertion2D : export smoothness " << endl;
+    stringstream sss;
+    sss << "bg2D_smoothness_" << gf->tag() << ".pos";
+    bgm->exportSmoothness(sss.str());
+  }
+
+
+
+  // point insertion algorithm:
+  a=Cpu();
+
+  // for debug check...
+  int priority_counter=0;
+  map<MVertex*,int> vert_priority;
+
+  // get all the boundary vertices
+  if(debug) cout << "pointInsertion2D : get bnd vertices " << endl;
+  set<MVertex*> bnd_vertices = bgm->get_vertices_of_maximum_dim(1);
+
+  // put boundary vertices in a fifo queue
+  set<smoothness_point_pair, compareSurfacePointWithExclusionRegionPtr_Smoothness> fifo;
+  vector<surfacePointWithExclusionRegion*> vertices;
+
+  // initiate the rtree
+  if(debug) cout << "pointInsertion2D : initiate RTree " << endl;
+  RTree<surfacePointWithExclusionRegion*,double,2,double> rtree;
+  SMetric3 metricField(1.0);
+  SPoint2 newp[4][NUMDIR];
+  set<MVertex*>::iterator it = bnd_vertices.begin() ;
+
+  for (; it !=  bnd_vertices.end() ; ++it){
+    SPoint2 midpoint;
+    computeFourNeighbors(bgm,*it, midpoint, goNonLinear, newp, metricField);
+    surfacePointWithExclusionRegion *sp = new surfacePointWithExclusionRegion
+      (*it, newp, midpoint,metricField);
+
+    smoothness_point_pair mp;
+    mp.ptr = sp;
+    mp.rank=(1.-bgm->get_smoothness(midpoint[0],midpoint[1]));
+    fifo.insert(mp);
+
+    vertices.push_back(sp);
+    double _min[2],_max[2];
+    sp->minmax(_min,_max);
+    rtree.Insert(_min,_max,sp);
+  }
+
+  // ---------- main loop -----------------
+  while(!fifo.empty()){
+    if(debug) cout << " -------- fifo.size() = " << fifo.size() << endl;
+    int count_nbaddedpt = 0;
+
+    surfacePointWithExclusionRegion * parent = (*fifo.begin()).ptr;
+    fifo.erase(fifo.begin());
+
+    for (int dir=0;dir<NUMDIR;dir++){
+      for (int i=0;i<4;i++){
+        if (!inExclusionZone (parent->_p[i][dir], rtree, vertices) ){
+
+          GPoint gp = gf->point(parent->_p[i][dir]);
+          MFaceVertex *v = new MFaceVertex(gp.x(),gp.y(),gp.z(),gf,gp.u(),gp.v());
+          SPoint2 midpoint;
+          computeFourNeighbors(bgm,v, midpoint, goNonLinear, newp, metricField);
+          surfacePointWithExclusionRegion *sp = new surfacePointWithExclusionRegion
+            (v, newp, midpoint, metricField, parent);
+          smoothness_point_pair mp;mp.ptr = sp;mp.rank=(1.-bgm->get_smoothness(gp.u(),gp.v()));
+
+          if (debug) vert_priority[v] = priority_counter++;
+
+          fifo.insert(mp);
+          vertices.push_back(sp);
+          double _min[2],_max[2];
+          sp->minmax(_min,_max);
+          rtree.Insert(_min,_max,sp);
+
+          if (debug){
+            cout << "  adding node (" << sp->_v->x() << "," << sp->_v->y()
+                 << "," << sp->_v->z() << ")" << endl;
+            cout << "    ----------------------------- sub --- fifo.size() = "
+                 << fifo.size() << endl;
+          }
+          count_nbaddedpt++;
+        }
+      }
+    }
+    if(debug) cout << "////////// nbre of added point: " << count_nbaddedpt << endl;
+  }
+  time_insertion += (Cpu() - a);
+
+  if (debug){
+    stringstream ss;
+    ss << "priority_" << gf->tag() << ".pos";
+    print_nodal_info(ss.str().c_str(),vert_priority);
+    ss.clear();
+  }
+
+  // add the vertices as additional vertices in the
+  // surface mesh
+  char ccc[256]; sprintf(ccc,"points%d.pos",gf->tag());
+  FILE *f = Fopen(ccc,"w");
+  if(f){
+    fprintf(f,"View \"\"{\n");
+    for (unsigned int i=0;i<vertices.size();i++){
+      vertices[i]->print(f,i);
+      if(vertices[i]->_v->onWhat() == gf) {
+        packed.push_back(vertices[i]->_v);
+        metrics.push_back(vertices[i]->_meshMetric);
+        SPoint2 midpoint;
+        reparamMeshVertexOnFace(vertices[i]->_v, gf, midpoint);
+      }
+      delete  vertices[i];
+    }
+    fprintf(f,"};");
+    fclose(f);
+  }
+}
+
+bool Filler3D::treat_region(GRegion *gr)
+{
+  BGMManager::set_use_cross_field(true);
+
+  bool use_vectorial_smoothness;
+  bool use_fifo;
+  string algo;
+
+  // readValue("param.dat","SMOOTHNESSALGO",algo);
+  algo.assign("SCALAR");
+
+  if (!algo.compare("SCALAR")){
+    use_vectorial_smoothness = false;
+    use_fifo = false;
+  }
+  else if (!algo.compare("FIFO")){
+    use_vectorial_smoothness = false;
+    use_fifo = true;
+  }
+  else{
+    cout << "unknown SMOOTHNESSALGO !" << endl;
+    throw;
+  }
+
+  const bool debug=false;
+  const bool export_stuff=true;
+  double a;
+
+  cout << "ENTERING POINTINSERTION3D" << endl;
+
+  // acquire background mesh
+  cout << "pointInsertion3D: recover BGM" << endl;
+  a = Cpu();
+  frameFieldBackgroundMesh3D *bgm =
+    dynamic_cast<frameFieldBackgroundMesh3D*>(BGMManager::get(gr));
+  time_smoothing += (Cpu() - a);
+
+  if (!bgm){
+    cout << "pointInsertion3D:: BGM dynamic cast failed ! " << endl;
+    throw;
+  }
+
+  // export BGM fields
+  if(export_stuff){
+    cout << "pointInsertion3D: export size field " << endl;
+    stringstream ss;
+    ss << "bg3D_sizefield_" << gr->tag() << ".pos";
+    bgm->exportSizeField(ss.str());
+
+    cout << "pointInsertion3D : export crossfield " << endl;
+    stringstream sscf;
+    sscf << "bg3D_crossfield_" << gr->tag() << ".pos";
+    bgm->exportCrossField(sscf.str());
+
+    cout << "pointInsertion3D : export smoothness " << endl;
+    stringstream sss;
+    sss << "bg3D_smoothness_" << gr->tag() << ".pos";
+    bgm->exportSmoothness(sss.str());
+
+    if (use_vectorial_smoothness){
+      cout << "pointInsertion3D : export vectorial smoothness " << endl;
+      stringstream ssvs;
+      ssvs << "bg3D_vectorial_smoothness_" << gr->tag() << ".pos";
+      bgm->exportVectorialSmoothness(ssvs.str());
+    }
+  }
+
+  // ---------------- START FILLING NEW POINTS ----------------
+  cout << "pointInsertion3D : inserting points in region " << gr->tag()  << endl;
+
+  //ProfilerStart("/home/bernard/profile");
+  a = Cpu();
+
+  // ----- initialize fifo list -----
+
+  RTree<MVertex*,double,3,double> rtree;
+  listOfPoints *fifo;
+  if (use_fifo)
+    fifo = new listOfPointsFifo();
+  else if (use_vectorial_smoothness)
+    fifo = new listOfPointsVectorialSmoothness();
+  else
+    fifo = new listOfPointsScalarSmoothness();
+
+  set<MVertex*> temp;
+  vector<MVertex*> boundary_vertices;
+  map<MVertex*,int> vert_priority;
+  map<MVertex*,double> smoothness_forplot;
+  MElement *element;
+  MVertex *vertex;
+  list<GFace*> faces = gr->faces();
+  for(list<GFace*>::iterator it=faces.begin();it!=faces.end();it++){// for all faces
+    GFace *gf = *it;
+    // int limit = code_kesskessai(gf->tag());
+    for(unsigned int i=0;i<gf->getNumMeshElements();i++){
+      element = gf->getMeshElement(i);
+      for(int j=0;j<element->getNumVertices();j++){// for all vertices
+        vertex = element->getVertex(j);
+        temp.insert(vertex);
+        // limits.insert(make_pair(vertex,limit));
+      }
+    }
+  }
+
+  int geodim;
+  for(set<MVertex*>::iterator it=temp.begin();it!=temp.end();it++){
+    geodim = (*it)->onWhat()->dim();
+    if ((geodim==0) || (geodim==1) || (geodim==2)) boundary_vertices.push_back(*it);
+  }
+
+  double min[3],max[3],x,y,z,h;
+  for(unsigned int i=0;i<boundary_vertices.size();i++){
+
+    x = boundary_vertices[i]->x();
+    y = boundary_vertices[i]->y();
+    z = boundary_vertices[i]->z();
+
+    // "on boundary since working on boundary_vertices ...
+    MVertex *closest = bgm->get_nearest_neighbor_on_boundary(boundary_vertices[i]);
+    h = bgm->size(closest);// get approximate size, closest vertex, faster ?!
+
+    fill_min_max(x,y,z,h,min,max);
+
+    rtree.Insert(min,max,boundary_vertices[i]);
+
+    if (!use_vectorial_smoothness){
+      smoothness_vertex_pair *svp = new smoothness_vertex_pair();
+      svp->v = boundary_vertices[i];
+      svp->rank = bgm->get_smoothness(x,y,z);
+      svp->dir = 0;
+      svp->layer = 0;
+      svp->size = h;
+      bgm->eval_approximate_crossfield(closest, svp->cf);
+
+      fifo->insert(svp);
+      if (debug){
+        smoothness_forplot[svp->v] = svp->rank;
+      }
+    }
+    else{
+      STensor3 temp;
+      bgm->eval_approximate_crossfield(closest, temp);
+      for (int idir=0;idir<3;idir++){
+        smoothness_vertex_pair *svp = new smoothness_vertex_pair();
+        svp->v = boundary_vertices[i];
+        svp->rank = bgm->get_vectorial_smoothness(idir,x,y,z);
+        svp->dir = idir;
+        svp->layer = 0;
+        svp->size = h;
+        svp->cf = temp;
+        for (int k=0;k<3;k++) svp->direction(k) = temp(k,idir);
+
+        // cout << "fifo size=" << fifo->size() << " inserting   "  ;
+        fifo->insert(svp);
+        // cout << " ->  fifo size=" << fifo->size() << endl;
+      }
+    }
+  }
+
+  // TODO: si fifo était list of *PTR -> pas de copies, gain temps ?
+  Wrapper3D wrapper;
+  wrapper.set_bgm(bgm);
+  MVertex *parent,*individual;
+  new_vertices.clear();
+  bool spawn_created;
+  int priority_counter=0;
+  STensor3 crossfield;
+  int parent_layer;
+
+  while(!fifo->empty()){
+
+    parent =  fifo->get_first_vertex();
+    //    parent_limit = fifo->get_first_limit();
+    parent_layer = fifo->get_first_layer();
+
+    //    if(parent_limit!=-1 && parent_layer>=parent_limit()){
+    //      continue;
+    //    }
+
+    vector<MVertex*> spawns;
+    if (!use_vectorial_smoothness){
+      spawns.resize(6);
+      computeSixNeighbors(bgm,parent,spawns,fifo->get_first_crossfield(),
+                          fifo->get_first_size());
+    }
+    else{
+      spawns.resize(2);
+      computeTwoNeighbors(bgm,parent,spawns,fifo->get_first_direction(),
+                          fifo->get_first_size());
+    }
+    fifo->erase_first();
+
+    //    cout << "while, fifo->size()=" << fifo->size() << " parent=(" <<
+    //    parent->x() << "," << parent->y() << "," << parent->z() << ")" <<
+    //    endl;
+
+    for(unsigned int i=0;i<spawns.size();i++){
+      spawn_created = false;
+      individual = spawns[i];
+      x = individual->x();
+      y = individual->y();
+      z = individual->z();
+      //      cout << " working on candidate " << "(" << individual->x() << ","
+      //      << individual->y() << "," << individual->z() << ")" << endl;
+
+      if(bgm->inDomain(x,y,z)){
+        //        cout << "   spawn " << i << " in domain" << endl;
+
+        MVertex *closest = bgm->get_nearest_neighbor(individual);
+        h = bgm->size(closest);// get approximate size, closest vertex, faster ?!
+
+        if(far_from_boundary_3D(bgm,individual,h)){
+          //        cout << "   spawn " << i << " far from bnd" << endl;
+          bgm->eval_approximate_crossfield(closest, crossfield);
+          wrapper.set_ok(true);
+          wrapper.set_individual(individual);
+          wrapper.set_parent(parent);
+          wrapper.set_size(&h);
+          wrapper.set_crossfield(&crossfield);
+
+          fill_min_max(x,y,z,h,min,max);
+
+          rtree.Search(min,max,rtree_callback_3D,&wrapper);
+
+          if(wrapper.get_ok()){
+            //        cout << "   spawn " << i << " wrapper OK" << endl;
+
+            if (!use_vectorial_smoothness){
+              smoothness_vertex_pair *svp = new smoothness_vertex_pair();
+              svp->v = individual;
+              svp->rank=bgm->get_smoothness(individual->x(),individual->y(),individual->z());
+              svp->dir = 0;
+              svp->layer = parent_layer+1;
+              svp->size = h;
+              svp->cf = crossfield;
+              fifo->insert(svp);
+              if (debug){
+                smoothness_forplot[svp->v] = svp->rank;
+                vert_priority[individual] = priority_counter++;
+              }
+
+            }
+            else{
+              if (debug) vert_priority[individual] = priority_counter++;
+              for (int idir=0;idir<3;idir++){
+                smoothness_vertex_pair *svp = new smoothness_vertex_pair();
+                svp->v = individual;
+                svp->rank = bgm->get_vectorial_smoothness(idir,x,y,z);
+                svp->dir = idir;
+                svp->layer = parent_layer+1;
+                svp->size = h;
+                for (int k=0;k<3;k++) svp->direction(k) = crossfield(k,idir);
+                svp->cf = crossfield;
+                fifo->insert(svp);
+              }
+            }
+
+            rtree.Insert(min,max,individual);
+            new_vertices.push_back(individual);
+            spawn_created = true;
+
+          }
+        }
+      }
+      if(!spawn_created){
+        delete individual;
+      }
+    }// end loop on spawns
+  }
+
+  //ProfilerStop();
+
+  time_insert_points += (Cpu() - a);
+
+  // --- output ---
+  if (debug){
+    stringstream ss;
+    ss << "priority_3D_" << gr->tag() << ".pos";
+    print_nodal_info(ss.str().c_str(),vert_priority);
+    ss.clear();
+
+    stringstream sss;
+    sss << "smoothness_3D_" << gr->tag() << ".pos";
+    print_nodal_info(sss.str().c_str(),smoothness_forplot);
+    sss.clear();
+  }
+
+  // ------- meshing using new points
+  cout << "tets in gr before= " << gr->tetrahedra.size() << endl;
+  cout << "nb new vertices= " << new_vertices.size() << endl;
+  a=Cpu();
+
+  int option = CTX::instance()->mesh.algo3d;
+  CTX::instance()->mesh.algo3d = ALGO_3D_DELAUNAY;
+
+  deMeshGRegion deleter;
+  deleter(gr);
+  std::vector<GRegion*> regions;
+  regions.push_back(gr);
+  meshGRegion mesher(regions); //?
+  mesher(gr); //?
+  MeshDelaunayVolume(regions);
+  time_meshing += (Cpu() - a);
+
+  cout << "tets in gr after= " << gr->tetrahedra.size() << endl;
+  cout << "gr tag=" << gr->tag() << endl;
+
+  CTX::instance()->mesh.algo3d = option;
+
+  delete fifo;
+  for(unsigned int i=0;i<new_vertices.size();i++) delete new_vertices[i];
+  new_vertices.clear();
+  rtree.RemoveAll();
+
+  return true;
+}
+
+int Filler3D::get_nbr_new_vertices()
+{
+  return new_vertices.size();
+}
+
+MVertex* Filler3D::get_new_vertex(int i)
+{
+  return new_vertices[i];
+}
+
+Filler3D::Filler3D(){}
+
+Filler3D::~Filler3D()
+{
+  cout << "FILLER3D timing:" << endl;
+  cout << "  ------- CUMULATIVE TIME3D bgm & smoothing  : "
+       << time_smoothing << " s." << endl;
+  cout << "  ------- CUMULATIVE TIME3D inserting points : "
+       << time_insert_points << " s." << endl;
+  cout << "  ------- CUMULATIVE TIME3D meshing region   : "
+       << time_meshing << " s." << endl;
+  cout << "  ------- CUMULATIVE TOTAL 3D TIME (new)   : "
+       << time_meshing+time_smoothing+time_insert_points << " s." << endl;
+}
+
+std::vector<MVertex*> Filler3D::new_vertices;
+
+double Filler3D::time_smoothing = 0.;
+double Filler3D::time_insert_points = 0.;
+double Filler3D::time_meshing = 0.;
diff --git a/Mesh/pointInsertion.h b/Mesh/pointInsertion.h
new file mode 100644
index 0000000..156f0a8
--- /dev/null
+++ b/Mesh/pointInsertion.h
@@ -0,0 +1,43 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+
+#ifndef _POINTINSERTION_H_
+#define _POINTINSERTION_H_
+
+#include "STensor3.h"
+#include <vector>
+#include <string>
+#include <fstream>
+#include <iostream>
+
+class GFace;
+class GRegion;
+class MVertex;
+
+extern bool old_algo_hexa();
+
+class Filler2D{
+ public:
+  Filler2D();
+  ~Filler2D();
+  void pointInsertion2D(GFace* gf, std::vector<MVertex*> &packed, std::vector<SMetric3> &metrics );
+ private:
+  static double time_bgm_and_smoothing,time_insertion;
+};
+
+class Filler3D{
+ private:
+  static std::vector<MVertex*> new_vertices;// these are used in meshGRegion.cpp using static !!!
+  static double time_smoothing,time_insert_points, time_meshing;
+ public:
+  Filler3D();
+  ~Filler3D();
+  virtual bool treat_region(GRegion*);
+  static int get_nbr_new_vertices();
+  static MVertex* get_new_vertex(int);
+};
+
+#endif
diff --git a/Mesh/pointInsertionRTreeTools.cpp b/Mesh/pointInsertionRTreeTools.cpp
new file mode 100644
index 0000000..debf01c
--- /dev/null
+++ b/Mesh/pointInsertionRTreeTools.cpp
@@ -0,0 +1,199 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Tristan Carrier and Paul-Emile Bernard
+
+#include "pointInsertionRTreeTools.h"
+#include "BackgroundMesh.h"
+#include "BackgroundMeshManager.h"
+#include "pointInsertion.h"
+#include "GEntity.h"
+
+surfacePointWithExclusionRegion::surfacePointWithExclusionRegion
+  (MVertex *v, SPoint2 p[4][NUMDIR], SPoint2 &_mp, SMetric3 & meshMetric,
+   surfacePointWithExclusionRegion *father)
+{
+  _v = v;
+  _meshMetric = meshMetric;
+  _center = _mp;
+  for (int i=0;i<4;i++)_q[i] = _center + (p[i][0]+p[(i+1)%4][0]-_center*2)*FACTOR;
+  for (int i=0;i<4;i++)for (int j=0;j<NUMDIR;j++)_p[i][j] = p[i][j];
+
+  if (!father){
+    fullMatrix<double> V(3,3);
+    fullVector<double> S(3);
+    meshMetric.eig(V,S);
+    double l = std::max(std::max(S(0),S(1)),S(2));
+    _distanceSummed = sqrt(1/(l*l));
+  }
+  else {
+    _distanceSummed = father->_distanceSummed + distance (father->_v,_v);
+  }
+}
+
+bool surfacePointWithExclusionRegion::inExclusionZone (const SPoint2 &p)
+{
+  double mat[2][2];
+  double b[2] , uv[2];
+  mat[0][0]= _q[1].x()-_q[0].x();
+  mat[0][1]= _q[2].x()-_q[0].x();
+  mat[1][0]= _q[1].y()-_q[0].y();
+  mat[1][1]= _q[2].y()-_q[0].y();
+  b[0] = p.x() - _q[0].x();
+  b[1] = p.y() - _q[0].y();
+  sys2x2(mat, b, uv);
+  //    printf("inversion 1 : %g %g \n",uv[0],uv[1]);
+  if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
+  mat[0][0]= _q[3].x()-_q[2].x();
+  mat[0][1]= _q[0].x()-_q[2].x();
+  mat[1][0]= _q[3].y()-_q[2].y();
+  mat[1][1]= _q[0].y()-_q[2].y();
+  b[0] = p.x() - _q[2].x();
+  b[1] = p.y() - _q[2].y();
+  sys2x2(mat, b, uv);
+  //    printf("inversion 2 : %g %g \n",uv[0],uv[1]);
+  if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
+  return false;
+}
+
+void surfacePointWithExclusionRegion::minmax (double _min[2], double _max[2]) const
+{
+  _min[0] = std::min(std::min(std::min(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
+  _min[1] = std::min(std::min(std::min(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
+  _max[0] = std::max(std::max(std::max(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
+  _max[1] = std::max(std::max(std::max(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
+}
+
+void surfacePointWithExclusionRegion::print (FILE *f, int i)
+{
+  fprintf(f,"SP(%g,%g,%g){%d};\n",_center.x(),_center.y(),0.0,i);
+  fprintf(f,"SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d,%d};\n",
+      _q[0].x(),_q[0].y(),0.0,
+      _q[1].x(),_q[1].y(),0.0,
+      _q[2].x(),_q[2].y(),0.0,
+      _q[3].x(),_q[3].y(),0.0,i,i,i,i);
+
+}
+
+my_wrapper::my_wrapper (SPoint2 sp) : _tooclose (false), _p(sp) {}
+
+bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point)
+{
+  my_wrapper *w = static_cast<my_wrapper*>(point);
+
+  if (neighbour->inExclusionZone(w->_p)){
+    w->_tooclose = true;
+    return false;
+  }
+
+  return true;
+}
+
+bool inExclusionZone
+  (SPoint2 &p,
+   RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree,
+   std::vector<surfacePointWithExclusionRegion*> & all )
+{
+  // should assert that the point is inside the domain
+  // OLD BGM
+  if (old_algo_hexa()){
+    if (!backgroundMesh::current()->inDomain(p.x(),p.y(),0)) return true;
+  }
+  else{
+    // NEW BGM
+    if (!BGMManager::current2D()->inDomain(p.x(),p.y(),0)) return true;
+  }
+
+  my_wrapper w (p);
+  double _min[2] = {p.x()-1.e-1, p.y()-1.e-1},_max[2] = {p.x()+1.e-1,p.y()+1.e-1};
+  rtree.Search(_min,_max,rtree_callback,&w);
+
+  return w._tooclose;
+
+  for (unsigned int i=0;i<all.size();++i){
+    if (all[i]->inExclusionZone(p)){
+      // printf("%g %g is in exclusion zone of %g
+      //        %g\n",p.x(),p.y(),all[i]._center.x(),all[i]._center.y());
+      return true;
+    }
+  }
+  return false;
+}
+
+frameFieldBackgroundMesh3D* Wrapper3D::bgmesh = NULL;
+
+double infinity_distance_3D(const MVertex *v1,const MVertex *v2,STensor3 &cf)
+{
+  SPoint3 p1 = v1->point();
+  SPoint3 p2 = v2->point();
+  double x1=0.;
+  double y1=0.;
+  double z1=0.;
+  double x2=0.;
+  double y2=0.;
+  double z2=0.;
+  for (int i=0;i<3;i++){
+    x1 += cf(i,0) * p1[i];
+    y1 += cf(i,1) * p1[i];
+    z1 += cf(i,2) * p1[i];
+  }
+  for (int i=0;i<3;i++){
+    x2 += cf(i,0) * p2[i];
+    y2 += cf(i,1) * p2[i];
+    z2 += cf(i,2) * p2[i];
+  }
+  return std::max(std::max(fabs(x2-x1),fabs(y2-y1)),fabs(z2-z1));// distance
+};
+
+void fill_min_max(double x,double y,double z,double h,double *min,double *max)
+{
+  min[0] = x - sqrt3*h;
+  max[0] = x + sqrt3*h;
+  min[1] = y - sqrt3*h;
+  max[1] = y + sqrt3*h;
+  min[2] = z - sqrt3*h;
+  max[2] = z + sqrt3*h;
+};
+
+bool rtree_callback_3D(MVertex* neighbour,void* w)
+{
+  Wrapper3D* wrapper;
+  wrapper = static_cast<Wrapper3D*>(w);
+  const MVertex* individual = wrapper->get_individual();
+  const MVertex *parent = wrapper->get_parent();
+  if (parent==neighbour) return true;
+  // frameFieldBackgroundMesh3D* bgm = wrapper->bgm();
+  // const MVertex *closest = bgm->get_nearest_neighbor(individual);
+  // const double h = bgm->size(closest);// get approximate size, closest vertex, faster ?!
+  // STensor3 crossfield;
+  // bgm->eval_approximate_crossfield(closest, crossfield);
+  double *h = wrapper->get_size();
+  STensor3 *crossfield = wrapper->get_crossfield();
+
+  const double distance = infinity_distance_3D(individual,neighbour,(*crossfield));
+  if(distance<k1*(*h)){
+    wrapper->set_ok(false);
+    return false;
+  }
+  return true;
+};
+
+bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, double h)
+{
+  // check if the box (v->point +- k2*h) is in domain
+
+  const double x = v->x();
+  const double y = v->y();
+  const double z = v->z();
+  const double boxsize = k2*h;
+  if (!(bgm->inDomain(x+boxsize, y, z))) return false;
+  if (!(bgm->inDomain(x-boxsize, y, z))) return false;
+  if (!(bgm->inDomain(x, y+boxsize, z))) return false;
+  if (!(bgm->inDomain(x, y-boxsize, z))) return false;
+  if (!(bgm->inDomain(x, y, z+boxsize))) return false;
+  if (!(bgm->inDomain(x, y, z-boxsize))) return false;
+
+  return true;
+};
diff --git a/Mesh/pointInsertionRTreeTools.h b/Mesh/pointInsertionRTreeTools.h
new file mode 100644
index 0000000..42945a8
--- /dev/null
+++ b/Mesh/pointInsertionRTreeTools.h
@@ -0,0 +1,254 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+//
+// Contributed by Tristan Carrier and Paul-Emile Bernard
+
+#ifndef _POINTINSERTIONRTREETOOLS_H_
+#define _POINTINSERTIONRTREETOOLS_H_
+
+#include <math.h>
+#include <queue>
+#include "MVertex.h"
+#include "STensor3.h"
+#include "BackgroundMesh3D.h"
+#include "GEntity.h"
+#include "rtree.h"
+
+static const double k1 = 0.61; //k1*h is the minimal distance between two nodes
+static const double k2 = 0.5; //k2*h is the minimal distance to the boundary
+static const double sqrt3 = 1.73205081;
+static const double FACTOR = .71;
+
+static const int NUMDIR = 1;
+static const double DIRS [NUMDIR] = {0.0};
+
+//static const int NUMDIR = 3;
+//static const double DIRS [NUMDIR] = {0.0, M_PI/20.,-M_PI/20.};
+
+class surfacePointWithExclusionRegion {
+public:
+  MVertex *_v;
+  SPoint2 _center;
+  SPoint2 _p[4][NUMDIR];
+  SPoint2 _q[4];
+  SMetric3 _meshMetric;
+  double _distanceSummed;
+    /*
+       + p3
+       p4   |
+       +----c-----+ p2
+       |
+       + p1
+
+     */
+  surfacePointWithExclusionRegion (MVertex *v, SPoint2 p[4][NUMDIR],
+                                   SPoint2 &_mp, SMetric3 & meshMetric,
+                                   surfacePointWithExclusionRegion *father = 0);
+
+  bool inExclusionZone (const SPoint2 &p);
+  void minmax  (double _min[2], double _max[2]) const;
+  void print (FILE *f, int i);
+};
+
+class my_wrapper {
+public:
+  bool _tooclose;
+  SPoint2 _p;
+  my_wrapper (SPoint2 sp);
+};
+
+struct smoothness_point_pair{
+  double rank;
+  surfacePointWithExclusionRegion* ptr;
+};
+
+class compareSurfacePointWithExclusionRegionPtr_Smoothness
+{
+public:
+  inline bool operator () (const smoothness_point_pair &a,
+                           const smoothness_point_pair &b)  const
+  {
+    if (a.rank == b.rank){
+      if(a.ptr->_distanceSummed > b.ptr->_distanceSummed) return false;
+      if(a.ptr->_distanceSummed < b.ptr->_distanceSummed) return true;
+      return a.ptr<b.ptr;
+    }
+    return (a.rank < b.rank);
+  }
+};
+
+class compareSurfacePointWithExclusionRegionPtr
+{
+public:
+  inline bool operator () (const surfacePointWithExclusionRegion *a,
+                           const surfacePointWithExclusionRegion *b)  const
+  {
+    if(a->_distanceSummed > b->_distanceSummed) return false;
+    if(a->_distanceSummed < b->_distanceSummed) return true;
+    return a<b;
+  }
+};
+
+extern bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point);
+
+extern bool inExclusionZone (SPoint2 &p,
+                             RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree,
+                             std::vector<surfacePointWithExclusionRegion*> & all);
+
+class Wrapper3D{
+private:
+  static frameFieldBackgroundMesh3D* bgmesh;
+  MVertex *individual,*parent;
+  double *size;
+  STensor3 *cf;
+  SVector3 *vec;
+  bool ok;
+public:
+  Wrapper3D():ok(true){};
+  Wrapper3D(MVertex* _i,MVertex* _p):individual(_i), parent(_p),ok(true){};
+  ~Wrapper3D(){};
+  void set_ok(bool b){ok=b;};
+  void set_individual(MVertex *vertex){individual=vertex;};
+  void set_parent(MVertex *vertex){parent=vertex;};
+  void set_size(double *h){size=h;};
+  void set_crossfield(STensor3 *_cf){cf=_cf;};
+  void set_direction(SVector3 *_v){vec=_v;};
+  bool get_ok(){return ok;};
+  void set_bgm(frameFieldBackgroundMesh3D *bgm){bgmesh = bgm;};
+  frameFieldBackgroundMesh3D * bgm(){return bgmesh;};
+  MVertex* get_individual(){return individual;};
+  MVertex* get_parent(){return parent;};
+  STensor3* get_crossfield(){return cf;};
+  SVector3* get_direction(){return vec;};
+  double* get_size(){return size;};
+};
+
+extern double infinity_distance_3D(const MVertex *v1,const MVertex *v2,STensor3 &cf);
+extern bool rtree_callback_3D(MVertex* neighbour,void* w);
+extern bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, double h);
+extern void fill_min_max(double x,double y,double z,double h,double *min,double *max);
+
+// TODO: this is not a pair anymore, the name has to be changed; this will be in
+// listOfPoints AND in RTree: larger memory footprint but less CPU time...
+class smoothness_vertex_pair{
+public:
+  smoothness_vertex_pair(){};
+  ~smoothness_vertex_pair(){};
+  STensor3 cf;
+  SVector3 direction;
+  double rank, size;
+  MVertex *v;
+  int dir, layer;
+};
+
+class compareSmoothnessVertexPairs
+{
+private:
+  const double threshold;
+  double roundit(const double &d) const
+  {
+    //return (round(d/threshold)*threshold);
+    return ((int)(d/threshold + 0.5)*threshold);
+  }
+public:
+  compareSmoothnessVertexPairs():threshold(0.05){};
+
+  inline bool operator () (const smoothness_vertex_pair *a,
+                           const smoothness_vertex_pair *b)  const
+  {
+    if (a->rank==b->rank) return (a->v<b->v);
+    return (a->rank > b->rank);
+  }
+};
+
+class listOfPoints{
+public:
+  listOfPoints(){};
+  virtual ~listOfPoints(){};
+  virtual void insert(smoothness_vertex_pair *svp)=0;
+  virtual unsigned int size()=0;
+  virtual MVertex* get_first_vertex()=0;
+  virtual STensor3 get_first_crossfield()=0;
+  virtual double get_first_size()=0;
+  virtual int get_first_layer()=0;
+  virtual SVector3 get_first_direction()=0;
+  virtual void erase_first()=0;
+  virtual bool empty()=0;
+};
+
+class listOfPointsScalarSmoothness : public listOfPoints{
+public:
+  listOfPointsScalarSmoothness(){ };
+  virtual ~listOfPointsScalarSmoothness()
+  {
+    while (!empty())
+      erase_first();
+  };
+  virtual void insert(smoothness_vertex_pair *svp){ points.insert(svp); };
+  virtual unsigned int size(){ return points.size(); };
+  virtual MVertex* get_first_vertex(){ return (*points.begin())->v; };
+  virtual STensor3 get_first_crossfield(){ return (*points.begin())->cf; };
+  virtual double get_first_size(){ return (*points.begin())->size; };
+  virtual int get_first_layer(){ return (*points.begin())->layer; };
+  virtual SVector3 get_first_direction()
+  {
+    Msg::Error("listOfPointsScalarSmoothness::get_first_direction NOT applicable");
+    return SVector3(0.);
+  };
+  virtual void erase_first()
+  {
+    smoothness_vertex_pair *ptr = *(points.begin());
+    points.erase(points.begin());
+    delete ptr;
+  };
+  virtual bool empty(){ return points.empty(); };
+
+protected:
+  std::set<smoothness_vertex_pair*, compareSmoothnessVertexPairs> points;
+};
+
+class listOfPointsVectorialSmoothness : public listOfPointsScalarSmoothness{
+public:
+  listOfPointsVectorialSmoothness(){};
+  virtual ~listOfPointsVectorialSmoothness(){
+    while (!empty())
+      erase_first();
+  };
+  virtual SVector3 get_first_direction(){ return (*points.begin())->direction; };
+protected:
+  std::set<smoothness_vertex_pair*, compareSmoothnessVertexPairs> points;
+};
+
+class listOfPointsFifo : public listOfPoints{
+public:
+  listOfPointsFifo(){};
+  virtual ~listOfPointsFifo(){
+    while (!empty())
+      erase_first();
+  };
+  virtual void insert(smoothness_vertex_pair *svp){ points.push(svp); };
+  virtual unsigned int size(){ return points.size(); };
+  virtual MVertex* get_first_vertex(){ return (points.front())->v; };
+  virtual STensor3 get_first_crossfield(){ return (points.front())->cf; };
+  virtual double get_first_size(){ return (points.front())->size; };
+  virtual int get_first_layer(){ return (points.front())->layer; };
+  virtual SVector3 get_first_direction()
+  {
+    Msg::Error("listOfPointsFifo::get_first_direction NOT applicable");
+    return SVector3(0.);
+  };
+  virtual void erase_first()
+  {
+    smoothness_vertex_pair *ptr = points.front();
+    points.pop();
+    delete ptr;
+  };
+  virtual bool empty(){ return points.empty(); };
+
+protected:
+  std::queue<smoothness_vertex_pair*> points;
+};
+
+#endif
diff --git a/Mesh/qualityMeasures.cpp b/Mesh/qualityMeasures.cpp
index de581d8..25b6a37 100644
--- a/Mesh/qualityMeasures.cpp
+++ b/Mesh/qualityMeasures.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,206 +9,165 @@
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "MTetrahedron.h"
+#include "MPrism.h"
+#include "MHexahedron.h"
 #include "Numeric.h"
 #include "polynomialBasis.h"
 #include "GmshMessage.h"
 #include <limits>
 #include <string.h>
 
-double qmTriangle(const BDS_Point *p1, const BDS_Point *p2, const BDS_Point *p3,
-                  const qualityMeasure4Triangle &cr)
+
+namespace {
+
+
+// Compute unit vector and gradients w.r.t. x0, y0, z0
+// Remark: gradients w.r.t. x1, y1, z1 not computed as they are just the opposite
+inline void unitVecAndGrad(const SPoint3 &p0, const SPoint3 &p1,
+                           SVector3 &vec, std::vector<SVector3> &grad)
 {
-  return qmTriangle(p1->X, p1->Y, p1->Z, p2->X, p2->Y, p2->Z, p3->X, p3->Y, p3->Z, cr);
+  vec = SVector3(p0, p1);
+  const double n = vec.normalize(), invN = 1/n;
+  grad[0] = invN*vec[0]*vec; grad[0][0] -= invN;    // dv01/dx0
+  grad[1] = invN*vec[1]*vec; grad[1][1] -= invN;    // dv01/dy0
+  grad[2] = invN*vec[2]*vec; grad[2][2] -= invN;    // dv01/dz0
 }
 
-double qmTriangle(BDS_Face *t, const qualityMeasure4Triangle &cr)
+
+// Given vectors (0, 1) and (0, 2), their gradients and opposite of gradients,
+// and the unit normal vector, compute NCJ from area of triangle defined by both
+// vectors and gradients w.r.t. x0, y0, z0, x1, y1, z1, x2, y2, z2
+inline void NCJAndGrad2D(const SVector3 &v01,
+                         const std::vector<SVector3> &dv01dp0,
+                         const std::vector<SVector3> &dv01dp1,
+                         const SVector3 &v02, const std::vector<SVector3> &dv02dp0,
+                         const std::vector<SVector3> &dv02dp2,
+                         const SVector3 &normal,
+                         double &NCJ, std::vector<double> &dNCJ)
 {
-  BDS_Point *n[4];
-  t->getNodes(n);
-  return qmTriangle(n[0], n[1], n[2], cr);
+  const SVector3 dvndx0 = crossprod(v01, dv02dp0[0]) + crossprod(dv01dp0[0], v02);  // v01 x dv02/dx0 + dv01/dx0 x v02
+  const SVector3 dvndy0 = crossprod(v01, dv02dp0[1]) + crossprod(dv01dp0[1], v02);  // v01 x dv02/dy0 + dv01/dy0 x v02
+  const SVector3 dvndz0 = crossprod(v01, dv02dp0[2]) + crossprod(dv01dp0[2], v02);  // v01 x dv02/dz0 + dv01/dz0 x v02
+  const SVector3 dvndx1 = crossprod(dv01dp1[0], v02);                               // dv01/dx1 x v02 (= -dv01/dx0 x v02)
+  const SVector3 dvndy1 = crossprod(dv01dp1[1], v02);                               // dv01/dy1 x v02 (= -dv01/dy0 x v02)
+  const SVector3 dvndz1 = crossprod(dv01dp1[2], v02);                               // dv01/dz1 x v02 (= -dv01/dz0 x v02)
+  const SVector3 dvndx2 = crossprod(v01, dv02dp2[0]);                               // v01 x dv02/dx2 (= v01 x -dv02/dx0)
+  const SVector3 dvndy2 = crossprod(v01, dv02dp2[1]);                               // v01 x dv02/dy2 (= v01 x -dv02/dy0)
+  const SVector3 dvndz2 = crossprod(v01, dv02dp2[2]);                               // v01 x dv02/dz2 (= v01 x -dv02/dz0)
+
+  SVector3 vn = crossprod(v01, v02);
+  NCJ = dot(vn, normal);                                                            // NCJ
+  dNCJ[0] = dot(dvndx0, normal);                                                    // dNCJ/dx0
+  dNCJ[1] = dot(dvndy0, normal);                                                    // dNCJ/dy0
+  dNCJ[2] = dot(dvndz0, normal);                                                    // dNCJ/dz0
+  dNCJ[3] = dot(dvndx1, normal);                                                    // dNCJ/dx1
+  dNCJ[4] = dot(dvndy1, normal);                                                    // dNCJ/dy1
+  dNCJ[5] = dot(dvndz1, normal);                                                    // dNCJ/dz1
+  dNCJ[6] = dot(dvndx2, normal);                                                    // dNCJ/dx2
+  dNCJ[7] = dot(dvndy2, normal);                                                    // dNCJ/dy2
+  dNCJ[8] = dot(dvndz2, normal);                                                    // dNCJ/dz2
 }
 
-double qmTriangle(MTriangle*t, const qualityMeasure4Triangle &cr)
+
+//// Revert vector and gradients
+//inline void revertVG(const fullMatrix<double> &vg, fullMatrix<double> &res)
+//{
+//  res(0, 0) = -vg(0, 3); res(0, 1) = -vg(0, 4); res(0, 2) = -vg(0, 5); res(0, 6) = -vg(0, 6);
+//  res(1, 0) = -vg(1, 3); res(1, 1) = -vg(1, 4); res(1, 2) = -vg(1, 5); res(1, 6) = -vg(1, 6);
+//  res(2, 0) = -vg(2, 3); res(2, 1) = -vg(2, 4); res(2, 2) = -vg(2, 5); res(2, 6) = -vg(2, 6);
+//}
+
+
+// Scatter the NCJ gradients at vertex iV w.r.t vertices i0, i1 and i2
+// in the vector of gradients for 2D element of nV vertices
+template<int iV, int nV, int i0, int i1, int i2>
+inline void scatterNCJGrad(const std::vector<double> &dNCJi, std::vector<double> &dNCJ)
 {
-  return qmTriangle(t->getVertex(0), t->getVertex(1), t->getVertex(2), cr);
+  dNCJ[(iV*nV+i0)*3] = dNCJi[0];   dNCJ[(iV*nV+i0)*3+1] = dNCJi[1];   dNCJ[(iV*nV+i0)*3+2] = dNCJi[2];
+  dNCJ[(iV*nV+i1)*3] = dNCJi[3];   dNCJ[(iV*nV+i1)*3+1] = dNCJi[4];   dNCJ[(iV*nV+i1)*3+2] = dNCJi[5];
+  dNCJ[(iV*nV+i2)*3] = dNCJi[6];   dNCJ[(iV*nV+i2)*3+1] = dNCJi[7];   dNCJ[(iV*nV+i2)*3+2] = dNCJi[8];
 }
 
-double qmTriangle(const MVertex *v1, const MVertex *v2, const MVertex *v3,
-                  const qualityMeasure4Triangle &cr)
+
+// Scatter the NCJ gradients at vertex iV w.r.t vertices i0, i1, i2 and i3
+// in the vector of gradients for 3D element of nV vertices
+template<int iV, int nV, int i0, int i1, int i2, int i3>
+inline void scatterNCJGrad(const std::vector<double> &dNCJi, std::vector<double> &dNCJ)
 {
-  return qmTriangle(v1->x(), v1->y(), v1->z(), v2->x(), v2->y(), v2->z(),
-                    v3->x(), v3->y(), v3->z(), cr);
+  dNCJ[iV*nV+i0*3] = dNCJi[0];   dNCJ[iV*nV+i0*3+1] = dNCJi[1];   dNCJ[iV*nV+i0*3+2] = dNCJi[2];
+  dNCJ[iV*nV+i1*3] = dNCJi[3];   dNCJ[iV*nV+i1*3+1] = dNCJi[4];   dNCJ[iV*nV+i1*3+2] = dNCJi[5];
+  dNCJ[iV*nV+i2*3] = dNCJi[6];   dNCJ[iV*nV+i2*3+1] = dNCJi[7];   dNCJ[iV*nV+i2*3+2] = dNCJi[8];
+  dNCJ[iV*nV+i2*3] = dNCJi[9];   dNCJ[iV*nV+i2*3+1] = dNCJi[10];   dNCJ[iV*nV+i2*3+2] = dNCJi[11];
+}
+
+
 }
 
-// Triangle abc
-// quality is between 0 and 1
 
-double qmTriangle(const double &xa, const double &ya, const double &za,
-                  const double &xb, const double &yb, const double &zb,
-                  const double &xc, const double &yc, const double &zc,
-                  const qualityMeasure4Triangle &cr)
+double qmTriangle::gamma(const BDS_Point *p1, const BDS_Point *p2, const BDS_Point *p3)
 {
-  double quality;
-  switch(cr){
-  case QMTRI_RHO:
-    {
-      // quality = rho / R = 2 * inscribed radius / circumradius
-      double a [3] = {xc - xb, yc - yb, zc - zb};
-      double b [3] = {xa - xc, ya - yc, za - zc};
-      double c [3] = {xb - xa, yb - ya, zb - za};
-      norme(a);
-      norme(b);
-      norme(c);
-      double pva [3]; prodve(b, c, pva); const double sina = norm3(pva);
-      double pvb [3]; prodve(c, a, pvb); const double sinb = norm3(pvb);
-      double pvc [3]; prodve(a, b, pvc); const double sinc = norm3(pvc);
-
-      if (sina == 0.0 && sinb == 0.0 && sinc == 0.0) quality = 0.0;
-      else quality = 2 * (2 * sina * sinb * sinc / (sina + sinb + sinc));
-    }
-    break;
-    // condition number
-  case QMTRI_COND:
-    {
-      /*
-      double a [3] = {xc - xa, yc - ya, zc - za};
-      double b [3] = {xb - xa, yb - ya, zb - za};
-      double c [3] ; prodve(a, b, c); norme(c);
-      double A[3][3] = {{a[0] , b[0] , c[0]} ,
-                        {a[1] , b[1] , c[1]} ,
-                        {a[2] , b[2] , c[2]}};
-      */
-      quality = -1;
-    }
-    break;
-  default:
-    Msg::Error("Unknown quality measure");
-    return 0.;
-  }
+  return gamma(p1->X, p1->Y, p1->Z, p2->X, p2->Y, p2->Z, p3->X, p3->Y, p3->Z);
+}
+
 
-  return quality;
+double qmTriangle::gamma(BDS_Face *t)
+{
+  BDS_Point *n[4];
+  t->getNodes(n);
+  return gamma(n[0], n[1], n[2]);
 }
 
-double qmTet(MTetrahedron *t, const qualityMeasure4Tet &cr, double *volume)
+
+double qmTriangle::gamma(MTriangle*t)
 {
-  return qmTet(t->getVertex(0), t->getVertex(1), t->getVertex(2), t->getVertex(3),
-               cr, volume);
+  return gamma(t->getVertex(0), t->getVertex(1), t->getVertex(2));
 }
 
-double qmTet(const MVertex *v1, const MVertex *v2, const MVertex *v3,
-             const MVertex *v4, const qualityMeasure4Tet &cr, double *volume)
+
+double qmTriangle::gamma(const MVertex *v1, const MVertex *v2, const MVertex *v3)
 {
-  return qmTet(v1->x(), v1->y(), v1->z(), v2->x(), v2->y(), v2->z(),
-               v3->x(), v3->y(), v3->z(), v4->x(), v4->y(), v4->z(), cr, volume);
+  return gamma(v1->x(), v1->y(), v1->z(), v2->x(), v2->y(), v2->z(), v3->x(), v3->y(), v3->z());
 }
 
-double qmTet(const double &x1, const double &y1, const double &z1,
-             const double &x2, const double &y2, const double &z2,
-             const double &x3, const double &y3, const double &z3,
-             const double &x4, const double &y4, const double &z4,
-             const qualityMeasure4Tet &cr, double *volume)
+
+// Triangle abc
+// quality is between 0 and 1
+double qmTriangle::gamma(const double &xa, const double &ya, const double &za,
+                               const double &xb, const double &yb, const double &zb,
+                               const double &xc, const double &yc, const double &zc)
 {
-  switch(cr){
-  case QMTET_ONE:
-    return 1.0;
-  case QMTET_3:
-    {
-      double mat[3][3];
-      mat[0][0] = x2 - x1;
-      mat[0][1] = x3 - x1;
-      mat[0][2] = x4 - x1;
-      mat[1][0] = y2 - y1;
-      mat[1][1] = y3 - y1;
-      mat[1][2] = y4 - y1;
-      mat[2][0] = z2 - z1;
-      mat[2][1] = z3 - z1;
-      mat[2][2] = z4 - z1;
-      *volume = fabs(det3x3(mat)) / 6.;
-      double l = ((x2 - x1) * (x2 - x1) +
-                  (y2 - y1) * (y2 - y1) +
-                  (z2 - z1) * (z2 - z1));
-      l += ((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1) + (z3 - z1) * (z3 - z1));
-      l += ((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1) + (z4 - z1) * (z4 - z1));
-      l += ((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2) + (z3 - z2) * (z3 - z2));
-      l += ((x4 - x2) * (x4 - x2) + (y4 - y2) * (y4 - y2) + (z4 - z2) * (z4 - z2));
-      l += ((x3 - x4) * (x3 - x4) + (y3 - y4) * (y3 - y4) + (z3 - z4) * (z3 - z4));
-      return 12. * pow(3 * fabs(*volume), 2. / 3.) / l;
-    }
-  case QMTET_2:
-    {
-      double mat[3][3];
-      mat[0][0] = x2 - x1;
-      mat[0][1] = x3 - x1;
-      mat[0][2] = x4 - x1;
-      mat[1][0] = y2 - y1;
-      mat[1][1] = y3 - y1;
-      mat[1][2] = y4 - y1;
-      mat[2][0] = z2 - z1;
-      mat[2][1] = z3 - z1;
-      mat[2][2] = z4 - z1;
-      *volume = fabs(det3x3(mat)) / 6.;
-      double p0[3] = {x1, y1, z1};
-      double p1[3] = {x2, y2, z2};
-      double p2[3] = {x3, y3, z3};
-      double p3[3] = {x4, y4, z4};
-      double s1 = fabs(triangle_area(p0, p1, p2));
-      double s2 = fabs(triangle_area(p0, p2, p3));
-      double s3 = fabs(triangle_area(p0, p1, p3));
-      double s4 = fabs(triangle_area(p1, p2, p3));
-      double rhoin = 3. * fabs(*volume) / (s1 + s2 + s3 + s4);
-      double l = sqrt((x2 - x1) * (x2 - x1) +
-                      (y2 - y1) * (y2 - y1) +
-                      (z2 - z1) * (z2 - z1));
-      l = std::max(l, sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1) +
-                           (z3 - z1) * (z3 - z1)));
-      l = std::max(l, sqrt((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1) +
-                           (z4 - z1) * (z4 - z1)));
-      l = std::max(l, sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2) +
-                           (z3 - z2) * (z3 - z2)));
-      l = std::max(l, sqrt((x4 - x2) * (x4 - x2) + (y4 - y2) * (y4 - y2) +
-                           (z4 - z2) * (z4 - z2)));
-      l = std::max(l, sqrt((x3 - x4) * (x3 - x4) + (y3 - y4) * (y3 - y4) +
-                           (z3 - z4) * (z3 - z4)));
-      return 2. * sqrt(6.) * rhoin / l;
-    }
-    break;
-  case QMTET_COND:
-    {
-      /// condition number is defined as (see Knupp & Freitag in IJNME) 
-      double INVW[3][3] = {{1,-1./sqrt(3.),-1./sqrt(6.)},{0,2/sqrt(3.),-1./sqrt(6.)},{0,0,sqrt(1.5)}};
-      double A[3][3] = {{x2-x1,y2-y1,z2-z1},{x3-x1,y3-y1,z3-z1},{x4-x1,y4-y1,z4-z1}};
-      double S[3][3],INVS[3][3];
-      matmat(A,INVW,S);
-      *volume = inv3x3(S,INVS) * 0.70710678118654762;//2/sqrt(2);
-      double normS = norm2 (S);
-      double normINVS = norm2 (INVS);
-      return normS * normINVS;      
-    }
-  default:
-    Msg::Error("Unknown quality measure");
-    return 0.;
-  }
+  // quality = rho / R = 2 * inscribed radius / circumradius
+  double a [3] = {xc - xb, yc - yb, zc - zb};
+  double b [3] = {xa - xc, ya - yc, za - zc};
+  double c [3] = {xb - xa, yb - ya, zb - za};
+  norme(a);
+  norme(b);
+  norme(c);
+  double pva [3]; prodve(b, c, pva); const double sina = norm3(pva);
+  double pvb [3]; prodve(c, a, pvb); const double sinb = norm3(pvb);
+  double pvc [3]; prodve(a, b, pvc); const double sinc = norm3(pvc);
+
+  if (sina == 0.0 && sinb == 0.0 && sinc == 0.0) return 0.0;
+  else return 2 * (2 * sina * sinb * sinc / (sina + sinb + sinc));
 }
 
-/*
-double conditionNumberAndDerivativeOfTet(const double &x1, const double &y1, const double &z1,
-					 const double &x2, const double &y2, const double &z2,
-					 const double &x3, const double &y3, const double &z3,
-					 const double &x4, const double &y4, const double &z4){
 
-  double INVW[3][3] = {{1,-1./sqrt(3.),-1./sqrt(6.)},{0,2/sqrt(3.),-1./sqrt(6.)},{0,0,sqrt(1.5)}};
-      double A[3][3] = {{x2-x1,y2-y1,z2-z1},{x3-x1,y3-y1,z3-z1},{x4-x1,y4-y1,z4-z1}};
-      double S[3][3],INVS[3][3];
-      matmat(A,INVW,S);
-      double sigma = inv3x3(S,INVS);
-      double normS = norm2 (S);
-      double normINVS = norm2 (INVS);
-      conditionNumber = normS * normINVS;      
-  
+double qmTriangle::eta(MTriangle *el)
+{
+  MVertex *_v[3] = {el->getVertex(0), el->getVertex(1), el->getVertex(2)};
+
+  double a1 = 180 * angle3Vertices(_v[0], _v[1], _v[2]) / M_PI;
+  double a2 = 180 * angle3Vertices(_v[1], _v[2], _v[0]) / M_PI;
+  double a3 = 180 * angle3Vertices(_v[2], _v[0], _v[1]) / M_PI;
+
+  double amin = std::min(std::min(a1,a2),a3);
+  double angle = fabs(60. - amin);
+  return 1.-angle/60;
 }
-*/
 
-double qmTriangleAngles (MTriangle *e) {
+
+double qmTriangle::angles(MTriangle *e)
+{
   double a = 500;
   double worst_quality = std::numeric_limits<double>::max();
   double mat[3][3];
@@ -273,7 +232,178 @@ double qmTriangleAngles (MTriangle *e) {
 }
 
 
-double qmQuadrangleAngles (MQuadrangle *e) {
+void qmTriangle::NCJRange(const MTriangle *el, double &valMin, double &valMax)
+{
+  const JacobianBasis *jac = el->getJacobianFuncSpace();
+  fullMatrix<double> primNodesXYZ(3, 3);
+//  SVector3 geoNorm(0.,0.,0.);
+//  std::map<MElement*,GEntity*>::const_iterator itEl2ent = element2entity.find(_el[iEl]);
+//  GEntity *ge = (itEl2ent == element2entity.end()) ? 0 : itEl2ent->second;
+//  const bool hasGeoNorm = ge && (ge->dim() == 2) && ge->haveParametrization();
+  for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
+    const MVertex *v = el->getVertex(i);
+    primNodesXYZ(i,0) = v->x();
+    primNodesXYZ(i,1) = v->y();
+    primNodesXYZ(i,2) = v->z();
+//    if (hasGeoNorm && (_vert[iV]->onWhat() == ge)) {
+//      double u, v;
+//      _vert[iV]->getParameter(0,u);
+//      _vert[iV]->getParameter(1,v);
+//      geoNorm += ((GFace*)ge)->normal(SPoint2(u,v));
+//    }
+  }
+//  if (hasGeoNorm && (geoNorm.normSq() == 0.)) {
+//    SPoint2 param = ((GFace*)ge)->parFromPoint(_el[iEl]->barycenter(true),false);
+//    geoNorm = ((GFace*)ge)->normal(param);
+//  }
+  fullMatrix<double> nM(1, 3);
+  jac->getPrimNormal2D(primNodesXYZ, nM);
+  SVector3 normal(nM(0, 0), nM(0, 1), nM(0, 2));
+
+  std::vector<double> ncj(3);
+  NCJ(el->getVertex(0)->point(), el->getVertex(1)->point(),
+      el->getVertex(2)->point(), normal, ncj);
+  valMin = *std::min_element(ncj.begin(), ncj.end());
+  valMax = *std::max_element(ncj.begin(), ncj.end());
+}
+
+
+void qmTriangle::NCJ(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                     const SVector3 &normal, std::vector<double> &NCJ)
+{
+  // Compute unit vectors for each edge
+  SVector3 v01n(p0, p1), v12n(p1, p2), v20n(p2, p0);
+  v01n.normalize();
+  v12n.normalize();
+  v20n.normalize();
+
+  // Compute NCJ at vertex from unit vectors a and b as 0.5*||a^b||/A_equilateral
+  // Factor = 2./sqrt(3.) = 0.5/A_equilateral
+  static const double fact = 2./sqrt(3.);
+  NCJ[0] = fact * dot(crossprod(v01n, -v20n), normal);
+  NCJ[1] = fact * dot(crossprod(v12n, -v01n), normal);
+  NCJ[2] = fact * dot(crossprod(v20n, -v12n), normal);
+}
+
+
+// Compute NCJ and its gradients at corners
+// Gradients packed in vector: (dNCJ0/dx0, dNCJ0/dy0, dNCJ0/dz0,
+//                              dNCJ0/dx1, ... dNCJ0/dz3, dNCJ1/dx0, ..., dNCJ3/dz3)
+void qmTriangle::NCJAndGradients(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                                 const SVector3 &normal,
+                                 std::vector<double> &NCJ, std::vector<double> &dNCJ)
+{
+  // Factor = 2./sqrt(3.) = 0.5/A_equilateral
+  static const double fact = 2./sqrt(3.);
+
+  // Compute unit vector, its gradients and opposite grandients for edge (0, 1)
+  SVector3 v01n, v10n;
+  std::vector<SVector3> dv01ndp0(3), dv01ndp1(3);
+  unitVecAndGrad(p0, p1, v01n, dv01ndp0);
+  v10n = -v01n;
+  for (int i=0; i<3; i++) dv01ndp1[i] = -dv01ndp0[i];
+  const std::vector<SVector3> &dv10ndp1 = dv01ndp0, &dv10ndp0 = dv01ndp1;
+
+  // Compute unit vector, its gradients and opposite grandients for edge (1, 2)
+  SVector3 v12n, v21n;
+  std::vector<SVector3> dv12ndp1(3), dv12ndp2(3);
+  unitVecAndGrad(p1, p2, v12n, dv12ndp1);
+  v21n = -v12n;
+  for (int i=0; i<3; i++) dv12ndp2[i] = -dv12ndp1[i];
+  const std::vector<SVector3> &dv21ndp2 = dv12ndp1, &dv21ndp1 = dv12ndp2;
+
+  // Compute unit vector, its gradients and opposite grandients for edge (2, 0)
+  SVector3 v20n, v02n;
+  std::vector<SVector3> dv20ndp2(3), dv20ndp0(3);
+  unitVecAndGrad(p2, p0, v20n, dv20ndp2);
+  v02n = -v20n;
+  for (int i=0; i<3; i++) dv20ndp0[i] = -dv20ndp2[i];
+  const std::vector<SVector3> &dv02ndp0 = dv20ndp2, &dv02ndp2 = dv20ndp0;
+
+  // Compute NCJ at vertex 0 as 0.5*||u01^u02||/A_triEqui
+  // and gradients w.r.t. x0, y0, z0, x1, y1, z1, x2, y2, z2
+  std::vector<double> dNCJ0(9);
+  NCJAndGrad2D(v01n, dv01ndp0, dv01ndp1, v02n, dv02ndp0, dv02ndp2, normal, NCJ[0], dNCJ0);
+//  dNCJ[0] = dNCJ0[0]; dNCJ[1] = dNCJ0[1]; dNCJ[2] = dNCJ0[2];
+//  dNCJ[3] = dNCJ0[3]; dNCJ[4] = dNCJ0[4]; dNCJ[5] = dNCJ0[5];
+//  dNCJ[6] = dNCJ0[6]; dNCJ[7] = dNCJ0[7]; dNCJ[8] = dNCJ0[8];
+  scatterNCJGrad<0, 3, 0, 1, 2>(dNCJ0, dNCJ);
+
+  // Compute NCJ at vertex 1 as 0.5*||u12^u10||/A_triEqui
+  // and gradients w.r.t. x1, y1, z1, x2, y2, z2, x0, y0, z0
+  std::vector<double> dNCJ1(9);
+  NCJAndGrad2D(v12n, dv12ndp1, dv12ndp2, v10n, dv10ndp1, dv10ndp0, normal, NCJ[1], dNCJ1);
+//  dNCJ[9] = dNCJ1[6]; dNCJ[10] = dNCJ1[7]; dNCJ[11] = dNCJ1[8];
+//  dNCJ[10] = dNCJ1[0]; dNCJ[11] = dNCJ1[1]; dNCJ[12] = dNCJ1[2];
+//  dNCJ[13] = dNCJ1[3]; dNCJ[14] = dNCJ1[4]; dNCJ[15] = dNCJ1[5];
+  scatterNCJGrad<1, 3, 1, 2, 0>(dNCJ1, dNCJ);
+
+  // Compute NCJ at vertex 2 as 0.5*||u20^u21||/A_triEqui
+  // Compute NCJ at vertex 2 and gradients w.r.t. x2, y2, z2, x0, y0, z0, x1, y1, z1
+  std::vector<double> dNCJ2(9);
+  NCJAndGrad2D(v20n, dv20ndp2, dv20ndp0, v21n, dv21ndp2, dv21ndp1, normal, NCJ[2], dNCJ2);
+//  dNCJ[16] = dNCJ2[3]; dNCJ[17] = dNCJ2[4]; dNCJ[18] = dNCJ2[5];
+//  dNCJ[19] = dNCJ2[6]; dNCJ[20] = dNCJ2[7]; dNCJ[21] = dNCJ2[8];
+//  dNCJ[22] = dNCJ2[0]; dNCJ[23] = dNCJ2[1]; dNCJ[24] = dNCJ2[2];
+  scatterNCJGrad<2, 3, 2, 0, 1>(dNCJ2, dNCJ);
+
+  for (int i=0; i<3; i++) NCJ[i] *= fact;
+  for (int i=0; i<27; i++) dNCJ[i] *= fact;
+
+//  for (int iV=0; iV<3; iV++) {
+//    std::cout << "DBGTT: Vertex " << iV << ":\n";
+//    std::cout << "DBGTT:     -> NCJ = " << NCJ[iV] << "\n";
+//    for (unsigned ig=0; ig<3; ig++) {
+//      int ind = iV*9+ig*3;
+//      std::cout << "DBGTT:     -> dNCJ/dp" << ig << " = (" << dNCJ[ind] << ", " <<  dNCJ[ind+1] << ", " <<  dNCJ[ind+2] << ")\n";
+////      int ind2 = ig*3;
+////      std::vector<double> dNCJLoc = (iV == 0) ? dNCJ0 : (iV == 1) ? dNCJ1 : dNCJ2;
+////      std::cout << "DBGTT:     -> dNCJ/dp" << ig << " (local) = (" << dNCJLoc[ind2] << ", " <<  dNCJLoc[ind2+1] << ", " <<  dNCJLoc[ind2+2] << ")\n";
+//    }
+//  }
+}
+
+
+double qmQuadrangle::eta(MQuadrangle *el) {
+  double AR = 1;//(minEdge()/maxEdge());
+
+  MVertex *_v[4] = {el->getVertex(0), el->getVertex(1), el->getVertex(2), el->getVertex(3)};
+
+  SVector3 v01 (_v[1]->x()-_v[0]->x(),_v[1]->y()-_v[0]->y(),_v[1]->z()-_v[0]->z());
+  SVector3 v12 (_v[2]->x()-_v[1]->x(),_v[2]->y()-_v[1]->y(),_v[2]->z()-_v[1]->z());
+  SVector3 v23 (_v[3]->x()-_v[2]->x(),_v[3]->y()-_v[2]->y(),_v[3]->z()-_v[2]->z());
+  SVector3 v30 (_v[0]->x()-_v[3]->x(),_v[0]->y()-_v[3]->y(),_v[0]->z()-_v[3]->z());
+
+  SVector3 a = crossprod(v01,v12);
+  SVector3 b = crossprod(v12,v23);
+  SVector3 c = crossprod(v23,v30);
+  SVector3 d = crossprod(v30,v01);
+
+  double sign = 1.0;
+  if (dot(a,b) < 0 || dot(a,c) < 0 || dot(a,d) < 0 )sign = -1;
+  // FIXME ...
+  //  if (a.z() > 0 || b.z() > 0 || c.z() > 0 || d.z() > 0) sign = -1;
+
+  double a1 = 180 * angle3Vertices(_v[0], _v[1], _v[2]) / M_PI;
+  double a2 = 180 * angle3Vertices(_v[1], _v[2], _v[3]) / M_PI;
+  double a3 = 180 * angle3Vertices(_v[2], _v[3], _v[0]) / M_PI;
+  double a4 = 180 * angle3Vertices(_v[3], _v[0], _v[1]) / M_PI;
+
+  a1 = std::min(180.,a1);
+  a2 = std::min(180.,a2);
+  a3 = std::min(180.,a3);
+  a4 = std::min(180.,a4);
+  double angle = fabs(90. - a1);
+  angle = std::max(fabs(90. - a2),angle);
+  angle = std::max(fabs(90. - a3),angle);
+  angle = std::max(fabs(90. - a4),angle);
+
+  return sign*(1.-angle/90) * AR;
+}
+
+
+double qmQuadrangle::angles(MQuadrangle *e)
+{
   double a = 100;
   double worst_quality = std::numeric_limits<double>::max();
   double mat[3][3];
@@ -328,8 +458,348 @@ double qmQuadrangleAngles (MQuadrangle *e) {
     double quality = (atan(a*(x+M_PI/4)) + atan(a*(2*M_PI/4 - (x+M_PI/4))))/den;
     worst_quality = std::min(worst_quality, quality);
   }
-  
+
   return worst_quality;
 
 }
 
+
+void qmQuadrangle::NCJRange(const MQuadrangle *el, double &valMin, double &valMax)
+{
+  const JacobianBasis *jac = el->getJacobianFuncSpace();
+  fullMatrix<double> primNodesXYZ(4, 3);
+//  SVector3 geoNorm(0.,0.,0.);
+//  std::map<MElement*,GEntity*>::const_iterator itEl2ent = element2entity.find(_el[iEl]);
+//  GEntity *ge = (itEl2ent == element2entity.end()) ? 0 : itEl2ent->second;
+//  const bool hasGeoNorm = ge && (ge->dim() == 2) && ge->haveParametrization();
+  for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
+    const MVertex *v = el->getVertex(i);
+    primNodesXYZ(i,0) = v->x();
+    primNodesXYZ(i,1) = v->y();
+    primNodesXYZ(i,2) = v->z();
+//    if (hasGeoNorm && (_vert[iV]->onWhat() == ge)) {
+//      double u, v;
+//      _vert[iV]->getParameter(0,u);
+//      _vert[iV]->getParameter(1,v);
+//      geoNorm += ((GFace*)ge)->normal(SPoint2(u,v));
+//    }
+  }
+//  if (hasGeoNorm && (geoNorm.normSq() == 0.)) {
+//    SPoint2 param = ((GFace*)ge)->parFromPoint(_el[iEl]->barycenter(true),false);
+//    geoNorm = ((GFace*)ge)->normal(param);
+//  }
+  fullMatrix<double> nM(1, 3);
+  jac->getPrimNormal2D(primNodesXYZ, nM);
+  SVector3 normal(nM(0, 0), nM(0, 1), nM(0, 2));
+
+  std::vector<double> ncj(4);
+  NCJ(el->getVertex(0)->point(), el->getVertex(1)->point(),
+      el->getVertex(2)->point(), el->getVertex(3)->point(),
+      normal, ncj);
+  valMin = *std::min_element(ncj.begin(), ncj.end());
+  valMax = *std::max_element(ncj.begin(), ncj.end());
+}
+
+
+void qmQuadrangle::NCJ(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                       const SPoint3 &p3, const SVector3 &normal, std::vector<double> &ncj)
+{
+  // Compute unit vectors for each edge
+  SVector3 v01n(p0, p1), v12n(p1, p2), v23n(p2, p3), v30n(p3, p0);
+  v01n.normalize();
+  v12n.normalize();
+  v23n.normalize();
+  v30n.normalize();
+
+  // Compute NCJ at vertex from unit vectors a and b as 0.5*||a^b||/A_equilateral
+  ncj[0] = dot(crossprod(v01n, -v30n), normal);
+  ncj[1] = dot(crossprod(v12n, -v01n), normal);
+  ncj[2] = dot(crossprod(v23n, -v12n), normal);
+  ncj[3] = dot(crossprod(v30n, -v23n), normal);
+}
+
+
+void qmQuadrangle::NCJAndGradients(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                                   const SPoint3 &p3, const SVector3 &normal,
+                                   std::vector<double> &NCJ, std::vector<double> &dNCJ)
+{
+  // Compute unit vector, its gradients and opposite gradients for edge (0,1)
+  SVector3 v01n, v10n;
+  std::vector<SVector3> dv01ndp0(3), dv01ndp1(3);
+  unitVecAndGrad(p0, p1, v01n, dv01ndp0);
+  v10n = -v01n;
+  for (int i=0; i<3; i++) dv01ndp1[i] = -dv01ndp0[i];
+  const std::vector<SVector3> &dv10ndp1 = dv01ndp0, &dv10ndp0 = dv01ndp1;
+
+  // Compute unit vector, its gradients and opposite gradients for edge (1,2)
+  SVector3 v12n, v21n;
+  std::vector<SVector3> dv12ndp1(3), dv12ndp2(3);
+  unitVecAndGrad(p1, p2, v12n, dv12ndp1);
+  v21n = -v12n;
+  for (int i=0; i<3; i++) dv12ndp2[i] = -dv12ndp1[i];
+  const std::vector<SVector3> &dv21ndp2 = dv12ndp1, &dv21ndp1 = dv12ndp2;
+
+  // Compute unit vector, its gradients and opposite gradients for edge (2,3)
+  SVector3 v23n, v32n;
+  std::vector<SVector3> dv23ndp2(3), dv23ndp3(3);
+  unitVecAndGrad(p2, p3, v23n, dv23ndp2);
+  v32n = -v23n;
+  for (int i=0; i<3; i++) dv23ndp3[i] = -dv23ndp2[i];
+  const std::vector<SVector3> &dv32ndp3 = dv23ndp2, &dv32ndp2 = dv23ndp3;
+
+  // Compute unit vector, its gradients and opposite gradients for edge (3,0)
+  SVector3 v30n, v03n;
+  std::vector<SVector3> dv30ndp3(3), dv30ndp0(3);
+  unitVecAndGrad(p3, p0, v30n, dv30ndp3);
+  v03n = -v30n;
+  for (int i=0; i<3; i++) dv30ndp0[i] = -dv30ndp3[i];
+  const std::vector<SVector3> &dv03ndp0 = dv30ndp3, &dv03ndp3 = dv30ndp0;
+
+  // Compute NCJ at vertex 0 as 0.5*||u01^u03||/A_triRect
+  // and gradients w.r.t. x0, y0, z0, x1, y1, z1, x3, y3, z3
+  std::vector<double> dNCJ0(9);
+  NCJAndGrad2D( v01n, dv01ndp0, dv01ndp1, v03n, dv03ndp0, dv03ndp3, normal, NCJ[0], dNCJ0);
+  scatterNCJGrad<0, 4, 0, 1, 3>(dNCJ0, dNCJ);
+
+  // Compute NCJ at vertex 1 as 0.5*||u12^u10||/A_triRect
+  // and gradients w.r.t. x1, y1, z1, x2, y2, z2, x0, y0, z0
+  std::vector<double> dNCJ1(9);
+  NCJAndGrad2D( v12n, dv12ndp1, dv12ndp2, v10n, dv10ndp1, dv10ndp0, normal, NCJ[1], dNCJ1);
+  scatterNCJGrad<1, 4, 1, 2, 0>(dNCJ1, dNCJ);
+
+  // Compute NCJ at vertex 2 as 0.5*||u23^u21||/A_triRect
+  // and gradients w.r.t. x2, y2, z2, x3, y3, z3, x1, y1, z1
+  std::vector<double> dNCJ2(9);
+  NCJAndGrad2D( v23n, dv23ndp2, dv23ndp3, v21n, dv21ndp2, dv21ndp1, normal, NCJ[2], dNCJ2);
+  scatterNCJGrad<2, 4, 2, 3, 1>(dNCJ2, dNCJ);
+
+  // Compute NCJ at vertex 3 as 0.5*||u30^u32||/A_triRect
+  // and gradients w.r.t. x3, y3, z3, x0, y0, z0, x2, y2, z2
+  std::vector<double> dNCJ3(9);
+  NCJAndGrad2D(v30n, dv30ndp3, dv30ndp0, v32n, dv32ndp3, dv32ndp2, normal, NCJ[3], dNCJ3);
+  scatterNCJGrad<3, 4, 3, 0, 2>(dNCJ3, dNCJ);
+
+//  for (int iV=0; iV<4; iV++) {
+//    std::cout << "DBGTT: Vertex " << iV << ":\n";
+//    std::cout << "DBGTT:     -> NCJ = " << NCJ[iV] << "\n";
+//    for (unsigned ig=0; ig<4; ig++) {
+//      int ind = iV*12+ig*3;
+//      std::cout << "DBGTT:     -> dNCJ/dp" << ig << " = (" << dNCJ[ind] << ", " <<  dNCJ[ind+1] << ", " <<  dNCJ[ind+2] << ")\n";
+////      int ind2 = ig*3;
+////      std::vector<double> dNCJLoc = (iV == 0) ? dNCJ0 : (iV == 1) ? dNCJ1 : dNCJ2;
+////      std::cout << "DBGTT:     -> dNCJ/dp" << ig << " (local) = (" << dNCJLoc[ind2] << ", " <<  dNCJLoc[ind2+1] << ", " <<  dNCJLoc[ind2+2] << ")\n";
+//    }
+//  }
+}
+
+
+double qmTetrahedron::qm(MTetrahedron *t, const Measures &cr, double *volume)
+{
+  return qm(t->getVertex(0), t->getVertex(1), t->getVertex(2), t->getVertex(3), cr, volume);
+}
+
+
+double qmTetrahedron::qm(const MVertex *v1, const MVertex *v2, const MVertex *v3,
+                              const MVertex *v4, const Measures &cr, double *volume)
+{
+  return qm(v1->x(), v1->y(), v1->z(), v2->x(), v2->y(), v2->z(),
+               v3->x(), v3->y(), v3->z(), v4->x(), v4->y(), v4->z(), cr, volume);
+}
+
+
+double qmTetrahedron::qm(const double &x1, const double &y1, const double &z1,
+                         const double &x2, const double &y2, const double &z2,
+                         const double &x3, const double &y3, const double &z3,
+                         const double &x4, const double &y4, const double &z4,
+                         const Measures &cr, double *volume)
+{
+  switch(cr){
+  case QMTET_ONE:
+    return 1.0;
+  case QMTET_ETA:
+      return eta(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, volume);
+  case QMTET_GAMMA:
+      return gamma(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, volume);
+  case QMTET_COND:
+    return cond(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, volume);
+  default:
+    Msg::Error("Unknown quality measure");
+    return 0.;
+  }
+}
+
+
+double qmTetrahedron::eta(const double &x1, const double &y1, const double &z1,
+                          const double &x2, const double &y2, const double &z2,
+                          const double &x3, const double &y3, const double &z3,
+                          const double &x4, const double &y4, const double &z4,
+                          double *volume)
+{
+  double mat[3][3];
+  mat[0][0] = x2 - x1;
+  mat[0][1] = x3 - x1;
+  mat[0][2] = x4 - x1;
+  mat[1][0] = y2 - y1;
+  mat[1][1] = y3 - y1;
+  mat[1][2] = y4 - y1;
+  mat[2][0] = z2 - z1;
+  mat[2][1] = z3 - z1;
+  mat[2][2] = z4 - z1;
+  *volume = fabs(det3x3(mat)) / 6.;
+  double l = ((x2 - x1) * (x2 - x1) +
+              (y2 - y1) * (y2 - y1) +
+              (z2 - z1) * (z2 - z1));
+  l += ((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1) + (z3 - z1) * (z3 - z1));
+  l += ((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1) + (z4 - z1) * (z4 - z1));
+  l += ((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2) + (z3 - z2) * (z3 - z2));
+  l += ((x4 - x2) * (x4 - x2) + (y4 - y2) * (y4 - y2) + (z4 - z2) * (z4 - z2));
+  l += ((x3 - x4) * (x3 - x4) + (y3 - y4) * (y3 - y4) + (z3 - z4) * (z3 - z4));
+  return 12. * pow(3 * fabs(*volume), 2. / 3.) / l;
+}
+
+
+double qmTetrahedron::gamma(const double &x1, const double &y1, const double &z1,
+                            const double &x2, const double &y2, const double &z2,
+                            const double &x3, const double &y3, const double &z3,
+                            const double &x4, const double &y4, const double &z4,
+                            double *volume)
+{
+  double mat[3][3];
+  mat[0][0] = x2 - x1;
+  mat[0][1] = x3 - x1;
+  mat[0][2] = x4 - x1;
+  mat[1][0] = y2 - y1;
+  mat[1][1] = y3 - y1;
+  mat[1][2] = y4 - y1;
+  mat[2][0] = z2 - z1;
+  mat[2][1] = z3 - z1;
+  mat[2][2] = z4 - z1;
+  *volume = fabs(det3x3(mat)) / 6.;
+  double p0[3] = {x1, y1, z1};
+  double p1[3] = {x2, y2, z2};
+  double p2[3] = {x3, y3, z3};
+  double p3[3] = {x4, y4, z4};
+  double s1 = fabs(triangle_area(p0, p1, p2));
+  double s2 = fabs(triangle_area(p0, p2, p3));
+  double s3 = fabs(triangle_area(p0, p1, p3));
+  double s4 = fabs(triangle_area(p1, p2, p3));
+  double rhoin = 3. * fabs(*volume) / (s1 + s2 + s3 + s4);
+  double l = sqrt((x2 - x1) * (x2 - x1) +
+                  (y2 - y1) * (y2 - y1) +
+                  (z2 - z1) * (z2 - z1));
+  l = std::max(l, sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1) +
+                       (z3 - z1) * (z3 - z1)));
+  l = std::max(l, sqrt((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1) +
+                       (z4 - z1) * (z4 - z1)));
+  l = std::max(l, sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2) +
+                       (z3 - z2) * (z3 - z2)));
+  l = std::max(l, sqrt((x4 - x2) * (x4 - x2) + (y4 - y2) * (y4 - y2) +
+                       (z4 - z2) * (z4 - z2)));
+  l = std::max(l, sqrt((x3 - x4) * (x3 - x4) + (y3 - y4) * (y3 - y4) +
+                       (z3 - z4) * (z3 - z4)));
+  return 2. * sqrt(6.) * rhoin / l;
+}
+
+
+double qmTetrahedron::cond(const double &x1, const double &y1, const double &z1,
+                           const double &x2, const double &y2, const double &z2,
+                           const double &x3, const double &y3, const double &z3,
+                           const double &x4, const double &y4, const double &z4,
+                           double *volume)
+{
+  /// condition number is defined as (see Knupp & Freitag in IJNME)
+  double INVW[3][3] = {{1,-1./sqrt(3.),-1./sqrt(6.)},{0,2/sqrt(3.),-1./sqrt(6.)},{0,0,sqrt(1.5)}};
+  double A[3][3] = {{x2-x1,y2-y1,z2-z1},{x3-x1,y3-y1,z3-z1},{x4-x1,y4-y1,z4-z1}};
+  double S[3][3],INVS[3][3];
+  matmat(A,INVW,S);
+  *volume = inv3x3(S,INVS) * 0.70710678118654762;//2/sqrt(2);
+  double normS = norm2 (S);
+  double normINVS = norm2 (INVS);
+  return normS * normINVS;
+}
+
+
+// TODO: Replace this
+static double prismNCJ(const MVertex* a, const MVertex* b, const MVertex* c, const MVertex* d)
+{
+  static const double fact = 2./sqrt(3.);
+
+  const SVector3 vec1 = SVector3(b->x()-a->x(),b->y()-a->y(),b->z()-a->z());
+  const SVector3 vec2 = SVector3(c->x()-a->x(),c->y()-a->y(),c->z()-a->z());
+  const SVector3 vec3 = SVector3(d->x()-a->x(),d->y()-a->y(),d->z()-a->z());
+
+  const double l1 = vec1.norm();
+  const double l2 = vec2.norm();
+  const double l3 = vec3.norm();
+
+  const double val = dot(vec1,crossprod(vec2,vec3));
+  return fact*fabs(val)/(l1*l2*l3);
+}
+
+
+double qmPrism::minNCJ(const MPrism *el) {
+  const MVertex *a = el->getVertex(0),*b= el->getVertex(1), *c= el->getVertex(2);
+  const MVertex *d = el->getVertex(3),*e= el->getVertex(4), *f= el->getVertex(5);
+  const double j[6] = {
+      prismNCJ(a,b,c,d),
+      prismNCJ(b,a,c,e),
+      prismNCJ(c,a,b,f),
+      prismNCJ(d,a,e,f),
+      prismNCJ(e,b,d,f),
+      prismNCJ(f,c,d,e)};
+  const double result = *std::min_element(j,j+6);
+  return result;
+}
+
+
+//void qmPrism::NCJ(const double &x0, const double &y0, const double &z0,
+//                  const double &x1, const double &y1, const double &z1,
+//                  const double &x2, const double &y2, const double &z2,
+//                  const double &x3, const double &y3, const double &z3,
+//                  const double &x4, const double &y4, const double &z4,
+//                  fullVector<double> &ncj)
+//{
+//  // Compute unit vectors for each edge
+//  double x01n, y01n, z01n, x12n, y12n, z12n, x23n, y23n, z23n, x30n, y30n, z30n;
+//  unitVec(x0, y0, z0, x1, y1, z1, x01n, y01n, z01n);
+//  unitVec(x1, y1, z1, x2, y2, z2, x12n, y12n, z12n);
+//  unitVec(x2, y2, z2, x3, y3, z3, x23n, y23n, z23n);
+//  unitVec(x3, y3, z3, x0, y0, z0, x30n, y30n, z30n);
+//
+//  // Compute NCJ at vertex from unit vectors a and b as 0.5*||a^b||/A_equilateral
+//  // Factor = 2./sqrt(3.) = 0.5/A_equilateral
+//  static const double fact = 1.1547005383792517;
+//  ncj(0) = triArea(fact, x01n, y01n, z01n, -x20n, -y20n, -z20n);
+//  ncj(1) = triArea(fact, x12n, y12n, z12n, -x01n, -y01n, -z01n);
+//  ncj(2) = triArea(fact, x20n, y20n, z20n, -x12n, -y12n, -z12n);
+//}
+
+
+// TODO: Remove this (useless as quality measure)
+double qmHexahedron::angles(MHexahedron *el)
+{
+  double angleMax = 0.0;
+  double angleMin = M_PI;
+  double zeta = 0.0;
+  for (int i=0; i<el->getNumFaces(); i++){
+    std::vector<MVertex*> vv;
+    vv.push_back(el->getFace(i).getVertex(0));
+    vv.push_back(el->getFace(i).getVertex(1));
+    vv.push_back(el->getFace(i).getVertex(2));
+    vv.push_back(el->getFace(i).getVertex(3));
+    // MVertex *v0 = new MVertex(0, 0, 0); vv.push_back(v0);
+    // MVertex *v1 = new MVertex(1., 0, 0);vv.push_back(v1);
+    // MVertex *v2 = new MVertex(2., 1., 0);vv.push_back(v2);
+    // MVertex *v3 = new MVertex(1, 1., 0);vv.push_back(v3);
+    for (int j=0; j<4; j++){
+      SVector3 a(vv[(j+2)%4]->x()-vv[(j+1)%4]->x(),vv[(j+2)%4]->y()-vv[(j+1)%4]->y(),vv[(j+2)%4]->z()-vv[(j+1)%4]->z()  );
+      SVector3 b(vv[(j+1)%4]->x()-vv[(j)%4]->x(),  vv[(j+1)%4]->y()-vv[(j)%4]->y(),  vv[(j+1)%4]->z()-vv[(j)%4]->z()  );
+      double angle = acos( dot(a,b)/(norm(a)*norm(b))); //*180/M_PI;
+      angleMax = std::max(angleMax, angle);
+      angleMin = std::min(angleMin, angle);
+    }
+    //printf("angle max =%g min =%g \n", angleMax*180/M_PI, angleMin*180/M_PI);
+  }
+  zeta = 1.-std::max((angleMax-0.5*M_PI)/(0.5*M_PI),(0.5*M_PI-angleMin)/(0.5*M_PI));
+  return zeta;
+}
diff --git a/Mesh/qualityMeasures.h b/Mesh/qualityMeasures.h
index f2fc968..e238491 100644
--- a/Mesh/qualityMeasures.h
+++ b/Mesh/qualityMeasures.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,39 +6,133 @@
 #ifndef _QUALITY_MEASURES_H_
 #define _QUALITY_MEASURES_H_
 
+//#include "fullMatrix.h"
+#include <vector>
+//#include "SPoint3.h"
+
+class SPoint3;
+class SVector3;
 class BDS_Point;
 class BDS_Face;
 class MVertex;
 class MTriangle;
 class MQuadrangle;
 class MTetrahedron;
+class MPrism;
+class MHexahedron;
 class MElement;
 
-enum qualityMeasure4Triangle {QMTRI_RHO, QMTRI_COND};
-enum qualityMeasure4Tet{QMTET_1, QMTET_2, QMTET_3, QMTET_ONE, QMTET_COND};
-
-double qmTriangleAngles (MTriangle *e);
-double qmQuadrangleAngles (MQuadrangle *e);
-
-double qmTriangle(MTriangle *f, const qualityMeasure4Triangle &cr); 
-double qmTriangle(BDS_Face *f, const qualityMeasure4Triangle &cr); 
-double qmTriangle(const BDS_Point *p1, const BDS_Point *p2, const BDS_Point *p3, 
-                  const qualityMeasure4Triangle &cr); 
-double qmTriangle(const MVertex *v1, const MVertex *v2, const MVertex *v3, 
-                  const qualityMeasure4Triangle &cr);
-double qmTriangle(const double *d1, const double *d2, const double *d3, 
-                  const qualityMeasure4Triangle &cr);
-double qmTriangle(const double &x1, const double &y1, const double &z1, 
-                  const double &x2, const double &y2, const double &z2, 
-                  const double &x3, const double &y3, const double &z3, 
-                  const qualityMeasure4Triangle &cr);
-double qmTet(MTetrahedron *t, const qualityMeasure4Tet &cr, double *volume = 0);
-double qmTet(const MVertex *v1, const MVertex *v2, const MVertex *v3, 
-             const MVertex *v4, const qualityMeasure4Tet &cr, double *volume = 0);
-double qmTet(const double &x1, const double &y1, const double &z1, 
-             const double &x2, const double &y2, const double &z2, 
-             const double &x3, const double &y3, const double &z3, 
-             const double &x4, const double &y4, const double &z4, 
-             const qualityMeasure4Tet &cr, double *volume = 0);
+
+class qmTriangle
+{
+public:
+  static double gamma(MTriangle *f);
+  static double gamma(BDS_Face *f);
+  static double gamma(const BDS_Point *p1, const BDS_Point *p2, const BDS_Point *p3);
+  static double gamma(const MVertex *v1, const MVertex *v2, const MVertex *v3);
+  static double gamma(const double *d1, const double *d2, const double *d3);
+  static double gamma(const double &x1, const double &y1, const double &z1,
+                      const double &x2, const double &y2, const double &z2,
+                      const double &x3, const double &y3, const double &z3);
+  static double eta(MTriangle *el);
+  static double angles(MTriangle *e);
+  static double minNCJ(const MTriangle *e);
+  static void NCJRange(const MTriangle *e, double &valMin, double &valMax);
+  static inline int numNCJVal() { return 3; }
+  static void NCJ(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                  const SVector3 &normal, std::vector<double> &NCJ);
+  static void NCJAndGradients(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                              const SVector3 &normal,
+                              std::vector<double> &NCJ, std::vector<double> &dNCJ);
+};
+
+
+class qmQuadrangle
+{
+public:
+  static double gamma(MQuadrangle *el) { return eta(el); }
+  static double eta(MQuadrangle *el);
+  static double angles(MQuadrangle *e);
+  static double minNCJ(const MQuadrangle *e);
+  static void NCJRange(const MQuadrangle *e, double &valMin, double &valMax);
+  static inline int numNCJVal() { return 4; }
+  static void NCJ(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                  const SPoint3 &p3, const SVector3 &normal, std::vector<double> &ncj);
+  static void NCJAndGradients(const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2,
+                              const SPoint3 &p3, const SVector3 &normal,
+                              std::vector<double> &NCJ, std::vector<double> &dNCJ);
+};
+
+
+class qmTetrahedron
+{
+public:
+  enum Measures {QMTET_GAMMA, QMTET_ETA, QMTET_ONE, QMTET_COND};
+  static double qm(MTetrahedron *t, const Measures &cr, double *volume = 0);
+  static double qm(const BDS_Point *p1, const BDS_Point *p2, const BDS_Point *p3);
+  static double qm(const MVertex *v1, const MVertex *v2, const MVertex *v3,
+      const MVertex *v4, const Measures &cr, double *volume = 0);
+  static double qm(const double &x1, const double &y1, const double &z1,
+                   const double &x2, const double &y2, const double &z2,
+                   const double &x3, const double &y3, const double &z3,
+                   const double &x4, const double &y4, const double &z4,
+                   const Measures &cr, double *volume = 0);
+  static double eta(const double &x1, const double &y1, const double &z1,
+                    const double &x2, const double &y2, const double &z2,
+                    const double &x3, const double &y3, const double &z3,
+                    const double &x4, const double &y4, const double &z4,
+                    double *volume = 0);
+  static double gamma(const double &x1, const double &y1, const double &z1,
+                      const double &x2, const double &y2, const double &z2,
+                      const double &x3, const double &y3, const double &z3,
+                      const double &x4, const double &y4, const double &z4,
+                      double *volume = 0);
+  static double cond(const double &x1, const double &y1, const double &z1,
+                     const double &x2, const double &y2, const double &z2,
+                     const double &x3, const double &y3, const double &z3,
+                     const double &x4, const double &y4, const double &z4,
+                     double *volume = 0);
+  static double minNCJ(const MTetrahedron *e);
+//  static void NCJRange(const MTetrahedron *e, double &valMin, double &valMax);
+  static inline int numNCJVal() { return 4; }
+//  static void NCJ(const double &x0, const double &y0, const double &z0,
+//                  const double &x1, const double &y1, const double &z1,
+//                  const double &x2, const double &y2, const double &z2,
+//                  const double &x3, const double &y3, const double &z3,
+//                  fullVector<double> &ncj);
+//  static void NCJAndGradients(const double &x0, const double &y0, const double &z0,
+//                              const double &x1, const double &y1, const double &z1,
+//                              const double &x2, const double &y2, const double &z2,
+//                              const double &x3, const double &y3, const double &z3,
+//                              fullMatrix<double> &ncj);
+};
+
+
+class qmPrism
+{
+public:
+  static double minNCJ(const MPrism *el);
+  static inline int numNCJVal() { return 6; }
+//  static void NCJ(const double &x0, const double &y0, const double &z0,
+//                  const double &x1, const double &y1, const double &z1,
+//                  const double &x2, const double &y2, const double &z2,
+//                  const double &x3, const double &y3, const double &z3,
+//                  const double &x4, const double &y4, const double &z4,
+//                  fullVector<double> &ncj);
+};
+
+
+class qmHexahedron
+{
+public:
+  static double angles(MHexahedron *el);
+  static inline int numNCJVal() { return 8; }
+//  static void NCJ(const double &x0, const double &y0, const double &z0,
+//                  const double &x1, const double &y1, const double &z1,
+//                  const double &x2, const double &y2, const double &z2,
+//                  const double &x3, const double &y3, const double &z3,
+//                  const double &x4, const double &y4, const double &z4,
+//                  fullVector<double> &ncj);
+};
 
 #endif
diff --git a/Mesh/simple3D.cpp b/Mesh/simple3D.cpp
index d896aa8..efda800 100644
--- a/Mesh/simple3D.cpp
+++ b/Mesh/simple3D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,6 +6,7 @@
 // Contributor(s):
 //   Tristan Carrier François Henrotte
 
+
 #include "simple3D.h"
 #include "GModel.h"
 #include "MElement.h"
@@ -19,10 +20,7 @@
 #include "Context.h"
 #include <iostream>
 #include <string>
-
-#if defined(HAVE_RTREE)
 #include "rtree.h"
-#endif
 
 #define k1 0.7 //k1*h is the minimal distance between two nodes
 #define k2 0.5 //k2*h is the minimal distance to the boundary
@@ -100,7 +98,8 @@ class Wrapper{
 
 /*********functions*********/
 
-double infinity_distance(SPoint3 p1,SPoint3 p2,Metric m){
+double infinity_distance(SPoint3 p1,SPoint3 p2,Metric m)
+{
   double distance;
   double x1,y1,z1;
   double x2,y2,z2;
@@ -128,7 +127,8 @@ double infinity_distance(SPoint3 p1,SPoint3 p2,Metric m){
   return distance;
 }
 
-bool rtree_callback(Node* neighbour,void* w){
+bool rtree_callback(Node* neighbour,void* w)
+{
   double h;
   double distance;
   Metric m;
@@ -154,7 +154,8 @@ bool rtree_callback(Node* neighbour,void* w){
 
 /*********class Metric*********/
 
-Metric::Metric(){
+Metric::Metric()
+{
   m11 = 1.0;
   m21 = 0.0;
   m31 = 0.0;
@@ -168,77 +169,41 @@ Metric::Metric(){
 
 Metric::~Metric(){}
 
-void Metric::set_m11(double new_m11){
-  m11 = new_m11;
-}
+void Metric::set_m11(double new_m11){ m11 = new_m11; }
 
-void Metric::set_m21(double new_m21){
-  m21 = new_m21;
-}
+void Metric::set_m21(double new_m21){ m21 = new_m21; }
 
-void Metric::set_m31(double new_m31){
-  m31 = new_m31;
-}
+void Metric::set_m31(double new_m31){ m31 = new_m31; }
 
-void Metric::set_m12(double new_m12){
-  m12 = new_m12;
-}
+void Metric::set_m12(double new_m12){ m12 = new_m12; }
 
-void Metric::set_m22(double new_m22){
-  m22 = new_m22;
-}
+void Metric::set_m22(double new_m22){ m22 = new_m22; }
 
-void Metric::set_m32(double new_m32){
-  m32 = new_m32;
-}
+void Metric::set_m32(double new_m32){ m32 = new_m32; }
 
-void Metric::set_m13(double new_m13){
-  m13 = new_m13;
-}
+void Metric::set_m13(double new_m13){ m13 = new_m13; }
 
-void Metric::set_m23(double new_m23){
-  m23 = new_m23;
-}
+void Metric::set_m23(double new_m23){ m23 = new_m23; }
 
-void Metric::set_m33(double new_m33){
-  m33 = new_m33;
-}
+void Metric::set_m33(double new_m33){ m33 = new_m33; }
 
-double Metric::get_m11(){
-  return m11;
-}
+double Metric::get_m11(){ return m11; }
 
-double Metric::get_m21(){
-  return m21;
-}
+double Metric::get_m21(){ return m21; }
 
-double Metric::get_m31(){
-  return m31;
-}
+double Metric::get_m31(){ return m31; }
 
-double Metric::get_m12(){
-  return m12;
-}
+double Metric::get_m12(){ return m12; }
 
-double Metric::get_m22(){
-  return m22;
-}
+double Metric::get_m22(){ return m22; }
 
-double Metric::get_m32(){
-  return m32;
-}
+double Metric::get_m32(){ return m32; }
 
-double Metric::get_m13(){
-  return m13;
-}
+double Metric::get_m13(){ return m13; }
 
-double Metric::get_m23(){
-  return m23;
-}
+double Metric::get_m23(){ return m23; }
 
-double Metric::get_m33(){
-  return m33;
-}
+double Metric::get_m33(){ return m33; }
 
 /*********class Node*********/
 
@@ -337,7 +302,8 @@ Filler::Filler(){}
 
 Filler::~Filler(){}
 
-void Filler::treat_model(){
+void Filler::treat_model()
+{
   GRegion* gr;
   GModel* model = GModel::current();
   GModel::riter it;
@@ -351,8 +317,8 @@ void Filler::treat_model(){
   }
 }
 
-void Filler::treat_region(GRegion* gr){
-
+void Filler::treat_region(GRegion* gr)
+{
   int NumSmooth = CTX::instance()->mesh.smoothCrossField;
   std::cout << "NumSmooth = " << NumSmooth << std::endl ;
   if(NumSmooth && (gr->dim() == 3)){
@@ -364,7 +330,6 @@ void Filler::treat_region(GRegion* gr){
     Frame_field::saveCrossField("cross1.pos",scale);
   }
 
-#if defined(HAVE_RTREE)
   unsigned int i;
   int j;
   int count;
@@ -390,7 +355,7 @@ void Filler::treat_region(GRegion* gr){
   std::list<GFace*>::iterator it2;
   std::map<MVertex*,int>::iterator it3;
   RTree<Node*,double,3,double> rtree;
-  
+
   Frame_field::init_region(gr);
   Size_field::init_region(gr);
   Size_field::solve(gr);
@@ -402,7 +367,7 @@ void Filler::treat_region(GRegion* gr){
   faces.clear();
   limits.clear();
 
-  faces = gr->faces();	
+  faces = gr->faces();
   for(it2=faces.begin();it2!=faces.end();it2++){
     gf = *it2;
 	limit = code(gf->tag());
@@ -415,7 +380,7 @@ void Filler::treat_region(GRegion* gr){
 	  }
 	}
   }
-		
+
   /*for(i=0;i<gr->getNumMeshElements();i++){
     element = gr->getMeshElement(i);
     for(j=0;j<element->getNumVertices();j++){
@@ -429,63 +394,63 @@ void Filler::treat_region(GRegion* gr){
 	  boundary_vertices.push_back(*it);
 	}
   }
-	
+
   for(it=temp.begin();it!=temp.end();it++){
     if((*it)->onWhat()->dim()==1){
 	  boundary_vertices.push_back(*it);
 	}
   }
-	
+
   for(it=temp.begin();it!=temp.end();it++){
     if((*it)->onWhat()->dim()==2){
 	  boundary_vertices.push_back(*it);
 	}
   }
-	
+
   /*for(it=temp.begin();it!=temp.end();it++){
     if((*it)->onWhat()->dim()<3){
       boundary_vertices.push_back(*it);
     }
   }*/
   //std::ofstream file("nodes.pos");
-  //file << "View \"test\" {\n";	
+  //file << "View \"test\" {\n";
 
   for(i=0;i<boundary_vertices.size();i++){
     x = boundary_vertices[i]->x();
     y = boundary_vertices[i]->y();
     z = boundary_vertices[i]->z();
-    
+
     node = new Node(SPoint3(x,y,z));
     compute_parameters(node,gr);
 	node->set_layer(0);
-	
+
 	it3 = limits.find(boundary_vertices[i]);
 	node->set_limit(it3->second);
-	
+
 	rtree.Insert(node->min,node->max,node);
 	fifo.push(node);
     //print_node(node,file);
   }
-  
+
   count = 1;
   while(!fifo.empty()){
     parent = fifo.front();
 	fifo.pop();
 	garbage.push_back(parent);
-	  
+
 	if(parent->get_limit()!=-1 && parent->get_layer()>=parent->get_limit()){
 	  continue;
 	}
-	  
+
 	spawns.clear();
 	spawns.resize(6);
-	  
+
 	for(i=0;i<6;i++){
 	  spawns[i] = new Node();
 	}
-	
+
 	create_spawns(gr,octree,parent,spawns);
-	
+
 	for(i=0;i<6;i++){
 	  ok2 = 0;
 	  individual = spawns[i];
@@ -493,18 +458,18 @@ void Filler::treat_region(GRegion* gr){
 	  x = point.x();
 	  y = point.y();
 	  z = point.z();
-	  
+
 	  if(inside_domain(octree,x,y,z)){
 		compute_parameters(individual,gr);
 		individual->set_layer(parent->get_layer()+1);
 		individual->set_limit(parent->get_limit());
-		
+
 		if(far_from_boundary(octree,individual)){
 		  wrapper.set_ok(1);
 		  wrapper.set_individual(individual);
 		  wrapper.set_parent(parent);
 		  rtree.Search(individual->min,individual->max,rtree_callback,&wrapper);
-			
+
 		  if(wrapper.get_ok()){
 		    fifo.push(individual);
 		    rtree.Insert(individual->min,individual->max,individual);
@@ -515,16 +480,16 @@ void Filler::treat_region(GRegion* gr){
 		  }
 	    }
 	  }
-		
+
 	  if(!ok2) delete individual;
 	}
-	
+
 	if(count%100==0){
 	  printf("%d\n",count);
 	}
 	count++;
   }
-  
+
   //file << "};\n";
 
   int option = CTX::instance()->mesh.algo3d;
@@ -538,7 +503,7 @@ void Filler::treat_region(GRegion* gr){
   MeshDelaunayVolume(regions);
 
   CTX::instance()->mesh.algo3d = option;
-	
+
   for(i=0;i<garbage.size();i++) delete garbage[i];
   for(i=0;i<new_vertices.size();i++) delete new_vertices[i];
   new_vertices.clear();
@@ -546,10 +511,10 @@ void Filler::treat_region(GRegion* gr){
   rtree.RemoveAll();
   Size_field::clear();
   Frame_field::clear();
-#endif
 }
 
-Metric Filler::get_metric(double x,double y,double z){
+Metric Filler::get_metric(double x,double y,double z)
+{
   Metric m;
   STensor3 m2;
   if(CTX::instance()->mesh.smoothCrossField){
@@ -573,17 +538,18 @@ Metric Filler::get_metric(double x,double y,double z){
   return m;
 }
 
-Metric Filler::get_metric(double x,double y,double z,GEntity* ge){
+Metric Filler::get_metric(double x,double y,double z,GEntity* ge)
+{
   Metric m;
   SMetric3 temp;
   SVector3 v1,v2,v3;
   Field* field;
   FieldManager* manager;
-	
+
   v1 = SVector3(1.0,0.0,0.0);
   v2 = SVector3(0.0,1.0,0.0);
   v3 = SVector3(0.0,0.0,1.0);
-	
+
   manager = ge->model()->getFields();
   if(manager->getBackgroundField()>0){
     field = manager->get(manager->getBackgroundField());
@@ -591,27 +557,29 @@ Metric Filler::get_metric(double x,double y,double z,GEntity* ge){
       (*field)(x,y,z,temp,ge);
     }
   }
-	
+
   m.set_m11(v1.x());
   m.set_m21(v1.y());
   m.set_m31(v1.z());
-	
+
   m.set_m12(v2.x());
   m.set_m22(v2.y());
   m.set_m32(v2.z());
-	
+
   m.set_m13(v3.x());
   m.set_m23(v3.y());
   m.set_m33(v3.z());
-	
+
   return m;
 }
 
 double Filler::get_size(double x,double y,double z){
+
   return Size_field::search(x,y,z);
 }
 
-double Filler::get_size(double x,double y,double z,GEntity* ge){
+double Filler::get_size(double x,double y,double z,GEntity* ge)
+{
   double h;
   Field* field;
   FieldManager* manager;
@@ -628,14 +596,16 @@ double Filler::get_size(double x,double y,double z,GEntity* ge){
   return h;
 }
 
-bool Filler::inside_domain(MElementOctree* octree,double x,double y,double z){
+bool Filler::inside_domain(MElementOctree* octree,double x,double y,double z)
+{
   MElement* element;
   element = (MElement*)octree->find(x,y,z,3,true);
   if(element!=NULL) return 1;
   else return 0;
 }
 
-bool Filler::far_from_boundary(MElementOctree* octree,Node* node){
+bool Filler::far_from_boundary(MElementOctree* octree,Node* node)
+{
   double x,y,z;
   double h;
   SPoint3 point;
@@ -658,7 +628,8 @@ bool Filler::far_from_boundary(MElementOctree* octree,Node* node){
   else return 0;
 }
 
-void Filler::compute_parameters(Node* node,GEntity* ge){
+void Filler::compute_parameters(Node* node,GEntity* ge)
+{
   double x,y,z;
   double h;
   Metric m;
@@ -681,7 +652,9 @@ void Filler::compute_parameters(Node* node,GEntity* ge){
   node->max[2] = z + sqrt3*h;
 }
 
-void Filler::create_spawns(GEntity* ge,MElementOctree* octree,Node* node,std::vector<Node*>& spawns){
+void Filler::create_spawns(GEntity* ge,MElementOctree* octree,
+                           Node* node,std::vector<Node*>& spawns)
+{
   double x,y,z;
   double x1,y1,z1;
   double x2,y2,z2;
@@ -739,7 +712,9 @@ void Filler::create_spawns(GEntity* ge,MElementOctree* octree,Node* node,std::ve
   *spawns[5] = Node(SPoint3(x6,y6,z6));
 }
 
-double Filler::improvement(GEntity* ge,MElementOctree* octree,SPoint3 point,double h1,SVector3 direction){
+double Filler::improvement(GEntity* ge,MElementOctree* octree,
+                           SPoint3 point,double h1,SVector3 direction)
+{
   double x,y,z;
   double average;
   double h2;
@@ -748,7 +723,7 @@ double Filler::improvement(GEntity* ge,MElementOctree* octree,SPoint3 point,doub
   x = point.x() + h1*direction.x();
   y = point.y() + h1*direction.y();
   z = point.z() + h1*direction.z();
-  
+
   if(inside_domain(octree,x,y,z)){
     h2 = get_size(x,y,z);
   }
@@ -756,14 +731,14 @@ double Filler::improvement(GEntity* ge,MElementOctree* octree,SPoint3 point,doub
 
   coeffA = 1.0;
   coeffB = 0.16;
-  
+
   if(h2>h1){
     average = coeffA*h1 + (1.0-coeffA)*h2;
   }
   else{
     average = coeffB*h1 + (1.0-coeffB)*h2;
   }
-	
+
   return average;
 }
 
@@ -771,11 +746,11 @@ int Filler::code(int tag){
   int limit;
   std::string s;
   std::stringstream s2;
-  
+
   limit = -1;
   s2 << tag;
   s = s2.str();
-	
+
   if(s.length()>=5){
     if(s.at(0)=='1' && s.at(1)=='1' && s.at(2)=='1' && s.at(3)=='1' && s.at(4)=='1'){
 	  limit = 0;
@@ -784,26 +759,30 @@ int Filler::code(int tag){
 	  limit = 1;
 	}
   }
-  
+
   return limit;
 }
 
-int Filler::get_nbr_new_vertices(){
+int Filler::get_nbr_new_vertices()
+{
   return new_vertices.size();
 }
 
-MVertex* Filler::get_new_vertex(int i){
+MVertex* Filler::get_new_vertex(int i)
+{
   return new_vertices[i];
 }
 
-void Filler::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
+void Filler::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file)
+{
   file << "SL ("
   << p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
   << p2.x() << ", " << p2.y() << ", " << p2.z() << ")"
   << "{10, 20};\n";
 }
 
-void Filler::print_node(Node* node,std::ofstream& file){
+void Filler::print_node(Node* node,std::ofstream& file)
+{
   double x,y,z;
   double x1,y1,z1;
   double x2,y2,z2;
@@ -857,3 +836,4 @@ void Filler::print_node(Node* node,std::ofstream& file){
 /*********static declarations*********/
 
 std::vector<MVertex*> Filler::new_vertices;
+
diff --git a/Mesh/simple3D.h b/Mesh/simple3D.h
index 9dd9e42..a176ae7 100644
--- a/Mesh/simple3D.h
+++ b/Mesh/simple3D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,6 +6,11 @@
 // Contributor(s):
 //   Tristan Carrier François Henrotte
 
+
+#ifndef _SIMPLE3D_H_
+#define _SIMPLE3D_H_
+
+
 #include "SVector3.h"
 #include <list>
 #include "GRegion.h"
@@ -37,3 +42,6 @@ class Filler{
   static int get_nbr_new_vertices();
   static MVertex* get_new_vertex(int);
 };
+
+#endif
+
diff --git a/Mesh/surfaceFiller.cpp b/Mesh/surfaceFiller.cpp
index a6d8d81..e205176 100644
--- a/Mesh/surfaceFiller.cpp
+++ b/Mesh/surfaceFiller.cpp
@@ -6,6 +6,7 @@
 // Contributor(s):
 //   Tristan Carrier Baudoin
 
+
 #include "GmshConfig.h"
 #include "surfaceFiller.h"
 #include "Field.h"
@@ -17,9 +18,7 @@
 /// Here, we aim at producing a set of points that
 /// enables to generate a nice quad mesh
 
-#if defined(HAVE_RTREE)
 #include "rtree.h"
-#endif
 
 #include "MVertex.h"
 #include "MElement.h"
@@ -27,11 +26,13 @@
 #include "BackgroundMesh.h"
 #include "intersectCurveSurface.h"
 
+#include "pointInsertionRTreeTools.h"
+
 using namespace std;
 
-static const double FACTOR = .71;
-static const int NUMDIR = 3;
-static const double DIRS [NUMDIR] = {0.0, M_PI/20.,-M_PI/20.};
+//static const double FACTOR = .71;
+//static const int NUMDIR = 3;
+//static const double DIRS [NUMDIR] = {0.0, M_PI/20.,-M_PI/20.};
 //PE MODIF
 //static const int NUMDIR = 1;
 //static const double DIRS [NUMDIR] = {0.0};
@@ -45,154 +46,153 @@ static const double DIRS [NUMDIR] = {0.0, M_PI/20.,-M_PI/20.};
 /// in a r-tree structure for generating points with the
 /// right spacing in the tangent plane
 
-#if defined(HAVE_RTREE)
-
-struct surfacePointWithExclusionRegion {
-  MVertex *_v;
-  SPoint2 _center;
-  SPoint2 _p[4][NUMDIR];
-  SPoint2 _q[4];
-  SMetric3 _meshMetric;
-  double _distanceSummed;
-  /*
-         + p3
-    p4   |
-    +----c-----+ p2
-         |
-         + p1
-
-*/
-
-  surfacePointWithExclusionRegion (MVertex *v, SPoint2 p[4][NUMDIR], SPoint2 &_mp, SMetric3 & meshMetric, surfacePointWithExclusionRegion *father = 0){
-    _v = v;
-    _meshMetric = meshMetric;
-    _center = _mp;
-    for (int i=0;i<4;i++)_q[i] = _center + (p[i][0]+p[(i+1)%4][0]-_center*2)*FACTOR;
-    for (int i=0;i<4;i++)for (int j=0;j<NUMDIR;j++)_p[i][j] = p[i][j];
-
-    if (!father){
-      fullMatrix<double> V(3,3);
-      fullVector<double> S(3);
-      meshMetric.eig(V,S);
-      double l = std::max(std::max(S(0),S(1)),S(2));
-      _distanceSummed = sqrt(1/(l*l));
-    }
-    else {
-      _distanceSummed = father->_distanceSummed + distance (father->_v,_v);
-    }
-  }
-  bool inExclusionZone (const SPoint2 &p){
-    double mat[2][2];
-    double b[2] , uv[2];
-    mat[0][0]= _q[1].x()-_q[0].x();
-    mat[0][1]= _q[2].x()-_q[0].x();
-    mat[1][0]= _q[1].y()-_q[0].y();
-    mat[1][1]= _q[2].y()-_q[0].y();
-    b[0] = p.x() - _q[0].x();
-    b[1] = p.y() - _q[0].y();
-    sys2x2(mat, b, uv);
-    //    printf("inversion 1 : %g %g \n",uv[0],uv[1]);
-    if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
-    mat[0][0]= _q[3].x()-_q[2].x();
-    mat[0][1]= _q[0].x()-_q[2].x();
-    mat[1][0]= _q[3].y()-_q[2].y();
-    mat[1][1]= _q[0].y()-_q[2].y();
-    b[0] = p.x() - _q[2].x();
-    b[1] = p.y() - _q[2].y();
-    sys2x2(mat, b, uv);
-    //    printf("inversion 2 : %g %g \n",uv[0],uv[1]);
-    if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
-    return false;
-  }
-  void minmax  (double _min[2], double _max[2]) const{
-    _min[0] = std::min(std::min(std::min(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
-    _min[1] = std::min(std::min(std::min(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
-    _max[0] = std::max(std::max(std::max(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
-    _max[1] = std::max(std::max(std::max(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
-  }
-  void print (FILE *f, int i){
-    fprintf(f,"SP(%g,%g,%g){%d};\n",_center.x(),_center.y(),0.0,i);
-    fprintf(f,"SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d,%d};\n",
-	    _q[0].x(),_q[0].y(),0.0,
-	    _q[1].x(),_q[1].y(),0.0,
-	    _q[2].x(),_q[2].y(),0.0,
-	    _q[3].x(),_q[3].y(),0.0,i,i,i,i);
-
-  }
-};
-
-struct my_wrapper {
-  bool _tooclose;
-  SPoint2 _p;
-  my_wrapper (SPoint2 sp) : _tooclose (false), _p(sp) {}
-};
-
-struct smoothness_point_pair{
-  double rank;
-  surfacePointWithExclusionRegion* ptr;
-};
 
-class compareSurfacePointWithExclusionRegionPtr_Smoothness
-{
-  public:
-    inline bool operator () (const smoothness_point_pair &a, const smoothness_point_pair &b)  const
-    {
-      if (a.rank == b.rank){
-        if(a.ptr->_distanceSummed > b.ptr->_distanceSummed) return false;
-        if(a.ptr->_distanceSummed < b.ptr->_distanceSummed) return true;
-        return a.ptr<b.ptr;
-      }
-      // else
-      return (a.rank < b.rank);
-    }
-};
-
-
-class compareSurfacePointWithExclusionRegionPtr
-{
- public:
-  inline bool operator () (const surfacePointWithExclusionRegion *a, const surfacePointWithExclusionRegion *b)  const
-  {
-    if(a->_distanceSummed > b->_distanceSummed) return false;
-    if(a->_distanceSummed < b->_distanceSummed) return true;
-    return a<b;
-  }
-};
-
-
-
-
-bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point){
-  my_wrapper *w = static_cast<my_wrapper*>(point);
-
-  if (neighbour->inExclusionZone(w->_p)){
-    w->_tooclose = true;
-    return false;
-  }
-
-  return true;
-}
-
-bool inExclusionZone (SPoint2 &p,
-		      RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree,
-		      std::vector<surfacePointWithExclusionRegion*> & all ){
-  // should assert that the point is inside the domain
-  if (!backgroundMesh::current()->inDomain(p.x(),p.y(),0)) return true;
-
-  my_wrapper w (p);
-  double _min[2] = {p.x()-1.e-1, p.y()-1.e-1},_max[2] = {p.x()+1.e-1,p.y()+1.e-1};
-  rtree.Search(_min,_max,rtree_callback,&w);
-
-  return w._tooclose;
-
-  for (unsigned int i=0;i<all.size();++i){
-    if (all[i]->inExclusionZone(p)){
-      //      printf("%g %g is in exclusion zone of %g %g\n",p.x(),p.y(),all[i]._center.x(),all[i]._center.y());
-      return true;
-    }
-  }
-  return false;
-}
+//struct surfacePointWithExclusionRegion {
+//  MVertex *_v;
+//  SPoint2 _center;
+//  SPoint2 _p[4][NUMDIR];
+//  SPoint2 _q[4];
+//  SMetric3 _meshMetric;
+//  double _distanceSummed;
+//  /*
+//         + p3
+//    p4   |
+//    +----c-----+ p2
+//         |
+//         + p1
+//
+//*/
+//
+//  surfacePointWithExclusionRegion (MVertex *v, SPoint2 p[4][NUMDIR], SPoint2 &_mp, SMetric3 & meshMetric, surfacePointWithExclusionRegion *father = 0){
+//    _v = v;
+//    _meshMetric = meshMetric;
+//    _center = _mp;
+//    for (int i=0;i<4;i++)_q[i] = _center + (p[i][0]+p[(i+1)%4][0]-_center*2)*FACTOR;
+//    for (int i=0;i<4;i++)for (int j=0;j<NUMDIR;j++)_p[i][j] = p[i][j];
+//
+//    if (!father){
+//      fullMatrix<double> V(3,3);
+//      fullVector<double> S(3);
+//      meshMetric.eig(V,S);
+//      double l = std::max(std::max(S(0),S(1)),S(2));
+//      _distanceSummed = sqrt(1/(l*l));
+//    }
+//    else {
+//      _distanceSummed = father->_distanceSummed + distance (father->_v,_v);
+//    }
+//  }
+//  bool inExclusionZone (const SPoint2 &p){
+//    double mat[2][2];
+//    double b[2] , uv[2];
+//    mat[0][0]= _q[1].x()-_q[0].x();
+//    mat[0][1]= _q[2].x()-_q[0].x();
+//    mat[1][0]= _q[1].y()-_q[0].y();
+//    mat[1][1]= _q[2].y()-_q[0].y();
+//    b[0] = p.x() - _q[0].x();
+//    b[1] = p.y() - _q[0].y();
+//    sys2x2(mat, b, uv);
+//    //    printf("inversion 1 : %g %g \n",uv[0],uv[1]);
+//    if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
+//    mat[0][0]= _q[3].x()-_q[2].x();
+//    mat[0][1]= _q[0].x()-_q[2].x();
+//    mat[1][0]= _q[3].y()-_q[2].y();
+//    mat[1][1]= _q[0].y()-_q[2].y();
+//    b[0] = p.x() - _q[2].x();
+//    b[1] = p.y() - _q[2].y();
+//    sys2x2(mat, b, uv);
+//    //    printf("inversion 2 : %g %g \n",uv[0],uv[1]);
+//    if (uv[0] >= 0 && uv[1] >= 0 && 1.-uv[0] - uv[1] >= 0)return true;
+//    return false;
+//  }
+//  void minmax  (double _min[2], double _max[2]) const{
+//    _min[0] = std::min(std::min(std::min(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
+//    _min[1] = std::min(std::min(std::min(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
+//    _max[0] = std::max(std::max(std::max(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x());
+//    _max[1] = std::max(std::max(std::max(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y());
+//  }
+//  void print (FILE *f, int i){
+//    fprintf(f,"SP(%g,%g,%g){%d};\n",_center.x(),_center.y(),0.0,i);
+//    fprintf(f,"SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d,%d};\n",
+//	    _q[0].x(),_q[0].y(),0.0,
+//	    _q[1].x(),_q[1].y(),0.0,
+//	    _q[2].x(),_q[2].y(),0.0,
+//	    _q[3].x(),_q[3].y(),0.0,i,i,i,i);
+//
+//  }
+//};
+//
+//struct my_wrapper {
+//  bool _tooclose;
+//  SPoint2 _p;
+//  my_wrapper (SPoint2 sp) : _tooclose (false), _p(sp) {}
+//};
+//
+//struct smoothness_point_pair{
+//  double rank;
+//  surfacePointWithExclusionRegion* ptr;
+//};
+//
+//class compareSurfacePointWithExclusionRegionPtr_Smoothness
+//{
+//  public:
+//    inline bool operator () (const smoothness_point_pair &a, const smoothness_point_pair &b)  const
+//    {
+//      if (a.rank == b.rank){
+//        if(a.ptr->_distanceSummed > b.ptr->_distanceSummed) return false;
+//        if(a.ptr->_distanceSummed < b.ptr->_distanceSummed) return true;
+//        return a.ptr<b.ptr;
+//      }
+//      // else
+//      return (a.rank < b.rank);
+//    }
+//};
+//
+//
+//class compareSurfacePointWithExclusionRegionPtr
+//{
+// public:
+//  inline bool operator () (const surfacePointWithExclusionRegion *a, const surfacePointWithExclusionRegion *b)  const
+//  {
+//    if(a->_distanceSummed > b->_distanceSummed) return false;
+//    if(a->_distanceSummed < b->_distanceSummed) return true;
+//    return a<b;
+//  }
+//};
+//
+//
+//
+//
+//bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point){
+//  my_wrapper *w = static_cast<my_wrapper*>(point);
+//
+//  if (neighbour->inExclusionZone(w->_p)){
+//    w->_tooclose = true;
+//    return false;
+//  }
+//
+//  return true;
+//}
+//
+//bool inExclusionZone (SPoint2 &p,
+//		      RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree,
+//		      std::vector<surfacePointWithExclusionRegion*> & all ){
+//  // should assert that the point is inside the domain
+//  if (!backgroundMesh::current()->inDomain(p.x(),p.y(),0)) return true;
+//
+//  my_wrapper w (p);
+//  double _min[2] = {p.x()-1.e-1, p.y()-1.e-1},_max[2] = {p.x()+1.e-1,p.y()+1.e-1};
+//  rtree.Search(_min,_max,rtree_callback,&w);
+//
+//  return w._tooclose;
+//
+//  for (unsigned int i=0;i<all.size();++i){
+//    if (all[i]->inExclusionZone(p)){
+//      //      printf("%g %g is in exclusion zone of %g %g\n",p.x(),p.y(),all[i]._center.x(),all[i]._center.y());
+//      return true;
+//    }
+//  }
+//  return false;
+//}
 
 
 
@@ -373,7 +373,7 @@ bool compute4neighbors (GFace *gf,   // the surface
       //      printf("L = %12.5E D = %12.5E ERR = %12.5E\n",L,D,100*fabs(D-L)/(D+L));
     }
 
-    if (1 && goNonLinear){//---------------------------------------------------//
+    if (1 && goNonLinear){
       surfaceFunctorGFace ss (gf);                                        //
       SVector3 dirs[4] = {t1*(-1.0),t2*(-1.0),t1*(1.0),t2*(1.0)};                     //
       for (int i=0;i<4;i++){                                              //
@@ -418,7 +418,6 @@ bool compute4neighbors (GFace *gf,   // the surface
   return true;
 }
 
-// ---------------------------------------------------------------------------------------------
 
 // recover element around vertex v and interpolate smoothness on this element...
 double get_smoothness(MVertex *v, GFace *gf, const map<MVertex*,double> &vertices2smoothness){
@@ -470,7 +469,6 @@ double get_smoothness(MVertex *v, GFace *gf, const map<MVertex*,double> &vertice
   return res;
 }
 
-// ---------------------------------------------------------------------------------------------
 
 void print_nodal_info_int(string filename, map<MVertex*, int> &mapp){
   ofstream out(filename.c_str());
@@ -485,7 +483,6 @@ void print_nodal_info_int(string filename, map<MVertex*, int> &mapp){
   out.close();
 }
 
-// ---------------------------------------------------------------------------------------------
 
 void print_nodal_info_double(string filename, map<MVertex*, double> &mapp){
   ofstream out(filename.c_str());
@@ -500,7 +497,6 @@ void print_nodal_info_double(string filename, map<MVertex*, double> &mapp){
   out.close();
 }
 
-// ---------------------------------------------------------------------------------------------
 
 void export_point(surfacePointWithExclusionRegion *sp, int DIR, FILE *crossf, GFace *gf){
   // get the unit normal at that point
@@ -550,7 +546,6 @@ void export_point(surfacePointWithExclusionRegion *sp, int DIR, FILE *crossf, GF
   fprintf(crossf,"VP(%g,%g,%g) {%g,%g,%g};\n",sp->_v->x(),sp->_v->y(),sp->_v->z(),-t2.x()*size_2,-t2.y()*size_2,-t2.z()*size_2);
 }
 
-// ---------------------------------------------------------------------------------------------
 
 bool get_local_sizes_and_directions(const MVertex *v_center, const SPoint2 &midpoint, const int DIR, GFace* gf, double (&covar1)[2], double (&covar2)[2], double &size_param_1, double &size_param_2, double &L, SVector3 &t1, SVector3 &t2, SVector3 &n, FILE *crossf=NULL){
 //bool get_RK_stuff(const MVertex *v_center, const SPoint2 &midpoint, const int DIR, GFace* gf, double (&covar1)[2], double (&covar2)[2], double &size_param_1, double &size_param_2, double &L, SVector3 &t1, SVector3 &t2, SVector3 &n, FILE *crossf, const SVector3 &previous_t1, const SVector3 &previous_t2, bool use_previous_basis=false, bool export_cross=true){
@@ -687,14 +682,11 @@ bool get_local_sizes_and_directions(const MVertex *v_center, const SPoint2 &midp
   return true;
 }
 
-#endif
 
-// ---------------------------------------------------------------------------------------------
 
 // using fifo based on smoothness criteria
 void packingOfParallelogramsSmoothness(GFace* gf,  std::vector<MVertex*> &packed, std::vector<SMetric3> &metrics){
   cout << endl << "------------------------------------------" << endl << "   PACKINGOFPARALLELOGRAMS: NEW ALGO BASED ON SMOOTHNESS" << endl << "------------------------------------------" << endl;
-#if defined(HAVE_RTREE)
   const bool goNonLinear = true;
 
   const bool debug = false;
@@ -809,11 +801,11 @@ void packingOfParallelogramsSmoothness(GFace* gf,  std::vector<MVertex*> &packed
   std::set<MVertex*>::iterator it =  bnd_vertices.begin() ;
 
   char NAME[345]; sprintf(NAME,"crossReal%d.pos",gf->tag());
-  FILE *crossf=NULL;
+  FILE *crossf = NULL;
   if (debug){
     crossf = Fopen (NAME,"w");
   }
-  if (crossf)fprintf(crossf,"View \"\"{\n");
+  if (crossf) fprintf(crossf,"View \"\"{\n");
   for (; it !=  bnd_vertices.end() ; ++it){
     SPoint2 midpoint;
     //compute4neighbors_RK2 (gf, *it, midpoint, goNonLinear, newp, metricField,crossf);
@@ -895,9 +887,9 @@ void packingOfParallelogramsSmoothness(GFace* gf,  std::vector<MVertex*> &packed
   // surface mesh
   char ccc[256]; sprintf(ccc,"points%d.pos",gf->tag());
   FILE *f = Fopen(ccc,"w");
-  fprintf(f,"View \"\"{\n");
+  if(f) fprintf(f, "View \"\"{\n");
   for (unsigned int i=0;i<vertices.size();i++){
-    vertices[i]->print(f,i);
+    if(f) vertices[i]->print(f,i);
     if(vertices[i]->_v->onWhat() == gf) {
       packed.push_back(vertices[i]->_v);
       metrics.push_back(vertices[i]->_meshMetric);
@@ -906,13 +898,13 @@ void packingOfParallelogramsSmoothness(GFace* gf,  std::vector<MVertex*> &packed
     }
     delete  vertices[i];
   }
-  fprintf(f,"};");
-  fclose(f);
-#endif
+  if(f){
+    fprintf(f,"};");
+    fclose(f);
+  }
 }
 
 
-// ---------------------------------------------------------------------------------------------
 
 
 // fills a surface with points in order to build a nice
@@ -922,12 +914,18 @@ void packingOfParallelograms(GFace* gf,  std::vector<MVertex*> &packed, std::vec
 //  packingOfParallelogramsSmoothness(gf,packed,metrics);
 //  return;
   // END PE MODIF
-#if defined(HAVE_RTREE)
 
   const bool goNonLinear = true;
 
   //  FILE *f = Fopen ("parallelograms.pos","w");
 
+
+  // test test test
+  stringstream ssa;
+  ssa << "oldbgm_angles_" << gf->tag() << ".pos";
+  backgroundMesh::current()->print(ssa.str(),gf,1);
+  // test test test
+
   // get all the boundary vertices
   std::set<MVertex*> bnd_vertices;
   for(unsigned int i=0;i<gf->getNumMeshElements();i++){
@@ -950,7 +948,7 @@ void packingOfParallelograms(GFace* gf,  std::vector<MVertex*> &packed, std::vec
 
   char NAME[345]; sprintf(NAME,"crossReal%d.pos",gf->tag());
   FILE *crossf = Fopen (NAME,"w");
-  if (crossf)fprintf(crossf,"View \"\"{\n");
+  if (crossf) fprintf(crossf,"View \"\"{\n");
   for (; it !=  bnd_vertices.end() ; ++it){
     SPoint2 midpoint;
     compute4neighbors (gf, *it, midpoint, goNonLinear, newp, metricField,crossf);
@@ -1013,10 +1011,10 @@ void packingOfParallelograms(GFace* gf,  std::vector<MVertex*> &packed, std::vec
     // surface mesh
     char ccc[256]; sprintf(ccc,"points%d.pos",gf->tag());
     FILE *f = Fopen(ccc,"w");
-    fprintf(f,"View \"\"{\n");
+    if(f) fprintf(f,"View \"\"{\n");
     for (unsigned int i=0;i<vertices.size();i++){
       //    if(vertices[i]->_v->onWhat() != gf)
-      vertices[i]->print(f,i);
+      if(f) vertices[i]->print(f,i);
       if(vertices[i]->_v->onWhat() == gf) {
         packed.push_back(vertices[i]->_v);
         metrics.push_back(vertices[i]->_meshMetric);
@@ -1030,9 +1028,11 @@ void packingOfParallelograms(GFace* gf,  std::vector<MVertex*> &packed, std::vec
       }
       delete  vertices[i];
     }
-    fprintf(f,"};");
-    fclose(f);
+    if(f){
+      fprintf(f,"};");
+      fclose(f);
+    }
     //  printf("packed.size = %d\n",packed.size());
     //  delete rtree;
-#endif
 }
+
diff --git a/Mesh/surfaceFiller.h b/Mesh/surfaceFiller.h
index 7c1c9c5..dabb870 100644
--- a/Mesh/surfaceFiller.h
+++ b/Mesh/surfaceFiller.h
@@ -1,12 +1,21 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 //
 
-#include "STensor3.h"
+#ifndef _SURFACEFILLER_H_
+#define _SURFACEFILLER_H_
+
 #include <vector>
+#include "STensor3.h"
+
 class GFace;
 class MVertex;
-void packingOfParallelogramsSmoothness(GFace* gf, std::vector<MVertex*> &packed, std::vector<SMetric3> &metrics );
-void packingOfParallelograms(GFace* gf, std::vector<MVertex*> &packed, std::vector<SMetric3> &metrics );
+
+void packingOfParallelogramsSmoothness(GFace* gf, std::vector<MVertex*> &packed,
+                                       std::vector<SMetric3> &metrics);
+void packingOfParallelograms(GFace* gf, std::vector<MVertex*> &packed,
+                             std::vector<SMetric3> &metrics);
+
+#endif
diff --git a/Mesh/yamakawa.cpp b/Mesh/yamakawa.cpp
index 0616f23..fcef966 100644
--- a/Mesh/yamakawa.cpp
+++ b/Mesh/yamakawa.cpp
@@ -1,28 +1,846 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 //
-// Contributor(s):
-//   Tristan Carrier
+// Contributed by Tristan Carrier and Paul-Emile Bernard
 
+#include <numeric>
 #include <iterator>
+#include <fstream>
+#include <sstream>
+#include <math.h>
 #include "yamakawa.h"
 #include "GModel.h"
+#include "OS.h"
 #include "MVertex.h"
 #include "MElement.h"
-#include <fstream>
 #include "MHexahedron.h"
 #include "MQuadrangle.h"
+#include "MTriangle.h"
 #include "MPyramid.h"
 #include "MPrism.h"
 #include "MTetrahedron.h"
+#include "MHexahedron.h"
+
+void export_gregion_mesh(GRegion *gr, string filename)
+{
+  // FIXME: use MElement::writeMSH
+
+  // create set of all tets
+  map<MVertex*,int> vertices;
+  int counterv=1;
+
+  for (vector<MTetrahedron*>::iterator it = gr->tetrahedra.begin();
+       it!=gr->tetrahedra.end(); it++){
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      vertices.insert(make_pair((*it)->getVertex(i),counterv));
+      counterv++;
+    }
+  }
+  for (vector<MHexahedron*>::iterator it = gr->hexahedra.begin();
+       it!=gr->hexahedra.end(); it++){
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      vertices.insert(make_pair((*it)->getVertex(i),counterv));
+      counterv++;
+    }
+  }
+  for (vector<MPrism*>::iterator it = gr->prisms.begin();
+       it!=gr->prisms.end(); it++){
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      vertices.insert(make_pair((*it)->getVertex(i),counterv));
+      counterv++;
+    }
+  }
+  for (vector<MPyramid*>::iterator it = gr->pyramids.begin();
+       it!=gr->pyramids.end(); it++){
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      vertices.insert(make_pair((*it)->getVertex(i),counterv));
+      counterv++;
+    }
+  }
+
+  // export mesh
+  ofstream out(filename.c_str());
+  out << "$MeshFormat" << endl << "2.2 0 8" << endl << "$EndMeshFormat"
+      << endl << "$Nodes" << endl << vertices.size() << endl;
+  // write vertices
+  for (map<MVertex*,int>::iterator it = vertices.begin();
+       it!=vertices.end(); it++)
+    out << it->second << " " << it->first->x() << " " << it->first->y()
+        << " " << it->first->z() << endl;
+  out << "$EndNodes" << endl << "$Elements" << endl
+      << (gr->tetrahedra.size() + gr->hexahedra.size() +
+          gr->prisms.size() + gr->pyramids.size()) << endl;
+
+  // write elems
+  int counter = 1;
+  for (vector<MTetrahedron*>::iterator it = gr->tetrahedra.begin();
+       it!=gr->tetrahedra.end();it++){
+    out << counter << " 4 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+    }
+    out << endl;
+    counter++;
+  }
+  for (vector<MHexahedron*>::iterator it = gr->hexahedra.begin();
+       it!=gr->hexahedra.end();it++){
+    out << counter << " 5 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+    }
+    out << endl;
+    counter++;
+  }
+  for (vector<MPrism*>::iterator it = gr->prisms.begin();
+       it!=gr->prisms.end();it++){
+    out << counter << " 6 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+    }
+    out << endl;
+    counter++;
+  }
+  for (vector<MPyramid*>::iterator it = gr->pyramids.begin();
+       it!=gr->pyramids.end();it++){
+    out << counter << " 7 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+    }
+    out << endl;
+    counter++;
+  }
+
+  out << "$EndElements" << endl;
+  out.close();
+}
+
+template <class T>
+void export_the_clique_graphviz_format(cliques_compatibility_graph<T> &cl,
+                                       int clique_number,string filename)
+{
+  ofstream out(filename.c_str());
+  out << "Graph G {" << endl;
+  typename multimap<int,set<T> >::reverse_iterator it_all = cl.allQ.rbegin();
+  //  multimap<int,set<T> >::reverse_iterator it_allen = cl.allQ.rend();
+  for (int i=0;i<clique_number;i++){
+    it_all++;
+  }
+  //  int clique_size = it_all->second.size();
+  typename set<T>::iterator ithex = it_all->second.begin();
+  typename set<T>::iterator ithexen = it_all->second.end();
+
+  //typedef tr1::unordered_multimap<hash_key, T> graph_data;
+  //typedef tr1::unordered_multimap<hash_key, pair<T, graph_data > > graph;
+
+  int counter=1;
+  map<T,int> visited_hex;
+  multimap<int,int> done;
+
+  // export all hex
+  typename cliques_compatibility_graph<T>::graph::const_iterator itgraph = cl.begin_graph();
+  typename cliques_compatibility_graph<T>::graph_data::const_iterator itgraphdata;
+
+  for (;itgraph!=cl.end_graph();itgraph++){
+
+    T firsthex = itgraph->second.first;
+    //    if (!post_check_validation(firsthex)) continue;
+
+    typename map<T,int>::iterator itfind = visited_hex.find(firsthex);
+    int num1=0;
+    if (itfind==visited_hex.end()){
+      num1=counter;
+      visited_hex[firsthex] = counter++;
+    }
+    else
+      num1 = itfind->second;
+
+    itgraphdata = itgraph->second.second.begin();
+    for(;itgraphdata!=itgraph->second.second.end();itgraphdata++){
+      T secondhex = itgraphdata->second;
+      //      if (!post_check_validation(secondhex)) continue;
+      itfind = visited_hex.find(secondhex);
+      int num2=0;
+      if (itfind==visited_hex.end()){
+        num2=counter;
+        visited_hex[secondhex] = counter++;
+      }
+      else
+        num2 = itfind->second;
+
+      // search if num1 - num2 has already been written...
+      bool found=false;
+      pair<multimap<int,int>::iterator, multimap<int,int>::iterator> range =
+        done.equal_range(num1);
+      for(multimap<int,int>::iterator it = range.first;it!=range.second;it++){
+        if (it->second==num2){
+          found=true;
+          break;
+        }
+      }
+
+      if (!found){
+        done.insert(make_pair(num1,num2));
+        done.insert(make_pair(num2,num1));
+        out << num1 << " -- " << num2 << " ;" << endl;
+      }
+
+    }
+
+
+  }
+  // export chosen hex with different color
+  for (;ithex!=ithexen;ithex++){ // brutal post-check: random pickup of hexahedra in clique
+    typename map<T,int>::iterator itfind = visited_hex.find(*ithex);
+    if (itfind==visited_hex.end()){
+      cout << "graph export: should not happen ! " << endl;
+      throw;
+      int num2=0;
+      num2=counter;
+      visited_hex[itfind->first] = counter++;
+      out << num2 << " [shape=circle, style=filled, fillcolor=red];" << endl;
+    }
+    else
+      out << itfind->second << " [shape=circle, style=filled, fillcolor=red];" << endl;
+  }
+
+  out << "}" << endl;
+  out.close();
+}
+
+template<class T>
+clique_stop_criteria<T>::clique_stop_criteria(map<T, std::set<MElement*> > &_m, int _i)
+  : hex_to_tet(_m),total_number_tet(_i)
+{
+};
+
+template<class T>
+clique_stop_criteria<T>::~clique_stop_criteria(){};
+
+template<class T>
+void clique_stop_criteria<T>::export_corresponding_mesh
+(const graph_data_no_hash &clique) const
+{
+  // NB: fct not often called...
+
+  // filename
+  string filename("best_clique_so_far.msh");
+  string filenametets("best_clique_so_far_remaining_tets.msh");
+
+  // create set of all tets
+  set<MElement*> tets;
+  set<MElement*> hexs;
+  map<MVertex*,int> vertices;
+  int counterv=1;
+  typename map<T, std::set<MElement*> >::const_iterator it = hex_to_tet.begin();
+  for (;it!=hex_to_tet.end();it++){
+    std::set<MElement*>::const_iterator itt = it->second.begin();
+    for (;itt!=it->second.end();itt++){
+      tets.insert(*itt);
+      for (int i=0;i<4;i++){
+        vertices.insert(make_pair((*itt)->getVertex(i),counterv));
+        counterv++;
+      }
+    }
+  }
+
+  // create MHexahedron, remove included tets from set "tets"
+  for (typename graph_data_no_hash::const_iterator it = clique.begin();
+       it!=clique.end(); it++){
+    typename map<T, std::set<MElement*> >::const_iterator itfind = hex_to_tet.find(*it);
+    if (itfind==hex_to_tet.end()){
+      cout << "clique_stop_criteria::void export_corresponding_mesh : not found !!!" << endl;
+      throw;
+    }
+    // remove tets
+    for (set<MElement*>::const_iterator ittet = itfind->second.begin();ittet!=itfind->second.end();ittet++){
+      tets.erase(*ittet);
+    }
+    // create MHexahedron
+    Hex* hex=*it;
+    MHexahedron *h = new MHexahedron(hex->getVertex(0),hex->getVertex(1),hex->getVertex(2),hex->getVertex(3),hex->getVertex(4),hex->getVertex(5),hex->getVertex(6),hex->getVertex(7));
+    for (int i=0;i<8;i++){
+      vertices.insert(make_pair(hex->getVertex(i),counterv));
+      counterv++;
+    }
+    hexs.insert(h);
+  }
+
+  // export mesh FIXME: why not use MElement::writeMSH
+  ofstream out(filename.c_str());
+  ofstream outtets(filenametets.c_str());
+  out << "$MeshFormat" << endl << "2.2 0 8" << endl << "$EndMeshFormat"
+      << endl << "$Nodes" << endl << vertices.size() << endl;
+  outtets << "$MeshFormat" << endl << "2.2 0 8" << endl << "$EndMeshFormat"
+          << endl << "$Nodes" << endl << vertices.size() << endl;
+  // write vertices
+  for (map<MVertex*,int>::iterator it = vertices.begin();it!=vertices.end();it++){
+    out << it->second << " " << it->first->x() << " "
+        << it->first->y() << " " << it->first->z() << endl;
+    outtets << it->second << " " << it->first->x() << " "
+            << it->first->y() << " " << it->first->z() << endl;
+  }
+  out << "$EndNodes" << endl << "$Elements" << endl << (hexs.size()+tets.size()) << endl;
+  outtets << "$EndNodes" << endl << "$Elements" << endl << (hexs.size()+tets.size()) << endl;
+  // write hexs
+  int counter=1;
+  int countertets=1;
+  for (set<MElement*>::iterator it = hexs.begin();it!=hexs.end();it++){
+    out << counter << " 5 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+    }
+    out << endl;
+    counter++;
+  }
+  // write tets
+  for (set<MElement*>::iterator it = tets.begin();it!=tets.end();it++){
+    out << counter << " 4 2 0 26";
+    outtets << counter << " 4 2 0 26";
+    for (int i=0;i<(*it)->getNumVertices();i++){
+      MVertex *v = (*it)->getVertex(i);
+      out << " " << vertices[v];
+      outtets << " " << vertices[v];
+    }
+    out << endl;
+    outtets << endl;
+    counter++;
+    countertets++;
+  }
+  out << "$EndElements" << endl;
+  out.close();
+  outtets << "$EndElements" << endl;
+  outtets.close();
+}
+
+
+template<class T>
+bool clique_stop_criteria<T>::stop(const graph_data_no_hash &clique)const
+{
+  unsigned int total = 0;
+
+  // need to detect slivers !!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  // it seems like slivers are presents in different potential hex.
+  // So, can be located by finding dupli!cates, instead of computing volumes...??????
+
+  set<MElement*> thetets;
+  //  set<MElement*> slivers;
+  for (typename graph_data_no_hash::const_iterator it = clique.begin();it!=clique.end();it++){
+    typename map<T, std::set<MElement*> >::const_iterator itfind = hex_to_tet.find(*it);
+    if (itfind==hex_to_tet.end()){
+      cout << "clique_stop_criteria::bool stop : not found !!!" << endl;
+      throw;
+    }
+    //    total += (itfind->second.size());
+    //    cout << "volumes=" << endl;
+    for (set<MElement*>::const_iterator ittet = itfind->second.begin();ittet!=itfind->second.end();ittet++){
+      //      set<MElement*>::iterator itfindtet = thetets.find(*ittet);
+      //      if (itfindtet!=thetets.end()){
+      //        cout << "Tet " << *ittet << " already done !!!" << endl;
+      //        slivers.insert(*ittet);
+      //      }
+      thetets.insert(*ittet);
+      //cout << (*ittet) << " : " << (*ittet)->getVolume()<< endl;;
+    }
+
+
+  }
+
+  // to be sure, adding volume criteria...
+  vector<double> volumes;
+  for (set<MElement*>::iterator it = thetets.begin();it!=thetets.end();it++){
+    volumes.push_back((*it)->getVolume());
+  }
+  int meanvolume = (std::accumulate(volumes.begin(), volumes.end(), 0))/volumes.size();
+  int nb_slivers = 0;
+  double threshold = 1.e-3*meanvolume;
+  for (set<MElement*>::iterator it = thetets.begin();it!=thetets.end();it++){
+    if ((*it)->getVolume() < threshold){
+      nb_slivers++;
+    }
+  }
+
+  total = thetets.size() - nb_slivers;
+
+  //  cout << "# tet = " << total << " on " << total_number_tet << endl;
+  //  cout << "#slivers = " << slivers.size() << endl;
+  if (total >= total_number_tet) return true;// the maximum clique is maximum !!! only hex !!!
+  return false;
+}
+
+
+template<class T>
+cliques_compatibility_graph<T>::cliques_compatibility_graph
+(graph &_g, const map<T, std::vector<double> > &_hex_ranks,
+ unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels,
+ clique_stop_criteria<T> *csc, ptrfunction_export fct)
+  : found_the_ultimate_max_clique(false), export_clique_graph(fct), debug(false),
+    max_nb_cliques(_max_nb_cliques), nb_hex_potentiels(_nb_hex_potentiels),
+    max_clique_size(0), position(0), total_nodes_number(0),
+    total_nb_of_cliques_searched(0), max_nb_of_stored_cliques(10),
+    criteria(csc), cancel_search(false), hex_ranks(_hex_ranks), G(_g)
+{
+};
+
+template<class T>
+cliques_compatibility_graph<T>::~cliques_compatibility_graph()
+{
+};
+
+template<class T>
+void cliques_compatibility_graph<T>::find_cliques()
+{
+  // init
+  graph_data s;
+  for (typename graph::iterator it = G.begin();it!=G.end();it++){
+    s.insert(make_pair(it->first, it->second.first));
+  }
+  find_cliques(s,0);
+
+  if (!cancel_search){
+    cout << total_nb_of_cliques_searched << " cliques have been found." << endl << flush;
+  }
+
+};
+
+template<class T>
+void cliques_compatibility_graph<T>::export_cliques()
+{
+  typename multimap<int, set<T> >::reverse_iterator itstore = allQ.rbegin();
+  for (;itstore!=allQ.rend();itstore++){
+    cout << "clique of size " << itstore->first << ": {";
+    for (typename set<T>::iterator it = itstore->second.begin(); it!=itstore->second.end();it++){
+      cout << *it << " ";
+    }
+    cout << "}" << endl;
+  }
+};
+
+
+template<class T>
+void cliques_compatibility_graph<T>::store_clique(int n)
+{
+  total_nb_of_cliques_searched++;
+
+  if(total_nb_of_cliques_searched%10000==0){
+    if (max_nb_cliques>0)
+      cout << "found " << total_nb_of_cliques_searched << " cliques on " << max_nb_cliques << endl << flush;
+    else
+      cout << "found " << total_nb_of_cliques_searched << " cliques " << endl << flush;
+  }
+
+  if (debug){
+    for (int i=0;i<n;i++) cout << " ";
+    cout << "entering store_clique." << endl;
+  }
+
+  //  // check if the current clique already exists
+  //  typename multimap<int, set<T> >::iterator itall = allQ.begin();
+  //  size_t currentsize = Q.size();
+  //  for (;itall!=allQ.end();itall++){
+  //    if (itall->first != currentsize) continue;
+  //    typename std::vector<T> common(currentsize);
+  //    typename std::vector<T>::iterator itfind = std::set_intersection (itall->second.begin(),itall->second.end(), Q.begin(),Q.end(), common.begin());
+  //    common.resize(itfind-common.begin());
+  //    if (common.size()==currentsize){
+  //      cout << "deux cliques les mêmes !!!" << endl;
+  //      cout << "première: " << endl;
+  //      typename std::set<T>::iterator itt = itall->second.begin();
+  //      for (;itt!=itall->second.end();itt++){
+  //        cout << "  " << *itt ;
+  //      }
+  //      cout << endl << "seconde (current): " << endl;
+  //      itt = Q.begin();
+  //      for (;itt!=Q.end();itt++){
+  //        cout << "  " << *itt ;
+  //      }
+  //      throw;
+  //    }
+  //
+  //  }
+  //  // END
+
+  bool found_best_clique_so_far=false;
+  if (Q.size()>max_clique_size){
+    max_clique_size=Q.size();
+    cout << "found a maximum clique of size " << Q.size() << ", exporting" << endl;
+    found_best_clique_so_far=true;
+  }
+
+  // this is done to possibly stop the algorithm after a given number of cliques found:
+  if ((max_nb_cliques!=0) && (total_nb_of_cliques_searched>=max_nb_cliques)){
+    cancel_search=true;
+    cout << max_nb_cliques << " cliques have been searched, quit searching." << endl;
+  }
+
+  // check the additional criteria
+  if (criteria->stop(Q)){
+    cancel_search = true;
+    cout << endl << " ************** criteria reached, domain is filled with hex !!! ***************" << endl << endl;
+    found_the_ultimate_max_clique=true;
+  }
+
+  const bool verbose=false;
+  if (verbose) cout << "MAX CLIQUE found of size " << Q.size() << " # total cliques searched:" << total_nb_of_cliques_searched << endl;
+
+  if (debug){
+    for (int i=0;i<n;i++) cout << " ";
+    cout << "MAX CLIQUE found of size " << Q.size() << ": ";
+  }
+
+  // storing the current clique... or not, depending of the number of cliques to store, to reduce memory footprint.
+  bool store_it = true;
+  bool delete_worst=false;
+  if ((max_nb_of_stored_cliques) && (allQ.size()>=max_nb_of_stored_cliques)){
+    // then, compare sizes...
+    int worst_clique_size = (allQ.begin())->first;
+    if ((int)Q.size() <= worst_clique_size){
+      store_it = false;// don't store if not good enough
+    }
+    else{
+      delete_worst=true;
+    }
+  }
+
+  if (!store_it) return;
+
+  // actually storing current clique
+  typename multimap<int, set<T> >::iterator itstore = allQ.insert(make_pair(Q.size(),set<T>()));
+  for (typename graph_data_no_hash::iterator it = Q.begin();it!=Q.end();it++){
+    itstore->second.insert(*it);
+    if (debug){
+      //for (int i=0;i<n;i++) cout << " ";
+      cout << *it << " ";
+    }
+  }
+
+  // finally, possibly delete worst clique, to reduce memory footprint
+  if (delete_worst) allQ.erase(allQ.begin());
+
+  if (debug){
+    cout << endl;
+  }
+
+
+  if (found_best_clique_so_far){
+    string filename("best_clique_so_far.dot");
+    export_clique_graph(const_cast<cliques_compatibility_graph<T>& >(*this),0,filename);
+    criteria->export_corresponding_mesh(Q);
+  }
+
+};
+
+
+template<class T>
+void cliques_compatibility_graph<T>::find_cliques(graph_data &s, int n)
+{
+  // possible end
+  if (s.size()==0){
+    store_clique(n);
+    return;
+  }
+  if (s.size()==1){
+    typename graph_data::iterator ittemp = s.begin();
+    T u = ittemp->second;
+    Q.insert(u);
+    if (debug){
+      for (int i=0;i<n;i++) cout << " ";
+      cout << "level " << n << ", inserting (finished) " << u << endl;
+    }
+    store_clique(n);
+    if (debug){
+      for (int i=0;i<n;i++) cout << " ";
+      cout << "erasing " << u << endl;
+    }
+    Q.erase(u);
+    if (debug){
+      for (int i=0;i<n;i++) cout << " ";
+      cout << "and BACK" << endl;
+    }
+    return;
+  }
+
+  // splitting set s into white and black nodes
+  graph_data white,black;
+  T u;
+  hash_key u_key;
+  choose_u(s,u,u_key);
+  split_set_BW(u,u_key,s,white,black);
+  if (debug){
+    for (int i=0;i<n;i++) cout << " ";
+    cout << "level " << n << " u=" << u << " white={";
+    for (typename graph_data::iterator it=white.begin();it!=white.end();it++){
+      //for (int i=0;i<n;i++) cout << " ";
+      cout << it->second << " ";
+    }
+    cout << "} black={";
+    for (typename graph_data::iterator it=black.begin();it!=black.end();it++){
+      //for (int i=0;i<n;i++) cout << " ";
+      cout << it->second << " ";
+    }
+    cout << "}" <<endl;
+  }
+
+
+  // recursive loop
+  while (white.size()){
+    //T u = (*(s.begin()));
+    Q.insert(u);
+    if (debug){
+      for (int i=0;i<n;i++) cout << " ";
+      cout << "level " << n << ", inserting (recursive loop) " << u << endl;
+    }
+    if (n==0){
+      unsigned int temp=white.size();
+      total_nodes_number = std::max(total_nodes_number, temp);
+      position++;
+      cout << "treating root node " << position << "/" << total_nodes_number << endl;
+    }
+
+    find_cliques(black,n+1);
+    if (cancel_search) break;
+
+    erase_entry(white, u, u_key);
+    erase_entry(s, u, u_key);
+    Q.erase(u);
+
+    black.clear();
+    if (white.size()){
+      typename graph_data::iterator ittemp = white.begin();
+      u = ittemp->second;
+      u_key = ittemp->first;
+      fill_black_set(u,u_key,s,black);// building the black set only
+
+      if (debug){
+        for (int i=0;i<n;i++) cout << " ";
+        cout << "level " << n <<  " u=" << u << " white={";
+        for (typename graph_data::iterator it=white.begin();it!=white.end();it++){
+          //for (int i=0;i<n;i++) cout << " ";
+          cout << it->second << " ";
+        }
+        cout << "} black={";
+        for (typename graph_data::iterator it=black.begin();it!=black.end();it++){
+          //for (int i=0;i<n;i++) cout << " ";
+          cout << it->second << " ";
+        }
+        cout << "}" <<endl;
+      }
+    }
+    else{
+      if (debug){
+        for (int i=0;i<n;i++) cout << " ";
+        cout << "no more white" << endl;
+      }
+    }
+  }
+
+  if (debug){
+    for (int i=0;i<n;i++) cout << " ";
+    cout << "BACK " << endl;
+  }
+
+
+}
+
+
+template<class T>
+void cliques_compatibility_graph<T>::erase_entry(graph_data &s, T &u, hash_key &key)
+{
+  pair<typename graph_data::iterator, typename graph_data::iterator> range =
+    s.equal_range(key);
+
+  typename graph_data::iterator it = range.first;
+  for (;it!=range.second;it++){
+    if (it->second==u){
+      s.erase(it);
+      return;
+    }
+  }
+}
+
+
+template<class T>
+void cliques_compatibility_graph<T>::choose_u(const graph_data &s, T &u, hash_key &u_key)
+{
+  if (s.size()==0){
+    u=T();
+    u_key=0;
+    return;
+  }
+  // choosing u
+  //  typename graph_data::const_iterator it = s.begin();
+  //  ranking_data m;
+  //  int value;
+  //  for (;it!=s.end();it++){
+  //    value = function_to_maximize_for_u(*it,s);
+  //    m.insert(make_pair(value,*it));
+  //  }
+  //  typename ranking_data::iterator itm = m.end();
+  //  itm--;
+  //  T u = itm->second;
+  //  return u;
+
+  typename graph_data::const_iterator it = s.begin();
+  u = it->second;
+  u_key = it->first;
+  double value = function_to_maximize_for_u(u,u_key,s);
+  double valuemax=value;
+  it++;
+  for (;it!=s.end();it++){
+    value = function_to_maximize_for_u(it->second,it->first,s);
+    if (value>valuemax){
+      valuemax=value;
+      u = it->second;
+      u_key = it->first;
+    }
+  }
+
+  //  typename map<T, std::vector<double> >::const_iterator itfind = hex_ranks.find(u);
+  //  cout << "u: " << u << " # face tri: " << itfind->second[0] << " quality: " << u->get_quality() << " value max: " << valuemax << endl;
+
+  return;
+}
+
+template<class T>
+void cliques_compatibility_graph<T>::split_set_BW(const T &u, const hash_key &u_key,
+                                                  const graph_data &s, graph_data &white,
+                                                  graph_data &black)
+{
+  // splitting set s into white and black nodes
+  white.insert(make_pair(u_key,u));
+  typename graph_data::const_iterator it = s.begin();
+  for (;it!=s.end();it++){
+    if (u==(it->second)) continue;
+    if (!compatibility(u,u_key, it->second, it->first))
+      white.insert(make_pair(it->first, it->second));
+    else
+      black.insert(make_pair(it->first, it->second));
+  }
+}
+
+
+
+template<class T>
+void cliques_compatibility_graph<T>::fill_black_set(const T &u, const hash_key &u_key,
+                                                    const graph_data &s, graph_data &black)
+{
+  // filling black set
+  typename graph_data::const_iterator it = s.begin();
+  for (;it!=s.end();it++){
+    if (u==(it->second)) continue;
+    if (compatibility(u,u_key, it->second,it->first))
+      black.insert(make_pair(it->first, it->second));
+  }
+}
+
+
+// the maximum score (int) will be chosen...
+template<class T>
+double cliques_compatibility_graph<T>::function_to_maximize_for_u(const T &u,
+                                                                  const hash_key &u_key,
+                                                                  const graph_data &s)
+{
+  typename graph_data::const_iterator it = s.begin();
+  int counter=0;
+  for (;it!=s.end();it++){
+    if ((it->second)==u) continue;
+    if (compatibility(u,u_key, it->second,it->first))
+      counter++;
+  }
+
+  //typename map<T, std::vector<double> >::const_iterator itfind = hex_ranks.find(u);
+  //  cout << "u: " << u << " boundary score: " << itfind->second[0]*(nb_hex_potentiels/2.) << "  counter score : " << counter << " total: " << (itfind->second[0]*(nb_hex_potentiels/2.) + counter) << endl;
+  //  return (itfind->second[0]*(nb_hex_potentiels/2.) + itfind->second[1]*1000 + counter);
+  //return (itfind->second[0]*(nb_hex_potentiels/2.)*1000. + itfind->second[1]*3 + counter);
+  //return (itfind->second[0]*(nb_hex_potentiels/2.) + itfind->second[1]*10 + counter);
+
+  //return (itfind->second[2]*nb_hex_potentiels*10000. + itfind->second[0]*(nb_hex_potentiels/2.) + itfind->second[1]*10 + counter);
+  return counter;
+}
+
+
+template<class T>
+bool cliques_compatibility_graph<T>::compatibility(const T &u, const hash_key &u_key,
+                                                   const T &v, const hash_key &v_key)
+{
+  // first, find u in graph
+  pair<typename graph::const_iterator, typename graph::const_iterator> range_ukey = G.equal_range(u_key);
+  typename graph::const_iterator itfind_u = range_ukey.first;
+  for (;itfind_u!=range_ukey.second;itfind_u++){
+    if (itfind_u->second.first == u) break;
+  }
+  // at this point, "G[u]" = itfind_u
+
+  // now, find v in graph_data
+  pair<typename graph_data::const_iterator, typename graph_data::const_iterator> range_vkey = itfind_u->second.second.equal_range(v_key);
+  bool found_it=false;
+  for (typename graph_data::const_iterator itfind_v = range_vkey.first;itfind_v!=range_vkey.second;itfind_v++){
+    if (itfind_v->second == v){
+      found_it=true;
+      break;
+    }
+  }
+  return (found_it);
+}
+
+
+template<class T>
+bool cliques_losses_graph<T>::compatibility(const T &u, const hash_key &u_key,
+                                            const T &v, const hash_key &v_key)
+{
+  // first, find u in graph
+  pair<typename graph::const_iterator, typename graph::const_iterator> range_ukey = G.equal_range(u_key);
+  typename graph::const_iterator itfind_u = range_ukey.first;
+  for (;itfind_u!=range_ukey.second;itfind_u++){
+    if (itfind_u->second.first == u) break;
+  }
+  // at this point, "G[u]" = itfind_u
+
+  // now, find v in graph_data
+  pair<typename graph_data::const_iterator, typename graph_data::const_iterator> range_vkey = itfind_u->second.second.equal_range(v_key);
+  bool found_it=false;
+  for (typename graph_data::const_iterator itfind_v = range_vkey.first;itfind_v!=range_vkey.second;itfind_v++){
+    if (itfind_v->second == v){
+      found_it=true;
+      break;
+    }
+  }
+  return (!found_it);
+}
+
+
+template<class T>
+cliques_losses_graph<T>::cliques_losses_graph
+(graph &_g, const map<T, std::vector<double> > &_hex_ranks,
+ unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels,
+ clique_stop_criteria<T> *csc, ptrfunction_export fct)
+  : cliques_compatibility_graph<T>(_g, _hex_ranks, _max_nb_cliques,
+                                   _nb_hex_potentiels,csc,fct),G(_g)
+{
+};
+
+template<class T>
+cliques_losses_graph<T>::~cliques_losses_graph(){
+};
+
+
+bool compare_hex_ptr_by_quality (Hex *a,Hex *b)
+{
+  return (a->get_quality()>(b->get_quality()));
+}
 
 /*****************************************/
 /****************class Hex****************/
 /*****************************************/
 
-Hex::Hex(){}
+Hex::Hex():hash(0.),a(NULL),b(NULL),c(NULL),d(NULL),e(NULL),f(NULL),g(NULL),h(NULL){}
 
 Hex::Hex(MVertex* a2,MVertex* b2,MVertex* c2,MVertex* d2,MVertex* e2,MVertex* f2,MVertex* g2,MVertex* h2){
   a = a2;
@@ -33,11 +851,35 @@ Hex::Hex(MVertex* a2,MVertex* b2,MVertex* c2,MVertex* d2,MVertex* e2,MVertex* f2
   f = f2;
   g = g2;
   h = h2;
+  set_hash();
+}
+
+void Hex::set_hash(){
+  hash = (a->getNum() + b->getNum() + c->getNum() + d->getNum() + e->getNum() + f->getNum() + g->getNum() + h->getNum());
+}
+
+unsigned long long Hex::get_hash(){
+  if ((hash==0.)&&(a)) set_hash();
+  return hash;
+}
+
+bool Hex::hasVertex(const MVertex *v){
+  for (int i=0;i<8;i++)
+    if (getVertex(i)==v) return true;
+  return false;
+}
+
+
+bool Hex::same_vertices(Hex *h){
+  for (int i=0;i<8;i++)
+    if (!(h->hasVertex(getVertex(i))))
+      return false;
+  return true;
 }
 
 Hex::~Hex(){}
 
-double Hex::get_quality() const{
+double Hex::get_quality(){
   return quality;
 }
 
@@ -77,6 +919,41 @@ MVertex* Hex::get_h(){
   return h;
 }
 
+MVertex* Hex::getVertex(int n){
+  MVertex *v;
+  switch (n){
+  case 0:
+    v = get_a();
+    break;
+  case 1:
+    v = get_b();
+    break;
+  case 2:
+    v = get_c();
+    break;
+  case 3:
+    v = get_d();
+    break;
+  case 4:
+    v = get_e();
+    break;
+  case 5:
+    v = get_f();
+    break;
+  case 6:
+    v = get_g();
+    break;
+  case 7:
+    v = get_h();
+    break;
+  default:
+    cout << "Hex: unknown vertex number " << n << endl;
+    throw;
+  }
+  return v;
+}
+
+
 void Hex::set_vertices(MVertex* a2,MVertex* b2,MVertex* c2,MVertex* d2,MVertex* e2,MVertex* f2,MVertex* g2,MVertex* h2){
   a = a2;
   b = b2;
@@ -88,10 +965,110 @@ void Hex::set_vertices(MVertex* a2,MVertex* b2,MVertex* c2,MVertex* d2,MVertex*
   h = h2;
 }
 
-bool Hex::operator<(const Hex& hex) const{
+bool Hex::operator<(Hex& hex){
   return quality>hex.get_quality();
 }
 
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PEEntity::PEEntity(const vector<const MVertex*> &_v):vertices(_v){
+  compute_hash();
+}
+
+//PEEntity::PEEntity(unsigned long long l):hash(l){
+//}
+
+void PEEntity::compute_hash(){
+  hash=0;
+  for (vector<const MVertex*>::const_iterator it = vertices.begin();it!=vertices.end();it++)
+    hash+=(*it)->getNum();
+}
+
+size_t PEEntity::get_hash() const{
+  return hash;
+}
+
+PEEntity::~PEEntity(){}
+
+const MVertex* PEEntity::getVertex(size_t n)const{
+  if ((n>get_max_nb_vertices()) || vertices.empty()){
+    cout << " PEEntity::getVertex : wrong vertex number : int n = " << n << endl;
+    throw;
+  }
+  return vertices[n];
+}
+
+bool PEEntity::hasVertex(const MVertex *v)const{
+  return (find(vertices.begin(),vertices.end(), v)!=vertices.end());
+}
+
+bool PEEntity::same_vertices(const PEEntity *t)const{
+  for (vector<const MVertex*>::const_iterator it=vertices.begin();it!=vertices.end();it++){
+    if (!(t->hasVertex(*it)))
+      return false;
+  }
+  return true;
+}
+
+bool PEEntity::operator<(const PEEntity& t) const{
+  return hash<t.get_hash();
+}
+
+//bool PEEntity::operator==(const PEEntity& t) const{
+//  return (hash==t.get_hash());
+//}
+
+//bool PEEntity::operator==(const size_t& l) const{
+//  return (hash==l);
+//}
+
+
+PELine::~PELine(){};
+
+PELine::PELine(const vector<const MVertex*> &_v):PEEntity(_v){
+  if (vertices.size()!=get_max_nb_vertices()){
+    cout << "PELine: wrong number of vertices given !!! aborting ! " << endl;
+    throw;
+  }
+  compute_hash();
+}
+
+size_t PELine::get_max_nb_vertices()const{return 2;};
+
+
+PETriangle::~PETriangle(){};
+
+PETriangle::PETriangle(const vector<const MVertex*> &_v):PEEntity(_v){
+  if (vertices.size()!=get_max_nb_vertices()){
+    cout << "PETriangle: wrong number of vertices given !!! aborting ! " << endl;
+    throw;
+  }
+  compute_hash();
+}
+
+//PETriangle::PETriangle(const unsigned long long l):PEEntity(l){
+//}
+
+size_t PETriangle::get_max_nb_vertices()const{return 3;};
+
+
+PEQuadrangle::~PEQuadrangle(){};
+
+PEQuadrangle::PEQuadrangle(const vector<const MVertex*> &_v):PEEntity(_v){
+  if (vertices.size()!=get_max_nb_vertices()){
+    cout << "PEQuadrangle: wrong number of vertices given !!! aborting ! " << endl;
+    throw;
+  }
+  compute_hash();
+}
+
+//PEQuadrangle::PEQuadrangle(const unsigned long long l):PEEntity(l){
+//}
+
+size_t PEQuadrangle::get_max_nb_vertices()const{return 4;};
+
+
 /*******************************************/
 /****************class Facet****************/
 /*******************************************/
@@ -318,20 +1295,25 @@ bool Tuple::operator<(const Tuple& tuple) const{
 
 Recombinator::Recombinator(){}
 
-Recombinator::~Recombinator(){}
+Recombinator::~Recombinator(){
+  for (std::vector<Hex*>::iterator it = potential.begin();it!=potential.end();it++){
+    delete *it;
+  }
+}
 
 void Recombinator::execute(){
+
   GRegion* gr;
   GModel* model = GModel::current();
   GModel::riter it;
 
   for(it=model->firstRegion();it!=model->lastRegion();it++)
-  {
-    gr = *it;
-    if(gr->getNumMeshElements()>0){
-      execute(gr);
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        execute(gr);
+      }
     }
-  }
 }
 
 void Recombinator::execute(GRegion* gr){
@@ -344,14 +1326,23 @@ void Recombinator::execute(GRegion* gr){
   build_vertex_to_elements(gr);
 
   potential.clear();
-  pattern1(gr);
   Msg::Info("Hex-merging pattern nb. 1...");
-  pattern2(gr);
+  pattern1(gr);
   Msg::Info("Hex-merging pattern nb. 2...");
-  pattern3(gr);
+  pattern2(gr);
   Msg::Info("Hex-merging pattern nb. 3...");
+  pattern3(gr);
+
+  std::sort(potential.begin(),potential.end(),compare_hex_ptr_by_quality);
 
-  std::sort(potential.begin(),potential.end());
+
+  //  /// SORTIE TOUS HEX POT
+  //  cout << "__________________________ START POT HEX LISTING ____________________ " << endl;
+  //  for (std::vector<Hex*>::iterator it = potential.begin();it!=potential.end();it++){
+  //    cout << "--- pot hex : " << *it << "   " << (*it)->get_quality() << endl;
+  //  }
+  //  cout << "__________________________ END POT HEX LISTING ____________________ " << endl;
+  //  /// END
 
   hash_tableA.clear();
   hash_tableB.clear();
@@ -362,6 +1353,7 @@ void Recombinator::execute(GRegion* gr){
 
   statistics(gr);
 
+
   modify_surfaces(gr);
 }
 
@@ -393,11 +1385,11 @@ void Recombinator::pattern1(GRegion* gr){
   std::set<MVertex*>::iterator it2;
   std::set<MVertex*>::iterator it3;
   std::set<MVertex*>::iterator it4;
-  Hex hex;
+  Hex *hex;
 
   for(i=0;i<gr->getNumMeshElements();i++){
     element = gr->getMeshElement(i);
-	//for(index=0;index<4;index++){
+    //for(index=0;index<4;index++){
     max_scaled_jacobian(element,index);
 
     a = element->getVertex(index);
@@ -436,18 +1428,19 @@ void Recombinator::pattern1(GRegion* gr){
             find(p,q,r,already,bin4);
             for(it4=bin4.begin();it4!=bin4.end();it4++){
               s = *it4;
-              hex = Hex(a,b,q,c,d,p,s,r);
-              quality = min_scaled_jacobian(hex);
-              hex.set_quality(quality);
-              if(valid(hex)){
+              hex = new Hex(a,b,q,c,d,p,s,r);
+              quality = min_scaled_jacobian(*hex);
+              hex->set_quality(quality);
+              if(valid(*hex)){
                 potential.push_back(hex);
               }
+              else delete hex;
             }
           }
         }
       }
     }
-	//}
+    //}
   }
 }
 
@@ -459,13 +1452,13 @@ void Recombinator::pattern2(GRegion* gr){
   MVertex *a,*b,*c,*d;
   MVertex *p,*q,*r,*s;
   std::set<MElement*> verif;
-  Hex hex;
+  Hex *hex;
 
   for(i=0;i<gr->getNumMeshElements();i++){
     element = gr->getMeshElement(i);
-	//for(index1=0;index1<3;index1++){
-	//for(index2=index1+1;index2<4;index2++){
-	diagonal(element,index1,index2);
+    //for(index1=0;index1<3;index1++){
+    //for(index2=index1+1;index2<4;index2++){
+    diagonal(element,index1,index2);
     two_others(index1,index2,index3,index4);
 
     b = element->getVertex(index1);
@@ -482,24 +1475,26 @@ void Recombinator::pattern2(GRegion* gr){
         r = find(s,b,d,a,verif);
         q = find(p,b,d,c,verif);
         if(r!=0 && q!=0){
-          hex = Hex(a,s,b,c,d,r,q,p);
-          quality = min_scaled_jacobian(hex);
-          hex.set_quality(quality);
-          if(valid(hex)){
+          hex = new Hex(a,s,b,c,d,r,q,p);
+          quality = min_scaled_jacobian(*hex);
+          hex->set_quality(quality);
+          if(valid(*hex)){
             potential.push_back(hex);
           }
+          else delete hex;
 
-          hex = Hex(a,c,d,s,b,p,q,r);
-          quality = min_scaled_jacobian(hex);
-          hex.set_quality(quality);
-          if(valid(hex)){
+          hex = new Hex(a,c,d,s,b,p,q,r);
+          quality = min_scaled_jacobian(*hex);
+          hex->set_quality(quality);
+          if(valid(*hex)){
             potential.push_back(hex);
           }
+          else delete hex;
         }
       }
     }
-	//}
-	//}
+    //}
+    //}
   }
 }
 
@@ -515,7 +1510,7 @@ void Recombinator::pattern3(GRegion* gr){
   MVertex *fA,*fB,*bA,*bB;
   std::set<MElement*> verif1;
   std::set<MElement*> verif2;
-  Hex hex;
+  Hex *hex;
 
   for(i=0;i<gr->getNumMeshElements();i++){
     element = gr->getMeshElement(i);
@@ -571,12 +1566,13 @@ void Recombinator::pattern3(GRegion* gr){
           c10 = linked(d,s);
 
           if(c1 && c2 && c3 && c4 && c5 && c6 && c7 && c8 && c9 && c10){
-            hex = Hex(p,c,r,b,q,d,s,a);
-            quality = min_scaled_jacobian(hex);
-            hex.set_quality(quality);
-            if(valid(hex)){
+            hex = new Hex(p,c,r,b,q,d,s,a);
+            quality = min_scaled_jacobian(*hex);
+            hex->set_quality(quality);
+            if(valid(*hex)){
               potential.push_back(hex);
             }
+            else delete hex;
           }
         }
         else if(scalar(fA,fB,a,b)<=scalar(fA,fB,b,c) && scalar(bA,bB,a,b)<=scalar(bA,bB,b,c)){
@@ -611,12 +1607,13 @@ void Recombinator::pattern3(GRegion* gr){
           c10 = linked(d,s);
 
           if(c1 && c2 && c3 && c4 && c5 && c6 && c7 && c8 && c9 && c10){
-            hex = Hex(p,b,r,a,q,c,s,d);
-            quality = min_scaled_jacobian(hex);
-            hex.set_quality(quality);
-            if(valid(hex)){
+            hex = new Hex(p,b,r,a,q,c,s,d);
+            quality = min_scaled_jacobian(*hex);
+            hex->set_quality(quality);
+            if(valid(*hex)){
               potential.push_back(hex);
             }
+            else delete hex;
           }
         }
       }
@@ -637,7 +1634,7 @@ void Recombinator::merge(GRegion* gr){
   std::vector<MTetrahedron*> opt;
   std::set<MElement*>::iterator it;
   std::map<MElement*,bool>::iterator it2;
-  Hex hex;
+  Hex *hex;
 
   count = 1;
   quality = 0.0;
@@ -646,71 +1643,79 @@ void Recombinator::merge(GRegion* gr){
     hex = potential[i];
 
     threshold = 0.25;
-    if(hex.get_quality()<threshold){
+    if(hex->get_quality()<threshold){
       break;
     }
 
-    a = hex.get_a();
-    b = hex.get_b();
-    c = hex.get_c();
-    d = hex.get_d();
-    e = hex.get_e();
-    f = hex.get_f();
-    g = hex.get_g();
-    h = hex.get_h();
+    a = hex->get_a();
+    b = hex->get_b();
+    c = hex->get_c();
+    d = hex->get_d();
+    e = hex->get_e();
+    f = hex->get_f();
+    g = hex->get_g();
+    h = hex->get_h();
 
     parts.clear();
-    find(a,hex,parts);
-    find(b,hex,parts);
-    find(c,hex,parts);
-    find(d,hex,parts);
-    find(e,hex,parts);
-    find(f,hex,parts);
-    find(g,hex,parts);
-    find(h,hex,parts);
+    find(a,*hex,parts);
+    find(b,*hex,parts);
+    find(c,*hex,parts);
+    find(d,*hex,parts);
+    find(e,*hex,parts);
+    find(f,*hex,parts);
+    find(g,*hex,parts);
+    find(h,*hex,parts);
 
     flag = 1;
+    //    bool found_used_sliver=false;
     for(it=parts.begin();it!=parts.end();it++){
       element = *it;
       it2 = markings.find(element);
-      if(it2->second==1 && !sliver(element,hex)){
+      //      if(it2->second==1 && sliver(element,*hex)){
+      //        found_used_sliver=true;
+      //      }
+      if(it2->second==1 && !sliver(element,*hex)){
         flag = 0;
         break;
       }
     }
     if(!flag) continue;
 
-    if(!valid(hex,parts)){
+    if(!valid(*hex,parts)){
       continue;
     }
 
-    if(!conformityA(hex)){
+    if(!conformityA(*hex)){
       continue;
     }
 
-    if(!conformityB(hex)){
+    if(!conformityB(*hex)){
       continue;
     }
 
-    if(!conformityC(hex)){
+    if(!conformityC(*hex)){
       continue;
     }
 
-    if(!faces_statuquo(hex)){
+    if(!faces_statuquo(*hex)){
       continue;
     }
 
+    //    if (found_used_sliver){
+    //      cout << "      ************************************* a used sliver passed the tests !!!!! " << endl;
+    //    }
+
     //printf("%d - %d/%d - %f\n",count,i,(int)potential.size(),hex.get_quality());
-    quality = quality + hex.get_quality();
+    quality = quality + hex->get_quality();
     for(it=parts.begin();it!=parts.end();it++){
       element = *it;
       it2 = markings.find(element);
       it2->second = 1;
     }
     gr->addHexahedron(new MHexahedron(a,b,c,d,e,f,g,h));
-    build_hash_tableA(hex);
-    build_hash_tableB(hex);
-    build_hash_tableC(hex);
+    build_hash_tableA(*hex);
+    build_hash_tableB(*hex);
+    build_hash_tableC(*hex);
     count++;
   }
 
@@ -744,7 +1749,7 @@ void Recombinator::improved_merge(GRegion* gr){
   std::set<MElement*>::iterator it;
   std::map<MElement*,bool>::iterator it2;
   std::vector<MTetrahedron*>::iterator it3;
-  Hex hex;
+  Hex *hex;
 
   count = 1;
   quality = 0.0;
@@ -753,67 +1758,67 @@ void Recombinator::improved_merge(GRegion* gr){
     hex = potential[i];
 
     threshold = 0.25;
-    if(hex.get_quality()<threshold){
+    if(hex->get_quality()<threshold){
       break;
     }
 
-    a = hex.get_a();
-    b = hex.get_b();
-    c = hex.get_c();
-    d = hex.get_d();
-    e = hex.get_e();
-    f = hex.get_f();
-    g = hex.get_g();
-    h = hex.get_h();
+    a = hex->get_a();
+    b = hex->get_b();
+    c = hex->get_c();
+    d = hex->get_d();
+    e = hex->get_e();
+    f = hex->get_f();
+    g = hex->get_g();
+    h = hex->get_h();
 
     parts.clear();
-    find(a,hex,parts);
-    find(b,hex,parts);
-    find(c,hex,parts);
-    find(d,hex,parts);
-    find(e,hex,parts);
-    find(f,hex,parts);
-    find(g,hex,parts);
-    find(h,hex,parts);
+    find(a,*hex,parts);
+    find(b,*hex,parts);
+    find(c,*hex,parts);
+    find(d,*hex,parts);
+    find(e,*hex,parts);
+    find(f,*hex,parts);
+    find(g,*hex,parts);
+    find(h,*hex,parts);
 
     flag = 1;
     for(it=parts.begin();it!=parts.end();it++){
       element = *it;
       it2 = markings.find(element);
-      if(it2->second==1 && !sliver(element,hex)){
+      if(it2->second==1 && !sliver(element,*hex)){
         flag = 0;
         break;
       }
     }
     if(!flag) continue;
 
-    if(!valid(hex,parts)){
+    if(!valid(*hex,parts)){
       continue;
     }
 
-    if(!conformityA(hex)){
+    if(!conformityA(*hex)){
       continue;
     }
 
-    if(!conformityB(hex)){
+    if(!conformityB(*hex)){
       continue;
     }
 
-    if(!conformityC(hex)){
+    if(!conformityC(*hex)){
       continue;
     }
 
-    //printf("%d - %d/%d - %f\n",count,i,(int)potential.size(),hex.get_quality());
-    quality = quality + hex.get_quality();
+    //printf("%d - %d/%d - %f\n",count,i,(int)potential->size(),hex->get_quality());
+    quality = quality + hex->get_quality();
     for(it=parts.begin();it!=parts.end();it++){
       element = *it;
       it2 = markings.find(element);
       it2->second = 1;
     }
     gr->addHexahedron(new MHexahedron(a,b,c,d,e,f,g,h));
-    build_hash_tableA(hex);
-    build_hash_tableB(hex);
-    build_hash_tableC(hex);
+    build_hash_tableA(*hex);
+    build_hash_tableB(*hex);
+    build_hash_tableC(*hex);
     count++;
   }
 
@@ -886,21 +1891,21 @@ void Recombinator::build_tuples(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        a = element->getVertex(0);
-        b = element->getVertex(1);
-        c = element->getVertex(2);
+        if(element->getNumVertices()==3){
+          a = element->getVertex(0);
+          b = element->getVertex(1);
+          c = element->getVertex(2);
 
-        tuples.insert(Tuple(a,b,c,element,gf));
+          tuples.insert(Tuple(a,b,c,element,gf));
+        }
       }
     }
-  }
 }
 
 void Recombinator::modify_surfaces(GRegion* gr){
@@ -939,28 +1944,28 @@ void Recombinator::modify_surfaces(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    opt.clear();
+      opt.clear();
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        it2 = triangles.find(element);
-        if(it2==triangles.end()){
-          opt.push_back(element);
+        if(element->getNumVertices()==3){
+          it2 = triangles.find(element);
+          if(it2==triangles.end()){
+            opt.push_back(element);
+          }
         }
       }
-    }
 
-    gf->triangles.clear();
+      gf->triangles.clear();
 
-    for(i=0;i<opt.size();i++){
-      gf->triangles.push_back((MTriangle*)opt[i]);
+      for(i=0;i<opt.size();i++){
+        gf->triangles.push_back((MTriangle*)opt[i]);
+      }
     }
-  }
 }
 
 void Recombinator::modify_surfaces(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
@@ -1063,7 +2068,7 @@ void Recombinator::modify_surfaces(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
   }
 }
 
-bool Recombinator::sliver(MElement* element,Hex hex){
+bool Recombinator::sliver(MElement* element,Hex &hex){
   bool val;
   bool flag1,flag2,flag3,flag4;
   MVertex *a,*b,*c,*d;
@@ -1222,7 +2227,12 @@ void Recombinator::two_others(int index1,int index2,int& index3,int& index4){
   }
 }
 
-bool Recombinator::valid(Hex hex,const std::set<MElement*>& parts){
+
+// soit une face du cube: abcd
+// en principe, on doit avoir soit les facets (abc) et (acd), soit les facets (abd) et(bcd) qui sont inclues dans un des tets qui forment l'hex.
+// si c'est le cas pour toutes les 6 faces de l'hex, return true.
+// ce test permet probablement de virer les hex "avec des trous" (avec 8 noeuds ok, mais un tet manquant, ce qui peut occasionner un hex à 14 faces, par exemple, si l'on compte les faces à partir des tets inclus)
+bool Recombinator::valid(Hex &hex,const std::set<MElement*>& parts){
   bool ok1,ok2,ok3;
   bool ok4,ok5,ok6;
   bool flag1A,flag1B,flag1C,flag1D;
@@ -1287,7 +2297,8 @@ bool Recombinator::valid(Hex hex,const std::set<MElement*>& parts){
   }
 }
 
-bool Recombinator::valid(Hex hex){
+// renvoie true si le "MQuadrangle::etaShapeMeasure" des 6 faces est plus grand que 0.000001
+bool Recombinator::valid(Hex &hex){
   double k;
   double eta1,eta2,eta3;
   double eta4,eta5,eta6;
@@ -1503,6 +2514,7 @@ void Recombinator::intersection(const std::set<MElement*>& bin1,const std::set<M
   std::set_intersection(bin1.begin(),bin1.end(),bin2.begin(),bin2.end(),std::inserter(final,final.end()));
 }
 
+// return true if vertex belong to hex
 bool Recombinator::inclusion(MVertex* vertex,Hex hex){
   bool flag;
 
@@ -1520,6 +2532,8 @@ bool Recombinator::inclusion(MVertex* vertex,Hex hex){
   return flag;
 }
 
+// pfffffff... renvoie true si vertex se trouve dans [a,b,c]
+// en gros, return (abcd.find(vertex)!=abcd.end());
 bool Recombinator::inclusion(MVertex* vertex,MVertex* a,MVertex* b,MVertex* c,MVertex* d){
   bool flag;
 
@@ -1533,6 +2547,9 @@ bool Recombinator::inclusion(MVertex* vertex,MVertex* a,MVertex* b,MVertex* c,MV
   return flag;
 }
 
+
+// return true if all three vertices v1,v2 and v3 belong to one tet
+// on pourrait plutot faire: est-ce que la face (v1v2v3) fait partie d'un tet, avec l'info hashée de tet to triangle ???
 bool Recombinator::inclusion(MVertex* v1,MVertex* v2,MVertex* v3,const std::set<MElement*>& bin){
   bool ok;
   bool flag1,flag2,flag3;
@@ -1563,6 +2580,7 @@ bool Recombinator::inclusion(MVertex* v1,MVertex* v2,MVertex* v3,const std::set<
   return ok;
 }
 
+// return true si la facet existe dans la table A
 bool Recombinator::inclusion(Facet facet){
   bool flag;
   std::multiset<Facet>::iterator it;
@@ -1632,7 +2650,14 @@ bool Recombinator::duplicate(Diagonal diagonal){
   return flag;
 }
 
-bool Recombinator::conformityA(Hex hex){
+// return true si un hex est "conforme A"
+// est "conforme A" un hex dont les 6 faces sont "conforme A"
+// est "conforme A" une face si ses 4 facets existent dans tableA, ou bien si aucune des ses facets ne se trouve dans table A
+// ça veut dire: un hex est condorme A s'il est tout seul.
+// Sinon, s'il est pas tout seul, s'il a des "voisins de face"... il faut que les faces en contact soient bien en contact... pas juste un triangle en commun, mais il faut un QUAD en commun !
+// ne pouvait-on pas écrire ça avec des quad, du coup ???
+// ça veut dire que pour les slivers, qu'ils soient ou pas dans l'hex, dans tous les cas, les hex sont compatibles !
+bool Recombinator::conformityA(Hex &hex){
   bool c1,c2,c3,c4,c5,c6;
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -1664,10 +2689,23 @@ bool Recombinator::conformityA(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
   c3 = inclusion(Facet(a,b,d));
   c4 = inclusion(Facet(b,c,d));
 
+  //  if (((c1 && c2 && c3 && c4) || (!c1 && !c2 && !c3 && !c4))==false){
+  //    // info si non conforme
+  //    cout << "     treating facet made of abcd: " << a->getNum() << " " << b->getNum() << " " << c->getNum() << " " << d->getNum() << endl;
+  //    cout << "c1 (abc) connu: " << c1 << endl;
+  //    cout << "c2 (acd) connu: " << c2 << endl;
+  //    cout << "c3 (abd) connu: " << c3 << endl;
+  //    cout << "c4 (bcd) connu: " << c4 << endl;
+  //  }
+
   return (c1 && c2 && c3 && c4) || (!c1 && !c2 && !c3 && !c4);
 }
 
-bool Recombinator::conformityB(Hex hex){
+// return false si:
+//- une des 12 arrêtes de l'hex se trouve dans tableB !!! (pas C !!!), càd si une arrete a été utilisée comme diagonale d'un autre hex
+//- (ou bien) si, pour chaque face de l'hex, on a une diagonale dans tableB et pas l'autre
+// ce test conformityB n'est-il pas redondant avec conformityA ???
+bool Recombinator::conformityB(Hex &hex){
   bool flag1;
   bool flag2;
   bool c1,c2,c3,c4;
@@ -1725,7 +2763,8 @@ bool Recombinator::conformityB(Hex hex){
   }
 }
 
-bool Recombinator::conformityC(Hex hex){
+// return false si une des 12 diagonales du cube se trouve dans tableC, càd a été utilisée comme arrête
+bool Recombinator::conformityC(Hex &hex){
   bool flag;
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -1760,7 +2799,8 @@ bool Recombinator::conformityC(Hex hex){
   }
 }
 
-bool Recombinator::faces_statuquo(Hex hex){
+// return true si les 6 faces de l'hex sont "faces_statuquo"
+bool Recombinator::faces_statuquo(Hex &hex){
   bool c1,c2,c3,c4,c5,c6;
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -1784,6 +2824,7 @@ bool Recombinator::faces_statuquo(Hex hex){
   return c1 && c2 && c3 && c4 && c5 && c6;
 }
 
+// return false si, parmis les deux paires de facets de la face, il existe un couple de facet qui soinent toutes les deux des tuples, mais correspondant à des geometric faces différentes. Bref, une arrête géométrique confondue avec une diagonale de la face.
 bool Recombinator::faces_statuquo(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
   bool ok;
   bool flag1,flag2;
@@ -1832,12 +2873,13 @@ bool Recombinator::faces_statuquo(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
     it2++;
   }
 
-  if(flag1 && flag2){
-    if(gf1!=gf2){
+  if(flag1 && flag2){// si on a trouvé les deux tuples (abc) et (cda) dans la liste des tuples
+    if(gf1!=gf2){// si les geometrical faces des deux tuples sont différentes
       ok = 0;
     }
   }
 
+  // on fait pareil pour l'autre paire de facets, abd et bcd
   tuple1 = Tuple(a,b,d);
   tuple2 = Tuple(b,c,d);
 
@@ -1890,9 +2932,19 @@ void Recombinator::build_vertex_to_vertices(GRegion* gr){
   std::set<MVertex*> bin;
   std::map<MVertex*,std::set<MVertex*> >::iterator it;
 
+  cout << "... stage1, building vertex->vertices connectivity " << endl;
+
   vertex_to_vertices.clear();
 
+  int nbElements = gr->getNumMeshElements();
+  double percentage=0.05;
+  double done=0.;
+  int progress = ceil(nbElements*percentage);
   for(i=0;i<gr->getNumMeshElements();i++){
+    if(i%progress==0){
+      done += percentage*100;
+      cout << "..." << done << "% " << flush;
+    }
     element = gr->getMeshElement(i);
     for(j=0;j<element->getNumVertices();j++){
       a = element->getVertex(j);
@@ -1915,9 +2967,11 @@ void Recombinator::build_vertex_to_vertices(GRegion* gr){
       }
     }
   }
+  cout << endl;
 }
 
 void Recombinator::build_vertex_to_elements(GRegion* gr){
+  cout << "... stage2, building vertex->elements connectivity " << endl;
   size_t i;
   int j;
   MElement* element;
@@ -1925,9 +2979,18 @@ void Recombinator::build_vertex_to_elements(GRegion* gr){
   std::set<MElement*> bin;
   std::map<MVertex*,std::set<MElement*> >::iterator it;
 
+  int nbElements = gr->getNumMeshElements();
+  double percentage=0.05;
+  double done=0.;
+  int progress = ceil(nbElements*percentage);
+
   vertex_to_elements.clear();
 
   for(i=0;i<gr->getNumMeshElements();i++){
+    if(i%progress==0){
+      done += percentage*100;
+      cout << "..." << done << "% " << flush;
+    }
     element = gr->getMeshElement(i);
     for(j=0;j<element->getNumVertices();j++){
       vertex = element->getVertex(j);
@@ -1943,8 +3006,10 @@ void Recombinator::build_vertex_to_elements(GRegion* gr){
       }
     }
   }
+  cout << endl;
 }
 
+// pour les 6 faces de l'hex, stocke les 4 "facet" (équivalent à PETriangle) possibles dans la table A
 void Recombinator::build_hash_tableA(Hex hex){
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -1982,7 +3047,7 @@ void Recombinator::build_hash_tableA(Facet facet){
 
   while(it!=hash_tableA.end()){
     if(facet.get_hash()!=it->get_hash()){
-      break;
+      break;// empoyer RANGE à la place ? + lisible ? + efficace ?
     }
 
     if(facet.same_vertices(*it)){
@@ -1993,11 +3058,14 @@ void Recombinator::build_hash_tableA(Facet facet){
     it++;
   }
 
+  // à ce stade, flag==0 si facet existe dans la table
+
   if(flag){
     hash_tableA.insert(facet);
   }
 }
 
+// pour les 6 faces de l'hex, stoke les 2 "diagonal" possibles dans la table B
 void Recombinator::build_hash_tableB(Hex hex){
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -2049,6 +3117,7 @@ void Recombinator::build_hash_tableB(Diagonal diagonal){
   }
 }
 
+// pour les 6 faces de l'hex, stoke les 12 arretes (aussi enregistrées comme "diagonal") possibles dans la table C
 void Recombinator::build_hash_tableC(Hex hex){
   MVertex *a,*b,*c,*d;
   MVertex *e,*f,*g,*h;
@@ -2157,9 +3226,9 @@ void Recombinator::print_hash_tableA(){
 
 void Recombinator::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
   file << "SL ("
-  << p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
-  << p2.x() << ", " << p2.y() << ", " << p2.z() << ")"
-  << "{10, 20};\n";
+       << p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
+       << p2.x() << ", " << p2.y() << ", " << p2.z() << ")"
+       << "{10, 20};\n";
 }
 
 double Recombinator::scaled_jacobian(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
@@ -2214,7 +3283,7 @@ double Recombinator::max_scaled_jacobian(MElement* element,int& index){
   return val;
 }
 
-double Recombinator::min_scaled_jacobian(Hex hex){
+double Recombinator::min_scaled_jacobian(Hex &hex){
   int i;
   double min;
   double j1,j2,j3,j4,j5,j6,j7,j8;
@@ -2335,12 +3404,12 @@ void Supplementary::execute(){
   GModel::riter it;
 
   for(it=model->firstRegion();it!=model->lastRegion();it++)
-  {
-    gr = *it;
-    if(gr->getNumMeshElements()>0){
-      execute(gr);
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        execute(gr);
+      }
     }
-  }
 }
 
 void Supplementary::execute(GRegion* gr){
@@ -2643,21 +3712,21 @@ void Supplementary::build_tuples(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        a = element->getVertex(0);
-        b = element->getVertex(1);
-        c = element->getVertex(2);
+        if(element->getNumVertices()==3){
+          a = element->getVertex(0);
+          b = element->getVertex(1);
+          c = element->getVertex(2);
 
-        tuples.insert(Tuple(a,b,c,element,gf));
+          tuples.insert(Tuple(a,b,c,element,gf));
+        }
       }
     }
-  }
 }
 
 void Supplementary::modify_surfaces(GRegion* gr){
@@ -2691,28 +3760,28 @@ void Supplementary::modify_surfaces(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    opt.clear();
+      opt.clear();
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        it2 = triangles.find(element);
-        if(it2==triangles.end()){
-          opt.push_back(element);
+        if(element->getNumVertices()==3){
+          it2 = triangles.find(element);
+          if(it2==triangles.end()){
+            opt.push_back(element);
+          }
         }
       }
-    }
 
-    gf->triangles.clear();
+      gf->triangles.clear();
 
-    for(i=0;i<opt.size();i++){
-      gf->triangles.push_back((MTriangle*)opt[i]);
+      for(i=0;i<opt.size();i++){
+        gf->triangles.push_back((MTriangle*)opt[i]);
+      }
     }
-  }
 }
 
 void Supplementary::modify_surfaces(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
@@ -3010,7 +4079,7 @@ void Supplementary::find(MVertex* vertex,Prism prism,std::set<MElement*>& final)
 }
 
 void Supplementary::intersection(const std::set<MVertex*>& bin1,const std::set<MVertex*>& bin2,
-                                const std::vector<MVertex*>& already,std::set<MVertex*>& final){
+                                 const std::vector<MVertex*>& already,std::set<MVertex*>& final){
   size_t i;
   bool ok;
   std::set<MVertex*> temp;
@@ -3656,12 +4725,12 @@ void PostOp::execute(bool flag){
   GModel::riter it;
 
   for(it=model->firstRegion();it!=model->lastRegion();it++)
-  {
-    gr = *it;
-    if(gr->getNumMeshElements()>0){
-      execute(gr,flag);
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        execute(gr,flag);
+      }
     }
-  }
 }
 
 void PostOp::execute(GRegion* gr,bool flag){
@@ -3956,7 +5025,7 @@ void PostOp::pyramids2(MVertex* a,MVertex* b,MVertex* c,MVertex* d,GRegion* gr){
     it2 = markings.find(*tetrahedra.begin());
     it2->second = 1;
     return;
-  }*/
+    }*/
 
   if(flag){
     diagA = a;
@@ -4097,8 +5166,6 @@ void PostOp::rearrange(GRegion* gr){
 
 void PostOp::statistics(GRegion* gr){
   unsigned int i;
-  int nbr,nbr8,nbr6,nbr5,nbr4;
-  double vol,vol8,vol6,vol5,vol4;
   MElement* element;
 
   nbr = 0;
@@ -4142,7 +5209,7 @@ void PostOp::statistics(GRegion* gr){
     }
     else{
       //vol = vol + workaround(element);
-	  vol = vol + element->getVolume();
+      vol = vol + element->getVolume();
     }
   }
 
@@ -4176,21 +5243,21 @@ void PostOp::build_tuples(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        a = element->getVertex(0);
-        b = element->getVertex(1);
-        c = element->getVertex(2);
+        if(element->getNumVertices()==3){
+          a = element->getVertex(0);
+          b = element->getVertex(1);
+          c = element->getVertex(2);
 
-        tuples.insert(Tuple(a,b,c,element,gf));
+          tuples.insert(Tuple(a,b,c,element,gf));
+        }
       }
     }
-  }
 }
 
 void PostOp::modify_surfaces(GRegion* gr){
@@ -4220,28 +5287,28 @@ void PostOp::modify_surfaces(GRegion* gr){
   faces = gr->faces();
 
   for(it=faces.begin();it!=faces.end();it++)
-  {
-    gf = *it;
+    {
+      gf = *it;
 
-    opt.clear();
+      opt.clear();
 
-    for(i=0;i<gf->getNumMeshElements();i++){
-      element = gf->getMeshElement(i);
+      for(i=0;i<gf->getNumMeshElements();i++){
+        element = gf->getMeshElement(i);
 
-      if(element->getNumVertices()==3){
-        it2 = triangles.find(element);
-        if(it2==triangles.end()){
-          opt.push_back(element);
+        if(element->getNumVertices()==3){
+          it2 = triangles.find(element);
+          if(it2==triangles.end()){
+            opt.push_back(element);
+          }
         }
       }
-    }
 
-    gf->triangles.clear();
+      gf->triangles.clear();
 
-    for(i=0;i<opt.size();i++){
-      gf->triangles.push_back((MTriangle*)opt[i]);
+      for(i=0;i<opt.size();i++){
+        gf->triangles.push_back((MTriangle*)opt[i]);
+      }
     }
-  }
 }
 
 void PostOp::modify_surfaces(MVertex* a,MVertex* b,MVertex* c,MVertex* d){
@@ -4678,3 +5745,1878 @@ void PostOp::erase_vertex_to_pyramids(MElement* element){
     }
   }
 }
+
+
+void Recombinator_Graph::pattern1(GRegion* gr){
+  int size_init = hex_to_tet.size();
+  size_t i;
+  int index;
+  double quality;
+  MElement* element;
+  MVertex *a,*b,*c,*d;
+  MVertex *p,*q,*r,*s;
+  std::vector<MVertex*> already;
+  std::set<MVertex*> bin1;
+  std::set<MVertex*> bin2;
+  std::set<MVertex*> bin3;
+  std::set<MVertex*> bin4;
+  std::set<MVertex*>::iterator it1;
+  std::set<MVertex*>::iterator it2;
+  std::set<MVertex*>::iterator it3;
+  std::set<MVertex*>::iterator it4;
+  Hex *hex;
+
+  for(i=0;i<gr->getNumMeshElements();i++){
+    element = gr->getMeshElement(i);
+    // max_scaled_jacobian(element,index);
+    // todo: ici, boucle sur index
+    for (index = 0;index<4;index++){
+
+      a = element->getVertex(index);
+      b = element->getVertex((index+1)%4);
+      c = element->getVertex((index+2)%4);
+      d = element->getVertex((index+3)%4);
+
+      already.clear();
+      already.push_back(a);
+      already.push_back(b);
+      already.push_back(c);
+      already.push_back(d);
+      bin1.clear();
+      bin2.clear();
+      bin3.clear();
+      find(b,d,already,bin1);
+      find(b,c,already,bin2);
+      find(c,d,already,bin3);
+
+      for(it1=bin1.begin();it1!=bin1.end();it1++){
+        p = *it1;
+        for(it2=bin2.begin();it2!=bin2.end();it2++){
+          q = *it2;
+          for(it3=bin3.begin();it3!=bin3.end();it3++){
+            r = *it3;
+            if(p!=q && p!=r && q!=r){
+              already.clear();
+              already.push_back(a);
+              already.push_back(b);
+              already.push_back(c);
+              already.push_back(d);
+              already.push_back(p);
+              already.push_back(q);
+              already.push_back(r);
+              bin4.clear();
+              find(p,q,r,already,bin4);
+              for(it4=bin4.begin();it4!=bin4.end();it4++){
+                s = *it4;
+                hex = new Hex(a,b,q,c,d,p,s,r);
+                quality = min_scaled_jacobian(*hex);
+                hex->set_quality(quality);
+                fill_tet_to_hex_table(hex);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  cout << "Nb of hex found, pattern1: " << hex_to_tet.size()-size_init << endl;
+}
+
+
+void Recombinator_Graph::pattern2(GRegion* gr){
+  int size_init = hex_to_tet.size();
+  size_t i;
+  int index1,index2,index3,index4;
+  double quality;
+  MElement* element;
+  MVertex *a,*b,*c,*d;
+  MVertex *p,*q,*r,*s;
+  std::set<MElement*> verif;
+  Hex *hex;
+
+  for(i=0;i<gr->getNumMeshElements();i++){
+    element = gr->getMeshElement(i);
+    //diagonal(element,index1,index2);
+    // todo: ici, boucle sur index
+    for (index1=0;index1<4;index1++){
+      for (index2=index1+1;index2<4;index2++){
+        two_others(index1,index2,index3,index4);
+
+        b = element->getVertex(index1);
+        d = element->getVertex(index2);
+        a = element->getVertex(index3);
+        c = element->getVertex(index4);
+
+        verif.clear();
+        find(b,d,verif);
+        if(verif.size()==6){
+          s = find(a,b,d,c,verif);
+          p = find(b,c,d,a,verif);
+          if(s!=0 && p!=0){
+            r = find(s,b,d,a,verif);
+            q = find(p,b,d,c,verif);
+            if(r!=0 && q!=0){
+              hex = new Hex(a,s,b,c,d,r,q,p);
+              quality = min_scaled_jacobian(*hex);
+              hex->set_quality(quality);
+              fill_tet_to_hex_table(hex);
+
+              hex = new Hex(a,c,d,s,b,p,q,r);
+              quality = min_scaled_jacobian(*hex);
+              hex->set_quality(quality);
+              fill_tet_to_hex_table(hex);
+            }
+          }
+        }
+      }
+    }
+  }
+  cout << "Nb of hex found, pattern2: " << hex_to_tet.size()-size_init << endl;
+}
+
+
+void Recombinator_Graph::pattern3(GRegion* gr){
+  int size_init = hex_to_tet.size();
+  size_t i;
+  int index1,index2,index3,index4;
+  bool c1,c2,c3,c4,c5;
+  bool c6,c7,c8,c9,c10;
+  double quality;
+  MElement* element;
+  MVertex *a,*b,*c,*d;
+  MVertex *p,*q,*r,*s;
+  MVertex *fA,*fB,*bA,*bB;
+  std::set<MElement*> verif1;
+  std::set<MElement*> verif2;
+  Hex *hex;
+
+  for(i=0;i<gr->getNumMeshElements();i++){
+    element = gr->getMeshElement(i);
+    //diagonal(element,index1,index2);
+    // todo: ici, boucle sur index
+    for (index1=0;index1<4;index1++){
+      for (index2=index1+1;index2<4;index2++){
+        two_others(index1,index2,index3,index4);
+
+        b = element->getVertex(index1);
+        d = element->getVertex(index2);
+        a = element->getVertex(index3);
+        c = element->getVertex(index4);
+
+        verif1.clear();
+        verif2.clear();
+        find(b,d,verif1);
+        find(a,c,verif2);
+
+        if(verif1.size()==4 && verif2.size()==4){
+          fA = find(b,d,a,c,verif1);
+          fB = find(b,d,c,a,verif1);
+          bA = find(a,c,b,d,verif2);
+          bB = find(a,c,d,b,verif2);
+
+          if(fA!=0 && fB!=0 && bA!=0 && bB!=0 && fA!=fB && bA!=bB){
+            if(scalar(fA,fB,a,b)>scalar(fA,fB,b,c) && scalar(bA,bB,a,b)>scalar(bA,bB,b,c)){
+              if(distance(fA,b,c)<distance(fB,b,c)){
+                p = fA;
+                q = fB;
+              }
+              else{
+                p = fB;
+                q = fA;
+              }
+
+              if(distance(bA,b,c)<distance(bB,b,c)){
+                r = bA;
+                s = bB;
+              }
+              else{
+                r = bB;
+                s = bA;
+              }
+
+              c1 = linked(b,p);
+              c2 = linked(c,p);
+              c3 = linked(p,q);
+              c4 = linked(a,q);
+              c5 = linked(d,q);
+
+              c6 = linked(b,r);
+              c7 = linked(c,r);
+              c8 = linked(r,s);
+              c9 = linked(a,s);
+              c10 = linked(d,s);
+
+              if(c1 && c2 && c3 && c4 && c5 && c6 && c7 && c8 && c9 && c10){
+                hex = new Hex(p,c,r,b,q,d,s,a);
+                quality = min_scaled_jacobian(*hex);
+                hex->set_quality(quality);
+                fill_tet_to_hex_table(hex);
+              }
+            }
+            else if(scalar(fA,fB,a,b)<=scalar(fA,fB,b,c) && scalar(bA,bB,a,b)<=scalar(bA,bB,b,c)){
+              if(distance(fA,a,b)<distance(fB,a,b)){
+                p = fA;
+                q = fB;
+              }
+              else{
+                p = fB;
+                q = fA;
+              }
+
+              if(distance(bA,a,b)<distance(bB,a,b)){
+                r = bA;
+                s = bB;
+              }
+              else{
+                r = bB;
+                s = bA;
+              }
+
+              c1 = linked(b,p);
+              c2 = linked(a,p);
+              c3 = linked(p,q);
+              c4 = linked(c,q);
+              c5 = linked(d,q);
+
+              c6 = linked(b,r);
+              c7 = linked(a,r);
+              c8 = linked(r,s);
+              c9 = linked(c,s);
+              c10 = linked(d,s);
+
+              if(c1 && c2 && c3 && c4 && c5 && c6 && c7 && c8 && c9 && c10){
+                hex = new Hex(p,b,r,a,q,c,s,d);
+                quality = min_scaled_jacobian(*hex);
+                hex->set_quality(quality);
+                fill_tet_to_hex_table(hex);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  cout << "Nb of hex found, pattern3: " << hex_to_tet.size()-size_init << endl;
+}
+
+
+// check if hex is ok, and insert in "potential" table
+void Recombinator_Graph::fill_tet_to_hex_table(Hex *hex){
+  const bool very_verbose = false;
+
+  const bool bypass=true;
+
+
+  if (very_verbose){
+    cout << " fill_tet_to_hex_table:: treating hex " << hex << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << hex->getVertex(i)->getNum();
+    cout << endl;
+  }
+
+
+  if (!valid(*hex)){
+    if (very_verbose) cout << "NOT VALID hex !!! " << endl;
+    delete hex;
+    return;
+  }
+
+  MElement *element;
+  std::set<MElement*> parts;
+  // recovering all the tets forming the current hex
+  parts.clear();
+  find(hex->get_a(),*hex,parts);
+  find(hex->get_b(),*hex,parts);
+  find(hex->get_c(),*hex,parts);
+  find(hex->get_d(),*hex,parts);
+  find(hex->get_e(),*hex,parts);
+  find(hex->get_f(),*hex,parts);
+  find(hex->get_g(),*hex,parts);
+  find(hex->get_h(),*hex,parts);
+
+  if(!valid(*hex,parts)){
+    if (very_verbose) cout << " NOT VALID hex (parts) " << endl;
+    delete hex;
+    return;
+  }
+
+  // storing all tets in tet_to_hex database (for use in indirect neighbors)
+  // first, check if the hex has the right number of vertices (=8 !!!)
+  // non, c'est pas toujours le cas !!! ???
+
+  set<MVertex*> vertices;
+  for(std::set<MElement*>::iterator it=parts.begin();it!=parts.end();it++){
+    element = *it;
+    for (int i=0;i<4;i++){
+      vertices.insert(element->getVertex(i));
+    }
+  }
+
+  if (vertices.size()!=8){
+    if (very_verbose) cout << "------------- WARNING !!!!! An hex has " << vertices.size() << "vertices" << endl;
+    delete hex;
+    return;
+  }
+
+
+
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // le test suivant déconne, cf. cube à 125 hex... sais pas pourquoi, mais ça élimine des hex potentiels tout à fait valides (et nécessaires à la solution optimale)!!!
+  // dans le cas cube125: ce test fait passer le #hex potentiels recensés par les patterns de recombinaison d'environ 1000 à 2434 ??? !!!, ça double aussi le nbre d'hex dans le graphe des pertes
+  // en fait, si les noeuds par exemple a b c d deviennent b c d a, on a une rotation et un hex tout pourri... mais qui a même hash et mêmes noeuds ?!?!
+  // now, check if the hex already exists...
+  if (!bypass){
+    std::multimap<unsigned long long, Hex* >::const_iterator itfind = find_the_created_potential_hex(hex,created_potential_hex);
+    if (itfind!=created_potential_hex.end()){
+      delete hex;
+      if (very_verbose) cout <<  "------------- WARNING !!!!! fill_tet_to_hex_table:: current hex already exists in the created potentiel hex database. Not adding the hex." << endl;
+      return;
+    }
+  }
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+  // TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!  TODO !!!!
+
+
+
+  // counting the number of triangular external faces. If different from 12, discard the hex !
+  // if not, build the face/hex table
+  std::multimap<unsigned long long, pair<PETriangle*,int> > faces_temp;
+  for(std::set<MElement*>::iterator it_tet=parts.begin();it_tet!=parts.end();it_tet++){// for all tets
+    for (int i=0;i<4;i++){// for all faces
+      MFace f = (*it_tet)->getFace(i);
+      add_face(f.getVertex(0), f.getVertex(1), f.getVertex(2), faces_temp);
+    }
+  }
+
+  int count=0;
+  std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator it_face = faces_temp.begin();
+  std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator it_faceen = faces_temp.end();
+  for (;it_face!=it_faceen;it_face++)// counting
+    if (it_face->second.second==1)
+      count++;
+
+  if (count!=12){
+    if (very_verbose) cout <<  "------------- WARNING !!!!! fill_tet_to_hex_table:: hex  has " << count << " faces ... discard the hex." << endl;
+    delete hex;
+    return;
+  }
+
+
+  it_face = faces_temp.begin();
+  for (;it_face!=it_faceen;it_face++){// for all faces, storing the external faces
+    PETriangle *t=it_face->second.first;
+    if (it_face->second.second==1)
+      add_face(t->getVertex(0), t->getVertex(1), t->getVertex(2), hex);
+    else
+      delete t;
+  }
+
+  // eventually storing the hex !
+  for(std::set<MElement*>::iterator it=parts.begin();it!=parts.end();it++){
+    element = *it;
+    created_potential_hex.insert(make_pair(hex->get_hash(),hex));
+    add_edges(hex);
+    tet_to_hex[element].insert(hex);
+    hex_to_tet[hex].insert(element);
+  }
+
+  if (very_verbose){
+    export_single_hex_all(hex,"");
+  }
+}
+
+
+void Recombinator_Graph::buildGraphOnly(unsigned int max_nb_cliques,string filename){
+  GRegion* gr;
+  GModel* model = GModel::current();
+  GModel::riter it;
+
+  for(it=model->firstRegion();it!=model->lastRegion();it++)
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        buildGraphOnly(gr, max_nb_cliques,filename);
+      }
+    }
+}
+
+
+void Recombinator_Graph::buildGraphOnly(GRegion* gr, unsigned int max_nb_cliques,string filename){
+  printf("................HEXAHEDRA................\n");
+
+  hex_to_tet.clear();
+  tet_to_hex.clear();
+  created_potential_hex.clear();
+
+  build_tuples(gr);
+
+  Msg::Info("Building Connectivity...");
+  build_vertex_to_vertices(gr);
+  build_vertex_to_elements(gr);
+
+  pattern1(gr);
+  Msg::Info("Hex-merging pattern nb. 1...");
+  pattern2(gr);
+  Msg::Info("Hex-merging pattern nb. 2...");
+  pattern3(gr);
+  Msg::Info("Hex-merging pattern nb. 3...");
+
+
+
+  create_losses_graph(gr);
+  compute_hex_ranks();
+  found_the_ultimate_max_clique=false;
+}
+
+
+
+void Recombinator_Graph::execute(){
+  GRegion* gr;
+  GModel* model = GModel::current();
+  GModel::riter it;
+
+  model->writeMSH("beforeyamakawa.msh");
+
+  for(it=model->firstRegion();it!=model->lastRegion();it++)
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        execute(gr);
+      }
+    }
+}
+
+
+void Recombinator_Graph::execute_blossom(unsigned int max_nb_cliques,string filename){
+  GRegion* gr;
+  GModel* model = GModel::current();
+  GModel::riter it;
+
+  model->writeMSH("beforeyamakawa.msh");
+
+  for(it=model->firstRegion();it!=model->lastRegion();it++)
+    {
+      gr = *it;
+      if(gr->getNumMeshElements()>0){
+        execute_blossom(gr, max_nb_cliques,filename);
+      }
+    }
+}
+
+
+Recombinator_Graph::~Recombinator_Graph(){
+  for (iter it = triangular_faces.begin();it!=triangular_faces.end();it++){
+    delete it->second;
+  }
+  for (linemap::iterator it = edges_and_diagonals.begin();it!=edges_and_diagonals.end();it++){
+    delete it->second;
+  }
+}
+
+
+void Recombinator_Graph::createBlossomInfo(){
+
+  throw;
+
+
+  GRegion* gr;
+  GModel* model = GModel::current();
+  GModel::riter it;
+
+  for(it=model->firstRegion();it!=model->lastRegion();it++)
+    {
+      gr = *it;
+      //    if(gr->getNumMeshElements()>0){
+      createBlossomInfo(gr);
+      //    }
+    }
+}
+
+
+void Recombinator_Graph::createBlossomInfo(GRegion *gr){
+
+  throw;
+
+
+  // remove quads, create triangles, and store blossom information (triangles pairs)
+  std::list<GFace*> faces = gr->faces();
+  GFace *gf;
+  MElement *element;
+  PETriangle *t11, *t12, *t21, *t22;
+
+  cout << "recover blossom info" << endl;
+
+  for(std::list<GFace*>::iterator it=faces.begin();it!=faces.end();it++){
+    gf = *it;
+
+    std::vector<MQuadrangle*>::iterator it_quad = gf->quadrangles.begin();
+
+    for (;it_quad!=gf->quadrangles.end();it_quad++){
+      element = *it_quad;
+
+      // recovering triangular faces
+      t11 = get_triangle(element, 0,1,2);
+      t12 = get_triangle(element, 0,2,3);
+      t21 = get_triangle(element, 0,1,3);
+      t22 = get_triangle(element, 1,2,3);
+
+      // creating blossom info (pairs of triangles)
+      blossom_info[t11] = t12;
+      blossom_info[t12] = t11;
+      blossom_info[t21] = t22;
+      blossom_info[t22] = t21;
+
+      tri_to_gface_info[t11] = gf;
+      tri_to_gface_info[t12] = gf;
+      tri_to_gface_info[t21] = gf;
+      tri_to_gface_info[t22] = gf;
+
+      // adding triangles
+      gf->addTriangle(new MTriangle(element->getVertex(0), element->getVertex(1), element->getVertex(2)));
+      gf->addTriangle(new MTriangle(element->getVertex(0), element->getVertex(2), element->getVertex(3)));
+
+    }
+    // deleting quads
+    gf->quadrangles.clear();
+  }
+
+
+  //  // cut pyramids in 2 tets, remove pyramids
+  //  std::vector<MPyramid*>::iterator it_pyramid = gr->pyramids.begin();
+  //  MPyramid *p;
+  //  vector<const MVertex*>v;
+  //  citer it_find_tri;
+  //  cout << "start cutting pyramids" << endl;
+  //  for (;it_pyramid!=gr->pyramids.end();it_pyramid++){
+  //    // arbirary cut of the pyramid...
+  //    p = *it_pyramid;
+  //    // add tets
+  //    gr->addTetrahedron(new MTetrahedron(p->getVertex(0), p->getVertex(1),p->getVertex(2),p->getVertex(4)));
+  //    gr->addTetrahedron(new MTetrahedron(p->getVertex(0), p->getVertex(2),p->getVertex(3),p->getVertex(4)));
+  //
+  //    // add triangles to the right GFace
+  //    v.clear();
+  //    v.push_back(p->getVertex(0));
+  //    v.push_back(p->getVertex(1));
+  //    v.push_back(p->getVertex(2));
+  //    t11 = new PETriangle(v);
+  //    it_find_tri = find_the_triangle(t11, triangular_faces);
+  //    if (it_find_tri != triangular_faces.end()){
+  //      std::list<GFace*>::iterator it_find_face = std::find(faces.begin(), faces.end(),tri_to_gface_info[it_find_tri->second]);
+  //      if (it_find_face!=faces.end()){
+  //        (*it_find_face)->addTriangle(new MTriangle(p->getVertex(0), p->getVertex(1), p->getVertex(2)));
+  //      }
+  //      else
+  //        cout << "WARNING blossom: face not found !  Can't add triangle !" << endl;
+  //    }
+  //    else
+  //      cout << "WARNING blossom: triangle not found ! " << endl;
+  //    delete t11;
+  //
+  //    v.clear();
+  //    v.push_back(p->getVertex(0));
+  //    v.push_back(p->getVertex(2));
+  //    v.push_back(p->getVertex(3));
+  //    t11 = new PETriangle(v);
+  //    it_find_tri = find_the_triangle(t11, triangular_faces);
+  //    if (it_find_tri != triangular_faces.end()){
+  //      std::list<GFace*>::iterator it_find_face = std::find(faces.begin(), faces.end(),tri_to_gface_info[it_find_tri->second]);
+  //      if (it_find_face!=faces.end()){
+  //        (*it_find_face)->addTriangle(new MTriangle(p->getVertex(0), p->getVertex(2),p->getVertex(3)));
+  //      }
+  //      else
+  //        cout << "WARNING blossom: face not found ! Can't add triangle !" << endl;
+  //    }
+  //    else
+  //      cout << "WARNING blossom: triangle not found ! " << endl;
+  //    delete t11;
+  //  }
+  //  // erase all pyramids
+  //  cout << "erasing all pyramids" << endl;
+  //  gr->pyramids.clear();
+
+
+
+
+}
+
+
+void Recombinator_Graph::execute_blossom(GRegion* gr, unsigned int max_nb_cliques,string filename){
+
+
+  throw;
+
+  printf("................HEXAHEDRA................\n");
+
+  hex_to_tet.clear();
+  tet_to_hex.clear();
+  created_potential_hex.clear();
+
+  build_tuples(gr);
+
+  Msg::Info("Building Connectivity...");
+
+  double a = Cpu();
+
+  build_vertex_to_vertices(gr);
+  build_vertex_to_elements(gr);
+
+  pattern1(gr);
+  Msg::Info("Hex-merging pattern nb. 1...");
+  pattern2(gr);
+  Msg::Info("Hex-merging pattern nb. 2...");
+  pattern3(gr);
+  Msg::Info("Hex-merging pattern nb. 3...");
+
+
+  create_losses_graph(gr);
+  // add points to potential hexas containing original blossom pairs of triangles
+  compute_hex_ranks_blossom();
+
+  double time_building_graph = (Cpu() - a);
+
+
+  a=Cpu();
+  // a criteria to stop when the whole domain is exclusively composed of hex
+  clique_stop_criteria<Hex*> criteria(hex_to_tet, gr->tetrahedra.size());
+
+  cliques_losses_graph<Hex*> cl(incompatibility_graph, hex_ranks, max_nb_cliques, hex_to_tet.size(),&criteria,export_the_clique_graphviz_format);
+  cl.find_cliques();
+  //cl.export_cliques();
+
+
+  double time_cliques = (Cpu() - a) ;
+
+  cout << "RECOMBINATOR_GRAPH timing:" << endl;
+  cout << "  ------- TIME BUILDING GRAPH : " << time_building_graph << " s." << endl;
+  cout << "  ------- TIME CLIQUE         : " << time_cliques << " s." << endl;
+
+
+
+  int clique_number = 0;
+
+  if (filename.empty()) filename.assign("mygraph.dot");
+  //  export_clique_graphviz_format(cl,1,"mygraph2.dot");
+  export_the_clique_graphviz_format(cl,clique_number,filename);
+
+  merge_clique(gr,cl,clique_number);
+
+
+
+
+
+  rearrange(gr);
+  statistics(gr);
+  modify_surfaces(gr);
+
+
+
+  return;
+
+
+
+  //  create_indirect_neighbors_graph();
+  //  update_degree(gr,true);
+  //  create_compatibility_graph();
+  //
+  //
+  //  cout << "size edges : " << edges.size() << endl;
+  //  cout << "size degree : " << idegree.size() << endl;
+  //  cout << "size hex_to_tet : " << hex_to_tet.size() << endl;
+  //
+  //  hash_tableA.clear();
+  //  hash_tableB.clear();
+  //  hash_tableC.clear();
+  //
+  //  export_direct_neighbor_table(50);
+  //  merge(gr);
+  //
+  //  rearrange(gr);
+  //
+  //  statistics(gr);
+  //
+  //  modify_surfaces(gr);
+}
+
+
+// return the triangular face ijk if it exists. If not, creates it and returns it.
+PETriangle* Recombinator_Graph::get_triangle(MElement *element, int i, int j, int k){
+  vector<const MVertex*> v;
+  PETriangle *t;
+  v.push_back(element->getVertex(i));
+  v.push_back(element->getVertex(j));
+  v.push_back(element->getVertex(k));
+  t = new PETriangle(v);
+  citer itfind = find_the_triangle(t,triangular_faces);
+  if (itfind==triangular_faces.end()){
+    itfind = triangular_faces.insert(make_pair(t->get_hash(),t));
+  }
+  else{
+    delete t;
+    t = itfind->second;
+  }
+  return t;
+}
+
+Recombinator_Graph::Recombinator_Graph(unsigned int _n,string filename):max_nb_cliques(_n),graphfilename(filename){
+}
+
+void Recombinator_Graph::execute(GRegion* gr){
+  printf("................HEXAHEDRA................\n");
+
+  hex_to_tet.clear();
+  tet_to_hex.clear();
+  created_potential_hex.clear();
+
+  build_tuples(gr);
+
+  Msg::Info("Building Connectivity...");
+  build_vertex_to_vertices(gr);
+  build_vertex_to_elements(gr);
+
+  pattern1(gr);
+  Msg::Info("Hex-merging pattern nb. 1...");
+  pattern2(gr);
+  Msg::Info("Hex-merging pattern nb. 2...");
+  pattern3(gr);
+  Msg::Info("Hex-merging pattern nb. 3...");
+
+
+
+  create_losses_graph(gr);
+  compute_hex_ranks();
+
+
+  // a criteria to stop when the whole domain is exclusively composed of hex
+  found_the_ultimate_max_clique=false;
+  clique_stop_criteria<Hex*> criteria(hex_to_tet, gr->tetrahedra.size());
+
+
+  cliques_losses_graph<Hex*> cl(incompatibility_graph, hex_ranks, max_nb_cliques, hex_to_tet.size(),&criteria,export_the_clique_graphviz_format);
+  cl.find_cliques();
+  //cl.export_cliques();
+
+
+  found_the_ultimate_max_clique = cl.found_the_ultimate_max_clique;
+
+
+
+  int clique_number = 0;
+  if (graphfilename.empty()) graphfilename.assign("mygraph.dot");
+  //export_clique_graphviz_format(cl,1,"mygraph2.dot");
+  export_the_clique_graphviz_format(cl,clique_number,graphfilename);
+
+  merge_clique(gr,cl,clique_number);
+
+  rearrange(gr);
+  statistics(gr);
+  modify_surfaces(gr);
+
+
+
+  return;
+
+
+
+  //  create_indirect_neighbors_graph();
+  //  update_degree(gr,true);
+  //  create_compatibility_graph();
+  //
+  //
+  //  cout << "size edges : " << edges.size() << endl;
+  //  cout << "size degree : " << idegree.size() << endl;
+  //  cout << "size hex_to_tet : " << hex_to_tet.size() << endl;
+  //
+  //  hash_tableA.clear();
+  //  hash_tableB.clear();
+  //  hash_tableC.clear();
+  //
+  //  export_direct_neighbor_table(50);
+  //  merge(gr);
+  //
+  //  rearrange(gr);
+  //
+  //  statistics(gr);
+  //
+  //  modify_surfaces(gr);
+}
+
+
+void Recombinator_Graph::merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &cl,int clique_number){
+
+  multimap<int,set<Hex*> >::reverse_iterator it_all = cl.allQ.rbegin();
+  multimap<int,set<Hex*> >::reverse_iterator it_allen = cl.allQ.rend();
+  int clique_counter=0;
+  std::set<MElement*> parts;
+  int clique_size=0;
+
+  for (int i=0;i<clique_number;i++){
+    it_all++;
+  }
+
+  for (;it_all!=it_allen;it_all++,clique_counter++){
+    if (clique_counter>=1) break;
+
+    //cout << "--------------------- clique " << clique_counter << " made of ";
+    clique_size = it_all->second.size();
+    set<Hex*>::iterator ithex = it_all->second.begin();
+    set<Hex*>::iterator ithexen = it_all->second.end();
+    double quality=0.;
+    int count=0;
+
+    hash_tableA.clear();
+    hash_tableB.clear();
+    hash_tableC.clear();
+
+    //    // sorting the hexahedra from the clique...
+    //    multimap<double, Hex*> rank;
+    //    create_boundaries_info_for_hex_ranking(gr);
+    //    for (;ithex!=ithexen;ithex++){
+    //      rank.insert(make_pair(get_hex_rank(*ithex),*ithex));
+    //      //cout << "rank:" << get_hex_rank(*ithex) << endl;
+    //    }
+    //    multimap<double, Hex*>::iterator it_rank = rank.begin();
+    //    multimap<double, Hex*>::iterator it_ranken = rank.end();
+
+    //    set<Hex*> hex_to_export;
+
+    for (;ithex!=ithexen;ithex++){ // brutal post-check: random pickup of hexahedra in clique
+      Hex *current_hex = *ithex;
+
+
+      //        cout << " clique merge: treating hex " << current_hex << " made of ";
+      //        for (int i=0;i<8;i++)
+      //          cout << "  " << current_hex->getVertex(i)->getNum();
+      //        cout << endl;
+
+
+
+      //    for (;it_rank!=it_ranken;it_rank++) // smarter post-check: sorting hexahedra first...
+      //      Hex *current_hex = it_rank->second;
+
+      //      export_single_hex_all(current_hex,"");
+
+      if (!post_check_validation(current_hex))
+        continue;
+
+      // inserting the hex
+      quality = quality + current_hex->get_quality();
+      gr->addHexahedron(new MHexahedron(current_hex->get_a(), current_hex->get_b(),current_hex->get_c(),current_hex->get_d(),current_hex->get_e(),current_hex->get_f(),current_hex->get_g(),current_hex->get_h()));
+      count++;
+      //      hex_to_export.insert(current_hex);
+      //      cout << " inserting " << current_hex << " made of ";
+      //      for (int i=0;i<8;i++)
+      //        cout << "  " << current_hex->getVertex(i)->getNum();
+      //      cout << endl;
+
+
+      // removing tets
+      //      if (debug) cout << "  removing tets" << endl;
+      std::set<MElement*>::iterator it_tet_to_remove = hex_to_tet[current_hex].begin();
+      std::vector<MTetrahedron*>::iterator itfind_tet_region;
+      for (;it_tet_to_remove!=hex_to_tet[current_hex].end();it_tet_to_remove++){
+        itfind_tet_region = std::find(gr->tetrahedra.begin(),gr->tetrahedra.end(),(MTetrahedron*)(*it_tet_to_remove));
+        if (itfind_tet_region!=gr->tetrahedra.end())
+          gr->tetrahedra.erase(itfind_tet_region);
+        //        else
+        //          cout << " WARNING: MTetrahedron* " << (MTetrahedron*)(*it_tet_to_remove) << " not found !!! " << endl;
+      }
+
+
+      build_hash_tableA(*current_hex);
+      build_hash_tableB(*current_hex);
+      build_hash_tableC(*current_hex);
+
+    }
+
+
+    //    // removing tets
+    //    for (set<Hex*>::iterator it_hex = hex_to_export.begin();it_hex!=hex_to_export.end();it_hex++){
+    //      Hex *current_hex = *it_hex;
+    //      if (debug) cout << "  removing tets" << endl;
+    //      std::set<MElement*>::iterator it_tet_to_remove = hex_to_tet[current_hex].begin();
+    //      std::vector<MTetrahedron*>::iterator itfind_tet_region;
+    //      for (;it_tet_to_remove!=hex_to_tet[current_hex].end();it_tet_to_remove++){
+    //        itfind_tet_region = std::find(gr->tetrahedra.begin(),gr->tetrahedra.end(),(MTetrahedron*)(*it_tet_to_remove));
+    //        if (itfind_tet_region!=gr->tetrahedra.end())
+    //          gr->tetrahedra.erase(itfind_tet_region);
+    //        else
+    //          cout << " WARNING: MTetrahedron* " << (MTetrahedron*)(*it_tet_to_remove) << " not found !!! " << endl;
+    //      }
+    //    }
+
+
+    //export_all_hex(clique_counter,gr);
+    // removing hexahedron
+    //gr->hexahedra.clear();
+
+
+    cout << " ------------------------------------------ #hex potentiels recensés par les patterns de recombinaison: " << hex_to_tet.size() << endl;
+    cout << " ------------------------------------------ #hex potentiels recensés dans le graphe des pertes: " << nbhex_in_losses_graph << "   #connectivité moyenne: " << average_connectivity<< endl;
+    cout << " ------------------------------------------ CLIQUE SIZE " << clique_size << endl;
+    cout << " ------------------------------------------ Recombinator_Graph::merge_clique: nb hex created = " << count << endl;
+    printf("hexahedra average quality (0->1) : %f\n",quality/count);
+  }
+
+  //  // exporting all hex infos
+  //  for (set<Hex*>::iterator it=hex_to_export.begin();it!=hex_to_export.end();it++){
+  //    Hex *hex = *it;
+  //    cout << hex << " made of ";
+  //    for (int i=0;i<8;i++){
+  //      cout << "(" << hex->getVertex(i)->x() << "," << hex->getVertex(i)->y() << "," << hex->getVertex(i)->z() << ") ";
+  //    }
+  //    cout << endl;
+  //  }
+}
+
+
+
+void Recombinator_Graph::merge(GRegion* gr){
+  throw;
+}
+
+
+void Recombinator_Graph::export_tets(set<MElement*> &tetset, Hex* hex, string s){
+  stringstream ss;
+  ss << s.c_str();
+  ss << "hexptr_";
+  ss << hex;
+  ss << "_tetparts.pos";
+  ofstream out(ss.str().c_str());
+
+  out << "View \"hex tets parts\" {" << endl;
+  std::set<MElement*>::iterator it = tetset.begin();
+  std::set<MElement*>::iterator iten = tetset.end();
+  int count=0;
+  for (;it!=iten;it++,count++){
+    out << "SS(";
+    for (int n=0;n<4;n++){
+      const MVertex *v = (*it)->getVertex(n);
+      out << v->x() << "," << v->y() << "," << v->z();
+      if (n!=3) out << ",";
+    }
+    out << "){";
+    for (int n=0;n<4;n++){
+      out << count;
+      if (n!=3) out << ",";
+    }
+    out << "};" << endl;
+
+  }
+  out << "};" << endl;
+  out.close();
+}
+
+
+void Recombinator_Graph::export_single_hex_tet(Hex* hex,string s){
+  stringstream ss;
+  ss << s.c_str();
+  ss << "hexptr_";
+  ss << hex;
+  ss << "_tet.pos";
+  ofstream out(ss.str().c_str());
+
+  out << "View \"hex tets\" {" << endl;
+  std::set<MElement*>::iterator it = hex_to_tet[hex].begin();
+  std::set<MElement*>::iterator iten = hex_to_tet[hex].end();
+  int count=0;
+  for (;it!=iten;it++,count++){
+    out << "SS(";
+    for (int n=0;n<4;n++){
+      const MVertex *v = (*it)->getVertex(n);
+      out << v->x() << "," << v->y() << "," << v->z();
+      if (n!=3) out << ",";
+    }
+    out << "){";
+    for (int n=0;n<4;n++){
+      out << count;
+      if (n!=3) out << ",";
+    }
+    out << "};" << endl;
+
+  }
+  out << "};" << endl;
+  out.close();
+}
+
+
+void Recombinator_Graph::export_single_hex_all(Hex* hex,string s){
+  export_single_hex(hex, s);
+  export_single_hex_tet(hex, s);
+  export_single_hex_faces(hex, s);
+}
+
+
+void Recombinator_Graph::export_single_hex(Hex* hex,string s){
+  stringstream ss;
+  ss << s.c_str();
+  ss << "hexptr_";
+  ss << hex;
+  ss << ".pos";
+  ofstream out(ss.str().c_str());
+
+  out << "View \"hex\" {" << endl;
+  out << "SH(";
+  for (int n=0;n<8;n++){
+    const MVertex *v = hex->getVertex(n);
+    out << v->x() << "," << v->y() << "," << v->z();
+    if (n!=7) out << ",";
+  }
+  out << "){";
+  for (int n=0;n<8;n++){
+    out << "0.";
+    if (n!=7) out << ",";
+  }
+  out << "};" << endl;
+
+  out << "};" << endl;
+  out.close();
+}
+
+
+
+void Recombinator_Graph::export_single_hex_faces(Hex* hex,string s){
+  stringstream ss;
+  ss << s.c_str();
+  ss << "hexptr_";
+  ss << hex;
+  ss << "_face.pos";
+  ofstream out(ss.str().c_str());
+
+  out << "View \"hex faces\" {" << endl;
+  std::set<PETriangle*>::iterator it = hex_to_faces[hex].begin();
+  std::set<PETriangle*>::iterator iten = hex_to_faces[hex].end();
+  int count=0;
+  for (;it!=iten;it++,count++){
+    out << "ST(";
+    for (int n=0;n<3;n++){
+      const MVertex *v = (*it)->getVertex(n);
+      out << v->x() << "," << v->y() << "," << v->z();
+      if (n!=2) out << ",";
+    }
+    out << "){";
+    for (int n=0;n<3;n++){
+      out << count;
+      if (n!=2) out << ",";
+    }
+    out << "};" << endl;
+
+  }
+  out << "};" << endl;
+  out.close();
+}
+
+
+
+void Recombinator_Graph::export_hex_init_degree(GRegion *gr, const std::map<Hex*,int> &init_degree, const vector<Hex*> &chosen_hex){
+  stringstream ss;
+  ss << "init_degree";
+  ss << ".pos";
+  ofstream out(ss.str().c_str());
+
+  std::vector<Hex*>::const_iterator it = chosen_hex.begin();
+  out << "View \"hex\" {" << endl;
+  for (;it!=chosen_hex.end();it++){
+    out << "SH(";
+    for (int n=0;n<8;n++){
+      MVertex *v = (*it)->getVertex(n);
+      out << v->x() << "," << v->y() << "," << v->z();
+      if (n!=7) out << ",";
+    }
+    map<Hex*,int>::const_iterator itfind = init_degree.find(*it);
+    out << "){";
+    for (int n=0;n<8;n++){
+      out << itfind->second;
+      if (n!=7) out << ",";
+    }
+    out << "};" << endl;
+
+  }
+  out << "};" << endl;
+
+
+
+  out.close();
+}
+
+
+void Recombinator_Graph::export_hexmesh_so_far(int &file){
+  stringstream ss;
+  stringstream ssinit;
+  ss << "hex_mesh_temp";
+  char chose[256];
+  sprintf(chose, "_%0*d", 6, file);
+  ss << chose;
+  ss << ".msh";
+  ofstream out(ss.str().c_str());
+
+  GModel* model = GModel::current();
+  model->save(ss.str().c_str());
+
+  out.close();
+}
+
+
+
+void Recombinator_Graph::export_all_hex(int &file, GRegion *gr){
+  stringstream ss;
+  stringstream ssinit;
+  ss << "hex_progression";
+  ssinit << "hex_progression_initdegree";
+  //  ss << file;
+  char chose[256];
+  sprintf(chose, "_%0*d", 6, file);
+  ss << chose;
+  ss << ".pos";
+  ssinit << chose;
+  ssinit << ".pos";
+  ofstream out(ss.str().c_str());
+
+  std::vector<MHexahedron*>::iterator it = gr->hexahedra.begin();
+  int i=1;
+  out << "View \"hex\" {" << endl;
+  for (;it!=gr->hexahedra.end();it++,i++){
+    out << "SH(";
+    for (int n=0;n<8;n++){
+      MVertex *v = (*it)->getVertex(n);
+      out << v->x() << "," << v->y() << "," << v->z();
+      if (n!=7) out << ",";
+    }
+    out << "){";
+    for (int n=0;n<8;n++){
+      out << i;
+      if (n!=7) out << ",";
+    }
+    out << "};" << endl;
+
+  }
+  out << "};" << endl;
+
+
+
+  out.close();
+}
+
+
+// check if the hex is good enough to be put into the graph. If not in the graph, it cannot be chosen...
+bool Recombinator_Graph::is_not_good_enough(Hex* hex){
+
+  //  // Hack
+  //  return false;
+  //  // End Hack
+
+
+  //if((!faces_statuquo(*hex))){
+  //if((hex->get_quality()<0.45)||(!faces_statuquo(*hex))){
+  if((hex->get_quality()<0.5)||(!faces_statuquo(*hex))){
+    //if((hex->get_quality()<0.55)||(!faces_statuquo(*hex))){
+    //if((hex->get_quality()<0.72)||(!faces_statuquo(*hex))){
+    //if((hex->get_quality()<0.65)||(!faces_statuquo(*hex))){
+    return true;
+  }
+  return false;
+}
+
+
+// fills incompatibility_graph if two hex share a common (non-sliver!) tet
+void Recombinator_Graph::create_indirect_neighbors_graph()
+{
+  std::map<MElement*, std::set<Hex*> >::iterator it_tet = tet_to_hex.begin();
+
+  for (;it_tet!=tet_to_hex.end();it_tet++){
+    std::set<Hex*>::iterator it_hex1 = it_tet->second.begin();
+    for (;it_hex1!=it_tet->second.end();it_hex1++){
+      Hex *hex = *it_hex1;
+
+      //      cout << " create_indirect_neighbors_graph:: treating hex " << hex << " made of ";
+      //      for (int i=0;i<8;i++)
+      //        cout << "  " << hex->getVertex(i)->getNum();
+      //      cout << endl;
+
+      if (is_not_good_enough(hex)){
+        continue;
+      }
+      graph::iterator itfind_graph = find_hex_in_graph(hex);
+      if (itfind_graph==incompatibility_graph.end()){
+        incompatibility_graph.insert(make_pair(hex->get_hash(),make_pair(hex,graph_data())));// this creates an entry if none exists. Important ! if hex is good, but surrounded by "not good enough" hex, it has to be in the graph anyway ! A single node in the graph, without any connection... the perfect lonely hex.
+        set_of_all_hex_in_graph.insert(hex);
+      }
+      // check if the hex quality is sufficient to be put into the graph...
+      //cout << "creating graph for hex " << hex << " with quality " << hex->get_quality() << endl;
+      //      if (hex->get_quality()>=0.1)
+      // check if the tet is a sliver or not...
+      // if sliver, the tet should not be taken into account in the graph creation !
+      bool is_sliver = sliver(it_tet->first,*hex);
+      if (!is_sliver){
+        //cout << " is not sliver, size it_tet->second:" << it_tet->second.size() << endl;
+        std::set<Hex*>::iterator it_hex2 = it_tet->second.begin();
+        for (;it_hex2!=it_tet->second.end();it_hex2++){
+          if ((hex)!=(*it_hex2)){
+            if (is_not_good_enough(*it_hex2)){
+              continue;
+            }
+            //cout << "   hex put in graph, linked to hex " << *it_hex2 << endl;
+            add_graph_entry(hex,*it_hex2);
+            //cout << "hex's " << hex << " and " << *it_hex2 << " have one tet in common: " << it_tet->first << endl;
+            //            incompatibility_graph[*it_hex2].insert(hex);
+          }
+        }
+      }
+      //      else{
+      //        cout << " hex's " << hex << " has a sliver !!!!!!!!!!!!!!! : " << it_tet->first << endl;
+      //      }
+    }
+  }
+}
+
+
+std::multimap<unsigned long long, Hex* >::const_iterator  Recombinator_Graph::find_the_created_potential_hex(Hex *hex, const std::multimap<unsigned long long, Hex*> &list){
+  std::pair<std::multimap<unsigned long long, Hex* >::const_iterator, std::multimap<unsigned long long, Hex* >::const_iterator> range = list.equal_range(hex->get_hash());
+  for (std::multimap<unsigned long long, Hex*>::const_iterator it=range.first;it!=range.second;it++){
+    Hex *candidate = it->second;
+    if (candidate->same_vertices(hex)){
+      return it;
+    }
+  }
+  return list.end();
+}
+
+
+std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator  Recombinator_Graph::find_the_triangle(PETriangle *t, std::multimap<unsigned long long, pair<PETriangle*, int> > &list){
+  std::pair<std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator, std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator> range = list.equal_range(t->get_hash());
+  for (std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator it=range.first;it!=range.second;it++){
+    PETriangle *candidate = it->second.first;
+    if (candidate->same_vertices(t)){
+      it->second.second++;
+      return it;
+    }
+  }
+  return list.end();
+}
+
+
+
+Recombinator_Graph::citer  Recombinator_Graph::find_the_triangle(PETriangle *t, const trimap &list){
+  std::pair<citer, citer> range = list.equal_range(t->get_hash());
+  for (citer it=range.first;it!=range.second;it++){
+    if (it->second->same_vertices(t)) return it;
+  }
+  return list.end();
+}
+
+
+Recombinator_Graph::linemap::const_iterator  Recombinator_Graph::find_the_line(PELine *t, const linemap &list){
+  std::pair<linemap::const_iterator, linemap::const_iterator> range = list.equal_range(t->get_hash());
+  for (linemap::const_iterator it=range.first;it!=range.second;it++){
+    if (it->second->same_vertices(t)) return it;
+  }
+  return list.end();
+}
+
+
+void Recombinator_Graph::export_direct_neighbor_table(int max){
+  stringstream ss;
+  ss << "neighbors_table";
+  ofstream out(ss.str().c_str());
+
+  std::multimap<int,Hex*>::iterator it =  ndegree.begin();
+
+  int counter=0;
+  out << " n  neighbors_rank hex* quality" << endl;
+  for (;it!=ndegree.end();it++,counter++){
+    if (counter>=max) break;
+    Hex *hex = it->second;
+    out << counter << "  " << it->first << "  " << hex << "  " << hex->get_quality() << endl;
+    stringstream ss2;
+    ss2 << "neighbors_table_hex";
+    char chose[256];
+    sprintf(chose, "_%0*d", 2, counter);
+    ss2 << chose;
+    ss2 << ".pos";
+    ofstream out2(ss2.str().c_str());
+    out2 << "View \"hex\" {" << endl;
+    out2 << "SH(";
+    for (int n=0;n<8;n++){
+      MVertex *v = hex->getVertex(n);
+      out2 << v->x() << "," << v->y() << "," << v->z();
+      if (n!=7) out2 << ",";
+    }
+    out2 << "){";
+    for (int n=0;n<8;n++){
+      out2 << it->first;
+      if (n!=7) out2 << ",";
+    }
+    out2 << "};" << endl;
+    out2 << "};" << endl;
+    out2.close();
+  }
+
+
+
+
+  out.close();
+}
+
+
+// if two hex are not connected in the incompatibility_graph, they are compatible
+void Recombinator_Graph::create_losses_graph(GRegion *gr)
+{
+  incompatibility_graph.clear();
+  create_indirect_neighbors_graph();
+  create_direct_neighbors_incompatibility_graph();
+
+
+  // stats
+  graph::iterator it =  incompatibility_graph.begin();
+  graph::iterator ite =  incompatibility_graph.end();
+  int total=0;
+  for (;it!=ite;it++){
+    total+=it->second.second.size();
+  }
+  nbhex_in_losses_graph = incompatibility_graph.size();
+  cout << "total=" << total << endl;
+  cout << "nbhex_in_losses_graph=" << nbhex_in_losses_graph << endl;
+  average_connectivity = total/((double)(nbhex_in_losses_graph));
+  cout << "#hex potentiels recensés dans le graphe des pertes: " << nbhex_in_losses_graph << "   #connectivité moyenne: " << average_connectivity<< endl;
+  cout << "#hex potentiels recensés par les patterns de recombinaison: " << hex_to_tet.size() << endl;
+};
+
+
+// TODO: check only the direct neighbors !!! change the algo pour ne as parcourir les hex qui ont un tet commun. cad Filter au niveau des faces... juste les faces extérieures de l'hex !!! et attention aux slivers, du coup... c'est sans doute la source du pb...
+
+// pour chaque hex, sortir un .pos avec l'hex, ses tets et ses faces extérieures pour checker...
+// pourquoi pas sortir aussi tous les slivers à part... ?
+
+
+
+
+// fills incompatibility_graph if two hex are incompatible direct neighbors,
+// i.e. (they DO NOT have one tet in common) and (they are neighbors (face(s) in common) but DO NOT pass the compatibility tests)
+void Recombinator_Graph::create_direct_neighbors_incompatibility_graph()
+{
+
+  vector<Hex*> visited_hex;
+  std::map<Hex*, std::set<MElement*> >::iterator it_hex =  hex_to_tet.begin();
+  for (;it_hex!=hex_to_tet.end();it_hex++){// for all hex
+    Hex *hex = it_hex->first;
+    if (is_not_good_enough(hex))
+      continue;
+    graph::iterator itfind_graph = find_hex_in_graph(hex);
+    if (itfind_graph==incompatibility_graph.end()){
+      incompatibility_graph.insert(make_pair(hex->get_hash(),make_pair(hex,graph_data())));// this creates an entry if none exists. Important ! if hex is good, but surrounded by "not good enough" hex, it has to be in the graph anyway ! A single node in the graph, without any connection... the perfect lonely hex.
+      set_of_all_hex_in_graph.insert(hex);
+    }
+
+    hash_tableA.clear();
+    hash_tableB.clear();
+    hash_tableC.clear();
+    build_hash_tableA(*hex);
+    build_hash_tableB(*hex);
+    build_hash_tableC(*hex);
+
+    visited_hex.clear();
+
+    std::set<PETriangle*>::iterator it_faces = hex_to_faces[hex].begin();
+    std::set<PETriangle*>::iterator it_facesen = hex_to_faces[hex].end();
+    for (;it_faces!=it_facesen;it_faces++){// i.e. for all triangular external face
+      PETriangle *face = *it_faces;
+      std::set<Hex*>::iterator it_neighbors = faces_to_hex[face].begin();
+      std::set<Hex*>::iterator it_neighborsen = faces_to_hex[face].end();
+      for (;it_neighbors!=it_neighborsen;it_neighbors++){// for all its neighbors
+        if ((*it_neighbors)==hex) continue;
+        Hex *other_hex = *it_neighbors;
+
+        vector<Hex*>::iterator itfind_hex = std::find(visited_hex.begin(),visited_hex.end(),other_hex);
+        if (itfind_hex!=visited_hex.end()) continue;// already done
+        else visited_hex.push_back(other_hex);
+
+        evaluate_hex_couple(hex,other_hex);
+      }
+    }
+    // change following...
+    std::set<PELine*>::iterator it_line = hex_to_edges[hex].begin();
+    std::set<PELine*>::iterator it_lineen = hex_to_edges[hex].end();
+    for (;it_line!=it_lineen;it_line++){// i.e. for all edges and diagonals -> check the hex neighbors too
+      PELine *line = *it_line;
+      std::set<Hex*>::iterator it_neighbors = edges_to_hex[line].begin();
+      std::set<Hex*>::iterator it_neighborsen = edges_to_hex[line].end();
+      for (;it_neighbors!=it_neighborsen;it_neighbors++){// for all its neighbors
+        if ((*it_neighbors)==hex) continue;
+        Hex *other_hex = *it_neighbors;
+
+        vector<Hex*>::iterator itfind_hex = std::find(visited_hex.begin(),visited_hex.end(),other_hex);
+        if (itfind_hex!=visited_hex.end()) continue;// already done
+        else visited_hex.push_back(other_hex);
+
+        evaluate_hex_couple(hex,other_hex);
+      }
+    }
+  }
+
+
+}
+
+
+void Recombinator_Graph::evaluate_hex_couple(Hex* hex, Hex* other_hex)
+{
+
+  const bool very_verbose=false;
+
+  if (very_verbose){
+    //    export_single_hex_all(other_hex,"");
+    //    export_single_hex_all(hex,"");
+    cout << " evaluate_hex_couple:: treating hex " << hex << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << hex->getVertex(i)->getNum();
+    cout << endl;
+    cout << " evaluate_hex_couple:: treating other_hex " << other_hex << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << other_hex->getVertex(i)->getNum();
+    cout << endl;
+  }
+
+  if (is_not_good_enough(other_hex)){
+    if (very_verbose) cout << "hex " << hex << " not good enough" << endl;
+    return;
+  }
+
+  if (find_hex_couple_in_graph(hex,other_hex)){
+    if (very_verbose) cout << "already incompatible: hex's " << hex << " and " << other_hex << endl;
+    return;
+  }
+
+  // count the number of faces in common...
+  // intuitivement: si !=2, c'est incompatible
+  //  bool two_faces_in_common=true;
+  //  std::vector<PETriangle*> common(12);
+  //  std::vector<PETriangle*>::iterator itfind_face = std::set_intersection (hex_to_faces[other_hex].begin(),hex_to_faces[other_hex].end(), hex_to_faces[hex].begin(), hex_to_faces[hex].end(), common.begin());
+  //  common.resize(itfind_face-common.begin());
+  //  if (common.size()!=2){
+  //    two_faces_in_common=false;
+  //  }
+
+  // check compatibility between the two neighbors
+
+
+  // if they do not pass the tests
+  //-> incompatible !
+
+  // the following depends on hex... on "hash_tables's"
+  //        std::set<MElement*> parts = hex_to_tet[other_hex];
+  //  std::set<MElement*> parts;
+  //  find(other_hex->get_a(),*other_hex,parts);
+  //  find(other_hex->get_b(),*other_hex,parts);
+  //  find(other_hex->get_c(),*other_hex,parts);
+  //  find(other_hex->get_d(),*other_hex,parts);
+  //  find(other_hex->get_e(),*other_hex,parts);
+  //  find(other_hex->get_f(),*other_hex,parts);
+  //  find(other_hex->get_g(),*other_hex,parts);
+  //  find(other_hex->get_h(),*other_hex,parts);
+  //  if(!valid(*other_hex,parts)){
+  //    if (very_verbose) cout << "valid incompatible: other_hex " << other_hex << " relative to " << hex << endl;
+  //    add_graph_entry(hex,other_hex);
+  //    return;
+  //  }
+  //  else if (very_verbose) cout << "valid compatible: other_hex " << other_hex << " relative to " << hex << endl;
+
+  if(!conformityA(*other_hex)){
+    if (very_verbose) cout << "conformA incompatible: other_hex " << other_hex << " relative to " << hex << endl;
+    add_graph_entry(hex,other_hex);
+    return;
+  }
+  else if (very_verbose) cout << "conformA compatible: other_hex " << other_hex << " relative to " << hex << endl;
+
+
+  if(!conformityB(*other_hex)){
+    if (very_verbose) cout << "conformB incompatible: other_hex " << other_hex << " relative to " << hex << endl;
+    add_graph_entry(hex,other_hex);
+    return;
+  }
+  else if (very_verbose) cout << "conformB compatible: other_hex " << other_hex << " relative to " << hex << endl;
+
+  if(!conformityC(*other_hex)){
+    if (very_verbose) cout << "conformC incompatible: other_hex " << other_hex << " relative to " << hex << endl;
+    add_graph_entry(hex,other_hex);
+    return;
+  }
+  else if (very_verbose) cout << "conformC compatible: other_hex " << other_hex << " relative to " << hex << endl;
+
+  if(!faces_statuquo(*other_hex)){
+    if (very_verbose) cout << "faces_statuquo incompatible: other_hex " << other_hex << " relative to " << hex << endl;
+    add_graph_entry(hex,other_hex);
+    return;
+  }
+  else if (very_verbose) cout << "faces_statuquo compatible: other_hex " << other_hex << " relative to " << hex << endl;
+
+  if (very_verbose) cout << "other_hex " << other_hex << " relative to " << hex << " totaly compatible !!! " << endl;
+  //  if (!two_faces_in_common){
+  //    export_single_hex_all(other_hex,"");
+  //    export_single_hex_all(hex,"");
+  //
+  //    //cout << "******************************** not two faces in common and compatible !!!********************************************************** " << endl;
+  //  }
+}
+
+
+bool Recombinator_Graph::post_check_validation(Hex* current_hex)
+{
+  // post check...
+  //  std::set<MElement*> parts;
+  //  find(current_hex->get_a(),*current_hex,parts);
+  //  find(current_hex->get_b(),*current_hex,parts);
+  //  find(current_hex->get_c(),*current_hex,parts);
+  //  find(current_hex->get_d(),*current_hex,parts);
+  //  find(current_hex->get_e(),*current_hex,parts);
+  //  find(current_hex->get_f(),*current_hex,parts);
+  //  find(current_hex->get_g(),*current_hex,parts);
+  //  find(current_hex->get_h(),*current_hex,parts);
+  //  if(!valid(*current_hex,parts)){
+  //    std::cout << "     not valid ! : hex " << current_hex  << " made of ";
+  //    for (int i=0;i<8;i++)
+  //      cout << "  " << current_hex->getVertex(i)->getNum();
+  //    cout << endl;
+  //    return false;
+  //  }
+
+  if(!conformityA(*current_hex)){
+    std::cout << "     not conform A! : hex " << current_hex << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << current_hex->getVertex(i)->getNum();
+    cout << endl;
+    return false;
+  }
+
+  if(!conformityB(*current_hex)){
+    std::cout << "     not conform B! : hex " << current_hex  << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << current_hex->getVertex(i)->getNum();
+    cout << endl;
+    return false;
+  }
+
+  if(!conformityC(*current_hex)){
+    std::cout << "     not conform C! : hex " << current_hex  << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << current_hex->getVertex(i)->getNum();
+    cout << endl;
+    return false;
+  }
+
+  if(!faces_statuquo(*current_hex)){
+    std::cout << "     not ok faces status quo! : hex " << current_hex << " made of ";
+    for (int i=0;i<8;i++)
+      cout << "  " << current_hex->getVertex(i)->getNum();
+    cout << endl;
+    return false;
+  }
+
+  // end post check...
+
+
+  return true;
+}
+
+
+void Recombinator_Graph::add_face(const MVertex *a,const MVertex* b,const MVertex *c,std::multimap<unsigned long long, pair<PETriangle*,int> > &f)
+{
+  vector<const MVertex*> v;
+  v.push_back(a);
+  v.push_back(b);
+  v.push_back(c);
+  PETriangle *q = new PETriangle(v);
+  std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator itfind = find_the_triangle(q,f);
+  if (itfind==f.end()){
+    f.insert(make_pair(q->get_hash(),make_pair(q,1)));
+  }
+  else{
+    delete q;
+  }
+}
+
+
+void Recombinator_Graph::add_face(const MVertex *a,const MVertex* b,const MVertex *c,Hex *hex)
+{
+  vector<const MVertex*> v;
+  v.push_back(a);
+  v.push_back(b);
+  v.push_back(c);
+  PETriangle *q = new PETriangle(v);
+  citer itfind = find_the_triangle(q,triangular_faces);
+  if (itfind==triangular_faces.end()){
+    itfind = triangular_faces.insert(make_pair(q->get_hash(),q));
+  }
+  else{
+    delete q;
+    q = itfind->second;
+  }
+
+  hex_to_faces[hex].insert(q);
+  faces_to_hex[q].insert(hex);
+}
+
+
+void Recombinator_Graph::add_edges(Hex *hex)
+{
+  MVertex *a,*b,*c,*d;
+  MVertex *e,*f,*g,*h;
+
+  a = hex->get_a();
+  b = hex->get_b();
+  c = hex->get_c();
+  d = hex->get_d();
+  e = hex->get_e();
+  f = hex->get_f();
+  g = hex->get_g();
+  h = hex->get_h();
+
+  fill_edges_table(a,b,c,d,hex);
+  fill_edges_table(e,f,g,h,hex);
+  fill_edges_table(a,b,f,e,hex);
+  fill_edges_table(b,c,g,f,hex);
+  fill_edges_table(d,c,g,h,hex);
+  fill_edges_table(d,a,e,h,hex);
+}
+
+
+void Recombinator_Graph::fill_edges_table(const MVertex *a, const MVertex *b, const MVertex *c, const MVertex *d, Hex *hex)
+{
+  vector<const MVertex* > v;
+  vector<const MVertex* > u;
+  v.push_back(a);
+  v.push_back(b);
+  v.push_back(c);
+  v.push_back(d);
+
+  vector<const MVertex*>::const_iterator it1 = v.begin();
+  for (;it1!=v.end();it1++){
+    vector<const MVertex*>::const_iterator it2 = it1;
+    for (;it2!=v.end();it2++){
+      if (it1==it2) continue;
+
+      u.clear();
+      u.push_back(*it1);
+      u.push_back(*it2);
+      // see if already exists or not...
+      PELine *l = new PELine(u);
+      linemap::const_iterator itfind = find_the_line(l,edges_and_diagonals);
+      if (itfind==edges_and_diagonals.end()){
+        itfind = edges_and_diagonals.insert(make_pair(l->get_hash(),l));
+      }
+      else{
+        delete l;
+        l = itfind->second;
+      }
+
+      hex_to_edges[hex].insert(l);
+      edges_to_hex[l].insert(hex);
+    }
+  }
+}
+
+
+Recombinator_Graph::graph::iterator Recombinator_Graph::find_hex_in_graph(Hex* hex)
+{
+  pair<graph::iterator, graph::iterator> range = incompatibility_graph.equal_range(hex->get_hash());
+  if (range.first==range.second) return incompatibility_graph.end();
+
+  graph::iterator it = range.first;
+  for (;it!=range.second;it++){
+    if (it->second.first==hex){
+      return it;
+    }
+  }
+  return incompatibility_graph.end();
+}
+
+Recombinator_Graph::graph_data::iterator Recombinator_Graph::find_hex_in_graphrow(Hex* hex, graph_data &row)
+{
+  pair<graph_data::iterator, graph_data::iterator> range = row.equal_range(hex->get_hash());
+  if (range.first==range.second) return row.end();
+
+  graph_data::iterator it = range.first;
+  for (;it!=range.second;it++){
+    if (it->second==hex){
+      return it;
+    }
+  }
+  return row.end();
+}
+
+bool Recombinator_Graph::find_hex_couple_in_graph(Hex* hex, Hex* other_hex)
+{
+  graph::iterator it = find_hex_in_graph(hex);
+  if (it==incompatibility_graph.end()) return false;
+
+  graph_data::iterator itt = find_hex_in_graphrow(other_hex, it->second.second);
+  if (itt==it->second.second.end()) return false;
+  return true;
+
+}
+
+
+void Recombinator_Graph::add_graph_entry(Hex* hex, Hex* other_hex)
+{
+
+  graph::iterator itfind_graph = find_hex_in_graph(hex);
+
+  if (itfind_graph==incompatibility_graph.end()){
+    itfind_graph = incompatibility_graph.insert(make_pair(hex->get_hash(),make_pair(hex, graph_data())));
+    itfind_graph->second.second.insert(make_pair(other_hex->get_hash(),other_hex));
+    set_of_all_hex_in_graph.insert(hex);
+    return;
+  }
+  else{
+    itfind_graph->second.second.insert(make_pair(other_hex->get_hash(),other_hex));
+  }
+
+}
+
+void Recombinator_Graph::compute_hex_ranks()
+{
+
+  create_faces_connectivity();
+
+  PETriangle* face;
+  Hex *hex;
+  double boundary_count;
+
+  for (map<Hex*,set<PETriangle*> >::iterator it = hex_to_faces.begin();it!=hex_to_faces.end();it++){
+    hex = it->first;
+    boundary_count=0.;
+    for (set<PETriangle*>::iterator itf = it->second.begin();itf!=it->second.end();itf++){
+      face = *itf;
+      if (faces_connectivity[face]==1) boundary_count+=1.;
+    }
+    //cout << " --- hex " << hex << " has " << boundary_count << " tri faces on boundaries, " << hex_to_faces[hex].size() << " total tri faces " << endl;
+    map<Hex*,vector<double> >::iterator itfind = hex_ranks.find(hex);
+    if (itfind==hex_ranks.end())
+      hex_ranks.insert(make_pair(hex,vector<double>(1)));
+    hex_ranks[hex][0] = boundary_count;
+    hex_ranks[hex][1] = hex->get_quality();
+  }
+}
+
+
+void Recombinator_Graph::create_faces_connectivity()
+{
+  for (std::map<MElement*, std::set<Hex*> >::iterator it_tet = tet_to_hex.begin(); it_tet!=tet_to_hex.end();it_tet++){
+    add_face_connectivity(it_tet->first, 0,1,2);
+    add_face_connectivity(it_tet->first, 0,1,3);
+    add_face_connectivity(it_tet->first, 0,2,3);
+    add_face_connectivity(it_tet->first, 1,2,3);
+  }
+}
+
+
+void Recombinator_Graph::add_face_connectivity(MElement *tet, int i, int j, int k)
+{
+  vector<const MVertex*> v;
+  PETriangle *t;
+  v.push_back(tet->getVertex(i));
+  v.push_back(tet->getVertex(j));
+  v.push_back(tet->getVertex(k));
+  t = new PETriangle(v);
+  citer itfind = find_the_triangle(t,triangular_faces);
+  if (itfind!=triangular_faces.end()){
+    faces_connectivity[itfind->second]++;
+  }
+  delete t;
+}
+
+void Recombinator_Graph::compute_hex_ranks_blossom()
+{
+
+  create_faces_connectivity();
+
+  PETriangle* face;
+  Hex *hex;
+  double boundary_count;
+  MVertex *a,*b,*c,*d;
+  MVertex *e,*f,*g,*h;
+
+  for (map<Hex*,set<PETriangle*> >::iterator it = hex_to_faces.begin();it!=hex_to_faces.end();it++){
+    hex = it->first;
+    boundary_count=0.;
+    for (set<PETriangle*>::iterator itf = it->second.begin();itf!=it->second.end();itf++){
+      face = *itf;
+      if (faces_connectivity[face]==1) boundary_count+=1.;
+    }
+    //cout << " --- hex " << hex << " has " << boundary_count << " tri faces on boundaries, " << hex_to_faces[hex].size() << " total tri faces " << endl;
+    map<Hex*,vector<double> >::iterator itfind = hex_ranks.find(hex);
+    if (itfind==hex_ranks.end())
+      hex_ranks.insert(make_pair(hex,vector<double>(1)));
+    hex_ranks[hex][0] = boundary_count;
+    hex_ranks[hex][1] = hex->get_quality();
+
+
+    a = hex->get_a();
+    b = hex->get_b();
+    c = hex->get_c();
+    d = hex->get_d();
+    e = hex->get_e();
+    f = hex->get_f();
+    g = hex->get_g();
+    h = hex->get_h();
+
+    int count_blossom=0;
+    if (find_face_in_blossom_info(a,b,c,d)) count_blossom++;
+    if (find_face_in_blossom_info(e,f,g,h)) count_blossom++;
+    if (find_face_in_blossom_info(a,b,f,e)) count_blossom++;
+    if (find_face_in_blossom_info(b,c,g,f)) count_blossom++;
+    if (find_face_in_blossom_info(d,c,g,h)) count_blossom++;
+    if (find_face_in_blossom_info(d,a,e,h)) count_blossom++;
+
+    hex_ranks[hex][2] = count_blossom;
+
+  }
+}
+
+bool Recombinator_Graph::find_face_in_blossom_info(MVertex *a, MVertex *b,
+                                                   MVertex *c, MVertex *d)
+{
+  PETriangle *t1,*t2;
+
+  t1 = get_triangle(a,b,c);
+  t2 = get_triangle(a,c,d);
+
+  if (is_blossom_pair(t1,t2))
+    return true;
+
+
+  t1 = get_triangle(a,b,d);
+  t2 = get_triangle(b,c,d);
+  if (is_blossom_pair(t1,t2))
+    return true;
+
+  return false;
+}
+
+
+PETriangle* Recombinator_Graph::get_triangle(MVertex*a, MVertex* b, MVertex *c)
+{
+  vector<const MVertex*> v;
+  v.push_back(a);
+  v.push_back(b);
+  v.push_back(c);
+  PETriangle *t = new PETriangle(v);
+  citer it_find_tri = find_the_triangle(t, triangular_faces);
+  delete t;
+  return (it_find_tri->second);
+}
+
+
+bool Recombinator_Graph::is_blossom_pair(PETriangle *t1, PETriangle *t2)
+{
+  tripair::iterator itfind = blossom_info.find(t1);
+  if (itfind!=blossom_info.end()){
+    if (t2==itfind->second)
+      return true;
+  }
+  return false;
+}
+
diff --git a/Mesh/yamakawa.h b/Mesh/yamakawa.h
index 2154d70..d3e0056 100644
--- a/Mesh/yamakawa.h
+++ b/Mesh/yamakawa.h
@@ -1,27 +1,186 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 //
-// Contributor(s):
-//   Tristan Carrier
+// Contributed by Tristan Carrier
 
 #ifndef _YAMAKAWA_H_
 #define _YAMAKAWA_H_
 
 
 #include "GRegion.h"
+#include "MVertex.h"
 #include <set>
+#include <map>
+
+//#include <tr1/unordered_set>
+//#include <tr1/unordered_map>
+
+using namespace std;
+
+
+extern void export_gregion_mesh(GRegion *gr, string filename);
+
+
+class PEEntity{
+protected:
+  vector<const MVertex *> vertices;
+  size_t hash;
+  void compute_hash();
+public:
+  PEEntity(const vector<const MVertex*> &_v);
+  //PEEntity(size_t l);
+  virtual ~PEEntity();
+  virtual size_t get_max_nb_vertices() const=0;
+  const MVertex* getVertex(size_t n) const;
+  bool hasVertex(const MVertex *v)const;
+  size_t get_hash() const;
+  bool same_vertices(const PEEntity *t)const;
+  bool operator<(const PEEntity&) const;
+  //bool operator==(const PEEntity&) const;
+  //bool operator==(const size_t&) const;
+};
+
+class PELine : public PEEntity{
+public:
+  PELine(const vector<const MVertex*> &_v);
+  virtual ~PELine();
+  size_t get_max_nb_vertices() const;
+};
+
+class PETriangle : public PEEntity{
+public:
+  PETriangle(const vector<const MVertex*> &_v);
+  //PETriangle(size_t l);
+  virtual ~PETriangle();
+  size_t get_max_nb_vertices() const;
+};
+
+class PEQuadrangle : public PEEntity{
+public:
+  PEQuadrangle(const vector<const MVertex*> &_v);
+  //PEQuadrangle(size_t l);
+  virtual ~PEQuadrangle();
+  size_t get_max_nb_vertices() const;
+};
+
+
+template<class T>
+class clique_stop_criteria{
+public:
+  //typedef tr1::unordered_set<T> graph_data_no_hash;
+  typedef std::set<T> graph_data_no_hash;
+  clique_stop_criteria(map<T, std::set<MElement*> > &_m, int _i);
+  ~clique_stop_criteria();
+  bool stop(const graph_data_no_hash &clique)const;
+  void export_corresponding_mesh(const graph_data_no_hash &clique)const;
+
+private:
+  const map<T, std::set<MElement*> > &hex_to_tet;
+  const unsigned int total_number_tet;
+};
+
+
+template<class T>
+class cliques_compatibility_graph{
+public:
+  typedef unsigned long long hash_key;
+
+  //    typedef  set<T> graph_data;
+  //    typedef  map<T, graph_data > graph;
+  //    typedef multimap<int,T> ranking_data;
+  //typedef tr1::unordered_set<T> graph_data_no_hash;
+  typedef std::set<T> graph_data_no_hash;
+  //    typedef tr1::unordered_multimap<hash_key, T> graph_data;
+  //    typedef tr1::unordered_multimap<hash_key, pair<T, graph_data > > graph;
+  //    typedef tr1::unordered_map<int,T> ranking_data;
+  typedef std::multimap<hash_key, T> graph_data;
+  typedef std::multimap<hash_key, pair<T, graph_data > > graph;
+  typedef std::map<int,T> ranking_data;
+
+  typedef void (*ptrfunction_export)(cliques_compatibility_graph<T>&, int, string);
+
+  cliques_compatibility_graph(graph &_g, const map<T, std::vector<double> > &_hex_ranks, unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels, clique_stop_criteria<T> *csc, ptrfunction_export fct);
+  ~cliques_compatibility_graph();
+  void find_cliques();
+  void export_cliques();
+
+  virtual typename graph::const_iterator begin_graph(){return G.begin();};
+  virtual typename graph::const_iterator end_graph(){return G.end();};
+
+  bool found_the_ultimate_max_clique;
+
+  multimap<int, set<T> > allQ;// all cliques
+
+protected:
+  void erase_entry(graph_data &s, T &u, hash_key &key);
+  void find_cliques(graph_data &s,int n);
+  void split_set_BW(const T &u, const hash_key &u_key,const graph_data &s, graph_data &white, graph_data &black);
+  void fill_black_set(const T &u, const hash_key &u_key, const graph_data &s, graph_data &black);
+  void choose_u(const graph_data &s, T &u, hash_key &u_key);
+  // the maximum score (int) will be chosen...
+  double function_to_maximize_for_u(const T &u, const hash_key &u_key, const graph_data &s);
+  void store_clique(int n);
+  // returns true if two nodes are connected in the compatibility graph
+  virtual bool compatibility(const T &u, const hash_key &u_key, const T &v, const hash_key &v_key);
+
+  ptrfunction_export export_clique_graph;
+
+  const bool debug;
+  unsigned int max_nb_cliques;
+  unsigned int nb_hex_potentiels;
+  unsigned int max_clique_size;
+  unsigned int position;
+  unsigned int total_nodes_number;
+  unsigned int total_nb_of_cliques_searched;
+  unsigned int max_nb_of_stored_cliques;// to reduce memory footprint (set to zero if no limit)
+
+  clique_stop_criteria<T>* criteria;
+
+  bool cancel_search;
+  const map<T, std::vector<double> > &hex_ranks;
+  graph &G;
+  graph_data_no_hash Q;// the current clique
+};
+
+
+
+template<class T>
+class cliques_losses_graph : public cliques_compatibility_graph<T> {
+  //    typedef  set<T> graph_data;
+  //    typedef  map<T, graph_data > graph;
+  //    typedef tr1::unordered_set<T> graph_data;
+  //    typedef tr1::unordered_map<T, graph_data > graph;
+public:
+  typedef unsigned long long hash_key;
+  typedef multimap<hash_key, T> graph_data;
+  typedef multimap<hash_key, pair<T, graph_data > > graph;
+  //    typedef tr1::unordered_multimap<hash_key, T> graph_data;
+  typedef void (*ptrfunction_export)(cliques_compatibility_graph<T>&, int, string);
+
+  cliques_losses_graph(graph &_g, const map<T, std::vector<double> > &_hex_ranks, unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels, clique_stop_criteria<T> *csc, ptrfunction_export fct);
+  ~cliques_losses_graph();
+
+protected:
+  // returns false if two nodes are connected in the losses graph (i.e. true if connected in compatibility graph)
+  virtual bool compatibility(const T &u, const hash_key &u_key, const T &v, const hash_key &v_key);
+  graph &G;
+};
+
+
 
 class Hex{
- private:
+private:
   double quality;
+  unsigned long long hash;
   MVertex *a,*b,*c,*d,*e,*f,*g,*h;
- public:
+  void set_hash();
+public:
   Hex();
   Hex(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
   ~Hex();
-  double get_quality() const;
+  double get_quality();
   void set_quality(double);
   MVertex* get_a();
   MVertex* get_b();
@@ -31,15 +190,19 @@ class Hex{
   MVertex* get_f();
   MVertex* get_g();
   MVertex* get_h();
+  MVertex* getVertex(int n);
+  bool hasVertex(const MVertex *v);
+  bool same_vertices(Hex *h);
   void set_vertices(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
-  bool operator<(const Hex&) const;
+  unsigned long long get_hash();
+  bool operator<( Hex&) ;
 };
 
 class Facet{
- private:
+private:
   MVertex *a,*b,*c;
   unsigned long long hash;
- public:
+public:
   Facet();
   Facet(MVertex*,MVertex*,MVertex*);
   ~Facet();
@@ -54,10 +217,10 @@ class Facet{
 };
 
 class Diagonal{
- private:
+private:
   MVertex *a,*b;
   unsigned long long hash;
- public:
+public:
   Diagonal();
   Diagonal(MVertex*,MVertex*);
   ~Diagonal();
@@ -71,12 +234,12 @@ class Diagonal{
 };
 
 class Tuple{
- private:
+private:
   MVertex *v1,*v2,*v3;
   MElement* element;
   GFace* gf;
   unsigned long long hash;
- public:
+public:
   Tuple();
   Tuple(MVertex*,MVertex*,MVertex*,MElement*,GFace*);
   Tuple(MVertex*,MVertex*,MVertex*);
@@ -91,45 +254,60 @@ class Tuple{
   bool operator<(const Tuple&) const;
 };
 
+//inline std::ostream& operator<<(std::ostream& s, const PETriangle& t){
+//  const MVertex *v;
+//  for (int i=0;i<3;i++){
+//    v = t.getVertex(i);
+//    s << "(" << v->x() << "," << v->y() << "," << v->z() << ")";
+//  }
+//  return s;
+//};
+
 class Recombinator{
- private:
-  std::vector<Hex> potential;
+protected:
+  std::vector<Hex*> potential;
   std::map<MElement*,bool> markings;
   std::multiset<Facet> hash_tableA;
   std::multiset<Diagonal> hash_tableB;
   std::multiset<Diagonal> hash_tableC;
   std::multiset<Tuple> tuples;
   std::set<MElement*> triangles;
- public:
+public:
   Recombinator();
   ~Recombinator();
 
   std::map<MVertex*,std::set<MVertex*> > vertex_to_vertices;
   std::map<MVertex*,std::set<MElement*> > vertex_to_elements;
 
-  void execute();
-  void execute(GRegion*);
+  virtual void execute();
+  virtual void execute(GRegion*);
 
   void init_markings(GRegion*);
-  void pattern1(GRegion*);
-  void pattern2(GRegion*);
-  void pattern3(GRegion*);
-  void merge(GRegion*);
+  virtual void pattern1(GRegion*);
+  virtual void pattern2(GRegion*);
+  virtual void pattern3(GRegion*);
+  virtual void merge(GRegion*);
   void improved_merge(GRegion*);
   void rearrange(GRegion*);
   void statistics(GRegion*);
+  // tuples are triangles on geometrical faces (region boundaries...)
   void build_tuples(GRegion*);
   void modify_surfaces(GRegion*);
   void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*);
 
-  bool sliver(MElement*,Hex);
+  bool sliver(MElement*,Hex&);
   double diagonal(MElement*,int&,int&);
   double distance(MVertex*,MVertex*);
   double distance(MVertex*,MVertex*,MVertex*);
   double scalar(MVertex*,MVertex*,MVertex*,MVertex*);
   void two_others(int,int,int&,int&);
-  bool valid(Hex,const std::set<MElement*>&);
-  bool valid(Hex);
+  // soit une face du cube: abcd
+  // en principe, on doit avoir soit les facets (abc) et (acd), soit les facets (abd) et(bcd) qui sont inclues dans un des tets qui forment l'hex.
+  // si c'est le cas pour toutes les 6 faces de l'hex, return true.
+  // ce test permet probablement de virer les hex "avec des trous" (avec 8 noeuds ok, mais un tet manquant, ce qui peut occasionner un hex à 14 faces, par exemple, si l'on compte les faces à partir des tets inclus)
+  bool valid(Hex&,const std::set<MElement*>&);
+  // renvoie true si le "MQuadrangle::etaShapeMeasure" des 6 faces est plus grand que 0.000001
+  bool valid(Hex&);
   double eta(MVertex*,MVertex*,MVertex*,MVertex*);
   bool linked(MVertex*,MVertex*);
 
@@ -143,19 +321,34 @@ class Recombinator{
   void intersection(const std::set<MVertex*>&,const std::set<MVertex*>&,const std::set<MVertex*>&,const std::vector<MVertex*>&,std::set<MVertex*>&);
   void intersection(const std::set<MElement*>&,const std::set<MElement*>&,std::set<MElement*>&);
 
+  // return true if vertex belong to hex
   bool inclusion(MVertex*,Hex);
+  // renvoie true si vertex se trouve dans [a,b,c]
   bool inclusion(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
+  // return true if all three vertices v1,v2 and v3 belong to one tet
   bool inclusion(MVertex*,MVertex*,MVertex*,const std::set<MElement*>&);
+  // return true si la facet existe dans la table A
   bool inclusion(Facet);
+  // return true si la diagonal existe dans la table B
   bool inclusion(Diagonal);
+  // return true si la diagonal existe dans la table C !!!!!!!!!   Sinon, c'est exactement la même fonction !!!!! avec un nom différent !
   bool duplicate(Diagonal);
 
-  bool conformityA(Hex);
+  // return true si un hex est "conforme A"
+  // est "conforme A" un hex dont les 6 faces sont "conforme A"
+  bool conformityA(Hex&);
+  // est "conforme A" une face si ses 4 facets existent dans tableA, ou bien si aucune des ses facets ne se trouve dans table A
   bool conformityA(MVertex*,MVertex*,MVertex*,MVertex*);
-  bool conformityB(Hex);
-  bool conformityC(Hex);
-
-  bool faces_statuquo(Hex);
+  // return false si:
+  //- une des 12 arrêtes de l'hex se trouve dans tableB !!! (pas C !!!), càd si une arrete a été utilisée comme diagonale d'un autre hex
+  //- (ou bien) si, pour chaque face de l'hex, on a une diagonale dans tableB et pas l'autre
+  bool conformityB(Hex&);
+  // return false si une des 12 diagonales du cube se trouve dans tableC, càd a été utilisée comme arrête
+  bool conformityC(Hex&);
+
+  // return true si les 6 faces de l'hex sont "faces_statuquo"
+  bool faces_statuquo(Hex&);
+  // return false si, parmis les deux paires de facets de la face, il existe un couple de facet qui soient toutes les deux des tuples, mais correspondant à des geometric faces différentes. Bref, une arrête géométrique confondue avec une diagonale de la face.
   bool faces_statuquo(MVertex*,MVertex*,MVertex*,MVertex*);
 
   void build_vertex_to_vertices(GRegion*);
@@ -176,14 +369,156 @@ class Recombinator{
 
   double scaled_jacobian(MVertex*,MVertex*,MVertex*,MVertex*);
   double max_scaled_jacobian(MElement*,int&);
-  double min_scaled_jacobian(Hex);
+  double min_scaled_jacobian(Hex&);
+};
+
+class Recombinator_Graph : public Recombinator{
+public:
+  typedef size_t my_hash_key;
+  typedef multimap<my_hash_key,PETriangle*> trimap;
+  typedef map<PETriangle*, PETriangle*> tripair;
+
+
+  //typedef tr1::unordered_multimap<my_hash_key,PETriangle*> trimap;
+  typedef trimap::iterator iter;
+  typedef trimap::const_iterator citer;
+
+  typedef multimap<my_hash_key,PELine*> linemap;
+  //typedef tr1::unordered_multimap<my_hash_key,PELine*> linemap;
+
+
+  bool found_the_ultimate_max_clique;
+
+  set<Hex*>& getHexInGraph(){return set_of_all_hex_in_graph;};
+
+protected:
+  bool debug,debug_graph;
+  std::map<Hex*, std::set<MElement*> > hex_to_tet;
+  std::map<Hex*, std::set<PELine*> > hex_to_edges;
+  std::map<PELine*, std::set<Hex*> > edges_to_hex;
+  std::map<Hex*, std::set<PETriangle*> > hex_to_faces;
+  std::map<PETriangle*, std::set<Hex*> > faces_to_hex;
+  std::map<PETriangle*, unsigned int > faces_connectivity;// # of adjacent tets (1 or 2)
+  std::map<MElement*, std::set<Hex*> >tet_to_hex;
+  std::map<Hex*, std::vector<double> > hex_ranks;
+
+
+  typedef unsigned long long hash_key;
+  //    typedef tr1::unordered_multimap<hash_key, Hex*> graph_data;
+  //    typedef tr1::unordered_multimap<hash_key, pair<Hex*, graph_data > > graph;
+  typedef multimap<hash_key, Hex*> graph_data;
+  typedef multimap<hash_key, pair<Hex*, graph_data > > graph;
+
+  graph incompatibility_graph;
+  set<Hex*> set_of_all_hex_in_graph;
+
+  std::multimap<unsigned long long, Hex*>created_potential_hex;
+
+  void create_faces_connectivity();
+  void add_face_connectivity(MElement *tet, int i, int j, int k);
+
+  void add_edges(Hex *hex);
+  void fill_edges_table(const MVertex *a, const MVertex *b, const MVertex *c, const MVertex *d, Hex *hex);
+  void add_face(const MVertex *a,const MVertex* b,const MVertex *c,Hex *hex);
+  void add_face(const MVertex *a,const MVertex* b,const MVertex *c,std::multimap<unsigned long long, pair<PETriangle*,int> > &f);
+  std::multimap<double,Hex*> degree;// degree = the final ranking of hexahedra
+  std::multimap<int,Hex*> idegree;// idegree = number of connected hex in indirect neighbors graph
+  std::multimap<int,Hex*> ndegree;// ndegree = number of direct neighbors !!! not chosen yet !!!
+  std::map<Hex*,int> reverse_idegree;
+  std::map<Hex*,int> reverse_ndegree;
+  // each tet has at least one neighbor, at most four. For all not chosen hex, check this data to find how many direct neighbors...
+  //    std::map<MElement*,set<PETriangle*> > tet_to_triangle;
+  std::map<PETriangle*,set<MElement*> > triangle_to_tet;
+  std::map<MElement*,int> tet_degree;
+
+  bool find_face_in_blossom_info(MVertex *a, MVertex *b, MVertex *c, MVertex *d);
+  void compute_hex_ranks_blossom();
+  PETriangle* get_triangle(MVertex*a, MVertex* b, MVertex *c);
+  bool is_blossom_pair(PETriangle *t1, PETriangle *t2);
+
+  tripair blossom_info;
+  trimap triangular_faces;
+  linemap edges_and_diagonals;
+
+  map<PETriangle*, GFace*> tri_to_gface_info;
+
+  vector<Hex*> chosen_hex;
+  vector<MElement*> chosen_tet;
+
+  citer find_the_triangle(PETriangle *t, const trimap &list);
+  linemap::const_iterator  find_the_line(PELine *t, const linemap &list);
+  std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator  find_the_triangle(PETriangle *t, std::multimap<unsigned long long, pair<PETriangle*, int> > &list);
+  std::multimap<unsigned long long, Hex* >::const_iterator  find_the_created_potential_hex(Hex *t, const std::multimap<unsigned long long, Hex*>  &list);
+
+  int nbhex_in_losses_graph;
+  double average_connectivity;
+  bool post_check_validation(Hex* current_hex);
+
+  PETriangle* get_triangle(MElement *element, int i, int j, int k);
+
+  void compute_hex_ranks();
+
+  // check if the hex is good enough to be put into the graph. If not in the graph, it cannot be chosen...
+  bool is_not_good_enough(Hex* hex);
+
+  // fills incompatibility_graph if two hex share a common (non-sliver!) tet
+  void create_indirect_neighbors_graph();
+
+  graph::iterator find_hex_in_graph(Hex* hex);
+  graph_data::iterator find_hex_in_graphrow(Hex* hex, graph_data &row);
+  bool find_hex_couple_in_graph(Hex* hex, Hex* other_hex);
+  void add_graph_entry(Hex* hex, Hex* other_hex);
+
+  // fills incompatibility_graph if two hex are incompatible direct neighbors,
+  // i.e. they have one (or more) common face or common edge and are not compatible
+  void create_direct_neighbors_incompatibility_graph();
+  void evaluate_hex_couple(Hex* hex, Hex* other_hex);
+
+  // if two hex are not connected in the incompatibility_graph, they are compatible
+  void create_losses_graph(GRegion *gr);
+
+  void merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &cl,int clique_number=0);
+
+  void fill_tet_to_hex_table(Hex *hex);
+
+  virtual void pattern1(GRegion*);
+  virtual void pattern2(GRegion*);
+  virtual void pattern3(GRegion*);
+
+  void merge(GRegion*);
+
+  // ------- exports --------
+  void export_tets(set<MElement*> &tetset, Hex* hex, string s);
+  void export_single_hex_all(Hex* hex,string s);
+  void export_single_hex(Hex* hex,string s);
+  void export_single_hex_faces(Hex* hex,string s);
+  void export_single_hex_tet(Hex* hex,string s);
+  void export_all_hex(int &file,GRegion *gr);
+  void export_hexmesh_so_far(int &file);
+  void export_direct_neighbor_table(int max);
+  void export_hex_init_degree(GRegion *gr, const std::map<Hex*,int> &init_degree, const vector<Hex*> &chosen_hex);
+
+  int max_nb_cliques;
+  string graphfilename;
+
+public:
+  Recombinator_Graph(unsigned int max_nb_cliques, string filename=string());
+  ~Recombinator_Graph();
+  virtual void execute();
+  virtual void execute(GRegion*);
+  virtual void buildGraphOnly(unsigned int max_nb_cliques, string filename=string());
+  virtual void buildGraphOnly(GRegion*, unsigned int max_nb_cliques, string filename=string());
+  virtual void execute_blossom(unsigned int max_nb_cliques, string filename=string());
+  virtual void execute_blossom(GRegion*, unsigned int max_nb_cliques, string filename=string());
+  virtual void createBlossomInfo();
+  void createBlossomInfo(GRegion *gr);
 };
 
 class Prism{
- private:
+private:
   double quality;
   MVertex *a,*b,*c,*d,*e,*f;
- public:
+public:
   Prism();
   Prism(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
   ~Prism();
@@ -200,7 +535,7 @@ class Prism{
 };
 
 class Supplementary{
- private:
+private:
   std::vector<Prism> potential;
   std::map<MElement*,bool> markings;
   std::map<MVertex*,std::set<MVertex*> > vertex_to_vertices;
@@ -210,7 +545,7 @@ class Supplementary{
   std::multiset<Diagonal> hash_tableC;
   std::multiset<Tuple> tuples;
   std::set<MElement*> triangles;
- public:
+public:
   Supplementary();
   ~Supplementary();
 
@@ -255,8 +590,8 @@ class Supplementary{
   bool conformityC(Prism);
 
   bool faces_statuquo(Prism);
-  bool faces_statuquo(MVertex*,MVertex*,MVertex*,MVertex*);	
-	
+  bool faces_statuquo(MVertex*,MVertex*,MVertex*,MVertex*);
+
   void build_vertex_to_vertices(GRegion*);
   void build_vertex_to_tetrahedra(GRegion*);
   void build_hash_tableA(Prism);
@@ -273,7 +608,9 @@ class Supplementary{
 };
 
 class PostOp{
- private:
+private:
+  int nbr,nbr8,nbr6,nbr5,nbr4;
+  double vol,vol8,vol6,vol5,vol4;
   int estimate1;
   int estimate2;
   int iterations;
@@ -282,13 +619,18 @@ class PostOp{
   std::map<MVertex*,std::set<MElement*> > vertex_to_pyramids;
   std::multiset<Tuple> tuples;
   std::set<MElement*> triangles;
- public:
+public:
   PostOp();
   ~PostOp();
 
   void execute(bool);
   void execute(GRegion*,bool);
 
+  inline int get_nb_hexahedra()const{return nbr8;};
+  inline double get_vol_hexahedra()const{return vol8;};
+  inline int get_nb_elements()const{return nbr;};
+  inline double get_vol_elements()const{return vol;};
+
   void init_markings(GRegion*);
   void pyramids1(GRegion*);
   void pyramids2(GRegion*);
diff --git a/Numeric/BasisFactory.cpp b/Numeric/BasisFactory.cpp
index d39b63f..a265c36 100644
--- a/Numeric/BasisFactory.cpp
+++ b/Numeric/BasisFactory.cpp
@@ -3,20 +3,22 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include "BasisFactory.h"
 #include "GmshDefines.h"
-#include "GmshMessage.h"
-#include "miniBasis.h"
 #include "polynomialBasis.h"
 #include "pyramidalBasis.h"
-#include "pointsGenerators.h"
-#include "BasisFactory.h"
-#include "MElement.h"
+#include "miniBasis.h"
+#include "MetricBasis.h"
+#include "CondNumBasis.h"
+#include <map>
+#include <cstddef>
 
 std::map<int, nodalBasis*> BasisFactory::fs;
-std::map<int, JacobianBasis*> BasisFactory::js;
 std::map<int, MetricBasis*> BasisFactory::ms;
-BasisFactory::Cont_bezierBasis BasisFactory::bs;
-BasisFactory::Cont_gradBasis BasisFactory::gs;
+std::map<int, CondNumBasis*> BasisFactory::cs;
+std::map<FuncSpaceData, JacobianBasis*> BasisFactory::js;
+std::map<FuncSpaceData, bezierBasis*> BasisFactory::bs;
+std::map<FuncSpaceData, GradientBasis*> BasisFactory::gs;
 
 const nodalBasis* BasisFactory::getNodalBasis(int tag)
 {
@@ -28,9 +30,10 @@ const nodalBasis* BasisFactory::getNodalBasis(int tag)
   // Get the parent type to see which kind of basis
   // we want to create
   nodalBasis* F = NULL;
-  if (tag == MSH_TRI_MINI) {
-    F = new miniBasis();
-  }
+  if (tag == MSH_TRI_MINI)
+    F = new miniBasisTri();
+  else if (tag == MSH_TET_MINI)
+    F = new miniBasisTet();
   else {
     int parentType = ElementType::ParentTypeFromTag(tag);
     switch(parentType) {
@@ -67,49 +70,57 @@ const nodalBasis* BasisFactory::getNodalBasis(int tag)
   return inserted.first->second;
 }
 
-const JacobianBasis* BasisFactory::getJacobianBasis(int tag)
+const JacobianBasis* BasisFactory::getJacobianBasis(FuncSpaceData fsd)
 {
-  std::map<int, JacobianBasis*>::const_iterator it = js.find(tag);
-  if (it != js.end())
-    return it->second;
+  FuncSpaceData data = fsd.getForNonSerendipitySpace();
+
+  std::map<FuncSpaceData, JacobianBasis*>::const_iterator it = js.find(data);
+  if (it != js.end()) return it->second;
 
-  JacobianBasis* J = new JacobianBasis(tag);
-  js.insert(std::make_pair(tag, J));
+  JacobianBasis* J = new JacobianBasis(data);
+  js.insert(std::make_pair(data, J));
   return J;
 }
 
 const MetricBasis* BasisFactory::getMetricBasis(int tag)
 {
   std::map<int, MetricBasis*>::const_iterator it = ms.find(tag);
-  if (it != ms.end())
-    return it->second;
+  if (it != ms.end()) return it->second;
 
   MetricBasis* M = new MetricBasis(tag);
   ms.insert(std::make_pair(tag, M));
   return M;
 }
 
-const GradientBasis* BasisFactory::getGradientBasis(int tag, int order)
+const CondNumBasis* BasisFactory::getCondNumBasis(int tag, int cnOrder)
 {
-  std::pair<int, int> key(tag, order);
-  Cont_gradBasis::const_iterator it = gs.find(key);
-  if (it != gs.end())
-    return it->second;
+  std::map<int, CondNumBasis*>::const_iterator it = cs.find(tag);
+  if (it != cs.end()) return it->second;
+
+  CondNumBasis* M = new CondNumBasis(tag, cnOrder);
+  cs.insert(std::make_pair(tag, M));
+  return M;
+}
 
-  GradientBasis* G = new GradientBasis(tag, order);
-  gs.insert(std::make_pair(key, G));
+const GradientBasis* BasisFactory::getGradientBasis(FuncSpaceData data)
+{
+  std::map<FuncSpaceData, GradientBasis*>::const_iterator it = gs.find(data);
+  if (it != gs.end()) return it->second;
+
+  GradientBasis* G = new GradientBasis(data);
+  gs.insert(std::make_pair(data, G));
   return G;
 }
 
-const bezierBasis* BasisFactory::getBezierBasis(int parentType, int order)
+const bezierBasis* BasisFactory::getBezierBasis(FuncSpaceData fsd)
 {
-  std::pair<int, int> key(parentType, order);
-  Cont_bezierBasis::iterator it = bs.find(key);
-  if (it != bs.end())
-    return it->second;
+  FuncSpaceData data = fsd.getForPrimaryElement();
 
-  bezierBasis* B = new bezierBasis(parentType, order);
-  bs.insert(std::make_pair(key, B));
+  std::map<FuncSpaceData, bezierBasis*>::const_iterator it = bs.find(data);
+  if (it != bs.end()) return it->second;
+
+  bezierBasis* B = new bezierBasis(data);
+  bs.insert(std::make_pair(data, B));
   return B;
 }
 
@@ -122,14 +133,28 @@ void BasisFactory::clearAll()
   }
   fs.clear();
 
-  std::map<int, JacobianBasis*>::iterator itJ = js.begin();
+  std::map<int, MetricBasis*>::iterator itM = ms.begin();
+  while (itM != ms.end()) {
+    delete itM->second;
+    itM++;
+  }
+  ms.clear();
+
+  std::map<FuncSpaceData, JacobianBasis*>::iterator itJ = js.begin();
   while (itJ != js.end()) {
     delete itJ->second;
     itJ++;
   }
   js.clear();
 
-  Cont_bezierBasis::iterator itB = bs.begin();
+  std::map<FuncSpaceData, GradientBasis*>::iterator itG = gs.begin();
+  while (itG != gs.end()) {
+    delete itG->second;
+    itG++;
+  }
+  gs.clear();
+
+  std::map<FuncSpaceData, bezierBasis*>::iterator itB = bs.begin();
   while (itB != bs.end()) {
     delete itB->second;
     itB++;
diff --git a/Numeric/BasisFactory.h b/Numeric/BasisFactory.h
index 6c4e4e1..af8869d 100644
--- a/Numeric/BasisFactory.h
+++ b/Numeric/BasisFactory.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,37 +6,74 @@
 #ifndef BASISFACTORY_H
 #define BASISFACTORY_H
 
-#include "MElement.h"
-#include "MPyramid.h"
-#include "nodalBasis.h"
 #include "JacobianBasis.h"
-#include "MetricBasis.h"
+#include "FuncSpaceData.h"
+class nodalBasis;
+class MetricBasis;
+class GradientBasis;
+class bezierBasis;
+class CondNumBasis;
 
 class BasisFactory
 {
-  typedef std::map<std::pair<int, int>, bezierBasis*> Cont_bezierBasis;
-  typedef std::map<std::pair<int, int>, GradientBasis*> Cont_gradBasis;
-
  private:
   static std::map<int, nodalBasis*> fs;
-  static std::map<int, JacobianBasis*> js;
   static std::map<int, MetricBasis*> ms;
-  static Cont_gradBasis gs;
-  static Cont_bezierBasis bs;
-  // store bezier bases by parentType and order (no serendipity..)
+  static std::map<int, CondNumBasis*> cs;
+  static std::map<FuncSpaceData, JacobianBasis*> js;
+  static std::map<FuncSpaceData, bezierBasis*> bs;
+  static std::map<FuncSpaceData, GradientBasis*> gs;
 
  public:
   // Caution: the returned pointer can be NULL
+
+  // Nodal
   static const nodalBasis* getNodalBasis(int tag);
-  static const JacobianBasis* getJacobianBasis(int tag);
+
+  // Jacobian
+  // Warning: bases returned by BasisFactory::getJacobianBasis(int tag) are the
+  // only safe bases for using Bezier on the jacobian determinant!
+  static const JacobianBasis* getJacobianBasis(FuncSpaceData);
+  static const JacobianBasis* getJacobianBasis(int tag, int order) {
+    const int type = ElementType::ParentTypeFromTag(tag);
+    if (type != TYPE_PYR)
+      return getJacobianBasis(FuncSpaceData(true, tag, order));
+    else
+      return getJacobianBasis(FuncSpaceData(true, tag, false, order+1, order));
+  }
+  static const JacobianBasis* getJacobianBasis(int tag) {
+    const int order = JacobianBasis::jacobianOrder(tag);
+    const int type = ElementType::ParentTypeFromTag(tag);
+    if (type != TYPE_PYR)
+      return getJacobianBasis(FuncSpaceData(true, tag, order));
+    else
+      return getJacobianBasis(FuncSpaceData(true, tag, false, order+2, order));
+  }
+
+  // Metric
   static const MetricBasis* getMetricBasis(int tag);
 
-  static const GradientBasis* getGradientBasis(int tag, int order);
-  static const bezierBasis* getBezierBasis(int parentTag, int order);
-  static inline const bezierBasis* getBezierBasis(int tag) {
-      return getBezierBasis(ElementType::ParentTypeFromTag(tag),
-                            ElementType::OrderFromTag(tag) );
-    }
+  // Condition number
+  static const CondNumBasis* getCondNumBasis(int tag, int cnOrder = -1);
+
+  // Gradients
+  static const GradientBasis* getGradientBasis(FuncSpaceData);
+  static const GradientBasis* getGradientBasis(int tag, int order) {
+    return getGradientBasis(FuncSpaceData(true, tag, order));
+  }
+  static const GradientBasis* getGradientBasis(int tag) {
+    return getGradientBasis(FuncSpaceData(tag));
+  }
+
+  // Bezier
+  static const bezierBasis* getBezierBasis(FuncSpaceData);
+  static const bezierBasis* getBezierBasis(int parentTag, int order) {
+    int primaryTag = ElementType::getTag(parentTag, 1);
+    return getBezierBasis(FuncSpaceData(true, primaryTag, order));
+  }
+  static const bezierBasis* getBezierBasis(int tag) {
+    return getBezierBasis(FuncSpaceData(tag));
+  }
 
   static void clearAll();
 };
diff --git a/Numeric/BergotBasis.cpp b/Numeric/BergotBasis.cpp
index acc09a1..b7fcfcb 100644
--- a/Numeric/BergotBasis.cpp
+++ b/Numeric/BergotBasis.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/BergotBasis.h b/Numeric/BergotBasis.h
index e774038..dfbb735 100644
--- a/Numeric/BergotBasis.h
+++ b/Numeric/BergotBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/CMakeLists.txt b/Numeric/CMakeLists.txt
index 6977d24..cacf2ed 100644
--- a/Numeric/CMakeLists.txt
+++ b/Numeric/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -7,6 +7,7 @@ set(SRC
   Numeric.cpp
     fullMatrix.cpp
   BasisFactory.cpp
+    FuncSpaceData.cpp
   discreteFrechetDistance.cpp
   miniBasis.cpp
     nodalBasis.cpp
@@ -18,6 +19,7 @@ set(SRC
     bezierBasis.cpp
     JacobianBasis.cpp
     MetricBasis.cpp
+    CondNumBasis.cpp
     pointsGenerators.cpp
   ElementType.cpp
   GaussIntegration.cpp
@@ -35,6 +37,8 @@ set(SRC
  decasteljau.cpp
   mathEvaluator.cpp
   Iso.cpp
+  approximationError.cpp
+  ConjugateGradients.cpp
 )
 
 file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) 
diff --git a/Numeric/CondNumBasis.cpp b/Numeric/CondNumBasis.cpp
new file mode 100644
index 0000000..0b8d206
--- /dev/null
+++ b/Numeric/CondNumBasis.cpp
@@ -0,0 +1,566 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "CondNumBasis.h"
+
+#include "GmshDefines.h"
+#include "GmshMessage.h"
+
+#include <vector>
+#include "polynomialBasis.h"
+#include "pyramidalBasis.h"
+#include "pointsGenerators.h"
+#include "BasisFactory.h"
+#include "Numeric.h"
+
+
+namespace {
+
+
+// Compute the determinant of a 3x3 matrix
+inline double calcDet3x3(double M11, double M12, double M13,
+                         double M21, double M22, double M23,
+                         double M31, double M32, double M33)
+{
+  return M11 * (M22*M33 - M23*M32)
+       - M12 * (M21*M33 - M23*M31)
+       + M13 * (M21*M32 - M22*M31);
+}
+
+
+// Compute the squared Frobenius norm of the inverse of a matrix
+template<bool sign>
+inline double calcInvCondNum2D(double dxdX, double dxdY,
+                               double dydX, double dydY,
+                               double dzdX, double dzdY,
+                               double nx, double ny, double nz)
+{
+  const double dxdXSq = dxdX*dxdX, dydXSq = dydX*dydX, dzdXSq = dzdX*dzdX;
+  const double dxdYSq = dxdY*dxdY, dydYSq = dydY*dydY, dzdYSq = dzdY*dzdY;
+  const double Dx = dxdXSq - dxdYSq, Dy = dydXSq - dydYSq;
+  const double Cx = dxdX * dxdY, Cy = dydX * dydY;
+  const double S1 = dzdYSq * dzdYSq;
+  const double S2 = (dzdXSq - Dy - Dx) * dzdYSq;
+  const double S3 = (Cy + Cx) * dzdX * dzdY;
+  const double S4 = dzdXSq * dzdXSq;
+  const double S5 = (Dy + Dx) * dzdXSq;
+  const double S6 = Cx * Cy;
+  const double S7 = dydXSq * dydXSq;
+  const double S8 = Dy*dydXSq;
+  const double S9 = dxdXSq * dxdXSq;
+  const double S10 = Dx*dxdXSq;
+  const double S11 = Dy*Dy;
+  const double S12 = Dx*Dy;
+  const double S13 = Dx*Dx;
+  const double S = 2.*(S2+S5+S12)+ 4.*(S7-S8+S9-S10) + 8.*(S3+S6) + S1+S4+S11+S13;
+  const double N = dxdXSq + dxdYSq + dydXSq + dydYSq + dzdXSq + dzdYSq;
+  const double sqrtS = sqrt(S);
+  const double sigma1Sq = 0.5 * (N + sqrtS), sigma2Sq = 0.5 * (N - sqrtS);
+  const double iCN = 2. * sqrt(sigma1Sq*sigma2Sq) / (sigma1Sq+sigma2Sq);
+  if (sign) {
+    const double lnx = dydX*dzdY - dzdX*dydY, lny = dzdX*dxdY - dxdX*dzdY,      // Local normal from mapping gradients
+                 lnz = dxdX*dydY - dydX*dxdY;
+    const double dp = lnx*nx + lny*ny + lnz*nz;                                 // Dot product to determine element validity
+    return (dp >= 0.) ? iCN : -iCN;
+  }
+  else
+    return iCN;
+//  return std::min(sqrt(sigma1Sq), sqrt(sigma2Sq)) / std::max(sqrt(sigma1Sq), sqrt(sigma2Sq));
+}
+
+
+// Compute the squared Frobenius norm of the inverse of a matrix
+template<bool sign>
+inline double calcInvCondNum3D(double J11, double J12, double J13,
+                               double J21, double J22, double J23,
+                               double J31, double J32, double J33)
+{
+  const double D = calcDet3x3(J11, J12, J13, J21, J22, J23, J31, J32, J33);
+  if (D == 0.) return 0.;
+  const double I11 = J22*J33-J23*J32, I12 = J13*J32-J12*J33, I13 = J12*J23-J13*J22,
+               I21 = J23*J31-J21*J33, I22 = J11*J33-J13*J31, I23 = J13*J21-J11*J23,
+               I31 = J21*J32-J22*J31, I32 = J12*J31-J11*J32, I33 = J11*J22-J12*J21;
+  const double nSqJ = J11*J11 + J12*J12 + J13*J13
+                    + J21*J21 + J22*J22 + J23*J23
+                    + J31*J31 + J32*J32 + J33*J33;
+  const double nSqDInvJ = I11*I11 + I12*I12 + I13*I13
+                        + I21*I21 + I22*I22 + I23*I23
+                        + I31*I31 + I32*I32 + I33*I33;
+  if (sign)
+    return 3.*D/sqrt(nSqJ*nSqDInvJ);
+  else
+    return 3.*std::fabs(D)/sqrt(nSqJ*nSqDInvJ);
+}
+
+
+// Compute condition number and its gradients
+// w.r.t. node positions, at one location in a 2D element
+template<bool sign>
+inline void calcGradInvCondNum2D(double dxdX, double dxdY,
+                                 double dydX, double dydY,
+                                 double dzdX, double dzdY,
+                                 double nx, double ny, double nz,
+                                 int i, int numMapNodes,
+                                 const fullMatrix<double> &gSMatX,
+                                 const fullMatrix<double> &gSMatY,
+                                 fullMatrix<double> &IDI)
+{
+  const double EpsDegen = 1.e-6;
+
+  bool posJac = true;
+  if (sign) {
+    const double lnx = dydX*dzdY - dzdX*dydY, lny = dzdX*dxdY - dxdX*dzdY,            // Local normal from mapping gradients
+                 lnz = dxdX*dydY - dydX*dxdY;
+    const double dp = lnx*nx + lny*ny + lnz*nz;                                       // Dot product to determine element validity
+    posJac = (dp >= 0.);
+  }
+
+  const double dxdXSq = dxdX*dxdX, dydXSq = dydX*dydX, dzdXSq = dzdX*dzdX;
+  const double dxdYSq = dxdY*dxdY, dydYSq = dydY*dydY, dzdYSq = dzdY*dzdY;
+  const double Dx = dxdXSq - dxdYSq, Dy = dydXSq - dydYSq;
+  const double Cx = dxdX * dxdY, Cy = dydX * dydY;
+  const double S1 = dzdYSq * dzdYSq;
+  const double S2 = (dzdXSq - Dy - Dx) * dzdYSq;
+  const double S3 = (Cy + Cx) * dzdX * dzdY;
+  const double S4 = dzdXSq * dzdXSq;
+  const double S5 = (Dy + Dx) * dzdXSq;
+  const double S6 = Cx * Cy;
+  const double S7 = dydXSq * dydXSq;
+  const double S8 = Dy*dydXSq;
+  const double S9 = dxdXSq * dxdXSq;
+  const double S10 = Dx*dxdXSq;
+  const double S11 = Dy*Dy;
+  const double S12 = Dx*Dy;
+  const double S13 = Dx*Dx;
+  const double S = 2.*(S2+S5+S12)+ 4.*(S7-S8+S9-S10) + 8.*(S3+S6) + S1+S4+S11+S13;
+  if (S == 0.) {                                                                        // S == 0. -> Ideal element
+    for (int j = 0; j<3*numMapNodes; j++) IDI(i, j) = 0.;
+    IDI(i, 3*numMapNodes) = posJac ? 1. : -1.;
+    return;
+  }
+  const double N = dxdXSq + dxdYSq + dydXSq + dydYSq + dzdXSq + dzdYSq;
+  const double sqrtS = sqrt(S), invSqrtS = 1./sqrtS;
+  const double sigma1Sq = 0.5 * (N + sqrtS), sigma2Sq = 0.5 * (N - sqrtS);
+  const bool degen = (sigma2Sq < EpsDegen*sigma1Sq);                                    // Check for degenerate element
+  const double sum = sigma1Sq + sigma2Sq, invSum = 1. / sum;
+  const double prod = sigma1Sq * sigma2Sq;
+  const double sqrtProd = sqrt(prod);
+  const double halfICN = sqrtProd * invSum;
+  IDI(i, 3*numMapNodes) = posJac ? 2. * halfICN : -2. * halfICN;
+
+  if (degen) {                                                                          // Degenerate element: special formula for gradients
+    const double nnXx = dzdX*ny - dydX*nz, nnXy = dxdX*nz - dzdX*nx,
+                 nnXz = dydX*nx - dxdX*ny;
+    const double nnYx = dzdY*ny - dydY*nz, nnYy = dxdY*nz - dzdY*nx,
+                 nnYz = dydY*nx - dxdY*ny;
+    const double fact = 2./N;
+    for (int j = 0; j < numMapNodes; j++) {
+      const double &dPhidX = gSMatX(i, j);
+      const double &dPhidY = gSMatY(i, j);
+      IDI(i, j) = fact * (dPhidY*nnXx - dPhidX*nnYx);
+      IDI(i, j+numMapNodes) = fact * (dPhidY*nnXy - dPhidX*nnYy);
+      IDI(i, j+2*numMapNodes) = fact * (dPhidY*nnXz - dPhidX*nnYz);
+    }
+    return;
+  }
+
+  const double invSqrtProd = 1. / sqrtProd;
+
+  for (int j = 0; j < numMapNodes; j++) {
+    const double &dPhidX = gSMatX(i, j);
+    const double &dPhidY = gSMatY(i, j);
+
+    const double ddxdXSqdxj = 2.*dPhidX*dxdX, ddxdYSqdxj = 2.*dPhidY*dxdY;
+    const double dDxdxj = ddxdXSqdxj - ddxdYSqdxj;
+    const double dCxdxj = dPhidX*dxdY + dxdX*dPhidY;
+    const double dS2dxj = -dDxdxj * dzdYSq;
+    const double dS3dxj = dCxdxj * dzdX * dzdY;
+    const double dS5dxj = dDxdxj * dzdXSq;
+    const double dS6dxj = dCxdxj * Cy;
+    const double dS9dxj = 2. * ddxdXSqdxj * dxdXSq;
+    const double dS10dxj = dDxdxj*dxdXSq + Dx*ddxdXSqdxj;
+    const double dS12dxj = dDxdxj * Dy;
+    const double dS13dxj = 2. * dDxdxj* Dx;
+    const double dSdxj = 2.*(dS2dxj+dS5dxj+dS12dxj)+ 4.*(dS9dxj-dS10dxj)
+                       + 8.*(dS3dxj+dS6dxj) + dS13dxj;
+    const double dNdxj = ddxdXSqdxj + ddxdYSqdxj;
+    const double dsqrtSdxj = 0.5*dSdxj*invSqrtS;
+    const double dsigma1Sqdxj = 0.5 * (dNdxj + dsqrtSdxj),
+                 dsigma2Sqdxj = 0.5 * (dNdxj - dsqrtSdxj);
+    const double dSumdxj = dsigma1Sqdxj + dsigma2Sqdxj;
+    const double dProddxj = dsigma1Sqdxj*sigma2Sq + sigma1Sq*dsigma2Sqdxj;
+    const double diCNdxj = (dProddxj*sum - 2.*prod*dSumdxj)*invSum*invSum*invSqrtProd;
+    IDI(i, j) = posJac ? diCNdxj : -diCNdxj;
+
+    const double ddydXSqdyj = 2.*dPhidX*dydX, ddydYSqdyj = 2.*dPhidY*dydY;
+    const double dDydyj = ddydXSqdyj - ddydYSqdyj;
+    const double dCydyj = dPhidX*dydY + dydX*dPhidY;
+    const double dS2dyj = -dDydyj * dzdYSq;
+    const double dS3dyj = dCydyj * dzdX * dzdY;
+    const double dS5dyj = dDydyj * dzdXSq;
+    const double dS6dyj = Cx * dCydyj;
+    const double dS7dyj = 2. * ddydXSqdyj * dydXSq;
+    const double dS8dyj = dDydyj*dydXSq + Dy*ddydXSqdyj;
+    const double dS11dyj = 2. * dDydyj * Dy;
+    const double dS12dyj = Dx* dDydyj;
+    const double dSdyj = 2.*(dS2dyj+dS5dyj+dS12dyj)+ 4.*(dS7dyj-dS8dyj)
+                       + 8.*(dS3dyj+dS6dyj) + dS11dyj;
+    const double dNdyj = ddydXSqdyj + ddydYSqdyj;
+    const double dsqrtSdyj = 0.5*dSdyj*invSqrtS;
+    const double dsigma1Sqdyj = 0.5 * (dNdyj + dsqrtSdyj),
+                 dsigma2Sqdyj = 0.5 * (dNdyj - dsqrtSdyj);
+    const double dSumdyj = dsigma1Sqdyj + dsigma2Sqdyj;
+    const double dProddyj = dsigma1Sqdyj*sigma2Sq + sigma1Sq*dsigma2Sqdyj;
+    const double diCNdyj = (dProddyj*sum - 2.*prod*dSumdyj)*invSum*invSum*invSqrtProd;
+    IDI(i, j+numMapNodes) = posJac ? diCNdyj : -diCNdyj;
+
+    const double ddzdXSqdzj = 2.*dPhidX*dzdX, ddzdYSqdzj = 2.*dPhidY*dzdY;
+    const double dS1dzj = 2. * ddzdYSqdzj * dzdYSq;
+    const double dS2dzj = (dzdXSq - Dy - Dx) * ddzdYSqdzj;
+    const double dS3dzj = (Cy + Cx) *
+                          (ddzdXSqdzj*dzdY + dzdX*ddzdYSqdzj);
+    const double dS4dzj = 2. * ddzdXSqdzj * dzdXSq;
+    const double dS5dzj = (Dy + Dx) * ddzdXSqdzj;
+    const double dSdzj = 2.*(dS2dzj+dS5dzj) + 8.*dS3dzj + dS1dzj+dS4dzj;
+    const double dNdzj = ddzdXSqdzj + ddzdYSqdzj;
+    const double dsqrtSdzj = 0.5*dSdzj*invSqrtS;
+    const double dsigma1Sqdzj = 0.5 * (dNdzj + dsqrtSdzj),
+                 dsigma2Sqdzj = 0.5 * (dNdzj - dsqrtSdzj);
+    const double dSumdzj = dsigma1Sqdzj + dsigma2Sqdzj;
+    const double dProddzj = dsigma1Sqdzj*sigma2Sq + sigma1Sq*dsigma2Sqdzj;
+    const double diCNdzj = (dProddzj*sum - 2.*prod*dSumdzj)*invSum*invSum*invSqrtProd;
+    IDI(i, j+2*numMapNodes) = posJac ? diCNdzj : -diCNdzj;
+  }
+}
+
+
+// Compute condition number and its gradients
+// w.r.t. node positions, at one location in a 3D element
+template<bool sign>
+inline void calcGradInvCondNum3D(double dxdX, double dxdY, double dxdZ,
+                                 double dydX, double dydY, double dydZ,
+                                 double dzdX, double dzdY, double dzdZ,
+                                 int i, int numMapNodes,
+                                 const fullMatrix<double> &gSMatX,
+                                 const fullMatrix<double> &gSMatY,
+                                 const fullMatrix<double> &gSMatZ,
+                                 fullMatrix<double> &IDI)
+{
+  const double normJSq = dxdX*dxdX + dxdY*dxdY + dxdZ*dxdZ
+                       + dydX*dydX + dydY*dydY + dydZ*dydZ
+                       + dzdX*dzdX + dzdY*dzdY + dzdZ*dzdZ;
+  const double I11 = dydY*dzdZ - dydZ*dzdY, I12 = dxdZ*dzdY - dxdY*dzdZ,
+               I13 = dxdY*dydZ - dxdZ*dydY, I21 = dydZ*dzdX - dydX*dzdZ,
+               I22 = dxdX*dzdZ - dxdZ*dzdX, I23 = dxdZ*dydX - dxdX*dydZ,
+               I31 = dydX*dzdY - dydY*dzdX, I32 = dxdY*dzdX - dxdX*dzdY,
+               I33 = dxdX*dydY - dxdY*dydX;
+  const double normISq = I11*I11 + I12*I12 + I13*I13
+                       + I21*I21 + I22*I22 + I23*I23
+                       + I31*I31 + I32*I32 + I33*I33;
+  const double invProd = 1./(normJSq*normISq), invSqrtProd = sqrt(invProd);
+  const double D = calcDet3x3(dxdX, dxdY, dxdZ,
+                              dydX, dydY, dydZ,
+                              dzdX, dzdY, dzdZ);
+  const bool reverse = (!sign && (D < 0.));
+  const double sICN = 3.*D*invSqrtProd;
+  IDI(i, 3*numMapNodes) = reverse ? -sICN : sICN;
+
+  for (int j = 0; j < numMapNodes; j++) {
+    const double &dPhidX = gSMatX(i, j);
+    const double &dPhidY = gSMatY(i, j);
+    const double &dPhidZ = gSMatZ(i, j);
+
+    const double dNormJSqdxj = 2.*(dPhidX*dxdX + dPhidY*dxdY + dPhidZ*dxdZ);
+    const double dNormISqdxj = 2.*((dPhidZ*dzdY - dPhidY*dzdZ)*I12 + (dPhidY*dydZ - dPhidZ*dydY)*I13
+                                 + (dPhidX*dzdZ - dPhidZ*dzdX)*I22 + (dPhidZ*dydX - dPhidX*dydZ)*I23
+                                 + (dPhidY*dzdX - dPhidX*dzdY)*I32 + (dPhidX*dydY - dPhidY*dydX)*I33);
+    const double dProddxj = dNormJSqdxj*normISq + dNormISqdxj*normJSq;
+    const double dDdxj = dPhidX * dydY * dzdZ + dzdX * dPhidY * dydZ +
+                         dydX * dzdY * dPhidZ - dzdX * dydY * dPhidZ -
+                         dPhidX * dzdY * dydZ - dydX * dPhidY * dzdZ;
+    const double dsICNdxj = 3. * (dDdxj*invSqrtProd - 0.5*D*dProddxj*invProd*invSqrtProd);
+    IDI(i, j) = reverse ? -dsICNdxj : dsICNdxj;
+
+    const double dNormJSqdyj = 2.*(dPhidX*dydX + dPhidY*dydY + dPhidZ*dydZ);
+    const double dNormISqdyj = 2.*((dPhidY*dzdZ - dPhidZ*dzdY)*I11 + (dxdY*dPhidZ - dxdZ*dPhidY)*I13
+                                 + (dPhidZ*dzdX - dPhidX*dzdZ)*I21 + (dxdZ*dPhidX - dxdX*dPhidZ)*I23
+                                 + (dPhidX*dzdY - dPhidY*dzdX)*I31 + (dxdX*dPhidY - dxdY*dPhidX)*I33);
+    const double dProddyj = dNormJSqdyj*normISq + dNormISqdyj*normJSq;
+    const double dDdyj = dxdX * dPhidY * dzdZ + dzdX * dxdY * dPhidZ +
+                         dPhidX * dzdY * dxdZ - dzdX * dPhidY * dxdZ -
+                         dxdX * dzdY * dPhidZ - dPhidX * dxdY * dzdZ;
+    const double dsICNdyj = 3. * (dDdyj*invSqrtProd - 0.5*D*dProddyj*invProd*invSqrtProd);
+    IDI(i, j+numMapNodes) = reverse ? -dsICNdyj : dsICNdyj;
+
+    const double dNormJSqdzj = 2.*(dPhidX*dzdX + dPhidY*dzdY + dPhidZ*dzdZ);
+    const double dNormISqdzj = 2.*((dydY*dPhidZ - dydZ*dPhidY)*I11 + (dxdZ*dPhidY - dxdY*dPhidZ)*I12
+                                 + (dydZ*dPhidX - dydX*dPhidZ)*I21 + (dxdX*dPhidZ - dxdZ*dPhidX)*I22
+                                 + (dydX*dPhidY - dydY*dPhidX)*I31 + (dxdY*dPhidX - dxdX*dPhidY)*I32);
+    const double dProddzj = dNormJSqdzj*normISq + dNormISqdzj*normJSq;
+    const double dDdzj = dxdX * dydY * dPhidZ + dPhidX * dxdY * dydZ +
+                         dydX * dPhidY * dxdZ - dPhidX * dydY * dxdZ -
+                         dxdX * dPhidY * dydZ - dydX * dxdY * dPhidZ;
+    const double dsICNdzj = 3. * (dDdzj*invSqrtProd - 0.5*D*dProddzj*invProd*invSqrtProd);
+    IDI(i, j+2*numMapNodes) = reverse ? -dsICNdzj : dsICNdzj;
+  }
+}
+
+
+}
+
+
+CondNumBasis::CondNumBasis(int tag, int cnOrder) :
+    _tag(tag), _dim(ElementType::DimensionFromTag(tag)),
+    _condNumOrder(cnOrder >= 0 ? cnOrder : condNumOrder(tag))
+{
+  const bool serendip = false;
+  FuncSpaceData data(true, tag, _condNumOrder, &serendip);
+
+  _gradBasis = BasisFactory::getGradientBasis(data);
+
+  fullMatrix<double> lagPoints;                                  // Sampling points
+  gmshGeneratePoints(data, lagPoints);
+  _nCondNumNodes = lagPoints.size1();
+  _nMapNodes = BasisFactory::getNodalBasis(tag)->getNumShapeFunctions();
+
+  // Store shape function gradients of mapping at condition number nodes
+  _gradBasis = BasisFactory::getGradientBasis(tag, _condNumOrder);
+
+  // Compute shape function gradients of primary mapping at barycenter,
+  // in order to compute normal to straight element
+  const int parentType = ElementType::ParentTypeFromTag(tag);
+  const int primMapType = ElementType::getTag(parentType, 1, false);
+  const nodalBasis *primMapBasis = BasisFactory::getNodalBasis(primMapType);
+  _nPrimMapNodes = primMapBasis->getNumShapeFunctions();
+
+  double xBar = 0., yBar = 0., zBar = 0.;
+  double barycenter[3] = {0., 0., 0.};
+  for (int i = 0; i < _nPrimMapNodes; i++) {
+    for (int j = 0; j < primMapBasis->points.size2(); ++j) {
+      barycenter[j] += primMapBasis->points(i, j);
+    }
+  }
+  barycenter[0] /= _nPrimMapNodes;
+  barycenter[1] /= _nPrimMapNodes;
+  barycenter[2] /= _nPrimMapNodes;
+
+  double (*barDPsi)[3] = new double[_nPrimMapNodes][3];
+  primMapBasis->df(xBar, yBar, zBar, barDPsi);
+
+  // TODO: Make primGradShape from ideal element
+  primGradShapeBarycenterX.resize(_nPrimMapNodes);
+  primGradShapeBarycenterY.resize(_nPrimMapNodes);
+  primGradShapeBarycenterZ.resize(_nPrimMapNodes);
+  for (int j=0; j<_nPrimMapNodes; j++) {
+    primGradShapeBarycenterX(j) = barDPsi[j][0];
+    primGradShapeBarycenterY(j) = barDPsi[j][1];
+    primGradShapeBarycenterZ(j) = barDPsi[j][2];
+  }
+
+  delete[] barDPsi;
+}
+
+
+int CondNumBasis::condNumOrder(int tag)
+{
+  const int parentType = ElementType::ParentTypeFromTag(tag);
+  const int order = ElementType::OrderFromTag(tag);
+  return condNumOrder(parentType, order);
+}
+
+
+int CondNumBasis::condNumOrder(int parentType, int order)
+{
+  switch (parentType) {
+    case TYPE_PNT : return 0;
+    case TYPE_LIN : return order - 1;
+    case TYPE_TRI : return (order == 1) ? 0 : order;
+    case TYPE_QUA : return order;
+    case TYPE_TET : return (order == 1) ? 0 : order;
+    case TYPE_PRI : return order;
+    case TYPE_HEX : return order;
+    case TYPE_PYR : return (order == 1) ? 0 : order;
+    default :
+      Msg::Error("Unknown element type %d, return order 0", parentType);
+      return 0;
+  }
+}
+
+
+// Calculate the inverse condition number in Frobenius norm for one element, with normal vectors to straight
+// element for regularization. Evaluation points depend on the given matrices for shape function gradients.
+template<bool sign>
+inline void CondNumBasis::getInvCondNumGeneral(int nCondNumNodes,
+                                               const fullMatrix<double> &gSMatX,
+                                               const fullMatrix<double> &gSMatY,
+                                               const fullMatrix<double> &gSMatZ,
+                                               const fullMatrix<double> &nodesXYZ,
+                                               const fullMatrix<double> &normals,
+                                               fullVector<double> &condNum) const
+{
+  switch (_dim) {
+
+    case 0 : {
+      for (int i = 0; i < nCondNumNodes; i++) condNum(i) = 1.;
+      break;
+    }
+
+    case 1 : {
+      Msg::Warning("Inverse condition number not implemented in 1D");
+      condNum.setAll(0.);
+      break;
+    }
+
+    case 2 : {
+      fullMatrix<double> dxyzdX(nCondNumNodes,3), dxyzdY(nCondNumNodes,3);
+      gSMatX.mult(nodesXYZ, dxyzdX);
+      gSMatY.mult(nodesXYZ, dxyzdY);
+      for (int i = 0; i < nCondNumNodes; i++) {
+        const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
+        const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
+        const double &nx = normals(0,0), &ny = normals(0,1), &nz = normals(0,2);
+        condNum(i) = calcInvCondNum2D<sign>(dxdX, dxdY, dydX, dydY, dzdX, dzdY, nx, ny, nz);
+      }
+      break;
+    }
+
+    case 3 : {
+      fullMatrix<double> dxyzdX(nCondNumNodes, 3), dxyzdY(nCondNumNodes, 3), dxyzdZ(nCondNumNodes, 3);
+      gSMatX.mult(nodesXYZ, dxyzdX);
+      gSMatY.mult(nodesXYZ, dxyzdY);
+      gSMatZ.mult(nodesXYZ, dxyzdZ);
+      for (int i = 0; i < nCondNumNodes; i++) {
+        const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
+        const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
+        const double &dxdZ = dxyzdZ(i,0), &dydZ = dxyzdZ(i,1), &dzdZ = dxyzdZ(i,2);
+        condNum(i) = calcInvCondNum3D<sign>(dxdX, dxdY, dxdZ,
+                                            dydX, dydY, dydZ,
+                                            dzdX, dzdY, dzdZ);
+     }
+      break;
+    }
+  }
+}
+
+
+void CondNumBasis::getInvCondNumGeneral(int nCondNumNodes,
+                                        const fullMatrix<double> &gSMatX,
+                                        const fullMatrix<double> &gSMatY,
+                                        const fullMatrix<double> &gSMatZ,
+                                        const fullMatrix<double> &nodesXYZ,
+                                        fullVector<double> &invCond) const
+{
+  fullMatrix<double> dumNormals;
+  getInvCondNumGeneral<false>(nCondNumNodes, gSMatX, gSMatY, gSMatZ,
+                              nodesXYZ, dumNormals, invCond);
+}
+
+
+void CondNumBasis::getSignedInvCondNumGeneral(int nCondNumNodes,
+                                              const fullMatrix<double> &gSMatX,
+                                              const fullMatrix<double> &gSMatY,
+                                              const fullMatrix<double> &gSMatZ,
+                                              const fullMatrix<double> &nodesXYZ,
+                                              const fullMatrix<double> &normals,
+                                              fullVector<double> &invCond) const
+{
+  getInvCondNumGeneral<true>(nCondNumNodes, gSMatX, gSMatY, gSMatZ,
+                             nodesXYZ, normals, invCond);
+}
+
+
+// Calculate the inverse condition number in Frobenius norm and its gradients w.r.t. node position,
+// with normal vectors to straight element  for regularization. Evaluation points depend on the
+// given matrices for shape function gradients.
+template<bool sign>
+inline void CondNumBasis::getInvCondNumAndGradientsGeneral(int nCondNumNodes,
+                                                           const fullMatrix<double> &gSMatX,
+                                                           const fullMatrix<double> &gSMatY,
+                                                           const fullMatrix<double> &gSMatZ,
+                                                           const fullMatrix<double> &nodesXYZ,
+                                                           const fullMatrix<double> &normals,
+                                                           fullMatrix<double> &IDI) const
+{
+  fullMatrix<double> JDJ(nCondNumNodes, 3*_nMapNodes+1);
+
+  switch (_dim) {
+
+    case 0 : {
+      for (int i = 0; i < nCondNumNodes; i++) {
+        for (int j = 0; j < _nMapNodes; j++) {
+          IDI(i,j) = 0.;
+          IDI(i,j+1*_nMapNodes) = 0.;
+          IDI(i,j+2*_nMapNodes) = 0.;
+        }
+        IDI(i,3*_nMapNodes) = 1.;
+      }
+      break;
+    }
+
+    case 1 : {
+      Msg::Warning("Inverse condition number not implemented in 1D");
+      IDI.setAll(0.);
+      break;
+    }
+
+    case 2 : {
+      fullMatrix<double> dxyzdX(nCondNumNodes,3), dxyzdY(nCondNumNodes,3);
+      gSMatX.mult(nodesXYZ, dxyzdX);
+      gSMatY.mult(nodesXYZ, dxyzdY);
+      for (int i = 0; i < nCondNumNodes; i++) {
+        const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
+        const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
+        const double &nx = normals(0,0), &ny = normals(0,1), &nz = normals(0,2);
+        calcGradInvCondNum2D<sign>(dxdX, dxdY, dydX, dydY, dzdX, dzdY,
+                                   nx, ny, nz, i, _nMapNodes, gSMatX, gSMatY, IDI);
+      }
+      break;
+    }
+
+    case 3 : {
+      fullMatrix<double> dxyzdX(nCondNumNodes,3), dxyzdY(nCondNumNodes,3), dxyzdZ(nCondNumNodes,3);
+      gSMatX.mult(nodesXYZ, dxyzdX);
+      gSMatY.mult(nodesXYZ, dxyzdY);
+      gSMatZ.mult(nodesXYZ, dxyzdZ);
+      for (int i = 0; i < nCondNumNodes; i++) {
+        const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
+        const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
+        const double &dxdZ = dxyzdZ(i,0), &dydZ = dxyzdZ(i,1), &dzdZ = dxyzdZ(i,2);
+        calcGradInvCondNum3D<sign>(dxdX, dxdY, dxdZ,
+                                   dydX, dydY, dydZ,
+                                   dzdX, dzdY, dzdZ,
+                                   i, _nMapNodes,
+                                   gSMatX, gSMatY, gSMatZ, IDI);
+      }
+      break;
+    }
+  }
+}
+
+
+void CondNumBasis::getInvCondNumAndGradientsGeneral(int nCondNumNodes,
+                                                    const fullMatrix<double> &gSMatX,
+                                                    const fullMatrix<double> &gSMatY,
+                                                    const fullMatrix<double> &gSMatZ,
+                                                    const fullMatrix<double> &nodesXYZ,
+                                                    fullMatrix<double> &IDI) const
+{
+  fullMatrix<double> dumNormals;
+  getInvCondNumAndGradientsGeneral<false>(nCondNumNodes, gSMatX, gSMatY, gSMatZ,
+                                          nodesXYZ, dumNormals, IDI);
+}
+
+
+void CondNumBasis::getSignedInvCondNumAndGradientsGeneral(int nCondNumNodes,
+                                                          const fullMatrix<double> &gSMatX,
+                                                          const fullMatrix<double> &gSMatY,
+                                                          const fullMatrix<double> &gSMatZ,
+                                                          const fullMatrix<double> &nodesXYZ,
+                                                          const fullMatrix<double> &normals,
+                                                          fullMatrix<double> &IDI) const
+{
+  getInvCondNumAndGradientsGeneral<true>(nCondNumNodes, gSMatX, gSMatY, gSMatZ,
+                                         nodesXYZ, normals, IDI);
+}
diff --git a/Numeric/CondNumBasis.h b/Numeric/CondNumBasis.h
new file mode 100644
index 0000000..5f7f84c
--- /dev/null
+++ b/Numeric/CondNumBasis.h
@@ -0,0 +1,125 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _CONDNUMBASIS_H_
+#define _CONDNUMBASIS_H_
+
+#include <map>
+#include <vector>
+#include "JacobianBasis.h"
+#include "fullMatrix.h"
+
+
+class CondNumBasis {
+ private:
+  const GradientBasis *_gradBasis;
+
+  const int _tag, _dim, _condNumOrder;
+
+  fullVector<double> primGradShapeBarycenterX, primGradShapeBarycenterY,
+                     primGradShapeBarycenterZ;
+
+  int _nCondNumNodes;
+  int _nMapNodes, _nPrimMapNodes;
+
+ public :
+  CondNumBasis(int tag, int cnOrder = -1);
+
+  // Get methods
+  inline int getCondNumOrder() const { return _condNumOrder; }
+  inline int getNumCondNumNodes() const { return _nCondNumNodes; }
+  inline int getNumMapNodes() const { return _nMapNodes; }
+  inline int getNumPrimMapNodes() const { return _nPrimMapNodes; }
+
+  // Order calculation
+  static int condNumOrder(int tag);
+  static int condNumOrder(int parentType, int order);
+
+  // Condition number evaluation methods
+  inline void getInvCondNum(const fullMatrix<double> &nodesXYZ,
+                            fullVector<double> &invCond) const {
+    getInvCondNumGeneral(_nCondNumNodes,
+                         _gradBasis->gradShapeIdealMatX,
+                         _gradBasis->gradShapeIdealMatY,
+                         _gradBasis->gradShapeIdealMatZ,
+                         nodesXYZ, invCond);
+  }
+  inline void getSignedInvCondNum(const fullMatrix<double> &nodesXYZ,
+                                  const fullMatrix<double> &normals,
+                                  fullVector<double> &invCond) const {
+    getSignedInvCondNumGeneral(_nCondNumNodes,
+                               _gradBasis->gradShapeIdealMatX,
+                               _gradBasis->gradShapeIdealMatY,
+                               _gradBasis->gradShapeIdealMatZ,
+                               nodesXYZ, normals, invCond);
+  }
+  inline void getInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
+                                        fullMatrix<double> &IDI) const {
+    getInvCondNumAndGradientsGeneral(_nCondNumNodes,
+                                     _gradBasis->gradShapeIdealMatX,
+                                     _gradBasis->gradShapeIdealMatY,
+                                     _gradBasis->gradShapeIdealMatZ,
+                                     nodesXYZ, IDI);
+  }
+  inline void getSignedInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
+                                              const fullMatrix<double> &normals,
+                                              fullMatrix<double> &IDI) const {
+    getSignedInvCondNumAndGradientsGeneral(_nCondNumNodes,
+                                           _gradBasis->gradShapeIdealMatX,
+                                           _gradBasis->gradShapeIdealMatY,
+                                           _gradBasis->gradShapeIdealMatZ,
+                                           nodesXYZ, normals, IDI);
+  }
+
+
+ private :
+  template<bool sign>
+  void getInvCondNumGeneral(int nCondNumNodes,
+                            const fullMatrix<double> &gSMatX,
+                            const fullMatrix<double> &gSMatY,
+                            const fullMatrix<double> &gSMatZ,
+                            const fullMatrix<double> &nodesXYZ,
+                            const fullMatrix<double> &normals,
+                            fullVector<double> &invCond) const;
+  void getInvCondNumGeneral(int nCondNumNodes,
+                            const fullMatrix<double> &gSMatX,
+                            const fullMatrix<double> &gSMatY,
+                            const fullMatrix<double> &gSMatZ,
+                            const fullMatrix<double> &nodesXYZ,
+                            fullVector<double> &invCond) const;
+  void getSignedInvCondNumGeneral(int nCondNumNodes,
+                                  const fullMatrix<double> &gSMatX,
+                                  const fullMatrix<double> &gSMatY,
+                                  const fullMatrix<double> &gSMatZ,
+                                  const fullMatrix<double> &nodesXYZ,
+                                  const fullMatrix<double> &normals,
+                                  fullVector<double> &invCond) const;
+
+  template<bool sign>
+  void getInvCondNumAndGradientsGeneral(int nCondNumNodes,
+                                        const fullMatrix<double> &gSMatX,
+                                        const fullMatrix<double> &gSMatY,
+                                        const fullMatrix<double> &gSMatZ,
+                                        const fullMatrix<double> &nodesXYZ,
+                                        const fullMatrix<double> &normals,
+                                        fullMatrix<double> &IDI) const;
+  void getInvCondNumAndGradientsGeneral(int nCondNumNodes,                          // No normal given -> unsigned measure
+                                        const fullMatrix<double> &gSMatX,
+                                        const fullMatrix<double> &gSMatY,
+                                        const fullMatrix<double> &gSMatZ,
+                                        const fullMatrix<double> &nodesXYZ,
+                                        fullMatrix<double> &IDI) const;
+  void getSignedInvCondNumAndGradientsGeneral(int nCondNumNodes,                    // Normals given -> signed measure
+                                              const fullMatrix<double> &gSMatX,
+                                              const fullMatrix<double> &gSMatY,
+                                              const fullMatrix<double> &gSMatZ,
+                                              const fullMatrix<double> &nodesXYZ,
+                                              const fullMatrix<double> &normals,
+                                              fullMatrix<double> &IDI) const;
+
+
+};
+
+#endif
diff --git a/Numeric/ConjugateGradients.cpp b/Numeric/ConjugateGradients.cpp
new file mode 100644
index 0000000..83e2da7
--- /dev/null
+++ b/Numeric/ConjugateGradients.cpp
@@ -0,0 +1,137 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include <algorithm>
+#include <math.h>
+#include "GmshMessage.h"
+#include "ConjugateGradients.h"
+/*
+  min_a f(x+a*d);
+  f(x+a*d) = f(x) + f'(x) (
+*/
+
+static double _norm (std::vector<double> &x){
+  double n = 0.0;
+  for (unsigned int i=0;i<x.size();i++)n += x[i]*x[i];
+  return sqrt(n);
+}
+static void scale (std::vector<double> &x, double s){
+  for (unsigned int i=0;i<x.size();i++)x[i]*=s;
+}
+
+static void gmshLineSearch(void (*func)(std::vector<double> &x,
+					double &Obj,
+					bool needGrad,
+					std::vector<double> &gradObj, void *), // the function
+			   void* data, // eventual data
+			   std::vector<double> &x, // variables
+			   std::vector<double> &p, // search direction
+			   std::vector<double> &g, // gradient
+			   double &f,
+			   double stpmax,
+			   int &check)
+{
+  int i;
+  double alam, alam2 = 1., alamin, f2 = 0., fold2 = 0., rhs1, rhs2, temp, tmplam = 0.;
+
+  const double ALF = 1.e-4;
+  const double TOLX = 1.0e-9;
+
+  std::vector<double> xold(x), grad(x);
+  double fold;
+  (*func)(xold, fold, false, grad, data);
+
+  check=0;
+  int n = x.size();
+  double norm = _norm(p);
+  if (norm > stpmax) scale(p,stpmax / norm);
+  double slope=0.0;
+  for (i = 0; i < n; i++) slope += g[i]*p[i];
+  double test=0.0;
+  for (i = 0; i < n; i++) {
+    temp = fabs(p[i]) / std::max(fabs(xold[i]), 1.0);
+    if (temp > test) test = temp;
+  }
+
+  alamin = TOLX / test;
+  alam = 1.;
+
+  while(1) {
+    for (i = 0; i < n; i++) x[i] = xold[i] + alam*p[i];
+    (*func)(x, f, false, grad, data);
+    if (f > 1.e280) alam*=.5;
+    else break;
+  }
+
+  while(1) {
+    for (i = 0; i < n; i++) x[i] = xold[i] + alam*p[i];
+    (*func)(x, f, false, grad, data);
+
+    //    printf("alam = %12.5E alamin = %12.5E f = %12.5E fold = %12.5E slope %12.5E stuff %12.5E\n",alam,alamin,f,fold, slope,  ALF * alam * slope);
+
+    //    f = (*func)(x, data);
+    if (alam < alamin) {
+      for (i = 0; i <n; i++) x[i] = xold[i];
+      check = 1;
+      return;
+    }
+    else if (f <= fold + ALF * alam * slope) return;
+    else {
+      if (alam == 1.0)
+        tmplam = -slope / (2.0 * (f - fold - slope));
+      else {
+        rhs1 = f - fold - alam * slope;
+        rhs2 = f2 - fold2 - alam2 * slope;
+        const double a = (rhs1/(alam*alam)-rhs2/(alam2*alam2))/(alam-alam2);
+        const double b = (-alam2*rhs1/(alam*alam)+alam*rhs2/(alam2*alam2))/(alam-alam2);
+        if (a == 0.0) tmplam = -slope / (2.0 * b);
+        else {
+          const double disc = b*b-3.0*a*slope;
+          if (disc < 0.0) Msg::Error("Roundoff problem in gmshLineSearch.");
+          else tmplam = (-b+sqrt(disc))/(3.0*a);
+        }
+        if (tmplam > 0.5 * alam)
+          tmplam = 0.5 * alam;
+      }
+    }
+    alam2 = alam;
+    f2 = f;
+    fold2 = fold;
+    alam = std::max(tmplam, 0.1 * alam);
+  }
+}
+
+// Simple Gradient Descent Minimization (use finite differences to compute the gradient)
+
+double GradientDescent(void (*func)(std::vector<double> &x,
+				    double &Obj,
+				    bool needGrad,
+				    std::vector<double> &gradObj, void *), // its gradient
+		       std::vector<double> &x, // The variables
+		       void *data) // User data
+{
+  const int MAXIT = 3;
+  const int N = x.size();
+
+  std::vector<double> grad(N);
+  std::vector<double> dir(N);
+  double f;
+
+//  printf("entering gradient descent (%d unknowns)...\n",N);
+
+  for (int iter = 0; iter < MAXIT; iter++){
+    // compute gradient of func
+    double stpmax=100000;
+    func(x, f, true, grad, data);
+    //    printf("computing f ... %22.15E\n",f);
+    for (int i=0;i<N;i++)dir[i] = -grad[i];
+    int check;
+    gmshLineSearch(func, data, x, dir, grad, f, stpmax, check);
+    //    printf("line search is done, f reduces to %22.15E\n",f);
+    // printf("Line search done x = (%g %g) f = %g\n",x(0),x(1),f);
+    if (check == 1) break;
+  }
+  return f;
+}
diff --git a/Numeric/ConjugateGradients.h b/Numeric/ConjugateGradients.h
new file mode 100644
index 0000000..c896b52
--- /dev/null
+++ b/Numeric/ConjugateGradients.h
@@ -0,0 +1,18 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef  _CONJUGATEGRADIENTS
+#define  _CONJUGATEGRADIENTS
+
+#include <vector>
+
+double GradientDescent(void (*func)(std::vector<double> &x,
+				    double &Obj,
+				    bool needGrad,
+				    std::vector<double> &gradObj, void *),
+		       std::vector<double> &x,
+		       void *data); // User data
+
+#endif
diff --git a/Numeric/ElementType.cpp b/Numeric/ElementType.cpp
index 0a8ed7f..4cf8a20 100644
--- a/Numeric/ElementType.cpp
+++ b/Numeric/ElementType.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -90,9 +90,12 @@ int ElementType::ParentTypeFromTag(int tag)
     case(MSH_PNT_SUB):  case(MSH_LIN_SUB):
     case(MSH_TRI_SUB):  case(MSH_TET_SUB):
       return TYPE_XFEM;
+    case(MSH_TRI_MINI):
+    case(MSH_TET_MINI):
+      return TYPE_MINI;
     default:
-      Msg::Error("Unknown element tag %i, assuming tetrahedron.", tag);
-      return TYPE_TET;
+      Msg::Error("Unknown element tag %i for parent type, returning -1.", tag);
+      return -1;
   }
 }
 
@@ -130,6 +133,9 @@ int ElementType::OrderFromTag(int tag)
   case MSH_TRI_24  : return 8;
   case MSH_TRI_27  : return 9;
   case MSH_TRI_30  : return 10;
+  case MSH_TRI_MINI  : return 1;
+  case MSH_POLYG_  : return 1;
+  case MSH_POLYG_B : return 1;
   case MSH_TET_1   : return 0;
   case MSH_TET_4   : return 1;
   case MSH_TET_10  : return 2;
@@ -149,6 +155,7 @@ int ElementType::OrderFromTag(int tag)
   case MSH_TET_46  : return 8;
   case MSH_TET_52  : return 9;
   case MSH_TET_58  : return 10;
+  case MSH_TET_MINI  : return 1;
   case MSH_QUA_1   : return 0;
   case MSH_QUA_4   : return 1;
   case MSH_QUA_9   : return 2;
@@ -223,8 +230,9 @@ int ElementType::OrderFromTag(int tag)
   case MSH_PYR_53 : return 7;
   case MSH_PYR_61 : return 8;
   case MSH_PYR_69 : return 9;
+  case MSH_POLYH_ : return 1;
   default :
-    Msg::Error("Unknown element tag %d, assuming order 1.",tag);
+    Msg::Warning("Unknown element tag %d, assuming order 1.",tag);
     return 1;
   }
 }
@@ -254,7 +262,7 @@ int ElementType::DimensionFromTag(int tag)
     case(MSH_TRI_21I):  case(MSH_TRI_24):
     case(MSH_TRI_27):   case(MSH_TRI_30):
     case(MSH_TRI_B):    case(MSH_TRI_1):
-    case(MSH_TRI_SUB):
+    case(MSH_TRI_SUB):  case(MSH_TRI_MINI):
 
     case(MSH_QUA_4):    case(MSH_QUA_9):
     case(MSH_QUA_8):    case(MSH_QUA_16):
@@ -280,6 +288,7 @@ int ElementType::DimensionFromTag(int tag)
     case(MSH_TET_46):   case(MSH_TET_52):
     case(MSH_TET_58):   case(MSH_TET_1):
     case(MSH_TET_16):   case(MSH_TET_SUB):
+    case(MSH_TET_MINI):
 
     case(MSH_PYR_5):    case(MSH_PYR_14):
     case(MSH_PYR_13):   case(MSH_PYR_30):
@@ -315,8 +324,8 @@ int ElementType::DimensionFromTag(int tag)
       return 3;
 
     default:
-      Msg::Error("Unknown element tag %i, assuming dimension 3.", tag);
-      return 3;
+      Msg::Error("Unknown element tag %i for dimension, returning -1.", tag);
+      return -1;
   }
 }
 
@@ -347,6 +356,9 @@ int ElementType::SerendipityFromTag(int tag)
 
   case MSH_PYR_1   : case MSH_PYR_5   :
 
+  case MSH_POLYG_  : case MSH_POLYG_B :
+  case MSH_POLYH_  :
+
     return 1; // Serendipity or not
 
 
@@ -418,7 +430,7 @@ int ElementType::SerendipityFromTag(int tag)
     return 2; // Only Serendipity
 
   default :
-    Msg::Error("Unknown element tag %d, assuming not serendipity.",tag);
+    Msg::Warning("Unknown element tag %d, assuming not serendipity.",tag);
     return 0;
   }
 }
@@ -537,6 +549,6 @@ int ElementType::getTag(int parentTag, int order, bool serendip)
     default : Msg::Error("pyramid order %i unknown", order); return 0;
     }
     break;
-  default : Msg::Error("unknown element type %i, returning 0", parentTag); return 0;
+  default : Msg::Warning("unknown element type %i, returning 0", parentTag); return 0;
   }
 }
diff --git a/Numeric/ElementType.h b/Numeric/ElementType.h
index 7952155..a09226d 100644
--- a/Numeric/ElementType.h
+++ b/Numeric/ElementType.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/FuncSpaceData.cpp b/Numeric/FuncSpaceData.cpp
new file mode 100644
index 0000000..5862136
--- /dev/null
+++ b/Numeric/FuncSpaceData.cpp
@@ -0,0 +1,107 @@
+// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-B-> Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "FuncSpaceData.h"
+#include "MElement.h"
+
+FuncSpaceData::FuncSpaceData(const MElement *el, const bool *serendip) :
+  _tag(el->getTypeForMSH()), _spaceOrder(el->getPolynomialOrder()),
+  _nij(0), _nk(_spaceOrder), _pyramidalSpace(el->getType() == TYPE_PYR),
+  _serendipity(serendip ? *serendip : el->getIsOnlySerendipity())
+{}
+
+FuncSpaceData::FuncSpaceData(const MElement *el, int order, const bool *serendip) :
+  _tag(el->getTypeForMSH()), _spaceOrder(order),
+  _nij(0), _nk(_spaceOrder), _pyramidalSpace(el->getType() == TYPE_PYR),
+  _serendipity(serendip ? *serendip : el->getIsOnlySerendipity())
+{}
+
+FuncSpaceData::FuncSpaceData(const MElement *el, bool pyr, int nij, int nk,
+                             const bool *serendip) :
+  _tag(el->getTypeForMSH()), _spaceOrder(pyr ? nij+nk : std::max(nij, nk)),
+  _nij(nij), _nk(nk), _pyramidalSpace(pyr),
+  _serendipity(serendip ? *serendip : el->getIsOnlySerendipity())
+{
+  if (el->getType() != TYPE_PYR)
+    Msg::Error("Creation of pyramidal space data for a non-pyramid element !");
+}
+
+FuncSpaceData::FuncSpaceData(int tag, const bool *serendip) :
+  _tag(tag), _spaceOrder(ElementType::OrderFromTag(tag)),
+  _nij(0), _nk(_spaceOrder),
+  _pyramidalSpace(ElementType::ParentTypeFromTag(tag) == TYPE_PYR),
+  _serendipity(serendip ? *serendip :
+               ElementType::SerendipityFromTag(_tag) > 1)
+{}
+
+FuncSpaceData::FuncSpaceData(bool isTag, int tagOrType, int order,
+                             const bool *serendip, bool elemIsSerendip) :
+  _tag(isTag ? tagOrType : ElementType::getTag(tagOrType, order, elemIsSerendip)),
+  _spaceOrder(order), _nij(0), _nk(_spaceOrder),
+  _pyramidalSpace(isTag ?
+      ElementType::ParentTypeFromTag(tagOrType) == TYPE_PYR :
+      tagOrType == TYPE_PYR),
+  _serendipity(serendip ? *serendip :
+               ElementType::SerendipityFromTag(_tag) > 1)
+{}
+
+FuncSpaceData::FuncSpaceData(bool isTag, int tagOrType, bool pyr, int nij,
+                             int nk, const bool *serendip, bool elemIsSerendip) :
+  _tag(isTag ? tagOrType :
+       ElementType::getTag(tagOrType, pyr ? nij+nk : std::max(nij, nk), elemIsSerendip)),
+  _spaceOrder(pyr ? nij+nk : std::max(nij, nk)),
+  _nij(nij), _nk(nk), _pyramidalSpace(pyr),
+  _serendipity(serendip ? *serendip :
+               ElementType::SerendipityFromTag(_tag) > 1)
+{
+  if (ElementType::ParentTypeFromTag(_tag) != TYPE_PYR)
+    Msg::Error("Creation of pyramidal space data for a non-pyramid element!");
+}
+
+void FuncSpaceData::getOrderForBezier(int order[3], int exponentZ) const
+{
+  if (_pyramidalSpace && exponentZ < 0) {
+    Msg::Error("getOrderForBezier needs third exponent for pyramidal space!");
+    order[0] = order[1] = order[2] = -1;
+    return;
+  }
+  if (elementType() == TYPE_PYR) {
+    if (_pyramidalSpace) {
+      order[0] = order[1] = _nij + exponentZ;
+      order[2] = _nk;
+    }
+    else {
+      order[0] = order[1] = _nij;
+      order[2] = _nk;
+    }
+  }
+  else
+    order[0] = order[1] = order[2] = _spaceOrder;
+}
+
+FuncSpaceData FuncSpaceData::getForPrimaryElement() const
+{
+  int type = elementType();
+  int primTag = ElementType::getTag(type, 1, elementIsOnlySerendipity());
+
+  if (primTag == _tag) return *this;
+
+  if (type == TYPE_PYR)
+    return FuncSpaceData(true, primTag, _pyramidalSpace, _nij, _nk, &_serendipity);
+  else
+    return FuncSpaceData(true, primTag, _spaceOrder, &_serendipity);
+}
+
+FuncSpaceData FuncSpaceData::getForNonSerendipitySpace() const
+{
+  if (!_serendipity) return *this;
+
+  int type = elementType();
+  bool serendip = false;
+  if (type == TYPE_PYR)
+    return FuncSpaceData(true, _tag, _pyramidalSpace, _nij, _nk, &serendip);
+  else
+    return FuncSpaceData(true, _tag, _spaceOrder, &serendip);
+}
diff --git a/Numeric/FuncSpaceData.h b/Numeric/FuncSpaceData.h
new file mode 100644
index 0000000..405844c
--- /dev/null
+++ b/Numeric/FuncSpaceData.h
@@ -0,0 +1,102 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef FUNCSPACEDATA_H
+#define FUNCSPACEDATA_H
+
+#include "GmshDefines.h"
+#include "GmshMessage.h"
+#include "ElementType.h"
+#include <cstddef>
+class MElement;
+
+class FuncSpaceData
+{
+  // Store data that allow to easily know how to construct gradient, jacobian,
+  // bezier and metric bases.
+
+private:
+  int _tag, _spaceOrder, _nij, _nk;
+  bool _pyramidalSpace, _serendipity;
+  // When '_parentType' == TYPE_PYR,
+  // if _pyramidalSpace == true, then the space is {X^i Y^j Z^k | i,j <= k+'_nij', k <= '_nk'},
+  // otherwise, the space is {X^i Y^j Z^k | i,j <= '_nij', k <= '_nk'},
+  // where X = xi/(1-zeta), Y = eta/(1-zeta) and Z = 1-zeta.
+
+public:
+
+  FuncSpaceData() : _tag(-1), _spaceOrder(-1), _nij(-1), _nk(-1),
+    _pyramidalSpace(false), _serendipity(false) {}
+
+  // Constructors using MElement*
+  FuncSpaceData(const MElement *el, const bool *serendip = NULL);
+  FuncSpaceData(const MElement *el, int order, const bool *serendip = NULL);
+  FuncSpaceData(const MElement *el,
+                bool pyr, int nij, int nk,
+                const bool *serendip = NULL);
+
+  // Constructors using element tag
+  FuncSpaceData(int tag, const bool *serendip = NULL);
+
+  // constructors using element tag or element type
+  FuncSpaceData(bool isTag, int tagOrType, int order,
+                const bool *serendip = NULL, bool elemIsSerendip = false);
+
+  FuncSpaceData(bool isTag, int tagOrType, bool pyr, int nij, int nk,
+                const bool *serendip = NULL, bool elemIsSerendip = false);
+
+  // Print
+  void print() const {
+    Msg::Info("FuncSpaceData: tag%d, order%d, nij%d, nk%d, pyr%d, serendip%d",
+        _tag, _spaceOrder, _nij, _nk, _pyramidalSpace, _serendipity);
+  }
+
+  // Get methods
+  int elementTag() const {return _tag;}
+  int elementType() const {return ElementType::ParentTypeFromTag(_tag);}
+  int elementOrder() const {return ElementType::OrderFromTag(_tag);}
+  int dimension() const {return ElementType::DimensionFromTag(_tag);}
+  int spaceOrder() const {return _spaceOrder;}
+  int nij() const {return _nij;}
+  int nk() const {return _nk;}
+  bool elementIsOnlySerendipity() const {
+    return ElementType::SerendipityFromTag(_tag) > 1;
+  }
+  bool spaceIsSerendipity() const {return _serendipity;}
+  bool isPyramidalSpace() const {return _pyramidalSpace;}
+
+  void getOrderForBezier(int[3], int exponentZ = -1) const;
+
+  // Change space
+  FuncSpaceData getForPrimaryElement() const;
+  FuncSpaceData getForNonSerendipitySpace() const;
+
+  //
+  inline bool operator<(const FuncSpaceData &other) const {
+    if (_tag == other._tag) {
+      if (_spaceOrder == other._spaceOrder) {
+        if (_nij == other._nij) {
+          if (_nk == other._nk) {
+            return _pyramidalSpace == true ? false : other._pyramidalSpace;
+          }
+          else return _nk < other._nk;
+        }
+        else return _nij < other._nij;
+      }
+      else return _spaceOrder < other._spaceOrder;
+    }
+    else return _tag < other._tag;
+  }
+  inline bool operator==(const FuncSpaceData &other) const {
+    return _tag == other._tag && _spaceOrder == other._spaceOrder &&
+           _nij == other._nij && _nk == other._nk &&
+           _pyramidalSpace == other._pyramidalSpace;
+  }
+};
+
+
+
+
+#endif
diff --git a/Numeric/GaussIntegration.cpp b/Numeric/GaussIntegration.cpp
index 37cbd14..b9252d8 100644
--- a/Numeric/GaussIntegration.cpp
+++ b/Numeric/GaussIntegration.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussIntegration.h b/Numeric/GaussIntegration.h
index f4d622d..7d674c7 100644
--- a/Numeric/GaussIntegration.h
+++ b/Numeric/GaussIntegration.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussJacobi1D.cpp b/Numeric/GaussJacobi1D.cpp
index 967057f..a2118c7 100644
--- a/Numeric/GaussJacobi1D.cpp
+++ b/Numeric/GaussJacobi1D.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussJacobi1D.h b/Numeric/GaussJacobi1D.h
index dd7e85c..e04bce3 100644
--- a/Numeric/GaussJacobi1D.h
+++ b/Numeric/GaussJacobi1D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussLegendre1D.h b/Numeric/GaussLegendre1D.h
index ef87d00..424130d 100644
--- a/Numeric/GaussLegendre1D.h
+++ b/Numeric/GaussLegendre1D.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussLegendreSimplex.cpp b/Numeric/GaussLegendreSimplex.cpp
index 7d5b8d8..26547c4 100644
--- a/Numeric/GaussLegendreSimplex.cpp
+++ b/Numeric/GaussLegendreSimplex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussQuadratureHex.cpp b/Numeric/GaussQuadratureHex.cpp
index c40f83f..ca9a3f8 100644
--- a/Numeric/GaussQuadratureHex.cpp
+++ b/Numeric/GaussQuadratureHex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -20,12 +20,12 @@ const double yh6[6] = { b1, mb1,  b1, mb1,  0.,  0.};
 const double zh6[6] = {mc1, mc1,  c1,  c1, mc1,  c1};
 const double ph6[6] = { w1,  w1,  w1,  w1,  w1,  w1};
 
-IntPt GQH1[1] = 
+IntPt GQH1[1] =
 {
   { {0.0,0.0,0.0},8.0 }
 };
 
-IntPt GQH6[6] = 
+IntPt GQH6[6] =
 {
   { {xh6[0],yh6[0],zh6[0]},ph6[0] },
   { {xh6[1],yh6[1],zh6[1]},ph6[1] },
@@ -35,16 +35,18 @@ IntPt GQH6[6] =
   { {xh6[5],yh6[5],zh6[5]},ph6[5] }
 };
 
-const double xh8[8] = {0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626,
-                   0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626};
-const double yh8[8] = {0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626,
-                   0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626};
-
-const double zh8[8] = {-0.577350269189626,-0.577350269189626,-0.577350269189626,-0.577350269189626,
-                   0.577350269189626,0.577350269189626,0.577350269189626,0.577350269189626};
+const double xh8[8] =
+  {0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626,
+   0.577350269189626,-0.577350269189626,0.577350269189626,-0.577350269189626};
+const double yh8[8] =
+  {0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626,
+   0.577350269189626,0.577350269189626,-0.577350269189626,-0.577350269189626};
+const double zh8[8] =
+  {-0.577350269189626,-0.577350269189626,-0.577350269189626,-0.577350269189626,
+   0.577350269189626,0.577350269189626,0.577350269189626,0.577350269189626};
 const double ph8[8] = {1.,1.,1.,1.,1.,1.,1.,1.};
 
-IntPt GQH8[8] = 
+IntPt GQH8[8] =
 {
   { {xh8[0],yh8[0],zh8[0]},ph8[0] },
   { {xh8[1],yh8[1],zh8[1]},ph8[1] },
@@ -56,7 +58,6 @@ IntPt GQH8[8] =
   { {xh8[7],yh8[7],zh8[7]},ph8[7] }
 };
 
-
 IntPt *getGQHPts(int order);
 int getNGQHPts(int order);
 
@@ -64,46 +65,40 @@ IntPt * GQH[17] = {GQH1,GQH1,GQH6,GQH8,0,0,0,0,0,0,0,0,0,0,0,0,0};
 int GQHnPt[4] = {1,1,6,8};
 
 IntPt *getGQHPts(int order)
-{ 
-
-  if(order<2)return GQH[order];
-  if(order == 2)return GQH[3]; 
-  if(order == 3)return GQH[3]; 
-  
+{
+  if(order < 2) return GQH[order];
+  if(order == 2) return GQH[3];
+  if(order == 3) return GQH[3];
   int n = (order+3)/2;
   int index = n-2 + 4;
-  if(!GQH[index])
-    {
-      double *pt,*wt;
-      //      printf("o = %d n = %d i = %d\n",order,n*n*n,index);
-      gmshGaussLegendre1D(n,&pt,&wt);
-      GQH[index] = new IntPt[n*n*n];
-      int l = 0;
-      for(int i=0; i < n; i++) {
-        for(int j=0; j < n; j++) {
-          for(int k=0; k < n; k++) {
-            GQH[index][l].pt[0] = pt[i];
-            GQH[index][l].pt[1] = pt[j];
-            GQH[index][l].pt[2] = pt[k];
-            GQH[index][l++].weight = wt[i]*wt[j]*wt[k];
-            //      printf ("%f %f %f %f\n",pt[i],pt[j],pt[k],wt[i]*wt[j]*wt[k]);
-          }
+  if(index >= (int)(sizeof(GQH) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQH in gauss quadrature hex");
+    index = 0;
+  }
+  if(!GQH[index]){
+    double *pt,*wt;
+    gmshGaussLegendre1D(n,&pt,&wt);
+    GQH[index] = new IntPt[n*n*n];
+    int l = 0;
+    for(int i=0; i < n; i++) {
+      for(int j=0; j < n; j++) {
+        for(int k=0; k < n; k++) {
+          GQH[index][l].pt[0] = pt[i];
+          GQH[index][l].pt[1] = pt[j];
+          GQH[index][l].pt[2] = pt[k];
+          GQH[index][l++].weight = wt[i]*wt[j]*wt[k];
         }
       }
     }
+  }
   return GQH[index];
 }
 
 int getNGQHPts(int order)
-{ 
+{
   if(order == 3)return 8;
   if(order == 2)return 8;
   if(order < 2)
-    return GQHnPt[order]; 
+    return GQHnPt[order];
   return ((order+3)/2)*((order+3)/2)*((order+3)/2);
 }
-
-
-
-
-
diff --git a/Numeric/GaussQuadratureLin.cpp b/Numeric/GaussQuadratureLin.cpp
index 62743a2..0b12bf8 100644
--- a/Numeric/GaussQuadratureLin.cpp
+++ b/Numeric/GaussQuadratureLin.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,12 +9,15 @@
 IntPt * GQL[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
 IntPt *getGQLPts(int order)
-{  
+{
   // Number of Gauss Point:
   // (order + 1) / 2 *ROUNDED UP*
-
-  int n     = (order + 1) / (double)2 + 0.5;
+  int n = (order + 1) / (double)2 + 0.5;
   int index = n;
+  if(index >= (int)(sizeof(GQL) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQL in gauss quadrature line");
+    index = 0;
+  }
   if(!GQL[index]) {
     double *pt,*wt;
     gmshGaussLegendre1D(n,&pt,&wt);
@@ -30,6 +33,6 @@ IntPt *getGQLPts(int order)
 }
 
 int getNGQLPts(int order)
-{ 
+{
   return (order + 1) / (double)2 + 0.5;
 }
diff --git a/Numeric/GaussQuadraturePri.cpp b/Numeric/GaussQuadraturePri.cpp
index 227e4ce..0ed98c8 100644
--- a/Numeric/GaussQuadraturePri.cpp
+++ b/Numeric/GaussQuadraturePri.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,8 +19,10 @@ IntPt *getGQPriPts(int order)
   int nTri = getNGQTPts(order);
   int n = nLin*nTri;
   int index = order;
-  if (order >= (int)(sizeof(GQP) / sizeof(IntPt*)))
-    Msg::Fatal("Increase size of GQP in gauss quadrature prism");
+  if (index >= (int)(sizeof(GQP) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQP in gauss quadrature prism");
+    index = 0;
+  }
   if(!GQP[index]){
     double *linPt,*linWt;
     IntPt *triPts = getGQTPts(order);
@@ -51,8 +53,3 @@ int getNGQPriPts(int order)
 //     return GQPnPt[order];
 //   return ((order+3)/2)*((order+3)/2)*((order+3)/2);
 }
-
-
-
-
-
diff --git a/Numeric/GaussQuadraturePyr.cpp b/Numeric/GaussQuadraturePyr.cpp
index 6c1c5b9..dc14017 100644
--- a/Numeric/GaussQuadraturePyr.cpp
+++ b/Numeric/GaussQuadraturePyr.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -12,13 +12,17 @@ IntPt *getGQPyrPts(int order);
 int getNGQPyrPts(int order);
 
 IntPt * GQPyr[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-                 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+                   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
 IntPt *getGQPyrPts(int order)
 {
-
   int index = order;
 
+  if(index >= (int)(sizeof(GQPyr) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQPyr in gauss quadrature pyr");
+    index = 0;
+  }
+
   if(!GQPyr[index]) {
 
     int nbPtUV = order/2 + 1;
@@ -32,8 +36,6 @@ IntPt *getGQPyrPts(int order)
     getGaussJacobiQuadrature(2, 0, nbPtW, &GJ20Pt, &GJ20Wt);
 
     GQPyr[index] = new IntPt[getNGQPyrPts(order)];
-    if (order >= (int)(sizeof(GQPyr) / sizeof(IntPt*)))
-      Msg::Fatal("Increase size of GQPyr in gauss quadrature prism");
 
     int l = 0;
     for (int i = 0; i < getNGQPyrPts(order); i++) {
@@ -51,7 +53,7 @@ IntPt *getGQPyrPts(int order)
       double up = linPt[iU];
       double vp = linPt[iV];
       double wp = GJ20Pt[iW];
-      
+
       // now incorporate the Duffy transformation from pyramid to hexahedron
 
       GQPyr[index][l].pt[0] = 0.5*(1-wp)*up;
@@ -71,7 +73,7 @@ IntPt *getGQPyrPts(int order)
 int getNGQPyrPts(int order)
 {
   int nbPtUV = order/2 + 1;
-  int nbPtW  = order/2 + 1; 
+  int nbPtW  = order/2 + 1;
 
   return nbPtUV*nbPtUV*nbPtW;
 }
diff --git a/Numeric/GaussQuadratureQuad.cpp b/Numeric/GaussQuadratureQuad.cpp
index 09293f4..1aeae10 100644
--- a/Numeric/GaussQuadratureQuad.cpp
+++ b/Numeric/GaussQuadratureQuad.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -50,7 +50,7 @@ const double a9 = 0.774596669241483;
 const double z = 0.0;
 const double xq9[9] = {-a9, z, a9, -a9, z, a9, -a9, z, a9};
 const double yq9[9] = {-a9, -a9, -a9, z, z, z, a9, a9, a9};
-const double pb2 = 0.888888888888889*0.888888888888889; 
+const double pb2 = 0.888888888888889*0.888888888888889;
 const double pc2 = 0.555555555555556*0.555555555555556;
 const double pbc = 0.555555555555556*0.888888888888889;
 const double pq9[9] = {pc2, pbc, pc2, pbc, pb2, pbc, pc2, pbc , pc2};
@@ -69,7 +69,7 @@ IntPt GQQ9[9] = {
 
 const double a16 = 0.861136311594053;
 const double b16 = 0.339981043584856;
-const double xq16[16] = {-a16, -b16, b16, a16, -a16, -b16, b16, a16,  
+const double xq16[16] = {-a16, -b16, b16, a16, -a16, -b16, b16, a16,
                    -a16, -b16, b16, a16, -a16, -b16, b16, a16};
 const double yq16[16] = {-a16, -a16, -a16, -a16, -b16, -b16, -b16, -b16,
                          b16, b16, b16, b16, a16, a16, a16, a16};
@@ -77,7 +77,7 @@ const double pe2 = 0.347854845137454 * 0.347854845137454;
 const double pf2 = 0.652145154862546 * 0.652145154862546;
 const double pef = 0.347854845137454 * 0.652145154862546;
 
-double pq16[16] = { pe2, pef,  pef, pe2, pef, pf2, pf2, pef, 
+double pq16[16] = { pe2, pef,  pef, pe2, pef, pf2, pf2, pef,
                     pef, pf2, pf2, pef, pe2, pef, pef, pe2};
 
 IntPt GQQ16[16] = {
@@ -106,45 +106,38 @@ IntPt * GQQ[27] = {GQQ1,GQQ1,GQQ3,GQQ4,GQQ7,GQQ9,GQQ16,0,0,0,0,0,0,0,0,0,0,0,0,0
 int GQQnPt[7] = {1,1,3,4,7,9,16};
 
 IntPt *getGQQPts(int order)
-{ 
-  
-  if(order<2)return GQQ[order];
-  if(order==2)return GQQ[3];
-  if(order==3)return GQQ[3];
-
+{
+  if(order < 2) return GQQ[order];
+  if(order == 2) return GQQ[3];
+  if(order == 3) return GQQ[3];
   int n = (order+3)/2;
   int index = n-2 + 7;
-  if(!GQQ[index])
-    {
-      double *pt,*wt;
-      gmshGaussLegendre1D(n,&pt,&wt);
-      GQQ[index] = new IntPt[n*n];
-      int k = 0;
-      for(int i=0; i < n; i++) {
-        for(int j=0; j < n; j++) {
-          GQQ[index][k].pt[0] = pt[i];
-          GQQ[index][k].pt[1] = pt[j];
-          GQQ[index][k].pt[2] = 0.0;
-          GQQ[index][k++].weight = wt[i]*wt[j];
-          //      printf ("%f %f %f\n",pt[i],pt[j],wt[i]*wt[j]);
-        }
+  if(index >= (int)(sizeof(GQQ) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQQ in gauss quadrature quad");
+    index = 0;
+  }
+  if(!GQQ[index]){
+    double *pt,*wt;
+    gmshGaussLegendre1D(n,&pt,&wt);
+    GQQ[index] = new IntPt[n*n];
+    int k = 0;
+    for(int i=0; i < n; i++) {
+      for(int j=0; j < n; j++) {
+        GQQ[index][k].pt[0] = pt[i];
+        GQQ[index][k].pt[1] = pt[j];
+        GQQ[index][k].pt[2] = 0.0;
+        GQQ[index][k++].weight = wt[i]*wt[j];
       }
     }
+  }
   return GQQ[index];
 }
 
 int getNGQQPts(int order)
-{ 
-  if(order == 3)return 4;
-  if(order == 2)return 4;
-
+{
+  if(order == 3) return 4;
+  if(order == 2) return 4;
   if(order < 2)
-    return GQQnPt[order]; 
+    return GQQnPt[order];
   return ((order+3)/2)*((order+3)/2);
 }
-
-
-
-
-
-
diff --git a/Numeric/GaussQuadratureTet.cpp b/Numeric/GaussQuadratureTet.cpp
index 164710e..1db5a16 100644
--- a/Numeric/GaussQuadratureTet.cpp
+++ b/Numeric/GaussQuadratureTet.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/GaussQuadratureTri.cpp b/Numeric/GaussQuadratureTri.cpp
index 06831a7..4d6d9a5 100644
--- a/Numeric/GaussQuadratureTri.cpp
+++ b/Numeric/GaussQuadratureTri.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,7 +6,7 @@
 #include "GaussIntegration.h"
 #include "GaussLegendre1D.h"
 
-IntPt GQT1[1] = { 
+IntPt GQT1[1] = {
   {{0.333333333333333, 0.333333333333333, 0.}, 0.500000000000000}
 };
 IntPt GQT2[3] = {
@@ -83,7 +83,7 @@ IntPt GQT8[16] = {
   {{0.170569307751760, 0.170569307751760, 0.}, 0.051608685267359},
   {{0.898905543365938, 0.050547228317031, 0.}, 0.016229248811599},
   {{0.050547228317031, 0.898905543365938, 0.}, 0.016229248811599},
-  {{0.050547228317031, 0.050547228317031, 0.}, 0.016229248811599},  
+  {{0.050547228317031, 0.050547228317031, 0.}, 0.016229248811599},
   {{0.008394777409958, 0.728492392955404, 0.}, 0.013615157087217},
   {{0.728492392955404, 0.008394777409958, 0.}, 0.013615157087217},
   {{0.263112829634638, 0.008394777409958, 0.}, 0.013615157087217},
@@ -98,9 +98,6 @@ IntPt * GQT[9] = {GQT1,GQT1,GQT2,GQT3,GQT4,GQT5,GQT6,GQT7,GQT8};
 IntPt * GQTdegen[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 int GQTnPt[9] = {1,1,3,4,6,7,12,13,16};
 
-
-
-
 // -----------------------------------------------------------------------------
 /*! Quadrature rule for an interpolation of order 1 on the triangle */
 /* 'Higher-order Finite Elements', P.Solin, K.Segeth and I. Dolezel */
@@ -912,7 +909,7 @@ IntPt * GQTSolin[21] = {
   triP19Solin,
   triP20Solin
 };
-  
+
 int GQTnPtSolin[21] = {
   1,
   1,
@@ -940,22 +937,24 @@ IntPt *getGQTPts(int order);
 int getNGQTPts(int order);
 
 IntPt *getGQTPts(int order)
-{ 
+{
   if (order < 21) return GQTSolin[order];
   int n = (order+3)/2;
   int index = n-4;
+  if(index >= (int)(sizeof(GQTdegen) / sizeof(IntPt*))){
+    Msg::Error("Increase size of GQTdegen in gauss quadrature tri");
+    index = 0;
+  }
   if(!GQTdegen[index]){
     int npts = n*n;
     GQTdegen[index] = new IntPt[npts];
     GaussLegendreTri(n,n,GQTdegen[index]);
   }
-  return GQTdegen[index]; 
-
+  return GQTdegen[index];
 }
 
 int getNGQTPts(int order)
-{ 
-  if (order < 21) return GQTnPtSolin[order];  
+{
+  if (order < 21) return GQTnPtSolin[order];
   return ((order+3)/2)*((order+3)/2);
 }
-
diff --git a/Numeric/HilbertCurve.cpp b/Numeric/HilbertCurve.cpp
index 22720cb..95827d4 100644
--- a/Numeric/HilbertCurve.cpp
+++ b/Numeric/HilbertCurve.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/HilbertCurve.h b/Numeric/HilbertCurve.h
index 292fc57..e962483 100644
--- a/Numeric/HilbertCurve.h
+++ b/Numeric/HilbertCurve.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/Iso.cpp b/Numeric/Iso.cpp
index 80bb66e..429c2f4 100644
--- a/Numeric/Iso.cpp
+++ b/Numeric/Iso.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/Iso.h b/Numeric/Iso.h
index 7245244..25bb98c 100644
--- a/Numeric/Iso.h
+++ b/Numeric/Iso.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/JacobianBasis.cpp b/Numeric/JacobianBasis.cpp
index 402cddd..46197a4 100644
--- a/Numeric/JacobianBasis.cpp
+++ b/Numeric/JacobianBasis.cpp
@@ -1,81 +1,186 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
-#include "GmshDefines.h"
-#include "GmshMessage.h"
-
-#include <vector>
-#include "polynomialBasis.h"
-#include "pyramidalBasis.h"
+#include "JacobianBasis.h"
 #include "pointsGenerators.h"
+#include "nodalBasis.h"
 #include "BasisFactory.h"
 #include "Numeric.h"
+#include <cmath>
 
 namespace {
-  inline double calcDet3D(double dxdX, double dydX, double dzdX,
-                          double dxdY, double dydY, double dzdY,
-                          double dxdZ, double dydZ, double dzdZ)
-  {
-    return dxdX*dydY*dzdZ + dxdY*dydZ*dzdX + dydX*dzdY*dxdZ
-         - dxdZ*dydY*dzdX - dxdY*dydX*dzdZ - dydZ*dzdY*dxdX;
-  }
-}
 
-GradientBasis::GradientBasis(int tag, int order)
+template<class T>
+void calcMapFromIdealElement(int type, T &gSMatX, T &gSMatY, T &gSMatZ)
 {
-  const int type = ElementType::ParentTypeFromTag(tag);
-
-  fullMatrix<double> samplingPoints;
-
-  switch (type) {
-    case TYPE_PNT :
-      samplingPoints = gmshGeneratePointsLine(0);
-      break;
-    case TYPE_LIN :
-      samplingPoints = gmshGeneratePointsLine(order);
-      break;
-    case TYPE_TRI :
-      samplingPoints = gmshGeneratePointsTriangle(order,false);
+  // 2D scaling
+  switch(type) {
+    case TYPE_QUA:                                             // Quad, hex, pyramid -> square with side of length 1
+    case TYPE_HEX:
+    case TYPE_PYR: {
+      gSMatX.scale(2.);
+      gSMatY.scale(2.);
       break;
-    case TYPE_QUA :
-      samplingPoints = gmshGeneratePointsQuadrangle(order,false);
-      break;
-    case TYPE_TET :
-      samplingPoints = gmshGeneratePointsTetrahedron(order,false);
+    }
+    default: {                                                // Tri, tet, prism: equilateral tri with side of length 1
+      static const double cTri[2] = {-1./std::sqrt(3.), 2./std::sqrt(3.)};
+      gSMatY.scale(cTri[1]);
+      gSMatY.axpy(gSMatX, cTri[0]);
       break;
-    case TYPE_PRI :
-      samplingPoints = gmshGeneratePointsPrism(order,false);
+    }
+  }
+
+  // 3D scaling
+  switch(type) {
+    case TYPE_HEX:                                            // Hex, prism -> side of length 1 in z
+    case TYPE_PRI: {
+      gSMatZ.scale(2.);
       break;
-    case TYPE_HEX :
-      samplingPoints = gmshGeneratePointsHexahedron(order,false);
+    }
+    case TYPE_PYR: {                                          // Pyramid -> height sqrt(2.)/2
+      static const double cPyr = 1./sqrt(2.);
+      gSMatZ.scale(cPyr);
       break;
-    case TYPE_PYR :
-      samplingPoints = JacobianBasis::generateJacPointsPyramid(order);
+    }
+    case TYPE_TET:                                            // Tet: take into account (x, y) scaling to obtain regular tet
+    {
+      static const double cTet[3] = {-3./2/std::sqrt(6.),
+                                     -1./2/std::sqrt(2.),
+                                     std::sqrt(1.5)};
+      gSMatZ.scale(cTet[2]);
+      gSMatZ.axpy(gSMatX, cTet[0]);
+      gSMatZ.axpy(gSMatY, cTet[1]);
       break;
-    default :
-      Msg::Error("Unknown Jacobian function space for element tag %d", tag);
-      return;
+    }
+  }
+}
+
+// Compute the determinant of a 3x3 matrix
+inline double calcDet3D(double M11, double M12, double M13,
+                        double M21, double M22, double M23,
+                        double M31, double M32, double M33)
+{
+  return M11 * (M22*M33 - M23*M32)
+       - M12 * (M21*M33 - M23*M31)
+       + M13 * (M21*M32 - M22*M31);
+}
+
+// Compute signed Jacobian and its gradients w.r.t.
+// node positions, at one location in a 1D element
+inline void calcJDJ1D(double dxdX, double dxdY, double dxdZ,
+                      double dydX, double dydY, double dydZ,
+                      double dzdX, double dzdY, double dzdZ,
+                      int i, int numMapNodes,
+                      const fullMatrix<double> &gSMatX,
+                      fullMatrix<double> &JDJ)
+{
+  for (int j = 0; j < numMapNodes; j++) {
+    const double &dPhidX = gSMatX(i, j);
+    JDJ(i, j) = dPhidX * dydY * dzdZ + dPhidX * dzdY * dydZ;
+    JDJ(i, j+numMapNodes) = dPhidX * dzdY * dxdZ - dPhidX * dxdY * dzdZ;
+    JDJ(i, j+2*numMapNodes) = dPhidX * dxdY * dydZ - dPhidX * dydY * dxdZ;
+  }
+  JDJ(i, 3*numMapNodes) = calcDet3D(dxdX, dxdY, dxdZ,
+                                    dydX, dydY, dydZ,
+                                    dzdX, dzdY, dzdZ);
+}
+
+// Compute signed Jacobian and its gradients w.r.t.
+// node positions, at one location in a 2D element
+inline void calcJDJ2D(double dxdX, double dxdY, double dxdZ,
+                      double dydX, double dydY, double dydZ,
+                      double dzdX, double dzdY, double dzdZ,
+                      int i, int numMapNodes,
+                      const fullMatrix<double> &gSMatX,
+                      const fullMatrix<double> &gSMatY,
+                      fullMatrix<double> &JDJ)
+{
+  for (int j = 0; j < numMapNodes; j++) {
+    const double &dPhidX = gSMatX(i, j);
+    const double &dPhidY = gSMatY(i, j);
+    JDJ(i, j) =
+      dPhidX * dydY * dzdZ + dzdX * dPhidY * dydZ +
+      dPhidX * dzdY * dydZ - dydX * dPhidY * dzdZ;
+    JDJ(i, j+numMapNodes) =
+      dxdX * dPhidY * dzdZ +
+      dPhidX * dzdY * dxdZ - dzdX * dPhidY * dxdZ
+                           - dPhidX * dxdY * dzdZ;
+    JDJ(i, j+2*numMapNodes) =
+                             dPhidX * dxdY * dydZ +
+      dydX * dPhidY * dxdZ - dPhidX * dydY * dxdZ -
+      dxdX * dPhidY * dydZ;
+  }
+  JDJ(i, 3*numMapNodes) = calcDet3D(dxdX, dxdY, dxdZ,
+                                    dydX, dydY, dydZ,
+                                    dzdX, dzdY, dzdZ);
+}
+
+// Compute signed Jacobian and its gradients w.r.t.
+// node positions, at one location in a 3D element
+inline void calcJDJ3D(double dxdX, double dxdY, double dxdZ,
+                      double dydX, double dydY, double dydZ,
+                      double dzdX, double dzdY, double dzdZ,
+                      int i, int numMapNodes,
+                      const fullMatrix<double> &gSMatX,
+                      const fullMatrix<double> &gSMatY,
+                      const fullMatrix<double> &gSMatZ,
+                      fullMatrix<double> &JDJ)
+{
+  for (int j = 0; j < numMapNodes; j++) {
+    const double &dPhidX = gSMatX(i, j);
+    const double &dPhidY = gSMatY(i, j);
+    const double &dPhidZ = gSMatZ(i, j);
+    JDJ(i, j) =
+      dPhidX * dydY * dzdZ + dzdX * dPhidY * dydZ +
+      dydX * dzdY * dPhidZ - dzdX * dydY * dPhidZ -
+      dPhidX * dzdY * dydZ - dydX * dPhidY * dzdZ;
+    JDJ(i, j+numMapNodes) =
+      dxdX * dPhidY * dzdZ + dzdX * dxdY * dPhidZ +
+      dPhidX * dzdY * dxdZ - dzdX * dPhidY * dxdZ -
+      dxdX * dzdY * dPhidZ - dPhidX * dxdY * dzdZ;
+    JDJ(i, j+2*numMapNodes) =
+      dxdX * dydY * dPhidZ + dPhidX * dxdY * dydZ +
+      dydX * dPhidY * dxdZ - dPhidX * dydY * dxdZ -
+      dxdX * dPhidY * dydZ - dydX * dxdY * dPhidZ;
   }
+  JDJ(i, 3*numMapNodes) = calcDet3D(dxdX, dxdY, dxdZ,
+                                    dydX, dydY, dydZ,
+                                    dzdX, dzdY, dzdZ);
+}
+
+}
+
+GradientBasis::GradientBasis(FuncSpaceData data)
+    : _data(data) {
+
+  fullMatrix<double> samplingPoints;
+  gmshGeneratePoints(data, samplingPoints);
   const int numSampPnts = samplingPoints.size1();
 
   // Store shape function gradients of mapping at Jacobian nodes
   fullMatrix<double> allDPsi;
-  const nodalBasis *mapBasis = BasisFactory::getNodalBasis(tag);
+  const nodalBasis *mapBasis = BasisFactory::getNodalBasis(_data.elementTag());
   mapBasis->df(samplingPoints, allDPsi);
   const int numMapNodes = allDPsi.size1();
 
   gradShapeMatX.resize(numSampPnts, numMapNodes);
   gradShapeMatY.resize(numSampPnts, numMapNodes);
   gradShapeMatZ.resize(numSampPnts, numMapNodes);
-  for (int i=0; i<numSampPnts; i++) {
-    for (int j=0; j<numMapNodes; j++) {
+  for (int i = 0; i < numSampPnts; i++) {
+    for (int j = 0; j < numMapNodes; j++) {
       gradShapeMatX(i, j) = allDPsi(j, 3*i);
       gradShapeMatY(i, j) = allDPsi(j, 3*i+1);
       gradShapeMatZ(i, j) = allDPsi(j, 3*i+2);
     }
   }
+
+  gradShapeIdealMatX = gradShapeMatX;
+  gradShapeIdealMatY = gradShapeMatY;
+  gradShapeIdealMatZ = gradShapeMatZ;
+  mapFromIdealElement(_data.elementType(), gradShapeIdealMatX,
+                      gradShapeIdealMatY, gradShapeIdealMatZ);
 }
 
 void GradientBasis::getGradientsFromNodes(const fullMatrix<double> &nodes,
@@ -88,62 +193,57 @@ void GradientBasis::getGradientsFromNodes(const fullMatrix<double> &nodes,
   if (dxyzdZ) gradShapeMatZ.mult(nodes, *dxyzdZ);
 }
 
-JacobianBasis::JacobianBasis(int tag, int jacOrder)
+void GradientBasis::getIdealGradientsFromNodes(const fullMatrix<double> &nodes,
+                                               fullMatrix<double> *dxyzdX,
+                                               fullMatrix<double> *dxyzdY,
+                                               fullMatrix<double> *dxyzdZ) const
 {
-  const int parentType = ElementType::ParentTypeFromTag(tag);
-  const int order = ElementType::OrderFromTag(tag);
-  int jacobianOrder;
-  if (jacOrder < 0)
-    jacobianOrder = JacobianBasis::jacobianOrder(parentType, order);
-  else
-    jacobianOrder = jacOrder;
-  const int primJacobianOrder = JacobianBasis::jacobianOrder(parentType, 1);
+  if (dxyzdX) gradShapeIdealMatX.mult(nodes, *dxyzdX);
+  if (dxyzdY) gradShapeIdealMatY.mult(nodes, *dxyzdY);
+  if (dxyzdZ) gradShapeIdealMatZ.mult(nodes, *dxyzdZ);
+}
 
-  fullMatrix<double> lagPoints;                                  // Sampling points
+void GradientBasis::mapFromIdealElement(int type,
+                                        fullMatrix<double> &gSMatX,
+                                        fullMatrix<double> &gSMatY,
+                                        fullMatrix<double> &gSMatZ)
+{
+  calcMapFromIdealElement(type, gSMatX, gSMatY, gSMatZ);
+}
 
-  switch (parentType) {
-    case TYPE_PNT :
-      lagPoints = gmshGeneratePointsLine(0);
-      break;
-    case TYPE_LIN :
-      lagPoints = gmshGeneratePointsLine(jacobianOrder);
-      break;
-    case TYPE_TRI :
-      lagPoints = gmshGeneratePointsTriangle(jacobianOrder,false);
-      break;
-    case TYPE_QUA :
-      lagPoints = gmshGeneratePointsQuadrangle(jacobianOrder,false);
-      break;
-    case TYPE_TET :
-      lagPoints = gmshGeneratePointsTetrahedron(jacobianOrder,false);
-      break;
-    case TYPE_PRI :
-      lagPoints = gmshGeneratePointsPrism(jacobianOrder,false);
-      break;
-    case TYPE_HEX :
-      lagPoints = gmshGeneratePointsHexahedron(jacobianOrder,false);
-      break;
-    case TYPE_PYR :
-      lagPoints = generateJacPointsPyramid(jacobianOrder);
-      break;
-    default :
-      Msg::Error("Unknown Jacobian function space for element tag %d", tag);
-      return;
-  }
-  numJacNodes = lagPoints.size1();
+void GradientBasis::mapFromIdealElement(int type,
+                                        fullVector<double> &gSVecX,
+                                        fullVector<double> &gSVecY,
+                                        fullVector<double> &gSVecZ)
+{
+  calcMapFromIdealElement(type, gSVecX, gSVecY, gSVecZ);
+}
+
+void GradientBasis::mapFromIdealElement(int type, double jac[3][3])
+{
+  fullMatrix<double> dxyzdX(jac[0], 1, 3), dxyzdY(jac[1], 1, 3), dxyzdZ(jac[2], 1, 3);
+  mapFromIdealElement(type, dxyzdX, dxyzdY, dxyzdZ);
+}
+
+JacobianBasis::JacobianBasis(FuncSpaceData data)
+    : _bezier(NULL), _data(data), _dim(data.dimension())
+{
+  const int parentType = data.elementType();
+  const int primJacobianOrder = jacobianOrder(parentType, 1);
 
-  // Store Bezier basis
-  bezier = BasisFactory::getBezierBasis(parentType, jacobianOrder);
+  fullMatrix<double> lagPoints;                               // Sampling points
+  gmshGeneratePoints(data, lagPoints);
+  numJacNodes = lagPoints.size1();
 
   // Store shape function gradients of mapping at Jacobian nodes
-  _gradBasis = BasisFactory::getGradientBasis(tag, jacobianOrder);
+  _gradBasis = BasisFactory::getGradientBasis(data);
 
   // Compute matrix for lifting from primary Jacobian basis to Jacobian basis
   int primJacType = ElementType::getTag(parentType, primJacobianOrder, false);
   const nodalBasis *primJacBasis = BasisFactory::getNodalBasis(primJacType);
   numPrimJacNodes = primJacBasis->getNumShapeFunctions();
 
-  matrixPrimJac2Jac.resize(numJacNodes,numPrimJacNodes);
+  matrixPrimJac2Jac.resize(numJacNodes, numPrimJacNodes);
   primJacBasis->f(lagPoints, matrixPrimJac2Jac);
 
   // Compute shape function gradients of primary mapping at barycenter,
@@ -166,36 +266,42 @@ JacobianBasis::JacobianBasis(int tag, int jacOrder)
   double (*barDPsi)[3] = new double[numPrimMapNodes][3];
   primMapBasis->df(xBar, yBar, zBar, barDPsi);
 
-  primGradShapeBarycenterX.resize(numPrimMapNodes);
-  primGradShapeBarycenterY.resize(numPrimMapNodes);
-  primGradShapeBarycenterZ.resize(numPrimMapNodes);
-  for (int j=0; j<numPrimMapNodes; j++) {
-    primGradShapeBarycenterX(j) = barDPsi[j][0];
-    primGradShapeBarycenterY(j) = barDPsi[j][1];
-    primGradShapeBarycenterZ(j) = barDPsi[j][2];
+  primGradShapeBaryX.resize(numPrimMapNodes);
+  primGradShapeBaryY.resize(numPrimMapNodes);
+  primGradShapeBaryZ.resize(numPrimMapNodes);
+  for (int j = 0; j < numPrimMapNodes; j++) {
+    primGradShapeBaryX(j) = barDPsi[j][0];
+    primGradShapeBaryY(j) = barDPsi[j][1];
+    primGradShapeBaryZ(j) = barDPsi[j][2];
   }
 
+  primIdealGradShapeBaryX = primGradShapeBaryX;
+  primIdealGradShapeBaryY = primGradShapeBaryY;
+  primIdealGradShapeBaryZ = primGradShapeBaryZ;
+  _gradBasis->mapFromIdealElement(primIdealGradShapeBaryX, primIdealGradShapeBaryY,
+                                  primIdealGradShapeBaryZ);
+
   delete[] barDPsi;
 
   // Compute "fast" Jacobian evaluation matrices (at 1st order nodes + barycenter)
-  numJacNodesFast = numPrimMapNodes+1;
-  fullMatrix<double> lagPointsFast(numJacNodesFast,3);                                  // Sampling points
-  lagPointsFast.copy(primMapBasis->points,0,numPrimMapNodes,
-                     0,primMapBasis->points.size2(),0,0);                               // 1st order nodes
-  lagPointsFast(numPrimMapNodes,0) = barycenter[0];                                     // Last point = barycenter
-  lagPointsFast(numPrimMapNodes,1) = barycenter[1];
-  lagPointsFast(numPrimMapNodes,2) = barycenter[2];
+  numJacNodesFast = numPrimMapNodes + 1;
+  fullMatrix<double> lagPointsFast(numJacNodesFast, 3);           // Sampling points
+  lagPointsFast.copy(primMapBasis->points, 0, numPrimMapNodes,
+                     0, primMapBasis->points.size2(), 0, 0);      // 1st order nodes
+  lagPointsFast(numPrimMapNodes, 0) = barycenter[0];              // Last point = barycenter
+  lagPointsFast(numPrimMapNodes, 1) = barycenter[1];
+  lagPointsFast(numPrimMapNodes, 2) = barycenter[2];
 
   fullMatrix<double> allDPsiFast;
-  const nodalBasis *mapBasis = BasisFactory::getNodalBasis(tag);
+  const nodalBasis *mapBasis = BasisFactory::getNodalBasis(data.elementTag());
   mapBasis->df(lagPointsFast, allDPsiFast);
   numMapNodes = mapBasis->getNumShapeFunctions();
 
   gradShapeMatXFast.resize(numJacNodesFast, numMapNodes);
   gradShapeMatYFast.resize(numJacNodesFast, numMapNodes);
   gradShapeMatZFast.resize(numJacNodesFast, numMapNodes);
-  for (int i=0; i<numJacNodesFast; i++) {
-    for (int j=0; j<numMapNodes; j++) {
+  for (int i = 0; i < numJacNodesFast; i++) {
+    for (int j = 0; j < numMapNodes; j++) {
       gradShapeMatXFast(i, j) = allDPsiFast(j, 3*i);
       gradShapeMatYFast(i, j) = allDPsiFast(j, 3*i+1);
       gradShapeMatZFast(i, j) = allDPsiFast(j, 3*i+2);
@@ -203,15 +309,24 @@ JacobianBasis::JacobianBasis(int tag, int jacOrder)
   }
 }
 
+const bezierBasis* JacobianBasis::getBezier() const
+{
+  if (!_bezier) {
+    const_cast<JacobianBasis*>(this)->_bezier = BasisFactory::getBezierBasis(_data);
+  }
+  return _bezier;
+}
+
 // Computes (unit) normals to straight line element at barycenter (with norm of gradient as return value)
-double JacobianBasis::getPrimNormals1D(const fullMatrix<double> &nodesXYZ, fullMatrix<double> &result) const
+double JacobianBasis::getPrimNormals1D(const fullMatrix<double> &nodesXYZ,
+                                       fullMatrix<double> &result) const
 {
 
   fullVector<double> dxyzdXbar(3);
-  for (int j=0; j<numPrimMapNodes; j++) {
-    dxyzdXbar(0) += primGradShapeBarycenterX(j)*nodesXYZ(j,0);
-    dxyzdXbar(1) += primGradShapeBarycenterX(j)*nodesXYZ(j,1);
-    dxyzdXbar(2) += primGradShapeBarycenterX(j)*nodesXYZ(j,2);
+  for (int j = 0; j < numPrimMapNodes; j++) {
+    dxyzdXbar(0) += primGradShapeBaryX(j) * nodesXYZ(j, 0);
+    dxyzdXbar(1) += primGradShapeBaryX(j) * nodesXYZ(j, 1);
+    dxyzdXbar(2) += primGradShapeBaryX(j) * nodesXYZ(j, 2);
   }
 
   if((fabs(dxyzdXbar(0)) >= fabs(dxyzdXbar(1)) && fabs(dxyzdXbar(0)) >= fabs(dxyzdXbar(2))) ||
@@ -235,61 +350,67 @@ double JacobianBasis::getPrimNormals1D(const fullMatrix<double> &nodesXYZ, fullM
 }
 
 // Computes (unit) normal to straight surface element at barycenter (with norm as return value)
-double JacobianBasis::getPrimNormal2D(const fullMatrix<double> &nodesXYZ, fullMatrix<double> &result) const
+double JacobianBasis::getPrimNormal2D(const fullMatrix<double> &nodesXYZ,
+                                      fullMatrix<double> &result, bool ideal) const
 {
-
-  fullVector<double> dxyzdXbar(3), dxyzdYbar(3);
+  const fullVector<double> &gSX = ideal ? primIdealGradShapeBaryX : primGradShapeBaryX,
+                           &gSY = ideal ? primIdealGradShapeBaryY : primGradShapeBaryY;
+  fullMatrix<double> dxyzdX(1, 3), dxyzdY(1, 3);
   for (int j=0; j<numPrimMapNodes; j++) {
-    dxyzdXbar(0) += primGradShapeBarycenterX(j)*nodesXYZ(j,0);
-    dxyzdXbar(1) += primGradShapeBarycenterX(j)*nodesXYZ(j,1);
-    dxyzdXbar(2) += primGradShapeBarycenterX(j)*nodesXYZ(j,2);
-    dxyzdYbar(0) += primGradShapeBarycenterY(j)*nodesXYZ(j,0);
-    dxyzdYbar(1) += primGradShapeBarycenterY(j)*nodesXYZ(j,1);
-    dxyzdYbar(2) += primGradShapeBarycenterY(j)*nodesXYZ(j,2);
+    dxyzdX(0, 0) += gSX(j)*nodesXYZ(j,0);
+    dxyzdX(0, 1) += gSX(j)*nodesXYZ(j,1);
+    dxyzdX(0, 2) += gSX(j)*nodesXYZ(j,2);
+    dxyzdY(0, 0) += gSY(j)*nodesXYZ(j,0);
+    dxyzdY(0, 1) += gSY(j)*nodesXYZ(j,1);
+    dxyzdY(0, 2) += gSY(j)*nodesXYZ(j,2);
   }
 
-  result(0,2) = dxyzdXbar(0) * dxyzdYbar(1) - dxyzdXbar(1) * dxyzdYbar(0);
-  result(0,1) = -dxyzdXbar(0) * dxyzdYbar(2) + dxyzdXbar(2) * dxyzdYbar(0);
-  result(0,0) = dxyzdXbar(1) * dxyzdYbar(2) - dxyzdXbar(2) * dxyzdYbar(1);
-  const double norm0 = sqrt(result(0,0)*result(0,0)+result(0,1)*result(0,1)+result(0,2)*result(0,2));
-  result(0,0) /= norm0; result(0,1) /= norm0; result(0,2) /= norm0;
+  result(0, 2) = dxyzdX(0, 0) * dxyzdY(0, 1) - dxyzdX(0, 1) * dxyzdY(0, 0);
+  result(0, 1) = -dxyzdX(0, 0) * dxyzdY(0, 2) + dxyzdX(0, 2) * dxyzdY(0, 0);
+  result(0, 0) = dxyzdX(0, 1) * dxyzdY(0, 2) - dxyzdX(0, 2) * dxyzdY(0, 1);
+  double norm0 = sqrt(result(0, 0)*result(0, 0)+result(0, 1)*result(0, 1)+result(0, 2)*result(0, 2));
+  const double invNorm0 = 1./norm0;
+  result(0, 0) *= invNorm0; result(0, 1) *= invNorm0; result(0, 2) *= invNorm0;
 
   return norm0;
-
 }
 
 // Returns absolute value of Jacobian of straight volume element at barycenter
-double JacobianBasis::getPrimJac3D(const fullMatrix<double> &nodesXYZ) const
+double JacobianBasis::getPrimJac3D(const fullMatrix<double> &nodesXYZ, bool ideal) const
 {
-
-  double dxdX = 0, dydX = 0, dzdX = 0, dxdY = 0, dydY = 0, dzdY = 0, dxdZ = 0, dydZ = 0, dzdZ = 0;
+  const fullVector<double> &gSX = ideal ? primIdealGradShapeBaryX : primGradShapeBaryX,
+                           &gSY = ideal ? primIdealGradShapeBaryY : primGradShapeBaryY,
+                           &gSZ = ideal ? primIdealGradShapeBaryZ : primGradShapeBaryZ;
+  fullMatrix<double> dxyzdX(1, 3), dxyzdY(1, 3), dxyzdZ(1, 3);
   for (int j=0; j<numPrimMapNodes; j++) {
-    dxdX += primGradShapeBarycenterX(j)*nodesXYZ(j,0);
-    dydX += primGradShapeBarycenterX(j)*nodesXYZ(j,1);
-    dzdX += primGradShapeBarycenterX(j)*nodesXYZ(j,2);
-    dxdY += primGradShapeBarycenterY(j)*nodesXYZ(j,0);
-    dydY += primGradShapeBarycenterY(j)*nodesXYZ(j,1);
-    dzdY += primGradShapeBarycenterY(j)*nodesXYZ(j,2);
-    dxdZ += primGradShapeBarycenterZ(j)*nodesXYZ(j,0);
-    dydZ += primGradShapeBarycenterZ(j)*nodesXYZ(j,1);
-    dzdZ += primGradShapeBarycenterZ(j)*nodesXYZ(j,2);
+    dxyzdX(0, 0) += gSX(j)*nodesXYZ(j,0);
+    dxyzdX(0, 1) += gSX(j)*nodesXYZ(j,1);
+    dxyzdX(0, 2) += gSX(j)*nodesXYZ(j,2);
+    dxyzdY(0, 0) += gSY(j)*nodesXYZ(j,0);
+    dxyzdY(0, 1) += gSY(j)*nodesXYZ(j,1);
+    dxyzdY(0, 2) += gSY(j)*nodesXYZ(j,2);
+    dxyzdZ(0, 0) += gSZ(j)*nodesXYZ(j,0);
+    dxyzdZ(0, 1) += gSZ(j)*nodesXYZ(j,1);
+    dxyzdZ(0, 2) += gSZ(j)*nodesXYZ(j,2);
   }
 
-  return fabs(calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ));
-
+  double dJ = fabs(calcDet3D(dxyzdX(0, 0), dxyzdY(0, 0), dxyzdZ(0, 0),
+                             dxyzdX(0, 1), dxyzdY(0, 1), dxyzdZ(0, 1),
+                             dxyzdX(0, 2), dxyzdY(0, 2), dxyzdZ(0, 2)));
+  return dJ;
 }
 
 // Calculate (signed, possibly scaled) Jacobian for one element, with normal vectors to straight element
 // for regularization. Evaluation points depend on the given matrices for shape function gradients.
-template<bool scaling>
-inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                              const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                              const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const
+void JacobianBasis::getJacobianGeneral(int nJacNodes,
+                                       const fullMatrix<double> &gSMatX,
+                                       const fullMatrix<double> &gSMatY,
+                                       const fullMatrix<double> &gSMatZ,
+                                       const fullMatrix<double> &nodesXYZ,
+                                       bool idealNorm, bool scaling,
+                                       fullVector<double> &jacobian) const
 {
-
-  const int dim = bezier->getDim();
-
-  switch (dim) {
+  switch (_dim) {
 
     case 0 : {
       for (int i = 0; i < nJacNodes; i++) jacobian(i) = 1.;
@@ -299,6 +420,10 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
     case 1 : {
       fullMatrix<double> normals(2,3);
       const double invScale = getPrimNormals1D(nodesXYZ,normals);
+      if (invScale == 0) {
+        for (int i = 0; i < nJacNodes; i++) jacobian(i) = 0;
+        return;
+      }
       if (scaling) {
         const double scale = 1./invScale;
         normals(0,0) *= scale; normals(0,1) *= scale; normals(0,2) *= scale;            // Faster to scale 1 normal than afterwards
@@ -309,14 +434,20 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = normals(0,0), &dydY = normals(0,1), &dzdY = normals(0,2);
         const double &dxdZ = normals(1,0), &dydZ = normals(1,1), &dzdZ = normals(1,2);
-        jacobian(i) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        jacobian(i) = calcDet3D(dxdX, dxdY, dxdZ,
+                                dydX, dydY, dydZ,
+                                dzdX, dzdY, dzdZ);
       }
       break;
     }
 
     case 2 : {
       fullMatrix<double> normal(1,3);
-      const double invScale = getPrimNormal2D(nodesXYZ,normal);
+      const double invScale = getPrimNormal2D(nodesXYZ, normal, idealNorm);
+      if (invScale == 0) {
+        for (int i = 0; i < nJacNodes; i++) jacobian(i) = 0;
+        return;
+      }
       if (scaling) {
         const double scale = 1./invScale;
         normal(0,0) *= scale; normal(0,1) *= scale; normal(0,2) *= scale;               // Faster to scale normal than afterwards
@@ -328,7 +459,9 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
         const double &dxdZ = normal(0,0), &dydZ = normal(0,1), &dzdZ = normal(0,2);
-        jacobian(i) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        jacobian(i) = calcDet3D(dxdX, dxdY, dxdZ,
+                                dydX, dydY, dydZ,
+                                dzdX, dzdY, dzdZ);
       }
       break;
     }
@@ -343,53 +476,41 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
         const double &dxdZ = dxyzdZ(i,0), &dydZ = dxyzdZ(i,1), &dzdZ = dxyzdZ(i,2);
-        jacobian(i) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        jacobian(i) = calcDet3D(dxdX, dxdY, dxdZ,
+                                dydX, dydY, dydZ,
+                                dzdX, dzdY, dzdZ);
       }
       if (scaling) {
         const double scale = 1./getPrimJac3D(nodesXYZ);
         jacobian.scale(scale);
       }
       break;
+
     }
 
   }
 
 }
 
-// Calculate signed Jacobian for one element, with normal vectors to straight element for
-// regularization. Evaluation points depend on the given matrices for shape function gradients.
-void JacobianBasis::getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                             const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                             const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const
-{
-  getJacobianGeneral<false>(nJacNodes, gSMatX,  gSMatY, gSMatZ, nodesXYZ, jacobian);
-}
-
-// Calculate (signed) scaled Jacobian for one element, with normal vectors to straight element
-// for regularization. Evaluation points depend on the given matrices for shape function gradients.
-void JacobianBasis::getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                             const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                             const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const
-{
-  getJacobianGeneral<true>(nJacNodes, gSMatX,  gSMatY, gSMatZ, nodesXYZ, jacobian);
-}
-
 // Calculate (signed, possibly scaled) Jacobian for several elements, with normal vectors to straight
 // elements for regularization. Evaluation points depend on the given matrices for shape function gradients.
 // TODO: Optimize and test 1D & 2D
-template<bool scaling>
-inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                              const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                              const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                              const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const
+void JacobianBasis::getJacobianGeneral(int nJacNodes,
+                                       const fullMatrix<double> &gSMatX,
+                                       const fullMatrix<double> &gSMatY,
+                                       const fullMatrix<double> &gSMatZ,
+                                       const fullMatrix<double> &nodesX,
+                                       const fullMatrix<double> &nodesY,
+                                       const fullMatrix<double> &nodesZ,
+                                       bool idealNorm, bool scaling,
+                                       fullMatrix<double> &jacobian) const
 {
-
-  switch (bezier->getDim()) {
+  switch (_dim) {
 
     case 0 : {
       const int numEl = nodesX.size2();
       for (int iEl = 0; iEl < numEl; iEl++)
-        for (int i = 0; i < nJacNodes; i++) jacobian(i,iEl) = 1.;
+        for (int i = 0; i < nJacNodes; i++) jacobian(i, iEl) = 1.;
       break;
     }
 
@@ -406,6 +527,10 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
         }
         fullMatrix<double> normals(2,3);
         const double invScale = getPrimNormals1D(nodesXYZ,normals);
+        if (invScale == 0) {
+          for (int i = 0; i < nJacNodes; i++) jacobian(i,iEl) = 0;
+          continue;
+        }
         if (scaling) {
           const double scale = 1./invScale;
           normals(0,0) *= scale; normals(0,1) *= scale; normals(0,2) *= scale;                // Faster to scale 1 normal than afterwards
@@ -413,9 +538,9 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
         const double &dxdY = normals(0,0), &dydY = normals(0,1), &dzdY = normals(0,2);
         const double &dxdZ = normals(1,0), &dydZ = normals(1,1), &dzdZ = normals(1,2);
         for (int i = 0; i < nJacNodes; i++)
-          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl),dydX(i,iEl),dzdX(i,iEl),
-                                      dxdY,dydY,dzdY,
-                                      dxdZ,dydZ,dzdZ);
+          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl), dxdY, dxdZ,
+                                      dydX(i,iEl), dydY, dydZ,
+                                      dzdX(i,iEl), dzdY, dzdZ);
       }
       break;
     }
@@ -434,16 +559,20 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
           nodesXYZ(i,2) = nodesZ(i,iEl);
         }
         fullMatrix<double> normal(1,3);
-        const double invScale = getPrimNormal2D(nodesXYZ,normal);
+        const double invScale = getPrimNormal2D(nodesXYZ, normal, idealNorm);
+        if (invScale == 0) {
+          for (int i = 0; i < nJacNodes; i++) jacobian(i,iEl) = 0;
+          continue;
+        }
         if (scaling) {
           const double scale = 1./invScale;
           normal(0,0) *= scale; normal(0,1) *= scale; normal(0,2) *= scale;                   // Faster to scale normal than afterwards
         }
         const double &dxdZ = normal(0,0), &dydZ = normal(0,1), &dzdZ = normal(0,2);
         for (int i = 0; i < nJacNodes; i++)
-          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl),dydX(i,iEl),dzdX(i,iEl),
-                                      dxdY(i,iEl),dydY(i,iEl),dzdY(i,iEl),
-                                      dxdZ,dydZ,dzdZ);
+          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl), dxdY(i,iEl), dxdZ,
+                                      dydX(i,iEl), dydY(i,iEl), dydZ,
+                                      dzdX(i,iEl), dzdY(i,iEl), dzdZ);
       }
       break;
     }
@@ -458,9 +587,9 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
       gSMatZ.mult(nodesX, dxdZ); gSMatZ.mult(nodesY, dydZ); gSMatZ.mult(nodesZ, dzdZ);
       for (int iEl = 0; iEl < numEl; iEl++) {
         for (int i = 0; i < nJacNodes; i++)
-          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl),dydX(i,iEl),dzdX(i,iEl),
-                                      dxdY(i,iEl),dydY(i,iEl),dzdY(i,iEl),
-                                      dxdZ(i,iEl),dydZ(i,iEl),dzdZ(i,iEl));
+          jacobian(i,iEl) = calcDet3D(dxdX(i,iEl), dxdY(i,iEl), dxdZ(i,iEl),
+                                      dydX(i,iEl), dydY(i,iEl), dydZ(i,iEl),
+                                      dzdX(i,iEl), dzdY(i,iEl), dzdZ(i,iEl));
         if (scaling) {
           fullMatrix<double> nodesXYZ(numPrimMapNodes,3);
           for (int i = 0; i < numPrimMapNodes; i++) {
@@ -479,46 +608,26 @@ inline void JacobianBasis::getJacobianGeneral(int nJacNodes, const fullMatrix<do
 
 }
 
-// Calculate signed Jacobian for several elements, with normal vectors to straight elements for
-// regularization. Evaluation points depend on the given matrices for shape function gradients.
-void JacobianBasis::getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                             const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                             const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                             const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const
-{
-  getJacobianGeneral<false>(nJacNodes, gSMatX,  gSMatY, gSMatZ, nodesX, nodesY, nodesZ, jacobian);
-}
-
-// Calculate (signed) scaled Jacobian for several elements, with normal vectors to straight elements
-// for regularization. Evaluation points depend on the given matrices for shape function gradients.
-void JacobianBasis::getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                             const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                             const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                             const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const
-{
-  getJacobianGeneral<true>(nJacNodes, gSMatX,  gSMatY, gSMatZ, nodesX, nodesY, nodesZ, jacobian);
-}
-
 // Calculate (signed) Jacobian and its gradients for one element, with normal vectors to straight element
 // for regularization. Evaluation points depend on the given matrices for shape function gradients.
-void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                                    const fullMatrix<double> &gSMatY,
-                                                    const fullMatrix<double> &gSMatZ,
-                                                    const fullMatrix<double> &nodesXYZ,
-                                                    const fullMatrix<double> &normals,
-                                                    fullMatrix<double> &JDJ) const
+void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes,
+                                                           const fullMatrix<double> &gSMatX,
+                                                           const fullMatrix<double> &gSMatY,
+                                                           const fullMatrix<double> &gSMatZ,
+                                                           const fullMatrix<double> &nodesXYZ,
+                                                           const fullMatrix<double> &normals,
+                                                           fullMatrix<double> &JDJ) const
 {
-
-  switch (bezier->getDim()) {
+  switch (_dim) {
 
     case 0 : {
       for (int i = 0; i < nJacNodes; i++) {
         for (int j = 0; j < numMapNodes; j++) {
-          JDJ (i,j) = 0.;
-          JDJ (i,j+1*numMapNodes) = 0.;
-          JDJ (i,j+2*numMapNodes) = 0.;
+          JDJ(i, j) = 0.;
+          JDJ(i, j+1*numMapNodes) = 0.;
+          JDJ(i, j+2*numMapNodes) = 0.;
         }
-        JDJ(i,3*numMapNodes) = 1.;
+        JDJ(i, 3*numMapNodes) = 1.;
       }
       break;
     }
@@ -530,13 +639,11 @@ void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes, const fullMat
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = normals(0,0), &dydY = normals(0,1), &dzdY = normals(0,2);
         const double &dxdZ = normals(1,0), &dydZ = normals(1,1), &dzdZ = normals(1,2);
-        for (int j = 0; j < numMapNodes; j++) {
-          const double &dPhidX = gSMatX(i,j);
-          JDJ (i,j) = dPhidX * dydY * dzdZ + dPhidX * dzdY * dydZ;
-          JDJ (i,j+1*numMapNodes) = dPhidX * dzdY * dxdZ - dPhidX * dxdY * dzdZ;
-          JDJ (i,j+2*numMapNodes) = dPhidX * dxdY * dydZ - dPhidX * dydY * dxdZ;
-        }
-        JDJ(i,3*numMapNodes) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        calcJDJ1D(dxdX, dxdY, dxdZ,
+                  dydX, dydY, dydZ,
+                  dzdX, dzdY, dzdZ,
+                  i, numMapNodes,
+                  gSMatX, JDJ);
       }
       break;
     }
@@ -549,22 +656,11 @@ void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes, const fullMat
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
         const double &dxdZ = normals(0,0), &dydZ = normals(0,1), &dzdZ = normals(0,2);
-        for (int j = 0; j < numMapNodes; j++) {
-          const double &dPhidX = gSMatX(i,j);
-          const double &dPhidY = gSMatY(i,j);
-          JDJ (i,j) =
-            dPhidX * dydY * dzdZ + dzdX * dPhidY * dydZ +
-            dPhidX * dzdY * dydZ - dydX * dPhidY * dzdZ;
-          JDJ (i,j+1*numMapNodes) =
-            dxdX * dPhidY * dzdZ +
-            dPhidX * dzdY * dxdZ - dzdX * dPhidY * dxdZ
-                                 - dPhidX * dxdY * dzdZ;
-          JDJ (i,j+2*numMapNodes) =
-                                   dPhidX * dxdY * dydZ +
-            dydX * dPhidY * dxdZ - dPhidX * dydY * dxdZ -
-            dxdX * dPhidY * dydZ;
-        }
-        JDJ(i,3*numMapNodes) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        calcJDJ2D(dxdX, dxdY, dxdZ,
+                  dydX, dydY, dydZ,
+                  dzdX, dzdY, dzdZ,
+                  i, numMapNodes,
+                  gSMatX, gSMatY, JDJ);
       }
       break;
     }
@@ -578,24 +674,11 @@ void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes, const fullMat
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
         const double &dxdZ = dxyzdZ(i,0), &dydZ = dxyzdZ(i,1), &dzdZ = dxyzdZ(i,2);
-        for (int j = 0; j < numMapNodes; j++) {
-          const double &dPhidX = gSMatX(i,j);
-          const double &dPhidY = gSMatY(i,j);
-          const double &dPhidZ = gSMatZ(i,j);
-          JDJ (i,j) =
-            dPhidX * dydY * dzdZ + dzdX * dPhidY * dydZ +
-            dydX * dzdY * dPhidZ - dzdX * dydY * dPhidZ -
-            dPhidX * dzdY * dydZ - dydX * dPhidY * dzdZ;
-          JDJ (i,j+1*numMapNodes) =
-            dxdX * dPhidY * dzdZ + dzdX * dxdY * dPhidZ +
-            dPhidX * dzdY * dxdZ - dzdX * dPhidY * dxdZ -
-            dxdX * dzdY * dPhidZ - dPhidX * dxdY * dzdZ;
-          JDJ (i,j+2*numMapNodes) =
-            dxdX * dydY * dPhidZ + dPhidX * dxdY * dydZ +
-            dydX * dPhidY * dxdZ - dPhidX * dydY * dxdZ -
-            dxdX * dPhidY * dydZ - dydX * dxdY * dPhidZ;
-        }
-        JDJ(i,3*numMapNodes) = calcDet3D(dxdX,dydX,dzdX,dxdY,dydY,dzdY,dxdZ,dydZ,dzdZ);
+        calcJDJ3D(dxdX, dxdY, dxdZ,
+                  dydX, dydY, dydZ,
+                  dzdX, dzdY, dzdZ,
+                  i, numMapNodes,
+                  gSMatX, gSMatY, gSMatZ, JDJ);
       }
       break;
     }
@@ -604,15 +687,27 @@ void JacobianBasis::getSignedJacAndGradientsGeneral(int nJacNodes, const fullMat
 
 }
 
+void JacobianBasis::getSignedIdealJacAndGradientsGeneral(int nJacNodes,
+                                                         const fullMatrix<double> &gSMatX,
+                                                         const fullMatrix<double> &gSMatY,
+                                                         const fullMatrix<double> &gSMatZ,
+                                                         const fullMatrix<double> &nodesXYZ,
+                                                         const fullMatrix<double> &normals,
+                                                         fullMatrix<double> &JDJ) const
+{
+  getSignedJacAndGradientsGeneral(nJacNodes, gSMatX, gSMatY, gSMatZ, nodesXYZ, normals, JDJ);
+}
+
+
 void JacobianBasis::getMetricMinAndGradients(const fullMatrix<double> &nodesXYZ,
                                              const fullMatrix<double> &nodesXYZStraight,
                                              fullVector<double> &lambdaJ, fullMatrix<double> &gradLambdaJ) const
 {
 
   // jacobian of the straight elements (only triangles for now)
-  SPoint3 v0(nodesXYZ(0,0),nodesXYZ(0,1),nodesXYZ(0,2));
-  SPoint3 v1(nodesXYZ(1,0),nodesXYZ(1,1),nodesXYZ(1,2));
-  SPoint3 v2(nodesXYZ(2,0),nodesXYZ(2,1),nodesXYZ(2,2));
+  SPoint3 v0(nodesXYZ(0, 0), nodesXYZ(0, 1), nodesXYZ(0, 2));
+  SPoint3 v1(nodesXYZ(1, 0), nodesXYZ(1, 1), nodesXYZ(1, 2));
+  SPoint3 v2(nodesXYZ(2, 0), nodesXYZ(2, 1), nodesXYZ(2, 2));
   SPoint3 *IXYZ[3] = {&v0, &v1, &v2};
   double jaci[2][2] = {
     {IXYZ[1]->x() - IXYZ[0]->x(), IXYZ[2]->x() - IXYZ[0]->x()},
@@ -624,14 +719,14 @@ void JacobianBasis::getMetricMinAndGradients(const fullMatrix<double> &nodesXYZ,
   for (int l = 0; l < numJacNodes; l++) {
     double jac[2][2] = {{0., 0.}, {0., 0.}};
     for (int i = 0; i < numMapNodes; i++) {
-      const double &dPhidX = _gradBasis->gradShapeMatX(l,i);
-      const double &dPhidY = _gradBasis->gradShapeMatY(l,i);
+      const double &dPhidX = _gradBasis->gradShapeMatX(l, i);
+      const double &dPhidY = _gradBasis->gradShapeMatY(l, i);
       const double dpsidx = dPhidX * invJaci[0][0] + dPhidY * invJaci[1][0];
       const double dpsidy = dPhidX * invJaci[0][1] + dPhidY * invJaci[1][1];
-      jac[0][0] += nodesXYZ(i,0) * dpsidx;
-      jac[0][1] += nodesXYZ(i,0) * dpsidy;
-      jac[1][0] += nodesXYZ(i,1) * dpsidx;
-      jac[1][1] += nodesXYZ(i,1) * dpsidy;
+      jac[0][0] += nodesXYZ(i, 0) * dpsidx;
+      jac[0][1] += nodesXYZ(i, 0) * dpsidy;
+      jac[1][0] += nodesXYZ(i, 1) * dpsidx;
+      jac[1][1] += nodesXYZ(i, 1) * dpsidy;
     }
     const double dxdx = jac[0][0] * jac[0][0] + jac[0][1] * jac[0][1];
     const double dydy = jac[1][0] * jac[1][0] + jac[1][1] * jac[1][1];
@@ -648,15 +743,15 @@ void JacobianBasis::getMetricMinAndGradients(const fullMatrix<double> &nodesXYZ,
     const double aetaxi  = ayx * invJaci[0][0] + ayy * invJaci[0][1];
     const double axieta  = axx * invJaci[1][0] + axy * invJaci[1][1];
     for (int i = 0; i < numMapNodes; i++) {
-      const double &dPhidX = _gradBasis->gradShapeMatX(l,i);
-      const double &dPhidY = _gradBasis->gradShapeMatY(l,i);
+      const double &dPhidX = _gradBasis->gradShapeMatX(l, i);
+      const double &dPhidY = _gradBasis->gradShapeMatY(l, i);
       gradLambdaJ(l, i + 0 * numMapNodes) = axixi * dPhidX + axieta * dPhidY;
       gradLambdaJ(l, i + 1 * numMapNodes) = aetaxi * dPhidX + aetaeta * dPhidY;
     }
   }
-
 }
 
+// Research purpose (to be removed ?)
 void JacobianBasis::interpolate(const fullVector<double> &jacobian,
                                 const fullMatrix<double> &uvw,
                                 fullMatrix<double> &result,
@@ -671,121 +766,14 @@ void JacobianBasis::interpolate(const fullVector<double> &jacobian,
   else
     lag2Bez(jacobian, bez);
 
-  bezier->interpolate(bezM, uvw, result);
+  getBezier()->interpolate(bezM, uvw, result);
 }
 
-fullMatrix<double> JacobianBasis::generateJacMonomialsPyramid(int order)
+int JacobianBasis::jacobianOrder(int tag)
 {
-  const int nbMonomials = (order+3)*(order+3)*(order+1);
-  fullMatrix<double> monomials(nbMonomials, 3);
-
-  if (order == 0) {
-    fullMatrix<double> prox, quad = gmshGenerateMonomialsQuadrangle(2);
-    prox.setAsProxy(monomials, 0, 2);
-    prox.setAll(quad);
-    return monomials;
-  }
-
-  monomials(0, 0) = 0;
-  monomials(0, 1) = 0;
-  monomials(0, 2) = 0;
-
-  monomials(1, 0) = order+2;
-  monomials(1, 1) = 0;
-  monomials(1, 2) = 0;
-
-  monomials(2, 0) = order+2;
-  monomials(2, 1) = order+2;
-  monomials(2, 2) = 0;
-
-  monomials(3, 0) = 0;
-  monomials(3, 1) = order+2;
-  monomials(3, 2) = 0;
-
-  monomials(4, 0) = 0;
-  monomials(4, 1) = 0;
-  monomials(4, 2) = order;
-
-  monomials(5, 0) = order+2;
-  monomials(5, 1) = 0;
-  monomials(5, 2) = order;
-
-  monomials(6, 0) = order+2;
-  monomials(6, 1) = order+2;
-  monomials(6, 2) = order;
-
-  monomials(7, 0) = 0;
-  monomials(7, 1) = order+2;
-  monomials(7, 2) = order;
-
-  int index = 8;
-
-  static const int bottom_edges[4][2] = {
-    {0, 1},
-    {1, 2},
-    {2, 3},
-    {3, 0}
-  };
-
-  // bottom & top "edges"
-  for (int iedge = 0; iedge < 4; ++iedge) {
-    int i0 = bottom_edges[iedge][0];
-    int i1 = bottom_edges[iedge][1];
-
-    int u_1 = (monomials(i1,0)-monomials(i0,0)) / (order + 2);
-    int u_2 = (monomials(i1,1)-monomials(i0,1)) / (order + 2);
-
-    for (int i = 1; i < order + 2; ++i, ++index) {
-      monomials(index, 0) = monomials(i0, 0) + i * u_1;
-      monomials(index, 1) = monomials(i0, 1) + i * u_2;
-      monomials(index, 2) = 0;
-    }
-    for (int i = 1; i < order + 2; ++i, ++index) {
-      monomials(index, 0) = monomials(i0, 0) + i * u_1;
-      monomials(index, 1) = monomials(i0, 1) + i * u_2;
-      monomials(index, 2) = order;
-    }
-  }
-
-  // bottom & top "face"
-  fullMatrix<double> uv = gmshGenerateMonomialsQuadrangle(order);
-  uv.add(1);
-  for (int i = 0; i < uv.size1(); ++i, ++index) {
-    monomials(index, 0) = uv(i, 0);
-    monomials(index, 1) = uv(i, 1);
-    monomials(index, 2) = 0;
-  }
-  for (int i = 0; i < uv.size1(); ++i, ++index) {
-    monomials(index, 0) = uv(i, 0);
-    monomials(index, 1) = uv(i, 1);
-    monomials(index, 2) = order;
-  }
-
-  // other monomials
-  uv = gmshGenerateMonomialsQuadrangle(order + 2);
-  for (int k = 1; k < order; ++k) {
-    for (int i = 0; i < uv.size1(); ++i, ++index) {
-      monomials(index, 0) = uv(i, 0);
-      monomials(index, 1) = uv(i, 1);
-      monomials(index, 2) = k;
-    }
-  }
-  return monomials;
-}
-
-fullMatrix<double> JacobianBasis::generateJacPointsPyramid(int order)
-{
-  fullMatrix<double> points = generateJacMonomialsPyramid(order);
-
-  const double p = order + 2;
-  for (int i = 0; i < points.size1(); ++i) {
-    points(i, 2) = points(i, 2) / p;
-    const double scale = 1. - points(i, 2);
-    points(i, 0) = (-1. + 2. * points(i, 0) / p) * scale;
-    points(i, 1) = (-1. + 2. * points(i, 1) / p) * scale;
-  }
-
-  return points;
+  const int parentType = ElementType::ParentTypeFromTag(tag);
+  const int order = ElementType::OrderFromTag(tag);
+  return jacobianOrder(parentType, order);
 }
 
 int JacobianBasis::jacobianOrder(int parentType, int order)
@@ -807,4 +795,34 @@ int JacobianBasis::jacobianOrder(int parentType, int order)
   }
 }
 
+FuncSpaceData JacobianBasis::jacobianMatrixSpace(int type, int order)
+{
+  if (type == TYPE_PYR) {
+    Msg::Fatal("jacobianMatrixSpace not yet implemented for pyramids");
+    return FuncSpaceData(false, type, false, 1, 0);
+  }
+  int jacOrder = -1;
+  switch (type) {
+    case TYPE_PNT :
+      jacOrder = 0;
+      break;
+
+    case TYPE_LIN :
+    case TYPE_TRI :
+    case TYPE_TET :
+      jacOrder = order - 1;
+      break;
+
+    case TYPE_QUA :
+    case TYPE_PRI :
+    case TYPE_HEX :
+      jacOrder = order;
+      break;
 
+    default :
+      Msg::Error("Unknown element type %d, return order 0", type);
+      return 0;
+  }
+
+  return FuncSpaceData(true, ElementType::getTag(type, order), jacOrder);
+}
diff --git a/Numeric/JacobianBasis.h b/Numeric/JacobianBasis.h
index 9701cec..737bd57 100644
--- a/Numeric/JacobianBasis.h
+++ b/Numeric/JacobianBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,19 +6,20 @@
 #ifndef _JACOBIAN_BASIS_H_
 #define _JACOBIAN_BASIS_H_
 
-#include <map>
-#include <vector>
-#include "bezierBasis.h"
 #include "fullMatrix.h"
-
+#include "FuncSpaceData.h"
+#include "bezierBasis.h"
 
 class GradientBasis {
- public:
+public:
   fullMatrix<double> gradShapeMatX, gradShapeMatY, gradShapeMatZ;
+  fullMatrix<double> gradShapeIdealMatX, gradShapeIdealMatY, gradShapeIdealMatZ;
 
- public :
+private:
+  const FuncSpaceData _data;
 
-  GradientBasis(int tag, int order);
+public:
+  GradientBasis(FuncSpaceData);
 
   int getNumSamplingPoints() const {return gradShapeMatX.size1();}
   int getNumMapNodes() const {return gradShapeMatX.size2();}
@@ -27,129 +28,206 @@ class GradientBasis {
                              fullMatrix<double> *dxyzdX,
                              fullMatrix<double> *dxyzdY,
                              fullMatrix<double> *dxyzdZ) const;
+  void getIdealGradientsFromNodes(const fullMatrix<double> &nodes,
+                                  fullMatrix<double> *dxyzdX,
+                                  fullMatrix<double> *dxyzdY,
+                                  fullMatrix<double> *dxyzdZ) const;
+  void mapFromIdealElement(fullMatrix<double> &dxyzdX,
+                           fullMatrix<double> &dxyzdY,
+                           fullMatrix<double> &dxyzdZ) const {
+    GradientBasis::mapFromIdealElement(_data.elementType(), dxyzdX, dxyzdY, dxyzdZ);
+  }
+  void mapFromIdealElement(fullVector<double> &dxyzdX,
+                           fullVector<double> &dxyzdY,
+                           fullVector<double> &dxyzdZ) const {
+    GradientBasis::mapFromIdealElement(_data.elementType(), dxyzdX, dxyzdY, dxyzdZ);
+  }
+  static void mapFromIdealElement(int type,
+                                  fullMatrix<double> &gSMatX,
+                                  fullMatrix<double> &gSMatY,
+                                  fullMatrix<double> &gSMatZ);
+  static void mapFromIdealElement(int type,
+                                  fullVector<double> &gSVecX,
+                                  fullVector<double> &gSVecY,
+                                  fullVector<double> &gSVecZ);
+  static void mapFromIdealElement(int type, double jac[3][3]);
 };
 
-
 class JacobianBasis {
- private:
+private:
   const GradientBasis *_gradBasis;
+  const bezierBasis *_bezier;
+
+  const FuncSpaceData _data;
+  const int _dim;
+
   fullMatrix<double> gradShapeMatXFast, gradShapeMatYFast, gradShapeMatZFast;
-  fullVector<double> primGradShapeBarycenterX, primGradShapeBarycenterY, primGradShapeBarycenterZ;
-  fullMatrix<double> matrixPrimJac2Jac;                                   // Lifts Lagrange basis of primary Jac. to Lagrange basis of Jac.
+  fullVector<double> primGradShapeBaryX, primGradShapeBaryY, primGradShapeBaryZ;
+  fullVector<double> primIdealGradShapeBaryX, primIdealGradShapeBaryY,
+                     primIdealGradShapeBaryZ;
+  fullMatrix<double> matrixPrimJac2Jac;                                           // Lifts Lagrange basis of primary Jac. to Lagrange basis of Jac.
 
   int numJacNodes, numPrimJacNodes;
   int numMapNodes, numPrimMapNodes;
   int numJacNodesFast;
 
- public :
-  const bezierBasis *bezier;
-
-  JacobianBasis(int tag, int jacOrder = -1);
+public:
+  JacobianBasis(FuncSpaceData);
 
   // Get methods
-  inline int getNumJacNodes() const { return numJacNodes; }
-  inline int getNumJacNodesFast() const { return numJacNodesFast; }
-  inline int getNumMapNodes() const { return numMapNodes; }
-  inline int getNumPrimJacNodes() const { return numPrimJacNodes; }
-  inline int getNumPrimMapNodes() const { return numPrimMapNodes; }
-  inline int getNumDivisions() const { return bezier->getNumDivision(); }
-  inline int getNumSubNodes() const { return bezier->subDivisor.size1(); }
-  inline int getNumLagCoeff() const { return bezier->getNumLagCoeff(); }
+  inline int getJacOrder() const {return _data.spaceOrder();}
+  inline int getNumJacNodes() const {return numJacNodes;}
+  inline int getNumJacNodesFast() const {return numJacNodesFast;}
+  inline int getNumMapNodes() const {return numMapNodes;}
+  inline int getNumPrimJacNodes() const {return numPrimJacNodes;}
+  inline int getNumPrimMapNodes() const {return numPrimMapNodes;}
+  const bezierBasis* getBezier() const;
 
   // Jacobian evaluation methods
-  double getPrimNormals1D(const fullMatrix<double> &nodesXYZ, fullMatrix<double> &result) const;
-  double getPrimNormal2D(const fullMatrix<double> &nodesXYZ, fullMatrix<double> &result) const;
-  double getPrimJac3D(const fullMatrix<double> &nodesXYZ) const;
+  double getPrimNormals1D(const fullMatrix<double> &nodesXYZ,
+                          fullMatrix<double> &result) const;
+  double getPrimNormal2D(const fullMatrix<double> &nodesXYZ,
+                         fullMatrix<double> &result, bool ideal=false) const;
+  double getPrimJac3D(const fullMatrix<double> &nodesXYZ, bool ideal=false) const;
   inline void getSignedJacAndGradients(const fullMatrix<double> &nodesXYZ,
-                                       const fullMatrix<double> &normals, fullMatrix<double> &JDJ) const {
+                                       const fullMatrix<double> &normals,
+                                       fullMatrix<double> &JDJ) const {
     getSignedJacAndGradientsGeneral(numJacNodes, _gradBasis->gradShapeMatX,
-        _gradBasis->gradShapeMatY, _gradBasis->gradShapeMatZ, nodesXYZ, normals, JDJ);
+                                    _gradBasis->gradShapeMatY,
+                                    _gradBasis->gradShapeMatZ,
+                                    nodesXYZ, normals, JDJ);
   }
   inline void getSignedJacAndGradientsFast(const fullMatrix<double> &nodesXYZ,
-                                           const fullMatrix<double> &normals, fullMatrix<double> &JDJ) const {
-    getSignedJacAndGradientsGeneral(numJacNodesFast,gradShapeMatXFast,gradShapeMatYFast,
-                                    gradShapeMatZFast,nodesXYZ,normals,JDJ);
+                                           const fullMatrix<double> &normals,
+                                           fullMatrix<double> &JDJ) const {
+    getSignedJacAndGradientsGeneral(numJacNodesFast, gradShapeMatXFast,
+                                    gradShapeMatYFast, gradShapeMatZFast,
+                                    nodesXYZ, normals, JDJ);
+  }
+  inline void getSignedIdealJacAndGradients(const fullMatrix<double> &nodesXYZ,
+                                            const fullMatrix<double> &normals,
+                                            fullMatrix<double> &JDJ) const {
+    getSignedJacAndGradientsGeneral(numJacNodes, _gradBasis->gradShapeIdealMatX,
+                                    _gradBasis->gradShapeIdealMatY,
+                                    _gradBasis->gradShapeIdealMatZ,
+                                    nodesXYZ, normals, JDJ);
   }
   void getMetricMinAndGradients(const fullMatrix<double> &nodesXYZ,
                                 const fullMatrix<double> &nodesXYZStraight,
-                                fullVector<double> &lambdaJ , fullMatrix<double> &gradLambdaJ) const;
-  inline void getSignedJacobian(const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const {
-    getSignedJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
-        _gradBasis->gradShapeMatY, _gradBasis->gradShapeMatZ,nodesXYZ,jacobian);
+                                fullVector<double> &lambdaJ,
+                                fullMatrix<double> &gradLambdaJ) const;
+  inline void getSignedJacobian(const fullMatrix<double> &nodesXYZ,
+                                fullVector<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
+                       _gradBasis->gradShapeMatY,
+                       _gradBasis->gradShapeMatZ,
+                       nodesXYZ, false, false, jacobian);
+  }
+  inline void getSignedJacobian(const fullMatrix<double> &nodesX,
+                                const fullMatrix<double> &nodesY,
+                                const fullMatrix<double> &nodesZ,
+                                fullMatrix<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
+                       _gradBasis->gradShapeMatY,
+                       _gradBasis->gradShapeMatZ,
+                       nodesX, nodesY, nodesZ, false, false, jacobian);
+  }
+  inline void getSignedIdealJacobian(const fullMatrix<double> &nodesXYZ,
+                                     fullVector<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeIdealMatX,
+                       _gradBasis->gradShapeIdealMatY,
+                       _gradBasis->gradShapeIdealMatZ,
+                       nodesXYZ, true, false, jacobian);
   }
-  inline void getSignedJacobian(const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const {
-    getSignedJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
-        _gradBasis->gradShapeMatY, _gradBasis->gradShapeMatZ,nodesX,nodesY,nodesZ,jacobian);
+  inline void getSignedIdealJacobian(const fullMatrix<double> &nodesX,
+                                     const fullMatrix<double> &nodesY,
+                                     const fullMatrix<double> &nodesZ,
+                                     fullMatrix<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeIdealMatX,
+                       _gradBasis->gradShapeIdealMatY,
+                       _gradBasis->gradShapeIdealMatZ,
+                       nodesX, nodesY, nodesZ, true, false, jacobian);
   }
-  inline void getScaledJacobian(const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const {
-    getScaledJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
-        _gradBasis->gradShapeMatY, _gradBasis->gradShapeMatZ,nodesXYZ,jacobian);
+  inline void getScaledJacobian(const fullMatrix<double> &nodesXYZ,
+                                fullVector<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
+                       _gradBasis->gradShapeMatY,
+                       _gradBasis->gradShapeMatZ,
+                       nodesXYZ, false, true, jacobian);
   }
-  inline void getScaledJacobian(const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const {
-    getScaledJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
-        _gradBasis->gradShapeMatY, _gradBasis->gradShapeMatZ,nodesX,nodesY,nodesZ,jacobian);
+  inline void getScaledJacobian(const fullMatrix<double> &nodesX,
+                                const fullMatrix<double> &nodesY,
+                                const fullMatrix<double> &nodesZ,
+                                fullMatrix<double> &jacobian) const {
+    getJacobianGeneral(numJacNodes, _gradBasis->gradShapeMatX,
+                       _gradBasis->gradShapeMatY,
+                       _gradBasis->gradShapeMatZ,
+                       nodesX, nodesY, nodesZ, false, true, jacobian);
   }
-  inline void getSignedJacobianFast(const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const {
-    getSignedJacobianGeneral(numJacNodesFast,gradShapeMatXFast,gradShapeMatYFast,gradShapeMatZFast,nodesXYZ,jacobian);
+  inline void getSignedJacobianFast(const fullMatrix<double> &nodesXYZ,
+                                    fullVector<double> &jacobian) const {
+    getJacobianGeneral(numJacNodesFast, gradShapeMatXFast,
+                       gradShapeMatYFast, gradShapeMatZFast,
+                       nodesXYZ, false, false, jacobian);
   }
-  inline void getScaledJacobianFast(const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const {
-    getScaledJacobianGeneral(numJacNodesFast,gradShapeMatXFast,gradShapeMatYFast,gradShapeMatZFast,nodesXYZ,jacobian);
+  inline void getScaledJacobianFast(const fullMatrix<double> &nodesXYZ,
+                                    fullVector<double> &jacobian) const {
+    getJacobianGeneral(numJacNodesFast, gradShapeMatXFast,
+                       gradShapeMatYFast, gradShapeMatZFast,
+                       nodesXYZ, false, true, jacobian);
   }
-  //
+
   inline void lag2Bez(const fullVector<double> &jac, fullVector<double> &bez) const {
-    bezier->matrixLag2Bez.mult(jac,bez);
+    getBezier()->matrixLag2Bez.mult(jac,bez);
   }
   inline void lag2Bez(const fullMatrix<double> &jac, fullMatrix<double> &bez) const {
-    bezier->matrixLag2Bez.mult(jac,bez);
+    getBezier()->matrixLag2Bez.mult(jac,bez);
   }
   inline void primJac2Jac(const fullVector<double> &primJac, fullVector<double> &jac) const {
     matrixPrimJac2Jac.mult(primJac,jac);
   }
-  inline void subdivideBezierCoeff(const fullVector<double> &bez, fullVector<double> &result) const {
-    bezier->subDivisor.mult(bez,result);
-  }
-  //
+
   void interpolate(const fullVector<double> &jacobian,
                    const fullMatrix<double> &uvw,
                    fullMatrix<double> &result, bool areBezier = false) const;
 
-  //
+  static int jacobianOrder(int tag);
   static int jacobianOrder(int parentType, int order);
-  static fullMatrix<double> generateJacMonomialsPyramid(int order);
-  static fullMatrix<double> generateJacPointsPyramid(int order);
+  static FuncSpaceData jacobianMatrixSpace(int type, int order);
 
 
  private :
-  template<bool scaling>
-  inline void getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                 const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                 const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
-  template<bool scaling>
-  inline void getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                 const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                 const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                 const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
-  void getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
-  void getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
-  void getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
-  void getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
-                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
-
-  void getSignedJacAndGradientsGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
-                                       const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
-                                       const fullMatrix<double> &nodesXYZ, const fullMatrix<double> &normals,
+  void getJacobianGeneral(int nJacNodes,
+                          const fullMatrix<double> &gSMatX,
+                          const fullMatrix<double> &gSMatY,
+                          const fullMatrix<double> &gSMatZ,
+                          const fullMatrix<double> &nodesXYZ,
+                          bool idealNorm, bool scaling,
+                          fullVector<double> &jacobian) const;
+  void getJacobianGeneral(int nJacNodes,
+                          const fullMatrix<double> &gSMatX,
+                          const fullMatrix<double> &gSMatY,
+                          const fullMatrix<double> &gSMatZ,
+                          const fullMatrix<double> &nodesX,
+                          const fullMatrix<double> &nodesY,
+                          const fullMatrix<double> &nodesZ,
+                          bool idealNorm, bool scaling,
+                          fullMatrix<double> &jacobian) const;
+
+  void getSignedJacAndGradientsGeneral(int nJacNodes,
+                                       const fullMatrix<double> &gSMatX,
+                                       const fullMatrix<double> &gSMatY,
+                                       const fullMatrix<double> &gSMatZ,
+                                       const fullMatrix<double> &nodesXYZ,
+                                       const fullMatrix<double> &normals,
                                        fullMatrix<double> &JDJ) const;
+  void getSignedIdealJacAndGradientsGeneral(int nJacNodes,
+                                            const fullMatrix<double> &gSMatX,
+                                            const fullMatrix<double> &gSMatY,
+                                            const fullMatrix<double> &gSMatZ,
+                                            const fullMatrix<double> &nodesXYZ,
+                                            const fullMatrix<double> &normals,
+                                            fullMatrix<double> &JDJ) const;
 };
 
 #endif
diff --git a/Numeric/MetricBasis.cpp b/Numeric/MetricBasis.cpp
index c94a392..319070b 100644
--- a/Numeric/MetricBasis.cpp
+++ b/Numeric/MetricBasis.cpp
@@ -1,18 +1,19 @@
-// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include "MElement.h"
+#include "AnalyseCurvedMesh.h"
 #include "MetricBasis.h"
 #include "BasisFactory.h"
 #include "pointsGenerators.h"
-#include "BasisFactory.h"
-#include <queue>
 #include "OS.h"
+#include <queue>
 #include <sstream>
+#include <limits>
 
-double MetricBasis::_tol = 1e-2;
-int MetricBasis::_which = 0;
+double MetricBasis::_tol = 1e-3;
 
 namespace {
   double cubicCardanoRoot(double p, double q)
@@ -46,412 +47,187 @@ namespace {
     for (int i = 1; i <= k; i++, n--) (c *= n) /= i;
     return c;
   }
+
+  double symRand(double f = 1)
+  {
+    return f * (rand()%2001 - 1000) / 1000.;
+  }
 }
 
-MetricBasis::MetricBasis(int tag)
+MetricBasis::MetricBasis(int tag) :
+  _jacobian(NULL), _type(ElementType::ParentTypeFromTag(tag)),
+  _dim(ElementType::DimensionFromTag(tag))
 {
-  const int type = ElementType::ParentTypeFromTag(tag);
+  const bool serendip = false;
   const int metOrder = metricOrder(tag);
-  if (type == TYPE_HEX || type == TYPE_PRI) {
-    int order = ElementType::OrderFromTag(tag);
-    _jacobian = new JacobianBasis(tag, 3*order);
-  }
-  else if (type == TYPE_TET)
-    _jacobian = BasisFactory::getJacobianBasis(tag);
+  const int jacOrder = 3*metOrder/2;
+
+  // get bezier and gradients for metric space
+  FuncSpaceData *metricSpace = NULL;
+  if (_type != TYPE_PYR)
+    metricSpace = new FuncSpaceData(true, tag, metOrder, &serendip);
   else
+    metricSpace = new FuncSpaceData(true, tag, false, metOrder+2,
+                                    metOrder, &serendip);
+
+  _gradients = BasisFactory::getGradientBasis(*metricSpace);
+  _bezier = BasisFactory::getBezierBasis(*metricSpace);
+  delete metricSpace;
+
+  // get jacobian
+  FuncSpaceData *jacSpace = NULL;
+  if (_type == TYPE_TET || _type == TYPE_HEX || _type == TYPE_PRI) {
+    jacSpace = new FuncSpaceData(true, tag, jacOrder, &serendip);
+  }
+  else if (_type == TYPE_PYR) {
+    jacSpace = new FuncSpaceData(true, tag, false, jacOrder+3,
+                                 jacOrder, &serendip);
+  }
+  else if (_type != TYPE_TRI && _type != TYPE_QUA)
     Msg::Fatal("metric not implemented for element tag %d", tag);
-  _gradients = BasisFactory::getGradientBasis(tag, metOrder);
-  _bezier = BasisFactory::getBezierBasis(type, metOrder);
+
+  if (jacSpace) {
+    _jacobian = BasisFactory::getJacobianBasis(*jacSpace);
+    delete jacSpace;
+  }
 
   _fillInequalities(metOrder);
-  __TotSubdivision = 0;
 }
 
 double MetricBasis::boundMinR(MElement *el)
 {
   MetricBasis *metric = (MetricBasis*)BasisFactory::getMetricBasis(el->getTypeForMSH());
-  MetricData *md = NULL;
-  fullMatrix<double> dummy;
-  return metric->getBoundRmin(el, md, dummy);
+  return metric->getBoundMinR(el);
 }
 
-double MetricBasis::sampleR(MElement *el, int order)
+double MetricBasis::minRCorner(MElement *el)
 {
-  MetricBasis *metric = (MetricBasis*)BasisFactory::getMetricBasis(el->getTypeForMSH());
-  MetricData *md = NULL;
-  fullMatrix<double> dummy;
-  return metric->getMinR(el, md, order);
-}
+  int tag = el->getTypeForMSH();
+  int order = 1;
+  if (el->getType() == TYPE_TRI || el->getType() == TYPE_TET) order = 0;
 
-double MetricBasis::getMinR(MElement *el, MetricData *&md, int deg) const
-{
-  fullMatrix<double> samplingPoints;
-
-  switch (el->getType()) {
-    case TYPE_PNT :
-      samplingPoints = gmshGeneratePointsLine(0);
-      break;
-    case TYPE_LIN :
-      samplingPoints = gmshGeneratePointsLine(deg);
-      break;
-    case TYPE_TRI :
-      samplingPoints = gmshGeneratePointsTriangle(deg,false);
-      break;
-    case TYPE_QUA :
-      samplingPoints = gmshGeneratePointsQuadrangle(deg,false);
-      break;
-    case TYPE_TET :
-      samplingPoints = gmshGeneratePointsTetrahedron(deg,false);
-      break;
-    case TYPE_PRI :
-      samplingPoints = gmshGeneratePointsPrism(deg,false);
-      break;
-    case TYPE_HEX :
-      samplingPoints = gmshGeneratePointsHexahedron(deg,false);
-      break;
-    case TYPE_PYR :
-      samplingPoints = JacobianBasis::generateJacPointsPyramid(deg);
-      break;
-    default :
-      Msg::Error("Unknown Jacobian function space for element type %d", el->getType());
-      return -1;
+  const GradientBasis *gradients;
+  const JacobianBasis *jacobian;
+  if (el->getType() != TYPE_PYR) {
+    gradients = BasisFactory::getGradientBasis(tag, order);
+    jacobian = BasisFactory::getJacobianBasis(tag, order);
+  }
+  else {
+    const bool serendip = false;
+    FuncSpaceData fsd(true, tag, false, 1, 0, &serendip);
+    gradients = BasisFactory::getGradientBasis(fsd);
+    jacobian = BasisFactory::getJacobianBasis(fsd);
   }
 
-  if (!md) _getMetricData(el, md);
-
-  static unsigned int aa = 200;
-  bool write = false;
-  if (md->_num < 100000 && ++aa < 200) {
-    write = true;
-    std::stringstream name;
-    name << "HoleMetric_" << el->getNum() << "_";
-    name << (md->_num % 10);
-    name << (md->_num % 100)/10;
-    name << (md->_num % 1000)/100;
-    name << (md->_num % 10000)/1000;
-    name << (md->_num % 100000)/10000;
-    name << ".txt";
-    ((MetricBasis*)this)->file.open(name.str().c_str(), std::fstream::out);
-
-    {
-      fullMatrix<double> *coeff = md->_metcoeffs;
-      fullVector<double> *jac = md->_jaccoeffs;
-      double minp, minpp, maxp, minJ2, maxJ2, minK, mina, maxa, beta, minq, maxq, maxa2, maxa3, maxK2, maxK3, RminBez, RminLag;
-      minp = _minp(*coeff);
-      minpp = _minp2(*coeff);
-      maxp = _maxp(*coeff);
-      minq = _minq(*coeff);
-      maxq = _maxq(*coeff);
-      _minMaxJacobianSqr(*jac, minJ2, maxJ2);
-      _minJ2P3(*coeff, *jac, minK);
-      _minMaxA(*coeff, mina, maxa);
+  int nSampPnts = jacobian->getNumJacNodes();
+  if (el->getType() == TYPE_PYR) nSampPnts = 4;
+  int nMapping = gradients->getNumMapNodes();
 
-      double phip, term1, dRda;
-      _computeTermBeta(mina, minK, dRda, term1, phip);
-      beta = -3 * mina*mina * term1 / dRda / 6;
-      if (beta*minK-mina*mina*mina < 0) {
-        _maxAstKneg(*coeff, *jac, minK, beta, maxa3);
-        _maxAstKpos(*coeff, *jac, minK, beta, maxa2);
-      }
-      else {
-        _maxAstKpos(*coeff, *jac, minK, beta, maxa3);
-        _maxAstKneg(*coeff, *jac, minK, beta, maxa2);
-        if (beta*minK-maxa3*maxa3*maxa3 < 0) {
-          _maxAstKneg(*coeff, *jac, minK, beta, maxa3);
-          _maxAstKpos(*coeff, *jac, minK, beta, maxa2);
-        }
-      }
-      _maxKstAfast(*coeff, *jac, mina, beta, maxK2);
-      _maxKstAsharp(*coeff, *jac, mina, beta, maxK3);
+  // Nodes
+  fullMatrix<double> nodes(nMapping, 3);
+  el->getNodesCoord(nodes);
 
-      /*if (md->_num == 22)
-        _computeRmin(*coeff, *jac, RminLag, RminBez, 0, true);
-      else*/
-      _computeRmin(*coeff, *jac, RminLag, RminBez, 0, false);
+  // Jacobian coefficients
+  fullVector<double> jacLag(jacobian->getNumJacNodes());
+  jacobian->getSignedJacobian(nodes, jacLag);
 
-      double betaOpt = beta, minaOpt = mina, maxaOpt = maxa3, RminBezOpt;
-      {
-        /*const */double phi = std::acos(.5*(minK-maxa3*maxa3*maxa3+3*maxa3))/3;
-        RminBezOpt = (maxa3+2*std::cos(phi+2*M_PI/3))/(maxa3+2*std::cos(phi));
-        RminBezOpt = std::sqrt(RminBezOpt);
-
-        double RminBez0 = (mina+2*std::cos(phip+M_PI/3))/(mina+2*std::cos(phip-M_PI/3));
-        RminBez0 = std::sqrt(RminBez0);
-        double curmina = mina;
-        double curmaxa = maxa3;
-        while (std::min(RminLag, RminBez0)-RminBezOpt > MetricBasis::_tol) {
-          minaOpt = (curmina + curmaxa) / 2;
-          maxaOpt = curmina;
-          while (maxaOpt < minaOpt) {
-            _computeTermBeta(minaOpt, minK, dRda, term1, phip);
-            betaOpt = -3 * minaOpt*minaOpt * term1 / dRda / 6;
-            if (betaOpt*minK-minaOpt*minaOpt*minaOpt < 0)
-              _maxAstKneg(*coeff, *jac, minK, betaOpt, maxaOpt);
-            else {
-              _maxAstKpos(*coeff, *jac, minK, betaOpt, maxaOpt);
-              if (betaOpt*minK-maxaOpt*maxaOpt*maxaOpt < 0)
-                _maxAstKneg(*coeff, *jac, minK, betaOpt, maxaOpt);
-            }
-            minaOpt = (curmina + minaOpt) / 2;
-          }
-          curmina = minaOpt;
-          curmaxa = maxaOpt;
-          phi = std::acos(.5*(minK-curmaxa*curmaxa*curmaxa+3*curmaxa))/3;
-          RminBezOpt = (curmaxa+2*std::cos(phi+2*M_PI/3))/(curmaxa+2*std::cos(phi));
-          phi = std::acos(.5*(minK-curmina*curmina*curmina+3*curmina))/3;
-          RminBez0 = (curmina+2*std::cos(phi+2*M_PI/3))/(curmina+2*std::cos(phi));
-          RminBezOpt = std::sqrt(RminBezOpt);
-          RminBez0 = std::sqrt(RminBez0);
-        }
-      }
+  // Metric coefficients
+  fullMatrix<double> metCoeffLag;
+  _fillCoeff<false>(el->getDim(), gradients, nodes, metCoeffLag);
 
-      ((MetricBasis*)this)->file << minK << " ";
-      ((MetricBasis*)this)->file << maxJ2/minpp/minpp/minpp << " ";
-      ((MetricBasis*)this)->file << mina << " " << maxa << " ";
-      ((MetricBasis*)this)->file << beta << " ";
-      ((MetricBasis*)this)->file << minp << " " << maxp << " ";
-      ((MetricBasis*)this)->file << minJ2 << " " << maxJ2 << " ";
-      ((MetricBasis*)this)->file << minpp << " ";
-      ((MetricBasis*)this)->file << minq << " " << maxq << " ";
-      ((MetricBasis*)this)->file << maxa2 << " ";
-      ((MetricBasis*)this)->file << maxa3 << " ";
-      ((MetricBasis*)this)->file << maxK2 << " ";
-      ((MetricBasis*)this)->file << maxK3 << " ";
-      ((MetricBasis*)this)->file << RminBez << " " << RminLag << " ";
-      ((MetricBasis*)this)->file << betaOpt << " ";
-      ((MetricBasis*)this)->file << minaOpt << " " << maxaOpt << std::endl;
-    }
-  }
+  // Compute min_corner(R)
+  return _computeMinlagR(jacLag, metCoeffLag, nSampPnts);
+}
 
-  double uvw[3];
-  double minmaxQ[2];
-  uvw[0] = samplingPoints(0, 0);
-  uvw[1] = samplingPoints(0, 1);
-  uvw[2] = samplingPoints(0, 2);
-
-  interpolate(el, md, uvw, minmaxQ, write);
-  double min, max = min = std::sqrt(minmaxQ[0]/minmaxQ[1]);
-  for (int i = 1; i < samplingPoints.size1(); ++i) {
-    uvw[0] = samplingPoints(i, 0);
-    uvw[1] = samplingPoints(i, 1);
-    uvw[2] = samplingPoints(i, 2);
-    interpolate(el, md, uvw, minmaxQ, write);
-    double tmp = std::sqrt(minmaxQ[0]/minmaxQ[1]);
-    min = std::min(min, tmp);
-    max = std::max(max, tmp);
-    //Msg::Info("%g (%g, %g)", tmp, min, max);
-  }
-  if (write) {
-    ((MetricBasis*)this)->file.close();
-  }
-  return min;
+double MetricBasis::minSampledR(MElement *el, int order)
+{
+  MetricBasis *metric = (MetricBasis*)BasisFactory::getMetricBasis(el->getTypeForMSH());
+  return metric->getMinSampledR(el, order);
 }
 
-bool MetricBasis::notStraight(MElement *el, double &metric, int deg) const
+double MetricBasis::getMinSampledR(MElement *el, int deg) const
 {
   fullMatrix<double> samplingPoints;
-
-  switch (el->getType()) {
-    case TYPE_PNT :
-      samplingPoints = gmshGeneratePointsLine(0);
-      break;
-    case TYPE_LIN :
-      samplingPoints = gmshGeneratePointsLine(deg);
-      break;
-    case TYPE_TRI :
-      samplingPoints = gmshGeneratePointsTriangle(deg,false);
-      break;
-    case TYPE_QUA :
-      samplingPoints = gmshGeneratePointsQuadrangle(deg,false);
-      break;
-    case TYPE_TET :
-      samplingPoints = gmshGeneratePointsTetrahedron(deg,false);
-      break;
-    case TYPE_PRI :
-      samplingPoints = gmshGeneratePointsPrism(deg,false);
-      break;
-    case TYPE_HEX :
-      samplingPoints = gmshGeneratePointsHexahedron(deg,false);
-      break;
-    case TYPE_PYR :
-      samplingPoints = JacobianBasis::generateJacPointsPyramid(deg);
-      break;
-    default :
-      Msg::Error("Unknown Jacobian function space for element type %d", el->getType());
-      return false;
-  }
+  bool serendip = false;
+  gmshGeneratePoints(FuncSpaceData(el, deg, &serendip), samplingPoints);
 
   MetricData *md;
   _getMetricData(el, md);
 
-  double uvw[3];
-  double minmaxQ[2];
-  uvw[0] = samplingPoints(0, 0);
-  uvw[1] = samplingPoints(0, 1);
-  uvw[2] = samplingPoints(0, 2);
-
-  interpolate(el, md, uvw, minmaxQ);
-  double min, max = min = std::sqrt(minmaxQ[0]/minmaxQ[1]);
-  for (int i = 1; i < samplingPoints.size1(); ++i) {
-    uvw[0] = samplingPoints(i, 0);
-    uvw[1] = samplingPoints(i, 1);
-    uvw[2] = samplingPoints(i, 2);
-    interpolate(el, md, uvw, minmaxQ);
-    double tmp = std::sqrt(minmaxQ[0]/minmaxQ[1]);
-    min = std::min(min, tmp);
-    max = std::max(max, tmp);
-    //Msg::Info("%g (%g, %g)", tmp, min, max);
-  }
-
-  if (max-min < max*1e-12) {
-    metric = min;
-    return false;
-  }
-  else {
-    metric = -1;
-    return true;
+  fullMatrix<double> R;
+  interpolate(el, md, samplingPoints, R);
+
+  if (R.size1() < 1) {
+    delete md;
+    return -1;
   }
+
+  double min = R(0, 1);
+  for (int i = 1; i < R.size1(); ++i)
+    min = std::min(min, R(i, 1));
+
+  delete md;
+  return min;
 }
 
-double MetricBasis::getBoundRmin(MElement *el, MetricData *&md, fullMatrix<double> &lagCoeff)
+double MetricBasis::getBoundMinR(MElement *el) const
 {
-  __curElem = el;
   int nSampPnts = _gradients->getNumSamplingPoints();
   int nMapping = _gradients->getNumMapNodes();
+
+  // Nodes
   fullMatrix<double> nodes(nMapping, 3);
   el->getNodesCoord(nodes);
 
-  // Metric coefficients
-  fullMatrix<double> metCoeffLag;
-
-  switch (el->getDim()) {
-  case 0 :
-    return -1.;
-  case 1 :
-  case 2 :
-    Msg::Fatal("not implemented");
-    break;
-
-  case 3 :
-    {
-      fullMatrix<double> dxyzdX(nSampPnts,3), dxyzdY(nSampPnts,3), dxyzdZ(nSampPnts,3);
-      _gradients->getGradientsFromNodes(nodes, &dxyzdX, &dxyzdY, &dxyzdZ);
-
-      metCoeffLag.resize(nSampPnts, 7);
-      for (int i = 0; i < nSampPnts; i++) {
-        const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
-        const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
-        const double &dxdZ = dxyzdZ(i,0), &dydZ = dxyzdZ(i,1), &dzdZ = dxyzdZ(i,2);
-        const double dvxdX = dxdX*dxdX + dydX*dydX + dzdX*dzdX;
-        const double dvxdY = dxdY*dxdY + dydY*dydY + dzdY*dzdY;
-        const double dvxdZ = dxdZ*dxdZ + dydZ*dydZ + dzdZ*dzdZ;
-        metCoeffLag(i, 0) = (dvxdX + dvxdY + dvxdZ) / 3;
-        metCoeffLag(i, 1) = dvxdX - metCoeffLag(i, 0);
-        metCoeffLag(i, 2) = dvxdY - metCoeffLag(i, 0);
-        metCoeffLag(i, 3) = dvxdZ - metCoeffLag(i, 0);
-        const double fact = std::sqrt(2);
-        metCoeffLag(i, 4) = fact * (dxdX*dxdY + dydX*dydY + dzdX*dzdY);
-        metCoeffLag(i, 5) = fact * (dxdZ*dxdY + dydZ*dydY + dzdZ*dzdY);
-        metCoeffLag(i, 6) = fact * (dxdX*dxdZ + dydX*dydZ + dzdX*dzdZ);
-      }
-    }
-    break;
+  // Jacobian coefficients
+  fullVector<double> *jac = NULL;
+  if (_jacobian) {
+    fullVector<double> jacLag(_jacobian->getNumJacNodes());
+    jac = new fullVector<double>(_jacobian->getNumJacNodes());
+    _jacobian->getSignedIdealJacobian(nodes, jacLag);
+    _jacobian->lag2Bez(jacLag, *jac);
   }
 
-  lagCoeff = metCoeffLag;
+  // Metric coefficients
+  fullMatrix<double> metCoeffLag;
+  _fillCoeff<true>(el->getDim(), _gradients, nodes, metCoeffLag);
   fullMatrix<double> *metCoeff;
   metCoeff = new fullMatrix<double>(nSampPnts, metCoeffLag.size2());
   _bezier->matrixLag2Bez.mult(metCoeffLag, *metCoeff);
 
-  // Jacobian coefficients
-  fullVector<double> jacLag(_jacobian->getNumJacNodes());
-  fullVector<double> *jac = new fullVector<double>(_jacobian->getNumJacNodes());
-  _jacobian->getSignedJacobian(nodes, jacLag);
-  _jacobian->lag2Bez(jacLag, *jac);
-
-  //
+  // Compute min(R, _tol)
   double RminLag, RminBez;
-
-  /*Msg::Info("----------------");
-  Msg::Info("Jacobian");
-  for (int i = 0; i < jac->size(); ++i) {
-    Msg::Info("%g", (*jac)(i));
-  }
-  Msg::Info("----------------");
-  Msg::Info("Metric");
-  for (int i = 0; i < metCoeff->size1(); ++i) {
-    Msg::Info("%g %g %g %g %g %g %g", (*metCoeff)(i, 0), (*metCoeff)(i, 1), (*metCoeff)(i, 2), (*metCoeff)(i, 3), (*metCoeff)(i, 4), (*metCoeff)(i, 5), (*metCoeff)(i, 6));
-  }
-  Msg::Info("----------------");*/
-
-  _computeRmin(*metCoeff, *jac, RminLag, RminBez, 0);
-  //Msg::Info("el %d", el->getNum());
-  double mina, maxa;
-  _minMaxA(*metCoeff, mina, maxa);
-  static int cntRight = 0, cntTOT = 0;
-  ++cntTOT;
-  if (maxa-mina < 1e-10) {
-    ++cntRight;
-  }
-  //Msg::Info("right %d/%d", cntRight, cntTOT);
-
-
-    fullVector<double> *jjac = new fullVector<double>(*jac);
-    fullMatrix<double> *mmet = new fullMatrix<double>(*metCoeff);
-    /*for (int i = 0; i < jjac->size(); ++i) {
-      Msg::Info(":%g", (*jjac)(i));
-    }
-    for (int i = 0; i < mmet->size1(); ++i) {
-      Msg::Info(":%g | %g %g %g %g %g %g", (*mmet)(i, 0), (*mmet)(i, 1), (*mmet)(i, 2), (*mmet)(i, 3), (*mmet)(i, 4), (*mmet)(i, 5), (*mmet)(i, 6));
-    }*/
-    md = new MetricData(mmet, jjac, RminBez, 0, 0);
-      //Msg::Info("+1 %d", md);
+  _computeRmin(*metCoeff, *jac, RminLag, RminBez);
 
   if (RminLag-RminBez < MetricBasis::_tol) {
-    //Msg::Info("RETURNING %g", RminBez);
-    //Msg::Info("0 subdivision");
+    delete jac;
+    delete metCoeff;
     return RminBez;
   }
   else {
-    //MetricData md(metCoeff, jac, RminBez, 0);
     MetricData *md2 = new MetricData(metCoeff, jac, RminBez, 0, 0);
-      //Msg::Info("+2 %d", md2);
-    ((MetricBasis*)this)->__numSubdivision = 0;
-    ((MetricBasis*)this)->__numSub.resize(20);
-    for (unsigned int i = 0; i < __numSub.size(); ++i) ((MetricBasis*)this)->__numSub[i] = 0;
-    ((MetricBasis*)this)->__maxdepth = 0;
-    //double time = Cpu();
-    static int maxsub = 0, elmax;
-    double tt = _subdivideForRmin(md2, RminLag, MetricBasis::_tol, MetricBasis::_which);
-    if (maxsub < __numSubdivision && tt > 10-10) {
-      maxsub = __numSubdivision;
-      elmax = el->getNum();
-    }
-    //Msg::Info("%d subdivisions (max %d, %d), el %d", __numSubdivision, maxsub, elmax, el->getNum());
-    /*//Msg::Info("> computation time %g", Cpu() - time);
-    Msg::Info("> maxDepth %d", __maxdepth);
-    Msg::Info("> numSubdivision %d", __numSubdivision);
-    int last = __numSub.size();
-    while (--last > 0 && __numSub[last] == 0);
-    for (unsigned int i = 0; i < last+1; ++i) {
-      Msg::Info("> depth %d: %d", i, __numSub[i]);
-    }
-    Msg::Info("RETURNING %g after subdivision", tt);*/
+    double tt = _subdivideForRmin(md2, RminLag, MetricBasis::_tol);
     return tt;
   }
 }
 
 void MetricBasis::_fillInequalities(int metricOrder)
 {
-  int dimSimplex = _bezier->_dimSimplex;
-  int dim = _bezier->getDim();
+  if (_type == TYPE_PYR) {
+    _fillInequalitiesPyr(metricOrder);
+    return;
+  }
+
   fullMatrix<int> exp(_bezier->_exponents.size1(), _bezier->_exponents.size2());
   for (int i = 0; i < _bezier->_exponents.size1(); ++i) {
     for (int j = 0; j < _bezier->_exponents.size2(); ++j) {
       exp(i, j) = static_cast<int>(_bezier->_exponents(i, j) + .5);
     }
   }
+
   int ncoeff = _gradients->getNumSamplingPoints();
+  int dimSimplex = _bezier->getDimSimplex();
+  int dim = _bezier->getDim();
 
   int countP3 = 0, countJ2 = 0, countA = 0;
   for (int i = 0; i < ncoeff; i++) {
@@ -533,11 +309,16 @@ void MetricBasis::_fillInequalities(int metricOrder)
     }
   }
 
-  exp.resize(_jacobian->bezier->_exponents.size1(),
-             _jacobian->bezier->_exponents.size2());
-  for (int i = 0; i < _jacobian->bezier->_exponents.size1(); ++i) {
-    for (int j = 0; j < _jacobian->bezier->_exponents.size2(); ++j) {
-      exp(i, j) = static_cast<int>(_jacobian->bezier->_exponents(i, j) + .5);
+  if (_dim == 2) {
+    _lightenInequalities(countJ2, countP3, countA);
+    return;
+  }
+
+  exp.resize(_jacobian->getBezier()->_exponents.size1(),
+             _jacobian->getBezier()->_exponents.size2());
+  for (int i = 0; i < _jacobian->getBezier()->_exponents.size1(); ++i) {
+    for (int j = 0; j < _jacobian->getBezier()->_exponents.size2(); ++j) {
+      exp(i, j) = static_cast<int>(_jacobian->getBezier()->_exponents(i, j) + .5);
     }
   }
   int njac = _jacobian->getNumJacNodes();
@@ -576,10 +357,116 @@ void MetricBasis::_fillInequalities(int metricOrder)
   }
 
   _lightenInequalities(countJ2, countP3, countA);
+}
+
+void MetricBasis::_fillInequalitiesPyr(int metricOrder)
+{
+  fullMatrix<int> exp(_bezier->_exponents.size1(), _bezier->_exponents.size2());
+  for (int i = 0; i < _bezier->_exponents.size1(); ++i) {
+    for (int j = 0; j < _bezier->_exponents.size2(); ++j) {
+      exp(i, j) = static_cast<int>(_bezier->_exponents(i, j) + .5);
+    }
+  }
+
+  int ncoeff = _gradients->getNumSamplingPoints();
+
+  int countP3 = 0, countJ2 = 0, countA = 0;
+  for (int i = 0; i < ncoeff; i++) {
+    for (int j = i; j < ncoeff; j++) {
+      double num, den;
+      num = nChoosek(metricOrder+2, exp(i, 0))
+          * nChoosek(metricOrder+2, exp(i, 1))
+          * nChoosek(metricOrder  , exp(i, 2))
+          * nChoosek(metricOrder+2, exp(j, 0))
+          * nChoosek(metricOrder+2, exp(j, 1))
+          * nChoosek(metricOrder  , exp(j, 2));
+      den = nChoosek(2*metricOrder+4, exp(i, 0) + exp(j, 0))
+          * nChoosek(2*metricOrder+4, exp(i, 1) + exp(j, 1))
+          * nChoosek(2*metricOrder  , exp(i, 2) + exp(j, 2));
 
-  /*Msg::Info("A : %d / %d", countA, ncoeff*(ncoeff+1)/2);
-  Msg::Info("J2 : %d / %d", countJ2, njac*(njac+1)/2);
-  Msg::Info("P3 : %d / %d", countP3, ncoeff*(ncoeff+1)*(ncoeff+2)/6);*/
+      if (i != j) num *= 2;
+
+      ++countA;
+      int hash = 0;
+      for (int l = 0; l < 3; l++) {
+        hash += (exp(i, l)+exp(j, l)) * pow_int(2*metricOrder+1, l);
+      }
+      _ineqA[hash].push_back(IneqData(num/den, i, j));
+
+
+      for (int k = j; k < ncoeff; ++k) {
+        double num, den;
+        num = nChoosek(metricOrder+2, exp(i, 0))
+            * nChoosek(metricOrder+2, exp(i, 1))
+            * nChoosek(metricOrder  , exp(i, 2))
+            * nChoosek(metricOrder+2, exp(j, 0))
+            * nChoosek(metricOrder+2, exp(j, 1))
+            * nChoosek(metricOrder  , exp(j, 2))
+            * nChoosek(metricOrder+2, exp(k, 0))
+            * nChoosek(metricOrder+2, exp(k, 1))
+            * nChoosek(metricOrder  , exp(k, 2));
+        den = nChoosek(3*metricOrder+6, exp(i, 0) + exp(j, 0) + exp(k, 0))
+            * nChoosek(3*metricOrder+6, exp(i, 1) + exp(j, 1) + exp(k, 1))
+            * nChoosek(3*metricOrder  , exp(i, 2) + exp(j, 2) + exp(k, 2));
+
+        if (i == j) {
+          if (j != k) num *= 3;
+        }
+        else {
+          if (j == k || i == k) {
+            num *= 3;
+          }
+          else num *= 6;
+        }
+
+        ++countP3;
+        int hash = 0;
+        for (int l = 0; l < 3; l++) {
+          hash += (exp(i, l)+exp(j, l)+exp(k, l)) * pow_int(3*metricOrder+1, l);
+        }
+        if (j == k && j != i)
+          _ineqP3[hash].push_back(IneqData(num/den, k, j, i));
+        else
+          _ineqP3[hash].push_back(IneqData(num/den, i, j, k));
+      }
+    }
+  }
+
+  exp.resize(_jacobian->getBezier()->_exponents.size1(),
+             _jacobian->getBezier()->_exponents.size2());
+  for (int i = 0; i < _jacobian->getBezier()->_exponents.size1(); ++i) {
+    for (int j = 0; j < _jacobian->getBezier()->_exponents.size2(); ++j) {
+      exp(i, j) = static_cast<int>(_jacobian->getBezier()->_exponents(i, j) + .5);
+    }
+  }
+  int njac = _jacobian->getNumJacNodes();
+  for (int i = 0; i < njac; i++) {
+    for (int j = i; j < njac; j++) {
+      int order = metricOrder/2*3;
+
+      double num, den;
+      num = nChoosek(order+3, exp(i, 0))
+          * nChoosek(order+3, exp(i, 1))
+          * nChoosek(order  , exp(i, 2))
+          * nChoosek(order+3, exp(j, 0))
+          * nChoosek(order+3, exp(j, 1))
+          * nChoosek(order  , exp(j, 2));
+      den = nChoosek(2*order+6, exp(i, 0) + exp(j, 0))
+          * nChoosek(2*order+6, exp(i, 1) + exp(j, 1))
+          * nChoosek(2*order  , exp(i, 2) + exp(j, 2));
+
+      if (i != j) num *= 2;
+
+      ++countJ2;
+      int hash = 0;
+      for (int k = 0; k < 3; k++) {
+        hash += (exp(i, k)+exp(j, k)) * pow_int(2*order+1, k);
+      }
+      _ineqJ2[hash].push_back(IneqData(num/den, i, j));
+    }
+  }
+
+  _lightenInequalities(countJ2, countP3, countA);
 }
 
 void MetricBasis::_lightenInequalities(int &countj, int &countp, int &counta)
@@ -617,142 +504,369 @@ void MetricBasis::_lightenInequalities(int &countj, int &countp, int &counta)
   counta -= cnt[2];
 }
 
-void MetricBasis::interpolate(const MElement *el, const MetricData *md, const double *uvw, double *minmaxQ, bool write) const
+bool MetricBasis::validateBezierForMetricAndJacobian()
 {
-  if (minmaxQ == NULL) {
-    Msg::Error("Cannot write solution of interpolation");
-    return;
-  }
-
-  int order = _bezier->getOrder();
+  Msg::Info("Testing Bezier interpolation and subdivision "
+      "for jacobien and metric on all element types...");
+  int numError = 0;
+
+  // Parameters
+  const int numType = 6;
+  const int acceptedTypes[numType] = {TYPE_TRI, TYPE_QUA, TYPE_TET,
+                                      TYPE_PYR, TYPE_PRI, TYPE_HEX};
+  const int maxOrder = 3; // at least 3 (so that serendip tet are tested)
+  const int numElem = 5; // at least 2 (first is reference element)
+  const int numSubdiv = 2; // at least 1
+  const int numSampPnt = 10; // at least 1
+  const double toleranceTensor = 1e-11; // at most 1e-5 (metric takes values in [0,1])
+  double tolerance; // computed in function of tag
 
-  int dimSimplex = 0;
-  fullMatrix<double> exponents;
-  double bezuvw[3];
-  switch (el->getType()) {
-  case TYPE_PYR:
-    bezuvw[0] = .5 * (1 + uvw[0]);
-    bezuvw[1] = .5 * (1 + uvw[1]);
-    bezuvw[2] = uvw[2];
-    //_interpolateBezierPyramid(uvw, minmaxQ);
-    return;
+  //
+  static const double epsilon = std::numeric_limits<double>::epsilon();
 
-  case TYPE_HEX:
-    bezuvw[0] = .5 * (1 + uvw[0]);
-    bezuvw[1] = .5 * (1 + uvw[1]);
-    bezuvw[2] = .5 * (1 + uvw[2]);
-    dimSimplex = 0;
-    exponents = gmshGenerateMonomialsHexahedron(order);
-    break;
+  for (int tag = 1; tag <= MSH_NUM_TYPE; ++tag) {
+    if (tag > 66 && tag < 71) continue; //not conventional elements
+    if (tag > 75 && tag < 79) continue; //no element tag 76, 77, 78...
 
-  case TYPE_TET:
-    bezuvw[0] = uvw[0];
-    bezuvw[1] = uvw[1];
-    bezuvw[2] = uvw[2];
-    dimSimplex = 3;
-    exponents = gmshGenerateMonomialsTetrahedron(order);
-    break;
+    // Check if accepted type
+    const int type = ElementType::ParentTypeFromTag(tag);
+    bool knownType = false;
+    for (int i = 0; i < numType; ++i) {
+      knownType = (knownType || type == acceptedTypes[i]);
+    }
+    if (!knownType) continue;
+
+    const int order = ElementType::OrderFromTag(tag);
+    const int dim = ElementType::DimensionFromTag(tag);
+    const bool serendip = ElementType::SerendipityFromTag(tag) > 1;
+
+    // Skip p0 elements and elements for which order > 'maxOrder'
+    // and skip for now serendipty pyramids (not implemented)
+    if (order < 1 || order > maxOrder) continue;
+    if (type == TYPE_PYR && serendip) continue;
+
+    Msg::Info("... testing element tag %d", tag);
+
+    // Compute tolerance
+    tolerance = epsilon * pow_int(10, order*dim);
+    if (type == TYPE_PYR) tolerance = std::max(tolerance, epsilon*1e9);
+
+    // Get reference nodes
+    const nodalBasis *mapBasis = BasisFactory::getNodalBasis(tag);
+    fullMatrix<double> nodes;
+    mapBasis->getReferenceNodes(nodes);
+
+    // Create 'numElem' elements more and more randomized
+    for (int iel = 0; iel < numElem; ++iel) {
+      const double range = static_cast<double>(iel) / (numElem-1) / order;
+      std::vector<MVertex*> vertices(nodes.size1());
+      for (int i = 0; i < nodes.size1(); ++i) {
+        vertices[i] = new MVertex(nodes(i, 0) + symRand(range),
+                                  dim > 1 ? nodes(i, 1) + symRand(range) : 0,
+                                  dim > 2 ? nodes(i, 2) + symRand(range) : 0);
+      }
+      MElement *el = MElement::createElement(tag, vertices);
+      if (el != NULL) {
+        Msg::Error("MElement was unable to create element for tag %d", tag);
+        ++numError;
+      }
 
-  case TYPE_PRI:
-    bezuvw[0] = uvw[0];
-    bezuvw[1] = uvw[1];
-    bezuvw[2] = .5 * (1 + uvw[2]);
-    dimSimplex = 2;
-    exponents = gmshGenerateMonomialsPrism(order);
-    break;
+      numError += validateBezierForMetricAndJacobian(el, numSampPnt, numSubdiv,
+                                                     toleranceTensor, tolerance);
+    }
   }
 
-  int numCoeff = exponents.size1();
-  int dim = exponents.size2();
-
-  fullMatrix<double> metcoeffs = *md->_metcoeffs;
-  fullVector<double> jaccoeffs = *md->_jaccoeffs;
-
-  double *terms = new double[metcoeffs.size2()];
-  for (int t = 0; t < metcoeffs.size2(); ++t) {
-    terms[t] = 0;
-    for (int i = 0; i < numCoeff; i++) {
-      double dd = 1;
-      double pointCompl = 1.;
-      int exponentCompl = order;
-      for (int k = 0; k < dimSimplex; k++) {
-        dd *= nChoosek(exponentCompl, (int) exponents(i, k))
-          * pow(bezuvw[k], exponents(i, k));
-        pointCompl -= bezuvw[k];
-        exponentCompl -= (int) exponents(i, k);
-      }
-      dd *= pow(pointCompl, exponentCompl);
+  if (numError) Msg::Error("Validation of Bezier terminated with %d errors!", numError);
+  else Msg::Info("Validation of Bezier terminated without errors");
+  return numError;
+}
 
-      for (int k = dimSimplex; k < dim; k++)
-        dd *= nChoosek(order, (int) exponents(i, k))
-            * pow(bezuvw[k], exponents(i, k))
-            * pow(1. - bezuvw[k], order - exponents(i, k));
-      terms[t] += metcoeffs(i, t) * dd;
+int MetricBasis::validateBezierForMetricAndJacobian(MElement *el,
+                                                    int numSampPnt,
+                                                    int numSubdiv,
+                                                    double toleranceTensor,
+                                                    double tolerance)
+{
+  const int tag = el->getTypeForMSH();
+  const MetricBasis *metricBasis = BasisFactory::getMetricBasis(tag);
+
+  // compare the two metric
+  fullMatrix<double> metric_Bez(numSampPnt, 2);
+  fullVector<int> isub(numSubdiv);
+  fullMatrix<double> uvw(numSampPnt, 3);
+  metricBasis->interpolateAfterNSubdivisions(el, numSubdiv, numSampPnt,
+                                             isub, uvw, metric_Bez);
+
+  int numBadMatch = 0;
+  int numBadMatchTensor = 0;
+  double maxBadMatch = 0;
+  double maxBadMatchTensor = 0;
+  for (int isamp = 0; isamp < numSampPnt; ++isamp) {
+    double dum[3];
+    double &u = uvw(isamp, 0);
+    double &v = uvw(isamp, 1);
+    double &w = uvw(isamp, 2);
+    double metric_Lag = el->getEigenvaluesMetric(u, v, w, dum);
+
+    double diff = std::abs(metric_Lag - metric_Bez(isamp, 0));
+    double diffTensor = std::abs(metric_Lag - metric_Bez(isamp, 1));
+
+    if (diffTensor > toleranceTensor) {
+      ++numBadMatchTensor;
+      maxBadMatchTensor = std::max(maxBadMatchTensor, diffTensor);
+    }
+    else if (diff > tolerance) {
+      ++numBadMatch;
+      maxBadMatch = std::max(maxBadMatch, diff);
     }
   }
 
+  if (numBadMatchTensor > .2*numSampPnt) {
+    Msg::Error("Too much errors "
+        "even when computing by metric tensor (max %g)", maxBadMatchTensor);
+    return 1;
+  }
+  else if (numBadMatch > .5*numSampPnt) {
+    Msg::Error("Too much errors (max %g)", maxBadMatch);
+    return 1;
+  }
+  return 0;
+}
+
+void MetricBasis::interpolate(const MElement *el,
+                              const MetricData *md,
+                              const fullMatrix<double> &nodes,
+                              fullMatrix<double> &R) const
+{
+  fullMatrix<double> &metcoeffs = *md->_metcoeffs, *metric = new fullMatrix<double>;
+  fullVector<double> &jaccoeffs = *md->_jaccoeffs, *jac = new fullVector<double>;
+
+  _bezier->interpolate(metcoeffs, nodes, *metric);
+
+  R.resize(nodes.size1(), 2);
+
   switch (metcoeffs.size2()) {
   case 1:
-    minmaxQ[0] = terms[0];
-    minmaxQ[1] = terms[0];
+    for (int i = 0; i < R.size1(); ++i)
+      R(i, 0) = R(i, 1) = 1;
     break;
 
   case 3:
+    for (int i = 0; i < R.size1(); ++i) {
+      // Compute from q, p
+      double p = pow((*metric)(i, 1), 2);
+      p += pow((*metric)(i, 2), 2);
+      p = std::sqrt(p);
+      R(i, 0) = std::sqrt(_R2Dsafe((*metric)(i, 0), p));
+      // Comppute from tensor
+      fullMatrix<double> metricTensor(2, 2);
+      metricTensor(0, 0) = (*metric)(i, 0) + (*metric)(i, 1);
+      metricTensor(1, 1) = (*metric)(i, 0) - (*metric)(i, 1);
+      metricTensor(0, 1) = metricTensor(1, 0) = (*metric)(i, 2);
+      fullVector<double> valReal(2), valImag(2);
+      fullMatrix<double> vecLeft(2, 2), vecRight(2, 2);
+      metricTensor.eig(valReal, valImag, vecLeft, vecRight, true);
+      R(i, 1) = std::sqrt(valReal(0) / valReal(1));
+      }
+    break;
+
+  case 7:
+    _jacobian->getBezier()->interpolate(jaccoeffs, nodes, *jac);
+    for (int i = 0; i < R.size1(); ++i) {
+      // Compute from q, p, J
+      double p = 0;
+      for (int k = 1; k < 7; ++k) p += pow((*metric)(i, k), 2);
+      p = std::sqrt(p);
+      R(i, 0) = std::sqrt(_R3Dsafe((*metric)(i, 0), p, (*jac)(i)));
+      // Compute from tensor
+      fullMatrix<double> metricTensor(3, 3);
+      for (int k = 0; k < 3; ++k) {
+        static double fact1 = std::sqrt(6.);
+        static double fact2 = std::sqrt(3.);
+        const int ki = k%2;
+        const int kj = std::min(k+1, 2);
+        metricTensor(k, k) = (*metric)(i, k+1)*fact1 + (*metric)(i, 0);
+        metricTensor(ki, kj) = metricTensor(kj, ki) = (*metric)(i, k+4)*fact2;
+      }
+      fullVector<double> valReal(3), valImag(3);
+      fullMatrix<double> vecLeft(3, 3), vecRight(3, 3);
+      metricTensor.eig(valReal, valImag, vecLeft, vecRight, true);
+      R(i, 1) = std::sqrt(valReal(0) / valReal(2));
+    }
+    break;
+
+  default:
+    Msg::Error("Wrong number of functions for metric: %d",
+               metcoeffs.size2());
+  }
+
+  delete jac;
+  delete metric;
+}
+
+void MetricBasis::interpolateAfterNSubdivisions(
+    const MElement *el, int numSubdiv, int numPnt,
+    fullVector<int> &isub,
+    fullMatrix<double> &uvw,
+    fullMatrix<double> &metric) const
+{
+  // Interpolate metric after 'numSub' random subdivision at
+  //   'numPnt' random points.
+  // Return: isub, the subdomain tag of each subdivision,
+  //         uvw, the reference points at which metric has been interpolated.
+  //         metric, the interpolation.
+
+  MetricData *md;
+  _getMetricData(el, md);
+
+  // Keep trace of subdomain to be able to compute uvw.
+  // (Ensure to have the tag for the complete element):
+  const nodalBasis *mapBasis = BasisFactory::getNodalBasis(el->getTypeForMSH());
+  fullMatrix<double> nodes;
+  mapBasis->getReferenceNodesForBezier(nodes);
+
+  const int nSub = _bezier->getNumDivision();
+  const int numCoeff = md->_metcoeffs->size2();
+  const int numMetPnts = md->_metcoeffs->size1();
+  const int numJacPnts = md->haveJac() ? md->_jaccoeffs->size() : 0;
+  const int numNodPnts = nodes.size1();
+
+  const bezierBasis *bezierMapping;
+  if (el->getType() != TYPE_PYR)
+    bezierMapping = BasisFactory::getBezierBasis(el->getTypeForMSH());
+  else {
+    FuncSpaceData data(true, el->getTypeForMSH(), false,
+                       el->getPolynomialOrder(), el->getPolynomialOrder());
+    bezierMapping = BasisFactory::getBezierBasis(data);
+  }
+
+  for (int k = 0; k < numSubdiv; ++k) {
+    fullMatrix<double> subcoeffs, subnodes;
+    fullVector<double> subjac;
+    _bezier->subdivideBezCoeff(*md->_metcoeffs, subcoeffs);
+    bezierMapping->subdivideBezCoeff(nodes, subnodes);
+
+    if (_dim == 3)
+      _jacobian->getBezier()->subdivideBezCoeff(*md->_jaccoeffs, subjac);
+    delete md;
+
+    isub(k) = std::rand() % nSub;
+
+    fullMatrix<double> *coeff = new fullMatrix<double>(numMetPnts, numCoeff);
+    coeff->copy(subcoeffs, isub(k) * numMetPnts, numMetPnts, 0, numCoeff, 0, 0);
+    nodes.copy(subnodes, isub(k) * numNodPnts, numNodPnts, 0, _dim, 0, 0);
+    fullVector<double> *jac = NULL;
+    if (_dim == 3) {
+      jac = new fullVector<double>(numJacPnts);
+      jac->copy(subjac, isub(k) * numJacPnts, numJacPnts, 0);
+    }
+
+    md = new MetricData(coeff, jac);
+  }
+
+  // compute a random convex combination of reference nodes
+  fullMatrix<double> subuvw(uvw.size1(), _dim);
   {
-    double tmp = pow(terms[1], 2);
-    tmp += pow(terms[2], 2);
-    tmp = std::sqrt(tmp);
-    minmaxQ[0] = terms[0] - tmp;
-    minmaxQ[1] = terms[0] + tmp;
+    int tagPrimary = ElementType::getTag(el->getType(), 1);
+    const nodalBasis *primMapBasis = BasisFactory::getNodalBasis(tagPrimary);
+    fullMatrix<double> refNodes;
+    primMapBasis->getReferenceNodes(refNodes);
+    double *c = new double[refNodes.size1()];
+
+    for (int k = 0; k < uvw.size1(); ++k) {
+      double sum = 0;
+      int exp = 1 + std::rand() % 5;
+      for (int i = 0; i < refNodes.size1(); ++i) {
+        c[i] = pow_int((std::rand() % 1000) / 1000., exp);
+        sum += c[i];
+      }
+      for (int i = 0; i < refNodes.size1(); ++i) {
+        c[i] /= sum;
+        subuvw(k, 0) += c[i] * refNodes(i, 0);
+        if (_dim > 1) subuvw(k, 1) += c[i] * refNodes(i, 1);
+        if (_dim > 2) subuvw(k, 2) += c[i] * refNodes(i, 2);
+      }
+    }
+
+    delete[] c;
   }
-    break;
 
-  case 7:
-  {
-    double tmp = pow(terms[1], 2);
-    tmp += pow(terms[2], 2);
-    tmp += pow(terms[3], 2);
-    tmp += pow(terms[4], 2);
-    tmp += pow(terms[5], 2);
-    tmp += pow(terms[6], 2);
-    tmp = std::sqrt(tmp);
-    double factor = std::sqrt(6)/3;
-    if (tmp < 1e-3*terms[0]) {
-      minmaxQ[0] = terms[0] - factor * tmp;
-      minmaxQ[1] = terms[0] + factor * tmp;
-    }
-    else {
-      double phi;
-      //{
-        fullMatrix<double> nodes(1, 3);
-        nodes(0, 0) = uvw[0];
-        nodes(0, 1) = uvw[1];
-        nodes(0, 2) = uvw[2];
-
-        fullMatrix<double> result;
-        _jacobian->interpolate(jaccoeffs, nodes, result, true);
-        phi = result(0, 0)*result(0, 0);
-      //}
-      phi -= terms[0]*terms[0]*terms[0];
-      phi += .5*terms[0]*tmp*tmp;
-      phi /= tmp*tmp*tmp;
-      phi *= 3*std::sqrt(6);
-      if (phi >  1) phi =  1;
-      if (phi < -1) phi = -1;
-      phi = std::acos(phi)/3;
-      minmaxQ[0] = terms[0] + factor * tmp * std::cos(phi + 2*M_PI/3);
-      minmaxQ[1] = terms[0] + factor * tmp * std::cos(phi);
-      ((MetricBasis*)this)->file << terms[0] << " " << tmp/std::sqrt(6) << " " << result(0, 0) << std::endl;
+  interpolate(el, md, subuvw, metric);
+  bezierMapping->interpolate(nodes, subuvw, uvw, false);
+  delete md;
+}
+
+void MetricBasis::statsForMatlab(MElement *el, int deg, MetricData *md) const
+{
+  fullMatrix<double> samplingPoints;
+  bool serendip = false;
+  gmshGeneratePoints(FuncSpaceData(el, deg, &serendip), samplingPoints);
+
+  if (!md) _getMetricData(el, md);
+
+  static unsigned int aa = 0;
+  if (md->_num < 100 && ++aa < 200) {
+    std::stringstream name;
+    name << "metricStat_" << el->getNum() << "_";
+    name << (md->_num % 10);
+    name << (md->_num % 100)/10;
+    name << (md->_num % 1000)/100;
+    name << (md->_num % 10000)/1000;
+    name << (md->_num % 100000)/10000;
+    name << ".txt";
+    ((MetricBasis*)this)->file.open(name.str().c_str(), std::fstream::out);
+
+    {
+      int dim = el->getDim();
+      fullMatrix<double> *coeff = md->_metcoeffs;
+      fullVector<double> *jac = md->_jaccoeffs;
+
+      double mina, maxa, minK;
+      _minMaxA(*coeff, mina, maxa);
+
+      double dRda, term1, phip, beta;
+      double maxaPos, maxaNeg;
+      double maxKfast, maxKsharp;
+      if (dim == 3) {
+        _minK(*coeff, *jac, minK);
+        double tmpa = mina, tmpK = minK;
+        _computeTermBeta(tmpa, tmpK, dRda, term1, phip);
+        beta = -3 * mina*mina * term1 / dRda / 6;
+
+        _maxAstKneg(*coeff, *jac, minK, beta, maxaPos);
+        _maxAstKpos(*coeff, *jac, minK, beta, maxaNeg);
+
+        _maxKstAfast(*coeff, *jac, mina, beta, maxKfast);
+        _maxKstAsharp(*coeff, *jac, mina, beta, maxKsharp);
+      }
+      else {
+        minK = dRda = term1 = phip = beta = maxaPos = maxaNeg = maxKfast = maxKsharp = -1;
+      }
+
+      ((MetricBasis*)this)->file << mina << " " << maxa << " " << minK << " ";
+      ((MetricBasis*)this)->file << dRda << " " << term1 << " " << phip << " ";
+      ((MetricBasis*)this)->file << beta << " ";
+      ((MetricBasis*)this)->file << maxaPos << " " << maxaNeg << " ";
+      ((MetricBasis*)this)->file << maxKfast << " " << maxKsharp << std::endl;
     }
   }
-  break;
 
-  default:
-    Msg::Error("Wrong number of functions for metric: %d",
-               metcoeffs.size2());
+  fullMatrix<double> R;
+  interpolate(el, md, samplingPoints, R);
+
+  if (R.size1() < 1) {
+    ((MetricBasis*)this)->file << -1 << " ";
+    ((MetricBasis*)this)->file.close();
+    return;
   }
 
-  delete[] terms;
+  double min = R(0, 1);
+  for (int i = 1; i < R.size1(); ++i)
+    min = std::min(min, R(i, 1));
+
+  //((MetricBasis*)this)->file << min << " ";
+  ((MetricBasis*)this)->file.close();
+  return;
 }
 
 int MetricBasis::metricOrder(int tag)
@@ -766,12 +880,13 @@ int MetricBasis::metricOrder(int tag)
     case TYPE_LIN : return order;
 
     case TYPE_TRI :
-    case TYPE_TET : return 2*order-2;
+    case TYPE_TET :
+    case TYPE_PYR : return 2*order-2;
 
     case TYPE_QUA :
     case TYPE_PRI :
-    case TYPE_HEX :
-    case TYPE_PYR : return 2*order;
+    case TYPE_HEX : return 2*order;
+
     default :
       Msg::Error("Unknown element type %d, return order 0", parentType);
       return 0;
@@ -780,56 +895,23 @@ int MetricBasis::metricOrder(int tag)
 
 void MetricBasis::_computeRmin(
     const fullMatrix<double> &coeff, const fullVector<double> &jac,
-    double &RminLag, double &RminBez,
-    int depth, bool debug) const
+    double &RminLag, double &RminBez) const
 {
-  RminLag = 1.;
-
-  for (int i = 0; i < _bezier->getNumLagCoeff(); ++i) {
-    double q = coeff(i, 0);
-    double p = 0;
-    for (int k = 1; k < 7; ++k) {
-      p += pow_int(coeff(i, k), 2);
-    }
-    p = std::sqrt(p/6);
-    const double a = q/p;
-    if (a > 1e4) {
-      RminLag = std::min(RminLag, std::sqrt((a - std::sqrt(3)) / (a + std::sqrt(3))));
-    }
-    else {
-      const double x = .5 * (jac(i)/p/p*jac(i)/p - a*a*a + 3*a);
-      if (x >  1.1 || x < -1.1) {
-        if (!depth) {
-          Msg::Error("+ phi %g (jac %g, q %g, p %g)", x, jac(i), q, p);
-          Msg::Info("%g + %g - %g = %g", jac(i)*jac(i)/p/p/p, .5 * q/p, q*q*q/p/p/p, (jac(i)*jac(i)+.5 * q*p*p-q*q*q)/p/p/p);
-        }
-        else if (depth == 1)
-          Msg::Error("- phi %g @ %d(%d) (jac %g, q %g, p %g)", x, depth, i, jac(i), q, p);
-      }
+  RminLag = _computeMinlagR(jac, coeff, _bezier->getNumLagCoeff());
+  if (RminLag == 0) {
+    RminBez = 0;
+    return;
+  }
 
-      double tmpR;
-      if (x >=  1)
-        tmpR = (a - 1) / (a + 2);
-      else if (x <= -1)
-        tmpR = (a - 2) / (a + 1);
-      else {
-        const double phi = std::acos(x)/3;
-        tmpR = (a + 2*std::cos(phi + 2*M_PI/3)) / (a + 2*std::cos(phi));
-      }
-      if (tmpR < 0) {
-        if (tmpR < -1e-7) Msg::Fatal("3 s normal ? %g (%g, %g, %g) or (%g, %g)",
-            tmpR, p/std::sqrt(6), q, jac(i)*jac(i),
-            q/p*std::sqrt(6), jac(i)*jac(i)/p/p/p*6*std::sqrt(6));
-        else tmpR = 0;
-      }
-      RminLag = std::min(RminLag, std::sqrt(tmpR));
-    }
+  if (coeff.size2() == 3) { // 2d element
+    double mina, dummy;
+    _minMaxA(coeff, mina, dummy);
+    RminBez = std::sqrt(_R2Dsafe(mina));
+    return;
   }
 
-  //static int numtot = 0;
-  //++numtot;
   double minK;
-  _minJ2P3(coeff, jac, minK);
+  _minK(coeff, jac, minK);
   if (minK < 1e-10) {
     RminBez = 0;
     return;
@@ -883,11 +965,9 @@ void MetricBasis::_computeRmin(
       double am1 = std::pow(amApprox*amApprox*amApprox+da+.05, 1/3.);
       //double am0S = am0, am1S = am1;
       double am = (am0 + am1)/2;
-      double R0 = _Rsafe(am0, minK);
-      double R1 = _Rsafe(am1, minK);
-      double Rnew = _Rsafe(am, minK);
-      if (_chkaK(am0, minK)) Msg::Error("chk am0: %d (%g, %g)", _chkaK(am0, minK), am0, minK);
-      if (_chkaK(am1, minK)) Msg::Error("chk am1: %d (%g, %g)", _chkaK(am1, minK), am1, minK);
+      double R0 = _R3Dsafe(am0, minK);
+      double R1 = _R3Dsafe(am1, minK);
+      double Rnew = _R3Dsafe(am, minK);
 
       int cnt = 0;
       while (std::abs(R0-Rnew) > _tol*.01 || std::abs(R1-Rnew) > _tol*.01) {
@@ -901,64 +981,18 @@ void MetricBasis::_computeRmin(
           R1 = Rnew;
         }
         am = (am0 + am1)/2;
-        Rnew = _Rsafe(am, minK);
+        Rnew = _R3Dsafe(am, minK);
       }
-      /*static int maxcnt = 0, numcnt = 0, totcnt = 0;
-      ++numcnt;
-      totcnt += cnt;
-      if (maxcnt < cnt) {
-        maxcnt = cnt;
-      }
-      Msg::Info("maxcnt %d (num %d/%d=%g average %g)", maxcnt, numcnt, numtot, (double)numcnt/numtot, (double)totcnt/numcnt);
-      double TESTdRda, dum0, dum1;
-      _computeTermBeta(am0, minK, TESTdRda, dum0, dum1);
-      if (TESTdRda > 1e12) Msg::Fatal("> 0 [%g %g %g] (%g, %g), %g -> [%g, %g] for el %d", R0, Rnew, R1, am, minK, amApprox, am0S, am1S, __curElem->getNum());
-      _computeTermBeta(am1, minK, TESTdRda, dum0, dum1);
-      if (TESTdRda < -1e12) Msg::Fatal("< 0 [%g %g %g] (%g, %g), %g -> [%g, %g] for el %d", R0, Rnew, R1, am, minK, amApprox, am0S, am1S, __curElem->getNum());*/
+
       if (am < maxa) {
-        RminBez = _Rsafe(am, minK);
-        //Msg::Info("cpt 1: %d (%g, %g, %g)", _chkaKR(am, minK, RminBez), am, minK, RminBez);
-        if (_chkaKR(am, minK, RminBez)) Msg::Error("cpt 1: %d (%g, %g, %g)", _chkaKR(am, minK, RminBez), am, minK, RminBez);
+        RminBez = _R3Dsafe(am, minK);
         RminBez = std::sqrt(RminBez);
         return;
       }
     }
 
-    RminBez = _Rsafe(maxa, minK);
-    //Msg::Info("cpt 2: %d (%g, %g, %g)", _chkaKR(maxa, minK, RminBez), maxa, minK, RminBez);
-    if (_chkaKR(maxa, minK, RminBez)) Msg::Error("cpt 2: %d (%g, %g, %g)", _chkaKR(maxa, minK, RminBez), maxa, minK, RminBez);
+    RminBez = _R3Dsafe(maxa, minK);
     RminBez = std::sqrt(RminBez);
-
-    /*double RminBez0 = (mina+2*std::cos(phip+M_PI/3))/(mina+2*std::cos(phip-M_PI/3));
-    RminBez0 = std::sqrt(RminBez0);
-    double curmina = mina;
-    double curmaxa = maxa;
-      //Msg::Info(" ");
-    while (std::min(RminLag, RminBez0)-RminBez > MetricBasis::_tol) {
-      //Msg::Info("%g vs %g", RminBez0, RminBez);
-      double a = (curmina + curmaxa) / 2;
-      double newa = curmina;
-      while (newa < a) {
-        _computeTermBeta(a, minK, dRda, term1, phip, sqrt);
-        beta = -3 * a*a * term1 / sqrt / dRda / 6;
-        if (beta*minK-a*a*a < 0)
-          _maxAstKneg(coeff, jac, minK, beta, newa);
-        else {
-          _maxAstKpos(coeff, jac, minK, beta, newa);
-          if (newa < am && beta*minK-newa*newa*newa < 0)
-            _maxAstKneg(coeff, jac, minK, beta, newa);
-        }
-        a = (curmina + a) / 2;
-      }
-      curmina = a;
-      curmaxa = newa;
-      phi = std::acos(.5*(minK-curmaxa*curmaxa*curmaxa+3*curmaxa))/3;
-      RminBez = (curmaxa+2*std::cos(phi+2*M_PI/3))/(curmaxa+2*std::cos(phi));
-      phi = std::acos(.5*(minK-curmina*curmina*curmina+3*curmina))/3;
-      RminBez0 = (curmina+2*std::cos(phi+2*M_PI/3))/(curmina+2*std::cos(phi));
-      RminBez = std::sqrt(RminBez);
-      RminBez0 = std::sqrt(RminBez0);
-    }*/
     return;
   }
   else if (term1 < 0) {
@@ -970,44 +1004,19 @@ void MetricBasis::_computeRmin(
     const double x = .5*(maxK-mina*mina*mina+3*mina);
     const double phimin = std::acos(-1/mina) - M_PI/3;
     double myphi;
-    int which = 0;
-    double tmpphi;
     if (std::abs(x) > 1) {
       myphi = phimin;
-      which = 2;
     }
     else {
       const double phimaxK = std::acos(x)/3;
-      tmpphi = phimaxK;
       myphi = std::max(phimin, phimaxK);
-      if (phimin > phimaxK)
-        which = 2;
-      else
-        which = 1;
     }
     RminBez = (mina+2*std::cos(myphi+2*M_PI/3))/(mina+2*std::cos(myphi));
-    //Msg::Info("cpt 3: %d", _chkaKR(mina, maxK, RminBez));
-    int check;
-    if (which == 1) {
-      check = _chkaKR(mina, maxK, RminBez);
-      if (check) {
-        Msg::Error("cpt 3.1: %d (%g, %g, %g)", check, mina, maxK, RminBez);
-        double Kphimin = 2 * std::cos(3*phimin) + mina*mina*mina - 3*mina;
-        Msg::Info("%g->%g %g->%g", maxK, tmpphi/M_PI, Kphimin, phimin/M_PI);
-      }
-    }
-    else {
-      double Kphimin = 2 * std::cos(3*phimin) + mina*mina*mina - 3*mina;
-      check = _chkaKR(mina, Kphimin, RminBez);
-      if (check) Msg::Error("cpt 3.2: %d (%g, %g, %g)", check, mina, Kphimin, RminBez);
-    }
     RminBez = std::sqrt(RminBez);
     return;
   }
   else {
     RminBez = (mina+2*std::cos(phip+M_PI/3))/(mina+2*std::cos(phip-M_PI/3));
-    //Msg::Info("cpt 4: %d", _chkaKR(mina, minK, RminBez));
-    if (_chkaKR(mina, minK, RminBez)) Msg::Error("cpt 4: %d (%g, %g, %g) dRda %g", _chkaKR(mina, minK, RminBez), mina, minK, RminBez, dRda);
     RminBez = std::sqrt(RminBez);
     return;
   }
@@ -1025,191 +1034,158 @@ void MetricBasis::_computeRmax(
     for (int k = 1; k < 7; ++k) {
       p += pow_int(coeff(i, k), 2);
     }
-    p = std::sqrt(p/6);
+    p = std::sqrt(p);
     const double a = q/p;
     if (a > 1e4) {
-      RmaxLag = std::max(RmaxLag, std::sqrt((a - std::sqrt(3)) / (a + std::sqrt(3))));
+      RmaxLag = std::max(RmaxLag, std::sqrt((a - std::sqrt(3.)) / (a + std::sqrt(3.))));
     }
     else {
-      const double x = .5 * (jac(i)/p/p*jac(i)/p - a*a*a + 3*a);
-
-      double tmpR;
-      if (x >=  1)
-        tmpR = (a - 1) / (a + 2);
-      else if (x <= -1)
-        tmpR = (a - 2) / (a + 1);
-      else {
-        const double phi = std::acos(x)/3;
-        tmpR = (a + 2*std::cos(phi + 2*M_PI/3)) / (a + 2*std::cos(phi));
-      }
-      if (tmpR < 0) {
-        if (tmpR < -1e-7) Msg::Fatal("3 s normal ? %g (%g, %g, %g) or (%g, %g)",
-            tmpR, p/std::sqrt(6), q, jac(i)*jac(i),
-            q/p*std::sqrt(6), jac(i)*jac(i)/p/p/p*6*std::sqrt(6));
-        else tmpR = 0;
-      }
+      const double tmpR = _R3Dsafe(a, jac(i)/p/p*jac(i)/p);
       RmaxLag = std::max(RmaxLag, std::sqrt(tmpR));
     }
   }
 }
 
-double MetricBasis::_subdivideForRmin(
-    MetricData *md, double RminLag, double tol, int which) const
+double MetricBasis::_subdivideForRmin(MetricData *md, double RminLag, double tol, MElement *el) const
 {
   std::priority_queue<MetricData*, std::vector<MetricData*>, lessMinB> subdomains;
+  const bool for3d = md->_jaccoeffs;
   const int numCoeff = md->_metcoeffs->size2();
   const int numMetPnts = md->_metcoeffs->size1();
-  const int numJacPnts = md->_jaccoeffs->size();
-  const int numSub = _jacobian->getNumDivisions();
+  const int numJacPnts = for3d ? md->_jaccoeffs->size() : 0;
+  const int numSub = _bezier->getNumDivision();
   subdomains.push(md);
 
-  static unsigned int aa = 200;
-  //bool write = false;
-  if (++aa < 200) {
-    getMinR(__curElem, md, 16);
-  }
-
   std::vector<fullVector<double>*> trash;
 
-  //Msg::Info("lagrange %g", RminLag);
-
   while (RminLag - subdomains.top()->_RminBez > tol && subdomains.size() < 25000) {
-    //Msg::Info("%g - %g > %g && %d < %d", RminLag, subdomains.top()->_RminBez, tol, subdomains.size(), pow_int(8,8));
     fullMatrix<double> *subcoeffs, *coeff;
-    fullVector<double> *subjac, *jac;
+    fullVector<double> *subjac, *jac = NULL;
 
     MetricData *current = subdomains.top();
     subcoeffs = new fullMatrix<double>(numSub*numMetPnts, numCoeff);
-    subjac = new fullVector<double>(numSub*numJacPnts);
     _bezier->subDivisor.mult(*current->_metcoeffs, *subcoeffs);
-    _jacobian->subdivideBezierCoeff(*current->_jaccoeffs, *subjac);
+    if (for3d) {
+      subjac = new fullVector<double>(numSub*numJacPnts);
+      _jacobian->getBezier()->subDivisor.mult(*current->_jaccoeffs, *subjac);
+    }
     int depth = current->_depth;
     int num = current->_num;
-      //Msg::Info("d %d RminBez %g / %g", depth, current->_RminBez, RminLag);
-
-    //Msg::Info("delete %d (%d)", current, depth);
-    //Msg::Info(" ");
     delete current;
     subdomains.pop();
 
-    ++((MetricBasis*)this)->__numSubdivision;
-    ++((MetricBasis*)this)->__TotSubdivision;
-    ++((MetricBasis*)this)->__numSub[depth];
-    ((MetricBasis*)this)->__maxdepth = std::max(__maxdepth, depth+1);
-      //Msg::Info("subdividing %d", current);
-
     for (int i = 0; i < numSub; ++i) {
       coeff = new fullMatrix<double>(numMetPnts, numCoeff);
       coeff->copy(*subcoeffs, i * numMetPnts, numMetPnts, 0, numCoeff, 0, 0);
-      jac = new fullVector<double>;
-      jac->setAsProxy(*subjac, i * numJacPnts, numJacPnts);
+      if (for3d) {
+        jac = new fullVector<double>;
+        jac->setAsProxy(*subjac, i * numJacPnts, numJacPnts);
+      }
       double minLag, minBez;
-      _computeRmin(*coeff, *jac, minLag, minBez, depth+1);
-      //Msg::Info("new RminBez %g", minBez);
+      _computeRmin(*coeff, *jac, minLag, minBez);
       RminLag = std::min(RminLag, minLag);
       int newNum = num + (i+1) * pow_int(10, depth);
       MetricData *metData = new MetricData(coeff, jac, minBez, depth+1, newNum);
-
-      if (aa < 200) {
-        getMinR(__curElem, metData, 16);
-      }
-
-      //Msg::Info("    %g (%d)", minLag, metData);
-      //Msg::Info("+4 %d", metData);
+      //if (el) statsForMatlab(el, 20, metData);
       subdomains.push(metData);
     }
-    trash.push_back(subjac);
+    if (for3d) trash.push_back(subjac);
     delete subcoeffs;
-
-    /*for (unsigned int i = 0; i < vect.size(); ++i) {
-      Msg::Info("v %g", vect[i]->_RminBez);
-    }
-    Msg::Info("top %g (RminLag %g)", subdomains.top()->_RminBez, RminLag);
-    return 0;*/
-    //Msg::Info("RminLag %g - RminBez %g  @ %d", RminLag, subdomains.top()->_RminBez, subdomains.top()->_depth);
   }
-  //Msg::Info("%g - %g = %g >? %g", RminLag, subdomains.top()->_RminBez, RminLag - subdomains.top()->_RminBez, tol);
-  //Msg::Info("%d <? %d", subdomains.size(), 25000);
-
-  md = subdomains.top();
-  double ans = md->_RminBez;
-  if (_chknumber(ans)) Msg::Error("ISNAN %d", subdomains.size());
 
+  double ans = subdomains.top()->_RminBez;
   while (subdomains.size()) {
     md = subdomains.top();
     subdomains.pop();
-    //Msg::Info("del %d", md);
-    //Msg::Info(" ");
     delete md;
   }
   for (unsigned int i = 0; i < trash.size(); ++i) {
     delete trash[i];
   }
 
-  //Msg::Info("bez%g lag%g", ans, RminLag);
   return ans;
 }
 
-void MetricBasis::_computeTermBeta(double &a, double &K,
-                                   double &dRda, double &term1,
-                                   double &phip) const
-{
-  double x0 = .5 * (K - a*a*a + 3*a);
-  double sin, sqrt;
-  if (x0 > 1) {
-    const double p = -3;
-    double q = -K + 2;
-    a = cubicCardanoRoot(p, q);
-
-    x0 = 1;
-    phip = M_PI / 3;
-    term1 = 1 + .5 * a;
-    sin = std::sqrt(3) / 2;
-    sqrt = 0;
-  }
-  else if (x0 < -1) {
-    K = -2 + a*a*a - 3*a;
-
-    x0 = -1;
-    phip = 2 * M_PI / 3;
-    term1 = 1 - .5 * a;
-    sin = std::sqrt(3) / 2;
-    sqrt = 0;
-  }
-  else {
-    phip = (std::acos(x0) + M_PI) / 3;
-    term1 = 1 + a * std::cos(phip);
-    sin = std::sin(phip);
-    sqrt = std::sqrt(1-x0*x0);
-  }
-  dRda = sin * sqrt + .5 * term1 * (1-a*a);
-}
-
-void MetricBasis::_getMetricData(MElement *el, MetricData *&md) const
+void MetricBasis::_getMetricData(const MElement *el, MetricData *&md) const
 {
   int nSampPnts = _gradients->getNumSamplingPoints();
   int nMapping = _gradients->getNumMapNodes();
+
+  // Nodes
   fullMatrix<double> nodes(nMapping, 3);
   el->getNodesCoord(nodes);
 
+  // Jacobian coefficients
+  fullVector<double> *jac = NULL;
+  if (_dim == 3) {
+    fullVector<double> jacLag(_jacobian->getNumJacNodes());
+    jac = new fullVector<double>(_jacobian->getNumJacNodes());
+    _jacobian->getSignedIdealJacobian(nodes, jacLag);
+    _jacobian->lag2Bez(jacLag, *jac);
+  }
+
   // Metric coefficients
   fullMatrix<double> metCoeffLag;
+  _fillCoeff<true>(el->getDim(), _gradients, nodes, metCoeffLag);
+  fullMatrix<double> *metCoeff;
+  metCoeff = new fullMatrix<double>(nSampPnts, metCoeffLag.size2());
+  _bezier->matrixLag2Bez.mult(metCoeffLag, *metCoeff);
+
+  md = new MetricData(metCoeff, jac, -1, 0, 0);
+}
+
+template<bool ideal>
+void MetricBasis::_fillCoeff(int dim, const GradientBasis *gradients,
+    const fullMatrix<double> &nodes, fullMatrix<double> &coeff)
+{
+  const int nSampPnts = gradients->getNumSamplingPoints();
 
-  switch (el->getDim()) {
+  switch (dim) {
   case 0 :
-    md = NULL;
     return;
   case 1 :
+    Msg::Fatal("Should not be here, metric for 1d not implemented");
+    break;
+
   case 2 :
-    Msg::Fatal("not implemented");
+    {
+      fullMatrix<double> dxydX(nSampPnts,3), dxydY(nSampPnts,3);
+      if (ideal)
+        gradients->getIdealGradientsFromNodes(nodes, &dxydX, &dxydY, NULL);
+      else
+        gradients->getGradientsFromNodes(nodes, &dxydX, &dxydY, NULL);
+
+      coeff.resize(nSampPnts, 3);
+      for (int i = 0; i < nSampPnts; i++) {
+        const double &dxdX = dxydX(i,0), &dydX = dxydX(i,1);
+        const double &dxdY = dxydY(i,0), &dydY = dxydY(i,1);
+        double dzdX, dzdY;
+        if (nodes.size2() > 2) {
+          dzdX = dxydX(i,2);
+          dzdY = dxydY(i,2);
+        }
+        else {
+          dzdX = 0;
+          dzdY = 0;
+        }
+        const double dvxdX = dxdX*dxdX + dydX*dydX + dzdX*dzdX;
+        const double dvxdY = dxdY*dxdY + dydY*dydY + dzdY*dzdY;
+        coeff(i, 0) = (dvxdX + dvxdY) / 2;
+        coeff(i, 1) = dvxdX - coeff(i, 0);
+        coeff(i, 2) = (dxdX*dxdY + dydX*dydY + dzdX*dzdY);
+      }
+    }
     break;
 
   case 3 :
     {
       fullMatrix<double> dxyzdX(nSampPnts,3), dxyzdY(nSampPnts,3), dxyzdZ(nSampPnts,3);
-      _gradients->getGradientsFromNodes(nodes, &dxyzdX, &dxyzdY, &dxyzdZ);
+      if (ideal)
+        gradients->getIdealGradientsFromNodes(nodes, &dxyzdX, &dxyzdY, &dxyzdZ);
+      else
+        gradients->getGradientsFromNodes(nodes, &dxyzdX, &dxyzdY, &dxyzdZ);
 
-      metCoeffLag.resize(nSampPnts, 7);
+      coeff.resize(nSampPnts, 7);
       for (int i = 0; i < nSampPnts; i++) {
         const double &dxdX = dxyzdX(i,0), &dydX = dxyzdX(i,1), &dzdX = dxyzdX(i,2);
         const double &dxdY = dxyzdY(i,0), &dydY = dxyzdY(i,1), &dzdY = dxyzdY(i,2);
@@ -1217,116 +1193,70 @@ void MetricBasis::_getMetricData(MElement *el, MetricData *&md) const
         const double dvxdX = dxdX*dxdX + dydX*dydX + dzdX*dzdX;
         const double dvxdY = dxdY*dxdY + dydY*dydY + dzdY*dzdY;
         const double dvxdZ = dxdZ*dxdZ + dydZ*dydZ + dzdZ*dzdZ;
-        metCoeffLag(i, 0) = (dvxdX + dvxdY + dvxdZ) / 3;
-        metCoeffLag(i, 1) = dvxdX - metCoeffLag(i, 0);
-        metCoeffLag(i, 2) = dvxdY - metCoeffLag(i, 0);
-        metCoeffLag(i, 3) = dvxdZ - metCoeffLag(i, 0);
-        const double fact = std::sqrt(2);
-        metCoeffLag(i, 4) = fact * (dxdX*dxdY + dydX*dydY + dzdX*dzdY);
-        metCoeffLag(i, 5) = fact * (dxdZ*dxdY + dydZ*dydY + dzdZ*dzdY);
-        metCoeffLag(i, 6) = fact * (dxdX*dxdZ + dydX*dydZ + dzdX*dzdZ);
+        coeff(i, 0) = (dvxdX + dvxdY + dvxdZ) / 3;
+        static double fact1 = 1./std::sqrt(6.);
+        static double fact2 = 1./std::sqrt(3.);
+        coeff(i, 1) = fact1 * (dvxdX - coeff(i, 0));
+        coeff(i, 2) = fact1 * (dvxdY - coeff(i, 0));
+        coeff(i, 3) = fact1 * (dvxdZ - coeff(i, 0));
+        coeff(i, 4) = fact2 * (dxdX*dxdY + dydX*dydY + dzdX*dzdY);
+        coeff(i, 5) = fact2 * (dxdZ*dxdY + dydZ*dydY + dzdZ*dzdY);
+        coeff(i, 6) = fact2 * (dxdX*dxdZ + dydX*dydZ + dzdX*dzdZ);
       }
     }
     break;
   }
-
-  fullMatrix<double> *metCoeff;
-  metCoeff = new fullMatrix<double>(nSampPnts, metCoeffLag.size2());
-  _bezier->matrixLag2Bez.mult(metCoeffLag, *metCoeff);
-
-  // Jacobian coefficients
-  fullVector<double> jacLag(_jacobian->getNumJacNodes());
-  fullVector<double> *jac = new fullVector<double>(_jacobian->getNumJacNodes());
-  _jacobian->getSignedJacobian(nodes, jacLag);
-  _jacobian->lag2Bez(jacLag, *jac);
-
-  md = new MetricData(metCoeff, jac, -1, 0, 0);
-}
-
-double MetricBasis::_minp2(const fullMatrix<double> &coeff) const
-{
-  double min = 1e10;
-  std::map<int, std::vector<IneqData> >::const_iterator it = _ineqA.begin();
-  while (it != _ineqA.end()) {
-    double val = 0;
-    for (unsigned int k = 0; k < it->second.size(); ++k) {
-      const int i = it->second[k].i;
-      const int j = it->second[k].j;
-      double tmp = 0;
-      for (int l = 1; l < 7; ++l) {
-        tmp += coeff(i, l) * coeff(j, l);
-      }
-      val += it->second[k].val * tmp;
-    }
-    min = std::min(val, min);
-    ++it;
-  }
-
-  return min > 0 ? std::sqrt(min/6) : 0;
 }
 
-double MetricBasis::_minp(const fullMatrix<double> &coeff) const
+double MetricBasis::_computeMinlagR(const fullVector<double> &jac,
+                                    const fullMatrix<double> &coeff, int num)
 {
-  fullMatrix<double> minmaxCoeff(2, 6);
-  for (int j = 0; j < 6; ++j) {
-    minmaxCoeff(0, j) = coeff(0, j+1);
-    minmaxCoeff(1, j) = coeff(0, j+1);
-  }
+  double Rmin = 1.;
 
-  for (int i = 1; i < coeff.size1(); ++i) {
-    for (int j = 0; j < 6; ++j) {
-      minmaxCoeff(0, j) = std::min(coeff(i, j+1), minmaxCoeff(0, j));
-      minmaxCoeff(1, j) = std::max(coeff(i, j+1), minmaxCoeff(1, j));
-    }
-  }
+  switch (coeff.size2()) {
+  case 7:
+    for (int i = 0; i < num; ++i) {
+      if (jac(i) <= 0.) return 0;
 
-  double ans = 0;
-  for (int j = 0; j < 6; ++j) {
-    if (minmaxCoeff(0, j) * minmaxCoeff(1, j) > 0) {
-      ans += minmaxCoeff(0, j) > 0 ?
-          pow_int(minmaxCoeff(0, j), 2) :
-          pow_int(minmaxCoeff(1, j), 2);
+      const double q = coeff(i, 0);
+      double p = 0;
+      for (int k = 1; k < 7; ++k) {
+        p += pow_int(coeff(i, k), 2);
+      }
+      p = std::sqrt(p);
+      const double a = q/p;
+      if (a > 1e4) { // TODO: from _tol ?
+        Rmin = std::min(Rmin, std::sqrt((a - std::sqrt(3.)) / (a + std::sqrt(3.))));
+      }
+      else {
+        const double tmpR = _R3Dsafe(a, jac(i)/p/p*jac(i)/p);
+        Rmin = std::min(Rmin, std::sqrt(tmpR));
+      }
     }
-  }
-  return std::sqrt(ans/6);
-}
-
-double MetricBasis::_minq(const fullMatrix<double> &coeff) const
-{
-  double ans = coeff(0, 0);
-  for (int i = 1; i < coeff.size1(); ++i) {
-    if (ans > coeff(i, 0)) ans = coeff(i, 0);
-  }
-  return ans;
-}
+    return Rmin;
 
-double MetricBasis::_maxp(const fullMatrix<double> &coeff) const
-{
-  double ans = 0;
-  for (int i = 0; i < coeff.size1(); ++i) {
-    double tmp = 0;
-    for (int j = 1; j < 7; ++j) {
-      tmp += pow_int(coeff(i, j), 2);
+  case 3:
+    for (int i = 0; i < num; ++i) {
+      const double &q = coeff(i, 0);
+      const double p = pow_int(coeff(i, 1), 2) + pow_int(coeff(i, 2), 2);
+      const double tmpR = _R2Dsafe(q, std::sqrt(p));
+      Rmin = std::min(Rmin, std::sqrt(tmpR));
     }
-    ans = std::max(ans, tmp);
-  }
-  return std::sqrt(ans/6);
-}
+    return Rmin;
 
-double MetricBasis::_maxq(const fullMatrix<double> &coeff) const
-{
-  double ans = coeff(0, 0);
-  for (int i = 1; i < coeff.size1(); ++i) {
-    if (ans < coeff(i, 0)) ans = coeff(i, 0);
+  default:
+    Msg::Error("coeff have not right number of column");
+    return -1;
   }
-  return ans;
 }
 
 void MetricBasis::_minMaxA(
     const fullMatrix<double> &coeff, double &min, double &max) const
 {
+  min = std::numeric_limits<double>::max();
   min = 1e10;
-  max = 0;
+  //max = 1; // max is not used actually
+  double minLowBound = -min;
   std::map<int, std::vector<IneqData> >::const_iterator it = _ineqA.begin();
   while (it != _ineqA.end()) {
     double num = 0;
@@ -1335,61 +1265,57 @@ void MetricBasis::_minMaxA(
       const int i = it->second[k].i;
       const int j = it->second[k].j;
       double tmp = 0;
-      for (int l = 1; l < 7; ++l) {
+      for (int l = 1; l < coeff.size2(); ++l) {
         tmp += coeff(i, l) * coeff(j, l);
       }
       den += it->second[k].val * tmp;
       num += it->second[k].val * coeff(i, 0) * coeff(j, 0);
     }
     double val = num/den;
-    min = std::min(val, min);
-    max = std::max(val, max);
+    if (num < 0) {
+      if (den > 0) {
+        _minA(coeff, min);
+        return;
+      }
+      minLowBound = std::max(val, minLowBound);
+    }
+    else if (den > 0) {
+      min = std::min(val, min);
+      //max = std::max(val, max);
+    }
     ++it;
   }
-  min *= 6;
-  max *= 6;
+
+  if (min < minLowBound) {
+    _minA(coeff, min);
+    return;
+  }
 
   min = min > 1 ? std::sqrt(min) : 1;
-  max = std::sqrt(max);
+  //max = std::sqrt(max);
 }
 
-void MetricBasis::_minMaxJacobianSqr(
-    const fullVector<double> &jac, double &min, double &max) const
+void MetricBasis::_minA(const fullMatrix<double> &coeff, double &mina) const
 {
-  static int a = 1;
-  if (++a == 1) {
-    for (int i = 1; i < jac.size(); ++i) {
-      Msg::Info("<%g>", jac(i));
-    }
-  }
-  min = max = jac(0);
-  for (int i = 1; i < jac.size(); ++i) {
-    if (min > jac(i)) min = jac(i);
-    if (max < jac(i)) max = jac(i);
-  }
-
-  if (a == 1) {
-      Msg::Info("%g %g", min, max);
+  double minq = coeff(0, 0);
+  for (int i = 1; i < coeff.size1(); ++i) {
+   if (minq > coeff(i, 0)) minq = coeff(i, 0);
   }
 
-  if (min*max < 0) {
-    max = max > -min ? max*max : min*min;
-    min = 0;
-  }
-  else {
-    if (max > 0) {
-      max = max*max;
-      min = min*min;
-    }
-    else {
-      double tmp = max;
-      max = min*min;
-      min = tmp*tmp;
+  double maxp = 0;
+  for (int i = 0; i < coeff.size1(); ++i) {
+    double tmp = 0;
+    for (int j = 1; j < 7; ++j) {
+      tmp += pow_int(coeff(i, j), 2);
     }
+    maxp = std::max(maxp, tmp);
   }
+
+  mina = minq/maxp;
+  if (mina < 1) mina = 1;
 }
 
-void MetricBasis::_minJ2P3(const fullMatrix<double> &coeff,
+void MetricBasis::_minK(const fullMatrix<double> &coeff,
     const fullVector<double> &jac, double &min) const
 {
   fullVector<double> r(coeff.size1());
@@ -1398,7 +1324,7 @@ void MetricBasis::_minJ2P3(const fullMatrix<double> &coeff,
     for (int l = 1; l < 7; ++l) {
       r(i) += coeff(i, l) * coeff(i, l);
     }
-    r(i) = std::sqrt(r(i)/6);
+    r(i) = std::sqrt(r(i));
   }
 
   min = 1e10;
@@ -1450,7 +1376,7 @@ void MetricBasis::_maxAstKpos(const fullMatrix<double> &coeff,
     for (int l = 1; l < 7; ++l) {
       P(i) += coeff(i, l) * coeff(i, l);
     }
-    P(i) = std::sqrt(P(i)/6);
+    P(i) = std::sqrt(P(i));
   }
 
   double min = 1e10;
@@ -1492,13 +1418,12 @@ void MetricBasis::_maxAstKneg(const fullMatrix<double> &coeff,
     for (int l = 1; l < 7; ++l) {
       P(i) += coeff(i, l) * coeff(i, l);
     }
-    P(i) = std::sqrt(P(i)/6);
+    P(i) = std::sqrt(P(i));
     for (int j = 0; j < coeff.size1(); ++j) {
       Q(i, j) = 0;
       for (int l = 1; l < 7; ++l) {
         Q(i, j) += coeff(i, l) * coeff(j, l);
       }
-      Q(i, j) /= 6;
     }
   }
 
@@ -1543,7 +1468,7 @@ void MetricBasis::_maxKstAfast(const fullMatrix<double> &coeff,
     for (int l = 1; l < 7; ++l) {
       r(i) += coeff(i, l) * coeff(i, l);
     }
-    r(i) = std::sqrt(r(i)/6);
+    r(i) = std::sqrt(r(i));
   }
 
   double min = 1e10;
@@ -1585,13 +1510,12 @@ void MetricBasis::_maxKstAsharp(const fullMatrix<double> &coeff,
     for (int l = 1; l < 7; ++l) {
       P(i) += coeff(i, l) * coeff(i, l);
     }
-    P(i) = std::sqrt(P(i)/6);
+    P(i) = std::sqrt(P(i));
     for (int j = 0; j < coeff.size1(); ++j) {
       Q(i, j) = 0;
       for (int l = 1; l < 7; ++l) {
         Q(i, j) += coeff(i, l) * coeff(j, l);
       }
-      Q(i, j) /= 6;
     }
   }
 
@@ -1626,3 +1550,89 @@ void MetricBasis::_maxKstAsharp(const fullMatrix<double> &coeff,
 
   maxK = 1/beta*(mina*mina*mina-min);
 }
+
+void MetricBasis::_computeTermBeta(double &a, double &K,
+                                   double &dRda, double &term1,
+                                   double &phip) const
+{
+  double x0 = .5 * (K - a*a*a + 3*a);
+  double sin, sqrt;
+  if (x0 > 1) {
+    const double p = -3;
+    double q = -K + 2;
+    a = cubicCardanoRoot(p, q);
+
+    x0 = 1;
+    phip = M_PI / 3;
+    term1 = 1 + .5 * a;
+    sin = std::sqrt(3.) / 2;
+    sqrt = 0;
+  }
+  else if (x0 < -1) {
+    K = -2 + a*a*a - 3*a;
+
+    x0 = -1;
+    phip = 2 * M_PI / 3;
+    term1 = 1 - .5 * a;
+    sin = std::sqrt(3.) / 2;
+    sqrt = 0;
+  }
+  else {
+    phip = (std::acos(x0) + M_PI) / 3;
+    term1 = 1 + a * std::cos(phip);
+    sin = std::sin(phip);
+    sqrt = std::sqrt(1-x0*x0);
+  }
+  dRda = sin * sqrt + .5 * term1 * (1-a*a);
+}
+
+double MetricBasis::_R3Dsafe(double q, double p, double J)
+{
+  if (q > 1e5*p) {
+    const double m = p*std::sqrt(3.)/q;
+    return (1-m) / (1+m);
+  }
+  const double a = q/p;
+  const double K = J*J/p/p/p;
+  return _R3Dsafe(a, K);
+}
+
+double MetricBasis::_R3Dsafe(double a, double K)
+{
+  const double x = .5 * (K + (3 - a*a)*a);
+  if (x > 1+1e-7 || x < -1-1e-7) {
+    Msg::Warning("x = %g (a,K) = (%g,%g)", x, a, K);
+  }
+
+  double ans;
+  if (x >= 1)       ans = (a - 1) / (a + 2);
+  else if (x <= -1) ans = (a - 2) / (a + 1);
+  else {
+    const double phi = std::acos(x) / 3;
+    ans = (a + 2*std::cos(phi + 2*M_PI/3)) / (a + 2*std::cos(phi));
+  }
+
+  if (ans < 0 || ans > 1) {
+    if (ans < 0) return 0;
+    else return 1;
+  }
+  return ans;
+}
+
+double MetricBasis::_R2Dsafe(double q, double p)
+{
+  if (q < 0 || p < 0 || p > q)
+    Msg::Error("wrong argument for 2d metric (%g, %g)", q, p);
+  return (q-p) / (q+p);
+}
+
+double MetricBasis::_R2Dsafe(double a)
+{
+  if (a < 1
+#if !defined(_MSC_VER)
+      || !std::isfinite(a)
+#endif
+      )
+    Msg::Error("wrong argument for 2d metric (%g)", a);
+  return (a - 1) / (a + 1);
+}
diff --git a/Numeric/MetricBasis.h b/Numeric/MetricBasis.h
index f1cf8e0..da4825f 100644
--- a/Numeric/MetricBasis.h
+++ b/Numeric/MetricBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,25 +6,22 @@
 #ifndef _METRIC_BASIS_H_
 #define _METRIC_BASIS_H_
 
-#include "MElement.h"
 #include "JacobianBasis.h"
 #include "fullMatrix.h"
 #include <fstream>
 #include <cmath>
+class MElement;
 
 class MetricBasis {
   friend class MetricCoefficient;
   friend class GMSH_AnalyseCurvedMeshPlugin;
+
 private:
   const JacobianBasis *_jacobian;
   const GradientBasis *_gradients;
   const bezierBasis *_bezier;
   static double _tol;
-  static int _which;
-
-  int __maxdepth, __numSubdivision, __TotSubdivision;
-  std::vector<int> __numSub;
-  MElement *__curElem;
+  const int _type, _dim;
 
   std::fstream file;
 
@@ -37,6 +34,8 @@ private:
     IneqData(double val, int i, int j, int k = -1) : i(i), j(j), k(k), val(val) {}
   };
 
+  std::map<int, std::vector<IneqData> > _ineqJ2, _ineqP3, _ineqA;
+
   class MetricData {
    public:
     fullMatrix<double> *_metcoeffs;
@@ -45,59 +44,87 @@ private:
     int _depth, _num;
 
    public:
-    MetricData(fullMatrix<double> *m, fullVector<double> *j, double r, int d, int num) :
+    MetricData(fullMatrix<double> *m, fullVector<double> *j,
+               double r = -1, int d = -1, int num = -1) :
       _metcoeffs(m), _jaccoeffs(j), _RminBez(r), _depth(d), _num(num) {}
     ~MetricData() {
       delete _metcoeffs;
       delete _jaccoeffs;
     }
-  };
 
-  std::map<int, std::vector<IneqData> > _ineqJ2, _ineqP3, _ineqA;
+    bool haveJac() {return _jaccoeffs != NULL;}
+  };
 
 public:
   MetricBasis(int elementTag);
 
   static void setTol(double tol) {_tol = tol;}
-  static double getTol() {return _tol;}
-  static void setWhich(int which) {_which = which;}
 
-  double getBoundRmin(MElement*, MetricData*&, fullMatrix<double>&);
-  double getMinR(MElement*, MetricData*&, int) const;
-  bool notStraight(MElement*, double &metric, int order) const;
+  const JacobianBasis* getJacobianForMetric() const {return _jacobian;}
+  const bezierBasis* getBezier() const {return _bezier;}
+  int getNumMetricNodes() const {return _gradients->getNumSamplingPoints();}
+
   static double boundMinR(MElement *el);
-  static double sampleR(MElement *el, int order);
-  //double getBoundRmin(int, MElement**, double*);
-  //static double boundRmin(int, MElement**, double*, bool sameType = false);
+  static double minSampledR(MElement *el, int order);
+  double getBoundMinR(MElement*) const;
+  double getMinSampledR(MElement*, int order) const;
 
-  void interpolate(const MElement*, const MetricData*, const double *uvw, double *minmaxQ, bool write = false) const;
+  static double minRCorner(MElement *el);
 
-  static int metricOrder(int tag);
-  void printTotSubdiv(double n) const {
-    Msg::Info("SUBDIV %d, %g", __TotSubdivision, __TotSubdivision/2776.);
+  template<bool ideal>
+  void getMetricCoeff(const fullMatrix<double> &nodes,
+                            fullMatrix<double> &coeff) const {
+    _fillCoeff<ideal>(_dim, _gradients, nodes, coeff);
   }
+  void lag2Bez(const fullMatrix<double> &metCoeffLag,
+                     fullMatrix<double> &metCoeffBez) const {
+    _bezier->matrixLag2Bez.mult(metCoeffLag, metCoeffBez);
+  }
+
+  static int metricOrder(int tag);
+
+public:
+  // Validation for computation of Bezier coefficients & subdivision
+  // of Jacobian determinant and Metric stuffs
+  static bool validateBezierForMetricAndJacobian();
+  static int validateBezierForMetricAndJacobian(MElement *el,
+                                                int numSampPnt,
+                                                int numSubdiv,
+                                                double toleranceTensor,
+                                                double tolerance);
+  void statsForMatlab(MElement *el, int deg, MetricData *md) const;
+  void interpolate(const MElement*, const MetricData*, const double *uvw, double *minmaxQ) const;
+  void interpolate(const MElement*, const MetricData*,
+                   const fullMatrix<double> &nodes, fullMatrix<double> &R) const;
+  void interpolateAfterNSubdivisions(const MElement *el,
+                                     int numSubdiv, int numPnt,
+                                     fullVector<int> &isub,
+                                     fullMatrix<double> &uvw,
+                                     fullMatrix<double> &metric) const;
 
 private:
   void _fillInequalities(int order);
+  void _fillInequalitiesPyr(int order);
   void _lightenInequalities(int&, int&, int&); //TODO change
 
   void _computeRmin(const fullMatrix<double>&, const fullVector<double>&,
-                    double &RminLag, double &RminBez, int depth, bool debug = false) const;
+                    double &RminLag, double &RminBez) const;
   void _computeRmax(const fullMatrix<double>&, const fullVector<double>&,
                     double &RmaxLag) const;
-  void _computeTermBeta(double &a, double &K, double &dRda,
-                        double &term1, double &phip) const;
-  void _getMetricData(MElement*, MetricData*&) const;
+  void _getMetricData(const MElement*, MetricData*&) const;
 
-  double _subdivideForRmin(MetricData*, double RminLag, double tol, int which) const;
+  double _subdivideForRmin(MetricData*, double RminLag, double tol, MElement *el=NULL) const;
+  template<bool ideal>
+  static void _fillCoeff(int dim, const GradientBasis*,
+                  const fullMatrix<double> &nodes, fullMatrix<double> &coeff);
+  static double _computeMinlagR(const fullVector<double> &jac,
+                                const fullMatrix<double> &coeff, int num);
 
-  double _minp(const fullMatrix<double>&) const;
-  double _minp2(const fullMatrix<double>&) const;
-  double _minq(const fullMatrix<double>&) const;
-  double _maxp(const fullMatrix<double>&) const;
-  double _maxq(const fullMatrix<double>&) const;
   void _minMaxA(const fullMatrix<double>&, double &min, double &max) const;
-  void _minJ2P3(const fullMatrix<double>&, const fullVector<double>&, double &min) const;
+  void _minA(const fullMatrix<double>&, double &min) const;
+  void _minK(const fullMatrix<double>&, const fullVector<double>&, double &min) const;
+  void _computeTermBeta(double &a, double &K, double &dRda,
+                        double &term1, double &phip) const;
   void _maxAstKpos(const fullMatrix<double>&, const fullVector<double>&,
                  double minK, double beta, double &maxa) const;
   void _maxAstKneg(const fullMatrix<double>&, const fullVector<double>&,
@@ -106,40 +133,11 @@ private:
                  double mina, double beta, double &maxK) const;
   void _maxKstAsharp(const fullMatrix<double>&, const fullVector<double>&,
                  double mina, double beta, double &maxK) const;
-  void _minMaxJacobianSqr(const fullVector<double>&, double &min, double &max) const;
 
-  double _Rsafe(double a, double K) const {
-    const double x = .5 * (K - a*a*a + 3*a);
-    const double phi = std::acos(x) / 3;
-    return (a + 2*std::cos(phi + 2*M_PI/3)) / (a + 2*std::cos(phi));
-  }
-  bool _chknumber(double val) const {
-#if defined(_MSC_VER)
-    return _isnan(val) || !_finite(val);
-#else
-    return std::isnan(val) || std::isinf(val);
-#endif
-  }
-  bool _chka(double a) const {return _chknumber(a) || a < 1;}
-  bool _chkK(double K) const {return _chknumber(K) || K < 0;}
-  int _chkaK(double a, double K) const {
-    if (_chka(a)) return 1;
-    if (_chkK(K)) return 2;
-    if (std::abs(K - a*a*a + 3*a) > 2) {
-      Msg::Warning("x = %g", .5 * (K - a*a*a + 3*a));
-      return 3;
-    }
-    return 0;
-  }
-  bool _chkR(double R) const {return _chknumber(R) || R < 0 || R > 1;}
-  int _chkaKR(double a, double K, double R) const {
-    const int aK = _chkaK(a, K);
-    if (aK) return aK;
-    if (_chkR(R)) return 4;
-    const double myR = _Rsafe(a, K);
-    if (std::abs(myR-R) > 1e-10) return 5;
-    return 0;
-  }
+  static double _R3Dsafe(double a, double K);
+  static double _R3Dsafe(double q, double p, double J);
+  static double _R2Dsafe(double a);
+  static double _R2Dsafe(double q, double p);
 
 private:
   class gterIneq {
diff --git a/Numeric/Numeric.cpp b/Numeric/Numeric.cpp
index 4748ba7..784c023 100644
--- a/Numeric/Numeric.cpp
+++ b/Numeric/Numeric.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Numeric.h"
@@ -507,7 +508,6 @@ double ComputeScalarRep(int numComp, double *val)
 
 void eigenvalue2x2(double mat[2][2], double v[2])
 {
-
   double a=1;
   double b=-(mat[0][0]+mat[1][1]);
   double c= (mat[0][0]*mat[1][1])-(mat[0][1]*mat[1][0]);
@@ -516,7 +516,6 @@ void eigenvalue2x2(double mat[2][2], double v[2])
 
   v[0] = (-b+sqrt(det))/(2*a);
   v[1] = (-b-sqrt(det))/(2*a);
-
 }
 
 void eigenvalue(double mat[3][3], double v[3])
@@ -694,7 +693,7 @@ bool newton_fd(bool (*func)(fullVector<double> &, fullVector<double> &, void *),
       dx(0) = f(0) / J(0, 0);
     else
       if (!J.luSolve(f, dx))
-	return false;
+        return false;
 
     for (int i = 0; i < N; i++)
       x(i) -= relax * dx(i);
@@ -704,125 +703,10 @@ bool newton_fd(bool (*func)(fullVector<double> &, fullVector<double> &, void *),
   return false;
 }
 
-/*
-  min_a f(x+a*d);
-
-  f(x+a*d) = f(x) + f'(x) (
-
-*/
-
-void gmshLineSearch(double (*func)(fullVector<double> &, void *), void* data,
-                    fullVector<double> &x, fullVector<double> &p,
-                    fullVector<double> &g, double &f,
-                    double stpmax, int &check)
-{
-  int i;
-  double alam, alam2 = 1., alamin, f2 = 0., fold2 = 0., rhs1, rhs2, temp, tmplam = 0.;
-
-  const double ALF = 1.0e-4;
-  const double TOLX = 1.0e-9;
-
-  fullVector<double> xold(x);
-  const double fold = (*func)(xold, data);
-
-  check=0;
-  int n = x.size();
-  double norm = p.norm();
-  if (norm > stpmax) p.scale(stpmax / norm);
-  double slope=0.0;
-  for (i = 0; i < n; i++) slope += g(i)*p(i);
-  double test=0.0;
-  for (i = 0; i < n; i++) {
-    temp = fabs(p(i)) / std::max(fabs(xold(i)), 1.0);
-    if (temp > test) test = temp;
-  }
-  /*
-    for (int j=0;j<100;j++){
-    double sx = (double)j/99;
-    for (i=0;i<n;i++) x(i)=xold(i)+10*sx*p(i);
-    double jzede = (*func)(x,data);
-    }
-  */
-
-  alamin = TOLX / test;
-  alam = 1.0;
-  while(1) {
-    for (i = 0; i < n; i++) x(i) = xold(i) + alam*p(i);
-    f = (*func)(x, data);
-    //    printf("f = %g x = %g %g alam = %g p = %g %g\n",f,x(0),x(1),alam,p(0),p(1));
-    if (alam < alamin) {
-      for (i = 0; i <n; i++) x(i) = xold(i);
-      //      printf("ALERT : alam %g alamin %g\n",alam,alamin);
-      check = 1;
-      return;
-    }
-    else if (f <= fold + ALF * alam * slope) return;
-    else {
-      if (alam == 1.0)
-        tmplam = -slope / (2.0 * (f - fold - slope));
-      else {
-        rhs1 = f - fold - alam * slope;
-        rhs2 = f2 - fold2 - alam2 * slope;
-        const double a = (rhs1/(alam*alam)-rhs2/(alam2*alam2))/(alam-alam2);
-        const double b = (-alam2*rhs1/(alam*alam)+alam*rhs2/(alam2*alam2))/(alam-alam2);
-        if (a == 0.0) tmplam = -slope / (2.0 * b);
-        else {
-          const double disc = b*b-3.0*a*slope;
-          if (disc < 0.0) Msg::Error("Roundoff problem in gmshLineSearch.");
-          else tmplam = (-b+sqrt(disc))/(3.0*a);
-        }
-        if (tmplam > 0.5 * alam)
-          tmplam = 0.5 * alam;
-      }
-    }
-    alam2 = alam;
-    f2 = f;
-    fold2 = fold;
-    alam = std::max(tmplam, 0.1 * alam);
-  }
-}
-
-double minimize_grad_fd(double (*func)(fullVector<double> &, void *),
-                        fullVector<double> &x, void *data)
-{
-  const int MAXIT = 3;
-  const double EPS = 1.e-4;
-  const int N = x.size();
-
-  fullVector<double> grad(N);
-  fullVector<double> dir(N);
-  double f, feps;//, finit;
-
-  for (int iter = 0; iter < MAXIT; iter++){
-    // compute gradient of func
-    f = func(x, data);
-    //if (iter == 0) finit = f;
-    // printf("Opti iter %d x = (%g %g) f = %g\n",iter,x(0),x(1),f);
-    // printf("grad = (");
-    for (int j = 0; j < N; j++){
-      double h = EPS * fabs(x(j));
-      if(h == 0.) h = EPS;
-      x(j) += h;
-      feps = func(x, data);
-      grad(j) = (feps - f) / h;
-      // printf("%g ",grad(j));
-      dir(j) = -grad(j);
-      x(j) -= h;
-    }
-    // printf(")\n ");
-    // do a 1D line search to fine the minimum
-    // of f(x - \alpha \nabla f)
-    double f, stpmax=100000;
-    int check;
-    gmshLineSearch(func, data, x, dir, grad, f, stpmax, check);
-    // printf("Line search done x = (%g %g) f = %g\n",x(0),x(1),f);
-    if (check == 1) break;
-  }
-
-  return f;
-}
 
 /*
+  distance to triangle
+
   P(p) = p1 + t1 xi + t2 eta
 
   t1 = (p2-p1) ; t2 = (p3-p1) ;
@@ -830,7 +714,7 @@ double minimize_grad_fd(double (*func)(fullVector<double> &, void *),
   (P(p) - p) = d n
 
   (p1 + t1 xi + t2 eta - p) = d n
-  t1 xi + t2 eta + d n = p - p1
+  t1 xi + t2 eta - d n = p - p1
 
   | t1x t2x -nx | |xi  |   |px-p1x|
   | t1y t2y -ny | |eta | = |py-p1y|
@@ -849,9 +733,7 @@ double minimize_grad_fd(double (*func)(fullVector<double> &, void *),
 
 void signedDistancePointTriangle(const SPoint3 &p1,const SPoint3 &p2, const SPoint3 &p3,
 				 const SPoint3 &p, double &d, SPoint3 &closePt)
-
 {
-
   SVector3 t1 = p2 - p1;
   SVector3 t2 = p3 - p1;
   SVector3 t3 = p3 - p2;
@@ -873,9 +755,9 @@ void signedDistancePointTriangle(const SPoint3 &p1,const SPoint3 &p2, const SPoi
   v = (inv[1][0] * pp1.x() + inv[1][1] * pp1.y() + inv[1][2] * pp1.z());
   d = (inv[2][0] * pp1.x() + inv[2][1] * pp1.y() + inv[2][2] * pp1.z());
   double sign = (d > 0) ? 1. : -1.;
-  if (d == 0) sign = 1.e10;
-  if (u >= 0 && v >= 0 && 1.-u-v >= 0.0){
-    closePt = SPoint3(0.,0.,0.);//TO DO
+  if (d == 0.) sign = 1.e10;
+  if (u >= 0. && v >= 0. && 1.-u-v >= 0.0){ //P(p) inside triangle
+    closePt = p1 + (p2-p1)*u + (p3-p1)*v;
   }
   else {
     const double t12 = dot(pp1, t1) / n2t1;
@@ -883,7 +765,6 @@ void signedDistancePointTriangle(const SPoint3 &p1,const SPoint3 &p2, const SPoi
     SVector3 pp2 = p - p2;
     const double t23 = dot(pp2, t3) / n2t3;
     d = 1.e10;
-    SPoint3 closePt;
     if (t12 >= 0 && t12 <= 1.){
       d = sign * std::min(fabs(d), p.distance(p1 + (p2 - p1) * t12));
       closePt = p1 + (p2 - p1) * t12;
@@ -908,9 +789,9 @@ void signedDistancePointTriangle(const SPoint3 &p1,const SPoint3 &p2, const SPoi
       closePt = p3;
       d = sign * std::min(fabs(d), p.distance(p3));
     }
-   }
-
+  }
 }
+
 void signedDistancesPointsTriangle(std::vector<double> &distances,
                                    std::vector<SPoint3> &closePts,
                                    const std::vector<SPoint3> &pts,
@@ -997,8 +878,6 @@ void signedDistancesPointsTriangle(std::vector<double> &distances,
   }
 }
 
-
-
 void signedDistancePointLine(const SPoint3 &p1, const SPoint3 &p2, const SPoint3 &p,
                              double &d, SPoint3 &closePt)
 {
@@ -1154,9 +1033,9 @@ int computeDistanceRatio(const double &y, const double &yp, const double &x,
     }
     else{
       if (x == xp){
-	y1 = x1;
+        y1 = x1;
         y2 = x2;
-	x1 = -b;
+        x1 = -b;
         x2 = -b;
       }
       else{
@@ -1169,32 +1048,32 @@ int computeDistanceRatio(const double &y, const double &yp, const double &x,
         else{
           y1 = -(b + x1) / a;
           y2 = -(b + x2) / a;
-	}
+        }
       }
     }
     if (x1 == x2){
       propdist = (y1 - y) / (yp - y);
       if(propdist < 0.0){
-	propdist = (y2 - y) / (yp - y);
+        propdist = (y2 - y) / (yp - y);
       }
     }
     else{
       if (xp != x){
         propdist = (x1 - x) / (xp - x);
-	if (propdist < 0.0){
-	  propdist = (x2 - x) / (xp - x);
-	}
+        if (propdist < 0.0){
+          propdist = (x2 - x) / (xp - x);
+        }
       }
       else{
-	if (yp != y){
-	  propdist = (y1 - y) / (yp - y);
-	  if(propdist < 0.0){
-	    propdist = (y2 - y) / (yp - y);
-	  }
-	}
+        if (yp != y){
+          propdist = (y1 - y) / (yp - y);
+          if(propdist < 0.0){
+            propdist = (y2 - y) / (yp - y);
+          }
+        }
         else{
-	  propdist = 0.01;
-	}
+          propdist = 0.01;
+        }
       }
     }
     *distance = propdist;
@@ -1202,13 +1081,53 @@ int computeDistanceRatio(const double &y, const double &yp, const double &x,
   }
 }
 
+void signedDistancesPointsEllipsePoint(std::vector<double> &distances,
+                                      std::vector<double> &distancesE,
+                                      std::vector<int> &isInYarn,
+                                      std::vector<SPoint3> &closePts,
+                                      const std::vector<SPoint3> &pts,
+                                      const SPoint3 &p1,
+                                      const SPoint3 &p2,
+                                      const double radius)
+{
+  distances.clear();
+  distances.resize(pts.size());
+  distancesE.clear();
+  distancesE.resize(pts.size());
+  isInYarn.clear();
+  isInYarn.resize(pts.size());
+  closePts.clear();
+  closePts.resize(pts.size());
+  double d;
+  for (unsigned int i = 0; i < pts.size();i++){
+    SPoint3 closePt;
+    const SPoint3 &p = pts[i];
+    signedDistancePointLine(p1, p2, p, d, closePt);
+    closePts[i] = closePt;
+    distances[i] = d;
+    if (d <= radius){
+      isInYarn[i] = 1;
+      distancesE[i] = radius - d;
+    }
+    else{
+      isInYarn[i] = 0;
+      distancesE[i] = d - radius;
+    }
+  }
+}
+
 void signedDistancesPointsEllipseLine(std::vector<double>&distances,
                                       std::vector<double> &distancesE,
                                       std::vector<int>&isInYarn,
                                       std::vector<SPoint3>&closePts,
                                       const std::vector<SPoint3> &pts,
                                       const SPoint3 &p1,
-                                      const SPoint3 &p2)
+                                      const SPoint3 &p2,
+                                      const double maxA,
+                                      const double minA,
+                                      const double maxB,
+                                      const double minB,
+                                      const int typeLevelSet)
 {
   distances.clear();
   distances.resize(pts.size());
@@ -1229,37 +1148,127 @@ void signedDistancesPointsEllipseLine(std::vector<double>&distances,
     int direction=0;
     if (!(p.x()==closePt.x() && p.y()==closePt.y() && p.z()==closePt.z())){
       double xp,yp,x,y,otherp,other,propdist;
-      if (p1.x()==p2.x()){
-        direction=1;
-        if (fabs(closePt.x() - 0.0) < 0.00000001) isInYarn[i] = 1;
-        if (fabs(closePt.x() - 2.2) < 0.00000001) isInYarn[i] = 4;
-        if (fabs(closePt.x() - 4.4) < 0.00000001) isInYarn[i] = 2;
-        if (fabs(closePt.x() - 6.6) < 0.00000001) isInYarn[i] = 5;
-        if (fabs(closePt.x() - 8.8) < 0.00000001) isInYarn[i] = 3;
-	if (fabs(closePt.x() - 11.0) < 0.00000001) isInYarn[i] = 1;
+      if (typeLevelSet==2){
+        if (p1.x()==p2.x()){
+          direction=1;
+          if (fabs(closePt.x()-0.0)<0.00000001) isInYarn[i]=1;
+          if (fabs(closePt.x()-2.2)<0.00000001) isInYarn[i]=1;
+        }
+        else{
+          if (p1.y()==p2.y()){
+            direction=2;
+            if (fabs(closePt.y()-0.0)<0.00000001) isInYarn[i]=6;
+            if (fabs(closePt.y()-2.2)<0.00000001) isInYarn[i]=6;
+          }
+          else{
+            printf("Error %lf %lf\n",closePt.x(),closePt.y());
+          }
+        }
       }
-      else{
-        if (p1.y() == p2.y()){
-          direction = 2;
-	  if (fabs(closePt.y() - 0.0) < 0.00000001) isInYarn[i] = 6;
-	  if (fabs(closePt.y() - 2.2) < 0.00000001) isInYarn[i] = 7;
-	  if (fabs(closePt.y() - 4.4) < 0.00000001) isInYarn[i] = 8;
-	  if (fabs(closePt.y() - 6.6) < 0.00000001) isInYarn[i] = 9;
-	  if (fabs(closePt.y() - 8.8) < 0.00000001) isInYarn[i] = 10;
-	  if (fabs(closePt.y() - 11.0) < 0.00000001) isInYarn[i] = 6;
+      if (typeLevelSet==1){
+        if (p1.x()==p2.x()){
+          direction=1;
+          //if (fabs(closePt.x() - 0.0) < 0.00000001) isInYarn[i] = 1;
+          if (fabs(closePt.x() - 2.2) < 0.00000001) isInYarn[i] = 4;
+          //if (fabs(closePt.x() - 4.4) < 0.00000001) isInYarn[i] = 2;
+          //if (fabs(closePt.x() - 6.6) < 0.00000001) isInYarn[i] = 5;
+          //if (fabs(closePt.x() - 8.8) < 0.00000001) isInYarn[i] = 3;
+          //if (fabs(closePt.x() - 11.0) < 0.00000001) isInYarn[i] = 1;
         }
         else{
-	  printf("WTF %lf %lf\n", closePt.x(), closePt.y());
+          if (p1.y() == p2.y()){
+            direction = 2;
+            //if (fabs(closePt.y() - 0.0) < 0.00000001) isInYarn[i] = 6;
+            if (fabs(closePt.y() - 2.2) < 0.00000001) isInYarn[i] = 7;
+            //if (fabs(closePt.y() - 4.4) < 0.00000001) isInYarn[i] = 8;
+            //if (fabs(closePt.y() - 6.6) < 0.00000001) isInYarn[i] = 9;
+            //if (fabs(closePt.y() - 8.8) < 0.00000001) isInYarn[i] = 10;
+            //if (fabs(closePt.y() - 11.0) < 0.00000001) isInYarn[i] = 6;
+          }
+          else{
+            printf("Error %lf %lf\n", closePt.x(), closePt.y());
+          }
+        }
+      }
+      if (typeLevelSet==4){
+        if (p1.x()==p2.x()){
+          direction=1;
+          if (fabs(closePt.x()-0.0)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=1;
+          if (fabs(closePt.x()-2.2)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=4;
+          if (fabs(closePt.x()-4.4)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=2;
+          if (fabs(closePt.x()-6.6)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=5;
+          if (fabs(closePt.x()-8.8)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=3;
+          if (fabs(closePt.x()-11.0)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=1;
+          if (fabs(closePt.x()-0.0)<0.00000001 && closePt.z()>0.35) isInYarn[i]=11;
+          if (fabs(closePt.x()-2.2)<0.00000001 && closePt.z()>0.35) isInYarn[i]=14;
+          if (fabs(closePt.x()-4.4)<0.00000001 && closePt.z()>0.35) isInYarn[i]=12;
+          if (fabs(closePt.x()-6.6)<0.00000001 && closePt.z()>0.35) isInYarn[i]=15;
+          if (fabs(closePt.x()-8.8)<0.00000001 && closePt.z()>0.35) isInYarn[i]=13;
+          if (fabs(closePt.x()-11.0)<0.00000001 && closePt.z()>0.35) isInYarn[i]=11;
+        }
+        else{
+          if (p1.y()==p2.y()){
+            direction=2;
+            if (fabs(closePt.y()-0.0)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=6;
+            if (fabs(closePt.y()-2.2)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=7;
+            if (fabs(closePt.y()-4.4)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=8;
+            if (fabs(closePt.y()-6.6)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=9;
+            if (fabs(closePt.y()-8.8)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=10;
+            if (fabs(closePt.y()-11.0)<0.00000001 && closePt.z()<=0.35) isInYarn[i]=6;
+            if (fabs(closePt.y()-0.0)<0.00000001 && closePt.z()>0.35) isInYarn[i]=16;
+            if (fabs(closePt.y()-2.2)<0.00000001 && closePt.z()>0.35) isInYarn[i]=17;
+            if (fabs(closePt.y()-4.4)<0.00000001 && closePt.z()>0.35) isInYarn[i]=18;
+            if (fabs(closePt.y()-6.6)<0.00000001 && closePt.z()>0.35) isInYarn[i]=19;
+            if (fabs(closePt.y()-8.8)<0.00000001 && closePt.z()>0.35) isInYarn[i]=20;
+            if (fabs(closePt.y()-11.0)<0.00000001 && closePt.z()>0.35) isInYarn[i]=16;
+          }
+          else{
+            printf("Error %lf %lf\n",closePt.x(),closePt.y());
+          }
+        }
+      }
+      if (typeLevelSet==3){
+        direction=3;
+        isInYarn[i]=1;
+      }
+      if (typeLevelSet==5){
+        if(p1.x()==p2.x()){
+          direction=1;
+          if (fabs(closePt.x() - 0.0) < 0.00000001) isInYarn[i] = 1;
+          if (fabs(closePt.x() - 3.225) < 0.00000001) isInYarn[i] = 2;
+          if (fabs(closePt.x() - 6.45) < 0.00000001) isInYarn[i] = 3;
+          if (fabs(closePt.x() - 9.675) < 0.00000001) isInYarn[i] = 4;
+          if (fabs(closePt.x() - 12.9) < 0.00000001) isInYarn[i] = 1;
+        }
+        else{
+          if (p1.y()==p2.y()){
+            direction=2;
+            if (fabs(closePt.y() - 0.0) < 0.00000001) isInYarn[i] = 5;
+            if (fabs(closePt.y() - 1.665) < 0.00000001) isInYarn[i] = 6;
+            if (fabs(closePt.y() - 3.33) < 0.00000001) isInYarn[i] = 7;
+            if (fabs(closePt.y() - 4.995) < 0.00000001) isInYarn[i] = 8;
+            if (fabs(closePt.y() - 6.66) < 0.00000001) isInYarn[i] = 5;
+          }
+          else{
+            printf("Error %lf %lf\n",closePt.x(),closePt.y());
+          }
         }
       }
       changeReferential(direction, p, closePt, p1, p2, &xp, &yp,
                         &otherp, &x, &y, &other);
-      int result;
+      int result = 1;
       if (fabs(other-otherp) > 0.01){
-	result = 1;
+        result = 1;
       }
       else{
-        result = computeDistanceRatio(y, yp, x, xp, &propdist, 1.1, 0.0875);
+        if (direction==1){
+          result = computeDistanceRatio(y, yp, x, xp, &propdist, maxA, minA);
+        }
+        else{
+          if (direction==2){
+            result = computeDistanceRatio(y, yp, x, xp, &propdist, maxB, minB);
+          }
+        }
       }
       if (result == 1){
         distancesE[i] = 1.e10;
@@ -1271,7 +1280,7 @@ void signedDistancesPointsEllipseLine(std::vector<double>&distances,
           distancesE[i] = (1.0 / propdist) - 1.0;
         }
         else{
-	  distancesE[i] = (1.0 - (1.0 / propdist)) / 3.0;
+          distancesE[i] = (1.0 - (1.0 / propdist));
         }
       }
     }
@@ -1282,8 +1291,8 @@ void signedDistancesPointsEllipseLine(std::vector<double>&distances,
   }
 }
 
-int intersection_segments(const SPoint3 &p1, const SPoint3 &p2,
-                          const SPoint3 &q1, const SPoint3 &q2,
+int intersection_segments(const SPoint2 &p1, const SPoint2 &p2,
+                          const SPoint2 &q1, const SPoint2 &q2,
                           double x[2])
 {
   double xp_max = std::max(p1.x(), p2.x());
@@ -1308,10 +1317,68 @@ int intersection_segments(const SPoint3 &p1, const SPoint3 &p2,
     double b[2] = {q1.x() - p1.x(), q1.y() - p1.y()};
     sys2x2(A, b, x);
     return (x[0] >= 0.0 && x[0] <= 1. &&
-	    x[1] >= 0.0 && x[1] <= 1.);
+            x[1] >= 0.0 && x[1] <= 1.);
+  }
+}
+/// 3D VERSION
+int intersection_segments(const SPoint3 &p1, const SPoint3 &p2,
+                          const SPoint3 &q1, const SPoint3 &q2,
+                          double x[2])
+{
+  SVector3 v1(p2,p1),v2(q2,q1);
+  double n1 = v1.norm();
+  double n2 = v2.norm();
+  double EPS = 1.e-10*std::max(n1,n2);
+  double A[2][2];
+  A[0][0] = p2.x() - p1.x();
+  A[0][1] = q1.x() - q2.x();
+  A[1][0] = p2.y() - p1.y();
+  A[1][1] = q1.y() - q2.y();
+  double a[2] = {q1.x() - p1.x(), q1.y() - p1.y()};
+  double B[2][2];
+  B[0][0] = p2.z() - p1.z();
+  B[0][1] = q1.z() - q2.z();
+  B[1][0] = p2.y() - p1.y();
+  B[1][1] = q1.y() - q2.y();
+  double b[2] = {q1.z() - p1.z(), q1.y() - p1.y()};
+  double C[2][2];
+  C[0][0] = p2.z() - p1.z();
+  C[0][1] = q1.z() - q2.z();
+  C[1][0] = p2.x() - p1.x();
+  C[1][1] = q1.x() - q2.x();
+  double c[2] = {q1.z() - p1.z(), q1.x() - p1.x()};
+  double detA = fabs(det2x2(A));
+  double detB = fabs(det2x2(B));
+  double detC = fabs(det2x2(C));
+  //  printf("%12.5E %12.5E %12.5E\n",detA,detB,detC);
+  if (detA > detB && detA > detC)
+    sys2x2(A, a, x);
+  else if (detB > detA && detB > detC)
+    sys2x2(B, b, x);
+  else
+    sys2x2(C, c, x);
+  if(x[0] >= 0.0 && x[0] <= 1. &&
+     x[1] >= 0.0 && x[1] <= 1.) {
+
+    SPoint3 x1 (p1.x()*(1.-x[0]) + p2.x()*x[0],
+		p1.y()*(1.-x[0]) + p2.y()*x[0],
+		p1.z()*(1.-x[0]) + p2.z()*x[0]);
+    SPoint3 x2 (q1.x()*(1.-x[0]) + q2.x()*x[0],
+		q1.y()*(1.-x[0]) + q2.y()*x[0],
+		q1.z()*(1.-x[0]) + q2.z()*x[0]);
+
+    SVector3 d (x2,x1);
+    double nd = norm(d);
+    if (nd > EPS){
+      x[0] = x[1] = 1.e22;
+      return false;
+    }
+    return true;
   }
+  return false;
 }
 
+
 void computeMeanPlaneSimple(const std::vector<SPoint3> &points, mean_plane &meanPlane)
 {
   double xm = 0., ym = 0., zm = 0.;
@@ -1420,7 +1487,7 @@ void projectPointsToPlane(const std::vector<SPoint3> &pts, std::vector<SPoint3>
 
 void transformPointsIntoOrthoBasis(const std::vector<SPoint3> &ptsProj,
                                    std::vector<SPoint3> &pointsUV,
-				   const SPoint3 &ptCG, const mean_plane &meanPlane)
+                                   const SPoint3 &ptCG, const mean_plane &meanPlane)
 {
   pointsUV.resize(ptsProj.size());
   SVector3 normal(meanPlane.a, meanPlane.b, meanPlane.c);
diff --git a/Numeric/Numeric.h b/Numeric/Numeric.h
index bb05902..17aad6e 100644
--- a/Numeric/Numeric.h
+++ b/Numeric/Numeric.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,6 +9,7 @@
 #include <math.h>
 #include <vector>
 #include "fullMatrix.h"
+#include "SPoint2.h"
 #include "SPoint3.h"
 #include "SVector3.h"
 
@@ -108,8 +109,6 @@ double ComputeScalarRep(int numComp, double *val);
 void invert_singular_matrix3x3(double MM[3][3], double II[3][3]);
 bool newton_fd(bool (*func)(fullVector<double> &, fullVector<double> &, void *),
                fullVector<double> &x, void *data, double relax=1., double tolx=1.e-6);
-double minimize_grad_fd(double (*func)(fullVector<double> &, void *),
-                        fullVector<double> &x, void *data);
 
 void signedDistancePointTriangle(const SPoint3 &p1,const SPoint3 &p2, const SPoint3 &p3,
 				 const SPoint3 &p, double &d, SPoint3 &closePt);
@@ -135,16 +134,30 @@ int computeDistanceRatio(const double &y, const double &yp, const double &x,
                          const double &xp, double *distance, const double &r1,
                          const double &r2);
 
+void signedDistancesPointsEllipsePoint (std::vector<double>&distances,
+                                       std::vector<double>&distancesE,
+                                       std::vector<int>&isInYarn,
+                                       std::vector<SPoint3>&closePts,
+                                       const std::vector<SPoint3> &pts,
+                                       const SPoint3 &p1, const SPoint3 &p2,
+                                       const double radius);
+
 void signedDistancesPointsEllipseLine (std::vector<double>&distances,
                                        std::vector<double>&distancesE,
                                        std::vector<int>&isInYarn,
                                        std::vector<SPoint3>&closePts,
                                        const std::vector<SPoint3> &pts,
-                                       const SPoint3 &p1, const SPoint3 &p2);
+                                       const SPoint3 &p1, const SPoint3 &p2,
+                                       const double maxA, const double minA,
+                                       const double maxB, const double minB,
+                                       const int typeLevelSet);
 
 int intersection_segments (const SPoint3 &p1, const SPoint3 &p2,
 			   const SPoint3 &q1, const SPoint3 &q2,
 			   double x[2]);
+int intersection_segments (const SPoint2 &p1, const SPoint2 &p2,
+			   const SPoint2 &q1, const SPoint2 &q2,
+			   double x[2]);
 
 //tools for projection onto plane
 void computeMeanPlaneSimple(const std::vector<SPoint3> &points, mean_plane &meanPlane);
diff --git a/Numeric/approximationError.cpp b/Numeric/approximationError.cpp
new file mode 100644
index 0000000..92a1d29
--- /dev/null
+++ b/Numeric/approximationError.cpp
@@ -0,0 +1,32 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "approximationError.h"
+#include "MElement.h"
+
+double approximationError (simpleFunction<double> &f, MElement *e)
+{
+  std::vector<double> VALS(e->getNumVertices());
+  for (int i=0;i<e->getNumVertices();i++){
+    MVertex *v = e->getVertex(i);
+    VALS[i] = f(v->x(),v->y(),v->z());
+  }
+  int npts; IntPt *pts;
+  e->getIntegrationPoints (2*e->getPolynomialOrder() + 2 , &npts, &pts);
+  double errSqr = 0.0;
+  for (int k=0;k<npts;k++){
+    const double u = pts[k].pt[0];
+    const double v = pts[k].pt[1];
+    const double w = pts[k].pt[2];
+    SPoint3 p; e->pnt(u, v, w, p);
+    const double Jac = e->getJacobianDeterminant(u,v,w);
+    const double C = e->interpolate(&VALS[0],u,v,w);
+    const double F = f(p.x(),p.y(),p.z());
+    const double DIFF = C-F;
+    errSqr += pts[k].weight * Jac * (DIFF*DIFF);
+  }
+  return sqrt(errSqr);
+}
+
diff --git a/Numeric/approximationError.h b/Numeric/approximationError.h
new file mode 100644
index 0000000..d08db5c
--- /dev/null
+++ b/Numeric/approximationError.h
@@ -0,0 +1,19 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _APPROXIMATION_ERROR_
+#define _APPROXIMATION_ERROR_
+
+#include <map>
+#include "simpleFunction.h"
+
+class MElement;
+
+// computes E such as
+// E^2 = \int_e [C_e(f) - f]^2 de
+// where C_e(f) is clement's interpolation operator of f on e
+double approximationError(simpleFunction<double> &f, MElement *e);
+
+#endif
diff --git a/Numeric/bezierBasis.cpp b/Numeric/bezierBasis.cpp
index 0fd6fdb..ca19e34 100644
--- a/Numeric/bezierBasis.cpp
+++ b/Numeric/bezierBasis.cpp
@@ -1,9 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
-
+#include <algorithm>
 #include "GmshDefines.h"
 #include "GmshMessage.h"
 #include <vector>
@@ -223,14 +223,14 @@ std::vector< fullMatrix<double> > generateSubPointsHex(int order)
   return subPoints;
 }
 
-std::vector< fullMatrix<double> > generateSubPointsPyr(int order)
+std::vector< fullMatrix<double> > generateSubPointsPyr(int nij, int nk)
 {
-  if (order == 0) {
+  if (nk == 0) {
     std::vector< fullMatrix<double> > subPoints(4);
     fullMatrix<double> prox;
 
-    subPoints[0] = JacobianBasis::generateJacMonomialsPyramid(0);
-    subPoints[0].scale(.5/(order+2));
+    subPoints[0] = gmshGenerateMonomialsPyramidGeneral(false, nij, nk);
+    subPoints[0].scale(.5/nij);
 
     subPoints[1].copy(subPoints[0]);
     prox.setAsProxy(subPoints[1], 0, 1);
@@ -250,8 +250,11 @@ std::vector< fullMatrix<double> > generateSubPointsPyr(int order)
     std::vector< fullMatrix<double> > subPoints(8);
     fullMatrix<double> ref, prox;
 
-    subPoints[0] = JacobianBasis::generateJacMonomialsPyramid(order);
-    subPoints[0].scale(.5/(order+2));
+    subPoints[0] = gmshGenerateMonomialsPyramidGeneral(false, nij, nk);
+    prox.setAsProxy(subPoints[0], 2, 1);
+    prox.scale(-1);
+    prox.add(nk);
+    subPoints[0].scale(.5/std::max(nij,nk));
 
     subPoints[1].copy(subPoints[0]);
     prox.setAsProxy(subPoints[1], 0, 1);
@@ -281,13 +284,10 @@ std::vector< fullMatrix<double> > generateSubPointsPyr(int order)
     prox.setAsProxy(subPoints[7], 2, 1);
     prox.add(.5);
 
-    const int nPts = subPoints[0].size1();
     for (int i = 0; i < 8; ++i) {
-      for (int j = 0; j < nPts; ++j) {
-        const double factor = (1. - subPoints[i](j, 2));
-        subPoints[i](j, 0) = subPoints[i](j, 0) * factor;
-        subPoints[i](j, 1) = subPoints[i](j, 1) * factor;
-      }
+      prox.setAsProxy(subPoints[i], 2, 1);
+      prox.scale(-1);
+      prox.add(1);
     }
 
     return subPoints;
@@ -357,32 +357,33 @@ fullMatrix<double> generateBez2LagMatrix
 
 fullMatrix<double> generateBez2LagMatrixPyramid
   (const fullMatrix<double> &exponent, const fullMatrix<double> &point,
-   int order)
+   bool pyr, int nij, int nk)
 {
   if(exponent.size1() != point.size1() || exponent.size2() != point.size2() ||
       exponent.size2() != 3){
-    Msg::Fatal("Wrong sizes for bez2lag matrix generation %d %d -- %d %d",
-      exponent.size1(),point.size1(),
-      exponent.size2(),point.size2());
+    Msg::Fatal("Wrong sizes for pyramid's bez2lag matrix generation %d %d -- %d %d",
+      exponent.size1(), point.size1(),
+      exponent.size2(), point.size2());
     return fullMatrix<double>(1, 1);
   }
 
   const int ndofs = exponent.size1();
 
+  int n01 = nij;
   fullMatrix<double> bez2Lag(ndofs, ndofs);
   for (int i = 0; i < ndofs; i++) {
     for (int j = 0; j < ndofs; j++) {
-      double denom = 1. - point(i, 2);
+      if (pyr) n01 = exponent(j, 2) + nij;
       bez2Lag(i, j) =
-            nChoosek(order + 2, exponent(j, 0))
-          * nChoosek(order + 2, exponent(j, 1))
-          * nChoosek(order, exponent(j, 2))
-          * pow_int(point(i, 0) / denom, exponent(j, 0))
-          * pow_int(point(i, 1) / denom, exponent(j, 1))
-          * pow_int(point(i, 2)        , exponent(j, 2))
-          * pow_int(1. - point(i, 0) / denom, order + 2 - exponent(j, 0))
-          * pow_int(1. - point(i, 1) / denom, order + 2 - exponent(j, 1))
-          * pow_int(1. - point(i, 2)        , order     - exponent(j, 2));
+            nChoosek(n01, exponent(j, 0))
+          * nChoosek(n01, exponent(j, 1))
+          * nChoosek(nk , exponent(j, 2))
+          * pow_int(point(i, 0), exponent(j, 0))
+          * pow_int(point(i, 1), exponent(j, 1))
+          * pow_int(point(i, 2), exponent(j, 2))
+          * pow_int(1. - point(i, 0), n01 - exponent(j, 0))
+          * pow_int(1. - point(i, 1), n01 - exponent(j, 1))
+          * pow_int(1. - point(i, 2), nk  - exponent(j, 2));
     }
   }
   return bez2Lag;
@@ -416,7 +417,7 @@ fullMatrix<double> generateSubDivisor
 
 fullMatrix<double> generateSubDivisorPyramid
   (const fullMatrix<double> &exponents, const std::vector< fullMatrix<double> > &subPoints,
-   const fullMatrix<double> &lag2Bez, int order)
+   const fullMatrix<double> &lag2Bez, bool pyr, int nij, int nk)
 {
   if (exponents.size1() != lag2Bez.size1() || exponents.size1() != lag2Bez.size2()){
     Msg::Fatal("Wrong sizes for Bezier Divisor %d %d -- %d %d",
@@ -433,7 +434,8 @@ fullMatrix<double> generateSubDivisorPyramid
 
   for (unsigned int i = 0; i < subPoints.size(); i++) {
     fullMatrix<double> intermediate1 =
-      generateBez2LagMatrixPyramid(exponents, subPoints[i], order);
+      generateBez2LagMatrixPyramid(exponents, subPoints[i],
+                                   pyr, nij, nk);
     lag2Bez.mult(intermediate1, intermediate2);
     subDivisor.copy(intermediate2, 0, nbPts, 0, nbPts, i*nbPts, 0);
   }
@@ -441,56 +443,78 @@ fullMatrix<double> generateSubDivisorPyramid
 }
 }
 
-void bezierBasis::interpolate(const fullMatrix<double> &coeffs,
-                              const fullMatrix<double> &uvw,
-                              fullMatrix<double> &result,
-                              bool bezCoord) const
+void bezierBasis::generateBezierPoints(fullMatrix<double> &points) const
 {
-  result.resize(uvw.size1(), coeffs.size2());
-  int dimSimplex;
-  fullMatrix<double> bezuvw = uvw;
-  switch (type) {
-  case TYPE_HEX:
-    if (!bezCoord) {
-      bezuvw.add(1);
-      bezuvw.scale(.5);
-    }
-    dimSimplex = 0;
-    break;
+  gmshGenerateMonomials(_data, points);
+  points.scale(1./_data.spaceOrder());
+
+  if (_data.elementType() == TYPE_PYR && _data.nk() < _data.spaceOrder()) {
+    fullMatrix<double> prox;
+    prox.setAsProxy(points, 2, 1);
+    prox.add(1-static_cast<double>(_data.nk())/_data.spaceOrder());
+  }
+}
 
+void bezierBasis::_FEpoints2BezPoints(fullMatrix<double> &points) const
+{
+  switch (_data.elementType()) {
+  case TYPE_TRI:
   case TYPE_TET:
-    dimSimplex = 3;
+    break;
+
+  case TYPE_QUA:
+  case TYPE_HEX:
+    points.add(1);
+    points.scale(.5);
     break;
 
   case TYPE_PRI:
-    if (!bezCoord) {
+    {
       fullMatrix<double> tmp;
-      tmp.setAsProxy(bezuvw, 3, 1);
+      tmp.setAsProxy(points, 2, 1);
       tmp.add(1);
       tmp.scale(.5);
     }
-    dimSimplex = 2;
     break;
 
-  default:
   case TYPE_PYR:
-    Msg::Error("Bezier interpolation not implemented for type of element %d", type);
-    /*bezuvw[0] = .5 * (1 + uvw[0]);
-    bezuvw[1] = .5 * (1 + uvw[1]);
-    bezuvw[2] = uvw[2];
-    _interpolateBezierPyramid(uvw, minmaxQ);*/
+    for (int i = 0; i < points.size1(); ++i) {
+      points(i, 2) = 1. - points(i, 2);
+      points(i, 0) = .5 * (1 + points(i, 0) / points(i, 2));
+      points(i, 1) = .5 * (1 + points(i, 1) / points(i, 2));
+    }
+    break;
+
+  default:
+    Msg::Error("_FEpoints2BezPoints not implemented for "
+               "type of element %d", _data.elementType());
     return;
   }
+}
+
+void bezierBasis::interpolate(const fullMatrix<double> &coeffs,
+                              const fullMatrix<double> &uvw,
+                              fullMatrix<double> &result,
+                              bool bezCoord) const
+{
+  if (result.size1() != uvw.size1() || result.size2() != coeffs.size2())
+    result.resize(uvw.size1(), coeffs.size2());
 
-  int numCoeff = _exponents.size1();
+  fullMatrix<double> bezuvw = uvw;
+  if (!bezCoord) _FEpoints2BezPoints(bezuvw);
+
+  const int numCoeff = _exponents.size1();
+  const int dim = _exponents.size2();
+  int order[3];
 
   for (int m = 0; m < uvw.size1(); ++m) {
     for (int n = 0; n < coeffs.size2(); ++n) result(m, n) = 0;
     for (int i = 0; i < numCoeff; i++) {
+      _data.getOrderForBezier(order, _exponents(i, dim-1));
       double dd = 1;
       double pointCompl = 1.;
-      int exponentCompl = order;
-      for (int k = 0; k < dimSimplex; k++) {
+      int exponentCompl = order[0];
+      for (int k = 0; k < _dimSimplex; k++) {
         dd *= nChoosek(exponentCompl, (int) _exponents(i, k))
           * pow(bezuvw(m, k), _exponents(i, k));
         pointCompl -= bezuvw(m, k);
@@ -498,10 +522,10 @@ void bezierBasis::interpolate(const fullMatrix<double> &coeffs,
       }
       dd *= pow_int(pointCompl, exponentCompl);
 
-      for (int k = dimSimplex; k < dim; k++) {
-        dd *= nChoosek(order, (int) _exponents(i, k))
+      for (int k = _dimSimplex; k < dim; k++) {
+        dd *= nChoosek(order[k], (int) _exponents(i, k))
             * pow_int(bezuvw(m, k), _exponents(i, k))
-            * pow_int(1. - bezuvw(m, k), order - _exponents(i, k));
+            * pow_int(1. - bezuvw(m, k), order[k] - _exponents(i, k));
       }
       for (int n = 0; n < coeffs.size2(); ++n)
         result(m, n) += coeffs(i, n) * dd;
@@ -509,110 +533,138 @@ void bezierBasis::interpolate(const fullMatrix<double> &coeffs,
   }
 }
 
-void bezierBasis::_construct(int parentType, int p)
+void bezierBasis::lag2Bez(const fullMatrix<double> &lag,
+                          fullMatrix<double> &bez) const
 {
-  order = p;
-  type = parentType;
-  std::vector< fullMatrix<double> > subPoints;
+  if (lag.size1() != matrixLag2Bez.size1()) {
+    Msg::Error("matrix not the right size in lag2Bez function %d vs %d",
+        lag.size1(), matrixLag2Bez.size1());
+  }
+  if (bez.size1() != lag.size1() || bez.size2() != lag.size2()) {
+    bez.resize(lag.size1(), lag.size2());
+  }
+  matrixLag2Bez.mult(lag, bez);
+}
 
-  if (parentType == TYPE_PYR) {
-    dim = 3;
-    numLagCoeff = 8;
-    _exponents = JacobianBasis::generateJacMonomialsPyramid(order);
-
-    subPoints = generateSubPointsPyr(order);
-    numDivisions = static_cast<int>(subPoints.size());
-
-    fullMatrix<double> bezierPoints;
-    bezierPoints.resize(_exponents.size1(), _exponents.size2());
-    const double p = order + 2;
-    for (int i = 0; i < bezierPoints.size1(); ++i) {
-      bezierPoints(i, 2) = _exponents(i, 2) / p;
-      const double scale = 1. - bezierPoints(i, 2);
-      bezierPoints(i, 0) = _exponents(i, 0) / p * scale;
-      bezierPoints(i, 1) = _exponents(i, 1) / p * scale;
-    }
+void bezierBasis::subdivideBezCoeff(const fullMatrix<double> &coeff,
+                                    fullMatrix<double> &subCoeff) const
+{
+  if (subCoeff.size1() != subDivisor.size1()
+      || subCoeff.size2() != coeff.size2()  ) {
+    subCoeff.resize(subDivisor.size1(), coeff.size2());
+  }
+  subDivisor.mult(coeff, subCoeff);
+}
 
-    matrixBez2Lag = generateBez2LagMatrixPyramid(_exponents, bezierPoints, order);
-    matrixBez2Lag.invert(matrixLag2Bez);
-    subDivisor = generateSubDivisorPyramid(_exponents, subPoints, matrixLag2Bez, order);
-    return;
+void bezierBasis::subdivideBezCoeff(const fullVector<double> &coeff,
+                                    fullVector<double> &subCoeff) const
+{
+  if (subCoeff.size() != subDivisor.size1()) {
+    subCoeff.resize(subDivisor.size1());
+  }
+  subDivisor.mult(coeff, subCoeff);
+}
+
+void bezierBasis::_construct()
+{
+  if (_data.elementType() == TYPE_PYR) {
+    Msg::Fatal("This bezierBasis constructor is not for pyramids !");
   }
 
-  switch (parentType) {
+  std::vector< fullMatrix<double> > subPoints;
+  int order = _data.spaceOrder();
+
+  switch (_data.elementType()) {
     case TYPE_PNT :
-      dim = 0;
-      numLagCoeff = 1;
+      _numLagCoeff = 1;
       _dimSimplex = 0;
       _exponents = gmshGenerateMonomialsLine(0);
       subPoints.push_back(gmshGeneratePointsLine(0));
       break;
     case TYPE_LIN : {
-      dim = 1;
-      numLagCoeff = order == 0 ? 1 : 2;
+      _numLagCoeff = order ? 2 : 1;
       _dimSimplex = 0;
       _exponents = gmshGenerateMonomialsLine(order);
       subPoints = generateSubPointsLine(order);
       break;
     }
     case TYPE_TRI : {
-      dim = 2;
-      numLagCoeff = order == 0 ? 1 : 3;
+      _numLagCoeff = order ? 3 : 1;
       _dimSimplex = 2;
       _exponents = gmshGenerateMonomialsTriangle(order);
       subPoints = generateSubPointsTriangle(order);
       break;
     }
     case TYPE_QUA : {
-      dim = 2;
-      numLagCoeff = order == 0 ? 1 : 4;
+      _numLagCoeff = order ? 4 : 1;
       _dimSimplex = 0;
       _exponents = gmshGenerateMonomialsQuadrangle(order);
       subPoints = generateSubPointsQuad(order);
       break;
     }
     case TYPE_TET : {
-      dim = 3;
-      numLagCoeff = order == 0 ? 1 : 4;
+      _numLagCoeff = order ? 4 : 1;
       _dimSimplex = 3;
       _exponents = gmshGenerateMonomialsTetrahedron(order);
       subPoints = generateSubPointsTetrahedron(order);
       break;
     }
     case TYPE_PRI : {
-      dim = 3;
-      numLagCoeff = order == 0 ? 1 : 6;
+      _numLagCoeff = order ? 6 : 1;
       _dimSimplex = 2;
       _exponents = gmshGenerateMonomialsPrism(order);
       subPoints = generateSubPointsPrism(order);
       break;
     }
     case TYPE_HEX : {
-      dim = 3;
-      numLagCoeff = order == 0 ? 1 : 8;
+      _numLagCoeff = order ? 8 : 1;
       _dimSimplex = 0;
       _exponents = gmshGenerateMonomialsHexahedron(order);
       subPoints = generateSubPointsHex(order);
       break;
     }
     default : {
-      Msg::Error("Unknown function space of parentType %d : "
-          "reverting to TET_1", parentType);
-      dim = 3;
-      order = 0;
-      numLagCoeff = 4;
-      _dimSimplex = 3;
-      _exponents = gmshGenerateMonomialsTetrahedron(order);
-      subPoints = generateSubPointsTetrahedron(order);
-      break;
+      Msg::Fatal("Unknown function space for parentType %d", _data.elementType());
+      return;
     }
   }
-  numDivisions = static_cast<int>(subPoints.size());
+  _numDivisions = static_cast<int>(subPoints.size());
 
   fullMatrix<double> bezierPoints = _exponents;
-  bezierPoints.scale(1./order);
+  if (order) bezierPoints.scale(1./order);
 
   matrixBez2Lag = generateBez2LagMatrix(_exponents, bezierPoints, order, _dimSimplex);
   matrixBez2Lag.invert(matrixLag2Bez);
   subDivisor = generateSubDivisor(_exponents, subPoints, matrixLag2Bez, order, _dimSimplex);
 }
+
+void bezierBasis::_constructPyr()
+{
+  if (_data.elementType() != TYPE_PYR) {
+    Msg::Fatal("This bezierBasis constructor is for pyramids !");
+  }
+
+  const bool pyr = _data.isPyramidalSpace();
+  const int nij = _data.nij(), nk = _data.nk();
+
+  _numLagCoeff = nk == 0 ? 4 : 8;
+  _dimSimplex = 0;
+  gmshGenerateMonomials(_data, _exponents);
+
+  fullMatrix<double> bezierPoints;
+  generateBezierPoints(bezierPoints);
+  matrixBez2Lag = generateBez2LagMatrixPyramid(_exponents, bezierPoints,
+                                               pyr, nij, nk);
+  matrixBez2Lag.invert(matrixLag2Bez);
+  if (pyr) {
+    _numDivisions = 0;
+  }
+  else {
+    std::vector< fullMatrix<double> > subPoints;
+    subPoints = generateSubPointsPyr(nij, nk);
+    _numDivisions = static_cast<int>(subPoints.size());
+    subDivisor = generateSubDivisorPyramid(_exponents, subPoints, matrixLag2Bez,
+                                           pyr, nij, nk);
+  }
+  return;
+}
diff --git a/Numeric/bezierBasis.h b/Numeric/bezierBasis.h
index 257e54b..7a1f3bd 100644
--- a/Numeric/bezierBasis.h
+++ b/Numeric/bezierBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -10,17 +10,18 @@
 #include <vector>
 #include "fullMatrix.h"
 #include "ElementType.h"
+#include "FuncSpaceData.h"
 
 class MElement;
 
 class bezierBasis {
  private :
   // the 'numLagCoeff' first exponents are related to 'Lagrangian' values
-  int numLagCoeff;
-  int dim, type, order;
-  int numDivisions;
- public:
-  int _dimSimplex;
+  int _numLagCoeff;
+  int _numDivisions, _dimSimplex;
+  const FuncSpaceData _data;
+
+  friend class MetricBasis;
   fullMatrix<double> _exponents;
 
  public :
@@ -29,18 +30,32 @@ class bezierBasis {
   fullMatrix<double> subDivisor;
 
   // Constructors
-  inline bezierBasis(int tag) {
-    _construct(ElementType::ParentTypeFromTag(tag), ElementType::OrderFromTag(tag));
-  }
-  inline bezierBasis(int parendtType, int order) {
-    _construct(parendtType, order);
+  inline bezierBasis(FuncSpaceData data) : _data(data) {
+    if (_data.elementType() == TYPE_PYR)
+      _constructPyr();
+    else
+      _construct();
   }
 
   // get methods
-  inline int getDim() const {return dim;}
-  inline int getOrder() const {return order;}
-  inline int getNumLagCoeff() const {return numLagCoeff;}
-  inline int getNumDivision() const {return numDivisions;}
+  inline int getDim() const {return _exponents.size2();}
+  inline int getOrder() const {return _data.spaceOrder();}
+  inline int getDimSimplex() const {return _dimSimplex;}
+  inline int getNumLagCoeff() const {return _numLagCoeff;}
+  inline int getNumDivision() const {return _numDivisions;}
+  inline int getNumSubNodes() const {return subDivisor.size1();}
+
+  // generate Bezier points
+  void generateBezierPoints(fullMatrix<double>&) const;
+
+  // transform coeff Lagrange into Bezier coeff
+  void lag2Bez(const fullMatrix<double> &lag, fullMatrix<double> &bez) const;
+
+  // Subdivide Bezier coefficients
+  void subdivideBezCoeff(const fullMatrix<double> &coeff,
+                         fullMatrix<double> &subCoeff) const;
+  void subdivideBezCoeff(const fullVector<double> &coeff,
+                         fullVector<double> &subCoeff) const;
 
   // Interpolation of n functions on N points :
   // coeffs(numCoeff, n) and uvw(N, dim)
@@ -49,9 +64,21 @@ class bezierBasis {
                    const fullMatrix<double> &uvw,
                    fullMatrix<double> &result,
                    bool bezCoord = false) const;
+  void interpolate(const fullVector<double> &coeffs,
+                   const fullMatrix<double> &uvw,
+                   fullVector<double> &result,
+                   bool bezCoord = false) const {
+    int size = uvw.size1();
+    result.resize(size);
+    fullMatrix<double> c(const_cast<double*>(coeffs.getDataPtr()), size, 1);
+    fullMatrix<double> r(const_cast<double*>(result.getDataPtr()), size, 1);
+    interpolate(c, uvw, r, bezCoord);
+  }
 
  private :
-  void _construct(int parendtType, int order);
+  void _construct();
+  void _constructPyr();
+  void _FEpoints2BezPoints(fullMatrix<double>&) const;
 };
 
 #endif
diff --git a/Numeric/cartesian.h b/Numeric/cartesian.h
index 5ac13d2..593f8be 100644
--- a/Numeric/cartesian.h
+++ b/Numeric/cartesian.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/decasteljau.cpp b/Numeric/decasteljau.cpp
index 74cd872..942aa25 100644
--- a/Numeric/decasteljau.cpp
+++ b/Numeric/decasteljau.cpp
@@ -1,10 +1,11 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 //
 // Contributed by J. Lambrechts
 
+#include <algorithm>
 #include "decasteljau.h"
 #include "SPoint3.h"
 #include "SVector3.h"
diff --git a/Numeric/decasteljau.h b/Numeric/decasteljau.h
index b013592..b2dc2c7 100644
--- a/Numeric/decasteljau.h
+++ b/Numeric/decasteljau.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/discreteFrechetDistance.cpp b/Numeric/discreteFrechetDistance.cpp
index 94f4cad..919e56c 100644
--- a/Numeric/discreteFrechetDistance.cpp
+++ b/Numeric/discreteFrechetDistance.cpp
@@ -1,12 +1,14 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "discreteFrechetDistance.h"
 #include "fullMatrix.h"
 
-static double distance (const SPoint3 &p1, const SPoint3 &p2){
+static double distance (const SPoint3 &p1, const SPoint3 &p2)
+{
   return p1.distance(p2);
 }
 
diff --git a/Numeric/discreteFrechetDistance.h b/Numeric/discreteFrechetDistance.h
index 439b0c9..a4fadcd 100644
--- a/Numeric/discreteFrechetDistance.h
+++ b/Numeric/discreteFrechetDistance.h
@@ -1,7 +1,15 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _DISCRETE_FRECHET_DISTANCE_
 #define _DISCRETE_FRECHET_DISTANCE_
+
 #include <vector>
 #include "SPoint3.h"
-double discreteFrechetDistance (const std::vector<SPoint3> &P, 
+
+double discreteFrechetDistance (const std::vector<SPoint3> &P,
 				const std::vector<SPoint3> &Q);
+
 #endif
diff --git a/Numeric/fullMatrix.cpp b/Numeric/fullMatrix.cpp
index a7544b5..b8f9405 100644
--- a/Numeric/fullMatrix.cpp
+++ b/Numeric/fullMatrix.cpp
@@ -1,10 +1,11 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <complex>
 #include <string.h>
+#include <algorithm>
 #include "GmshConfig.h"
 #include "fullMatrix.h"
 #include "GmshMessage.h"
diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h
index e844ee7..e761840 100644
--- a/Numeric/fullMatrix.h
+++ b/Numeric/fullMatrix.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,10 +6,10 @@
 #ifndef _FULL_MATRIX_H_
 #define _FULL_MATRIX_H_
 
-#include <math.h>
-#include <stdio.h>
 #include "GmshConfig.h"
 #include "GmshMessage.h"
+#include <cmath>
+#include <cstdio>
 
 template <class scalar> class fullMatrix;
 
@@ -150,6 +150,12 @@ class fullVector
     return *this;
   }
 
+  void copy(const fullVector<scalar> &v, int i0, int ni, int desti0)
+  {
+    for(int i = i0, desti = desti0; i < i0 + ni; i++, desti++)
+      (*this)(desti) = v(i);
+  }
+
   // set
   /**
      @param r A vector index between 0 and size() - 1;
diff --git a/Numeric/hausdorffDistance.cpp b/Numeric/hausdorffDistance.cpp
index 0c7ba1a..0797b0d 100644
--- a/Numeric/hausdorffDistance.cpp
+++ b/Numeric/hausdorffDistance.cpp
@@ -1,8 +1,14 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 /*
-compute the hausdorff distance between two polygonal curves 
-in n*m time where n and m are the nb of points of the 
-polygonal curves
+  compute the hausdorff distance between two polygonal curves
+  in n*m time where n and m are the nb of points of the
+  polygonal curves
 */
+
 #include "SVector3.h"
 #include "hausdorffDistance.h"
 
@@ -20,7 +26,8 @@ static double intersect (SPoint3 &q, SVector3 &n, // a plane
   return t;
 }
 
-static double projection (SPoint3 &p1, SPoint3 &p2, SPoint3 &q, SPoint3 &result){
+static double projection (SPoint3 &p1, SPoint3 &p2, SPoint3 &q, SPoint3 &result)
+{
   // x = p1 + t (p2 - p1)
   // (x - q) * (p2 - p1) = 0
   // (p1 + t (p2 - p1) - q) (p2 - p1) = 0
@@ -29,18 +36,19 @@ static double projection (SPoint3 &p1, SPoint3 &p2, SPoint3 &q, SPoint3 &result)
   const double t = dot(q-p1,p21)/dot(p21,p21);
   result = p1 *(1.-t)+ p2*t;
   return t;
-}  
+}
 
-static SPoint3 closestPoint (SPoint3 &p1, SPoint3 &p2, SPoint3 &q){
+static SPoint3 closestPoint (SPoint3 &p1, SPoint3 &p2, SPoint3 &q)
+{
   double result;
   const double t = projection (p1,p2,q,result);
   if (t >= 0.0 && t <= 1.0)return result;
   if (t < 0)return p1;
   return p2;
-}  
-
+}
 
-double closestPoint (const std::vector<SPoint3> &P, const SPoint3 &p, SPoint3 & result){
+double closestPoint (const std::vector<SPoint3> &P, const SPoint3 &p, SPoint3 & result)
+{
   double closestDistance = 1.e22;
   for (unsigned int i=1;i<P.size();i++){
     SPoint3 q = closestPoint (P[i-1],P[i],p);
@@ -48,18 +56,19 @@ double closestPoint (const std::vector<SPoint3> &P, const SPoint3 &p, SPoint3 &
     if (pq < closestDistance){
       closestDistance = pq;
       result = q;
-    }   
+    }
   }
   return closestDistance;
-} 
+}
 
 // we test all points of P plus all points that are the intersections
 // of angle bissectors of Q with P
-double oneSidedHausdorffDistance (const std::vector<SPoint3> &P, 
-				  const std::vector<SPoint3> &Q, 
-				  SPoint3 &p1, SPoint3 &p2){
+double oneSidedHausdorffDistance (const std::vector<SPoint3> &P,
+				  const std::vector<SPoint3> &Q,
+				  SPoint3 &p1, SPoint3 &p2)
+{
   const double hausdorffDistance = 0.0;
-  
+
   // first test the points
   for (unsigned int i=0;i<P.size();i++){
     SPoint3 result;
@@ -92,7 +101,7 @@ double oneSidedHausdorffDistance (const std::vector<SPoint3> &P,
     for (unsigned int i=1;i<P.size();i++){
       SPoint3 result;
       const double t = intersect (b, n, P[i-1],P[i],result);
-      if (t >=0 && t <=1)intersections.push_back(result);	
+      if (t >=0 && t <=1)intersections.push_back(result);
     }
   }
 
@@ -108,8 +117,9 @@ double oneSidedHausdorffDistance (const std::vector<SPoint3> &P,
   return hausdorffDistance;
 }
 
-double hausdorffDistance (const std::vector<SPoint3> &P, 
-			  const std::vector<SPoint3> &Q){
+double hausdorffDistance (const std::vector<SPoint3> &P,
+			  const std::vector<SPoint3> &Q)
+{
   return std::max(oneSidedHausdorffDistance (P,Q),
-		  oneSidedHausdorffDistance (Q,P));  
+		  oneSidedHausdorffDistance (Q,P));
 }
diff --git a/Numeric/jacobiPolynomials.cpp b/Numeric/jacobiPolynomials.cpp
index 0f473a8..0b6ded6 100644
--- a/Numeric/jacobiPolynomials.cpp
+++ b/Numeric/jacobiPolynomials.cpp
@@ -1,13 +1,12 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
-#include "jacobiPolynomials.h"
+#include <algorithm>
 #include <cmath>
 #include <iostream>
-
-
+#include "jacobiPolynomials.h"
 
 inline double Pochhammer(double x,int n)
 {
@@ -16,17 +15,11 @@ inline double Pochhammer(double x,int n)
   return result;
 }
 
-
-
 JacobiPolynomials::JacobiPolynomials(double a, double b, int o):
   alpha(a),beta(b),n(o),alphaPlusBeta(a+b),a2MinusB2(a*a-b*b) {}
 
-
-
 JacobiPolynomials::~JacobiPolynomials() {;}
 
-
-
 void JacobiPolynomials::f(double u, double *val) const
 {
   val[0] = 1.;
@@ -43,15 +36,11 @@ void JacobiPolynomials::f(double u, double *val) const
     double a4i = 2.*(ii+alpha)*(ii+beta)*(twoI+alphaPlusBeta+2.);
 
     val[i+1] = ((a2i + a3i * u)* val[i] - a4i * val[i-1])/a1i;
-
   }
 }
 
-
-
 void JacobiPolynomials::df(double u, double *val) const
 {
-
   // Indeterminate form for u == -1 and u == 1
   // TODO: Extend to non-integer alpha & beta?
   if ((u == 1.) || (u == -1.)) {
@@ -71,7 +60,6 @@ void JacobiPolynomials::df(double u, double *val) const
     if ((u == -1.) && (n >= 2)) for (int k=2;k<=n;k+=2) val[k] = -val[k];
 
     return;
-
   }
 
   // Now general case
diff --git a/Numeric/jacobiPolynomials.h b/Numeric/jacobiPolynomials.h
index 9f63677..6901f7e 100644
--- a/Numeric/jacobiPolynomials.h
+++ b/Numeric/jacobiPolynomials.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/legendrePolynomials.cpp b/Numeric/legendrePolynomials.cpp
index ebdc625..0a93641 100644
--- a/Numeric/legendrePolynomials.cpp
+++ b/Numeric/legendrePolynomials.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/legendrePolynomials.h b/Numeric/legendrePolynomials.h
index 4cd446f..011e97b 100644
--- a/Numeric/legendrePolynomials.h
+++ b/Numeric/legendrePolynomials.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/mathEvaluator.cpp b/Numeric/mathEvaluator.cpp
index a3eef0d..cd0fd26 100644
--- a/Numeric/mathEvaluator.cpp
+++ b/Numeric/mathEvaluator.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/mathEvaluator.h b/Numeric/mathEvaluator.h
index e071050..ffdf86d 100644
--- a/Numeric/mathEvaluator.h
+++ b/Numeric/mathEvaluator.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/miniBasis.cpp b/Numeric/miniBasis.cpp
index b893ebc..ff7dd44 100644
--- a/Numeric/miniBasis.cpp
+++ b/Numeric/miniBasis.cpp
@@ -1,6 +1,12 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #include "miniBasis.h"
 #include "BasisFactory.h"
-miniBasis::miniBasis()
+
+miniBasisTri::miniBasisTri()
 {
   type = MSH_TRI_MINI;
   parentType = TYPE_TRI;
@@ -21,6 +27,20 @@ miniBasis::miniBasis()
   points(1, 0) = 1.; points(1, 1) = 0.;
   points(2, 0) = 0.; points(2, 1) = 1.;
   points(3, 0) = 1./3; points(3, 1) = 1./3;
+  /*
+  monomials :
+    0 : 1
+    1 : x
+    2 : y
+    3 : xy
+    4 : x²y
+    5 : xy²
+  fs :
+    0 : 1 -1 -1  0  0  0 : 1 - x - y
+    1 : 1  0  0  0  0  0 : x
+    2 : 0  1  0  0  0  0 : y
+    3 : 0  0  0  1 -1 -1 : xy - x²y - xy² = (1 - x - y) x y
+  */
   monomials.resize(6, 2);
   monomials(0, 0) = 0.; monomials(0, 1) = 0.;
   monomials(1, 0) = 1.; monomials(1, 1) = 0.;
@@ -33,5 +53,61 @@ miniBasis::miniBasis()
   coefficients(0, 0) = 1.; coefficients(0, 1) = -1.; coefficients(0, 2) = -1.;
   coefficients(1, 1) = 1.;
   coefficients(2, 2) = 1.;
-  coefficients(3, 3) = 1.; coefficients(3, 4) = -1.; coefficients(3, 5) = -1.; 
+  coefficients(3, 3) = 1.; coefficients(3, 4) = -1.; coefficients(3, 5) = -1.;
+}
+
+miniBasisTet::miniBasisTet()
+{
+  type = MSH_TET_MINI;
+  parentType = TYPE_TET;
+  order = 3;
+  dimension = 3;
+  numFaces = 4;
+  serendip = false;
+  const nodalBasis &p1 = *BasisFactory::getNodalBasis(MSH_TET_4);
+  closures = p1.closures;
+  fullClosures = p1.fullClosures;
+  for(size_t i = 0; i < fullClosures.size(); ++i) {
+    fullClosures[i].push_back(4);
+  }
+  closureRef = p1.closureRef;
+  points.resize(5, 3);
+  for (int i = 0; i < 4; ++i)
+    for (int j = 0; j < 3; ++j)
+      points(i, j) = p1.points(i, j);
+  points(4, 0) = points(4, 1) = points(4, 2) = 1./4;
+
+  /*
+  monomials :
+    0 : 1
+    1 : x
+    2 : y
+    3 : z
+    4 : xyz
+    5 : x²yz
+    6 : xy²z
+    7 : xyz²
+  sf :
+    0 : 1 -1 -1 -1  0  0  0  0 : 1 - x - y - z
+    1 : 0  1  0  0  0  0  0  0 : x
+    2 : 0  0  1  0  0  0  0  0 : y
+    3 : 0  0  0  1  0  0  0  0 : z
+    4 : 0  0  0  0  1 -1 -1 -1 : xyz - x²yz - xy²z - xyz² = (1 - x - y - z) x y z
+  */
+  monomials.resize(8, 3);
+  monomials(0, 0) = 0.; monomials(0, 1) = 0.; monomials(0, 2) = 0.;
+  monomials(1, 0) = 1.; monomials(1, 1) = 0.; monomials(1, 2) = 0.;
+  monomials(2, 0) = 0.; monomials(2, 1) = 1.; monomials(2, 2) = 0.;
+  monomials(3, 0) = 0.; monomials(3, 1) = 0.; monomials(3, 2) = 1.;
+  monomials(4, 0) = 1.; monomials(4, 1) = 1.; monomials(4, 2) = 1.;
+  monomials(5, 0) = 2.; monomials(5, 1) = 1.; monomials(5, 2) = 1.;
+  monomials(6, 0) = 1.; monomials(6, 1) = 2.; monomials(6, 2) = 1.;
+  monomials(7, 0) = 1.; monomials(7, 1) = 1.; monomials(7, 2) = 2.;
+  coefficients.resize(5, 8);
+  coefficients.setAll(0.);
+  coefficients(0, 0) = 1.; coefficients(0, 1) = -1.; coefficients(0, 2) = -1.; coefficients(0, 3) = -1.;
+  coefficients(1, 1) = 1.;
+  coefficients(2, 2) = 1.;
+  coefficients(3, 3) = 1.;
+  coefficients(4, 4) = 1.; coefficients(4, 5) = -1.; coefficients(4, 6) = -1.; coefficients(4, 7) = -1.;
 }
diff --git a/Numeric/miniBasis.h b/Numeric/miniBasis.h
index 631980a..79d8b93 100644
--- a/Numeric/miniBasis.h
+++ b/Numeric/miniBasis.h
@@ -1,8 +1,22 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _MINI_BASIS_H_
 #define _MINI_BASIS_H_
+
 #include "polynomialBasis.h"
-class miniBasis : public polynomialBasis { // mini is NOT a real nodal basis but in GMSH, only the nodal basis have closure and mini have closure so...
+// mini is NOT a real nodal basis but in GMSH, only the nodal basis have closure
+// and mini have closure so...
+
+class miniBasisTri : public polynomialBasis {
   public:
-    miniBasis();
+    miniBasisTri();
 };
+class miniBasisTet : public polynomialBasis {
+  public:
+    miniBasisTet();
+};
+
 #endif
diff --git a/Numeric/nodalBasis.cpp b/Numeric/nodalBasis.cpp
index d4fbbfe..a315dda 100644
--- a/Numeric/nodalBasis.cpp
+++ b/Numeric/nodalBasis.cpp
@@ -1,16 +1,15 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <limits>
 #include <cmath>
+#include <algorithm>
 #include "nodalBasis.h"
 #include "BasisFactory.h"
 #include "pointsGenerators.h"
 
-
-
 namespace ClosureGen {
   inline double pow2(double x)
   {
@@ -40,7 +39,8 @@ namespace ClosureGen {
     }
   }
 
-  void rotateHexFull(int iFace, int iRot, int iSign, double uI, double vI, double wI, double &uO, double &vO, double &wO)
+  void rotateHexFull(int iFace, int iRot, int iSign, double uI, double vI,
+                     double wI, double &uO, double &vO, double &wO)
   {
     switch (iFace) {
       case 0: uO = uI; vO = vI; wO = wI; break;
@@ -344,7 +344,8 @@ namespace ClosureGen {
                               bool serendip, const fullMatrix<double> &points)
   {
     closure.clear();
-    const nodalBasis &fsFace = *BasisFactory::getNodalBasis(ElementType::getTag(TYPE_QUA, order, serendip));
+    const nodalBasis &fsFace = *BasisFactory::getNodalBasis
+      (ElementType::getTag(TYPE_QUA, order, serendip));
     for (int iRotate = 0; iRotate < 4; iRotate++){
       for (int iSign = 1; iSign >= -1; iSign -= 2){
         for (int iFace = 0; iFace < 6; iFace++) {
@@ -647,3 +648,21 @@ nodalBasis::nodalBasis(int tag)
   }
 
 }
+
+void nodalBasis::getReferenceNodesForBezier(fullMatrix<double> &nodes) const
+{
+  if (parentType != TYPE_PYR && !serendip) {
+    nodes = points;
+  }
+  else {
+    const bool serendipSpace = false;
+    if (parentType != TYPE_PYR) {
+      FuncSpaceData data(true, type, order, &serendipSpace);
+      gmshGeneratePoints(data, nodes);
+    }
+    else {
+      FuncSpaceData data(true, type, false, order, order, &serendipSpace);
+      gmshGeneratePoints(data, nodes);
+    }
+  }
+}
diff --git a/Numeric/nodalBasis.h b/Numeric/nodalBasis.h
index 25b8556..b5466a6 100644
--- a/Numeric/nodalBasis.h
+++ b/Numeric/nodalBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,19 +15,23 @@ class nodalBasis {
   bool serendip;
   fullMatrix<double> points;
 
-  nodalBasis() {};
+  nodalBasis() {}
   nodalBasis(int tag);
   virtual ~nodalBasis() {}
 
   virtual int getNumShapeFunctions() const = 0;
+  void getReferenceNodes(fullMatrix<double> &nodes) const {
+    nodes = points;
+  }
+  void getReferenceNodesForBezier(fullMatrix<double> &nodes) const;
 
   // Basis functions & gradients evaluation
   virtual void f(double u, double v, double w, double *sf) const = 0;
   virtual void f(const fullMatrix<double> &coord, fullMatrix<double> &sf) const = 0;
   virtual void df(double u, double v, double w, double grads[][3]) const = 0;
   virtual void df(const fullMatrix<double> &coord, fullMatrix<double> &dfm) const = 0;
-  virtual void ddf(double u, double v, double w, double grads[][3][3]) const {Msg::Fatal("Not implemented");};
-  virtual void dddf(double u, double v, double w, double grads[][3][3][3]) const {Msg::Fatal("Not implemented");};
+  virtual void ddf(double u, double v, double w, double grads[][3][3]) const {Msg::Fatal("Not implemented");}
+  virtual void dddf(double u, double v, double w, double grads[][3][3][3]) const {Msg::Fatal("Not implemented");}
 
   // closures is the list of the nodes of each face, in the order of
   // the polynomialBasis of the face; fullClosures is mapping of the
@@ -50,27 +54,21 @@ class nodalBasis {
   virtual int getClosureType(int id) const { return closures[id].type; }
   virtual const std::vector<int> &getClosure(int id) const { return closures[id]; }
   virtual const std::vector<int> &getFullClosure(int id) const { return fullClosures[id]; }
-  inline int getClosureId(int iFace, int iSign=1, int iRot=0) const;
+  inline int getClosureId(int iFace, int iSign = 1, int iRot = 0) const;
   inline void breakClosureId(int i, int &iFace, int &iSign, int &iRot) const;
 };
 
-
-
 inline int nodalBasis::getClosureId(int iFace, int iSign, int iRot) const
 {
-  return iFace + numFaces*(iSign == 1 ? 0 : 1) + 2*numFaces*iRot;
+  return iFace + numFaces * (iSign == 1 ? 0 : 1) + 2 * numFaces * iRot;
 }
 
-
-
 inline void nodalBasis::breakClosureId(int i, int &iFace, int &iSign, int &iRot) const
 {
   iFace = i % numFaces;
-  i = (i - iFace)/numFaces;
+  i = (i - iFace) / numFaces;
   iSign = i % 2;
   iRot = (i - iSign) / 2;
 }
 
-
-
 #endif
diff --git a/Numeric/pointsGenerators.cpp b/Numeric/pointsGenerators.cpp
index d8e15c9..f0ac444 100644
--- a/Numeric/pointsGenerators.cpp
+++ b/Numeric/pointsGenerators.cpp
@@ -1,9 +1,10 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include "pointsGenerators.h"
+#include "GmshDefines.h"
 #include "MTriangle.h"
 #include "MQuadrangle.h"
 #include "MTetrahedron.h"
@@ -14,6 +15,48 @@
 
 // Points Generators
 
+void gmshGeneratePoints(FuncSpaceData data, fullMatrix<double> &points)
+{
+  switch (data.elementType()) {
+    case TYPE_PNT :
+      points = gmshGeneratePointsLine(0);
+      return;
+    case TYPE_LIN :
+      points = gmshGeneratePointsLine(data.spaceOrder());
+      return;
+    case TYPE_TRI :
+      points = gmshGeneratePointsTriangle(data.spaceOrder(),
+                                          data.spaceIsSerendipity());
+      return;
+    case TYPE_QUA :
+      points = gmshGeneratePointsQuadrangle(data.spaceOrder(),
+                                            data.spaceIsSerendipity());
+      return;
+    case TYPE_TET :
+      points = gmshGeneratePointsTetrahedron(data.spaceOrder(),
+                                             data.spaceIsSerendipity());
+      return;
+    case TYPE_PRI :
+      points = gmshGeneratePointsPrism(data.spaceOrder(),
+                                       data.spaceIsSerendipity());
+      return;
+    case TYPE_HEX :
+      points = gmshGeneratePointsHexahedron(data.spaceOrder(),
+                                            data.spaceIsSerendipity());
+      return;
+    case TYPE_PYR :
+      points = gmshGeneratePointsPyramidGeneral(data.isPyramidalSpace(),
+                                                data.nij(),
+                                                data.nk(),
+                                                data.spaceIsSerendipity());
+      return;
+    default :
+      Msg::Error("Unknown element type %d (tag %d) for points generation",
+          data.elementType(), data.elementTag());
+      return;
+  }
+}
+
 fullMatrix<double> gmshGeneratePointsLine(int order)
 {
   fullMatrix<double> points = gmshGenerateMonomialsLine(order);
@@ -89,7 +132,7 @@ fullMatrix<double> gmshGeneratePointsPyramid(int order, bool serendip)
   if (order == 0) return points;
 
   for (int i = 0; i < points.size1(); ++i) {
-    points(i, 2) = points(i, 2) / order;
+    points(i, 2) = 1 - points(i, 2) / order;
     const double duv = -1. + points(i, 2);
     points(i, 0) = duv + points(i, 0) * 2. / order;
     points(i, 1) = duv + points(i, 1) * 2. / order;
@@ -97,8 +140,67 @@ fullMatrix<double> gmshGeneratePointsPyramid(int order, bool serendip)
   return points;
 }
 
+fullMatrix<double> gmshGeneratePointsPyramidGeneral(bool pyr, int nij, int nk, bool forSerendipPoints)
+{
+  fullMatrix<double> points =
+      gmshGenerateMonomialsPyramidGeneral(pyr, nij, nk, forSerendipPoints);
+
+  if (points.size1() == 1) return points;
+
+  const int div = pyr ? nk+nij : std::max(nij, nk);
+  for (int i = 0; i < points.size1(); ++i) {
+    points(i, 2) = (nk - points(i, 2)) / div;
+    const double scale = 1. - points(i, 2);
+    points(i, 0) = scale * (-1 + points(i, 0) * 2. / div);
+    points(i, 1) = scale * (-1 + points(i, 1) * 2. / div);
+  }
+  return points;
+}
+
 // Monomials Generators
 
+void gmshGenerateMonomials(FuncSpaceData data, fullMatrix<double> &monomials)
+{
+  switch (data.elementType()) {
+    case TYPE_PNT :
+      monomials = gmshGenerateMonomialsLine(0);
+      return;
+    case TYPE_LIN :
+      monomials = gmshGenerateMonomialsLine(data.spaceOrder());
+      return;
+    case TYPE_TRI :
+      monomials = gmshGenerateMonomialsTriangle(data.spaceOrder(),
+                                                data.spaceIsSerendipity());
+      return;
+    case TYPE_QUA :
+      monomials = gmshGenerateMonomialsQuadrangle(data.spaceOrder(),
+                                                  data.spaceIsSerendipity());
+      return;
+    case TYPE_TET :
+      monomials = gmshGenerateMonomialsTetrahedron(data.spaceOrder(),
+                                                   data.spaceIsSerendipity());
+      return;
+    case TYPE_PRI :
+      monomials = gmshGenerateMonomialsPrism(data.spaceOrder(),
+                                             data.spaceIsSerendipity());
+      return;
+    case TYPE_HEX :
+      monomials = gmshGenerateMonomialsHexahedron(data.spaceOrder(),
+                                                  data.spaceIsSerendipity());
+      return;
+    case TYPE_PYR :
+      monomials = gmshGenerateMonomialsPyramidGeneral(data.isPyramidalSpace(),
+                                                      data.nij(),
+                                                      data.nk(),
+                                                      data.spaceIsSerendipity());
+      return;
+    default :
+      Msg::Error("Unknown element type %d (tag %d) for monomials generation",
+          data.elementType(), data.elementTag());
+      return;
+  }
+}
+
 fullMatrix<double> gmshGenerateMonomialsLine(int order, bool serendip)
 {
   fullMatrix<double> monomials(order + 1, 1);
@@ -195,12 +297,12 @@ fullMatrix<double> gmshGenerateMonomialsQuadrangle(int order, bool forSerendipPo
 }
 
 /*
-00 10 20 30 40 �..
-01 11 21 31 41 �..
+00 10 20 30 40 ...
+01 11 21 31 41 ...
 02 12
 03 13
 04 14
-�. �.
+...
 */
 
 fullMatrix<double> gmshGenerateMonomialsQuadSerendipity(int order)
@@ -668,28 +770,29 @@ fullMatrix<double> gmshGenerateMonomialsPyramid(int order, bool forSerendipPoint
   int nbMonomials = forSerendipPoints ? 5 + (order-1)*8 :
                                         (order+1)*((order+1)+1)*(2*(order+1)+1)/6;
   if (forSerendipPoints && !order) nbMonomials = 1;
+
   fullMatrix<double> monomials(nbMonomials, 3);
 
   monomials(0, 0) = 0;
   monomials(0, 1) = 0;
-  monomials(0, 2) = 0;
+  monomials(0, 2) = order;
 
   if (order > 0) {
     monomials(1, 0) = order;
     monomials(1, 1) = 0;
-    monomials(1, 2) = 0;
+    monomials(1, 2) = order;
 
     monomials(2, 0) = order;
     monomials(2, 1) = order;
-    monomials(2, 2) = 0;
+    monomials(2, 2) = order;
 
     monomials(3, 0) = 0;
     monomials(3, 1) = order;
-    monomials(3, 2) = 0;
+    monomials(3, 2) = order;
 
     monomials(4, 0) = 0;
     monomials(4, 1) = 0;
-    monomials(4, 2) = order;
+    monomials(4, 2) = 0;
 
     if (order > 1) {
       int index = 5;
@@ -751,7 +854,11 @@ fullMatrix<double> gmshGenerateMonomialsPyramid(int order, bool forSerendipPoint
 
         if (order > 2) {
           fullMatrix<double> inner = gmshGenerateMonomialsPyramid(order - 3);
-          inner.add(1);
+          fullMatrix<double> prox;
+          prox.setAsProxy(inner, 0, 2);
+          prox.add(1);
+          prox.setAsProxy(inner, 2, 1);
+          prox.add(2);
           monomials.copy(inner, 0, nbMonomials - index, 0, 3, index, 0);
         }
       }
@@ -760,3 +867,144 @@ fullMatrix<double> gmshGenerateMonomialsPyramid(int order, bool forSerendipPoint
   return monomials;
 }
 
+fullMatrix<double> gmshGenerateMonomialsPyramidGeneral(
+    bool pyr, int nij, int nk, bool forSerendipPoints)
+{
+  if (nij < 0 || nk < 0) {
+    Msg::Fatal("Wrong arguments for pyramid's monomials generation ! (%d & %d)", nij, nk);
+  }
+  if (!pyr && nk > 0 && nij == 0) {
+    Msg::Error("Wrong argument association for pyramid's monomials generation ! Setting nij to 1");
+    nij = 1;
+  }
+
+  // If monomials for pyramidal space, generate them in gmsh convention.
+  if (forSerendipPoints || (pyr && nij == 0))
+    return gmshGenerateMonomialsPyramid(nk, forSerendipPoints);
+
+  // Otherwise, just put corners at first places,
+  // order of others having no importance.
+
+  int nbMonomials;
+  if (pyr) {
+    nbMonomials = 0;
+    for (int k = 0; k <= nk; ++k) {
+      nbMonomials += (k+nij+1) * (k+nij+1);
+    }
+  }
+  else nbMonomials = (nij+1) * (nij+1) * (nk+1);
+
+  fullMatrix<double> monomials(nbMonomials, 3);
+
+  monomials(0, 0) = 0;
+  monomials(0, 1) = 0;
+  monomials(0, 2) = nk;
+
+  if (nk == 0 && nij == 0) return monomials;
+
+  // Here, nij > 0
+  int nijBase = pyr ? nk+nij : nij;
+
+  // Corners
+  monomials(1, 0) = nijBase;
+  monomials(1, 1) = 0;
+  monomials(1, 2) = nk;
+
+  monomials(2, 0) = nijBase;
+  monomials(2, 1) = nijBase;
+  monomials(2, 2) = nk;
+
+  monomials(3, 0) = 0;
+  monomials(3, 1) = nijBase;
+  monomials(3, 2) = nk;
+
+  int index = 4;
+
+  if (nk > 0) {
+    monomials(4, 0) = 0;
+    monomials(4, 1) = 0;
+    monomials(4, 2) = 0;
+
+    monomials(5, 0) = nij;
+    monomials(5, 1) = 0;
+    monomials(5, 2) = 0;
+
+    monomials(6, 0) = nij;
+    monomials(6, 1) = nij;
+    monomials(6, 2) = 0;
+
+    monomials(7, 0) = 0;
+    monomials(7, 1) = nij;
+    monomials(7, 2) = 0;
+
+    index = 8;
+  }
+
+  // Base
+  if (nijBase > 1) {
+    for (int iedge = 0; iedge < 4; ++iedge) {
+      int i0 = iedge;
+      int i1 = (iedge+1) % 4;
+
+      int u0 = (monomials(i1,0)-monomials(i0,0)) / nijBase;
+      int u1 = (monomials(i1,1)-monomials(i0,1)) / nijBase;
+
+      for (int i = 1; i < nijBase; ++i, ++index) {
+        monomials(index, 0) = monomials(i0, 0) + i * u0;
+        monomials(index, 1) = monomials(i0, 1) + i * u1;
+        monomials(index, 2) = nk;
+      }
+    }
+
+    for (int i = 1; i < nijBase; ++i) {
+      for (int j = 1; j < nijBase; ++j, ++index) {
+        monomials(index, 0) = i;
+        monomials(index, 1) = j;
+        monomials(index, 2) = nk;
+      }
+    }
+  }
+
+  // Above base
+  if (nk > 0) {
+    // Top
+    if (nij > 1) {
+      for (int iedge = 0; iedge < 4; ++iedge) {
+        int i0 = 4 + iedge;
+        int i1 = 4 + (iedge+1)%4;
+
+        int u0 = (monomials(i1,0)-monomials(i0,0)) / nijBase;
+        int u1 = (monomials(i1,1)-monomials(i0,1)) / nijBase;
+
+        for (int i = 1; i < nijBase; ++i, ++index) {
+          monomials(index, 0) = monomials(i0, 0) + i * u0;
+          monomials(index, 1) = monomials(i0, 1) + i * u1;
+          monomials(index, 2) = 0;
+        }
+      }
+
+      for (int i = 1; i < nijBase; ++i) {
+        for (int j = 1; j < nijBase; ++j, ++index) {
+          monomials(index, 0) = i;
+          monomials(index, 1) = j;
+          monomials(index, 2) = 0;
+        }
+      }
+    }
+
+    // Between bottom & top
+    for (int k = nk-1; k > 0; --k) {
+      int currentnij = pyr ? k+nij : nij;
+      for (int i = 0; i <= currentnij; ++i) {
+        for (int j = 0; j <= currentnij; ++j, ++index) {
+          monomials(index, 0) = i;
+          monomials(index, 1) = j;
+          monomials(index, 2) = k;
+        }
+      }
+    }
+  }
+
+  return monomials;
+}
+
diff --git a/Numeric/pointsGenerators.h b/Numeric/pointsGenerators.h
index 6546e7d..633bd77 100644
--- a/Numeric/pointsGenerators.h
+++ b/Numeric/pointsGenerators.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -7,7 +7,7 @@
 #define POINTSGENERATORS_H
 
 #include "fullMatrix.h"
-
+#include "FuncSpaceData.h"
  /*
   * Functions to generate point distributions on
   * the references elements, for all orders.
@@ -18,6 +18,8 @@
 
 // Points
 
+void gmshGeneratePoints(FuncSpaceData, fullMatrix<double> &);
+
 fullMatrix<double> gmshGeneratePointsLine(int order);
 
 fullMatrix<double> gmshGeneratePointsTriangle(int order, bool serendip = false);
@@ -28,10 +30,13 @@ fullMatrix<double> gmshGeneratePointsHexahedron(int order, bool serendip = false
 fullMatrix<double> gmshGeneratePointsPrism(int order, bool serendip = false);
 
 fullMatrix<double> gmshGeneratePointsPyramid(int order, bool serendip = false);
+fullMatrix<double> gmshGeneratePointsPyramidGeneral(bool pyr, int nij, int nk, bool serendip = false);
 
 
 // Monomial exponents
 
+void gmshGenerateMonomials(FuncSpaceData, fullMatrix<double> &);
+
 fullMatrix<double> gmshGenerateMonomialsLine(int order, bool serendip = false);
 
 fullMatrix<double> gmshGenerateMonomialsTriangle(int order, bool serendip = false);
@@ -44,8 +49,12 @@ fullMatrix<double> gmshGenerateMonomialsHexaSerendipity(int order);
 fullMatrix<double> gmshGenerateMonomialsPrism(int order, bool forSerendipPoints = false);
 fullMatrix<double> gmshGenerateMonomialsPrismSerendipity(int order);
 
+// Generate monomials of pyramidal nodal space {X^i Y^j Z^k | i,j <= k, k <= 'order'},
 fullMatrix<double> gmshGenerateMonomialsPyramid(int order, bool forSerendipPoints = false);
-//fullMatrix<double> gmshGenerateMonomialsPyramidSerendipity(int order); //TODO
+// If 'serendip' == true, generate monomials of serendipity pyramid at order 'nk',
+// else if 'pyr' == true, generate monomials of space {X^i Y^j Z^k | i,j <= k+'nij', k <= 'nk'},
+// else if 'pyr' == false, generate monomials of space {X^i Y^j Z^k | i,j <= 'nij', k <= 'nk'}
+fullMatrix<double> gmshGenerateMonomialsPyramidGeneral(bool pyr, int nij, int nk, bool forSerendipPoints = false);
 
 
 
diff --git a/Numeric/polynomialBasis.cpp b/Numeric/polynomialBasis.cpp
index 8620cf3..a80c5ec 100644
--- a/Numeric/polynomialBasis.cpp
+++ b/Numeric/polynomialBasis.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/polynomialBasis.h b/Numeric/polynomialBasis.h
index ef60d07..5f908d4 100644
--- a/Numeric/polynomialBasis.h
+++ b/Numeric/polynomialBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -95,4 +95,5 @@ class polynomialBasis : public nodalBasis
   void evaluateMonomials(double u, double v, double w, double p[]) const;
 };
 
+
 #endif
diff --git a/Numeric/pyramidalBasis.cpp b/Numeric/pyramidalBasis.cpp
index 634ab59..3b24afd 100644
--- a/Numeric/pyramidalBasis.cpp
+++ b/Numeric/pyramidalBasis.cpp
@@ -1,11 +1,12 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <cmath>
+#include <algorithm>
 #include "pyramidalBasis.h"
 #include "pointsGenerators.h"
-#include <cmath>
 
 pyramidalBasis::pyramidalBasis(int tag) : nodalBasis(tag)
 {
@@ -18,7 +19,7 @@ pyramidalBasis::pyramidalBasis(int tag) : nodalBasis(tag)
 
   int num_points = points.size1();
 
-  coefficients.resize(num_points, num_points);
+  bergotCoefficients.resize(num_points, num_points);
   double *fval = new double[num_points];
 
   // Invert the Vandermonde matrix
@@ -27,6 +28,29 @@ pyramidalBasis::pyramidalBasis(int tag) : nodalBasis(tag)
     bergot->f(points(j,0), points(j,1), points(j, 2), fval);
     for (int i = 0; i < num_points; i++) VDM(i,j) = fval[i];
   }
+  VDM.invert(bergotCoefficients);
+
+  coefficients.resize(num_points,num_points);
+  monomials.resize(num_points,3);
+
+  int idx = 0;
+  for (int i=0;i<=order;i++) {
+    for (int j=0;j<=order;j++) {
+      for (int k=0;k<=order-std::max(i,j);k++,idx++) {
+        monomials(idx,0) = i;
+        monomials(idx,1) = j;
+        monomials(idx,2) = k;
+
+        for (int l=0;l<num_points;l++) {
+          double oneMinW = std::max(1e-14,1-points(l,2));
+          VDM(idx,l)  = std::pow(points(l,0),i);
+          VDM(idx,l) *= std::pow(points(l,1),j);
+          VDM(idx,l) *= std::pow(points(l,2),k);
+          VDM(idx,l) *= std::pow(oneMinW,std::max(i,j)-i-j);
+        }
+      }
+    }
+  }
   VDM.invert(coefficients);
 
   delete[] fval;
@@ -55,7 +79,7 @@ void pyramidalBasis::f(double u, double v, double w, double *val) const
 
   for (int i = 0; i < N; i++) {
     val[i] = 0.;
-    for (int j = 0; j < N; j++) val[i] += coefficients(i,j)*fval[j];
+    for (int j = 0; j < N; j++) val[i] += bergotCoefficients(i,j)*fval[j];
   }
 
   delete[] fval;
@@ -76,7 +100,7 @@ void pyramidalBasis::f(const fullMatrix<double> &coord, fullMatrix<double> &sf)
     bergot->f(coord(iPt,0), coord(iPt,1), coord(iPt,2), fval);
     for (int i = 0; i < N; i++) {
       sf(iPt,i) = 0.;
-      for (int j = 0; j < N; j++) sf(iPt,i) += coefficients(i,j)*fval[j];
+      for (int j = 0; j < N; j++) sf(iPt,i) += bergotCoefficients(i,j)*fval[j];
     }
   }
 
@@ -97,9 +121,9 @@ void pyramidalBasis::df(double u, double v, double w, double grads[][3]) const
   for (int i = 0; i < N; i++) {
     grads[i][0] = 0.; grads[i][1] = 0.; grads[i][2] = 0.;
     for (int j = 0; j < N; j++) {
-      grads[i][0] += coefficients(i,j)*dfval[j][0];
-      grads[i][1] += coefficients(i,j)*dfval[j][1];
-      grads[i][2] += coefficients(i,j)*dfval[j][2];
+      grads[i][0] += bergotCoefficients(i,j)*dfval[j][0];
+      grads[i][1] += bergotCoefficients(i,j)*dfval[j][1];
+      grads[i][2] += bergotCoefficients(i,j)*dfval[j][2];
     }
   }
 
diff --git a/Numeric/pyramidalBasis.h b/Numeric/pyramidalBasis.h
index 610f480..740478a 100644
--- a/Numeric/pyramidalBasis.h
+++ b/Numeric/pyramidalBasis.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -18,7 +18,12 @@ class pyramidalBasis: public nodalBasis
  private:
   // Orthogonal basis for the pyramid
   BergotBasis *bergot;
+  fullMatrix<double> bergotCoefficients;
+
+ public:
+  
   fullMatrix<double> coefficients;
+  fullMatrix<double> monomials;
 
  public:
   pyramidalBasis(int tag);
diff --git a/Numeric/robustPredicates.h b/Numeric/robustPredicates.h
index c93fd56..dbee6f9 100644
--- a/Numeric/robustPredicates.h
+++ b/Numeric/robustPredicates.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Numeric/simpleFunction.h b/Numeric/simpleFunction.h
index 10503cc..5ce7638 100644
--- a/Numeric/simpleFunction.h
+++ b/Numeric/simpleFunction.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,6 +19,7 @@ class simpleFunction {
   virtual ~simpleFunction(){}
   virtual bool hasDerivatives() {return _hasDerivatives;};
   virtual scalar operator () (double x, double y, double z) const { return _val; }
+  virtual void setElement(MElement *e) const {}
   virtual void gradient (double x, double y, double z,
 			 scalar & dfdx, scalar & dfdy, scalar & dfdz) const
   { dfdx = dfdy = dfdz = 0.0; }
@@ -32,13 +33,35 @@ class simpleFunction {
 };
 
 template <class scalar>
+class constantPerElement : public simpleFunction<scalar>
+{
+  std::map<MElement *,scalar> _data;
+  mutable MElement *_e;
+ public :
+  constantPerElement () : _e(0){}
+  void set(MElement *e, scalar v) {
+    _data[e] = v;
+  } 
+  void setElement(MElement *e) const { 
+    _e = e; }
+  virtual scalar operator () (double x, double y, double z) const 
+  { 
+    if (!_e)return 0.0;
+    typename std::map<MElement *,scalar>::const_iterator it = _data.find(_e);
+    if (it == _data.end())return 0.0;
+    return it->second;
+  }
+};
+
+
+template <class scalar>
 class simpleFunctionOnElement : public simpleFunction<scalar>
 {
-  MElement *_e;
+  mutable MElement *_e;
  public :
   simpleFunctionOnElement(scalar val=0) : simpleFunction<scalar>(val),_e(0) {}
   virtual ~simpleFunctionOnElement(){}
-  void setElement(MElement *e) { _e = e; }
+  void setElement(MElement *e) const { _e = e; }
   MElement * getElement(void) const { return _e; }
   MElement * getElement(double x, double y, double z) const
   {
diff --git a/Numeric/simpleFunctionPython.h b/Numeric/simpleFunctionPython.h
index f3f0549..513196f 100644
--- a/Numeric/simpleFunctionPython.h
+++ b/Numeric/simpleFunctionPython.h
@@ -1,5 +1,11 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
 #ifndef _SIMPLE_FUNCTION_PYTHON_H_
 #define _SIMPLE_FUNCTION_PYTHON_H_
+
 #include "Python.h"
 #include "simpleFunction.h"
 
@@ -34,4 +40,5 @@ class simpleFunctionPython : public simpleFunction<double> {
     return r;
   }
 };
+
 #endif
diff --git a/Parser/CMakeLists.txt b/Parser/CMakeLists.txt
index 9b3f853..3795b90 100644
--- a/Parser/CMakeLists.txt
+++ b/Parser/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Parser/FunctionManager.cpp b/Parser/FunctionManager.cpp
index d12d7bf..2f980fc 100644
--- a/Parser/FunctionManager.cpp
+++ b/Parser/FunctionManager.cpp
@@ -1,22 +1,13 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <map>
-#include <stdio.h>
 #include <stack>
-#include <string.h>
+#include <string>
 #include "FunctionManager.h"
 
-struct ltstr
-{
-  bool operator() (const char *s1, const char *s2)const
-  {
-    return strcmp(s1, s2) < 0;
-  }
-};
-
 class File_Position
 {
  public:
@@ -34,8 +25,8 @@ class mystack
 
 class mymap
 {
- public: 
-  std::map<char*, File_Position, ltstr> m;
+ public:
+  std::map<std::string, File_Position> m;
 };
 
 FunctionManager *FunctionManager::instance = 0;
@@ -54,8 +45,8 @@ FunctionManager *FunctionManager::Instance()
   return instance;
 }
 
-int FunctionManager::enterFunction(char *name, gmshFILE * f, std::string &filename,
-                                   int &lno) const
+int FunctionManager::enterFunction(const std::string &name, gmshFILE * f,
+                                   std::string &filename, int &lno) const
 {
   if(functions->m.find(name) == functions->m.end())
     return 0;
@@ -87,8 +78,8 @@ int FunctionManager::leaveFunction(gmshFILE * f, std::string &filename, int &lno
   return 1;
 }
 
-int FunctionManager::createFunction(char *name, gmshFILE  f, std::string &filename,
-                                    int lno)
+int FunctionManager::createFunction(const std::string &name, gmshFILE f,
+                                    const std::string &filename, int lno)
 {
   File_Position fp;
   fp.file = f;
diff --git a/Parser/FunctionManager.h b/Parser/FunctionManager.h
index 8e6d33a..328f697 100644
--- a/Parser/FunctionManager.h
+++ b/Parser/FunctionManager.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,8 +22,10 @@ class FunctionManager
   static FunctionManager *instance;
  public :
   static FunctionManager* Instance();
-  int createFunction(char *name, gmshFILE f, std::string &filename, int lineno);
-  int enterFunction(char *name, gmshFILE *f, std::string &filename, int &lineno) const;
+  int createFunction(const std::string &name, gmshFILE f,
+                     const std::string &filename, int lineno);
+  int enterFunction(const std::string &name, gmshFILE *f,
+                    std::string &filename, int &lineno) const;
   int leaveFunction(gmshFILE *f, std::string &filename, int &lineno);
 };
 
diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l
index 5253e2b..47892e9 100644
--- a/Parser/Gmsh.l
+++ b/Parser/Gmsh.l
@@ -1,5 +1,5 @@
 %{
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -163,7 +163,9 @@ Exists                  return tExists;
 
 Fabs                    return tFabs;
 Field                   return tField;
+Find                    return tFind;
 FileExists              return tFileExists;
+FixRelativePath         return tFixRelativePath;
 Floor                   return tFloor;
 Fmod                    return tFmod;
 For                     return tFor;
@@ -205,6 +207,7 @@ Memory                  return tMemory;
 Nurbs			return tNurbs;
 
 OnelabAction            return tOnelabAction;
+OnelabRun               return tOnelabRun;
 Order			return tNurbsOrder;
 
 Periodic                return tPeriodic;
@@ -253,6 +256,7 @@ StrPrefix               return tStrPrefix;
 StrRelative             return tStrRelative;
 StrFind                 return tStrFind;
 StrCmp                  return tStrCmp;
+StrChoice               return tStrChoice;
 Show                    return tShow;
 Symmetry                return tSymmetry;
 SyncModel               return tSyncModel;
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index fdc4530..8bd1d1e 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.7.12-4996.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -47,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.7.12-4996"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,364 +52,27 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* Substitute the variable and function names.  */
-#define yyparse gmsh_yyparse
-#define yylex   gmsh_yylex
-#define yyerror gmsh_yyerror
-#define yylval  gmsh_yylval
-#define yychar  gmsh_yychar
-#define yydebug gmsh_yydebug
-#define yynerrs gmsh_yynerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     tDOUBLE = 258,
-     tSTRING = 259,
-     tBIGSTR = 260,
-     tEND = 261,
-     tAFFECT = 262,
-     tDOTS = 263,
-     tPi = 264,
-     tMPI_Rank = 265,
-     tMPI_Size = 266,
-     tEuclidian = 267,
-     tCoordinates = 268,
-     tExp = 269,
-     tLog = 270,
-     tLog10 = 271,
-     tSqrt = 272,
-     tSin = 273,
-     tAsin = 274,
-     tCos = 275,
-     tAcos = 276,
-     tTan = 277,
-     tRand = 278,
-     tAtan = 279,
-     tAtan2 = 280,
-     tSinh = 281,
-     tCosh = 282,
-     tTanh = 283,
-     tFabs = 284,
-     tFloor = 285,
-     tCeil = 286,
-     tRound = 287,
-     tFmod = 288,
-     tModulo = 289,
-     tHypot = 290,
-     tList = 291,
-     tPrintf = 292,
-     tError = 293,
-     tStr = 294,
-     tSprintf = 295,
-     tStrCat = 296,
-     tStrPrefix = 297,
-     tStrRelative = 298,
-     tStrReplace = 299,
-     tStrFind = 300,
-     tStrCmp = 301,
-     tTextAttributes = 302,
-     tBoundingBox = 303,
-     tDraw = 304,
-     tSetChanged = 305,
-     tToday = 306,
-     tOnelabAction = 307,
-     tSyncModel = 308,
-     tCpu = 309,
-     tMemory = 310,
-     tTotalMemory = 311,
-     tCreateTopology = 312,
-     tCreateTopologyNoHoles = 313,
-     tDistanceFunction = 314,
-     tDefineConstant = 315,
-     tUndefineConstant = 316,
-     tDefineNumber = 317,
-     tDefineString = 318,
-     tPoint = 319,
-     tCircle = 320,
-     tEllipse = 321,
-     tLine = 322,
-     tSphere = 323,
-     tPolarSphere = 324,
-     tSurface = 325,
-     tSpline = 326,
-     tVolume = 327,
-     tCharacteristic = 328,
-     tLength = 329,
-     tParametric = 330,
-     tElliptic = 331,
-     tRefineMesh = 332,
-     tAdaptMesh = 333,
-     tRelocateMesh = 334,
-     tPlane = 335,
-     tRuled = 336,
-     tTransfinite = 337,
-     tComplex = 338,
-     tPhysical = 339,
-     tCompound = 340,
-     tPeriodic = 341,
-     tUsing = 342,
-     tPlugin = 343,
-     tDegenerated = 344,
-     tRecursive = 345,
-     tRotate = 346,
-     tTranslate = 347,
-     tSymmetry = 348,
-     tDilate = 349,
-     tExtrude = 350,
-     tLevelset = 351,
-     tRecombine = 352,
-     tSmoother = 353,
-     tSplit = 354,
-     tDelete = 355,
-     tCoherence = 356,
-     tIntersect = 357,
-     tMeshAlgorithm = 358,
-     tReverse = 359,
-     tLayers = 360,
-     tScaleLast = 361,
-     tHole = 362,
-     tAlias = 363,
-     tAliasWithOptions = 364,
-     tCopyOptions = 365,
-     tQuadTriAddVerts = 366,
-     tQuadTriNoNewVerts = 367,
-     tQuadTriSngl = 368,
-     tQuadTriDbl = 369,
-     tRecombLaterals = 370,
-     tTransfQuadTri = 371,
-     tText2D = 372,
-     tText3D = 373,
-     tInterpolationScheme = 374,
-     tTime = 375,
-     tCombine = 376,
-     tBSpline = 377,
-     tBezier = 378,
-     tNurbs = 379,
-     tNurbsOrder = 380,
-     tNurbsKnots = 381,
-     tColor = 382,
-     tColorTable = 383,
-     tFor = 384,
-     tIn = 385,
-     tEndFor = 386,
-     tIf = 387,
-     tEndIf = 388,
-     tExit = 389,
-     tAbort = 390,
-     tField = 391,
-     tReturn = 392,
-     tCall = 393,
-     tFunction = 394,
-     tShow = 395,
-     tHide = 396,
-     tGetValue = 397,
-     tGetEnv = 398,
-     tGetString = 399,
-     tHomology = 400,
-     tCohomology = 401,
-     tBetti = 402,
-     tSetOrder = 403,
-     tExists = 404,
-     tFileExists = 405,
-     tGMSH_MAJOR_VERSION = 406,
-     tGMSH_MINOR_VERSION = 407,
-     tGMSH_PATCH_VERSION = 408,
-     tAFFECTDIVIDE = 409,
-     tAFFECTTIMES = 410,
-     tAFFECTMINUS = 411,
-     tAFFECTPLUS = 412,
-     tOR = 413,
-     tAND = 414,
-     tNOTEQUAL = 415,
-     tEQUAL = 416,
-     tGREATEROREQUAL = 417,
-     tLESSOREQUAL = 418,
-     UNARYPREC = 419,
-     tMINUSMINUS = 420,
-     tPLUSPLUS = 421
-   };
-#endif
-/* Tokens.  */
-#define tDOUBLE 258
-#define tSTRING 259
-#define tBIGSTR 260
-#define tEND 261
-#define tAFFECT 262
-#define tDOTS 263
-#define tPi 264
-#define tMPI_Rank 265
-#define tMPI_Size 266
-#define tEuclidian 267
-#define tCoordinates 268
-#define tExp 269
-#define tLog 270
-#define tLog10 271
-#define tSqrt 272
-#define tSin 273
-#define tAsin 274
-#define tCos 275
-#define tAcos 276
-#define tTan 277
-#define tRand 278
-#define tAtan 279
-#define tAtan2 280
-#define tSinh 281
-#define tCosh 282
-#define tTanh 283
-#define tFabs 284
-#define tFloor 285
-#define tCeil 286
-#define tRound 287
-#define tFmod 288
-#define tModulo 289
-#define tHypot 290
-#define tList 291
-#define tPrintf 292
-#define tError 293
-#define tStr 294
-#define tSprintf 295
-#define tStrCat 296
-#define tStrPrefix 297
-#define tStrRelative 298
-#define tStrReplace 299
-#define tStrFind 300
-#define tStrCmp 301
-#define tTextAttributes 302
-#define tBoundingBox 303
-#define tDraw 304
-#define tSetChanged 305
-#define tToday 306
-#define tOnelabAction 307
-#define tSyncModel 308
-#define tCpu 309
-#define tMemory 310
-#define tTotalMemory 311
-#define tCreateTopology 312
-#define tCreateTopologyNoHoles 313
-#define tDistanceFunction 314
-#define tDefineConstant 315
-#define tUndefineConstant 316
-#define tDefineNumber 317
-#define tDefineString 318
-#define tPoint 319
-#define tCircle 320
-#define tEllipse 321
-#define tLine 322
-#define tSphere 323
-#define tPolarSphere 324
-#define tSurface 325
-#define tSpline 326
-#define tVolume 327
-#define tCharacteristic 328
-#define tLength 329
-#define tParametric 330
-#define tElliptic 331
-#define tRefineMesh 332
-#define tAdaptMesh 333
-#define tRelocateMesh 334
-#define tPlane 335
-#define tRuled 336
-#define tTransfinite 337
-#define tComplex 338
-#define tPhysical 339
-#define tCompound 340
-#define tPeriodic 341
-#define tUsing 342
-#define tPlugin 343
-#define tDegenerated 344
-#define tRecursive 345
-#define tRotate 346
-#define tTranslate 347
-#define tSymmetry 348
-#define tDilate 349
-#define tExtrude 350
-#define tLevelset 351
-#define tRecombine 352
-#define tSmoother 353
-#define tSplit 354
-#define tDelete 355
-#define tCoherence 356
-#define tIntersect 357
-#define tMeshAlgorithm 358
-#define tReverse 359
-#define tLayers 360
-#define tScaleLast 361
-#define tHole 362
-#define tAlias 363
-#define tAliasWithOptions 364
-#define tCopyOptions 365
-#define tQuadTriAddVerts 366
-#define tQuadTriNoNewVerts 367
-#define tQuadTriSngl 368
-#define tQuadTriDbl 369
-#define tRecombLaterals 370
-#define tTransfQuadTri 371
-#define tText2D 372
-#define tText3D 373
-#define tInterpolationScheme 374
-#define tTime 375
-#define tCombine 376
-#define tBSpline 377
-#define tBezier 378
-#define tNurbs 379
-#define tNurbsOrder 380
-#define tNurbsKnots 381
-#define tColor 382
-#define tColorTable 383
-#define tFor 384
-#define tIn 385
-#define tEndFor 386
-#define tIf 387
-#define tEndIf 388
-#define tExit 389
-#define tAbort 390
-#define tField 391
-#define tReturn 392
-#define tCall 393
-#define tFunction 394
-#define tShow 395
-#define tHide 396
-#define tGetValue 397
-#define tGetEnv 398
-#define tGetString 399
-#define tHomology 400
-#define tCohomology 401
-#define tBetti 402
-#define tSetOrder 403
-#define tExists 404
-#define tFileExists 405
-#define tGMSH_MAJOR_VERSION 406
-#define tGMSH_MINOR_VERSION 407
-#define tGMSH_PATCH_VERSION 408
-#define tAFFECTDIVIDE 409
-#define tAFFECTTIMES 410
-#define tAFFECTMINUS 411
-#define tAFFECTPLUS 412
-#define tOR 413
-#define tAND 414
-#define tNOTEQUAL 415
-#define tEQUAL 416
-#define tGREATEROREQUAL 417
-#define tLESSOREQUAL 418
-#define UNARYPREC 419
-#define tMINUSMINUS 420
-#define tPLUSPLUS 421
+/* Push parsers.  */
+#define YYPUSH 0
 
+/* Pull parsers.  */
+#define YYPULL 1
 
 
+/* Substitute the variable and function names.  */
+#define yyparse         gmsh_yyparse
+#define yylex           gmsh_yylex
+#define yyerror         gmsh_yyerror
+#define yylval          gmsh_yylval
+#define yychar          gmsh_yychar
+#define yydebug         gmsh_yydebug
+#define yynerrs         gmsh_yynerrs
 
 /* Copy the first part of user declarations.  */
+/* Line 371 of yacc.c  */
 #line 1 "Gmsh.y"
 
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -480,7 +140,6 @@ static std::vector<double> ViewCoord;
 static std::vector<double> *ViewValueList = 0;
 static int *ViewNumList = 0;
 static ExtrudeParams extr;
-static int curPhysDim = 0;
 static gmshSurface *myGmshSurface = 0;
 #define MAX_RECUR_LOOPS 100
 static int ImbricatedLoop = 0;
@@ -509,11 +168,16 @@ struct doubleXstring{
 };
 
 
+/* Line 371 of yacc.c  */
+#line 173 "Gmsh.tab.cpp"
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULL nullptr
+#  else
+#   define YY_NULL 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -523,15 +187,202 @@ struct doubleXstring{
 # define YYERROR_VERBOSE 0
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+   by #include "Gmsh.tab.hpp".  */
+#ifndef YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
+# define YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gmsh_yydebug;
 #endif
 
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     tDOUBLE = 258,
+     tSTRING = 259,
+     tBIGSTR = 260,
+     tEND = 261,
+     tAFFECT = 262,
+     tDOTS = 263,
+     tPi = 264,
+     tMPI_Rank = 265,
+     tMPI_Size = 266,
+     tEuclidian = 267,
+     tCoordinates = 268,
+     tExp = 269,
+     tLog = 270,
+     tLog10 = 271,
+     tSqrt = 272,
+     tSin = 273,
+     tAsin = 274,
+     tCos = 275,
+     tAcos = 276,
+     tTan = 277,
+     tRand = 278,
+     tAtan = 279,
+     tAtan2 = 280,
+     tSinh = 281,
+     tCosh = 282,
+     tTanh = 283,
+     tFabs = 284,
+     tFloor = 285,
+     tCeil = 286,
+     tRound = 287,
+     tFmod = 288,
+     tModulo = 289,
+     tHypot = 290,
+     tList = 291,
+     tPrintf = 292,
+     tError = 293,
+     tStr = 294,
+     tSprintf = 295,
+     tStrCat = 296,
+     tStrPrefix = 297,
+     tStrRelative = 298,
+     tStrReplace = 299,
+     tFind = 300,
+     tStrFind = 301,
+     tStrCmp = 302,
+     tStrChoice = 303,
+     tTextAttributes = 304,
+     tBoundingBox = 305,
+     tDraw = 306,
+     tSetChanged = 307,
+     tToday = 308,
+     tFixRelativePath = 309,
+     tSyncModel = 310,
+     tOnelabAction = 311,
+     tOnelabRun = 312,
+     tCpu = 313,
+     tMemory = 314,
+     tTotalMemory = 315,
+     tCreateTopology = 316,
+     tCreateTopologyNoHoles = 317,
+     tDistanceFunction = 318,
+     tDefineConstant = 319,
+     tUndefineConstant = 320,
+     tDefineNumber = 321,
+     tDefineString = 322,
+     tPoint = 323,
+     tCircle = 324,
+     tEllipse = 325,
+     tLine = 326,
+     tSphere = 327,
+     tPolarSphere = 328,
+     tSurface = 329,
+     tSpline = 330,
+     tVolume = 331,
+     tCharacteristic = 332,
+     tLength = 333,
+     tParametric = 334,
+     tElliptic = 335,
+     tRefineMesh = 336,
+     tAdaptMesh = 337,
+     tRelocateMesh = 338,
+     tPlane = 339,
+     tRuled = 340,
+     tTransfinite = 341,
+     tComplex = 342,
+     tPhysical = 343,
+     tCompound = 344,
+     tPeriodic = 345,
+     tUsing = 346,
+     tPlugin = 347,
+     tDegenerated = 348,
+     tRecursive = 349,
+     tRotate = 350,
+     tTranslate = 351,
+     tSymmetry = 352,
+     tDilate = 353,
+     tExtrude = 354,
+     tLevelset = 355,
+     tRecombine = 356,
+     tSmoother = 357,
+     tSplit = 358,
+     tDelete = 359,
+     tCoherence = 360,
+     tIntersect = 361,
+     tMeshAlgorithm = 362,
+     tReverse = 363,
+     tLayers = 364,
+     tScaleLast = 365,
+     tHole = 366,
+     tAlias = 367,
+     tAliasWithOptions = 368,
+     tCopyOptions = 369,
+     tQuadTriAddVerts = 370,
+     tQuadTriNoNewVerts = 371,
+     tQuadTriSngl = 372,
+     tQuadTriDbl = 373,
+     tRecombLaterals = 374,
+     tTransfQuadTri = 375,
+     tText2D = 376,
+     tText3D = 377,
+     tInterpolationScheme = 378,
+     tTime = 379,
+     tCombine = 380,
+     tBSpline = 381,
+     tBezier = 382,
+     tNurbs = 383,
+     tNurbsOrder = 384,
+     tNurbsKnots = 385,
+     tColor = 386,
+     tColorTable = 387,
+     tFor = 388,
+     tIn = 389,
+     tEndFor = 390,
+     tIf = 391,
+     tEndIf = 392,
+     tExit = 393,
+     tAbort = 394,
+     tField = 395,
+     tReturn = 396,
+     tCall = 397,
+     tFunction = 398,
+     tShow = 399,
+     tHide = 400,
+     tGetValue = 401,
+     tGetEnv = 402,
+     tGetString = 403,
+     tHomology = 404,
+     tCohomology = 405,
+     tBetti = 406,
+     tSetOrder = 407,
+     tExists = 408,
+     tFileExists = 409,
+     tGMSH_MAJOR_VERSION = 410,
+     tGMSH_MINOR_VERSION = 411,
+     tGMSH_PATCH_VERSION = 412,
+     tAFFECTDIVIDE = 413,
+     tAFFECTTIMES = 414,
+     tAFFECTMINUS = 415,
+     tAFFECTPLUS = 416,
+     tOR = 417,
+     tAND = 418,
+     tNOTEQUAL = 419,
+     tEQUAL = 420,
+     tGREATEROREQUAL = 421,
+     tLESSOREQUAL = 422,
+     UNARYPREC = 423,
+     tMINUSMINUS = 424,
+     tPLUSPLUS = 425
+   };
+#endif
+
+
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 100 "Gmsh.y"
 {
+/* Line 387 of yacc.c  */
+#line 99 "Gmsh.y"
+
   char *c;
   int i;
   unsigned int u;
@@ -539,22 +390,38 @@ typedef union YYSTYPE
   double v[5];
   Shape s;
   List_T *l;
-}
-/* Line 193 of yacc.c.  */
-#line 545 "Gmsh.tab.cpp"
-	YYSTYPE;
+
+
+/* Line 387 of yacc.c  */
+#line 397 "Gmsh.tab.cpp"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
+extern YYSTYPE gmsh_yylval;
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void *YYPARSE_PARAM);
+#else
+int gmsh_yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void);
+#else
+int gmsh_yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
 
+#endif /* !YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED  */
 
 /* Copy the second part of user declarations.  */
 
-
-/* Line 216 of yacc.c.  */
-#line 558 "Gmsh.tab.cpp"
+/* Line 390 of yacc.c  */
+#line 425 "Gmsh.tab.cpp"
 
 #ifdef short
 # undef short
@@ -607,36 +474,45 @@ typedef short int yytype_int16;
 # if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
 #  endif
 # endif
 # ifndef YY_
-#  define YY_(msgid) msgid
+#  define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+      || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
+#  define __attribute__(Spec) /* empty */
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
 #else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
 #endif
 
+
 /* Identity function, used to suppress warnings about constant conditions.  */
 #ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
 #else
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -657,11 +533,12 @@ YYID (i)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -684,24 +561,24 @@ YYID (i)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -717,9 +594,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
 
 /* The size of the maximum gap between one aligned stack and the next.  */
 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -730,35 +607,19 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -766,23 +627,43 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  5
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   8039
+#define YYLAST   9474
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  187
+#define YYNTOKENS  191
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  97
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  466
+#define YYNRULES  485
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  1613
+#define YYNSTATES  1715
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   421
+#define YYMAXUTOK   425
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -793,16 +674,16 @@ static const yytype_uint8 yytranslate[] =
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   172,     2,   182,     2,   171,     2,     2,
-     177,   178,   169,   167,   183,   168,   181,   170,     2,     2,
+       2,     2,     2,   176,     2,   186,     2,   175,     2,     2,
+     181,   182,   173,   171,   187,   172,   185,   174,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     163,     2,   164,   158,     2,     2,     2,     2,     2,     2,
+     167,     2,   168,   162,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   179,     2,   180,   176,     2,     2,     2,     2,     2,
+       2,   183,     2,   184,   180,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   184,     2,   185,   186,     2,     2,     2,
+       2,     2,     2,   188,     2,   189,   190,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -831,8 +712,8 @@ static const yytype_uint8 yytranslate[] =
      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
      145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   159,   160,   161,   162,   165,   166,   173,
-     174,   175
+     155,   156,   157,   158,   159,   160,   161,   163,   164,   165,
+     166,   169,   170,   177,   178,   179
 };
 
 #if YYDEBUG
@@ -847,368 +728,386 @@ static const yytype_uint16 yyprhs[] =
      141,   145,   147,   151,   152,   153,   164,   166,   170,   171,
      185,   187,   191,   192,   208,   217,   232,   233,   240,   242,
      244,   246,   248,   250,   252,   254,   256,   258,   260,   262,
-     268,   274,   279,   286,   294,   302,   310,   320,   330,   334,
-     341,   348,   353,   360,   370,   377,   387,   393,   402,   411,
-     423,   430,   440,   446,   454,   464,   474,   486,   494,   504,
-     514,   515,   517,   518,   522,   528,   529,   539,   545,   546,
-     556,   557,   561,   565,   571,   572,   575,   579,   585,   589,
-     590,   593,   597,   601,   607,   609,   611,   612,   618,   619,
-     622,   630,   631,   641,   648,   656,   661,   669,   678,   687,
-     695,   703,   715,   724,   733,   734,   744,   753,   763,   767,
-     772,   783,   791,   799,   808,   817,   830,   831,   841,   850,
-     858,   867,   868,   878,   884,   896,   902,   912,   922,   927,
-     937,   947,   949,   951,   952,   955,   962,   969,   976,   983,
-     992,  1003,  1018,  1035,  1048,  1057,  1066,  1073,  1088,  1093,
-    1100,  1107,  1111,  1116,  1122,  1129,  1133,  1137,  1142,  1148,
-    1153,  1159,  1163,  1171,  1179,  1183,  1191,  1195,  1198,  1201,
-    1204,  1207,  1223,  1226,  1229,  1232,  1235,  1238,  1255,  1259,
-    1266,  1275,  1284,  1295,  1297,  1300,  1302,  1306,  1311,  1313,
-    1319,  1331,  1345,  1346,  1354,  1355,  1369,  1370,  1386,  1387,
-    1394,  1403,  1412,  1421,  1434,  1447,  1460,  1475,  1490,  1505,
-    1506,  1519,  1520,  1533,  1534,  1547,  1548,  1565,  1566,  1583,
-    1584,  1601,  1602,  1621,  1622,  1641,  1642,  1661,  1663,  1666,
-    1672,  1680,  1690,  1693,  1696,  1699,  1703,  1706,  1710,  1713,
-    1717,  1720,  1724,  1734,  1741,  1742,  1746,  1747,  1749,  1750,
-    1753,  1754,  1757,  1765,  1772,  1781,  1787,  1791,  1799,  1805,
-    1810,  1817,  1824,  1837,  1848,  1859,  1870,  1881,  1892,  1897,
-    1902,  1907,  1912,  1917,  1920,  1924,  1931,  1933,  1935,  1937,
-    1940,  1946,  1954,  1965,  1967,  1971,  1974,  1977,  1980,  1984,
-    1988,  1992,  1996,  2000,  2004,  2008,  2012,  2016,  2020,  2024,
-    2028,  2032,  2036,  2042,  2047,  2052,  2057,  2062,  2067,  2072,
-    2077,  2082,  2087,  2092,  2099,  2104,  2109,  2114,  2119,  2124,
-    2129,  2134,  2141,  2148,  2155,  2160,  2162,  2164,  2166,  2168,
-    2170,  2172,  2174,  2176,  2178,  2180,  2181,  2188,  2190,  2195,
-    2200,  2205,  2210,  2215,  2218,  2224,  2230,  2234,  2241,  2246,
-    2254,  2261,  2268,  2275,  2280,  2282,  2285,  2288,  2292,  2296,
-    2308,  2318,  2326,  2334,  2336,  2340,  2342,  2344,  2347,  2351,
-    2356,  2362,  2364,  2366,  2369,  2373,  2377,  2383,  2388,  2391,
-    2394,  2397,  2400,  2406,  2412,  2418,  2424,  2426,  2428,  2432,
-    2437,  2444,  2446,  2448,  2452,  2456,  2466,  2474,  2476,  2482,
-    2486,  2493,  2495,  2499,  2501,  2503,  2507,  2514,  2516,  2518,
-    2520,  2525,  2532,  2539,  2544,  2549,  2558,  2563,  2568,  2575,
-    2576,  2583,  2585,  2589,  2595,  2601,  2603
+     268,   274,   279,   286,   293,   301,   309,   317,   327,   337,
+     341,   348,   355,   360,   367,   377,   384,   394,   400,   409,
+     418,   430,   437,   447,   453,   461,   471,   481,   493,   501,
+     511,   521,   522,   524,   525,   529,   535,   536,   546,   552,
+     553,   563,   564,   568,   572,   578,   579,   582,   586,   592,
+     596,   597,   600,   604,   608,   614,   616,   618,   620,   622,
+     624,   626,   628,   630,   631,   637,   638,   641,   649,   658,
+     665,   673,   678,   686,   695,   704,   712,   720,   732,   741,
+     750,   759,   768,   778,   782,   787,   798,   806,   814,   823,
+     832,   845,   854,   863,   871,   880,   889,   895,   907,   913,
+     923,   933,   938,   948,   958,   960,   962,   963,   966,   973,
+     980,   987,   994,  1003,  1014,  1029,  1046,  1059,  1068,  1077,
+    1084,  1099,  1104,  1111,  1118,  1122,  1127,  1133,  1140,  1144,
+    1148,  1153,  1159,  1164,  1170,  1174,  1180,  1188,  1196,  1200,
+    1208,  1212,  1215,  1218,  1221,  1224,  1240,  1243,  1246,  1249,
+    1252,  1255,  1272,  1276,  1283,  1292,  1301,  1312,  1314,  1317,
+    1319,  1323,  1328,  1330,  1336,  1348,  1362,  1363,  1371,  1372,
+    1386,  1387,  1403,  1404,  1411,  1420,  1429,  1438,  1451,  1464,
+    1477,  1492,  1507,  1522,  1523,  1536,  1537,  1550,  1551,  1564,
+    1565,  1582,  1583,  1600,  1601,  1618,  1619,  1638,  1639,  1658,
+    1659,  1678,  1680,  1683,  1689,  1697,  1707,  1710,  1713,  1716,
+    1720,  1723,  1727,  1730,  1734,  1737,  1741,  1751,  1758,  1759,
+    1763,  1764,  1766,  1767,  1770,  1771,  1774,  1775,  1778,  1786,
+    1793,  1802,  1808,  1812,  1820,  1826,  1831,  1838,  1845,  1859,
+    1870,  1881,  1892,  1903,  1914,  1919,  1924,  1929,  1934,  1939,
+    1942,  1946,  1953,  1955,  1957,  1959,  1962,  1968,  1976,  1987,
+    1989,  1993,  1996,  1999,  2002,  2006,  2010,  2014,  2018,  2022,
+    2026,  2030,  2034,  2038,  2042,  2046,  2050,  2054,  2058,  2064,
+    2069,  2074,  2079,  2084,  2089,  2094,  2099,  2104,  2109,  2114,
+    2121,  2126,  2131,  2136,  2141,  2146,  2151,  2156,  2163,  2170,
+    2177,  2182,  2184,  2186,  2188,  2190,  2192,  2194,  2196,  2198,
+    2200,  2202,  2203,  2210,  2212,  2217,  2222,  2227,  2232,  2237,
+    2240,  2246,  2252,  2256,  2263,  2268,  2276,  2283,  2290,  2297,
+    2304,  2309,  2311,  2314,  2317,  2321,  2325,  2337,  2347,  2355,
+    2363,  2365,  2369,  2371,  2373,  2376,  2380,  2385,  2391,  2393,
+    2395,  2398,  2402,  2406,  2412,  2417,  2420,  2423,  2426,  2429,
+    2433,  2437,  2441,  2445,  2451,  2457,  2463,  2469,  2486,  2503,
+    2520,  2537,  2539,  2541,  2545,  2549,  2554,  2561,  2568,  2570,
+    2572,  2576,  2580,  2590,  2598,  2600,  2606,  2610,  2617,  2619,
+    2623,  2625,  2627,  2631,  2638,  2640,  2642,  2644,  2649,  2656,
+    2661,  2666,  2671,  2680,  2685,  2694,  2699,  2706,  2711,  2712,
+    2719,  2721,  2725,  2731,  2737,  2739
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-     188,     0,    -1,   189,    -1,     1,     6,    -1,    -1,   189,
-     190,    -1,   193,    -1,   192,    -1,   213,    -1,   227,    -1,
-     232,    -1,   236,    -1,   237,    -1,   238,    -1,   241,    -1,
-     261,    -1,   262,    -1,   240,    -1,   239,    -1,   235,    -1,
-     264,    -1,   164,    -1,   164,   164,    -1,    37,   177,   278,
-     178,     6,    -1,    38,   177,   278,   178,     6,    -1,    37,
-     177,   278,   178,   191,   278,     6,    -1,    37,   177,   278,
-     183,   274,   178,     6,    -1,    38,   177,   278,   183,   274,
-     178,     6,    -1,    37,   177,   278,   183,   274,   178,   191,
-     278,     6,    -1,     4,   278,   184,   194,   185,     6,    -1,
-     108,     4,   179,   265,   180,     6,    -1,   109,     4,   179,
-     265,   180,     6,    -1,   110,     4,   179,   265,   183,   265,
-     180,     6,    -1,    -1,   194,   197,    -1,   194,   201,    -1,
-     194,   204,    -1,   194,   206,    -1,   194,   207,    -1,   265,
-      -1,   195,   183,   265,    -1,   265,    -1,   196,   183,   265,
-      -1,    -1,    -1,     4,   198,   177,   195,   178,   199,   184,
-     196,   185,     6,    -1,   278,    -1,   200,   183,   278,    -1,
-      -1,   117,   177,   265,   183,   265,   183,   265,   178,   202,
-     184,   200,   185,     6,    -1,   278,    -1,   203,   183,   278,
-      -1,    -1,   118,   177,   265,   183,   265,   183,   265,   183,
-     265,   178,   205,   184,   203,   185,     6,    -1,   119,   184,
-     270,   185,   184,   270,   185,     6,    -1,   119,   184,   270,
-     185,   184,   270,   185,   184,   270,   185,   184,   270,   185,
-       6,    -1,    -1,   120,   208,   184,   196,   185,     6,    -1,
-       7,    -1,   157,    -1,   156,    -1,   155,    -1,   154,    -1,
-     175,    -1,   174,    -1,   177,    -1,   179,    -1,   178,    -1,
-     180,    -1,    60,   179,   215,   180,     6,    -1,    61,   179,
-     218,   180,     6,    -1,   283,   209,   271,     6,    -1,     4,
-     179,   180,   209,   271,     6,    -1,     4,   179,   265,   180,
-     209,   265,     6,    -1,     4,   177,   265,   178,   209,   265,
-       6,    -1,   282,   179,   265,   180,   209,   265,     6,    -1,
-       4,   211,   184,   274,   185,   212,   209,   271,     6,    -1,
-     282,   177,   184,   274,   185,   178,   209,   271,     6,    -1,
-     283,   210,     6,    -1,     4,   179,   265,   180,   210,     6,
-      -1,   282,   179,   265,   180,   210,     6,    -1,   283,     7,
-     279,     6,    -1,     4,   181,     4,     7,   279,     6,    -1,
-       4,   179,   265,   180,   181,     4,     7,   279,     6,    -1,
-       4,   181,     4,   209,   265,     6,    -1,     4,   179,   265,
-     180,   181,     4,   209,   265,     6,    -1,     4,   181,     4,
-     210,     6,    -1,     4,   179,   265,   180,   181,     4,   210,
-       6,    -1,     4,   181,   127,   181,     4,     7,   275,     6,
-      -1,     4,   179,   265,   180,   181,   127,   181,     4,     7,
-     275,     6,    -1,     4,   181,   128,     7,   276,     6,    -1,
-       4,   179,   265,   180,   181,   128,     7,   276,     6,    -1,
-       4,   136,     7,   265,     6,    -1,   136,   179,   265,   180,
-       7,     4,     6,    -1,   136,   179,   265,   180,   181,     4,
-       7,   265,     6,    -1,   136,   179,   265,   180,   181,     4,
-       7,   279,     6,    -1,   136,   179,   265,   180,   181,     4,
-       7,   184,   274,   185,     6,    -1,   136,   179,   265,   180,
-     181,     4,     6,    -1,    88,   177,     4,   178,   181,     4,
-       7,   265,     6,    -1,    88,   177,     4,   178,   181,     4,
-       7,   279,     6,    -1,    -1,   183,    -1,    -1,   215,   214,
-     283,    -1,   215,   214,   283,     7,   265,    -1,    -1,   215,
-     214,   283,     7,   184,   265,   216,   220,   185,    -1,   215,
-     214,   283,     7,   279,    -1,    -1,   215,   214,   283,     7,
-     184,   279,   217,   222,   185,    -1,    -1,   218,   214,   278,
-      -1,   265,     7,   279,    -1,   219,   183,   265,     7,   279,
-      -1,    -1,   220,   221,    -1,   183,     4,   271,    -1,   183,
-       4,   184,   219,   185,    -1,   183,     4,   279,    -1,    -1,
-     222,   223,    -1,   183,     4,   265,    -1,   183,     4,   279,
-      -1,   183,     4,   184,   281,   185,    -1,   265,    -1,   279,
-      -1,    -1,   130,    68,   184,   265,   185,    -1,    -1,    80,
-     268,    -1,    64,   177,   265,   178,     7,   268,     6,    -1,
-      -1,    84,    64,   228,   177,   224,   178,     7,   271,     6,
-      -1,    73,    74,   271,     7,   265,     6,    -1,    67,   177,
-     265,   178,     7,   271,     6,    -1,    89,    67,   271,     6,
-      -1,    71,   177,   265,   178,     7,   271,     6,    -1,    65,
-     177,   265,   178,     7,   271,   226,     6,    -1,    66,   177,
-     265,   178,     7,   271,   226,     6,    -1,   122,   177,   265,
-     178,     7,   271,     6,    -1,   123,   177,   265,   178,     7,
-     271,     6,    -1,   124,   177,   265,   178,     7,   271,   126,
-     271,   125,   265,     6,    -1,    67,     4,   177,   265,   178,
-       7,   271,     6,    -1,    85,    67,   177,   265,   178,     7,
-     271,     6,    -1,    -1,    84,    67,   229,   177,   224,   178,
-       7,   271,     6,    -1,    80,    70,   177,   265,   178,     7,
-     271,     6,    -1,    81,    70,   177,   265,   178,     7,   271,
-     225,     6,    -1,    12,    13,     6,    -1,    13,    70,   265,
-       6,    -1,    75,    70,   177,   265,   178,     7,     5,     5,
-       5,     6,    -1,    68,   177,   265,   178,     7,   271,     6,
-      -1,    69,   177,   265,   178,     7,   271,     6,    -1,    70,
-       4,   177,   265,   178,     7,   271,     6,    -1,    85,    70,
-     177,   265,   178,     7,   271,     6,    -1,    85,    70,   177,
-     265,   178,     7,   271,     4,   184,   270,   185,     6,    -1,
-      -1,    84,    70,   230,   177,   224,   178,     7,   271,     6,
-      -1,    83,    72,   177,   265,   178,     7,   271,     6,    -1,
-      72,   177,   265,   178,     7,   271,     6,    -1,    85,    72,
-     177,   265,   178,     7,   271,     6,    -1,    -1,    84,    72,
-     231,   177,   224,   178,     7,   271,     6,    -1,    92,   268,
-     184,   233,   185,    -1,    91,   184,   268,   183,   268,   183,
-     265,   185,   184,   233,   185,    -1,    93,   268,   184,   233,
-     185,    -1,    94,   184,   268,   183,   265,   185,   184,   233,
-     185,    -1,    94,   184,   268,   183,   268,   185,   184,   233,
-     185,    -1,     4,   184,   233,   185,    -1,   102,    67,   184,
-     274,   185,    70,   184,   265,   185,    -1,    99,    67,   177,
-     265,   178,   184,   274,   185,     6,    -1,   234,    -1,   232,
-      -1,    -1,   234,   227,    -1,   234,    64,   184,   274,   185,
-       6,    -1,   234,    67,   184,   274,   185,     6,    -1,   234,
-      70,   184,   274,   185,     6,    -1,   234,    72,   184,   274,
-     185,     6,    -1,    96,    80,   177,   265,   178,     7,   271,
-       6,    -1,    96,    64,   177,   265,   178,     7,   184,   270,
-     185,     6,    -1,    96,    80,   177,   265,   178,     7,   184,
-     268,   183,   268,   183,   274,   185,     6,    -1,    96,    80,
-     177,   265,   178,     7,   184,   268,   183,   268,   183,   268,
-     183,   274,   185,     6,    -1,    96,    68,   177,   265,   178,
-       7,   184,   268,   183,   274,   185,     6,    -1,    96,     4,
-     177,   265,   178,     7,   271,     6,    -1,    96,     4,   177,
-     265,   178,     7,     5,     6,    -1,    96,     4,   184,   265,
-     185,     6,    -1,    96,     4,   177,   265,   178,     7,   184,
-     268,   183,   268,   183,   274,   185,     6,    -1,   100,   184,
-     234,   185,    -1,   100,   136,   179,   265,   180,     6,    -1,
-     100,     4,   179,   265,   180,     6,    -1,   100,     4,     6,
-      -1,   100,     4,     4,     6,    -1,   127,   275,   184,   234,
-     185,    -1,    90,   127,   275,   184,   234,   185,    -1,   140,
-       5,     6,    -1,   141,     5,     6,    -1,   140,   184,   234,
-     185,    -1,    90,   140,   184,   234,   185,    -1,   141,   184,
-     234,   185,    -1,    90,   141,   184,   234,   185,    -1,     4,
-     279,     6,    -1,     4,     4,   179,   265,   180,   278,     6,
-      -1,     4,     4,     4,   179,   265,   180,     6,    -1,     4,
-     265,     6,    -1,    88,   177,     4,   178,   181,     4,     6,
-      -1,   121,     4,     6,    -1,   134,     6,    -1,   135,     6,
-      -1,    53,     6,    -1,    48,     6,    -1,    48,   184,   265,
-     183,   265,   183,   265,   183,   265,   183,   265,   183,   265,
-     185,     6,    -1,    49,     6,    -1,    50,     6,    -1,    57,
-       6,    -1,    58,     6,    -1,    77,     6,    -1,    78,   184,
-     274,   185,   184,   274,   185,   184,   270,   185,   184,   265,
-     183,   265,   185,     6,    -1,   148,   265,     6,    -1,   129,
-     177,   265,     8,   265,   178,    -1,   129,   177,   265,     8,
-     265,     8,   265,   178,    -1,   129,     4,   130,   184,   265,
-       8,   265,   185,    -1,   129,     4,   130,   184,   265,     8,
-     265,     8,   265,   185,    -1,   131,    -1,   139,     4,    -1,
-     137,    -1,   138,     4,     6,    -1,   132,   177,   265,   178,
-      -1,   133,    -1,    95,   268,   184,   234,   185,    -1,    95,
-     184,   268,   183,   268,   183,   265,   185,   184,   234,   185,
-      -1,    95,   184,   268,   183,   268,   183,   268,   183,   265,
-     185,   184,   234,   185,    -1,    -1,    95,   268,   184,   234,
-     242,   255,   185,    -1,    -1,    95,   184,   268,   183,   268,
-     183,   265,   185,   184,   234,   243,   255,   185,    -1,    -1,
-      95,   184,   268,   183,   268,   183,   268,   183,   265,   185,
-     184,   234,   244,   255,   185,    -1,    -1,    95,   184,   234,
-     245,   255,   185,    -1,    95,    64,   184,   265,   183,   268,
-     185,     6,    -1,    95,    67,   184,   265,   183,   268,   185,
-       6,    -1,    95,    70,   184,   265,   183,   268,   185,     6,
-      -1,    95,    64,   184,   265,   183,   268,   183,   268,   183,
-     265,   185,     6,    -1,    95,    67,   184,   265,   183,   268,
-     183,   268,   183,   265,   185,     6,    -1,    95,    70,   184,
-     265,   183,   268,   183,   268,   183,   265,   185,     6,    -1,
-      95,    64,   184,   265,   183,   268,   183,   268,   183,   268,
-     183,   265,   185,     6,    -1,    95,    67,   184,   265,   183,
-     268,   183,   268,   183,   268,   183,   265,   185,     6,    -1,
-      95,    70,   184,   265,   183,   268,   183,   268,   183,   268,
-     183,   265,   185,     6,    -1,    -1,    95,    64,   184,   265,
-     183,   268,   185,   246,   184,   255,   185,     6,    -1,    -1,
-      95,    67,   184,   265,   183,   268,   185,   247,   184,   255,
-     185,     6,    -1,    -1,    95,    70,   184,   265,   183,   268,
-     185,   248,   184,   255,   185,     6,    -1,    -1,    95,    64,
-     184,   265,   183,   268,   183,   268,   183,   265,   185,   249,
-     184,   255,   185,     6,    -1,    -1,    95,    67,   184,   265,
-     183,   268,   183,   268,   183,   265,   185,   250,   184,   255,
-     185,     6,    -1,    -1,    95,    70,   184,   265,   183,   268,
-     183,   268,   183,   265,   185,   251,   184,   255,   185,     6,
-      -1,    -1,    95,    64,   184,   265,   183,   268,   183,   268,
-     183,   268,   183,   265,   185,   252,   184,   255,   185,     6,
-      -1,    -1,    95,    67,   184,   265,   183,   268,   183,   268,
-     183,   268,   183,   265,   185,   253,   184,   255,   185,     6,
-      -1,    -1,    95,    70,   184,   265,   183,   268,   183,   268,
-     183,   268,   183,   265,   185,   254,   184,   255,   185,     6,
-      -1,   256,    -1,   255,   256,    -1,   105,   184,   265,   185,
-       6,    -1,   105,   184,   271,   183,   271,   185,     6,    -1,
-     105,   184,   271,   183,   271,   183,   271,   185,     6,    -1,
-     106,     6,    -1,    97,     6,    -1,   113,     6,    -1,   113,
-     115,     6,    -1,   114,     6,    -1,   114,   115,     6,    -1,
-     111,     6,    -1,   111,   115,     6,    -1,   112,     6,    -1,
-     112,   115,     6,    -1,   107,   177,   265,   178,     7,   271,
-      87,   265,     6,    -1,    87,     4,   179,   265,   180,     6,
-      -1,    -1,    87,     4,   265,    -1,    -1,     4,    -1,    -1,
-       7,   271,    -1,    -1,     7,   265,    -1,    82,    67,   272,
-       7,   265,   257,     6,    -1,    82,    70,   272,   259,   258,
-       6,    -1,    76,    70,   184,   265,   185,     7,   271,     6,
-      -1,    82,    72,   272,   259,     6,    -1,   116,   272,     6,
-      -1,   103,    70,   184,   274,   185,   265,     6,    -1,    97,
-      70,   272,   260,     6,    -1,    97,    72,   272,     6,    -1,
-      98,    70,   271,     7,   265,     6,    -1,    86,    67,   271,
-       7,   271,     6,    -1,    86,    70,   265,   184,   274,   185,
-       7,   265,   184,   274,   185,     6,    -1,    64,   184,   274,
-     185,   130,    70,   184,   265,   185,     6,    -1,    67,   184,
-     274,   185,   130,    70,   184,   265,   185,     6,    -1,    64,
-     184,   274,   185,   130,    72,   184,   265,   185,     6,    -1,
-      67,   184,   274,   185,   130,    72,   184,   265,   185,     6,
-      -1,    70,   184,   274,   185,   130,    72,   184,   265,   185,
-       6,    -1,   104,    70,   272,     6,    -1,   104,    67,   272,
-       6,    -1,    79,    64,   272,     6,    -1,    79,    67,   272,
-       6,    -1,    79,    70,   272,     6,    -1,   101,     6,    -1,
-     101,     4,     6,    -1,   101,    64,   184,   274,   185,     6,
-      -1,   145,    -1,   146,    -1,   147,    -1,   263,     6,    -1,
-     263,   184,   271,   185,     6,    -1,   263,   184,   271,   183,
-     271,   185,     6,    -1,   263,   177,   271,   178,   184,   271,
-     183,   271,   185,     6,    -1,   266,    -1,   177,   265,   178,
-      -1,   168,   265,    -1,   167,   265,    -1,   172,   265,    -1,
-     265,   168,   265,    -1,   265,   167,   265,    -1,   265,   169,
-     265,    -1,   265,   170,   265,    -1,   265,   171,   265,    -1,
-     265,   176,   265,    -1,   265,   163,   265,    -1,   265,   164,
-     265,    -1,   265,   166,   265,    -1,   265,   165,   265,    -1,
-     265,   162,   265,    -1,   265,   161,   265,    -1,   265,   160,
-     265,    -1,   265,   159,   265,    -1,   265,   158,   265,     8,
-     265,    -1,    14,   211,   265,   212,    -1,    15,   211,   265,
-     212,    -1,    16,   211,   265,   212,    -1,    17,   211,   265,
-     212,    -1,    18,   211,   265,   212,    -1,    19,   211,   265,
-     212,    -1,    20,   211,   265,   212,    -1,    21,   211,   265,
-     212,    -1,    22,   211,   265,   212,    -1,    24,   211,   265,
-     212,    -1,    25,   211,   265,   183,   265,   212,    -1,    26,
-     211,   265,   212,    -1,    27,   211,   265,   212,    -1,    28,
-     211,   265,   212,    -1,    29,   211,   265,   212,    -1,    30,
-     211,   265,   212,    -1,    31,   211,   265,   212,    -1,    32,
-     211,   265,   212,    -1,    33,   211,   265,   183,   265,   212,
-      -1,    34,   211,   265,   183,   265,   212,    -1,    35,   211,
-     265,   183,   265,   212,    -1,    23,   211,   265,   212,    -1,
-       3,    -1,     9,    -1,    10,    -1,    11,    -1,   151,    -1,
-     152,    -1,   153,    -1,    54,    -1,    55,    -1,    56,    -1,
-      -1,    62,   211,   265,   267,   220,   212,    -1,   283,    -1,
-       4,   179,   265,   180,    -1,   282,   179,   265,   180,    -1,
-     149,   177,   283,   178,    -1,   150,   177,   279,   178,    -1,
-     182,   283,   179,   180,    -1,   283,   210,    -1,     4,   179,
-     265,   180,   210,    -1,   282,   179,   265,   180,   210,    -1,
-       4,   181,     4,    -1,     4,   179,   265,   180,   181,     4,
-      -1,     4,   181,     4,   210,    -1,     4,   179,   265,   180,
-     181,     4,   210,    -1,   142,   177,   278,   183,   265,   178,
-      -1,    45,   177,   278,   183,   278,   178,    -1,    46,   177,
-     278,   183,   278,   178,    -1,    47,   177,   281,   178,    -1,
-     269,    -1,   168,   268,    -1,   167,   268,    -1,   268,   168,
-     268,    -1,   268,   167,   268,    -1,   184,   265,   183,   265,
-     183,   265,   183,   265,   183,   265,   185,    -1,   184,   265,
-     183,   265,   183,   265,   183,   265,   185,    -1,   184,   265,
-     183,   265,   183,   265,   185,    -1,   177,   265,   183,   265,
-     183,   265,   178,    -1,   271,    -1,   270,   183,   271,    -1,
-     265,    -1,   273,    -1,   184,   185,    -1,   184,   274,   185,
-      -1,   168,   184,   274,   185,    -1,   265,   169,   184,   274,
-     185,    -1,   271,    -1,     5,    -1,   168,   273,    -1,   265,
-     169,   273,    -1,   265,     8,   265,    -1,   265,     8,   265,
-       8,   265,    -1,    64,   184,   265,   185,    -1,    64,     5,
-      -1,    67,     5,    -1,    70,     5,    -1,    72,     5,    -1,
-      84,    64,   184,   274,   185,    -1,    84,    67,   184,   274,
-     185,    -1,    84,    70,   184,   274,   185,    -1,    84,    72,
-     184,   274,   185,    -1,   232,    -1,   241,    -1,     4,   211,
-     212,    -1,    36,   179,     4,   180,    -1,     4,   211,   184,
-     274,   185,   212,    -1,   265,    -1,   273,    -1,   274,   183,
-     265,    -1,   274,   183,   273,    -1,   184,   265,   183,   265,
-     183,   265,   183,   265,   185,    -1,   184,   265,   183,   265,
-     183,   265,   185,    -1,     4,    -1,     4,   181,   127,   181,
-       4,    -1,   184,   277,   185,    -1,     4,   179,   265,   180,
-     181,   128,    -1,   275,    -1,   277,   183,   275,    -1,   279,
-      -1,   283,    -1,     4,   181,     4,    -1,     4,   179,   265,
-     180,   181,     4,    -1,     5,    -1,    51,    -1,    52,    -1,
-     143,   177,   278,   178,    -1,   144,   177,   278,   183,   278,
-     178,    -1,    41,   211,   278,   183,   278,   212,    -1,    42,
-     177,   278,   178,    -1,    43,   177,   278,   178,    -1,    44,
-     177,   278,   183,   278,   183,   278,   178,    -1,    39,   211,
-     281,   212,    -1,    40,   211,   278,   212,    -1,    40,   211,
-     278,   183,   274,   212,    -1,    -1,    63,   211,   279,   280,
-     222,   212,    -1,   278,    -1,   281,   183,   278,    -1,     4,
-     186,   184,   265,   185,    -1,   282,   186,   184,   265,   185,
-      -1,     4,    -1,   282,    -1
+     192,     0,    -1,   193,    -1,     1,     6,    -1,    -1,   193,
+     194,    -1,   197,    -1,   196,    -1,   217,    -1,   234,    -1,
+     235,    -1,   239,    -1,   240,    -1,   241,    -1,   244,    -1,
+     265,    -1,   266,    -1,   243,    -1,   242,    -1,   238,    -1,
+     268,    -1,   168,    -1,   168,   168,    -1,    37,   181,   282,
+     182,     6,    -1,    38,   181,   282,   182,     6,    -1,    37,
+     181,   282,   182,   195,   282,     6,    -1,    37,   181,   282,
+     187,   278,   182,     6,    -1,    38,   181,   282,   187,   278,
+     182,     6,    -1,    37,   181,   282,   187,   278,   182,   195,
+     282,     6,    -1,     4,   282,   188,   198,   189,     6,    -1,
+     112,     4,   183,   269,   184,     6,    -1,   113,     4,   183,
+     269,   184,     6,    -1,   114,     4,   183,   269,   187,   269,
+     184,     6,    -1,    -1,   198,   201,    -1,   198,   205,    -1,
+     198,   208,    -1,   198,   210,    -1,   198,   211,    -1,   269,
+      -1,   199,   187,   269,    -1,   269,    -1,   200,   187,   269,
+      -1,    -1,    -1,     4,   202,   181,   199,   182,   203,   188,
+     200,   189,     6,    -1,   282,    -1,   204,   187,   282,    -1,
+      -1,   121,   181,   269,   187,   269,   187,   269,   182,   206,
+     188,   204,   189,     6,    -1,   282,    -1,   207,   187,   282,
+      -1,    -1,   122,   181,   269,   187,   269,   187,   269,   187,
+     269,   182,   209,   188,   207,   189,     6,    -1,   123,   188,
+     274,   189,   188,   274,   189,     6,    -1,   123,   188,   274,
+     189,   188,   274,   189,   188,   274,   189,   188,   274,   189,
+       6,    -1,    -1,   124,   212,   188,   200,   189,     6,    -1,
+       7,    -1,   161,    -1,   160,    -1,   159,    -1,   158,    -1,
+     179,    -1,   178,    -1,   181,    -1,   183,    -1,   182,    -1,
+     184,    -1,    64,   183,   219,   184,     6,    -1,    65,   183,
+     222,   184,     6,    -1,   287,   213,   275,     6,    -1,     4,
+     183,   184,   213,   275,     6,    -1,   286,   183,   184,   213,
+     275,     6,    -1,     4,   183,   269,   184,   213,   269,     6,
+      -1,     4,   181,   269,   182,   213,   269,     6,    -1,   286,
+     183,   269,   184,   213,   269,     6,    -1,     4,   215,   188,
+     278,   189,   216,   213,   275,     6,    -1,   286,   215,   188,
+     278,   189,   216,   213,   275,     6,    -1,   287,   214,     6,
+      -1,     4,   183,   269,   184,   214,     6,    -1,   286,   183,
+     269,   184,   214,     6,    -1,   287,     7,   283,     6,    -1,
+       4,   185,     4,     7,   283,     6,    -1,     4,   183,   269,
+     184,   185,     4,     7,   283,     6,    -1,     4,   185,     4,
+     213,   269,     6,    -1,     4,   183,   269,   184,   185,     4,
+     213,   269,     6,    -1,     4,   185,     4,   214,     6,    -1,
+       4,   183,   269,   184,   185,     4,   214,     6,    -1,     4,
+     185,   131,   185,     4,     7,   279,     6,    -1,     4,   183,
+     269,   184,   185,   131,   185,     4,     7,   279,     6,    -1,
+       4,   185,   132,     7,   280,     6,    -1,     4,   183,   269,
+     184,   185,   132,     7,   280,     6,    -1,     4,   140,     7,
+     269,     6,    -1,   140,   183,   269,   184,     7,     4,     6,
+      -1,   140,   183,   269,   184,   185,     4,     7,   269,     6,
+      -1,   140,   183,   269,   184,   185,     4,     7,   283,     6,
+      -1,   140,   183,   269,   184,   185,     4,     7,   188,   278,
+     189,     6,    -1,   140,   183,   269,   184,   185,     4,     6,
+      -1,    92,   181,     4,   182,   185,     4,     7,   269,     6,
+      -1,    92,   181,     4,   182,   185,     4,     7,   283,     6,
+      -1,    -1,   187,    -1,    -1,   219,   218,   287,    -1,   219,
+     218,   287,     7,   269,    -1,    -1,   219,   218,   287,     7,
+     188,   269,   220,   224,   189,    -1,   219,   218,   287,     7,
+     283,    -1,    -1,   219,   218,   287,     7,   188,   283,   221,
+     226,   189,    -1,    -1,   222,   218,   282,    -1,   269,     7,
+     283,    -1,   223,   187,   269,     7,   283,    -1,    -1,   224,
+     225,    -1,   187,     4,   275,    -1,   187,     4,   188,   223,
+     189,    -1,   187,     4,   283,    -1,    -1,   226,   227,    -1,
+     187,     4,   269,    -1,   187,     4,   283,    -1,   187,     4,
+     188,   285,   189,    -1,   269,    -1,   283,    -1,   269,    -1,
+     283,    -1,   269,    -1,   283,    -1,   269,    -1,   283,    -1,
+      -1,   134,    72,   188,   269,   189,    -1,    -1,    84,   272,
+      -1,    68,   181,   269,   182,     7,   272,     6,    -1,    88,
+      68,   181,   228,   182,   213,   275,     6,    -1,    77,    78,
+     275,     7,   269,     6,    -1,    71,   181,   269,   182,     7,
+     275,     6,    -1,    93,    71,   275,     6,    -1,    75,   181,
+     269,   182,     7,   275,     6,    -1,    69,   181,   269,   182,
+       7,   275,   233,     6,    -1,    70,   181,   269,   182,     7,
+     275,   233,     6,    -1,   126,   181,   269,   182,     7,   275,
+       6,    -1,   127,   181,   269,   182,     7,   275,     6,    -1,
+     128,   181,   269,   182,     7,   275,   130,   275,   129,   269,
+       6,    -1,    71,     4,   181,   269,   182,     7,   275,     6,
+      -1,    89,    71,   181,   269,   182,     7,   275,     6,    -1,
+      88,    71,   181,   229,   182,   213,   275,     6,    -1,    84,
+      74,   181,   269,   182,     7,   275,     6,    -1,    85,    74,
+     181,   269,   182,     7,   275,   232,     6,    -1,    12,    13,
+       6,    -1,    13,    74,   269,     6,    -1,    79,    74,   181,
+     269,   182,     7,     5,     5,     5,     6,    -1,    72,   181,
+     269,   182,     7,   275,     6,    -1,    73,   181,   269,   182,
+       7,   275,     6,    -1,    74,     4,   181,   269,   182,     7,
+     275,     6,    -1,    89,    74,   181,   269,   182,     7,   275,
+       6,    -1,    89,    74,   181,   269,   182,     7,   275,     4,
+     188,   274,   189,     6,    -1,    88,    74,   181,   230,   182,
+     213,   275,     6,    -1,    87,    76,   181,   269,   182,     7,
+     275,     6,    -1,    76,   181,   269,   182,     7,   275,     6,
+      -1,    89,    76,   181,   269,   182,     7,   275,     6,    -1,
+      88,    76,   181,   231,   182,   213,   275,     6,    -1,    96,
+     272,   188,   236,   189,    -1,    95,   188,   272,   187,   272,
+     187,   269,   189,   188,   236,   189,    -1,    97,   272,   188,
+     236,   189,    -1,    98,   188,   272,   187,   269,   189,   188,
+     236,   189,    -1,    98,   188,   272,   187,   272,   189,   188,
+     236,   189,    -1,     4,   188,   236,   189,    -1,   106,    71,
+     188,   278,   189,    74,   188,   269,   189,    -1,   103,    71,
+     181,   269,   182,   188,   278,   189,     6,    -1,   237,    -1,
+     235,    -1,    -1,   237,   234,    -1,   237,    68,   188,   278,
+     189,     6,    -1,   237,    71,   188,   278,   189,     6,    -1,
+     237,    74,   188,   278,   189,     6,    -1,   237,    76,   188,
+     278,   189,     6,    -1,   100,    84,   181,   269,   182,     7,
+     275,     6,    -1,   100,    68,   181,   269,   182,     7,   188,
+     274,   189,     6,    -1,   100,    84,   181,   269,   182,     7,
+     188,   272,   187,   272,   187,   278,   189,     6,    -1,   100,
+      84,   181,   269,   182,     7,   188,   272,   187,   272,   187,
+     272,   187,   278,   189,     6,    -1,   100,    72,   181,   269,
+     182,     7,   188,   272,   187,   278,   189,     6,    -1,   100,
+       4,   181,   269,   182,     7,   275,     6,    -1,   100,     4,
+     181,   269,   182,     7,     5,     6,    -1,   100,     4,   188,
+     269,   189,     6,    -1,   100,     4,   181,   269,   182,     7,
+     188,   272,   187,   272,   187,   278,   189,     6,    -1,   104,
+     188,   237,   189,    -1,   104,   140,   183,   269,   184,     6,
+      -1,   104,     4,   183,   269,   184,     6,    -1,   104,     4,
+       6,    -1,   104,     4,     4,     6,    -1,   131,   279,   188,
+     237,   189,    -1,    94,   131,   279,   188,   237,   189,    -1,
+     144,     5,     6,    -1,   145,     5,     6,    -1,   144,   188,
+     237,   189,    -1,    94,   144,   188,   237,   189,    -1,   145,
+     188,   237,   189,    -1,    94,   145,   188,   237,   189,    -1,
+       4,   283,     6,    -1,    57,   181,   285,   182,     6,    -1,
+       4,     4,   183,   269,   184,   282,     6,    -1,     4,     4,
+       4,   183,   269,   184,     6,    -1,     4,   269,     6,    -1,
+      92,   181,     4,   182,   185,     4,     6,    -1,   125,     4,
+       6,    -1,   138,     6,    -1,   139,     6,    -1,    55,     6,
+      -1,    50,     6,    -1,    50,   188,   269,   187,   269,   187,
+     269,   187,   269,   187,   269,   187,   269,   189,     6,    -1,
+      51,     6,    -1,    52,     6,    -1,    61,     6,    -1,    62,
+       6,    -1,    81,     6,    -1,    82,   188,   278,   189,   188,
+     278,   189,   188,   274,   189,   188,   269,   187,   269,   189,
+       6,    -1,   152,   269,     6,    -1,   133,   181,   269,     8,
+     269,   182,    -1,   133,   181,   269,     8,   269,     8,   269,
+     182,    -1,   133,     4,   134,   188,   269,     8,   269,   189,
+      -1,   133,     4,   134,   188,   269,     8,   269,     8,   269,
+     189,    -1,   135,    -1,   143,     4,    -1,   141,    -1,   142,
+     287,     6,    -1,   136,   181,   269,   182,    -1,   137,    -1,
+      99,   272,   188,   237,   189,    -1,    99,   188,   272,   187,
+     272,   187,   269,   189,   188,   237,   189,    -1,    99,   188,
+     272,   187,   272,   187,   272,   187,   269,   189,   188,   237,
+     189,    -1,    -1,    99,   272,   188,   237,   245,   258,   189,
+      -1,    -1,    99,   188,   272,   187,   272,   187,   269,   189,
+     188,   237,   246,   258,   189,    -1,    -1,    99,   188,   272,
+     187,   272,   187,   272,   187,   269,   189,   188,   237,   247,
+     258,   189,    -1,    -1,    99,   188,   237,   248,   258,   189,
+      -1,    99,    68,   188,   269,   187,   272,   189,     6,    -1,
+      99,    71,   188,   269,   187,   272,   189,     6,    -1,    99,
+      74,   188,   269,   187,   272,   189,     6,    -1,    99,    68,
+     188,   269,   187,   272,   187,   272,   187,   269,   189,     6,
+      -1,    99,    71,   188,   269,   187,   272,   187,   272,   187,
+     269,   189,     6,    -1,    99,    74,   188,   269,   187,   272,
+     187,   272,   187,   269,   189,     6,    -1,    99,    68,   188,
+     269,   187,   272,   187,   272,   187,   272,   187,   269,   189,
+       6,    -1,    99,    71,   188,   269,   187,   272,   187,   272,
+     187,   272,   187,   269,   189,     6,    -1,    99,    74,   188,
+     269,   187,   272,   187,   272,   187,   272,   187,   269,   189,
+       6,    -1,    -1,    99,    68,   188,   269,   187,   272,   189,
+     249,   188,   258,   189,     6,    -1,    -1,    99,    71,   188,
+     269,   187,   272,   189,   250,   188,   258,   189,     6,    -1,
+      -1,    99,    74,   188,   269,   187,   272,   189,   251,   188,
+     258,   189,     6,    -1,    -1,    99,    68,   188,   269,   187,
+     272,   187,   272,   187,   269,   189,   252,   188,   258,   189,
+       6,    -1,    -1,    99,    71,   188,   269,   187,   272,   187,
+     272,   187,   269,   189,   253,   188,   258,   189,     6,    -1,
+      -1,    99,    74,   188,   269,   187,   272,   187,   272,   187,
+     269,   189,   254,   188,   258,   189,     6,    -1,    -1,    99,
+      68,   188,   269,   187,   272,   187,   272,   187,   272,   187,
+     269,   189,   255,   188,   258,   189,     6,    -1,    -1,    99,
+      71,   188,   269,   187,   272,   187,   272,   187,   272,   187,
+     269,   189,   256,   188,   258,   189,     6,    -1,    -1,    99,
+      74,   188,   269,   187,   272,   187,   272,   187,   272,   187,
+     269,   189,   257,   188,   258,   189,     6,    -1,   259,    -1,
+     258,   259,    -1,   109,   188,   269,   189,     6,    -1,   109,
+     188,   275,   187,   275,   189,     6,    -1,   109,   188,   275,
+     187,   275,   187,   275,   189,     6,    -1,   110,     6,    -1,
+     101,     6,    -1,   117,     6,    -1,   117,   119,     6,    -1,
+     118,     6,    -1,   118,   119,     6,    -1,   115,     6,    -1,
+     115,   119,     6,    -1,   116,     6,    -1,   116,   119,     6,
+      -1,   111,   181,   269,   182,     7,   275,    91,   269,     6,
+      -1,    91,     4,   183,   269,   184,     6,    -1,    -1,    91,
+       4,   269,    -1,    -1,     4,    -1,    -1,     7,   275,    -1,
+      -1,     7,   269,    -1,    -1,    91,   275,    -1,    86,    71,
+     276,     7,   269,   260,     6,    -1,    86,    74,   276,   262,
+     261,     6,    -1,    80,    74,   188,   269,   189,     7,   275,
+       6,    -1,    86,    76,   276,   262,     6,    -1,   120,   276,
+       6,    -1,   107,    74,   188,   278,   189,   269,     6,    -1,
+     101,    74,   276,   263,     6,    -1,   101,    76,   276,     6,
+      -1,   102,    74,   275,     7,   269,     6,    -1,    90,    71,
+     275,     7,   275,     6,    -1,    90,    74,   269,   188,   278,
+     189,     7,   269,   188,   278,   189,   264,     6,    -1,    68,
+     188,   278,   189,   134,    74,   188,   269,   189,     6,    -1,
+      71,   188,   278,   189,   134,    74,   188,   269,   189,     6,
+      -1,    68,   188,   278,   189,   134,    76,   188,   269,   189,
+       6,    -1,    71,   188,   278,   189,   134,    76,   188,   269,
+     189,     6,    -1,    74,   188,   278,   189,   134,    76,   188,
+     269,   189,     6,    -1,   108,    74,   276,     6,    -1,   108,
+      71,   276,     6,    -1,    83,    68,   276,     6,    -1,    83,
+      71,   276,     6,    -1,    83,    74,   276,     6,    -1,   105,
+       6,    -1,   105,     4,     6,    -1,   105,    68,   188,   278,
+     189,     6,    -1,   149,    -1,   150,    -1,   151,    -1,   267,
+       6,    -1,   267,   188,   275,   189,     6,    -1,   267,   188,
+     275,   187,   275,   189,     6,    -1,   267,   181,   275,   182,
+     188,   275,   187,   275,   189,     6,    -1,   270,    -1,   181,
+     269,   182,    -1,   172,   269,    -1,   171,   269,    -1,   176,
+     269,    -1,   269,   172,   269,    -1,   269,   171,   269,    -1,
+     269,   173,   269,    -1,   269,   174,   269,    -1,   269,   175,
+     269,    -1,   269,   180,   269,    -1,   269,   167,   269,    -1,
+     269,   168,   269,    -1,   269,   170,   269,    -1,   269,   169,
+     269,    -1,   269,   166,   269,    -1,   269,   165,   269,    -1,
+     269,   164,   269,    -1,   269,   163,   269,    -1,   269,   162,
+     269,     8,   269,    -1,    14,   215,   269,   216,    -1,    15,
+     215,   269,   216,    -1,    16,   215,   269,   216,    -1,    17,
+     215,   269,   216,    -1,    18,   215,   269,   216,    -1,    19,
+     215,   269,   216,    -1,    20,   215,   269,   216,    -1,    21,
+     215,   269,   216,    -1,    22,   215,   269,   216,    -1,    24,
+     215,   269,   216,    -1,    25,   215,   269,   187,   269,   216,
+      -1,    26,   215,   269,   216,    -1,    27,   215,   269,   216,
+      -1,    28,   215,   269,   216,    -1,    29,   215,   269,   216,
+      -1,    30,   215,   269,   216,    -1,    31,   215,   269,   216,
+      -1,    32,   215,   269,   216,    -1,    33,   215,   269,   187,
+     269,   216,    -1,    34,   215,   269,   187,   269,   216,    -1,
+      35,   215,   269,   187,   269,   216,    -1,    23,   215,   269,
+     216,    -1,     3,    -1,     9,    -1,    10,    -1,    11,    -1,
+     155,    -1,   156,    -1,   157,    -1,    58,    -1,    59,    -1,
+      60,    -1,    -1,    66,   215,   269,   271,   224,   216,    -1,
+     287,    -1,     4,   183,   269,   184,    -1,   286,   183,   269,
+     184,    -1,   153,   181,   287,   182,    -1,   154,   181,   283,
+     182,    -1,   186,   287,   183,   184,    -1,   287,   214,    -1,
+       4,   183,   269,   184,   214,    -1,   286,   183,   269,   184,
+     214,    -1,     4,   185,     4,    -1,     4,   183,   269,   184,
+     185,     4,    -1,     4,   185,     4,   214,    -1,     4,   183,
+     269,   184,   185,     4,   214,    -1,   146,   181,   282,   187,
+     269,   182,    -1,    45,   181,   275,   187,   275,   182,    -1,
+      46,   181,   282,   187,   282,   182,    -1,    47,   181,   282,
+     187,   282,   182,    -1,    49,   181,   285,   182,    -1,   273,
+      -1,   172,   272,    -1,   171,   272,    -1,   272,   172,   272,
+      -1,   272,   171,   272,    -1,   188,   269,   187,   269,   187,
+     269,   187,   269,   187,   269,   189,    -1,   188,   269,   187,
+     269,   187,   269,   187,   269,   189,    -1,   188,   269,   187,
+     269,   187,   269,   189,    -1,   181,   269,   187,   269,   187,
+     269,   182,    -1,   275,    -1,   274,   187,   275,    -1,   269,
+      -1,   277,    -1,   188,   189,    -1,   188,   278,   189,    -1,
+     172,   188,   278,   189,    -1,   269,   173,   188,   278,   189,
+      -1,   275,    -1,     5,    -1,   172,   277,    -1,   269,   173,
+     277,    -1,   269,     8,   269,    -1,   269,     8,   269,     8,
+     269,    -1,    68,   188,   269,   189,    -1,    68,     5,    -1,
+      71,     5,    -1,    74,     5,    -1,    76,     5,    -1,    88,
+      68,     5,    -1,    88,    71,     5,    -1,    88,    74,     5,
+      -1,    88,    76,     5,    -1,    88,    68,   188,   278,   189,
+      -1,    88,    71,   188,   278,   189,    -1,    88,    74,   188,
+     278,   189,    -1,    88,    76,   188,   278,   189,    -1,    68,
+     134,    50,   188,   269,   187,   269,   187,   269,   187,   269,
+     187,   269,   187,   269,   189,    -1,    71,   134,    50,   188,
+     269,   187,   269,   187,   269,   187,   269,   187,   269,   187,
+     269,   189,    -1,    74,   134,    50,   188,   269,   187,   269,
+     187,   269,   187,   269,   187,   269,   187,   269,   189,    -1,
+      76,   134,    50,   188,   269,   187,   269,   187,   269,   187,
+     269,   187,   269,   187,   269,   189,    -1,   235,    -1,   244,
+      -1,     4,   215,   216,    -1,   286,   215,   216,    -1,    36,
+     183,   287,   184,    -1,     4,   215,   188,   278,   189,   216,
+      -1,   286,   215,   188,   278,   189,   216,    -1,   269,    -1,
+     277,    -1,   278,   187,   269,    -1,   278,   187,   277,    -1,
+     188,   269,   187,   269,   187,   269,   187,   269,   189,    -1,
+     188,   269,   187,   269,   187,   269,   189,    -1,     4,    -1,
+       4,   185,   131,   185,     4,    -1,   188,   281,   189,    -1,
+       4,   183,   269,   184,   185,   132,    -1,   279,    -1,   281,
+     187,   279,    -1,   283,    -1,   287,    -1,     4,   185,     4,
+      -1,     4,   183,   269,   184,   185,     4,    -1,     5,    -1,
+      53,    -1,    56,    -1,   147,   181,   282,   182,    -1,   148,
+     181,   282,   187,   282,   182,    -1,    41,   215,   285,   216,
+      -1,    42,   181,   282,   182,    -1,    43,   181,   282,   182,
+      -1,    44,   181,   282,   187,   282,   187,   282,   182,    -1,
+      39,   215,   285,   216,    -1,    48,   215,   269,   187,   283,
+     187,   283,   216,    -1,    40,   215,   282,   216,    -1,    40,
+     215,   282,   187,   278,   216,    -1,    54,   215,   282,   216,
+      -1,    -1,    67,   215,   283,   284,   226,   216,    -1,   282,
+      -1,   285,   187,   282,    -1,     4,   190,   188,   269,   189,
+      -1,   286,   190,   188,   269,   189,    -1,     4,    -1,   286,
+      -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   182,   182,   183,   188,   190,   194,   195,   196,   197,
-     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
-     208,   212,   216,   223,   228,   233,   247,   260,   273,   301,
-     315,   328,   341,   360,   365,   366,   367,   368,   369,   373,
-     375,   380,   382,   388,   492,   387,   510,   517,   528,   527,
-     545,   552,   563,   562,   579,   596,   619,   618,   632,   633,
-     634,   635,   636,   640,   641,   647,   647,   648,   648,   654,
-     655,   656,   717,   746,   751,   756,   761,   768,   775,   790,
-     795,   800,   809,   815,   824,   842,   860,   869,   881,   886,
-     894,   914,   937,   948,   956,   978,  1001,  1027,  1048,  1060,
-    1074,  1074,  1076,  1078,  1087,  1097,  1096,  1108,  1118,  1117,
-    1131,  1133,  1141,  1147,  1154,  1155,  1159,  1170,  1185,  1195,
-    1196,  1201,  1209,  1218,  1236,  1240,  1251,  1254,  1267,  1270,
-    1280,  1304,  1303,  1323,  1345,  1363,  1384,  1402,  1432,  1462,
-    1480,  1498,  1525,  1543,  1562,  1561,  1584,  1602,  1641,  1647,
-    1653,  1660,  1685,  1710,  1727,  1746,  1781,  1780,  1804,  1822,
-    1839,  1856,  1855,  1881,  1886,  1891,  1896,  1901,  1906,  1929,
-    1935,  1946,  1947,  1952,  1955,  1959,  1982,  2005,  2028,  2056,
-    2077,  2103,  2124,  2146,  2166,  2278,  2297,  2335,  2444,  2453,
-    2459,  2474,  2502,  2519,  2528,  2542,  2548,  2554,  2563,  2572,
-    2581,  2595,  2648,  2665,  2680,  2699,  2711,  2735,  2739,  2744,
-    2751,  2757,  2762,  2768,  2776,  2780,  2784,  2789,  2844,  2857,
-    2874,  2891,  2912,  2933,  2968,  2976,  2982,  2989,  2993,  3002,
-    3010,  3018,  3027,  3026,  3041,  3040,  3055,  3054,  3069,  3068,
-    3082,  3089,  3096,  3103,  3110,  3117,  3124,  3131,  3138,  3146,
-    3145,  3159,  3158,  3172,  3171,  3185,  3184,  3198,  3197,  3211,
-    3210,  3224,  3223,  3237,  3236,  3250,  3249,  3266,  3269,  3275,
-    3287,  3307,  3331,  3335,  3339,  3343,  3347,  3353,  3359,  3363,
-    3367,  3371,  3375,  3394,  3407,  3410,  3426,  3429,  3446,  3449,
-    3455,  3458,  3465,  3521,  3591,  3596,  3663,  3699,  3707,  3750,
-    3789,  3809,  3836,  3876,  3899,  3922,  3926,  3930,  3953,  3992,
-    4031,  4052,  4073,  4100,  4104,  4114,  4149,  4150,  4151,  4155,
-    4161,  4173,  4191,  4219,  4220,  4221,  4222,  4223,  4224,  4225,
-    4226,  4227,  4234,  4235,  4236,  4237,  4238,  4239,  4240,  4241,
-    4242,  4243,  4244,  4245,  4246,  4247,  4248,  4249,  4250,  4251,
-    4252,  4253,  4254,  4255,  4256,  4257,  4258,  4259,  4260,  4261,
-    4262,  4263,  4264,  4265,  4266,  4275,  4276,  4277,  4278,  4279,
-    4280,  4281,  4282,  4283,  4284,  4289,  4288,  4296,  4313,  4331,
-    4349,  4354,  4360,  4372,  4389,  4407,  4428,  4433,  4438,  4448,
-    4458,  4463,  4472,  4477,  4504,  4508,  4512,  4516,  4520,  4527,
-    4531,  4535,  4539,  4546,  4551,  4558,  4563,  4567,  4572,  4576,
-    4584,  4595,  4599,  4611,  4619,  4627,  4634,  4644,  4664,  4668,
-    4672,  4676,  4680,  4709,  4738,  4767,  4796,  4806,  4816,  4828,
-    4840,  4861,  4866,  4870,  4874,  4886,  4890,  4902,  4909,  4919,
-    4923,  4938,  4943,  4950,  4954,  4967,  4975,  4986,  4990,  4998,
-    5004,  5012,  5020,  5028,  5042,  5056,  5068,  5084,  5088,  5108,
-    5107,  5120,  5125,  5131,  5140,  5153,  5156
+       0,   183,   183,   184,   189,   191,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   213,   217,   224,   229,   234,   248,   261,   274,   302,
+     316,   329,   342,   361,   366,   367,   368,   369,   370,   374,
+     376,   381,   383,   389,   493,   388,   511,   518,   529,   528,
+     546,   553,   564,   563,   580,   597,   620,   619,   633,   634,
+     635,   636,   637,   641,   642,   648,   648,   649,   649,   655,
+     656,   657,   718,   747,   776,   781,   786,   791,   798,   805,
+     820,   825,   830,   839,   845,   854,   872,   890,   899,   911,
+     916,   924,   944,   967,   978,   986,  1008,  1031,  1057,  1078,
+    1090,  1104,  1104,  1106,  1108,  1117,  1127,  1126,  1138,  1148,
+    1147,  1161,  1163,  1171,  1177,  1184,  1185,  1189,  1200,  1215,
+    1225,  1226,  1231,  1239,  1248,  1266,  1270,  1279,  1283,  1292,
+    1296,  1305,  1309,  1319,  1322,  1335,  1338,  1348,  1371,  1403,
+    1426,  1444,  1465,  1483,  1513,  1543,  1561,  1579,  1606,  1624,
+    1642,  1677,  1695,  1734,  1740,  1746,  1753,  1778,  1803,  1820,
+    1839,  1873,  1909,  1927,  1944,  1960,  1997,  2002,  2007,  2012,
+    2017,  2022,  2045,  2051,  2062,  2063,  2068,  2071,  2075,  2098,
+    2121,  2144,  2172,  2193,  2219,  2240,  2262,  2282,  2394,  2413,
+    2451,  2560,  2569,  2575,  2590,  2618,  2635,  2644,  2658,  2664,
+    2670,  2679,  2688,  2697,  2711,  2767,  2785,  2802,  2817,  2836,
+    2848,  2872,  2876,  2881,  2888,  2894,  2899,  2905,  2913,  2917,
+    2921,  2926,  2981,  2994,  3011,  3028,  3049,  3070,  3105,  3113,
+    3119,  3126,  3130,  3139,  3147,  3155,  3164,  3163,  3178,  3177,
+    3192,  3191,  3206,  3205,  3219,  3226,  3233,  3240,  3247,  3254,
+    3261,  3268,  3275,  3283,  3282,  3296,  3295,  3309,  3308,  3322,
+    3321,  3335,  3334,  3348,  3347,  3361,  3360,  3374,  3373,  3387,
+    3386,  3403,  3406,  3412,  3424,  3444,  3468,  3472,  3476,  3480,
+    3484,  3490,  3496,  3500,  3504,  3508,  3512,  3531,  3544,  3547,
+    3563,  3566,  3583,  3586,  3592,  3595,  3602,  3605,  3612,  3668,
+    3738,  3743,  3810,  3846,  3854,  3897,  3936,  3956,  3983,  4032,
+    4060,  4088,  4092,  4096,  4124,  4163,  4202,  4223,  4244,  4271,
+    4275,  4285,  4320,  4321,  4322,  4326,  4332,  4344,  4362,  4390,
+    4391,  4392,  4393,  4394,  4395,  4396,  4397,  4398,  4405,  4406,
+    4407,  4408,  4409,  4410,  4411,  4412,  4413,  4414,  4415,  4416,
+    4417,  4418,  4419,  4420,  4421,  4422,  4423,  4424,  4425,  4426,
+    4427,  4428,  4429,  4430,  4431,  4432,  4433,  4434,  4435,  4436,
+    4437,  4446,  4447,  4448,  4449,  4450,  4451,  4452,  4453,  4454,
+    4455,  4460,  4459,  4467,  4484,  4502,  4520,  4525,  4531,  4543,
+    4560,  4578,  4599,  4604,  4609,  4619,  4629,  4634,  4645,  4654,
+    4659,  4686,  4690,  4694,  4698,  4702,  4709,  4713,  4717,  4721,
+    4728,  4733,  4740,  4745,  4749,  4754,  4758,  4766,  4777,  4781,
+    4793,  4801,  4809,  4816,  4826,  4855,  4859,  4863,  4867,  4871,
+    4875,  4879,  4883,  4887,  4916,  4945,  4974,  5003,  5016,  5029,
+    5042,  5055,  5065,  5075,  5087,  5099,  5111,  5129,  5150,  5155,
+    5159,  5163,  5175,  5179,  5191,  5198,  5208,  5212,  5227,  5232,
+    5239,  5243,  5256,  5264,  5275,  5279,  5287,  5293,  5301,  5309,
+    5324,  5338,  5352,  5364,  5380,  5391,  5395,  5414,  5422,  5421,
+    5434,  5439,  5445,  5454,  5467,  5470
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -1219,9 +1118,10 @@ static const char *const yytname[] =
   "tCos", "tAcos", "tTan", "tRand", "tAtan", "tAtan2", "tSinh", "tCosh",
   "tTanh", "tFabs", "tFloor", "tCeil", "tRound", "tFmod", "tModulo",
   "tHypot", "tList", "tPrintf", "tError", "tStr", "tSprintf", "tStrCat",
-  "tStrPrefix", "tStrRelative", "tStrReplace", "tStrFind", "tStrCmp",
-  "tTextAttributes", "tBoundingBox", "tDraw", "tSetChanged", "tToday",
-  "tOnelabAction", "tSyncModel", "tCpu", "tMemory", "tTotalMemory",
+  "tStrPrefix", "tStrRelative", "tStrReplace", "tFind", "tStrFind",
+  "tStrCmp", "tStrChoice", "tTextAttributes", "tBoundingBox", "tDraw",
+  "tSetChanged", "tToday", "tFixRelativePath", "tSyncModel",
+  "tOnelabAction", "tOnelabRun", "tCpu", "tMemory", "tTotalMemory",
   "tCreateTopology", "tCreateTopologyNoHoles", "tDistanceFunction",
   "tDefineConstant", "tUndefineConstant", "tDefineNumber", "tDefineString",
   "tPoint", "tCircle", "tEllipse", "tLine", "tSphere", "tPolarSphere",
@@ -1248,24 +1148,25 @@ static const char *const yytname[] =
   "tPLUSPLUS", "'^'", "'('", "')'", "'['", "']'", "'.'", "'#'", "','",
   "'{'", "'}'", "'~'", "$accept", "All", "GeoFormatItems", "GeoFormatItem",
   "SendToFile", "Printf", "View", "Views", "ElementCoords",
-  "ElementValues", "Element", "@1", "@2", "Text2DValues", "Text2D", "@3",
-  "Text3DValues", "Text3D", "@4", "InterpolationMatrix", "Time", "@5",
-  "NumericAffectation", "NumericIncrement", "LP", "RP", "Affectation",
-  "Comma", "DefineConstants", "@6", "@7", "UndefineConstants",
-  "Enumeration", "FloatParameterOptions", "FloatParameterOption",
-  "CharParameterOptions", "CharParameterOption", "PhysicalId",
-  "InSphereCenter", "CircleOptions", "Shape", "@8", "@9", "@10", "@11",
-  "Transform", "MultipleShape", "ListOfShapes", "LevelSet", "Delete",
-  "Colorify", "Visibility", "Command", "Loop", "Extrude", "@12", "@13",
-  "@14", "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23",
-  "@24", "ExtrudeParameters", "ExtrudeParameter", "TransfiniteType",
+  "ElementValues", "Element", "$@1", "$@2", "Text2DValues", "Text2D",
+  "$@3", "Text3DValues", "Text3D", "$@4", "InterpolationMatrix", "Time",
+  "$@5", "NumericAffectation", "NumericIncrement", "LP", "RP",
+  "Affectation", "Comma", "DefineConstants", "$@6", "$@7",
+  "UndefineConstants", "Enumeration", "FloatParameterOptions",
+  "FloatParameterOption", "CharParameterOptions", "CharParameterOption",
+  "PhysicalId0", "PhysicalId1", "PhysicalId2", "PhysicalId3",
+  "InSphereCenter", "CircleOptions", "Shape", "Transform", "MultipleShape",
+  "ListOfShapes", "LevelSet", "Delete", "Colorify", "Visibility",
+  "Command", "Loop", "Extrude", "$@8", "$@9", "$@10", "$@11", "$@12",
+  "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20",
+  "ExtrudeParameters", "ExtrudeParameter", "TransfiniteType",
   "TransfiniteArrangement", "TransfiniteCorners", "RecombineAngle",
-  "Constraints", "Coherence", "HomologyCommand", "Homology", "FExpr",
-  "FExpr_Single", "@25", "VExpr", "VExpr_Single",
+  "PeriodicTransform", "Constraints", "Coherence", "HomologyCommand",
+  "Homology", "FExpr", "FExpr_Single", "$@21", "VExpr", "VExpr_Single",
   "RecursiveListOfListOfDouble", "ListOfDouble", "ListOfDoubleOrAll",
   "FExpr_Multi", "RecursiveListOfDouble", "ColorExpr", "ListOfColor",
-  "RecursiveListOfColor", "StringExprVar", "StringExpr", "@26",
-  "RecursiveListOfStringExprVar", "StringIndex", "String__Index", 0
+  "RecursiveListOfColor", "StringExprVar", "StringExpr", "$@22",
+  "RecursiveListOfStringExprVar", "StringIndex", "String__Index", YY_NULL
 };
 #endif
 
@@ -1289,63 +1190,66 @@ static const yytype_uint16 yytoknum[] =
      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
      385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
-     405,   406,   407,   408,   409,   410,   411,   412,    63,   413,
-     414,   415,   416,    60,    62,   417,   418,    43,    45,    42,
-      47,    37,    33,   419,   420,   421,    94,    40,    41,    91,
-      93,    46,    35,    44,   123,   125,   126
+     405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
+     415,   416,    63,   417,   418,   419,   420,    60,    62,   421,
+     422,    43,    45,    42,    47,    37,    33,   423,   424,   425,
+      94,    40,    41,    91,    93,    46,    35,    44,   123,   125,
+     126
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint16 yyr1[] =
 {
-       0,   187,   188,   188,   189,   189,   190,   190,   190,   190,
-     190,   190,   190,   190,   190,   190,   190,   190,   190,   190,
-     190,   191,   191,   192,   192,   192,   192,   192,   192,   193,
-     193,   193,   193,   194,   194,   194,   194,   194,   194,   195,
-     195,   196,   196,   198,   199,   197,   200,   200,   202,   201,
-     203,   203,   205,   204,   206,   206,   208,   207,   209,   209,
-     209,   209,   209,   210,   210,   211,   211,   212,   212,   213,
-     213,   213,   213,   213,   213,   213,   213,   213,   213,   213,
-     213,   213,   213,   213,   213,   213,   213,   213,   213,   213,
-     213,   213,   213,   213,   213,   213,   213,   213,   213,   213,
-     214,   214,   215,   215,   215,   216,   215,   215,   217,   215,
-     218,   218,   219,   219,   220,   220,   221,   221,   221,   222,
-     222,   223,   223,   223,   224,   224,   225,   225,   226,   226,
-     227,   228,   227,   227,   227,   227,   227,   227,   227,   227,
-     227,   227,   227,   227,   229,   227,   227,   227,   227,   227,
-     227,   227,   227,   227,   227,   227,   230,   227,   227,   227,
-     227,   231,   227,   232,   232,   232,   232,   232,   232,   232,
-     232,   233,   233,   234,   234,   234,   234,   234,   234,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   236,   236,
-     236,   236,   236,   237,   237,   238,   238,   238,   238,   238,
-     238,   239,   239,   239,   239,   239,   239,   239,   239,   239,
-     239,   239,   239,   239,   239,   239,   239,   239,   239,   240,
-     240,   240,   240,   240,   240,   240,   240,   240,   240,   241,
-     241,   241,   242,   241,   243,   241,   244,   241,   245,   241,
-     241,   241,   241,   241,   241,   241,   241,   241,   241,   246,
-     241,   247,   241,   248,   241,   249,   241,   250,   241,   251,
-     241,   252,   241,   253,   241,   254,   241,   255,   255,   256,
-     256,   256,   256,   256,   256,   256,   256,   256,   256,   256,
-     256,   256,   256,   256,   257,   257,   258,   258,   259,   259,
-     260,   260,   261,   261,   261,   261,   261,   261,   261,   261,
-     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
-     261,   261,   261,   262,   262,   262,   263,   263,   263,   264,
-     264,   264,   264,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   265,   265,   265,   265,   265,   265,
+       0,   191,   192,   192,   193,   193,   194,   194,   194,   194,
+     194,   194,   194,   194,   194,   194,   194,   194,   194,   194,
+     194,   195,   195,   196,   196,   196,   196,   196,   196,   197,
+     197,   197,   197,   198,   198,   198,   198,   198,   198,   199,
+     199,   200,   200,   202,   203,   201,   204,   204,   206,   205,
+     207,   207,   209,   208,   210,   210,   212,   211,   213,   213,
+     213,   213,   213,   214,   214,   215,   215,   216,   216,   217,
+     217,   217,   217,   217,   217,   217,   217,   217,   217,   217,
+     217,   217,   217,   217,   217,   217,   217,   217,   217,   217,
+     217,   217,   217,   217,   217,   217,   217,   217,   217,   217,
+     217,   218,   218,   219,   219,   219,   220,   219,   219,   221,
+     219,   222,   222,   223,   223,   224,   224,   225,   225,   225,
+     226,   226,   227,   227,   227,   228,   228,   229,   229,   230,
+     230,   231,   231,   232,   232,   233,   233,   234,   234,   234,
+     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
+     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
+     234,   234,   234,   234,   234,   234,   235,   235,   235,   235,
+     235,   235,   235,   235,   236,   236,   237,   237,   237,   237,
+     237,   237,   238,   238,   238,   238,   238,   238,   238,   238,
+     238,   239,   239,   239,   239,   239,   240,   240,   241,   241,
+     241,   241,   241,   241,   242,   242,   242,   242,   242,   242,
+     242,   242,   242,   242,   242,   242,   242,   242,   242,   242,
+     242,   242,   242,   243,   243,   243,   243,   243,   243,   243,
+     243,   243,   243,   244,   244,   244,   245,   244,   246,   244,
+     247,   244,   248,   244,   244,   244,   244,   244,   244,   244,
+     244,   244,   244,   249,   244,   250,   244,   251,   244,   252,
+     244,   253,   244,   254,   244,   255,   244,   256,   244,   257,
+     244,   258,   258,   259,   259,   259,   259,   259,   259,   259,
+     259,   259,   259,   259,   259,   259,   259,   259,   260,   260,
+     261,   261,   262,   262,   263,   263,   264,   264,   265,   265,
      265,   265,   265,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   265,   266,   266,   266,   266,   266,
-     266,   266,   266,   266,   266,   267,   266,   266,   266,   266,
-     266,   266,   266,   266,   266,   266,   266,   266,   266,   266,
-     266,   266,   266,   266,   268,   268,   268,   268,   268,   269,
-     269,   269,   269,   270,   270,   271,   271,   271,   271,   271,
-     271,   272,   272,   273,   273,   273,   273,   273,   273,   273,
-     273,   273,   273,   273,   273,   273,   273,   273,   273,   273,
-     273,   274,   274,   274,   274,   275,   275,   275,   275,   276,
-     276,   277,   277,   278,   278,   278,   278,   279,   279,   279,
-     279,   279,   279,   279,   279,   279,   279,   279,   279,   280,
-     279,   281,   281,   282,   282,   283,   283
+     265,   265,   265,   265,   265,   265,   265,   265,   265,   266,
+     266,   266,   267,   267,   267,   268,   268,   268,   268,   269,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   270,   270,   270,   270,   270,   270,   270,   270,   270,
+     270,   271,   270,   270,   270,   270,   270,   270,   270,   270,
+     270,   270,   270,   270,   270,   270,   270,   270,   270,   270,
+     270,   272,   272,   272,   272,   272,   273,   273,   273,   273,
+     274,   274,   275,   275,   275,   275,   275,   275,   276,   276,
+     277,   277,   277,   277,   277,   277,   277,   277,   277,   277,
+     277,   277,   277,   277,   277,   277,   277,   277,   277,   277,
+     277,   277,   277,   277,   277,   277,   277,   277,   278,   278,
+     278,   278,   279,   279,   279,   279,   280,   280,   281,   281,
+     282,   282,   282,   282,   283,   283,   283,   283,   283,   283,
+     283,   283,   283,   283,   283,   283,   283,   283,   284,   283,
+     285,   285,   286,   286,   287,   287
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -1358,2203 +1262,2528 @@ static const yytype_uint8 yyr2[] =
        3,     1,     3,     0,     0,    10,     1,     3,     0,    13,
        1,     3,     0,    15,     8,    14,     0,     6,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     5,
-       5,     4,     6,     7,     7,     7,     9,     9,     3,     6,
-       6,     4,     6,     9,     6,     9,     5,     8,     8,    11,
-       6,     9,     5,     7,     9,     9,    11,     7,     9,     9,
-       0,     1,     0,     3,     5,     0,     9,     5,     0,     9,
-       0,     3,     3,     5,     0,     2,     3,     5,     3,     0,
-       2,     3,     3,     5,     1,     1,     0,     5,     0,     2,
-       7,     0,     9,     6,     7,     4,     7,     8,     8,     7,
-       7,    11,     8,     8,     0,     9,     8,     9,     3,     4,
-      10,     7,     7,     8,     8,    12,     0,     9,     8,     7,
-       8,     0,     9,     5,    11,     5,     9,     9,     4,     9,
-       9,     1,     1,     0,     2,     6,     6,     6,     6,     8,
-      10,    14,    16,    12,     8,     8,     6,    14,     4,     6,
-       6,     3,     4,     5,     6,     3,     3,     4,     5,     4,
-       5,     3,     7,     7,     3,     7,     3,     2,     2,     2,
-       2,    15,     2,     2,     2,     2,     2,    16,     3,     6,
-       8,     8,    10,     1,     2,     1,     3,     4,     1,     5,
-      11,    13,     0,     7,     0,    13,     0,    15,     0,     6,
-       8,     8,     8,    12,    12,    12,    14,    14,    14,     0,
-      12,     0,    12,     0,    12,     0,    16,     0,    16,     0,
-      16,     0,    18,     0,    18,     0,    18,     1,     2,     5,
-       7,     9,     2,     2,     2,     3,     2,     3,     2,     3,
-       2,     3,     9,     6,     0,     3,     0,     1,     0,     2,
-       0,     2,     7,     6,     8,     5,     3,     7,     5,     4,
-       6,     6,    12,    10,    10,    10,    10,    10,     4,     4,
-       4,     4,     4,     2,     3,     6,     1,     1,     1,     2,
-       5,     7,    10,     1,     3,     2,     2,     2,     3,     3,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-       3,     3,     5,     4,     4,     4,     4,     4,     4,     4,
-       4,     4,     4,     6,     4,     4,     4,     4,     4,     4,
-       4,     6,     6,     6,     4,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     0,     6,     1,     4,     4,
-       4,     4,     4,     2,     5,     5,     3,     6,     4,     7,
-       6,     6,     6,     4,     1,     2,     2,     3,     3,    11,
-       9,     7,     7,     1,     3,     1,     1,     2,     3,     4,
-       5,     1,     1,     2,     3,     3,     5,     4,     2,     2,
-       2,     2,     5,     5,     5,     5,     1,     1,     3,     4,
-       6,     1,     1,     3,     3,     9,     7,     1,     5,     3,
-       6,     1,     3,     1,     1,     3,     6,     1,     1,     1,
-       4,     6,     6,     4,     4,     8,     4,     4,     6,     0,
-       6,     1,     3,     5,     5,     1,     1
+       5,     4,     6,     6,     7,     7,     7,     9,     9,     3,
+       6,     6,     4,     6,     9,     6,     9,     5,     8,     8,
+      11,     6,     9,     5,     7,     9,     9,    11,     7,     9,
+       9,     0,     1,     0,     3,     5,     0,     9,     5,     0,
+       9,     0,     3,     3,     5,     0,     2,     3,     5,     3,
+       0,     2,     3,     3,     5,     1,     1,     1,     1,     1,
+       1,     1,     1,     0,     5,     0,     2,     7,     8,     6,
+       7,     4,     7,     8,     8,     7,     7,    11,     8,     8,
+       8,     8,     9,     3,     4,    10,     7,     7,     8,     8,
+      12,     8,     8,     7,     8,     8,     5,    11,     5,     9,
+       9,     4,     9,     9,     1,     1,     0,     2,     6,     6,
+       6,     6,     8,    10,    14,    16,    12,     8,     8,     6,
+      14,     4,     6,     6,     3,     4,     5,     6,     3,     3,
+       4,     5,     4,     5,     3,     5,     7,     7,     3,     7,
+       3,     2,     2,     2,     2,    15,     2,     2,     2,     2,
+       2,    16,     3,     6,     8,     8,    10,     1,     2,     1,
+       3,     4,     1,     5,    11,    13,     0,     7,     0,    13,
+       0,    15,     0,     6,     8,     8,     8,    12,    12,    12,
+      14,    14,    14,     0,    12,     0,    12,     0,    12,     0,
+      16,     0,    16,     0,    16,     0,    18,     0,    18,     0,
+      18,     1,     2,     5,     7,     9,     2,     2,     2,     3,
+       2,     3,     2,     3,     2,     3,     9,     6,     0,     3,
+       0,     1,     0,     2,     0,     2,     0,     2,     7,     6,
+       8,     5,     3,     7,     5,     4,     6,     6,    13,    10,
+      10,    10,    10,    10,     4,     4,     4,     4,     4,     2,
+       3,     6,     1,     1,     1,     2,     5,     7,    10,     1,
+       3,     2,     2,     2,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     5,     4,
+       4,     4,     4,     4,     4,     4,     4,     4,     4,     6,
+       4,     4,     4,     4,     4,     4,     4,     6,     6,     6,
+       4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     0,     6,     1,     4,     4,     4,     4,     4,     2,
+       5,     5,     3,     6,     4,     7,     6,     6,     6,     6,
+       4,     1,     2,     2,     3,     3,    11,     9,     7,     7,
+       1,     3,     1,     1,     2,     3,     4,     5,     1,     1,
+       2,     3,     3,     5,     4,     2,     2,     2,     2,     3,
+       3,     3,     3,     5,     5,     5,     5,    16,    16,    16,
+      16,     1,     1,     3,     3,     4,     6,     6,     1,     1,
+       3,     3,     9,     7,     1,     5,     3,     6,     1,     3,
+       1,     1,     3,     6,     1,     1,     1,     4,     6,     4,
+       4,     4,     8,     4,     8,     4,     6,     4,     0,     6,
+       1,     3,     5,     5,     1,     1
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
-       0,     0,     0,     2,     3,     1,   465,     0,     0,     0,
+       0,     0,     0,     2,     3,     1,   484,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   227,
+       0,   232,     0,     0,     0,   229,     0,     0,     0,     0,
+     322,   323,   324,     0,     5,     7,     6,     8,     9,    10,
+      19,    11,    12,    13,    18,    17,    14,    15,    16,     0,
+      20,   485,     0,   371,   484,   464,   372,   373,   374,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   223,     0,
-     228,     0,     0,     0,   225,     0,     0,     0,     0,   316,
-     317,   318,     0,     5,     7,     6,     8,     9,    10,    19,
-      11,    12,    13,    18,    17,    14,    15,    16,     0,    20,
-     466,     0,   365,   465,   447,   366,   367,   368,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   448,
-     449,   372,   373,   374,     0,     0,     0,     0,     0,     0,
-       0,     0,   369,   370,   371,     0,     0,     0,    65,    66,
-       0,     0,   173,     0,     0,     0,   323,     0,   443,   466,
-     377,     0,     0,     0,     0,   210,     0,   212,   213,   209,
-     214,   215,   102,   110,     0,     0,     0,     0,     0,     0,
+       0,     0,   465,     0,   466,   378,   379,   380,     0,     0,
+       0,     0,     0,     0,     0,     0,   375,   376,   377,     0,
+       0,     0,    65,    66,     0,     0,   176,     0,     0,     0,
+     329,     0,   460,   485,   383,     0,     0,     0,     0,   214,
+       0,   216,   217,   213,     0,   218,   219,   103,   111,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     216,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   131,   144,   156,   161,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   220,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   394,     0,     0,     0,     0,     0,   173,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   173,
-       0,   313,     0,     0,     0,     0,     0,     0,     0,     0,
-     465,   412,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   426,   427,   405,   411,     0,   406,   377,     0,     0,
-       0,     0,   437,     0,     0,     0,     0,     0,   207,   208,
-       0,     0,   224,     0,   173,     0,   173,   465,     0,   319,
-       0,     0,     0,     0,     0,    58,    62,    61,    60,    59,
-      64,    63,     0,     0,     0,     0,     0,    65,    66,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   401,     0,     0,     0,
+       0,     0,   176,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   176,     0,   319,     0,     0,     0,
+       0,     0,     0,     0,     0,   484,   419,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   441,   442,   412,   418,
+       0,   413,   485,   383,     0,     0,     0,     0,   454,     0,
+       0,     0,     0,     0,   211,   212,     0,   484,   485,     0,
+     228,     0,   176,     0,   176,   484,     0,   325,     0,     0,
+      65,    66,     0,     0,    58,    62,    61,    60,    59,    64,
+      63,     0,     0,     0,     0,     0,    66,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   326,   325,
-     327,     0,     0,     0,     0,     0,     0,   465,   466,     0,
-       0,   172,     0,   171,     0,     0,   204,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    33,   201,     0,   383,   148,     0,   465,     0,
-     443,   444,     0,     0,   100,   100,     0,     0,   431,   432,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   332,
+     331,   333,     0,     0,     0,     0,     0,     0,     0,     0,
+     175,     0,   174,     0,     0,   208,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    33,   204,     0,   389,   153,     0,   484,     0,   460,
+     461,     0,     0,   480,     0,   101,   101,     0,     0,   448,
+     449,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   288,   288,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   173,   173,     0,
-     396,   395,     0,     0,     0,     0,   173,   173,     0,     0,
-       0,     0,     0,     0,     0,   238,     0,   173,     0,     0,
-       0,     0,     0,   290,     0,     0,     0,     0,   191,     0,
-       0,     0,   314,     0,     0,     0,     0,     0,     0,     0,
-       0,    66,     0,     0,     0,   418,     0,   419,   420,   421,
-       0,     0,     0,     0,     0,   325,   413,     0,   407,     0,
-       0,     0,   296,   206,     0,     0,     0,     0,     0,   173,
-       0,     0,     0,     0,   226,   195,     0,   196,     0,     0,
-     218,     0,     0,     0,     0,     0,     0,     0,    78,     0,
-       0,   386,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   292,   292,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   176,   176,
+       0,   403,   402,     0,     0,     0,     0,   176,   176,     0,
+       0,     0,     0,     0,     0,     0,   242,     0,   176,     0,
+       0,     0,     0,     0,   294,     0,     0,     0,     0,   194,
+       0,     0,     0,   320,     0,     0,     0,     0,     0,     0,
+       0,     0,    66,     0,     0,     0,   425,     0,     0,   426,
+       0,   427,     0,   428,     0,     0,     0,     0,     0,     0,
+     331,   420,     0,   414,     0,     0,     0,   302,    66,     0,
+     210,     0,     0,     0,     0,     0,   176,     0,     0,     0,
+       0,   230,   198,     0,   199,     0,     0,   222,     0,     0,
+       0,     0,     0,     0,     0,     0,    79,     0,     0,   392,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   461,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   375,   459,     0,     0,     0,     0,
-       0,     0,   324,    58,     0,     0,    58,     0,     0,     0,
-       0,     0,   168,     0,     0,     0,     0,   174,     0,     0,
-       0,   341,   340,   339,   338,   334,   335,   337,   336,   329,
-     328,   330,   331,   332,   333,     0,     0,   149,     0,     0,
-       0,     0,     0,     0,     0,     0,   101,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   310,
-     311,   312,     0,     0,     0,     0,   286,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   135,
-     173,     0,     0,     0,     0,     0,   398,   397,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   232,     0,     0,
-       0,     0,     0,     0,     0,   299,     0,     0,   192,     0,
-       0,   188,     0,     0,     0,   309,   308,     0,     0,     0,
-       0,   386,    67,    68,     0,   428,     0,     0,     0,     0,
-       0,     0,     0,   324,   408,   415,     0,   330,   414,     0,
-       0,     0,     0,     0,     0,     0,     0,   227,     0,   197,
-     199,     0,     0,     0,     0,     0,     0,    81,    71,     0,
-     378,   388,   343,   344,   345,   346,   347,   348,   349,   350,
-     351,   364,   352,     0,   354,   355,   356,   357,   358,   359,
-     360,     0,     0,     0,     0,   456,     0,   457,     0,   453,
-     454,     0,     0,     0,   393,   114,   119,    92,     0,   450,
-       0,   380,   381,     0,     0,     0,     0,     0,     0,     0,
-      86,     0,     0,     0,     0,   382,     0,     0,     0,     0,
-     463,     0,     0,    43,     0,     0,     0,    56,     0,    34,
-      35,    36,    37,    38,   379,     0,   445,    23,    21,     0,
-       0,    24,     0,     0,    69,   103,    70,   111,     0,   433,
-     434,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   284,
-     289,   287,     0,   295,     0,     0,   124,   125,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   198,   200,
-       0,     0,     0,   163,   165,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     267,     0,   229,     0,     0,     0,     0,     0,     0,   291,
-     298,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   378,     0,   429,   417,     0,     0,     0,     0,   409,
-       0,     0,     0,     0,     0,     0,     0,   193,     0,     0,
-       0,     0,     0,     0,   320,     0,     0,     0,   464,     0,
-       0,   384,     0,     0,     0,     0,     0,   462,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    72,     0,
-       0,     0,     0,    79,    82,    84,     0,     0,   441,     0,
-      90,     0,     0,     0,     0,     0,   342,     0,     0,     0,
-       0,     0,    29,   385,     0,    22,     0,     0,     0,     0,
-       0,     0,     0,     0,   128,   128,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   133,     0,     0,     0,
-       0,     0,     0,     0,   293,     0,     0,     0,     0,     0,
-       0,     0,     0,   301,     0,     0,   194,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   273,     0,   272,     0,
-     278,     0,   280,     0,   274,     0,   276,     0,   239,   268,
-       0,     0,     0,   186,     0,     0,     0,   300,     0,   190,
-     189,   315,     0,     0,    30,    31,     0,     0,     0,   422,
-     423,   424,   425,   416,   410,     0,     0,     0,   438,     0,
-       0,     0,   219,     0,     0,     0,     0,     0,     0,    80,
-     203,   387,   202,   353,   361,   362,   363,   458,   452,     0,
-     391,   392,     0,   376,   115,     0,   460,   120,   390,   451,
-      74,    58,     0,     0,     0,     0,    73,     0,     0,     0,
-     439,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     403,     0,     0,    25,    26,     0,    27,     0,     0,   104,
-     107,   130,     0,     0,     0,     0,     0,     0,   134,     0,
-       0,   151,   152,     0,     0,   136,   159,     0,     0,     0,
-       0,   126,     0,   292,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   205,     0,     0,     0,     0,   173,   173,
-       0,   249,     0,   251,     0,   253,     0,   405,     0,     0,
-     279,   281,   275,   277,     0,     0,   233,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   297,     0,   387,   430,
-     139,   140,     0,     0,     0,     0,    93,    97,     0,     0,
-     321,     0,    75,   389,     0,     0,     0,     0,     0,    87,
-       0,     0,    88,     0,   442,   175,   176,   177,   178,     0,
-       0,    39,     0,     0,     0,     0,     0,    41,   446,     0,
-       0,   105,   108,     0,     0,   129,   137,   138,   142,     0,
-       0,   153,     0,     0,   294,     0,   146,     0,     0,   285,
-     158,     0,     0,     0,     0,   143,     0,   154,   160,     0,
-       0,     0,     0,   402,     0,   401,     0,     0,     0,   240,
-       0,     0,   241,     0,     0,   242,     0,     0,     0,     0,
-       0,     0,     0,   185,     0,     0,   184,     0,     0,     0,
-     179,     0,     0,    32,     0,     0,   436,     0,   221,   220,
-       0,     0,     0,     0,     0,   455,     0,   116,   118,     0,
-     121,   122,    83,    85,     0,    91,     0,    76,    44,     0,
-       0,     0,   404,     0,     0,     0,    28,     0,   114,   119,
-       0,     0,     0,     0,     0,     0,     0,     0,   147,   132,
-     145,   157,   162,     0,     0,    98,    99,   173,     0,   166,
-     167,     0,     0,     0,     0,     0,     0,     0,   269,     0,
-       0,   173,     0,     0,     0,     0,     0,   170,   169,     0,
-       0,     0,     0,    94,    95,     0,    77,     0,   431,     0,
-       0,   440,     0,    40,     0,     0,     0,    42,    57,     0,
-       0,     0,   303,   305,   304,   306,   307,   150,     0,     0,
-       0,     0,     0,     0,   400,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   283,     0,     0,     0,   234,     0,
-       0,   180,     0,     0,     0,   435,   222,     0,   322,     0,
-     117,     0,   123,    89,     0,     0,     0,     0,     0,   106,
-     109,     0,     0,     0,     0,   164,     0,   255,     0,     0,
-     257,     0,     0,   259,     0,     0,     0,   270,     0,   230,
-       0,   173,     0,     0,     0,   141,    96,     0,   112,     0,
-      48,     0,    54,     0,     0,     0,   127,   155,   302,   399,
-     243,     0,     0,   250,   244,     0,     0,   252,   245,     0,
-       0,   254,     0,     0,     0,   236,     0,   183,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   261,     0,
-     263,     0,   265,   271,   282,   235,   231,     0,     0,     0,
-       0,   113,    45,     0,    52,     0,     0,     0,     0,   246,
-       0,     0,   247,     0,     0,   248,     0,     0,   187,     0,
-     181,     0,    46,     0,     0,   211,     0,     0,     0,     0,
-       0,     0,     0,   237,     0,     0,     0,     0,     0,   217,
-     256,     0,   258,     0,   260,     0,   182,    47,    49,     0,
-      50,     0,     0,     0,     0,     0,     0,    55,   262,   264,
-     266,    51,    53
+       0,     0,     0,     0,   381,   478,     0,     0,     0,     0,
+       0,     0,   330,    58,     0,     0,    58,     0,     0,     0,
+       0,     0,   171,     0,     0,     0,     0,   177,     0,     0,
+       0,   347,   346,   345,   344,   340,   341,   343,   342,   335,
+     334,   336,   337,   338,   339,     0,     0,   154,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   102,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   316,   317,   318,     0,     0,     0,     0,   290,     0,
+       0,     0,   125,   126,     0,   127,   128,     0,   129,   130,
+       0,   131,   132,     0,     0,     0,     0,     0,     0,   141,
+     176,     0,     0,     0,     0,     0,   405,   404,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   236,     0,     0,
+       0,     0,     0,     0,     0,   305,     0,     0,   195,     0,
+       0,   191,     0,     0,     0,   315,   314,     0,     0,     0,
+       0,   392,    67,    68,     0,   443,     0,     0,     0,     0,
+       0,     0,   429,     0,   430,     0,   431,     0,   432,     0,
+       0,   330,   415,   422,     0,   336,   421,     0,   444,     0,
+       0,     0,     0,     0,     0,     0,     0,   231,     0,   200,
+     202,     0,     0,     0,     0,     0,     0,     0,    82,    71,
+       0,   384,   394,   349,   350,   351,   352,   353,   354,   355,
+     356,   357,   370,   358,     0,   360,   361,   362,   363,   364,
+     365,   366,     0,     0,     0,   473,     0,   475,   469,   470,
+     471,     0,     0,     0,     0,     0,   400,   477,   115,   120,
+      93,     0,   467,     0,   386,   387,     0,     0,     0,     0,
+       0,     0,     0,    87,     0,     0,     0,     0,   388,     0,
+       0,     0,     0,   482,     0,     0,    43,     0,     0,     0,
+      56,     0,    34,    35,    36,    37,    38,   385,     0,   462,
+      23,    21,     0,     0,    24,     0,     0,   205,   481,    69,
+     104,    70,   112,     0,   450,   451,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   288,   293,   291,     0,   301,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   201,   203,     0,     0,     0,   166,   168,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   271,     0,   233,     0,     0,     0,     0,
+       0,     0,   295,   304,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   384,     0,   445,     0,   424,     0,
+       0,     0,     0,     0,     0,     0,   416,     0,     0,     0,
+       0,     0,     0,     0,     0,   196,     0,     0,     0,     0,
+       0,     0,   326,     0,     0,     0,   483,     0,     0,     0,
+     390,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    72,     0,     0,
+       0,     0,    80,    83,    85,     0,     0,   458,     0,    91,
+       0,     0,     0,     0,     0,   348,     0,     0,     0,     0,
+       0,    29,   391,     0,    22,     0,     0,     0,     0,     0,
+       0,     0,     0,   135,   135,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   139,     0,     0,     0,     0,
+       0,     0,     0,   299,     0,     0,     0,     0,     0,     0,
+       0,     0,   307,     0,     0,   197,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   277,     0,   276,     0,   282,
+       0,   284,     0,   278,     0,   280,     0,   243,   272,     0,
+       0,     0,   189,     0,     0,     0,   306,     0,   193,   192,
+     321,     0,     0,    30,    31,     0,     0,     0,     0,     0,
+       0,     0,   433,   434,   435,   436,   423,   417,     0,     0,
+       0,     0,   455,     0,     0,     0,   223,     0,     0,     0,
+       0,    73,     0,    81,     0,   207,   393,   206,   359,   367,
+     368,   369,   476,     0,   397,   398,   399,     0,     0,   382,
+     116,     0,   479,   121,   396,   468,    75,    58,     0,     0,
+       0,     0,    74,     0,     0,     0,   456,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   410,     0,     0,    25,
+      26,     0,    27,     0,     0,   105,   108,   137,     0,     0,
+       0,     0,     0,     0,   140,     0,     0,   156,   157,     0,
+       0,   142,   163,     0,     0,     0,     0,   133,     0,   298,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   209,
+       0,     0,     0,     0,   176,   176,     0,   253,     0,   255,
+       0,   257,     0,   412,     0,     0,   283,   285,   279,   281,
+       0,     0,   237,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   303,     0,   393,   446,     0,     0,     0,     0,
+     447,   145,   146,     0,     0,     0,     0,    94,    98,     0,
+       0,   327,    76,     0,   395,     0,     0,     0,     0,     0,
+       0,    88,     0,     0,    89,     0,   459,   178,   179,   180,
+     181,     0,     0,    39,     0,     0,     0,     0,     0,    41,
+     463,     0,     0,   106,   109,     0,     0,   136,   143,   144,
+     148,     0,     0,   158,     0,     0,   300,     0,   151,     0,
+       0,   289,   162,   138,   150,   161,   165,   149,     0,   159,
+     164,     0,     0,     0,     0,   409,     0,   408,     0,     0,
+       0,   244,     0,     0,   245,     0,     0,   246,     0,     0,
+       0,     0,     0,     0,     0,   188,     0,     0,   187,     0,
+       0,     0,   182,     0,     0,    32,     0,     0,     0,     0,
+       0,     0,   453,     0,   225,   224,     0,     0,     0,     0,
+       0,   472,   474,     0,   117,   119,     0,   122,   123,    84,
+      86,     0,    92,     0,    77,    44,     0,     0,     0,   411,
+       0,     0,     0,    28,     0,   115,   120,     0,     0,     0,
+       0,     0,     0,     0,     0,   152,     0,     0,    99,   100,
+     176,     0,   169,   170,     0,     0,     0,     0,     0,     0,
+       0,   273,     0,     0,   176,     0,     0,     0,     0,     0,
+     173,   172,     0,     0,     0,     0,     0,     0,     0,     0,
+      95,    96,     0,    78,     0,   448,     0,     0,   457,     0,
+      40,     0,     0,     0,    42,    57,     0,     0,     0,   309,
+     311,   310,   312,   313,   155,     0,     0,     0,     0,     0,
+       0,   407,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   287,     0,     0,     0,   238,     0,     0,   183,     0,
+       0,     0,     0,     0,     0,     0,   452,   226,     0,   328,
+       0,   118,     0,   124,    90,     0,     0,     0,     0,     0,
+     107,   110,     0,     0,     0,   296,   167,     0,   259,     0,
+       0,   261,     0,     0,   263,     0,     0,     0,   274,     0,
+     234,     0,   176,     0,     0,     0,     0,     0,     0,     0,
+     147,    97,     0,   113,     0,    48,     0,    54,     0,     0,
+       0,   134,   160,     0,     0,   406,   247,     0,     0,   254,
+     248,     0,     0,   256,   249,     0,     0,   258,     0,     0,
+       0,   240,     0,   186,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   297,   308,     0,
+     265,     0,   267,     0,   269,   275,   286,   239,   235,     0,
+       0,     0,     0,     0,     0,     0,     0,   114,    45,     0,
+      52,     0,     0,     0,     0,   250,     0,     0,   251,     0,
+       0,   252,     0,     0,   190,     0,   184,     0,     0,     0,
+       0,     0,    46,     0,     0,   215,     0,     0,     0,     0,
+       0,     0,     0,   241,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   221,   260,     0,   262,     0,   264,     0,
+     185,     0,     0,     0,     0,    47,    49,     0,    50,     0,
+       0,     0,     0,   437,   438,   439,   440,     0,     0,    55,
+     266,   268,   270,    51,    53
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     2,     3,    83,   829,    84,    85,   615,  1250,  1256,
-     819,   987,  1412,  1571,   820,  1532,  1599,   821,  1573,   822,
-     823,   991,   312,   395,   164,   715,    86,   627,   404,  1358,
-    1359,   405,  1407,   963,  1114,   964,  1117,   865,  1278,  1155,
-     597,   435,   436,   437,   438,   271,   372,   373,    89,    90,
-      91,    92,    93,    94,   272,   903,  1490,  1547,   685,  1300,
-    1303,  1306,  1511,  1515,  1519,  1560,  1563,  1566,   899,   900,
-    1023,   862,   656,   694,    96,    97,    98,    99,   273,   166,
-     785,   451,   231,  1139,   274,   275,   276,   509,   284,   804,
-     979,   564,   400,   786,   565,   169,   277
+      -1,     2,     3,    84,   872,    85,    86,   635,  1312,  1318,
+     862,  1036,  1479,  1661,   863,  1612,  1697,   864,  1663,   865,
+     866,  1040,   321,   404,   168,   745,    87,   649,   415,  1425,
+    1426,   416,  1474,  1012,  1170,  1013,  1173,   681,   684,   687,
+     690,  1340,  1211,   617,   276,   381,   382,    90,    91,    92,
+      93,    94,    95,   277,   946,  1561,  1629,   715,  1362,  1365,
+    1368,  1587,  1591,  1595,  1646,  1649,  1652,   942,   943,  1072,
+     907,   678,   724,  1584,    97,    98,    99,   100,   278,   170,
+     828,   462,   236,  1195,   279,   280,   281,   524,   290,   847,
+    1028,   413,   409,   829,   414,   173,   283
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -1191
+#define YYPACT_NINF -1266
 static const yytype_int16 yypact[] =
 {
-    5150,    28,    47,  5263, -1191, -1191,  2575,    11,     6,   -81,
-     -47,    26,   142,   178,   188,   223,   241,    91,   108,  -149,
-     156,   209,     1,   233,   255,    15,   268,   271,   240,   267,
-     324,   455,   287,   476,   410,   465,    48,   490,   364,   535,
-      61,   403,   533,   100,   432,   101,   101,   447,   -18,    46,
-     -10,   587,   605,     9,    52,   615,   628,    72,   708,   712,
-     713,  3297,   734,   522,   525,   560,    17,    39, -1191,   569,
-   -1191,   753,   759,   594, -1191,   773,   777,    20,    21, -1191,
-   -1191, -1191,  2334, -1191, -1191, -1191, -1191, -1191, -1191, -1191,
-   -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191,    30, -1191,
-      96,   217, -1191,     0, -1191, -1191, -1191, -1191,   -93,   -93,
-     -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
-     -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
-     -93,   -93,   -93,   593,   613,   616,   617,   625,   630, -1191,
-   -1191, -1191, -1191, -1191,   -93,   -93,   804,   637,   638,   646,
-     650,   651, -1191, -1191, -1191,  2334,  2334,  2334,  2334,  2394,
-      34,   832,   129,   658,   681,   237, -1191,   682,   868,  -122,
-    -121,   876,  2334,   527,   527, -1191,  2334, -1191, -1191, -1191,
-   -1191, -1191, -1191, -1191,  2334,  4823,  2334,  2334,   709,  2334,
-    4823,  2334,  2334,   714,  4823,  2334,  2334,  3649,   731,   701,
-   -1191,  4823,  3297,  3297,  3297,   739,   740,  3297,  3297,  3297,
-     758, -1191, -1191, -1191, -1191,   763,   791,   797,  3649,  2334,
-     903,  3649,    17,   746,   789,   101,   101,   101,  2334,  2334,
-     -63, -1191,    58,   101,   793,   798,   802,  2001,   109,    90,
-     810,   811,   812,  3297,  3297,  3649,   813,    36,   742, -1191,
-     886, -1191,   808,   823,   824,  3297,  3297,   771,   830,   833,
-     577, -1191,   834,    22,  1009,  1013,  1014,   719,  3825,  2334,
-    2938, -1191, -1191,  2362, -1191,  1016, -1191,   201,  1017,  2334,
-    2334,  2334,   839,  2334,   840,   895,  2334,  2334, -1191, -1191,
-    2334,  1026, -1191,  1029, -1191,  1030, -1191,   137,   835, -1191,
-    3649,  3649,   854,  2334,   859,  1925, -1191, -1191, -1191, -1191,
-   -1191, -1191,  3649,  1038,   870,  2334,  1056, -1191, -1191,  2334,
-    2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,
-    2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,
-    2334,   527,   527,   527,   527,   527,   527,   527,   527,   527,
-    2334,  1925,  2334,   527,   527,   527,   832,  1925,   885,   885,
-     885,  7149,    80,  6804,   265,   882,  1058,   902,   908,   910,
-     911, -1191,   913,  5356,  2334,  4823, -1191,  2334,  2334,  2334,
-    2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,  2334,
-    2334,  2334, -1191, -1191,  2334, -1191, -1191,  1162,   263,   -86,
-   -1191, -1191,   171,  6131,   290,   378,  7170,  4823,  3777, -1191,
-     -76,  7191,  7212,  2334,  7233,   -29,  7254,  7275,  2334,    98,
-    7296,  7317,  1089,  2334,  2334,   139,  1095,  1096,  1097,  2334,
-    2334,  1098,  1104,  1104,  2334,   927,   935,   936,   941,  2334,
-    2334,  2334,  1113,  6051,   961,  1137,   963, -1191, -1191,   -16,
-   -1191, -1191,  6157,  6183,   101,   101,   129,   129,   143,  2334,
-    2334,  2334,  2001,  2001,  2334,  5356,   152, -1191,  2334,  2334,
-    2334,  2334,  2334,  1138,  1142,  1143,  2334,  1145, -1191,  2334,
-    2334,   453, -1191,  4823,  4823,  4823,  1146,  1147,  2334,  2334,
-    2334,  2334,  1151,    -4,  1153, -1191,  2334, -1191, -1191, -1191,
-     965,   974,   977,   978,  4823,   885, -1191,  7338, -1191,   202,
-    2334,  4001, -1191, -1191,  7359,  7380,  7401,  1036,  6209, -1191,
-     980,  3946,  7422,  6827, -1191, -1191,   787, -1191,  1228,  2334,
-   -1191,   988,   344,  4823,  6850,  2334,  1161,  1163, -1191,  2334,
-    6873,    -2,  6781,  6781,  6781,  6781,  6781,  6781,  6781,  6781,
-    6781,  6781,  6781,  6235,  6781,  6781,  6781,  6781,  6781,  6781,
-    6781,  6261,  6287,  6313, -1191,   231,   404,   989,   995,   996,
-     992,   999,  1000,   260,  7863, -1191,  1447,  1001,  1007,  1006,
-    1012,  1015,    80, -1191,  3649,   134,  1925,  2334,  1172,  1175,
-      18,  1018, -1191,   102,    12,    19,   148, -1191,  4792,   356,
-    3965,  2148,  2296,   888,   888,   160,   160,   160,   160,    75,
-      75,   885,   885,   885,   885,     5,  6896, -1191,  2334,  1190,
-      31,  4823,  1189,  4823,  2334,  1191, -1191,   832,  1193,   527,
-    1195,  4823,  4823,  1070,  1196,  1197,  7443,  1206,  1084,  1213,
-    1214,  7464,  1092,  1217,  1218,  2334,  7485,  5323,  1045, -1191,
-   -1191, -1191,  7506,  7527,  2334,  3649,  1229,  1233,  7548,  4993,
-    4993,  4993,  4993,  7569,  7590,  7611,  3649,  4823,  1053, -1191,
-   -1191,  1616,  1690,   101,  2334,  2334, -1191, -1191,  1059,  1060,
-    2001,  6339,  6365,  6391,  6105,  1003,   101,  1869,  7632,  5351,
-    7653,  7674,  7695,  2334,  1240, -1191,  2334,  7716, -1191,  6919,
-    6942, -1191,   389,   398,   408, -1191, -1191,  6965,  6988,  6417,
-    7011,   201, -1191, -1191,  4823, -1191,  1067,  5379,  4823,  4823,
-    4823,  4823,   427, -1191, -1191,  4129,  4823,   885, -1191,  1241,
-    1242,  1243,  1072,  2334,  2801,  2334,  2334, -1191,    37, -1191,
-   -1191,  1075,  3649,  1248,   459,   440,  5407, -1191, -1191,  7034,
-     411, -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191,
-   -1191, -1191, -1191,  2334, -1191, -1191, -1191, -1191, -1191, -1191,
-   -1191,  2334,  2334,  2334,   527, -1191,  4823, -1191,   527, -1191,
-   -1191,   527,   527,   527, -1191, -1191, -1191, -1191,  2334, -1191,
-     527, -1191, -1191,  2334,  1257,    41,  2334,  1259,  1264,  1486,
-   -1191,  1266,  1099,    17,  1265, -1191,  4823,  4823,  4823,  4823,
-   -1191,   315,  2334, -1191,  1100,  1106,  1090, -1191,  1269, -1191,
-   -1191, -1191, -1191, -1191,   201,  7057, -1191, -1191,  1120,   527,
-     374, -1191,   442,  6443, -1191,  1278, -1191, -1191,   101,  3777,
-   -1191,   128,  3649,  3649,  1280,  3649,   147,  3649,  3649,  1281,
-    1230,  3649,  3649,  1551,  1282,  1283,  4823,  1297,  1298,  4317,
-   -1191, -1191,  1300, -1191,  1303,  1129,  7863, -1191,  1136,  1140,
-    1141,  1308,  1332,  1334,  1338,   463,  1341,  2985, -1191, -1191,
-     250,  6469,  6495, -1191, -1191,  5435,   -56,   101,   101,   101,
-    1342,  1343,  1164,  1348,  1170,    25,    42,    45,    49,   516,
-   -1191,   289, -1191,  1003,  1349,  1353,  1354,  1355,  1356,  7863,
-   -1191,  1663,  1171,  1358,  1360,  1363,  1290,  2334,  1366,  1367,
-    2334,   310,   467, -1191, -1191,   482,   496,   537,   559, -1191,
-    2334,   572,  3649,  3649,  3649,  1370,  6521, -1191,  4298,   565,
-    1381,  1383,  3649,  1203, -1191,  1211,  2334,  1384, -1191,  1385,
-    1389, -1191,  1391,  6781,  6781,  6781,  6781, -1191,   428,   315,
-    1212,  1221,  1222,   509,   530,  7737,  1224,  1688, -1191,   540,
-    1223,  1396,  2094, -1191, -1191, -1191,    17,  2334, -1191,   591,
-   -1191,   599,   620,   623,   627,    80,  7863,  1234,  2334,  2334,
-    3649,  1226, -1191, -1191,  1236, -1191,  1399,    33,  1413,  2334,
-    4529,    24,  1239,  1244,  1340,  1340,  3649,  1418,  1245,  1246,
-    1420,  1425,  3649,  1249,  1426,  1429, -1191,  1432,  3649,   636,
-    3649,  3649,  1421,  1433, -1191,  3649,  1431,  1434,  1435,  1437,
-    3649,  3649,  3649, -1191,  1438,   417, -1191,  2334,  2334,  2334,
-    1262,  1263,   -77,   -66,   -30,  1271, -1191,  3649, -1191,  2334,
-   -1191,  1442, -1191,  1443, -1191,  1445, -1191,  1446, -1191, -1191,
-    2001,   733,  3473, -1191,  1272,  1274,  4177, -1191,  4823, -1191,
-   -1191, -1191,  1275,  2493, -1191, -1191,  7080,  1450,   315, -1191,
-   -1191, -1191, -1191,  7863, -1191,  1454,  1456,  1337, -1191,  2334,
-    2334,  2334, -1191,  1458,   544,  1286,  1464,    80,  2512, -1191,
-   -1191,    64, -1191, -1191, -1191, -1191, -1191, -1191, -1191,   527,
-   -1191, -1191,  1467, -1191, -1191,  1468, -1191, -1191, -1191, -1191,
-   -1191,  1925,  2334,  1469,  1470,    18, -1191,  1471,  7103,    17,
-   -1191,  1473,  1478,  1479,  1480,  3649,  2334,  6547,  6573,   639,
-   -1191,  2334,  1472, -1191, -1191,   527, -1191,  6599,  4993,  7863,
-   -1191, -1191,  2334,  2334,   101,  1481,  1482,  1483, -1191,  2334,
-    2334, -1191, -1191,  1484,  2334, -1191, -1191,  1488,  1491,  1314,
-    1493,  1371,  2334, -1191,  1494,  3649,  3649,  3649,  3649,  1496,
-     756,  1497,  2334, -1191,  4993,  5463,  7758,  4491,   129,   129,
-     101,  1498,   101,  1501,   101,  1502,  2334,    95,  1326,  7779,
-   -1191, -1191, -1191, -1191,  5491,   300, -1191,  1505,  2761,  1506,
-    3649,   101,  2761,  1507,   648,  2334, -1191,  1508,   201, -1191,
-   -1191, -1191,  3649,  4937,   136,  7800, -1191, -1191,  4584,  3649,
-   -1191,  3649, -1191, -1191,  1339,  3121,  4760,  1515,  2531, -1191,
-    1520,  1522, -1191,  1357, -1191, -1191, -1191, -1191, -1191,  1523,
-     454,  7863,  2334,  2334,  3649,  1350,   649,  7863, -1191,  1530,
-    2334,  7863, -1191,  5519,  5547,   321, -1191, -1191, -1191,  5575,
-    5603, -1191,  5631,  1532, -1191,  3649, -1191,  1474,  1533,  7863,
-   -1191,  1535,  1539,  1540,  1541, -1191,  1364, -1191, -1191,  6078,
-    3066,  1543,  1368, -1191,  2334, -1191,  1373,  1377,   329, -1191,
-    1379,   347, -1191,  1380,   377, -1191,  1382,  7126,  1545,  3649,
-    1558,  1386,  2334, -1191,  4353,   381, -1191,   652,   421,   451,
-   -1191,  1563,  5659, -1191,  1448,  2334, -1191,  2334, -1191, -1191,
-    4823,  3086,  1565,  1390,  1568, -1191,  2938, -1191, -1191,   527,
-    7863, -1191, -1191, -1191,    17, -1191,  1449, -1191, -1191,  2334,
-    6625,  6651, -1191,  3649,  2334,  1570, -1191,  6677, -1191, -1191,
-    1572,  1573,  1574,  1575,  1577,  1580,   665,  1406, -1191, -1191,
-   -1191, -1191, -1191,  3649,  4823, -1191, -1191,   129,  5288, -1191,
-   -1191,  2001,  1003,  2001,  1003,  2001,  1003,  1585, -1191,   678,
-    3649, -1191,  5687,   101,  1586,  4823,   101, -1191, -1191,  2334,
-    5715,  5743,   690, -1191, -1191,  1587, -1191,   695,   340,   698,
-    1588, -1191,  1411,  7863,  2334,  2334,   715,  7863, -1191,  2334,
-     716,   729, -1191, -1191, -1191, -1191, -1191, -1191,  1412,  2334,
-     730,   737,  1436,  2334, -1191,  5771,   468,   782,  5799,   486,
-     934,  5827,   508,  1155, -1191,  3649,  1592,  1537,  3336,  1441,
-     517, -1191,   741,   536,  3594, -1191, -1191,  1620, -1191,  2334,
-   -1191,  1925, -1191, -1191,  2334,  7821,  6703,    27,  6729, -1191,
-   -1191,  2334,  5855,  1621,  1624, -1191,  5883,  1625,  2334,  1627,
-    1629,  2334,  1630,  1632,  2334,  1633,  1475, -1191,  2334, -1191,
-    1003, -1191,  4823,  1635,  4353, -1191, -1191,   794, -1191,   744,
-   -1191,  2334, -1191,  3649,  2334,  6755, -1191, -1191, -1191, -1191,
-   -1191,  1477,  5911, -1191, -1191,  1487,  5939, -1191, -1191,  1489,
-    5967, -1191,  1652,  3613,  1270,  3512,   761, -1191,   538,   762,
-    1925,  1653,  1490,  7842,   766,  5995,  2334,  1003,  1657,  1003,
-    1659,  1003,  1660, -1191, -1191, -1191, -1191,  1003,  1662,  4823,
-    1664, -1191, -1191,   527, -1191,  1492,  1666,  6023,  1419, -1191,
-    1495,  1811, -1191,  1511,  1873, -1191,  1524,  1979, -1191,   786,
-   -1191,   795, -1191,  1542,  3649, -1191,  1669,  1684,  1003,  1686,
-    1003,  1698,  1003, -1191,  1700,   527,  1701,   527,   796, -1191,
-   -1191,  2012, -1191,  2102, -1191,  2192, -1191, -1191, -1191,   800,
-   -1191,  1717,  1722,  1727,  1728,   527,  1735, -1191, -1191, -1191,
-   -1191, -1191, -1191
+    6317,    59,    44,  6434, -1266, -1266,  3274,   119,   -55,   -39,
+     -25,    39,   158,   202,   212,    78,   283,   297,   172,   188,
+    -148,   197,   221,     2,   240,   243,    14,   250,   253,   315,
+     372,   378,   456,   270,   342,   406,   416,    22,   445,   246,
+     329,   102,   360,   460,   -54,   361,   123,   123,   400,   338,
+      63,    72,   483,   529,    13,    21,   554,   558,   120,   624,
+     631,   638,  4042,   655,   484,   507,   514,    26,    56, -1266,
+     524, -1266,   646,   678,   528, -1266,   665,   713,    31,    33,
+   -1266, -1266, -1266,  6180, -1266, -1266, -1266, -1266, -1266, -1266,
+   -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266,     5,
+   -1266,  -126,    90, -1266,    -1, -1266, -1266, -1266, -1266,   -62,
+     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
+     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
+     -62,   -62,   -62,   -62,   543,   597,   602,   621,   633,   653,
+     -62,   658, -1266,   -62, -1266, -1266, -1266, -1266,   -62,   -62,
+     739,   661,   670,   682,   685,   707, -1266, -1266, -1266,  6180,
+    6180,  6180,  6180,   995,     8,   665,    62,   694,   770,   163,
+   -1266,   771,   790,  -115,   -34,   889,  6180,   550,   550, -1266,
+    6180, -1266, -1266, -1266,   550, -1266, -1266, -1266, -1266,  6180,
+    5953,  6180,  6180,   721,  6180,  5953,  6180,  6180,   734,  5953,
+    6180,  6180,  4821,   801,   788, -1266,  5953,  4042,  4042,  4042,
+     816,   819,  4042,  4042,  4042,   826,   827,   850,   851,   852,
+     853,   854,   856,  4821,  6180,   805,  4821,    26,   855,   857,
+     123,   123,   123,  6180,  6180,   -77, -1266,   127,   123,   858,
+     859,   860,  5721,   251,   131,   868,   876,   878,  4042,  4042,
+    4821,   879,    52,   880, -1266,  1032, -1266,   877,   881,   882,
+    4042,  4042,   885,   896,   897,   570, -1266,   898,    29,    15,
+      16,    17,   615,  5001,  6180,  3675, -1266, -1266,  3455, -1266,
+    1033, -1266,   -11,   166,  1076,  6180,  6180,  6180,   899,  6180,
+     903,   958,  6180,  6180, -1266, -1266,  6180,   905,   906,  1091,
+   -1266,  1092, -1266,  1095, -1266,   -98,  1152, -1266,  4821,  4821,
+   -1266,  6127,   915,   916,  1478, -1266, -1266, -1266, -1266, -1266,
+   -1266,  4821,  1099,   923,  6180,  1103, -1266,  6180,  6180,  6180,
+    6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,
+    6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,   550,
+     550,   550,   550,   550,   550,  4821,   550,   550,  6180,   550,
+     550,  6180,  1478,  6180,   550,   550,   550,   665,  1478,   930,
+     930,   930,  8580,   237,  8235,   229,   926,  1122,   947,   943,
+   -1266,   945,  4246,  6180,  5953, -1266,  6180,  6180,  6180,  6180,
+    6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,  6180,
+    6180, -1266, -1266,  6180, -1266, -1266,  1301,    -5,   352, -1266,
+   -1266,   369,  3314, -1266,   449,   195,   227,  8601,  5953,  3623,
+   -1266,   -51,  8622,  8643,  6180,  8664,   272,  8685,  8706,  6180,
+     319,  8727,  8748,  1125,  6180,  6180,   333,  1130,  1131,  1132,
+    6180,  6180,  1133,  1135,  1135,  6180,  5779,  5779,  5779,  5779,
+    6180,  6180,  6180,  1136,  6985,   957,  1138,   959, -1266, -1266,
+     -88, -1266, -1266,  7065,  7091,   123,   123,    62,    62,   137,
+    6180,  6180,  6180,  5721,  5721,  6180,  4246,   196, -1266,  6180,
+    6180,  6180,  6180,  6180,  1139,  1147,  1148,  6180,  1150, -1266,
+    6180,  6180,  1352, -1266,  5953,  5953,  5953,  1151,  1153,  6180,
+    6180,  6180,  6180,  1141,   434,   665, -1266,  1104,  6180, -1266,
+    1111, -1266,  1112, -1266,  1113,    34,    36,    37,    38,  5953,
+     930, -1266,  8769, -1266,   391,  6180,  5181, -1266,  6180,   488,
+   -1266,  8790,  8811,  8832,  1034,  7117, -1266,   976,  3642,  8853,
+    8258, -1266, -1266,  1517, -1266,  1867,  6180, -1266,   986,   452,
+     237,  8281,  6180,  5953,  1163,  1164, -1266,  6180,  8304,   213,
+    4128,  4128,  4128,  4128,  4128,  4128,  4128,  4128,  4128,  4128,
+    4128,  7143,  4128,  4128,  4128,  4128,  4128,  4128,  4128,  7169,
+    7195,  7221,   106,   395,   106,   990,   991,   988,   993,   998,
+    1002,  7247,   471,    81,  9294, -1266,  1625,  1003,   996,  1004,
+    1000,  1013,   237, -1266,  4821,   181,  1478,  6180,  1171,  1193,
+      27,  1015, -1266,   135,    19,    28,   177, -1266,  4551,   486,
+    3810,   754,  1333,   769,   769,   565,   565,   565,   565,   540,
+     540,   930,   930,   930,   930,     6,  8327, -1266,  6180,  1196,
+      45,  5953,  1198,  5953,  6180,  1199,   550,  1200, -1266,   665,
+    1201,   550,  1195,  5953,  5953,  1074,  1202,  1205,  8874,  1206,
+    1080,  1208,  1209,  8895,  1083,  1212,  1213,  6180,  8916,  4610,
+    1035, -1266, -1266, -1266,  8937,  8958,  6180,  4821,  1218,  1220,
+    8979,  1045,  9294, -1266,  1047,  9294, -1266,  1048,  9294, -1266,
+    1050,  9294, -1266,  9000,  9021,  9042,  4821,  5953,  1049, -1266,
+   -1266,  2020,  2143,   123,  6180,  6180, -1266, -1266,  1051,  1052,
+    5721,  7273,  7299,  7325,  7039,   366,   123,  2344,  9063,  4766,
+    9084,  9105,  9126,  6180,  1230, -1266,  6180,  9147, -1266,  8350,
+    8373, -1266,   534,   560,   578, -1266, -1266,  8396,  8419,  7351,
+    8442,   166, -1266, -1266,  5953, -1266,  1053,  1054,  4946,  1056,
+    1057,  1061, -1266,  5953, -1266,  5953, -1266,  5953, -1266,  5953,
+     581, -1266, -1266,  3831,  5953,   930, -1266,  5953, -1266,  1228,
+    1231,  1247,  1077,  6180,  2513,  6180,  6180, -1266,    43, -1266,
+   -1266,  1078,  4821,  1263,  4821,   259,  5126,   584, -1266, -1266,
+    8465,  1046, -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266,
+   -1266, -1266, -1266, -1266,  6180, -1266, -1266, -1266, -1266, -1266,
+   -1266, -1266,  6180,  6180,  6180, -1266,  5953, -1266, -1266, -1266,
+   -1266,   550,  4821,   550,   550,  1478, -1266, -1266, -1266, -1266,
+   -1266,  6180, -1266,   550, -1266, -1266,  6180,  1265,   130,  6180,
+    1268,  1269,  1664, -1266,  1271,  1093,    26,  1273, -1266,  5953,
+    5953,  5953,  5953, -1266,    81,  6180, -1266,  1100,  1101,  1096,
+   -1266,  1279, -1266, -1266, -1266, -1266, -1266,   166,  8488, -1266,
+   -1266,  1118,   550,   503, -1266,   517,  7377, -1266, -1266, -1266,
+    1281, -1266, -1266,   123,  3623, -1266,   700,  4821,  4821,  1282,
+    4821,   701,  4821,  4821,  1288,  1225,  4821,  4821,  1896,  1296,
+    1299,  5953,  1302,  1303,  2868, -1266, -1266,  1305, -1266,  1321,
+     237,   237,   237,   237,  1322,  1326,  1328,  1306,   595,  1298,
+    2582, -1266, -1266,   273,  7403,  7429, -1266, -1266,  5306,  -109,
+     123,   123,   123,  1304,  1331,  1175,  1360,  1186,    18,    42,
+      47,    48,   546, -1266,   300, -1266,   366,  1363,  1368,  1369,
+    1372,  1373,  9294, -1266,  1953,  1187,  1376,  1377,  1378,  1311,
+    6180,  1381,  1382,  6180,   285,   600, -1266,  6180, -1266,  6180,
+    6180,  6180,   603,   604,   608,   612, -1266,  6180,   616,   623,
+    4821,  4821,  4821,  1385,  7455, -1266,  3999,   953,  1386,  1387,
+    4821,  1203, -1266,  1388,  6180,  1389, -1266,    81,  1391,  1394,
+   -1266,  1393,  4128,  4128,  4128,  4128,   423,  1214,  1226,  1227,
+    1232,  1215,   547,   575,  9168,  1234,  2144, -1266,   290,  1222,
+    1411,  2277, -1266, -1266, -1266,    26,  6180, -1266,   628, -1266,
+     635,   636,   639,   640,   237,  9294,  1238,  6180,  6180,  4821,
+    1242, -1266, -1266,  1250, -1266,  1426,    75,  1432,  6180,  4222,
+      68,  1254,  1255,  1365,  1365,  4821,  1441,  1264,  1266,  1447,
+    1451,  4821,  1270,  1454,  1455, -1266,  1457,  4821,   644,  4821,
+    4821,  1473,  1479, -1266,  4821,  4821,  4821,  4821,  4821,  4821,
+    4821,  4821, -1266,  1480,   726, -1266,  6180,  6180,  6180,  1300,
+    1307,  -101,   -46,    84,  1313, -1266,  4821, -1266,  6180, -1266,
+    1483, -1266,  1484, -1266,  1504, -1266,  1506, -1266, -1266,  5721,
+     591,  4402, -1266,  1327,  1336,  5361, -1266,  5953, -1266, -1266,
+   -1266,  1337,  2377, -1266, -1266,  8511,  1482,    81,  7481,  7507,
+    7533,  7559, -1266, -1266, -1266, -1266,  9294, -1266,    81,  1508,
+    1521,  1398, -1266,  6180,  6180,  6180, -1266,  1527,   901,  1349,
+    1531, -1266,  2514, -1266,   237, -1266,   350, -1266, -1266, -1266,
+   -1266, -1266, -1266,   550, -1266, -1266, -1266,  1478,  1536, -1266,
+   -1266,  1538, -1266, -1266, -1266, -1266, -1266,  1478,  6180,  1537,
+    1540,    27, -1266,  1541,  8534,    26, -1266,  1542,  1543,  1545,
+    1546,  4821,  6180,  7585,  7611,   648, -1266,  6180,  1549, -1266,
+   -1266,   550, -1266,  7637,  5779,  9294, -1266, -1266,  6180,  6180,
+     123,  1548,  1550,  1551, -1266,  6180,  6180, -1266, -1266,  1552,
+    6180, -1266, -1266,  1556,  1557,  1358,  1558,  1421,  6180, -1266,
+    1560,  1561,  1562,  1563,  1564,  1565,   834,  1566,  6180, -1266,
+    5779,  5486,  9189,  3228,    62,    62,   123,  1567,   123,  1568,
+     123,  1570,  6180,   112,  1390,  9210, -1266, -1266, -1266, -1266,
+    5690,   317, -1266,  1572,  3488,  1573,  4821,   123,  3488,  1575,
+     663,  6180, -1266,  1576,   166, -1266,  6180,  6180,  6180,  6180,
+   -1266, -1266, -1266,  4821,  4178,   396,  9231, -1266, -1266,  4582,
+    4821, -1266, -1266,  4821, -1266,  1401,    81,  3862,  4641,  1578,
+    2948, -1266,  1588,  1591, -1266,  1413, -1266, -1266, -1266, -1266,
+   -1266,  1593,   561,  9294,  6180,  6180,  4821,  1412,   668,  9294,
+   -1266,  1597,  6180,  9294, -1266,  5748,  5898,   775, -1266, -1266,
+   -1266,  6085,  6425, -1266,  6453,  1602, -1266,  4821, -1266,  1539,
+    1603,  9294, -1266, -1266, -1266, -1266, -1266, -1266,  1420, -1266,
+   -1266,  7012,  3006,  1607,  1427, -1266,  6180, -1266,  1425,  1429,
+     326, -1266,  1428,   340, -1266,  1431,   343, -1266,  1433,  8557,
+    1614,  4821,  1615,  1435,  6180, -1266,  5541,   346, -1266,   672,
+     353,   412, -1266,  1618,  6481, -1266,  7663,  7689,  7715,  7741,
+    1498,  6180, -1266,  6180, -1266, -1266,  5953,  3079,  1623,  1443,
+    1624, -1266, -1266,  3675, -1266, -1266,   550,  9294, -1266, -1266,
+   -1266,    26, -1266,  1501, -1266, -1266,  6180,  7767,  7793, -1266,
+    4821,  6180,  1628, -1266,  7819, -1266, -1266,  1629,  1631,  1633,
+    1635,  1636,  1640,   675,  1459, -1266,  4821,  5953, -1266, -1266,
+      62,  4347, -1266, -1266,  5721,   366,  5721,   366,  5721,   366,
+    1642, -1266,   683,  4821, -1266,  6509,   123,  1643,  5953,   123,
+   -1266, -1266,  6180,  6180,  6180,  6180,  6180,  6537,  6565,   684,
+   -1266, -1266,  1646, -1266,   687,  3436,   688,  1647, -1266,  1466,
+    9294,  6180,  6180,   691,  9294, -1266,  6180,   692,   714, -1266,
+   -1266, -1266, -1266, -1266, -1266,  1467,  6180,   727,   746,  1468,
+    6180, -1266,  6593,   415,   795,  6621,   437,  1142,  6649,   440,
+    1182, -1266,  4821,  1650,  1569,  2789,  1470,   443, -1266,   767,
+     462,  7845,  7871,  7897,  7923,  3189, -1266, -1266,  1656, -1266,
+    6180, -1266,  1478, -1266, -1266,  6180,  9252,  7949,    46,  7975,
+   -1266, -1266,  6180,  6677,  1657,  1574, -1266,  6705,  1661,  6180,
+    1662,  1663,  6180,  1665,  1666,  6180,  1667,  1485, -1266,  6180,
+   -1266,   366, -1266,  5953,  1669,  5541,  6180,  6180,  6180,  6180,
+   -1266, -1266,   800, -1266,   768, -1266,  6180, -1266,  4821,  6180,
+    8001, -1266, -1266,  4821,  1671, -1266, -1266,  1491,  6733, -1266,
+   -1266,  1492,  6761, -1266, -1266,  1493,  6789, -1266,  1676,  3209,
+    1295,  2825,   796, -1266,   473,   799,  8027,  8053,  8079,  8105,
+    1478,  1677,  1496,  9273,   802,  6817,  6180, -1266, -1266,   366,
+    1679,   366,  1680,   366,  1681, -1266, -1266, -1266, -1266,   366,
+    1687,  5953,  1689,  6180,  6180,  6180,  6180, -1266, -1266,   550,
+   -1266,  1509,  1690,  6845,  2048, -1266,  1510,  2070, -1266,  1512,
+    2083, -1266,  1514,  2237, -1266,   803, -1266,  8131,  8157,  8183,
+    8209,   806, -1266,  1515,  4821, -1266,  1701,  1702,   366,  1704,
+     366,  1705,   366, -1266,  1706,  6180,  6180,  6180,  6180,   550,
+    1707,   550,   807, -1266, -1266,  2286, -1266,  2420, -1266,  2602,
+   -1266,  6873,  6901,  6929,  6957, -1266, -1266,   814, -1266,  1708,
+    1710,  1711,  1716, -1266, -1266, -1266, -1266,   550,  1725, -1266,
+   -1266, -1266, -1266, -1266, -1266
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-   -1191, -1191, -1191, -1191,   745, -1191, -1191, -1191, -1191,   279,
-   -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191,
-   -1191, -1191,  -352,   -72,  4949,  -477, -1191,  1344, -1191, -1191,
-   -1191, -1191, -1191,   386, -1191,   391, -1191,  -296, -1191,   743,
-    1742, -1191, -1191, -1191, -1191,     3,  -449,  -235, -1191, -1191,
-   -1191, -1191, -1191, -1191,  1748, -1191, -1191, -1191, -1191, -1191,
-   -1191, -1191, -1191, -1191, -1191, -1191, -1191, -1191,  -892,  -884,
-   -1191, -1191,  1319, -1191, -1191, -1191, -1191, -1191,   747, -1191,
-   -1191,   204, -1191, -1190,  1260,  -109,  1011,   -58,  -204,   641,
-   -1191,    35,   107, -1191,  -348,    14,    -3
+   -1266, -1266, -1266, -1266,   690, -1266, -1266, -1266, -1266,   198,
+   -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266, -1266,
+   -1266, -1266,  -338,   -73,  1229,  -460, -1266,  1318, -1266, -1266,
+   -1266, -1266, -1266,   312, -1266,   313, -1266, -1266, -1266, -1266,
+   -1266, -1266,   686,  1735,    11,  -459,  -226, -1266, -1266, -1266,
+   -1266, -1266, -1266,  1739, -1266, -1266, -1266, -1266, -1266, -1266,
+   -1266, -1266, -1266, -1266, -1266, -1266, -1266,  -942,  -881, -1266,
+   -1266,  1314, -1266, -1266, -1266, -1266, -1266, -1266,  1529, -1266,
+   -1266,     0, -1266, -1265,  2159,   287,   997,   101,  -225,   562,
+   -1266,    20,     7, -1266,  -344,    -3,    76
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -447
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -464
 static const yytype_int16 yytable[] =
 {
-     101,   573,   465,   170,   314,   188,    88,   678,   679,   813,
-     584,  1061,   587,   247,   481,  1059,   188,   100,   446,   193,
-    1317,   282,   802,   193,   171,   293,   295,   495,   184,   313,
-    1151,  1050,   175,  1502,     4,   185,   299,   827,   364,  1144,
-     477,   167,   478,   285,   940,   969,   234,     5,  1052,   235,
-     239,  1054,   236,   310,   311,  1056,   250,   394,   251,   526,
-     243,   528,   244,  -444,   304,   752,   753,   754,   755,   756,
-     757,   758,   759,   760,   761,   762,   172,   764,   765,   766,
-     767,   768,   769,   770,   317,  1366,   318,   583,   775,   777,
-     454,   455,   620,   426,   427,   428,   173,   621,   431,   432,
-     433,   454,   455,   510,   454,   455,  1190,   632,  1191,   633,
-     240,   454,   455,   168,   241,   207,   252,  1192,   208,  1193,
-     209,   456,   814,   815,   816,   817,   242,   410,   218,  1041,
-     174,   219,   415,   370,   473,   474,   419,   454,   455,   255,
-    1051,   583,   256,   425,  1327,   248,   486,   487,   177,   226,
-     227,   454,   455,  1194,   632,  1195,   638,  1053,   369,   228,
-    1055,   365,   366,  1416,  1057,   371,   237,   673,   970,   971,
-     401,   401,   310,   311,   712,   368,   713,  1059,   189,   315,
-     714,   316,  -445,  1430,   178,   190,   163,   368,   368,   189,
-     818,   454,   455,   249,   179,   828,   807,   828,  1002,   194,
-    1003,   283,   803,   808,   294,   296,   496,   300,   399,   402,
-     176,  1503,   671,   672,   301,   479,   286,  1008,   941,  1009,
-      44,    45,    46,    47,   305,   454,   455,   222,    52,   180,
-     793,    55,   687,   796,   306,   307,   308,   309,   310,   311,
-     223,   224,   457,   376,   388,   389,   390,   181,  -446,   230,
-     232,   391,   238,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   511,   389,   390,   468,   226,   227,
-     182,   391,   586,   302,   469,   303,   454,   455,   228,   184,
-    1308,   632,   304,   642,   734,   229,   806,   183,   306,   307,
-     308,   309,   588,   467,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,   310,   311,
-     454,   455,   391,  1534,   197,   795,   529,   599,   492,   454,
-     455,  1328,   632,   163,   648,   196,   680,   386,   387,   388,
-     389,   390,   809,   186,   985,   686,   391,   198,   401,   401,
-     401,   401,   401,   401,   401,   401,   401,  1461,   510,   622,
-     401,   401,   401,   580,   623,   368,   368,   368,   368,   368,
-     368,   368,   368,   368,   868,   869,   870,   368,   368,   368,
-     368,   306,   307,   308,   309,   310,   311,   566,   567,   568,
-     569,   570,   571,   572,  1588,   632,   187,   724,   577,   578,
-     579,   310,   311,   946,   199,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,   712,
-     191,   713,   536,   391,   774,   398,   104,   454,   455,   306,
-     307,   308,   309,  1183,  1184,   702,   703,   704,   211,   449,
-     450,   212,   192,  1037,   213,   877,   214,   458,   784,   310,
-     311,   466,   618,   774,   619,   195,   722,   583,   196,   163,
-     130,   131,   132,   133,   134,   135,   454,   455,   575,   371,
-     371,   200,   139,   140,   581,     7,     8,   454,   455,   751,
-     625,   201,  1060,   626,   145,   744,  1103,  1104,  1105,  1106,
-     205,  1107,  1108,  1312,   310,   311,  1113,  1116,   454,   455,
-    1437,  1077,  1440,   712,  1443,   713,   454,   455,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   631,
-     389,   390,  1381,   797,   454,   455,   391,   593,    20,    21,
-     594,    23,    24,   595,    26,   596,    28,   742,    29,   743,
-    1383,   398,   104,    34,    35,   206,    37,    38,    39,   632,
-     202,   811,    42,   203,   454,   455,   204,  1121,   454,   455,
-    1227,  1228,   997,  1059,   148,   149,  1059,   632,   628,  1059,
-    1385,   626,   210,   830,  1393,   832,   130,   131,   132,   133,
-     134,   135,   632,  1091,   915,    63,    64,    65,   139,   140,
-     220,   632,   712,   916,   713,   310,   311,   776,   454,   455,
-     145,   632,   950,   917,   306,   307,   308,   309,  1524,   978,
-     221,  1219,   215,   890,  1395,   216,   712,   217,   713,   875,
-     632,   632,   929,   891,   310,   311,   225,  1122,   454,   455,
-     998,   892,   893,   894,   835,   632,   401,   895,   896,   897,
-     898,   233,  1348,  1135,  1396,   454,   455,  1349,   701,   751,
-    1059,   368,   632,   368,   945,  1558,   632,  1561,  1034,  1564,
-     632,  1478,  1078,   454,   455,  1567,   922,   245,   676,   677,
-     925,   926,   927,   928,   837,   632,   450,  1079,   931,  1481,
-     148,   149,   246,   947,  1059,   454,   455,  1059,   951,   632,
-    1059,  1080,   253,  1059,   454,   455,  1591,   712,  1593,   713,
-    1595,  1484,  1112,   798,   306,   307,   308,   309,   254,   279,
-    1492,  1058,   280,   454,   455,   454,   455,  1059,   712,  1059,
-     713,  1059,   257,  1115,   310,   311,   258,   259,   958,  1494,
-     632,  1549,  1081,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,   281,   278,  1296,
-    1297,   391,   632,  1092,  1082,  1231,   287,   401,   981,   982,
-     983,   984,   993,   165,   317,   632,   491,  1084,   492,   288,
-    1286,   162,  1287,   163,   368,   289,   867,   867,   867,   867,
-     344,   401,  1127,   290,  1129,   401,  1130,   291,   401,   401,
-     401,   292,   632,   500,  1131,   952,   501,   401,   368,   502,
-     345,   503,   368,   346,   347,   368,   368,   368,  1019,     7,
-       8,  1530,   348,   632,   368,  1132,   632,   349,  1133,   957,
-     632,   352,  1134,   959,   353,   354,   960,   961,   962,   632,
-     890,  1169,  1254,   355,  1255,   966,   401,   356,   357,   298,
-     891,   632,  1354,  1321,  1355,  1254,   367,  1394,   892,   893,
-     894,   530,   374,   368,   895,   896,   897,   898,  1254,   951,
-    1428,   593,    20,    21,   594,    23,    24,   595,    26,   596,
-      28,  1445,    29,  1446,   996,   375,   392,    34,    35,   890,
-      37,    38,    39,   632,   393,  1457,    42,   880,  1459,   891,
-    1460,   774,   396,  1462,   886,   424,   413,   892,   893,   894,
-     901,   418,   482,   895,   896,   897,   898,  1123,  1254,  1112,
-    1467,  1469,   358,   359,   360,   361,   363,   444,   423,    63,
-      64,    65,  1115,  1254,  1470,  1473,   429,   430,  1206,   397,
-     632,   480,  1474,   403,   632,  1244,  1493,  1354,  1432,  1531,
-     447,   406,   408,   411,   412,   434,   414,   408,   416,   417,
-     439,   408,   420,   421,   632,   632,  1548,  1550,   408,  1254,
-     488,  1555,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,   443,  1479,   440,   632,
-     391,  1584,   739,   448,   441,   452,   453,   459,  1585,  1254,
-    1586,  1601,   460,  1605,   453,  1606,   461,   470,   471,   472,
-     476,  1409,   483,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,   484,   485,   489,
-    1214,   391,   490,   494,   497,   505,   507,   408,   498,   499,
-     517,   890,   512,   513,   519,   520,   514,   515,   516,  1233,
-     518,   891,   524,   521,   522,   525,   527,   523,   533,   892,
-     893,   894,  1001,   535,   538,   895,   896,   897,   898,   539,
-     534,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-     541,   391,   540,   589,   391,   590,   542,   543,   544,   545,
-     546,   547,   548,   549,   550,   551,   552,   553,   554,   555,
-     556,   557,   558,   559,   560,   561,   562,   563,   163,   591,
-     890,  1042,  1043,  1044,   304,   162,   645,   574,   592,   576,
-     891,   649,   650,   651,   659,   654,   401,  1150,   892,   893,
-     894,   655,   660,   661,   895,   896,   897,   898,   662,  1482,
-     666,   598,   408,   368,   600,   601,   602,   603,   604,   605,
-     606,   607,   608,   609,   610,   611,   612,   613,   614,   668,
-    1410,   616,   401,   669,  1234,   693,  1233,   670,   695,   718,
-     696,   698,   705,   706,   505,   711,  1448,   716,   719,   368,
-     636,   720,   721,   732,   735,   641,   741,   747,   617,   748,
-     646,   647,   778,   779,   780,   781,   652,   653,   800,   801,
-    1259,   658,   782,   783,   788,   789,   663,   664,   665,   790,
-     791,   371,   371,   792,   826,   831,   409,   834,   805,   836,
-     841,   409,   838,   842,   843,   409,   681,   682,   683,   358,
-     359,   684,   409,   845,   846,   688,   689,   690,   691,   692,
-     847,   848,   850,   697,   851,   852,   699,   700,  1237,   856,
-     408,   408,   408,   861,   876,   707,   708,   709,   710,   863,
-       7,     8,   890,   717,   883,   884,   910,   923,   932,   933,
-     934,   408,   891,   935,   944,  1262,  1525,   725,   727,   942,
-     892,   893,   894,   968,  1205,   973,   895,   896,   897,   898,
-     974,   980,  1402,   976,   990,   992,   710,   988,   977,   506,
-     408,   409,   746,   989,   995,  1000,   749,  1006,  1012,  1017,
-    1018,  1291,   593,    20,    21,   594,    23,    24,   595,    26,
-     596,    28,  1013,    29,  1020,  1021,  1024,  1026,    34,    35,
-    1025,    37,    38,    39,  1027,  1030,  1431,    42,  1028,  1029,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,   799,  1332,   401,  1452,   391,  1031,
-    1485,  1032,  1338,  1341,  1033,  1035,  1045,  1049,  1047,  1046,
-      63,    64,    65,   368,  1048,  1068,  1062,   890,  1265,  1063,
-    1072,  1064,  1065,  1066,  1069,   825,  1070,   891,   408,  1071,
-     408,   833,  1074,  1075,  1088,   892,   893,   894,   727,   839,
-     371,   895,   896,   897,   898,  1093,   409,  1094,  1096,  1097,
-    1099,  1100,   853,  1101,  1298,  1109,  1301,  1102,  1304,  1110,
-    1111,   859,  1119,  1125,  1124,  1143,   866,   866,   866,   866,
-    1141,  1136,  1315,   740,   408,  1318,  1319,  1142,   506,  1146,
-    1154,   881,   882,  1152,  1158,  1172,  1161,   885,  1153,  1159,
-    1160,  1162,  1165,  1164,  1526,  1166,  1529,  1167,  1175,  1173,
-     909,  1176,  1177,   911,  1178,  1182,  1188,  1189,  1200,  1201,
-    1196,  1202,  1203,   787,  1218,  1545,  1210,   422,  1211,  1215,
-    1220,   408,  1221,  1222,  1226,   408,   408,   408,   408,  1229,
-    1230,  1235,  1236,   408,  1240,  1239,  1258,  1242,   442,  1245,
-     936,   445,   938,   939,  1246,  1247,  1248,  1266,  1267,  1268,
-    1271,  1569,   975,  1273,   409,   409,   409,  1274,  1275,  1276,
-    1280,  1277,  1285,  1288,  1299,   475,   890,  1302,  1305,  1309,
-     953,  1313,  1316,  1320,  1323,   409,   891,  1335,   954,   955,
-     956,  1342,   728,   408,   892,   893,   894,  1344,  1345,  1347,
-     895,   896,   897,   898,  1353,   965,  1356,  1365,  1346,  1368,
-     967,  1369,  1367,   972,   409,  1370,  1371,  1372,  1373,  1376,
-     401,  1388,  1377,   408,   408,   408,   408,  1016,  1379,   986,
-     531,   532,  1380,  1382,  1384,  1390,  1386,   368,  1498,  1397,
-    1391,  1404,   537,  1399,  1406,  1405,  1418,  1411,  1422,  1423,
-    1424,  1425,   401,  1426,   401,  1436,  1427,  1439,  1572,  1442,
-    1429,  1444,  1451,  1458,  1463,  1464,  1471,  1450,  1487,   368,
-    1453,   368,   401,   408,  1577,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,   368,
-    1597,  1475,  1600,   391,  1488,  1491,  1496,  1507,     7,     8,
-    1508,  1510,   409,  1513,   409,  1514,  1517,  1551,  1518,  1521,
-    1611,  1527,   728,   840,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,  1543,  1552,
-    1522,  1537,   391,  1559,  1073,  1562,  1565,  1076,  1568,  1067,
-    1570,  1539,  1575,  1541,  1553,  1589,  1574,  1083,   409,  1578,
-     593,    20,    21,   594,    23,    24,   595,    26,   596,    28,
-    1590,    29,  1592,  1098,  1120,  1580,    34,    35,  1528,    37,
-      38,    39,     7,     8,  1594,    42,  1596,  1598,  1582,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,  1607,  1128,   409,  1587,   391,  1608,   409,
-     409,   409,   409,  1609,  1610,  1137,  1138,   409,    63,    64,
-      65,  1612,  1145,  1499,  1420,    87,  1147,  1149,  1156,   629,
-    1421,    95,   657,     0,   593,    20,    21,   594,    23,    24,
-     595,    26,   596,    28,     0,    29,  1241,     0,     0,     0,
-      34,    35,     0,    37,    38,    39,     0,     0,     0,    42,
-       0,     0,     0,     0,  1185,  1186,  1187,   409,     0,     0,
-       0,     0,     0,     0,  1197,     0,  1199,     0,     0,     0,
-       0,   878,     0,     0,     0,     0,     0,  1204,     0,     0,
-       0,     0,    63,    64,    65,   408,     0,   409,   409,   409,
-     409,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,  1223,  1224,  1225,   391,
-       0,     0,     0,     0,   794,     0,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,     0,   409,     0,  1238,
-       0,     0,     0,     0,     0,   879,     0,     0,     0,     0,
-       0,     7,     8,  1251,     0,     0,     0,     0,  1257,     0,
-       0,     0,     0,     0,     0,  1261,     0,     0,   890,  1263,
-    1264,     0,     0,     0,     0,     0,  1269,  1270,   891,     0,
-       0,  1272,     0,     0,     0,   860,   892,   893,   894,  1279,
-       0,     0,   895,   896,   897,   898,   874,     0,     0,  1289,
-     104,  1290,     0,   593,    20,    21,   594,    23,    24,   595,
-      26,   596,    28,  1307,    29,     0,     0,     0,     0,    34,
-      35,     0,    37,    38,    39,   408,     0,     0,    42,   408,
-     890,     0,  1322,     0,   130,   131,   132,   133,   134,   135,
-     891,     0,     0,     0,     0,  1331,   139,   140,   892,   893,
-     894,     0,     0,  1340,   895,   896,   897,   898,   145,     0,
-       0,    63,    64,    65,     0,     0,  1579,     0,     0,  1350,
-    1351,     0,   943,     0,   102,   297,     0,  1357,     0,     0,
-     105,   106,   107,     0,     0,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,     0,     0,     0,
-       0,  1378,     0,     0,     0,     0,   136,   137,   138,     0,
-       0,     0,     0,     0,   902,   141,   142,   143,  1581,  1392,
-       0,   505,     0,   144,     0,     0,   890,     0,   148,   149,
-       0,     0,  1400,     0,  1401,     0,   891,   408,     0,   409,
-       0,     0,     0,  1408,   892,   893,   894,     0,     0,     0,
-     895,   896,   897,   898,     0,     0,  1413,     0,     0,   890,
-    1126,  1417,  1004,  1005,     0,  1007,     0,  1010,  1011,   891,
-       0,  1014,  1015,     0,     0,     0,     0,   892,   893,   894,
-       0,   408,     0,   895,   896,   897,   898,     0,  1435,     0,
-    1438,     0,  1441,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   408,   147,     0,     0,  1454,     0,     0,     0,
-     150,   151,   152,   153,   154,     0,     0,     0,     0,     0,
-       0,  1465,  1466,     0,  1583,     0,  1468,     0,   462,   463,
-       0,     0,     0,   157,     0,     0,  1472,     0,   464,     0,
-    1476,     0,     0,   161,     0,   229,     0,     0,     0,   890,
-       0,     0,  1085,  1086,  1087,     0,     0,  1602,     0,   891,
-       0,     0,  1095,     0,     0,     0,  1497,   892,   893,   894,
-       0,  1257,     0,   895,   896,   897,   898,     0,  1505,   409,
-       0,     0,     0,   409,     0,  1512,     0,     0,  1516,     0,
-       0,  1520,     0,     0,     0,  1523,     0,     0,     0,   408,
-       0,   408,     0,     0,     0,     0,     0,     0,  1533,     0,
-    1140,  1535,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,  1157,     0,     0,     0,
-     391,     0,  1163,     0,     0,     0,     0,     0,  1168,   890,
-    1170,  1171,     0,  1557,     0,  1174,     0,  1603,     0,   891,
-    1179,  1180,  1181,     0,     0,     0,   408,   892,   893,   894,
-       0,     0,     0,   895,   896,   897,   898,  1198,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,  1209,     0,   391,   506,  1213,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   102,   297,     0,
-       0,   409,     0,   105,   106,   107,     0,   409,   108,   109,
+     101,  1379,   457,   323,  1110,   582,   193,   584,   708,   709,
+     856,   307,   375,   172,    89,   592,   476,   252,   198,   176,
+     509,   511,   513,   193,  1099,   255,   171,   256,   492,   322,
+     288,   845,   198,   189,   506,   604,   301,   607,   303,   752,
+     190,   754,   756,   758,     5,   179,   235,   237,  1101,   243,
+     988,   870,  1577,  1103,  1105,   310,   488,   311,   489,   282,
+     291,  1108,   465,   466,   312,     4,   379,   244,   403,   768,
+     465,   466,  1433,   298,  1207,   312,   543,   227,   545,   102,
+    1090,  1200,   174,   465,   466,   546,  1246,   503,  1247,   257,
+     228,   229,   167,   212,   465,   466,   213,   314,   214,   703,
+     793,   794,   795,   796,   797,   798,   799,   800,   801,   802,
+     803,   467,   805,   806,   807,   808,   809,   810,   811,   310,
+     525,   326,   815,   817,   818,   465,   466,   857,   858,   859,
+     860,   245,   175,   827,  1018,   246,   654,  1100,   655,   376,
+     377,  1248,   177,  1249,   319,   320,   248,   247,   249,   510,
+     512,   514,   299,   253,  -461,  1483,   178,    45,    46,    47,
+      48,  1102,   298,   507,   181,    53,  1104,  1106,    56,   385,
+     310,  1497,   528,   223,   298,   298,   224,   380,   638,   312,
+     639,   298,   324,   194,   325,   167,   308,   282,   603,   167,
+     195,   260,   282,   309,   261,   861,   282,   408,   411,   282,
+     194,   254,   199,   282,   282,   282,   282,   850,   182,   282,
+     282,   282,   784,   871,   289,   846,   851,   508,   183,   302,
+     282,   304,   753,   282,   755,   757,   759,   180,   989,  1108,
+     460,   461,   701,   702,  1578,   490,   606,   292,   469,   465,
+     466,   378,   477,   871,   603,   282,   282,   282,   315,   316,
+     317,   318,   717,   410,   410,   465,   466,   282,   282,   184,
+     410,  1019,  1020,   742,   836,   743,   603,   839,   319,   320,
+     282,  1250,   282,  1251,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   526,   398,   399,   742,   185,
+     743,   421,   400,   646,   231,   232,   426,  1177,   465,   466,
+     430,  1370,   608,   186,   233,   282,   282,   436,   465,   466,
+     774,   234,   479,  1614,   216,   468,   189,   217,   282,   480,
+     218,   554,   219,   849,   710,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,   315,
+     316,   317,   318,   400,   319,   320,   298,   298,   298,   298,
+     298,   298,   282,   298,   298,   187,   298,   298,   201,   319,
+     320,   298,   298,   298,   298,   852,   838,   465,   466,   595,
+     583,   188,   585,   586,   587,   601,   589,   590,   191,   647,
+     593,   282,   648,   716,   597,   598,   599,   315,   316,   317,
+     318,   319,   320,   202,  1034,   315,   316,   317,   318,  1682,
+     220,  -462,   192,   221,  1393,   222,   239,   319,   320,   240,
+     207,   650,   241,   208,   648,   282,   209,   315,   316,   317,
+     318,   196,   465,   466,   197,   410,   410,   410,   410,   410,
+     410,   200,   410,   410,   201,   410,   410,   319,   320,   478,
+     410,   410,   410,   600,   465,   466,   203,   994,   315,   316,
+     317,   318,   204,   683,   686,   689,   692,   933,   206,   654,
+    1086,   660,   205,   319,   320,   706,   707,   934,   319,   320,
+    1126,   465,   466,   461,   920,   935,   936,   937,   380,   380,
+     210,   938,   939,   940,   941,   619,   792,  1109,   465,   466,
+     211,   282,   282,   282,   437,   438,   439,   465,   466,   442,
+     443,   444,   298,  1504,  1374,  1507,   654,  1510,   664,   231,
+     232,   465,   466,  1444,   465,   466,   282,   465,   466,   233,
+     654,   215,   670,   282,   465,   466,   242,  1446,   319,   320,
+    1448,   226,   840,  1456,   640,   484,   485,  1154,  -463,   641,
+    1458,   225,  1158,  1159,  1160,  1161,  1162,   497,   498,   230,
+     282,   642,  1169,  1172,   407,   105,   643,   250,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,  1075,  1076,  1077,  1078,   400,   742,   654,   743,
+     762,   746,   816,   465,   466,  1394,   465,   466,   238,   131,
+     132,   133,   134,   135,   136,   732,   733,   734,   140,  1459,
+     251,   282,  1549,   142,   143,   742,   144,   743,   465,   466,
+     654,   465,   466,   841,   465,   466,   742,   149,   743,  1600,
+     760,  1027,   744,  1108,  1552,   258,  1108,  1555,   262,  1108,
+    1563,   645,   259,   465,   466,   263,   646,   933,   282,   782,
+     282,   783,   264,   298,   465,   466,   298,   934,   298,  1565,
+     282,   282,   294,   826,   787,   935,   936,   937,   646,   284,
+    1631,   938,   939,   940,   941,   285,   878,  1275,   792,   297,
+     742,   882,   743,   654,   282,   854,   767,  1644,  1280,  1647,
+    1178,  1650,   933,   515,   295,  1046,   516,  1653,   286,   517,
+     654,   518,   934,   282,   282,   287,  1191,   152,   153,  1047,
+     935,   936,   937,   923,   654,   293,   938,   939,   940,   941,
+     929,   296,   995,   397,   398,   399,   944,   300,  1000,  1108,
+     400,   654,   410,   958,   352,   880,  1685,   410,  1687,   742,
+    1689,   743,  1239,  1240,  1168,  1107,   395,   396,   397,   398,
+     399,   282,   873,  1415,   875,   400,   363,   654,  1416,   959,
+     282,   310,   282,   502,   282,   503,   282,   742,   166,   743,
+     167,   282,  1171,  1108,   282,   654,  1108,   960,   654,  1108,
+     976,   654,  1108,   997,  1051,  1057,  1052,  1058,   353,   282,
+    1262,   282,   654,   354,  1083,  1358,  1359,   654,   298,  1127,
+     654,   654,  1132,  1133,  1042,   654,   402,  1134,   918,   654,
+    1183,  1135,   355,   654,  1108,  1137,  1108,  1610,  1108,   455,
+     654,  1001,  1138,   282,   356,  1185,  1293,  1186,   298,   282,
+     298,   298,   654,   654,  1187,  1188,   654,   654,  1189,  1190,
+     298,   654,  1011,  1225,   357,  1316,  1402,  1317,  1348,   359,
+    1349,  1007,   364,  1009,  1010,   965,   282,   282,   282,   282,
+     654,   365,  1383,  1015,   972,  1421,   973,  1422,   974,  1316,
+     975,  1457,  1316,   366,  1495,   978,   367,   410,   979,   298,
+    1512,   654,  1513,  1528,  1530,   646,  1531,  1533,  1316,  1168,
+    1538,  1540,   383,  1050,   282,   282,   933,   282,   368,   282,
+     282,  1000,  1045,   282,   282,   405,   934,   410,   282,   410,
+     410,  1171,   424,  1541,   935,   936,   937,  1288,  1289,   410,
+     938,   939,   940,   941,  1316,   429,  1544,  1006,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+    1091,  1092,  1093,   654,   400,  1545,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,  1179,   465,   466,   410,   400,
+    1030,  1031,  1032,  1033,   654,  1421,  1564,  1611,   384,   401,
+    1306,  1145,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,   435,   282,   282,   282,
+     400,  1499,   434,   654,  1550,  1630,   654,   282,  1632,  1316,
+     654,  1641,  1674,  1679,  1316,  1680,  1699,   440,   103,   305,
+     441,  1707,  1068,  1708,   106,   107,   108,   445,   446,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
      120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-     510,     0,     0,     0,     0,     0,     0,  1604,     0,   136,
-     137,   138,     0,     0,     0,   409,     0,     0,   141,   142,
-     143,     0,     0,     0,     0,  1249,   144,   102,   297,     0,
-       0,     0,     0,   105,   106,   107,   409,     0,   108,   109,
+     130,   447,   448,   449,   450,   451,   282,   452,   493,   527,
+     137,   138,   139,   458,   141,   459,   470,   471,   472,   481,
+     407,   105,   282,   145,   146,   147,  1206,   482,   282,   483,
+     487,   148,  1476,   491,   282,   494,   282,   282,   499,   495,
+     496,   282,   282,   282,   282,   282,   282,   282,   282,   500,
+     501,   505,   530,  1294,   534,   131,   132,   133,   134,   135,
+     136,   536,   537,   282,   140,   167,   312,   541,   542,   142,
+     143,   544,   144,   552,   553,   556,   557,   559,   282,  1261,
+     400,   609,   282,   149,   282,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,   610,
+     611,   166,   667,   400,   612,  1146,   671,   672,   673,   698,
+     676,   151,   677,   696,   699,   741,   723,   700,   154,   155,
+     156,   157,   158,   725,   747,   726,   728,   735,   547,   736,
+     298,   749,   750,   751,   775,   772,   159,   160,   781,   788,
+     789,   161,   819,   820,  1296,   821,   274,   843,   832,   373,
+     822,   165,   834,  1295,  1299,   823,  1477,   420,   282,   824,
+     831,   833,   420,   152,   153,   835,   420,   844,   298,   848,
+     869,  1294,   883,   420,   874,   877,   879,   881,   886,   887,
+    1327,  1324,   888,   890,   891,   892,   893,   895,  1270,   896,
+     897,  1321,   906,   901,   319,   320,   908,   910,  1515,   911,
+     912,   999,   913,   933,   919,   980,   953,   966,   981,   410,
+     926,   927,   967,   934,   969,   970,  1360,  1353,  1363,   971,
+    1366,   935,   936,   937,   982,   380,   380,   938,   939,   940,
+     941,   282,   983,   282,  1377,   282,   990,  1380,  1381,   992,
+     521,  1017,   420,   933,  1022,  1023,  1026,   410,  1025,  1029,
+     282,  1037,  1038,   934,  1039,  1041,  1044,   282,  1049,  1055,
+     282,   935,   936,   937,   282,  1061,  1398,   938,   939,   940,
+     941,  1062,  1084,  1066,  1405,  1408,  1067,   637,  1094,  1069,
+    1070,  1073,  1082,   282,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,  1074,  1079,
+     313,  1553,   400,  1080,   282,  1081,  1601,  1095,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+     339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
+     349,   350,   351,  1096,     7,     8,  1097,  1098,   282,   358,
+    1111,  1556,   360,   282,  1112,  1117,  1113,   361,   362,  1114,
+    1115,   420,  1118,  1119,  1120,  1121,   933,  1123,  1124,  1142,
+    1147,  1148,  1150,   282,  1151,  1153,   934,  1155,  1156,  1157,
+     282,  1163,  1167,   298,   935,   936,   937,  1180,  1164,  1165,
+     938,   939,   940,   941,  1166,   521,  1175,   282,  1181,  1192,
+     613,    21,    22,   614,    24,    25,   615,    27,   616,    29,
+    1197,    30,  1199,   282,   282,  1198,    35,    36,  1202,    38,
+      39,    40,  1208,  1209,  1503,    43,  1506,  1214,  1509,  1210,
+     282,   380,  1215,  1217,  1216,   282,  1517,  1218,  1220,  1520,
+    1221,  1222,  1223,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,  1228,    64,    65,
+      66,   400,   410,   105,  1627,  1229,  1274,  1238,  1244,  1256,
+    1257,   420,   420,   420,   504,  1245,  1252,  1469,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,   282,
+    1258,   529,  1259,   400,  1281,  1266,   420,   131,   132,   133,
+     134,   135,   136,   766,  1267,  1271,   140,  1282,  1283,     7,
+       8,   142,   143,  1287,   144,   169,  1290,  1291,  1498,  1573,
+    1297,   731,  1298,  1301,  1302,   149,  1337,  1304,  1307,  1308,
+     420,  1309,  1310,  1320,  1328,  1339,  1329,  1330,  1333,  1519,
+     282,  1335,   282,  1336,  1338,  1604,  1342,  1343,  1344,  1345,
+    1346,  1347,  1350,  1361,  1364,   282,  1367,  1371,  1375,  1378,
+     282,  1382,  1385,  1401,  1409,   613,    21,    22,   614,    24,
+      25,   615,    27,   616,    29,  1411,    30,  1412,  1413,  1414,
+    1420,    35,    36,  1423,    38,    39,    40,  1432,  1436,  1435,
+      43,  1434,   306,  1439,  1442,  1440,  1445,  1637,  1443,  1447,
+    1451,  1449,  1453,  1454,  1460,   152,   153,  1466,   282,  1471,
+    1473,   830,  1472,  1478,  1485,  1489,   298,  1490,   420,  1491,
+     420,  1492,  1493,    64,    65,    66,  1494,  1496,  1511,  1518,
+     766,   885,  1529,  1534,  1535,  1542,  1558,  1546,  1562,  1662,
+    1559,   282,  1571,  1582,  1602,  1583,  1605,  1586,  1589,  1590,
+    1024,  1593,  1594,  1597,  1598,  1603,   298,  1618,   298,  1619,
+    1621,  1623,  1625,  1638,  1639,  1645,  1648,  1651,   369,   370,
+     371,   372,   374,  1654,   420,  1656,  1665,  1664,  1668,  1695,
+    1670,  1698,  1672,  1681,   298,   406,   779,  1683,  1684,   412,
+    1686,  1688,  1690,  1696,  1709,   410,  1710,  1711,   417,   419,
+     422,   423,  1712,   425,   419,   427,   428,  1713,   419,   431,
+     432,  1714,  1655,  1574,   651,   419,  1201,  1487,    88,  1488,
+    1212,   420,    96,  1303,     0,     0,     0,     0,     0,     0,
+     420,     0,   420,   454,   420,   410,   420,   410,   679,     0,
+       0,   420,   463,   464,   420,     0,     0,     0,     0,     0,
+       0,   464,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   410,     0,     0,     0,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,   520,   522,   419,   400,     0,     0,     0,     0,
+       0,     0,     0,   420,   531,   532,   533,     0,   535,     0,
+       0,   538,   539,     0,     0,   540,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+     551,     0,     0,     0,   400,     0,   420,   420,   420,   420,
+       0,     0,     0,   558,     0,     0,   560,   561,   562,   563,
+     564,   565,   566,   567,   568,   569,   570,   571,   572,   573,
+     574,   575,   576,   577,   578,   579,   580,   581,     0,     7,
+       8,     0,     0,     0,     0,     0,     0,   591,     0,     0,
+     594,     0,   596,     0,     0,     0,     0,     0,   420,     0,
+       0,     0,  1065,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   618,   419,     0,   620,   621,   622,   623,   624,
+     625,   626,   627,   628,   629,   630,   631,   632,   633,   634,
+       0,     0,   636,     0,     0,   613,    21,    22,   614,    24,
+      25,   615,    27,   616,    29,     0,    30,   520,     0,     0,
+       0,    35,    36,   658,    38,    39,    40,     0,   663,  1116,
+      43,     0,     0,   668,   669,     0,     0,     0,     0,   674,
+     675,     0,     0,     0,   680,   682,   685,   688,   691,   693,
+     694,   695,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    64,    65,    66,     0,     0,     0,   711,
+     712,   713,   369,   370,   714,     0,     0,     0,   718,   719,
+     720,   721,   722,     0,     0,     0,   727,     0,     0,   729,
+     730,     0,     0,   419,   419,   419,     0,     0,   737,   738,
+     739,   740,     7,     8,     0,     0,     0,   748,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   419,     0,
+       0,     0,     0,     0,   763,   765,   780,   636,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,   740,   400,     0,     0,     0,
+       0,   786,   419,     0,     0,     0,   790,     0,   613,    21,
+      22,   614,    24,    25,   615,    27,   616,    29,     0,    30,
+       0,     0,     0,     0,    35,    36,     0,    38,    39,    40,
+       0,     0,     0,    43,   420,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,   842,     0,     0,   933,
+       0,     0,     0,     0,     0,     0,    64,    65,    66,   934,
+    1176,     0,     0,     0,     0,     7,     8,   935,   936,   937,
+       0,   933,     0,   938,   939,   940,   941,   868,     0,     0,
+     419,   934,   419,   876,   933,     0,     0,     0,     0,   935,
+     936,   937,   765,   884,   934,   938,   939,   940,   941,     0,
+       0,     0,   935,   936,   937,     0,   898,     0,   938,   939,
+     940,   941,     0,     0,     0,   904,     0,     0,     0,   921,
+       0,   613,    21,    22,   614,    24,    25,   615,    27,   616,
+      29,     0,    30,     0,     0,     0,   419,    35,    36,     0,
+      38,    39,    40,   924,   925,     0,    43,  1667,     0,   928,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   952,     0,     0,   954,     0,     0,     0,  1669,
+       0,   420,     0,     0,     0,   420,     0,     0,     0,    64,
+      65,    66,  1671,   419,     0,     0,     0,     0,     0,     0,
+       0,     0,   419,  1182,   419,     0,   419,     0,   419,     0,
+       0,     0,     0,   419,     0,     0,   419,     0,     0,     0,
+       0,     0,   984,     0,   986,   987,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,     0,     0,   933,     0,
+       0,     0,   922,  1002,     0,     0,     0,     0,   934,     0,
+       0,  1003,  1004,  1005,     0,   419,   935,   936,   937,     0,
+       0,     0,   938,   939,   940,   941,     7,     8,     0,     0,
+    1014,   433,     0,     0,     0,  1016,     0,     0,  1021,     0,
+       0,     0,     0,   521,     0,     0,     0,   933,   419,   419,
+     419,   419,   453,  1272,  1035,   456,     0,   934,     0,     0,
+       0,     0,     0,   420,     0,   935,   936,   937,     0,     0,
+     420,   938,   939,   940,   941,     0,     0,     0,     0,   486,
+       0,     0,   613,    21,    22,   614,    24,    25,   615,    27,
+     616,    29,     0,    30,     0,     0,  1673,     0,    35,    36,
+     419,    38,    39,    40,   420,     0,     0,    43,     0,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,   420,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   548,   549,     0,
+      64,    65,    66,     0,     0,  1700,     0,     0,     0,     0,
+     555,     0,     0,     0,     0,     0,     0,     0,     0,  1122,
+       0,     0,  1125,     0,     0,     0,  1128,     0,  1129,  1130,
+    1131,     0,     0,     0,     0,     0,  1136,     0,     0,     0,
+       0,   933,     0,     0,   588,     0,     0,     0,     0,     0,
+    1292,   934,     0,  1152,     0,     7,     8,     0,     0,   935,
+     936,   937,     0,   945,     0,   938,   939,   940,   941,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,  1184,     0,   400,     0,     0,
+     420,     0,   420,     0,     0,     0,  1193,  1194,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,  1203,  1205,     0,
+       0,   613,    21,    22,   614,    24,    25,   615,    27,   616,
+      29,     0,    30,     0,     7,     8,     0,    35,    36,     0,
+      38,    39,    40,     0,     0,     0,    43,     0,     0,  1701,
+       0,     0,     0,     0,     0,  1241,  1242,  1243,     0,     0,
+       0,     0,     0,     0,     0,  1253,     0,  1255,   420,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  1260,    64,
+      65,    66,     0,     0,     0,     0,   419,     0,     0,     0,
+     613,    21,    22,   614,    24,    25,   615,    27,   616,    29,
+       0,    30,     0,     0,     0,     0,    35,    36,     0,    38,
+      39,    40,  1284,  1285,  1286,    43,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,   933,   400,     0,     0,     0,     0,     0,
+       0,     0,   985,   934,     0,     0,     0,  1300,    64,    65,
+      66,   935,   936,   937,     0,     0,     0,   938,   939,   940,
+     941,  1313,     0,     0,     0,     0,  1319,     0,     0,     0,
+       0,     0,     0,  1323,     0,     0,     0,  1325,  1326,     0,
+       0,     0,     0,     0,  1331,  1332,     0,     0,     0,  1334,
+       0,     0,     0,     0,     0,     0,     0,  1341,     0,     0,
+       0,     0,     0,   837,     0,     0,     0,  1351,     0,  1352,
+       0,  1085,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1702,     0,   419,     0,     0,     0,   419,     0,     0,
+    1384,     7,     8,     0,     0,  1386,  1387,  1388,  1389,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  1397,     0,
+       0,     0,     0,     0,     0,     0,     0,  1407,     0,     0,
+       0,     0,     0,     0,     0,     0,   905,     7,     8,     0,
+       0,     0,     0,  1417,  1418,     0,     0,     0,     0,     0,
+       0,  1424,     0,     0,     0,   917,     0,   613,    21,    22,
+     614,    24,    25,   615,    27,   616,    29,     0,    30,     0,
+       0,     0,     0,    35,    36,     0,    38,    39,    40,     0,
+       0,     0,    43,     0,     0,  1441,     0,     0,     0,     0,
+       0,     0,     0,   613,    21,    22,   614,    24,    25,   615,
+      27,   616,    29,  1455,    30,   520,     0,     0,     0,    35,
+      36,     0,    38,    39,    40,    64,    65,    66,    43,     0,
+    1467,     0,  1468,     0,     0,   419,     0,     0,     0,     0,
+       0,     0,  1475,     0,     0,     0,     0,     0,     0,     0,
+       0,   991,     0,   993,     0,  1480,     0,     0,     0,     0,
+    1484,    64,    65,    66,  1410,     0,     0,     0,     0,  1071,
+       0,     0,     0,     0,     0,     0,   419,     0,     0,     0,
+       0,     0,     0,  1502,     0,  1505,     0,  1508,  1560,     0,
+       0,  1008,     0,     0,     0,     0,     0,   419,     0,     0,
+       0,  1521,  1522,  1523,  1524,  1525,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    1536,  1537,  1438,     0,  1628,  1539,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1543,     0,     0,     0,  1547,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,  1053,  1054,   400,  1056,
+       0,  1059,  1060,     0,     0,  1063,  1064,     0,     0,  1572,
+       0,     0,     0,     0,  1319,     0,     0,     0,     0,     0,
+       0,  1580,     0,     0,     0,     0,     0,     0,  1588,     0,
+       0,  1592,     0,     0,  1596,  1470,     0,     0,  1599,     0,
+       0,     0,   419,     0,   419,  1606,  1607,  1608,  1609,     0,
+       0,     0,     0,     0,     0,  1613,     0,     0,  1615,     0,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1139,
+    1140,  1141,     0,     0,     0,  1643,     0,     0,     0,  1149,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     419,     0,  1657,  1658,  1659,  1660,     0,     0,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,  1570,     0,     0,  1196,     0,
+       0,     0,     0,     0,  1691,  1692,  1693,  1694,     0,     0,
+       0,     0,     0,     0,  1213,  1626,     0,     0,     0,     0,
+    1219,     0,     0,     0,     0,     0,  1224,     0,  1226,  1227,
+       0,     0,     0,  1230,  1231,  1232,  1233,  1234,  1235,  1236,
+    1237,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,  1254,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    1265,     0,     0,     0,  1269,     0,     0,   103,   104,   105,
+       0,     0,     0,   106,   107,   108,     0,     0,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+       0,     0,     0,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,     0,     0,     0,   142,   143,     0,
+     144,     0,   145,   146,   147,     0,     0,     0,     0,     0,
+     148,   149,     0,     0,     0,     0,     0,     0,     0,     0,
+    1311,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,     0,     0,   150,  1356,     0,  1357,     0,     0,
+     151,   152,   153,     0,     0,  1196,     0,   154,   155,   156,
+     157,   158,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  1390,  1532,   525,   159,   160,     0,     0,  1399,
+     161,     0,  1400,     0,     0,   162,  1404,   163,     0,   164,
+     165,     0,   166,   525,   167,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1419,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,   103,   265,     0,   400,     0,  1196,   106,   107,   108,
+       0,   644,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   267,     0,     0,     0,     0,     0,
+    1452,     0,     0,   137,   138,   139,     0,   141,     0,     0,
+       0,     0,     0,     0,     0,     0,   145,   146,   147,     0,
+       0,     0,     0,     0,   148,     0,   268,     0,     0,   269,
+       0,     0,   270,     0,   271,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   272,     0,     0,  1196,
+       0,     0,     0,    45,    46,    47,    48,    49,     0,     0,
+       0,    53,     0,     0,    56,  1196,     0,     0,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   653,
+     398,   399,  1514,     0,     0,     0,   400,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   526,   398,
+     399,   525,     0,     0,   151,   400,     0,     0,     0,     0,
+       0,   154,   155,   156,   157,   158,     0,     0,     0,     0,
+     776,     0,     0,     0,     0,     0,     0,     0,     0,   473,
+    1376,     0,     0,     0,   161,     0,     0,     0,     0,   475,
+       0,  1557,     0,     0,   165,     0,   234,   523,   103,   265,
+       0,     0,     0,     0,   106,   107,   108,     0,     0,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
      120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-       0,     0,     0,     0,     0,  1281,  1282,  1283,  1284,   136,
-     137,   138,     0,     0,     0,     0,     0,     0,   141,   142,
-     143,     0,     0,     0,     0,     0,   144,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-    1140,     0,   391,     0,     0,     0,   147,     0,     0,     0,
-       0,     0,  1324,   150,   151,   152,   153,   154,     0,  1333,
-       0,  1334,     0,     0,     0,  1337,     0,     0,     0,  1216,
-       0,   155,   156,   409,     0,   409,   157,     0,     0,     0,
-       0,   269,     0,     0,  1352,     0,   161,     0,  1232,     0,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   511,   389,   390,     0,  1140,   147,  1343,   391,     0,
-       0,     0,     0,   150,   151,   152,   153,   154,     0,     0,
+     130,   267,     0,     0,     0,     0,     0,     0,     0,     0,
+     137,   138,   139,     0,   141,     0,     0,     0,     0,     0,
+       0,     0,     0,   145,   146,   147,     0,  1196,     0,     0,
+       0,   148,  1617,   268,     0,     0,   269,     0,     0,   270,
+       0,   271,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   272,     0,     0,     0,     0,     0,     0,
+      45,    46,    47,    48,    49,     0,     0,     0,    53,     0,
+       0,    56,     0,     0,     0,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   653,   398,   399,     0,
+       0,     0,     0,   400,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,   855,     0,
+       0,   151,   400,  1196,     0,     0,     0,     0,   154,   155,
+     156,   157,   158,     0,     0,     0,     0,     0,     0,   977,
+       0,     0,     0,     0,     0,     0,   159,   418,     0,     0,
+       0,   161,     0,     0,     0,     0,   274,     0,     0,     0,
+       0,   165,     0,     0,   523,   103,   265,   105,     0,     0,
+       0,   106,   107,   108,     0,     0,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   124,   125,   126,   127,   128,   129,   130,   267,     0,
+       0,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+     140,   141,     0,     0,     0,   142,   143,     0,   144,     0,
+     145,   146,   147,     0,     0,     0,     0,     0,   148,   149,
+     268,     0,     0,   269,     0,     0,   270,     0,   271,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     272,     0,     0,     0,     0,     0,     0,    45,    46,    47,
+      48,    49,     0,     0,     0,    53,     0,     0,    56,     0,
+       0,     0,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,     0,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,  1144,   151,   152,
+     153,   400,     0,     0,     0,   154,   155,   156,   157,   158,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     409,   155,   156,     0,     0,     0,   157,     0,     0,  1389,
-       0,   269,     0,     0,   362,     0,   161,     0,   102,   103,
-     104,     0,     0,     0,   105,   106,   107,     0,     0,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-     129,     0,     0,  1140,   130,   131,   132,   133,   134,   135,
-     136,   137,   138,     0,     0,     0,   139,   140,     0,   141,
-     142,   143,     0,  1140,     0,     0,     0,   144,   145,     0,
+       0,     0,     0,   159,   273,     0,     0,     0,   161,     0,
+       0,     0,     0,   274,     0,   103,   265,   266,   165,     0,
+    1403,   106,   107,   108,     0,     0,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   124,   125,   126,   127,   128,   129,   130,   267,     0,
+       0,     0,     0,     0,     0,     0,     0,   137,   138,   139,
+       0,   141,     0,     0,     0,     0,     0,     0,     0,     0,
+     145,   146,   147,     0,     0,     0,     0,     0,   148,     0,
+     268,     0,     0,   269,     0,     0,   270,     0,   271,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     272,     0,     0,     0,     0,     0,     0,    45,    46,    47,
+      48,    49,     0,     0,     0,    53,     0,     0,    56,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1447,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,  1486,     0,   391,     0,     0,
-       0,   146,     0,     0,     0,     0,     0,   147,   148,   149,
-       0,     0,     0,     0,   150,   151,   152,   153,   154,     0,
+       0,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,   151,     0,
+       0,     0,     0,     0,     0,   154,   155,   156,   157,   158,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   155,   156,     0,     0,     0,   157,     0,     0,
-       0,     0,   158,     0,   159,     0,   160,   161,     0,   162,
-       0,   163,     0,  1140,   102,   260,     0,     0,     0,     0,
-     105,   106,   107,     0,     0,   108,   109,   110,   111,   112,
+       0,     0,     0,   159,   273,     0,     0,     0,   161,     0,
+       0,     0,     0,   274,     0,   103,   305,   105,   165,     0,
+     275,   106,   107,   108,     0,     0,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,   262,     0,     0,
-       0,     0,     0,     0,     0,     0,   136,   137,   138,     0,
-       0,     0,     0,     7,     8,   141,   142,   143,     0,     0,
-       0,     0,     0,   144,     0,   263,     0,     0,   264,     0,
-       0,   265,     0,   266,  1140,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   267,     0,     0,     0,     0,
-       0,     0,    44,    45,    46,    47,    48,     0,     0,     0,
-      52,     0,     0,    55,     0,   593,    20,    21,   594,    23,
-      24,   595,    26,   596,    28,     0,    29,     0,     0,     0,
-       0,    34,    35,     0,    37,    38,    39,     0,     0,     0,
-      42,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   147,     0,     0,     0,     0,     0,     0,
-     150,   151,   152,   153,   154,     0,     0,     0,     0,     0,
-       0,     0,     0,    63,    64,    65,     0,     0,   462,  1314,
-       0,     0,     0,   157,     0,     0,     0,     0,   464,     0,
-       0,   102,   260,   161,     0,   229,   508,   105,   106,   107,
-       0,     0,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
-     126,   127,   128,   129,   262,     0,     0,     0,     0,     0,
-       0,     0,     0,   136,   137,   138,   937,     0,     0,     0,
-       0,     0,   141,   142,   143,     0,     0,     7,     8,     0,
-     144,     0,   263,     0,     0,   264,     0,     0,   265,     0,
-     266,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   267,     0,     0,     0,     0,     0,     0,    44,
-      45,    46,    47,    48,     0,     0,     0,    52,     0,     0,
-      55,     0,     0,     0,     0,     0,     0,     0,     0,   593,
-      20,    21,   594,    23,    24,   595,    26,   596,    28,     0,
-      29,     0,     0,     0,     0,    34,    35,     0,    37,    38,
-      39,     0,  1375,     0,    42,     0,     0,     0,     0,     0,
-     147,     0,     0,     0,     0,     0,     0,   150,   151,   152,
-     153,   154,  1403,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   155,   407,    63,    64,    65,
-     157,     0,     0,     0,     0,   269,     0,     0,     0,     0,
-     161,     0,     0,   508,   102,   260,   104,     0,     0,     0,
-     105,   106,   107,     0,     0,   108,   109,   110,   111,   112,
+     123,   124,   125,   126,   127,   128,   129,   130,     7,     8,
+       0,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+     140,   141,     0,     0,     0,   142,   143,     0,   144,     0,
+     145,   146,   147,     0,     0,     0,     0,     0,   148,   149,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+     742,     0,   743,     0,   613,    21,    22,   614,    24,    25,
+     615,    27,   616,    29,     0,    30,     0,     0,     0,     0,
+      35,    36,     0,    38,    39,    40,     0,     0,     0,    43,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,     0,     0,     0,  1391,     0,  1392,   151,   152,
+     153,     0,    64,    65,    66,   154,   155,   156,   157,   158,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   159,   160,     0,     0,     0,   161,     0,
+       0,     0,     0,   274,     0,   103,   265,  1263,   165,     0,
+    1204,   106,   107,   108,     0,     0,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,   262,     0,     0,
-     130,   131,   132,   133,   134,   135,   136,   137,   138,     0,
-    1036,     0,   139,   140,     0,   141,   142,   143,     0,     0,
-       0,     0,     0,   144,   145,   263,     0,     0,   264,     0,
-       0,   265,     0,   266,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   267,     0,     0,     0,     0,
-       0,     0,    44,    45,    46,    47,    48,     0,     0,     0,
-      52,     0,     0,    55,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,   147,   148,   149,     0,     0,     0,     0,
-     150,   151,   152,   153,   154,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   155,   268,
-       0,     0,     0,   157,     0,     0,     0,     0,   269,     0,
-     102,   260,   261,   161,     0,  1336,   105,   106,   107,     0,
-       0,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
-     127,   128,   129,   262,     0,     0,     0,     0,     0,     0,
-       0,     0,   136,   137,   138,     0,     0,     0,     7,     8,
-       0,   141,   142,   143,     0,     0,     0,     0,     0,   144,
-       0,   263,     0,     0,   264,     0,     0,   265,     0,   266,
+     123,   124,   125,   126,   127,   128,   129,   130,   267,     0,
+       0,     0,     0,     0,     0,     0,     0,   137,   138,   139,
+       0,   141,     0,     0,     0,     0,     0,     0,     0,     0,
+     145,   146,   147,     0,     0,     0,     0,     0,   148,     0,
+     268,     0,     0,   269,     0,     0,   270,     0,   271,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   267,     0,     0,     0,     0,     0,     0,    44,    45,
-      46,    47,    48,     0,     0,     0,    52,     0,     0,    55,
-     593,    20,    21,   594,    23,    24,   595,    26,   596,    28,
-       0,    29,     0,     0,     0,     0,    34,    35,     0,    37,
-      38,    39,     0,     0,     0,    42,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   147,
-       0,     0,     0,     0,     0,     0,   150,   151,   152,   153,
-     154,     0,     0,     0,     0,     0,     0,     0,    63,    64,
-      65,     0,     0,     0,   155,   268,     0,     0,     0,   157,
-       0,     0,     0,     0,   269,     0,   102,   260,  1207,   161,
-       0,   270,   105,   106,   107,     0,     0,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   262,
-       0,     0,     0,     0,     0,     0,     0,     0,   136,   137,
-     138,  1489,     0,     0,     7,     8,     0,   141,   142,   143,
-       0,     0,     0,     0,     0,   144,     0,   263,     0,     0,
-     264,     0,     0,   265,     0,   266,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   267,     0,     0,
-       0,     0,     0,     0,    44,    45,    46,    47,    48,     0,
-       0,     0,    52,     0,     0,    55,   593,    20,    21,   594,
-      23,    24,   595,    26,   596,    28,     0,    29,     0,     0,
-       0,     0,    34,    35,     0,    37,    38,    39,     0,     0,
-    1495,    42,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   147,     0,     0,     0,  1544,
-       0,     0,   150,   151,   152,   153,   154,     0,     0,     0,
-       0,     0,     0,     0,    63,    64,    65,     0,     0,     0,
-     155,   268,     0,     0,     0,   157,     0,     0,     0,     0,
-     269,     0,   102,   260,     0,   161,     0,  1208,   105,   106,
-     107,     0,     0,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   262,     0,     0,     0,     0,
-       0,     0,     0,     0,   136,   137,   138,  1546,     0,     0,
-       0,     0,     0,   141,   142,   143,     0,     0,     0,     0,
-       0,   144,     0,   263,     0,     0,   264,     0,     0,   265,
-       0,   266,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   267,     0,     0,     0,     0,     0,     0,
-      44,    45,    46,    47,    48,     0,     0,     0,    52,     0,
-       0,    55,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,   510,     0,     0,     0,   391,
-       0,   147,     0,     0,     0,     0,     0,     0,   150,   151,
-     152,   153,   154,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   155,   268,     0,     0,
-       0,   157,     0,     0,     0,     0,   269,     0,   102,   260,
-       0,   161,     0,   270,   105,   106,   107,     0,     0,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-     129,   262,     0,     0,     0,     0,     0,     0,     0,     0,
-     136,   137,   138,     0,     0,     0,     0,     0,     0,   141,
-     142,   143,     0,     0,     0,     0,     0,   144,     0,   263,
-       0,     0,   264,     0,     0,   265,     0,   266,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   267,
-       0,     0,     0,     0,     0,     0,    44,    45,    46,    47,
-      48,     0,     0,     0,    52,     0,     0,    55,     0,     0,
-       0,     0,     0,     0,     0,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   631,   389,   390,     0,
-       0,     0,     0,   391,   736,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   147,     0,     0,
-       0,     0,     0,   812,   150,   151,   152,   153,   154,     0,
+     272,     0,     0,     0,     0,     0,     0,    45,    46,    47,
+      48,    49,     0,     0,     0,    53,     0,     0,    56,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1500,     0,  1501,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   151,     0,
+       0,     0,     0,     0,     0,   154,   155,   156,   157,   158,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   155,   407,     0,     0,     0,   157,     0,     0,
-       0,     0,   269,     0,   102,   260,     0,   161,     0,   504,
-     105,   106,   107,     0,     0,   108,   109,   110,   111,   112,
+       0,     0,     0,   159,   273,     0,     0,     0,   161,     0,
+       0,     0,     0,   274,     0,   103,   305,   105,   165,     0,
+    1264,   106,   107,   108,     0,     0,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,   262,     0,     0,
-       0,     0,     0,     0,     0,     0,   136,   137,   138,     0,
-       0,     0,     0,     0,     0,   141,   142,   143,     0,     0,
-       0,     0,     0,   144,     0,   263,     0,     0,   264,     0,
-       0,   265,     0,   266,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   267,     0,     0,     0,     0,
-       0,     0,    44,    45,    46,    47,    48,     0,     0,     0,
-      52,     0,     0,    55,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,   930,     0,     0,
-       0,   391,     0,   147,     0,     0,     0,     0,     0,     0,
-     150,   151,   152,   153,   154,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   155,   407,
-       0,     0,     0,   157,     0,     0,     0,     0,   269,     0,
-     102,   260,     0,   161,     0,   726,   105,   106,   107,     0,
-       0,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
-     127,   128,   129,   262,     0,     0,     0,     0,     0,     0,
-       0,     0,   136,   137,   138,     0,     0,     0,     0,     0,
-       0,   141,   142,   143,     0,     0,     0,     0,     0,   144,
-       0,   263,     0,     0,   264,     0,     0,   265,     0,   266,
+     123,   124,   125,   126,   127,   128,   129,   130,     0,     0,
+       0,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+     140,   141,     0,     0,     0,   142,   143,     0,   144,     0,
+     145,   146,   147,     0,   103,   305,   105,     0,   148,   149,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,     0,     0,     0,
+     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+     141,     0,     0,     0,   142,   143,     0,   144,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,   149,     0,
+       0,     0,     0,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,   151,   152,
+     153,   400,     0,     0,     0,   154,   155,   156,   157,   158,
+     853,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   159,   160,     0,     0,     0,   161,     0,
+       0,     0,     0,   274,     0,     0,     0,     0,   165,     0,
+    1396,     0,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,   151,   152,   153,
+     400,     0,     0,     0,   154,   155,   156,   157,   158,   900,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   267,     0,     0,     0,     0,     0,     0,    44,    45,
-      46,    47,    48,     0,     0,     0,    52,     0,     0,    55,
-       0,     0,     0,     0,     0,     0,     0,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,  1090,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   147,
-       0,     0,     0,     0,     0,     0,   150,   151,   152,   153,
-     154,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   155,   268,     0,     0,     0,   157,
-       0,     0,     0,     0,   269,     0,   102,   260,     0,   161,
-       0,  1212,   105,   106,   107,     0,     0,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   262,
-       0,     0,     0,     0,     0,     0,     0,     0,   136,   137,
-     138,     0,     0,     0,  1022,     0,     0,   141,   142,   143,
-       0,     0,     0,     0,     0,   144,     0,   263,     0,     0,
-     264,     0,     0,   265,     0,   266,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   267,     0,     0,
-       0,     0,     0,     0,    44,    45,    46,    47,    48,     0,
-       0,     0,    52,     0,     0,    55,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,   147,     0,     0,     0,     0,
-       0,     0,   150,   151,   152,   153,   154,     0,     0,     0,
+       0,     0,   159,   160,     0,     0,     0,   161,     0,     0,
+       0,     0,   274,     0,   103,   265,     0,   165,     0,  1406,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   267,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,     0,   268,
+       0,     0,   269,     0,     0,   270,     0,   271,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   272,
+       0,     0,     0,     0,     0,     0,    45,    46,    47,    48,
+      49,     0,     0,     0,    53,     0,     0,    56,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,   948,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,     0,
+       0,     0,     0,     0,   154,   155,   156,   157,   158,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     462,  1314,     0,     0,     0,   157,     0,     0,     0,     0,
-     464,     0,   102,   297,   104,   161,     0,   229,   105,   106,
-     107,     0,     0,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,     0,     0,     0,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,     0,     0,     0,
-     139,   140,     0,   141,   142,   143,     0,   102,   297,   104,
-       0,   144,   145,   105,   106,   107,     0,     0,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-       0,     0,     0,   130,   131,   132,   133,   134,   135,   136,
-     137,   138,     0,     0,     0,   139,   140,     0,   141,   142,
-     143,     0,     0,     0,     0,     0,   144,   145,     0,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,   147,   148,   149,  1294,     0,  1295,     0,   150,   151,
-     152,   153,   154,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   155,   156,     0,     0,
-       0,   157,     0,     0,     0,     0,   269,     0,     0,     0,
-       0,   161,     0,  1148,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   147,   148,   149,     0,
-       0,     0,     0,   150,   151,   152,   153,   154,     0,     0,
+       0,     0,   159,   273,     0,     0,     0,   161,     0,     0,
+       0,     0,   274,     0,   103,   265,     0,   165,     0,   275,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   267,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,     0,   268,
+       0,     0,   269,     0,     0,   270,     0,   271,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   272,
+       0,     0,     0,     0,     0,     0,    45,    46,    47,    48,
+      49,     0,     0,     0,    53,     0,     0,    56,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,   968,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,     0,
+       0,     0,     0,     0,   154,   155,   156,   157,   158,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   155,   156,     0,     0,     0,   157,     0,     0,     0,
-       0,   269,     0,   102,   297,   104,   161,     0,  1330,   105,
-     106,   107,     0,     0,   108,   109,   110,   111,   112,   113,
+       0,     0,   159,   418,     0,     0,     0,   161,     0,     0,
+       0,     0,   274,     0,   103,   265,     0,   165,     0,   519,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   125,   126,   127,   128,   129,     0,     0,     0,   130,
-     131,   132,   133,   134,   135,   136,   137,   138,     0,     0,
-       0,   139,   140,     0,   141,   142,   143,     0,     0,     0,
-       0,     0,   144,   145,     0,     0,   102,   260,     0,     0,
-       0,     0,   105,   106,   107,     0,     0,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   262,
-       0,     0,     0,     0,     0,     0,     0,     0,   136,   137,
-     138,     0,     0,     0,     0,     0,     0,   141,   142,   143,
-       0,     0,     0,     0,     0,   144,     0,   263,     0,     0,
-     264,     0,     0,   265,     0,   266,     0,     0,     0,     0,
-       0,     0,   147,   148,   149,     0,     0,   267,     0,   150,
-     151,   152,   153,   154,    44,    45,    46,    47,    48,     0,
-       0,     0,    52,     0,     0,    55,     0,   155,   156,     0,
-       0,     0,   157,     0,     0,     0,     0,   269,     0,     0,
-       0,     0,   161,     0,  1339,     0,     0,     0,     0,     0,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,   147,     0,     0,   391,     0,
-       0,     0,   150,   151,   152,   153,   154,   810,     0,     0,
+     124,   125,   126,   127,   128,   129,   130,   267,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,     0,   268,
+       0,     0,   269,     0,     0,   270,     0,   271,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   272,
+       0,     0,     0,     0,     0,     0,    45,    46,    47,    48,
+      49,     0,     0,     0,    53,     0,     0,    56,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,   996,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,     0,
+       0,     0,     0,     0,   154,   155,   156,   157,   158,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     155,   407,     0,     0,     0,   157,   102,   297,   104,     0,
-     269,     0,   105,   106,   107,   161,     0,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,     0,
-       0,     0,   130,   131,   132,   133,   134,   135,   136,   137,
-     138,     0,     0,     0,   139,   140,     0,   141,   142,   143,
-       0,     0,     0,     0,     0,   144,   145,   319,   320,   321,
-     322,   323,   324,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,   339,   340,   341,
-     342,   343,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   350,   351,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-    1325,     0,  1326,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   147,   148,   149,     0,     0,
-       0,     0,   150,   151,   152,   153,   154,     0,     0,     0,
-      -4,     1,     0,     0,    -4,     0,     0,     0,     0,     0,
-     155,   156,    -4,    -4,     0,   157,     0,     0,     0,     0,
-     269,     0,     0,     0,     0,   161,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    -4,    -4,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    -4,    -4,
-      -4,     0,     0,    -4,     0,     0,     0,    -4,    -4,   493,
-      -4,    -4,     0,     0,    -4,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,     0,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,    -4,    -4,     0,    -4,    -4,
+       0,     0,   159,   418,     0,     0,     0,   161,     0,     0,
+       0,     0,   274,     0,   103,   265,     0,   165,     0,   764,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   267,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,     0,   268,
+       0,     0,   269,     0,     0,   270,     0,   271,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   272,
+       0,     0,     0,     0,     0,     0,    45,    46,    47,    48,
+      49,     0,     0,     0,    53,     0,     0,    56,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,  1089,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,     0,
+       0,     0,     0,     0,   154,   155,   156,   157,   158,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   159,   273,     0,     0,     0,   161,     0,     0,
+       0,     0,   274,     0,   103,   265,     0,   165,     0,  1268,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   267,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,     0,     0,     0,     0,     0,   148,     0,   268,
+       0,     0,   269,     0,     0,   270,     0,   271,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   272,
+       0,     0,     0,     0,     0,     0,    45,    46,    47,    48,
+      49,     0,     0,     0,    53,     0,     0,    56,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+       0,     0,     0,     0,     0,  1354,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,     0,
+       0,     0,     0,     0,   154,   155,   156,   157,   158,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   473,  1376,     0,     0,     0,   161,     0,     0,
+       0,     0,   475,     0,   103,   305,     0,   165,     0,   234,
+     106,   107,   108,     0,     0,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   137,   138,   139,     0,
+     141,     0,     0,     0,     0,     0,     0,     0,     0,   145,
+     146,   147,   103,   305,   105,     0,     0,   148,   106,   107,
+     108,     0,     0,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
+     126,   127,   128,   129,   130,     0,     0,     0,   131,   132,
+     133,   134,   135,   136,   137,   138,   139,   140,   141,     0,
+       0,     0,   142,   143,     0,   144,     0,   145,   146,   147,
+       0,     0,     0,     0,     0,   148,   149,     0,     0,     0,
+       0,     0,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,   151,     0,     0,
+     400,     0,     0,     0,   154,   155,   156,   157,   158,  1373,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   473,   474,     0,     0,     0,   161,     0,     0,
+       0,     0,   475,     0,     0,     0,     0,   165,     0,   234,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,   151,   152,   153,   400,     0,
+       0,     0,   154,   155,   156,   157,   158,  1427,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     159,   160,     0,     0,     0,   161,   103,   265,     0,     0,
+     274,     0,   106,   107,   108,   165,     0,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,   125,   126,   127,   128,   129,   130,   267,
+       0,     0,     0,     0,     0,     0,     0,     0,   137,   138,
+     139,     0,   141,     0,     0,     0,     0,     0,     0,     0,
+       0,   145,   146,   147,     0,     0,     0,     0,     0,   148,
+       0,   268,     0,     0,   269,     0,     0,   270,     0,   271,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   272,     0,     0,     0,     0,     0,     0,    45,    46,
+      47,    48,    49,     0,     0,     0,    53,     0,     0,    56,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,     0,     0,     0,     0,     0,  1428,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,     0,     0,     0,     0,     0,   154,   155,   156,   157,
+     158,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   159,   418,     0,     0,     0,   161,
+     103,   305,     0,     0,   274,     0,   106,   107,   108,   165,
+       0,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   130,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   137,   138,   139,     0,   141,     0,     0,     0,
+       0,     0,     0,   103,   305,   145,   146,   147,     0,   106,
+     107,   108,     0,   148,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   137,   138,   139,     0,   141,
+       0,     0,     0,     0,     0,     0,     0,     0,   145,   146,
+     147,     0,     0,     0,     0,     0,   148,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,   151,  1429,     0,     0,     0,     0,     0,
+     154,   155,   156,   157,   158,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   159,   160,
+       0,     0,     0,   161,     0,     0,     0,     0,   274,     0,
+       0,   550,     0,   165,     0,     0,     0,    -4,     1,     0,
+       0,    -4,     0,     0,     0,     0,   151,     0,     0,    -4,
+      -4,     0,     0,   154,   155,   156,   157,   158,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   159,   160,     0,    -4,    -4,   161,     0,     0,     0,
+       0,   274,     0,     0,     0,     0,   165,    -4,    -4,    -4,
+       0,     0,    -4,     0,    -4,     0,     0,     0,    -4,    -4,
+       0,    -4,    -4,     0,     0,    -4,    -4,    -4,    -4,    -4,
+      -4,    -4,    -4,    -4,    -4,     0,    -4,    -4,    -4,    -4,
+      -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,     0,    -4,
       -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,    -4,    -4,    -4,     0,     0,     0,    -4,    -4,
-      -4,     0,     0,     0,     0,     0,    -4,     6,     0,     0,
-       0,    -4,    -4,    -4,    -4,     7,     8,    -4,     0,    -4,
-       0,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
-      -4,    -4,     0,     0,     0,    -4,    -4,    -4,    -4,     0,
-       9,    10,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    11,    12,    13,     0,     0,    14,     0,     0,     0,
-      15,    16,     0,    17,    18,     0,     0,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,     0,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-       0,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,     7,     8,
-       0,    58,    59,    60,     0,     0,     0,     0,     0,    61,
-       0,     0,     0,     0,    62,    63,    64,    65,     0,     0,
-      66,     0,    67,     0,    68,    69,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,     0,     0,     0,    79,    80,
-      81,    82,     0,     0,     0,     0,     0,     0,     0,     0,
-     593,    20,    21,   594,    23,    24,   595,    26,   596,    28,
-       0,    29,     0,     0,     0,     0,    34,    35,     0,    37,
-      38,    39,     0,     0,     0,    42,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,     0,     0,     0,     0,
-       0,  1433,     0,  1434,     0,     0,     0,     0,    63,    64,
-      65,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,   855,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,     0,   905,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,     0,     0,   924,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-       0,     0,   948,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,     0,     0,
-    1040,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,  1292,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,     0,  1311,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,     0,     0,  1360,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-       0,     0,  1361,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,     0,     0,
-    1362,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,  1363,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,     0,  1364,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,     0,     0,  1398,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-       0,     0,  1449,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,     0,     0,
-    1455,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,  1456,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,     0,  1477,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,     0,     0,  1480,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-       0,     0,  1483,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,     0,     0,
-    1506,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,  1509,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,     0,  1538,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,     0,     0,  1540,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-       0,     0,  1542,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,     0,     0,
-    1556,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,     0,     0,  1576,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,     0,   667,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,     0,     0,     0,     0,
-       0,     0,  1374,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,   723,     0,     0,     0,     0,   674,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,   624,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-     674,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,   675,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,   733,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,   763,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,   771,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-     772,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,   773,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,   887,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,   888,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,   889,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-     920,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,   999,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,  1038,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,  1039,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,  1089,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-    1252,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,  1253,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,  1260,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,  1414,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,     0,     0,     0,  1415,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
-    1419,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,     0,     0,     0,  1501,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,     0,
-       0,     0,  1504,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,     0,     0,     0,  1536,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,   712,
-       0,   713,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,     0,     0,     0,   585,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,   738,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,     0,     0,
-     745,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,   750,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,     0,     0,   824,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,     0,     0,   913,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,     0,
-       0,     0,   914,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,     0,     0,   918,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,     0,     0,   919,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,     0,
-       0,   921,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,     0,     0,     0,   949,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,     0,     0,   994,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,     0,     0,
-    1217,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,     0,     0,  1243,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,     0,     0,  1387,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,   582,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,   630,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,   634,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,     0,
-     635,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,   637,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,     0,   639,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,   640,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,   643,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,   644,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,   723,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,   729,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,   730,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,   731,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,     0,
-     737,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,   844,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,     0,   849,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,   854,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,   857,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,   858,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,   864,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,   871,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,   872,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,   873,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,     0,
-     904,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391,
-       0,   906,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,     0,     0,     0,     0,
-     391,     0,   907,   377,   378,   379,   380,   381,   382,   383,
-     384,   385,   386,   387,   388,   389,   390,     0,     0,     0,
-       0,   391,     0,   908,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,     0,     0,
-       0,     0,   391,     0,   912,   377,   378,   379,   380,   381,
-     382,   383,   384,   385,   386,   387,   388,   389,   390,     0,
-       0,     0,     0,   391,     0,  1118,   377,   378,   379,   380,
-     381,   382,   383,   384,   385,   386,   387,   388,   389,   390,
-       0,     0,     0,     0,   391,     0,  1293,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,     0,     0,     0,     0,   391,     0,  1310,   377,   378,
-     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
-     389,   390,     0,     0,     0,     0,   391,     0,  1329,   377,
-     378,   379,   380,   381,   382,   383,   384,   385,   386,   387,
-     388,   389,   390,     0,     0,     0,     0,   391,     0,  1500,
-     377,   378,   379,   380,   381,   382,   383,   384,   385,   386,
-     387,   388,   389,   390,     0,     0,     0,     0,   391,     0,
-    1554,   377,   378,   379,   380,   381,   382,   383,   384,   385,
-     386,   387,   388,   389,   390,     0,     0,     0,     0,   391
+      -4,    -4,    -4,    -4,    -4,    -4,     0,     0,     0,    -4,
+      -4,    -4,     0,     0,     0,     0,     0,    -4,     6,     0,
+       0,     0,    -4,    -4,    -4,    -4,     7,     8,    -4,     0,
+      -4,     0,    -4,    -4,    -4,    -4,    -4,    -4,    -4,    -4,
+      -4,    -4,    -4,     0,     0,     0,    -4,    -4,    -4,    -4,
+       0,     9,    10,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    11,    12,    13,     0,     0,    14,
+       0,    15,     0,     0,     0,    16,    17,     0,    18,    19,
+       0,     0,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,     0,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,     0,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,     0,     0,     0,    59,    60,    61,     0,
+       0,     0,     0,     0,    62,     0,     0,     0,     0,    63,
+      64,    65,    66,     0,     0,    67,     0,    68,     0,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+       0,     0,     0,    80,    81,    82,    83,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,     0,  1430,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+       0,     0,  1431,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,     0,     0,
+    1461,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,  1516,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,  1526,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,     0,  1527,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+       0,     0,  1548,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,     0,     0,
+    1551,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,  1554,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,  1581,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,     0,  1585,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+       0,     0,  1620,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,     0,     0,
+    1622,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,  1624,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,  1642,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,     0,  1666,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+       0,     0,  1703,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,     0,     0,
+    1704,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,     0,     0,  1705,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,     0,     0,  1706,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,     0,   697,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,     0,     0,     0,     0,     0,     0,
+    1437,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,   761,     0,     0,     0,     0,   704,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,   704,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,   705,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,   773,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+     804,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,   812,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,   813,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,   814,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,   825,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+     930,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,   931,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,   932,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,   963,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1048,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1087,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1088,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1143,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1276,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1277,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1278,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1279,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1314,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1315,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1322,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1462,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1463,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1464,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1465,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1481,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1482,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1486,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1566,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1567,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1568,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1569,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1576,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1579,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1616,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1633,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1634,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1635,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,     0,
+       0,     0,  1636,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,     0,     0,     0,  1675,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,     0,     0,     0,  1676,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,     0,     0,     0,
+    1677,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,     0,     0,     0,  1678,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,   605,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,   778,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,   785,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,     0,     0,   791,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,   867,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,     0,     0,   956,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,     0,     0,   957,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,     0,     0,
+     961,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,     0,     0,   962,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,     0,     0,   964,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,     0,     0,   998,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+       0,     0,  1043,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,     0,     0,  1273,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,     0,     0,  1305,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,     0,
+       0,  1450,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,   602,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,   652,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,   656,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,   657,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,   659,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,   661,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,   662,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,   665,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+     666,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,   761,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,   769,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,   770,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,   771,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,   777,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,   889,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,   894,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,   899,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,   902,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+     903,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,   909,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,   914,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,   915,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,   916,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,   947,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400,     0,   949,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,     0,     0,     0,     0,   400,     0,   950,   386,   387,
+     388,   389,   390,   391,   392,   393,   394,   395,   396,   397,
+     398,   399,     0,     0,     0,     0,   400,     0,   951,   386,
+     387,   388,   389,   390,   391,   392,   393,   394,   395,   396,
+     397,   398,   399,     0,     0,     0,     0,   400,     0,   955,
+     386,   387,   388,   389,   390,   391,   392,   393,   394,   395,
+     396,   397,   398,   399,     0,     0,     0,     0,   400,     0,
+    1174,   386,   387,   388,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,     0,     0,     0,     0,   400,
+       0,  1355,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   398,   399,     0,     0,     0,     0,
+     400,     0,  1372,   386,   387,   388,   389,   390,   391,   392,
+     393,   394,   395,   396,   397,   398,   399,     0,     0,     0,
+       0,   400,     0,  1395,   386,   387,   388,   389,   390,   391,
+     392,   393,   394,   395,   396,   397,   398,   399,     0,     0,
+       0,     0,   400,     0,  1575,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,     0,
+       0,     0,     0,   400,     0,  1640,   386,   387,   388,   389,
+     390,   391,   392,   393,   394,   395,   396,   397,   398,   399,
+       0,     0,     0,     0,   400
 };
 
+#define yypact_value_is_default(Yystate) \
+  (!!((Yystate) == (-1266)))
+
+#define yytable_value_is_error(Yytable_value) \
+  YYID (0)
+
 static const yytype_int16 yycheck[] =
 {
-       3,   349,   237,     6,     4,     4,     3,   456,   457,     4,
-     362,   903,   364,     4,   249,   899,     4,     3,   222,     4,
-    1210,     4,     4,     4,    13,     5,     5,     5,   177,   101,
-       6,     6,     6,     6,     6,   184,     6,     6,     4,     6,
-       4,     6,     6,     4,     7,     4,    64,     0,     6,    67,
-       4,     6,    70,   174,   175,     6,     4,   179,     6,   294,
-      70,   296,    72,   184,   186,   542,   543,   544,   545,   546,
-     547,   548,   549,   550,   551,   552,    70,   554,   555,   556,
-     557,   558,   559,   560,   177,  1275,   179,     7,   565,   566,
-     167,   168,   178,   202,   203,   204,   177,   183,   207,   208,
-     209,   167,   168,     8,   167,   168,   183,   183,   185,   185,
-      64,   167,   168,     6,    68,    67,    64,   183,    70,   185,
-      72,   184,   117,   118,   119,   120,    80,   185,    67,   185,
-     177,    70,   190,     4,   243,   244,   194,   167,   168,    67,
-     115,     7,    70,   201,     8,   136,   255,   256,     6,   167,
-     168,   167,   168,   183,   183,   185,   185,   115,   161,   177,
-     115,   127,   128,  1353,   115,   162,   184,   183,   127,   128,
-     173,   174,   174,   175,   178,   161,   180,  1061,   177,   179,
-     184,   181,   184,  1373,     6,   184,   186,   173,   174,   177,
-     185,   167,   168,   184,     6,   164,   184,   164,    70,   184,
-      72,   184,   184,   184,   184,   184,   184,   177,   173,   174,
-     184,   184,   447,   448,   184,   179,   177,    70,   181,    72,
-      91,    92,    93,    94,     7,   167,   168,   127,    99,     6,
-     582,   102,   467,   585,   154,   155,   156,   157,   174,   175,
-     140,   141,   184,     6,   169,   170,   171,     6,   184,    45,
-      46,   176,    48,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   177,   167,   168,
-     179,   176,     7,   177,   184,   179,   167,   168,   177,   177,
-     185,   183,   186,   185,   519,   184,   184,   179,   154,   155,
-     156,   157,   364,   184,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   174,   175,
-     167,   168,   176,  1503,    74,   181,   179,   375,   181,   167,
-     168,   185,   183,   186,   185,   177,   183,   167,   168,   169,
-     170,   171,   184,   177,   811,   183,   176,    70,   341,   342,
-     343,   344,   345,   346,   347,   348,   349,     7,     8,   178,
-     353,   354,   355,   356,   183,   341,   342,   343,   344,   345,
-     346,   347,   348,   349,   660,   661,   662,   353,   354,   355,
-     356,   154,   155,   156,   157,   174,   175,   342,   343,   344,
-     345,   346,   347,   348,  1574,   183,   177,   185,   353,   354,
-     355,   174,   175,   745,    70,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   178,
-     177,   180,   305,   176,   183,     4,     5,   167,   168,   154,
-     155,   156,   157,     6,     7,   483,   484,   485,    64,   225,
-     226,    67,   177,   183,    70,   670,    72,   233,   178,   174,
-     175,   237,   179,   183,   181,   177,   504,     7,   177,   186,
-      39,    40,    41,    42,    43,    44,   167,   168,   351,   456,
-     457,     6,    51,    52,   357,    12,    13,   167,   168,   541,
-     180,   184,   183,   183,    63,   533,   953,   954,   955,   956,
-      70,   958,   959,   183,   174,   175,   963,   964,   167,   168,
-    1382,   181,  1384,   178,  1386,   180,   167,   168,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   183,   585,   167,   168,   176,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,   183,    75,   185,
-     183,     4,     5,    80,    81,    70,    83,    84,    85,   183,
-      64,   185,    89,    67,   167,   168,    70,     7,   167,   168,
-       6,     7,   178,  1437,   143,   144,  1440,   183,   180,  1443,
-     183,   183,    72,   621,   183,   623,    39,    40,    41,    42,
-      43,    44,   183,     8,   185,   122,   123,   124,    51,    52,
-     177,   183,   178,   185,   180,   174,   175,   183,   167,   168,
-      63,   183,   181,   185,   154,   155,   156,   157,  1490,   803,
-      67,  1078,    67,    87,   183,    70,   178,    72,   180,   667,
-     183,   183,   185,    97,   174,   175,   184,   969,   167,   168,
-     178,   105,   106,   107,   627,   183,   629,   111,   112,   113,
-     114,   184,   178,   985,   183,   167,   168,   183,   185,   711,
-    1524,   627,   183,   629,   185,  1537,   183,  1539,   185,  1541,
-     183,   183,   185,   167,   168,  1547,   714,    70,   454,   455,
-     718,   719,   720,   721,   629,   183,   462,   185,   726,   183,
-     143,   144,    67,   745,  1558,   167,   168,  1561,   750,   183,
-    1564,   185,    67,  1567,   167,   168,  1578,   178,  1580,   180,
-    1582,   183,   183,   586,   154,   155,   156,   157,    70,   177,
-     183,   185,   177,   167,   168,   167,   168,  1591,   178,  1593,
-     180,  1595,     4,   183,   174,   175,     4,     4,   776,   183,
-     183,   183,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   177,     4,  1188,
-    1189,   176,   183,   178,   185,  1097,   177,   750,   806,   807,
-     808,   809,   824,     6,   177,   183,   179,   185,   181,     6,
-       4,   184,     6,   186,   750,     6,   659,   660,   661,   662,
-     177,   774,   976,   179,   183,   778,   185,     4,   781,   782,
-     783,     4,   183,    64,   185,   750,    67,   790,   774,    70,
-     177,    72,   778,   177,   177,   781,   782,   783,   856,    12,
-      13,     7,   177,   183,   790,   185,   183,   177,   185,   774,
-     183,     7,   185,   778,   177,   177,   781,   782,   783,   183,
-      87,   185,   183,   177,   185,   790,   829,   177,   177,    82,
-      97,   183,   183,   185,   185,   183,     4,   185,   105,   106,
-     107,     6,   184,   829,   111,   112,   113,   114,   183,   921,
-     185,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,   183,    75,   185,   829,   184,   184,    80,    81,    87,
-      83,    84,    85,   183,     6,   185,    89,   673,   183,    97,
-     185,   183,     6,   185,   680,   184,   177,   105,   106,   107,
-     686,   177,     6,   111,   112,   113,   114,   969,   183,   183,
-     185,   185,   155,   156,   157,   158,   159,     4,   177,   122,
-     123,   124,   183,   183,   185,   185,   177,   177,   185,   172,
-     183,   179,   185,   176,   183,  1129,   185,   183,  1377,   185,
-     184,   184,   185,   186,   187,   177,   189,   190,   191,   192,
-     177,   194,   195,   196,   183,   183,   185,   185,   201,   183,
-     179,   185,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,   219,   185,   177,   183,
-     176,   185,   185,   184,   177,   228,   229,   184,   183,   183,
-     185,   185,   184,   183,   237,   185,   184,   177,   177,   177,
-     177,  1339,   184,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   184,   184,   179,
-    1068,   176,   179,   179,     5,   268,   269,   270,     5,     5,
-     181,    87,     6,     6,   184,   130,   279,   280,   281,  1101,
-     283,    97,     6,   286,   287,     6,     6,   290,   184,   105,
-     106,   107,   838,   184,     6,   111,   112,   113,   114,   179,
-     303,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-       4,   176,   315,   181,   176,     7,   319,   320,   321,   322,
-     323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
-     333,   334,   335,   336,   337,   338,   339,   340,   186,   179,
-      87,   887,   888,   889,   186,   184,     7,   350,   185,   352,
-      97,     6,     6,     6,   177,     7,  1109,  1000,   105,   106,
-     107,     7,   177,   177,   111,   112,   113,   114,   177,   185,
-       7,   374,   375,  1109,   377,   378,   379,   380,   381,   382,
-     383,   384,   385,   386,   387,   388,   389,   390,   391,   178,
-    1344,   394,  1145,     6,  1109,     7,  1218,   184,     6,   184,
-       7,     6,     6,     6,   407,     4,  1391,     4,   184,  1145,
-     413,   184,   184,   127,   184,   418,   178,     6,     6,     6,
-     423,   424,   183,   178,   178,   183,   429,   430,     6,     4,
-    1145,   434,   183,   183,   183,   178,   439,   440,   441,   183,
-     178,  1188,  1189,   178,     4,     6,   185,     6,   180,     6,
-     130,   190,     7,     7,     7,   194,   459,   460,   461,   462,
-     463,   464,   201,     7,   130,   468,   469,   470,   471,   472,
-       7,     7,   130,   476,     7,     7,   479,   480,  1121,   184,
-     483,   484,   485,     4,   181,   488,   489,   490,   491,     6,
-      12,    13,    87,   496,   185,   185,     6,   180,     7,     7,
-       7,   504,    97,   181,     6,  1148,  1491,   510,   511,   184,
-     105,   106,   107,     6,  1060,     6,   111,   112,   113,   114,
-       6,     6,  1330,     7,   184,     6,   529,   177,   179,   268,
-     533,   270,   535,   177,   164,     7,   539,     7,     7,     7,
-       7,  1184,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    72,    75,     7,     7,     6,   178,    80,    81,
-       7,    83,    84,    85,   178,     7,  1374,    89,   178,   178,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,   587,  1228,  1339,  1395,   176,     7,
-     185,     7,  1235,  1236,     6,     4,     4,   177,   184,     6,
-     122,   123,   124,  1339,     6,   184,     7,    87,  1154,     6,
-      70,     7,     7,     7,     6,   618,     6,    97,   621,     6,
-     623,   624,     6,     6,     4,   105,   106,   107,   631,   632,
-    1377,   111,   112,   113,   114,     4,   375,     4,   185,   178,
-       6,     6,   645,     4,  1190,   183,  1192,     6,  1194,   178,
-     178,   654,   178,     7,   181,     6,   659,   660,   661,   662,
-     184,   177,  1208,   185,   667,  1211,  1212,   181,   407,     6,
-      80,   674,   675,   184,     6,     4,     6,   680,   184,   184,
-     184,     6,     6,   184,  1492,     6,  1494,     5,     7,     6,
-     693,     7,     7,   696,     7,     7,   184,   184,     6,     6,
-     179,     6,     6,     6,     4,   185,   184,   197,   184,   184,
-       6,   714,     6,   126,     6,   718,   719,   720,   721,   183,
-       6,     4,     4,   726,     4,     6,     4,     6,   218,     6,
-     733,   221,   735,   736,     6,     6,     6,     6,     6,     6,
-       6,  1549,     6,     5,   483,   484,   485,     6,   184,     6,
-       6,   130,     6,     6,     6,   245,    87,     6,     6,   183,
-     763,     6,     6,     6,     6,   504,    97,   178,   771,   772,
-     773,     6,   511,   776,   105,   106,   107,     7,     6,     6,
-     111,   112,   113,   114,   184,   788,     6,     5,   181,     6,
-     793,     6,    68,   796,   533,     6,     6,     6,   184,     6,
-    1553,     6,   184,   806,   807,   808,   809,     6,   185,   812,
-     300,   301,   185,   184,   184,     7,   184,  1553,  1461,     6,
-     184,     6,   312,   125,     6,   185,     6,   128,     6,     6,
-       6,     6,  1585,     6,  1587,  1381,     6,  1383,  1553,  1385,
-     184,     6,     6,     6,     6,   184,   184,  1393,     6,  1585,
-    1396,  1587,  1605,   856,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,  1605,
-    1585,   185,  1587,   176,    87,   184,     6,     6,    12,    13,
-       6,     6,   621,     6,   623,     6,     6,  1530,     6,     6,
-    1605,     6,   631,   632,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,     6,     6,
-     185,   184,   176,     6,   917,     6,     6,   920,     6,     6,
-       6,   184,     6,   184,   184,     6,   184,   930,   667,   184,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-       6,    75,     6,   946,     6,   184,    80,    81,  1494,    83,
-      84,    85,    12,    13,     6,    89,     6,     6,   184,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,     6,   977,   714,   184,   176,     6,   718,
-     719,   720,   721,     6,     6,   988,   989,   726,   122,   123,
-     124,     6,   997,  1464,  1358,     3,   999,  1000,  1005,   405,
-    1359,     3,   433,    -1,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    -1,    75,  1125,    -1,    -1,    -1,
-      80,    81,    -1,    83,    84,    85,    -1,    -1,    -1,    89,
-      -1,    -1,    -1,    -1,  1037,  1038,  1039,   776,    -1,    -1,
-      -1,    -1,    -1,    -1,  1047,    -1,  1049,    -1,    -1,    -1,
-      -1,   185,    -1,    -1,    -1,    -1,    -1,  1060,    -1,    -1,
-      -1,    -1,   122,   123,   124,  1068,    -1,   806,   807,   808,
-     809,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,  1089,  1090,  1091,   176,
-      -1,    -1,    -1,    -1,   584,    -1,   158,   159,   160,   161,
+       3,  1266,   227,     4,   946,   349,     4,   351,   467,   468,
+       4,     6,     4,     6,     3,   359,   242,     4,     4,    74,
+       5,     5,     5,     4,     6,     4,     6,     6,   254,   102,
+       4,     4,     4,   181,     5,   373,     5,   375,     5,     5,
+     188,     5,     5,     5,     0,     6,    46,    47,     6,    49,
+       7,     6,     6,     6,     6,   181,     4,   183,     6,    62,
+       4,   942,   171,   172,   190,     6,     4,     4,   183,   529,
+     171,   172,  1337,    76,     6,   190,   302,   131,   304,     3,
+     189,     6,     6,   171,   172,   183,   187,   185,   189,    68,
+     144,   145,   190,    71,   171,   172,    74,     7,    76,   187,
+     560,   561,   562,   563,   564,   565,   566,   567,   568,   569,
+     570,   188,   572,   573,   574,   575,   576,   577,   578,   181,
+       8,   183,   582,   583,   584,   171,   172,   121,   122,   123,
+     124,    68,    13,   593,     4,    72,   187,   119,   189,   131,
+     132,   187,   181,   189,   178,   179,    74,    84,    76,   134,
+     134,   134,    76,   140,   188,  1420,   181,    95,    96,    97,
+      98,   119,   165,   134,     6,   103,   119,   119,   106,     6,
+     181,  1436,   183,    71,   177,   178,    74,   166,   183,   190,
+     185,   184,   183,   181,   185,   190,   181,   190,     7,   190,
+     188,    71,   195,   188,    74,   189,   199,   177,   178,   202,
+     181,   188,   188,   206,   207,   208,   209,   188,     6,   212,
+     213,   214,   550,   168,   188,   188,   188,   188,     6,   188,
+     223,   188,   188,   226,   188,   188,   188,   188,   185,  1110,
+     230,   231,   458,   459,   188,   183,     7,   181,   238,   171,
+     172,   165,   242,   168,     7,   248,   249,   250,   158,   159,
+     160,   161,   478,   177,   178,   171,   172,   260,   261,   181,
+     184,   131,   132,   182,   602,   184,     7,   605,   178,   179,
+     273,   187,   275,   189,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,   182,     6,
+     184,   190,   180,   187,   171,   172,   195,     7,   171,   172,
+     199,   189,   375,     6,   181,   308,   309,   206,   171,   172,
+     536,   188,   181,  1578,    68,   188,   181,    71,   321,   188,
+      74,   314,    76,   188,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   158,
+     159,   160,   161,   180,   178,   179,   349,   350,   351,   352,
+     353,   354,   355,   356,   357,   183,   359,   360,   181,   178,
+     179,   364,   365,   366,   367,   188,   185,   171,   172,   362,
+     350,   183,   352,   353,   354,   368,   356,   357,   181,   184,
+     360,   384,   187,   187,   364,   365,   366,   158,   159,   160,
+     161,   178,   179,    78,   854,   158,   159,   160,   161,  1664,
+      71,   188,   181,    74,     8,    76,    68,   178,   179,    71,
+      68,   184,    74,    71,   187,   418,    74,   158,   159,   160,
+     161,   181,   171,   172,   181,   349,   350,   351,   352,   353,
+     354,   181,   356,   357,   181,   359,   360,   178,   179,   188,
+     364,   365,   366,   367,   171,   172,    74,   785,   158,   159,
+     160,   161,    74,   446,   447,   448,   449,    91,   188,   187,
+     187,   189,     6,   178,   179,   465,   466,   101,   178,   179,
+     185,   171,   172,   473,   700,   109,   110,   111,   467,   468,
+      74,   115,   116,   117,   118,   384,   559,   187,   171,   172,
+      74,   494,   495,   496,   207,   208,   209,   171,   172,   212,
+     213,   214,   505,  1445,   187,  1447,   187,  1449,   189,   171,
+     172,   171,   172,   187,   171,   172,   519,   171,   172,   181,
+     187,    76,   189,   526,   171,   172,   188,   187,   178,   179,
+     187,    71,   605,   187,   182,   248,   249,   997,   188,   187,
+     187,   181,  1002,  1003,  1004,  1005,  1006,   260,   261,   188,
+     553,   182,  1012,  1013,     4,     5,   187,    74,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,   910,   911,   912,   913,   180,   182,   187,   184,
+     189,   505,   187,   171,   172,   189,   171,   172,   188,    39,
+      40,    41,    42,    43,    44,   494,   495,   496,    48,   187,
+      71,   604,   187,    53,    54,   182,    56,   184,   171,   172,
+     187,   171,   172,   606,   171,   172,   182,    67,   184,  1561,
+     519,   846,   188,  1504,   187,    71,  1507,   187,     4,  1510,
+     187,   182,    74,   171,   172,     4,   187,    91,   641,   187,
+     643,   189,     4,   646,   171,   172,   649,   101,   651,   187,
+     653,   654,     6,   182,   553,   109,   110,   111,   187,     4,
+     187,   115,   116,   117,   118,   181,   646,  1127,   741,     4,
+     182,   651,   184,   187,   677,   189,   188,  1619,  1138,  1621,
+    1018,  1623,    91,    68,     6,   182,    71,  1629,   181,    74,
+     187,    76,   101,   696,   697,   181,  1034,   147,   148,   182,
+     109,   110,   111,   703,   187,   181,   115,   116,   117,   118,
+     710,   183,   785,   173,   174,   175,   716,     4,   791,  1600,
+     180,   187,   646,   189,   181,   649,  1668,   651,  1670,   182,
+    1672,   184,     6,     7,   187,   189,   171,   172,   173,   174,
+     175,   744,   641,   182,   643,   180,     7,   187,   187,   189,
+     753,   181,   755,   183,   757,   185,   759,   182,   188,   184,
+     190,   764,   187,  1644,   767,   187,  1647,   189,   187,  1650,
+     189,   187,  1653,   189,    74,    74,    76,    76,   181,   782,
+     189,   784,   187,   181,   189,  1244,  1245,   187,   791,   189,
+     187,   187,   189,   189,   867,   187,     6,   189,   697,   187,
+    1025,   189,   181,   187,  1685,   189,  1687,     7,  1689,     4,
+     187,   791,   189,   816,   181,   187,  1154,   189,   821,   822,
+     823,   824,   187,   187,   189,   189,   187,   187,   189,   189,
+     833,   187,   825,   189,   181,   187,  1296,   189,     4,   181,
+       6,   821,   181,   823,   824,   744,   849,   850,   851,   852,
+     187,   181,   189,   833,   753,   187,   755,   189,   757,   187,
+     759,   189,   187,   181,   189,   764,   181,   791,   767,   872,
+     187,   187,   189,   189,   187,   187,   189,   189,   187,   187,
+     189,   189,   188,   883,   887,   888,    91,   890,   181,   892,
+     893,   964,   872,   896,   897,     6,   101,   821,   901,   823,
+     824,   187,   181,   189,   109,   110,   111,     6,     7,   833,
+     115,   116,   117,   118,   187,   181,   189,   816,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     930,   931,   932,   187,   180,   189,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,  1018,   171,   172,   872,   180,
+     849,   850,   851,   852,   187,   187,   189,   189,   188,   188,
+    1185,     8,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,   188,   980,   981,   982,
+     180,  1440,   181,   187,   189,   189,   187,   990,   189,   187,
+     187,   189,   189,   187,   187,   189,   189,   181,     3,     4,
+     181,   187,   901,   189,     9,    10,    11,   181,   181,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,   181,   181,   181,   181,   181,  1039,   181,     6,     6,
+      45,    46,    47,   188,    49,   188,   188,   188,   188,   181,
+       4,     5,  1055,    58,    59,    60,  1049,   181,  1061,   181,
+     181,    66,  1406,   183,  1067,   188,  1069,  1070,   183,   188,
+     188,  1074,  1075,  1076,  1077,  1078,  1079,  1080,  1081,   183,
+     183,   183,     6,  1156,   185,    39,    40,    41,    42,    43,
+      44,   188,   134,  1096,    48,   190,   190,     6,     6,    53,
+      54,     6,    56,   188,   188,     6,   183,     4,  1111,  1109,
+     180,   185,  1115,    67,  1117,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,     7,
+     183,   188,     7,   180,   189,   182,     6,     6,     6,   182,
+       7,   146,     7,     7,     6,     4,     7,   188,   153,   154,
+     155,   156,   157,     6,    50,     7,     6,     6,     6,     6,
+    1163,    50,    50,    50,   188,   131,   171,   172,   182,     6,
+       6,   176,   182,   182,  1167,   187,   181,     6,   182,   184,
+     187,   186,   182,  1163,  1177,   187,  1411,   190,  1191,   187,
+     187,   187,   195,   147,   148,   182,   199,     4,  1201,   184,
+       4,  1274,     7,   206,     6,     6,     6,     6,   134,     7,
+    1210,  1204,     7,     7,   134,     7,     7,   134,  1117,     7,
+       7,  1201,     4,   188,   178,   179,     6,   182,  1454,   182,
+     182,   185,   182,    91,   185,     7,     6,   184,     7,  1163,
+     189,   189,   188,   101,   188,   188,  1246,  1240,  1248,   188,
+    1250,   109,   110,   111,     7,  1244,  1245,   115,   116,   117,
+     118,  1264,   185,  1266,  1264,  1268,   188,  1267,  1268,     6,
+     273,     6,   275,    91,     6,     6,   183,  1201,     7,     6,
+    1283,   181,   181,   101,   188,     6,   168,  1290,     7,     7,
+    1293,   109,   110,   111,  1297,     7,  1289,   115,   116,   117,
+     118,    76,     4,     7,  1297,  1298,     7,     6,     4,     7,
+       7,     6,     6,  1316,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,     7,     7,
+     101,   189,   180,     7,  1337,     7,  1562,     6,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+     131,   132,   133,   188,    12,    13,     6,   181,  1371,   140,
+       7,   189,   143,  1376,     6,   188,     7,   148,   149,     7,
+       7,   384,     6,     6,     6,    74,    91,     6,     6,     4,
+       4,     4,   189,  1396,     6,     6,   101,     6,     4,     6,
+    1403,   187,   187,  1406,   109,   110,   111,   185,   182,   182,
+     115,   116,   117,   118,   182,   418,   182,  1420,     7,   181,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+     188,    79,     6,  1436,  1437,   185,    84,    85,     6,    87,
+      88,    89,   188,   188,  1444,    93,  1446,     6,  1448,    84,
+    1453,  1440,   188,     6,   188,  1458,  1456,     6,   188,  1459,
+       6,     6,     5,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,     4,   126,   127,
+     128,   180,  1406,     5,   189,     6,     4,     7,   188,     6,
+       6,   494,   495,   496,   265,   188,   183,  1396,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,  1512,
+       6,   282,     6,   180,     6,   188,   519,    39,    40,    41,
+      42,    43,    44,   526,   188,   188,    48,     6,   130,    12,
+      13,    53,    54,     6,    56,     6,   187,     6,  1437,  1532,
+       4,   189,     4,     6,     4,    67,   188,     6,     6,     6,
+     553,     6,     6,     4,     6,   134,     6,     6,     6,  1458,
+    1563,     5,  1565,     6,     6,  1565,     6,     6,     6,     6,
+       6,     6,     6,     6,     6,  1578,     6,   187,     6,     6,
+    1583,     6,     6,   182,     6,    68,    69,    70,    71,    72,
+      73,    74,    75,    76,    77,     7,    79,     6,   185,     6,
+     188,    84,    85,     6,    87,    88,    89,     5,   188,     6,
+      93,    72,    83,     6,   189,   188,   188,  1610,   189,   188,
+       6,   188,     7,   188,     6,   147,   148,   129,  1631,     6,
+       6,     6,   189,   132,     6,     6,  1639,     6,   641,     6,
+     643,     6,     6,   126,   127,   128,     6,   188,     6,     6,
+     653,   654,     6,     6,   188,   188,     6,   189,   188,  1639,
+      91,  1664,     6,     6,  1563,    91,  1565,     6,     6,     6,
+       6,     6,     6,     6,   189,     6,  1679,     6,  1681,   188,
+     188,   188,     6,     6,   188,     6,     6,     6,   159,   160,
+     161,   162,   163,     6,   697,     6,     6,   188,   188,  1679,
+     188,  1681,   188,   188,  1707,   176,   189,     6,     6,   180,
+       6,     6,     6,     6,     6,  1639,     6,     6,   189,   190,
+     191,   192,     6,   194,   195,   196,   197,  1707,   199,   200,
+     201,     6,  1631,  1535,   416,   206,  1046,  1425,     3,  1426,
+    1054,   744,     3,  1181,    -1,    -1,    -1,    -1,    -1,    -1,
+     753,    -1,   755,   224,   757,  1679,   759,  1681,   444,    -1,
+      -1,   764,   233,   234,   767,    -1,    -1,    -1,    -1,    -1,
+      -1,   242,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,  1707,    -1,    -1,    -1,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,   273,   274,   275,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   816,   285,   286,   287,    -1,   289,    -1,
+      -1,   292,   293,    -1,    -1,   296,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     311,    -1,    -1,    -1,   180,    -1,   849,   850,   851,   852,
+      -1,    -1,    -1,   324,    -1,    -1,   327,   328,   329,   330,
+     331,   332,   333,   334,   335,   336,   337,   338,   339,   340,
+     341,   342,   343,   344,   345,   346,   347,   348,    -1,    12,
+      13,    -1,    -1,    -1,    -1,    -1,    -1,   358,    -1,    -1,
+     361,    -1,   363,    -1,    -1,    -1,    -1,    -1,   901,    -1,
+      -1,    -1,     6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   383,   384,    -1,   386,   387,   388,   389,   390,
+     391,   392,   393,   394,   395,   396,   397,   398,   399,   400,
+      -1,    -1,   403,    -1,    -1,    68,    69,    70,    71,    72,
+      73,    74,    75,    76,    77,    -1,    79,   418,    -1,    -1,
+      -1,    84,    85,   424,    87,    88,    89,    -1,   429,     6,
+      93,    -1,    -1,   434,   435,    -1,    -1,    -1,    -1,   440,
+     441,    -1,    -1,    -1,   445,   446,   447,   448,   449,   450,
+     451,   452,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   126,   127,   128,    -1,    -1,    -1,   470,
+     471,   472,   473,   474,   475,    -1,    -1,    -1,   479,   480,
+     481,   482,   483,    -1,    -1,    -1,   487,    -1,    -1,   490,
+     491,    -1,    -1,   494,   495,   496,    -1,    -1,   499,   500,
+     501,   502,    12,    13,    -1,    -1,    -1,   508,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   519,    -1,
+      -1,    -1,    -1,    -1,   525,   526,   189,   528,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,   546,   180,    -1,    -1,    -1,
+      -1,   552,   553,    -1,    -1,    -1,   557,    -1,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    -1,    79,
+      -1,    -1,    -1,    -1,    84,    85,    -1,    87,    88,    89,
+      -1,    -1,    -1,    93,  1117,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,   607,    -1,    -1,    91,
+      -1,    -1,    -1,    -1,    -1,    -1,   126,   127,   128,   101,
+       6,    -1,    -1,    -1,    -1,    12,    13,   109,   110,   111,
+      -1,    91,    -1,   115,   116,   117,   118,   638,    -1,    -1,
+     641,   101,   643,   644,    91,    -1,    -1,    -1,    -1,   109,
+     110,   111,   653,   654,   101,   115,   116,   117,   118,    -1,
+      -1,    -1,   109,   110,   111,    -1,   667,    -1,   115,   116,
+     117,   118,    -1,    -1,    -1,   676,    -1,    -1,    -1,   189,
+      -1,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,   697,    84,    85,    -1,
+      87,    88,    89,   704,   705,    -1,    93,   189,    -1,   710,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   723,    -1,    -1,   726,    -1,    -1,    -1,   189,
+      -1,  1264,    -1,    -1,    -1,  1268,    -1,    -1,    -1,   126,
+     127,   128,   189,   744,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   753,     6,   755,    -1,   757,    -1,   759,    -1,
+      -1,    -1,    -1,   764,    -1,    -1,   767,    -1,    -1,    -1,
+      -1,    -1,   773,    -1,   775,   776,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    91,    -1,
+      -1,    -1,   189,   804,    -1,    -1,    -1,    -1,   101,    -1,
+      -1,   812,   813,   814,    -1,   816,   109,   110,   111,    -1,
+      -1,    -1,   115,   116,   117,   118,    12,    13,    -1,    -1,
+     831,   202,    -1,    -1,    -1,   836,    -1,    -1,   839,    -1,
+      -1,    -1,    -1,  1376,    -1,    -1,    -1,    91,   849,   850,
+     851,   852,   223,     6,   855,   226,    -1,   101,    -1,    -1,
+      -1,    -1,    -1,  1396,    -1,   109,   110,   111,    -1,    -1,
+    1403,   115,   116,   117,   118,    -1,    -1,    -1,    -1,   250,
+      -1,    -1,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    -1,    79,    -1,    -1,   189,    -1,    84,    85,
+     901,    87,    88,    89,  1437,    -1,    -1,    93,    -1,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,  1458,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   308,   309,    -1,
+     126,   127,   128,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+     321,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   960,
+      -1,    -1,   963,    -1,    -1,    -1,   967,    -1,   969,   970,
+     971,    -1,    -1,    -1,    -1,    -1,   977,    -1,    -1,    -1,
+      -1,    91,    -1,    -1,   355,    -1,    -1,    -1,    -1,    -1,
+       6,   101,    -1,   994,    -1,    12,    13,    -1,    -1,   109,
+     110,   111,    -1,   189,    -1,   115,   116,   117,   118,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,  1026,    -1,   180,    -1,    -1,
+    1563,    -1,  1565,    -1,    -1,    -1,  1037,  1038,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1048,  1049,    -1,
+      -1,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    12,    13,    -1,    84,    85,    -1,
+      87,    88,    89,    -1,    -1,    -1,    93,    -1,    -1,   189,
+      -1,    -1,    -1,    -1,    -1,  1086,  1087,  1088,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,  1096,    -1,  1098,  1631,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1109,   126,
+     127,   128,    -1,    -1,    -1,    -1,  1117,    -1,    -1,    -1,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      -1,    79,    -1,    -1,    -1,    -1,    84,    85,    -1,    87,
+      88,    89,  1143,  1144,  1145,    93,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    91,   180,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   189,   101,    -1,    -1,    -1,  1178,   126,   127,
+     128,   109,   110,   111,    -1,    -1,    -1,   115,   116,   117,
+     118,  1192,    -1,    -1,    -1,    -1,  1197,    -1,    -1,    -1,
+      -1,    -1,    -1,  1204,    -1,    -1,    -1,  1208,  1209,    -1,
+      -1,    -1,    -1,    -1,  1215,  1216,    -1,    -1,    -1,  1220,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1228,    -1,    -1,
+      -1,    -1,    -1,   604,    -1,    -1,    -1,  1238,    -1,  1240,
+      -1,   189,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,  1252,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   189,    -1,  1264,    -1,    -1,    -1,  1268,    -1,    -1,
+    1271,    12,    13,    -1,    -1,  1276,  1277,  1278,  1279,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1289,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1298,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   677,    12,    13,    -1,
+      -1,    -1,    -1,  1314,  1315,    -1,    -1,    -1,    -1,    -1,
+      -1,  1322,    -1,    -1,    -1,   696,    -1,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    84,    85,    -1,    87,    88,    89,    -1,
+      -1,    -1,    93,    -1,    -1,  1356,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,  1374,    79,  1376,    -1,    -1,    -1,    84,
+      85,    -1,    87,    88,    89,   126,   127,   128,    93,    -1,
+    1391,    -1,  1393,    -1,    -1,  1396,    -1,    -1,    -1,    -1,
+      -1,    -1,  1403,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   782,    -1,   784,    -1,  1416,    -1,    -1,    -1,    -1,
+    1421,   126,   127,   128,     6,    -1,    -1,    -1,    -1,    91,
+      -1,    -1,    -1,    -1,    -1,    -1,  1437,    -1,    -1,    -1,
+      -1,    -1,    -1,  1444,    -1,  1446,    -1,  1448,   189,    -1,
+      -1,   822,    -1,    -1,    -1,    -1,    -1,  1458,    -1,    -1,
+      -1,  1462,  1463,  1464,  1465,  1466,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1481,  1482,     6,    -1,   189,  1486,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,  1496,    -1,    -1,    -1,  1500,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,    -1,   856,    -1,  1122,
-      -1,    -1,    -1,    -1,    -1,   185,    -1,    -1,    -1,    -1,
-      -1,    12,    13,  1136,    -1,    -1,    -1,    -1,  1141,    -1,
-      -1,    -1,    -1,    -1,    -1,  1148,    -1,    -1,    87,  1152,
-    1153,    -1,    -1,    -1,    -1,    -1,  1159,  1160,    97,    -1,
-      -1,  1164,    -1,    -1,    -1,   655,   105,   106,   107,  1172,
-      -1,    -1,   111,   112,   113,   114,   666,    -1,    -1,  1182,
-       5,  1184,    -1,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,  1196,    75,    -1,    -1,    -1,    -1,    80,
-      81,    -1,    83,    84,    85,  1208,    -1,    -1,    89,  1212,
-      87,    -1,  1215,    -1,    39,    40,    41,    42,    43,    44,
-      97,    -1,    -1,    -1,    -1,  1228,    51,    52,   105,   106,
-     107,    -1,    -1,  1236,   111,   112,   113,   114,    63,    -1,
-      -1,   122,   123,   124,    -1,    -1,   185,    -1,    -1,  1252,
-    1253,    -1,   742,    -1,     3,     4,    -1,  1260,    -1,    -1,
-       9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
-      -1,  1294,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
-      -1,    -1,    -1,    -1,   185,    54,    55,    56,   185,  1312,
-      -1,  1314,    -1,    62,    -1,    -1,    87,    -1,   143,   144,
-      -1,    -1,  1325,    -1,  1327,    -1,    97,  1330,    -1,  1068,
-      -1,    -1,    -1,  1336,   105,   106,   107,    -1,    -1,    -1,
-     111,   112,   113,   114,    -1,    -1,  1349,    -1,    -1,    87,
-       6,  1354,   842,   843,    -1,   845,    -1,   847,   848,    97,
-      -1,   851,   852,    -1,    -1,    -1,    -1,   105,   106,   107,
-      -1,  1374,    -1,   111,   112,   113,   114,    -1,  1381,    -1,
-    1383,    -1,  1385,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  1395,   142,    -1,    -1,  1399,    -1,    -1,    -1,
-     149,   150,   151,   152,   153,    -1,    -1,    -1,    -1,    -1,
-      -1,  1414,  1415,    -1,   185,    -1,  1419,    -1,   167,   168,
-      -1,    -1,    -1,   172,    -1,    -1,  1429,    -1,   177,    -1,
-    1433,    -1,    -1,   182,    -1,   184,    -1,    -1,    -1,    87,
-      -1,    -1,   932,   933,   934,    -1,    -1,   185,    -1,    97,
-      -1,    -1,   942,    -1,    -1,    -1,  1459,   105,   106,   107,
-      -1,  1464,    -1,   111,   112,   113,   114,    -1,  1471,  1208,
-      -1,    -1,    -1,  1212,    -1,  1478,    -1,    -1,  1481,    -1,
-      -1,  1484,    -1,    -1,    -1,  1488,    -1,    -1,    -1,  1492,
-      -1,  1494,    -1,    -1,    -1,    -1,    -1,    -1,  1501,    -1,
-     990,  1504,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,  1006,    -1,    -1,    -1,
-     176,    -1,  1012,    -1,    -1,    -1,    -1,    -1,  1018,    87,
-    1020,  1021,    -1,  1536,    -1,  1025,    -1,   185,    -1,    97,
-    1030,  1031,  1032,    -1,    -1,    -1,  1549,   105,   106,   107,
-      -1,    -1,    -1,   111,   112,   113,   114,  1047,   160,   161,
+     172,   173,   174,   175,    -1,    -1,   887,   888,   180,   890,
+      -1,   892,   893,    -1,    -1,   896,   897,    -1,    -1,  1530,
+      -1,    -1,    -1,    -1,  1535,    -1,    -1,    -1,    -1,    -1,
+      -1,  1542,    -1,    -1,    -1,    -1,    -1,    -1,  1549,    -1,
+      -1,  1552,    -1,    -1,  1555,     6,    -1,    -1,  1559,    -1,
+      -1,    -1,  1563,    -1,  1565,  1566,  1567,  1568,  1569,    -1,
+      -1,    -1,    -1,    -1,    -1,  1576,    -1,    -1,  1579,    -1,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,  1062,    -1,   176,  1314,  1066,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
-      -1,  1330,    -1,     9,    10,    11,    -1,  1336,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-       8,    -1,    -1,    -1,    -1,    -1,    -1,   185,    -1,    45,
-      46,    47,    -1,    -1,    -1,  1374,    -1,    -1,    54,    55,
-      56,    -1,    -1,    -1,    -1,  1135,    62,     3,     4,    -1,
-      -1,    -1,    -1,     9,    10,    11,  1395,    -1,    14,    15,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   980,
+     981,   982,    -1,    -1,    -1,  1616,    -1,    -1,    -1,   990,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1631,    -1,  1633,  1634,  1635,  1636,    -1,    -1,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,     6,    -1,    -1,  1039,    -1,
+      -1,    -1,    -1,    -1,  1675,  1676,  1677,  1678,    -1,    -1,
+      -1,    -1,    -1,    -1,  1055,     6,    -1,    -1,    -1,    -1,
+    1061,    -1,    -1,    -1,    -1,    -1,  1067,    -1,  1069,  1070,
+      -1,    -1,    -1,  1074,  1075,  1076,  1077,  1078,  1079,  1080,
+    1081,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,  1096,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1111,    -1,    -1,    -1,  1115,    -1,    -1,     3,     4,     5,
+      -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      -1,    -1,    -1,    -1,    -1,  1175,  1176,  1177,  1178,    45,
-      46,    47,    -1,    -1,    -1,    -1,    -1,    -1,    54,    55,
-      56,    -1,    -1,    -1,    -1,    -1,    62,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-    1210,    -1,   176,    -1,    -1,    -1,   142,    -1,    -1,    -1,
-      -1,    -1,  1222,   149,   150,   151,   152,   153,    -1,  1229,
-      -1,  1231,    -1,    -1,    -1,  1235,    -1,    -1,    -1,     6,
-      -1,   167,   168,  1492,    -1,  1494,   172,    -1,    -1,    -1,
-      -1,   177,    -1,    -1,  1254,    -1,   182,    -1,     6,    -1,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,  1275,   142,     6,   176,    -1,
-      -1,    -1,    -1,   149,   150,   151,   152,   153,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    1549,   167,   168,    -1,    -1,    -1,   172,    -1,    -1,  1309,
-      -1,   177,    -1,    -1,   180,    -1,   182,    -1,     3,     4,
-       5,    -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,
+      -1,    -1,    -1,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    -1,    -1,    -1,    53,    54,    -1,
+      56,    -1,    58,    59,    60,    -1,    -1,    -1,    -1,    -1,
+      66,    67,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1191,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,    -1,   140,   187,    -1,   189,    -1,    -1,
+     146,   147,   148,    -1,    -1,  1266,    -1,   153,   154,   155,
+     156,   157,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,  1283,     7,     8,   171,   172,    -1,    -1,  1290,
+     176,    -1,  1293,    -1,    -1,   181,  1297,   183,    -1,   185,
+     186,    -1,   188,     8,   190,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,  1316,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,     3,     4,    -1,   180,    -1,  1337,     9,    10,    11,
+      -1,   187,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,
+    1371,    -1,    -1,    45,    46,    47,    -1,    49,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,
+      -1,    -1,    -1,    -1,    66,    -1,    68,    -1,    -1,    71,
+      -1,    -1,    74,    -1,    76,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    88,    -1,    -1,  1420,
+      -1,    -1,    -1,    95,    96,    97,    98,    99,    -1,    -1,
+      -1,   103,    -1,    -1,   106,  1436,    -1,    -1,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,  1453,    -1,    -1,    -1,   180,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,     8,    -1,    -1,   146,   180,    -1,    -1,    -1,    -1,
+      -1,   153,   154,   155,   156,   157,    -1,    -1,    -1,    -1,
+       8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   171,
+     172,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,   181,
+      -1,  1512,    -1,    -1,   186,    -1,   188,   189,     3,     4,
+      -1,    -1,    -1,    -1,     9,    10,    11,    -1,    -1,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    -1,    -1,  1353,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    -1,    -1,    -1,    51,    52,    -1,    54,
-      55,    56,    -1,  1373,    -1,    -1,    -1,    62,    63,    -1,
+      35,    36,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      45,    46,    47,    -1,    49,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    58,    59,    60,    -1,  1578,    -1,    -1,
+      -1,    66,  1583,    68,    -1,    -1,    71,    -1,    -1,    74,
+      -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    88,    -1,    -1,    -1,    -1,    -1,    -1,
+      95,    96,    97,    98,    99,    -1,    -1,    -1,   103,    -1,
+      -1,   106,    -1,    -1,    -1,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,     8,    -1,
+      -1,   146,   180,  1664,    -1,    -1,    -1,    -1,   153,   154,
+     155,   156,   157,    -1,    -1,    -1,    -1,    -1,    -1,     8,
+      -1,    -1,    -1,    -1,    -1,    -1,   171,   172,    -1,    -1,
+      -1,   176,    -1,    -1,    -1,    -1,   181,    -1,    -1,    -1,
+      -1,   186,    -1,    -1,   189,     3,     4,     5,    -1,    -1,
+      -1,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    -1,
+      -1,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    -1,    -1,    -1,    53,    54,    -1,    56,    -1,
+      58,    59,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,
+      68,    -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    1390,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,  1445,    -1,   176,    -1,    -1,
-      -1,   136,    -1,    -1,    -1,    -1,    -1,   142,   143,   144,
-      -1,    -1,    -1,    -1,   149,   150,   151,   152,   153,    -1,
+      88,    -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,
+      98,    99,    -1,    -1,    -1,   103,    -1,    -1,   106,    -1,
+      -1,    -1,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,     8,   146,   147,
+     148,   180,    -1,    -1,    -1,   153,   154,   155,   156,   157,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   167,   168,    -1,    -1,    -1,   172,    -1,    -1,
-      -1,    -1,   177,    -1,   179,    -1,   181,   182,    -1,   184,
-      -1,   186,    -1,  1503,     3,     4,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,
+      -1,    -1,    -1,   181,    -1,     3,     4,     5,   186,    -1,
+     188,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
+      -1,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      58,    59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,
+      68,    -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      88,    -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,
+      98,    99,    -1,    -1,    -1,   103,    -1,    -1,   106,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,
+      -1,    -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,
+      -1,    -1,    -1,   181,    -1,     3,     4,     5,   186,    -1,
+     188,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    12,    13,
+      -1,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    -1,    -1,    -1,    53,    54,    -1,    56,    -1,
+      58,    59,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+     182,    -1,   184,    -1,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,
+      84,    85,    -1,    87,    88,    89,    -1,    -1,    -1,    93,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,    -1,    -1,   187,    -1,   189,   146,   147,
+     148,    -1,   126,   127,   128,   153,   154,   155,   156,   157,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,
+      -1,    -1,    -1,   181,    -1,     3,     4,     5,   186,    -1,
+     188,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
+      -1,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      58,    59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,
+      68,    -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      88,    -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,
+      98,    99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,    -1,   189,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,
+      -1,    -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,
+      -1,    -1,    -1,   181,    -1,     3,     4,     5,   186,    -1,
+     188,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
+      -1,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    -1,    -1,    -1,    53,    54,    -1,    56,    -1,
+      58,    59,    60,    -1,     3,     4,     5,    -1,    66,    67,
+       9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    -1,    -1,    -1,    53,    54,    -1,    56,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,    -1,
+      -1,    -1,    -1,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,   146,   147,
+     148,   180,    -1,    -1,    -1,   153,   154,   155,   156,   157,
+     189,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,
+      -1,    -1,    -1,   181,    -1,    -1,    -1,    -1,   186,    -1,
+     188,    -1,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,   146,   147,   148,
+     180,    -1,    -1,    -1,   153,   154,   155,   156,   157,   189,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
        9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
-      -1,    -1,    -1,    12,    13,    54,    55,    56,    -1,    -1,
-      -1,    -1,    -1,    62,    -1,    64,    -1,    -1,    67,    -1,
-      -1,    70,    -1,    72,  1574,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,
-      -1,    -1,    91,    92,    93,    94,    95,    -1,    -1,    -1,
-      99,    -1,    -1,   102,    -1,    64,    65,    66,    67,    68,
-      69,    70,    71,    72,    73,    -1,    75,    -1,    -1,    -1,
-      -1,    80,    81,    -1,    83,    84,    85,    -1,    -1,    -1,
-      89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   142,    -1,    -1,    -1,    -1,    -1,    -1,
-     149,   150,   151,   152,   153,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   122,   123,   124,    -1,    -1,   167,   168,
-      -1,    -1,    -1,   172,    -1,    -1,    -1,    -1,   177,    -1,
-      -1,     3,     4,   182,    -1,   184,   185,     9,    10,    11,
-      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    45,    46,    47,   185,    -1,    -1,    -1,
-      -1,    -1,    54,    55,    56,    -1,    -1,    12,    13,    -1,
-      62,    -1,    64,    -1,    -1,    67,    -1,    -1,    70,    -1,
-      72,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,    91,
-      92,    93,    94,    95,    -1,    -1,    -1,    99,    -1,    -1,
-     102,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    -1,
-      75,    -1,    -1,    -1,    -1,    80,    81,    -1,    83,    84,
-      85,    -1,     6,    -1,    89,    -1,    -1,    -1,    -1,    -1,
-     142,    -1,    -1,    -1,    -1,    -1,    -1,   149,   150,   151,
-     152,   153,     6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   167,   168,   122,   123,   124,
-     172,    -1,    -1,    -1,    -1,   177,    -1,    -1,    -1,    -1,
-     182,    -1,    -1,   185,     3,     4,     5,    -1,    -1,    -1,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
+      -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,    98,
+      99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
        9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    -1,
-     185,    -1,    51,    52,    -1,    54,    55,    56,    -1,    -1,
-      -1,    -1,    -1,    62,    63,    64,    -1,    -1,    67,    -1,
-      -1,    70,    -1,    72,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,
-      -1,    -1,    91,    92,    93,    94,    95,    -1,    -1,    -1,
-      99,    -1,    -1,   102,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,   142,   143,   144,    -1,    -1,    -1,    -1,
-     149,   150,   151,   152,   153,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   167,   168,
-      -1,    -1,    -1,   172,    -1,    -1,    -1,    -1,   177,    -1,
-       3,     4,     5,   182,    -1,   184,     9,    10,    11,    -1,
-      -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    45,    46,    47,    -1,    -1,    -1,    12,    13,
-      -1,    54,    55,    56,    -1,    -1,    -1,    -1,    -1,    62,
-      -1,    64,    -1,    -1,    67,    -1,    -1,    70,    -1,    72,
+      -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
+      -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,    98,
+      99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,    91,    92,
-      93,    94,    95,    -1,    -1,    -1,    99,    -1,    -1,   102,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      -1,    75,    -1,    -1,    -1,    -1,    80,    81,    -1,    83,
-      84,    85,    -1,    -1,    -1,    89,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   142,
-      -1,    -1,    -1,    -1,    -1,    -1,   149,   150,   151,   152,
-     153,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   122,   123,
-     124,    -1,    -1,    -1,   167,   168,    -1,    -1,    -1,   172,
-      -1,    -1,    -1,    -1,   177,    -1,     3,     4,     5,   182,
-      -1,   184,     9,    10,    11,    -1,    -1,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    46,
-      47,   185,    -1,    -1,    12,    13,    -1,    54,    55,    56,
-      -1,    -1,    -1,    -1,    -1,    62,    -1,    64,    -1,    -1,
-      67,    -1,    -1,    70,    -1,    72,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    -1,
-      -1,    -1,    -1,    -1,    91,    92,    93,    94,    95,    -1,
-      -1,    -1,    99,    -1,    -1,   102,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    -1,    75,    -1,    -1,
-      -1,    -1,    80,    81,    -1,    83,    84,    85,    -1,    -1,
-       6,    89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   142,    -1,    -1,    -1,     6,
-      -1,    -1,   149,   150,   151,   152,   153,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   122,   123,   124,    -1,    -1,    -1,
-     167,   168,    -1,    -1,    -1,   172,    -1,    -1,    -1,    -1,
-     177,    -1,     3,     4,    -1,   182,    -1,   184,     9,    10,
-      11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    45,    46,    47,   185,    -1,    -1,
-      -1,    -1,    -1,    54,    55,    56,    -1,    -1,    -1,    -1,
-      -1,    62,    -1,    64,    -1,    -1,    67,    -1,    -1,    70,
-      -1,    72,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,
-      91,    92,    93,    94,    95,    -1,    -1,    -1,    99,    -1,
-      -1,   102,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,     8,    -1,    -1,    -1,   176,
-      -1,   142,    -1,    -1,    -1,    -1,    -1,    -1,   149,   150,
-     151,   152,   153,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   167,   168,    -1,    -1,
-      -1,   172,    -1,    -1,    -1,    -1,   177,    -1,     3,     4,
-      -1,   182,    -1,   184,     9,    10,    11,    -1,    -1,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,    54,
-      55,    56,    -1,    -1,    -1,    -1,    -1,    62,    -1,    64,
-      -1,    -1,    67,    -1,    -1,    70,    -1,    72,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,
-      -1,    -1,    -1,    -1,    -1,    -1,    91,    92,    93,    94,
-      95,    -1,    -1,    -1,    99,    -1,    -1,   102,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,     8,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   142,    -1,    -1,
-      -1,    -1,    -1,     8,   149,   150,   151,   152,   153,    -1,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
+       9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
+      -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,    98,
+      99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   167,   168,    -1,    -1,    -1,   172,    -1,    -1,
-      -1,    -1,   177,    -1,     3,     4,    -1,   182,    -1,   184,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
        9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
-      -1,    -1,    -1,    -1,    -1,    54,    55,    56,    -1,    -1,
-      -1,    -1,    -1,    62,    -1,    64,    -1,    -1,    67,    -1,
-      -1,    70,    -1,    72,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,
-      -1,    -1,    91,    92,    93,    94,    95,    -1,    -1,    -1,
-      99,    -1,    -1,   102,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,     8,    -1,    -1,
-      -1,   176,    -1,   142,    -1,    -1,    -1,    -1,    -1,    -1,
-     149,   150,   151,   152,   153,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   167,   168,
-      -1,    -1,    -1,   172,    -1,    -1,    -1,    -1,   177,    -1,
-       3,     4,    -1,   182,    -1,   184,     9,    10,    11,    -1,
-      -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,
-      -1,    54,    55,    56,    -1,    -1,    -1,    -1,    -1,    62,
-      -1,    64,    -1,    -1,    67,    -1,    -1,    70,    -1,    72,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
+      -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,    98,
+      99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,    91,    92,
-      93,    94,    95,    -1,    -1,    -1,    99,    -1,    -1,   102,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,     8,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   142,
-      -1,    -1,    -1,    -1,    -1,    -1,   149,   150,   151,   152,
-     153,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   167,   168,    -1,    -1,    -1,   172,
-      -1,    -1,    -1,    -1,   177,    -1,     3,     4,    -1,   182,
-      -1,   184,     9,    10,    11,    -1,    -1,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    46,
-      47,    -1,    -1,    -1,    87,    -1,    -1,    54,    55,    56,
-      -1,    -1,    -1,    -1,    -1,    62,    -1,    64,    -1,    -1,
-      67,    -1,    -1,    70,    -1,    72,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    -1,
-      -1,    -1,    -1,    -1,    91,    92,    93,    94,    95,    -1,
-      -1,    -1,    99,    -1,    -1,   102,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,   142,    -1,    -1,    -1,    -1,
-      -1,    -1,   149,   150,   151,   152,   153,    -1,    -1,    -1,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
+       9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
+      -1,    -1,    71,    -1,    -1,    74,    -1,    76,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
+      -1,    -1,    -1,    -1,    -1,    -1,    95,    96,    97,    98,
+      99,    -1,    -1,    -1,   103,    -1,    -1,   106,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    -1,    -1,   153,   154,   155,   156,   157,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     167,   168,    -1,    -1,    -1,   172,    -1,    -1,    -1,    -1,
-     177,    -1,     3,     4,     5,   182,    -1,   184,     9,    10,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,     3,     4,    -1,   186,    -1,   188,
+       9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+      59,    60,     3,     4,     5,    -1,    -1,    66,     9,    10,
       11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    -1,    -1,    -1,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
-      51,    52,    -1,    54,    55,    56,    -1,     3,     4,     5,
-      -1,    62,    63,     9,    10,    11,    -1,    -1,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      -1,    -1,    -1,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    -1,    -1,    -1,    51,    52,    -1,    54,    55,
-      56,    -1,    -1,    -1,    -1,    -1,    62,    63,    -1,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,   142,   143,   144,   183,    -1,   185,    -1,   149,   150,
-     151,   152,   153,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   167,   168,    -1,    -1,
-      -1,   172,    -1,    -1,    -1,    -1,   177,    -1,    -1,    -1,
-      -1,   182,    -1,   184,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   142,   143,   144,    -1,
-      -1,    -1,    -1,   149,   150,   151,   152,   153,    -1,    -1,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    -1,
+      -1,    -1,    53,    54,    -1,    56,    -1,    58,    59,    60,
+      -1,    -1,    -1,    -1,    -1,    66,    67,    -1,    -1,    -1,
+      -1,    -1,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,   146,    -1,    -1,
+     180,    -1,    -1,    -1,   153,   154,   155,   156,   157,   189,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   167,   168,    -1,    -1,    -1,   172,    -1,    -1,    -1,
-      -1,   177,    -1,     3,     4,     5,   182,    -1,   184,     9,
-      10,    11,    -1,    -1,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    -1,    -1,
-      -1,    51,    52,    -1,    54,    55,    56,    -1,    -1,    -1,
-      -1,    -1,    62,    63,    -1,    -1,     3,     4,    -1,    -1,
-      -1,    -1,     9,    10,    11,    -1,    -1,    14,    15,    16,
+      -1,    -1,   171,   172,    -1,    -1,    -1,   176,    -1,    -1,
+      -1,    -1,   181,    -1,    -1,    -1,    -1,   186,    -1,   188,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,    -1,   146,   147,   148,   180,    -1,
+      -1,    -1,   153,   154,   155,   156,   157,   189,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     171,   172,    -1,    -1,    -1,   176,     3,     4,    -1,    -1,
+     181,    -1,     9,    10,    11,   186,    -1,    14,    15,    16,
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    46,
-      47,    -1,    -1,    -1,    -1,    -1,    -1,    54,    55,    56,
-      -1,    -1,    -1,    -1,    -1,    62,    -1,    64,    -1,    -1,
-      67,    -1,    -1,    70,    -1,    72,    -1,    -1,    -1,    -1,
-      -1,    -1,   142,   143,   144,    -1,    -1,    84,    -1,   149,
-     150,   151,   152,   153,    91,    92,    93,    94,    95,    -1,
-      -1,    -1,    99,    -1,    -1,   102,    -1,   167,   168,    -1,
-      -1,    -1,   172,    -1,    -1,    -1,    -1,   177,    -1,    -1,
-      -1,    -1,   182,    -1,   184,    -1,    -1,    -1,    -1,    -1,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,   142,    -1,    -1,   176,    -1,
-      -1,    -1,   149,   150,   151,   152,   153,   185,    -1,    -1,
+      47,    -1,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    58,    59,    60,    -1,    -1,    -1,    -1,    -1,    66,
+      -1,    68,    -1,    -1,    71,    -1,    -1,    74,    -1,    76,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     167,   168,    -1,    -1,    -1,   172,     3,     4,     5,    -1,
-     177,    -1,     9,    10,    11,   182,    -1,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    -1,
-      -1,    -1,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    -1,    -1,    -1,    51,    52,    -1,    54,    55,    56,
-      -1,    -1,    -1,    -1,    -1,    62,    63,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-     131,   132,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   144,   145,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,    -1,   185,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   142,   143,   144,    -1,    -1,
-      -1,    -1,   149,   150,   151,   152,   153,    -1,    -1,    -1,
-       0,     1,    -1,    -1,     4,    -1,    -1,    -1,    -1,    -1,
-     167,   168,    12,    13,    -1,   172,    -1,    -1,    -1,    -1,
-     177,    -1,    -1,    -1,    -1,   182,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    48,    49,
-      50,    -1,    -1,    53,    -1,    -1,    -1,    57,    58,   260,
-      60,    61,    -1,    -1,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    -1,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    86,    -1,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,    -1,    -1,    -1,   108,   109,
-     110,    -1,    -1,    -1,    -1,    -1,   116,     4,    -1,    -1,
-      -1,   121,   122,   123,   124,    12,    13,   127,    -1,   129,
-      -1,   131,   132,   133,   134,   135,   136,   137,   138,   139,
-     140,   141,    -1,    -1,    -1,   145,   146,   147,   148,    -1,
-      37,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    48,    49,    50,    -1,    -1,    53,    -1,    -1,    -1,
-      57,    58,    -1,    60,    61,    -1,    -1,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    -1,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      -1,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,    98,    99,   100,   101,   102,   103,   104,    12,    13,
-      -1,   108,   109,   110,    -1,    -1,    -1,    -1,    -1,   116,
-      -1,    -1,    -1,    -1,   121,   122,   123,   124,    -1,    -1,
-     127,    -1,   129,    -1,   131,   132,   133,   134,   135,   136,
-     137,   138,   139,   140,   141,    -1,    -1,    -1,   145,   146,
-     147,   148,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      -1,    75,    -1,    -1,    -1,    -1,    80,    81,    -1,    83,
-      84,    85,    -1,    -1,    -1,    89,   158,   159,   160,   161,
+      -1,    88,    -1,    -1,    -1,    -1,    -1,    -1,    95,    96,
+      97,    98,    99,    -1,    -1,    -1,   103,    -1,    -1,   106,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,
-      -1,   183,    -1,   185,    -1,    -1,    -1,    -1,   122,   123,
-     124,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   185,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     185,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   185,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     185,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   185,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     185,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   185,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     185,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   185,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   185,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     185,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   184,   158,   159,   160,   161,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,
+      -1,    -1,    -1,    -1,    -1,    -1,   153,   154,   155,   156,
+     157,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   171,   172,    -1,    -1,    -1,   176,
+       3,     4,    -1,    -1,   181,    -1,     9,    10,    11,   186,
+      -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    45,    46,    47,    -1,    49,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,     4,    58,    59,    60,    -1,     9,
+      10,    11,    -1,    66,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,    49,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+      60,    -1,    -1,    -1,    -1,    -1,    66,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   146,   189,    -1,    -1,    -1,    -1,    -1,
+     153,   154,   155,   156,   157,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   171,   172,
+      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,   181,    -1,
+      -1,   184,    -1,   186,    -1,    -1,    -1,     0,     1,    -1,
+      -1,     4,    -1,    -1,    -1,    -1,   146,    -1,    -1,    12,
+      13,    -1,    -1,   153,   154,   155,   156,   157,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   171,   172,    -1,    37,    38,   176,    -1,    -1,    -1,
+      -1,   181,    -1,    -1,    -1,    -1,   186,    50,    51,    52,
+      -1,    -1,    55,    -1,    57,    -1,    -1,    -1,    61,    62,
+      -1,    64,    65,    -1,    -1,    68,    69,    70,    71,    72,
+      73,    74,    75,    76,    77,    -1,    79,    80,    81,    82,
+      83,    84,    85,    86,    87,    88,    89,    90,    -1,    92,
+      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
+     103,   104,   105,   106,   107,   108,    -1,    -1,    -1,   112,
+     113,   114,    -1,    -1,    -1,    -1,    -1,   120,     4,    -1,
+      -1,    -1,   125,   126,   127,   128,    12,    13,   131,    -1,
+     133,    -1,   135,   136,   137,   138,   139,   140,   141,   142,
+     143,   144,   145,    -1,    -1,    -1,   149,   150,   151,   152,
+      -1,    37,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    50,    51,    52,    -1,    -1,    55,
+      -1,    57,    -1,    -1,    -1,    61,    62,    -1,    64,    65,
+      -1,    -1,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    -1,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    -1,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,    -1,    -1,    -1,   112,   113,   114,    -1,
+      -1,    -1,    -1,    -1,   120,    -1,    -1,    -1,    -1,   125,
+     126,   127,   128,    -1,    -1,   131,    -1,   133,    -1,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+      -1,    -1,    -1,   149,   150,   151,   152,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   189,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   189,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     189,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   189,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   189,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   189,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   189,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     189,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   189,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   189,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   189,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   189,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     189,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   189,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   189,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   189,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   189,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     189,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   189,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   189,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   188,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     188,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,   182,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+      -1,    -1,   187,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,   187,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,    -1,    -1,   187,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,    -1,
+     187,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,    -1,    -1,   187,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,   184,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   184,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,   178,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,   183,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,   183,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,   183,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,   183,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,   183,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,   183,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,   183,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,   183,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,   183,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,   183,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,   183,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,   183,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,    -1,    -1,    -1,   183,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,    -1,    -1,    -1,   183,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,    -1,
-      -1,    -1,   183,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,   183,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,
-      -1,   180,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,    -1,    -1,    -1,   180,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,   180,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,
-     180,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,   180,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,    -1,    -1,   180,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,   180,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,
-      -1,    -1,   180,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,    -1,    -1,   180,   158,   159,   160,   161,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,   184,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,   184,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,   184,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,   184,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,   184,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,   184,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+     184,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,   184,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,   184,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,   184,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,   180,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
-      -1,   180,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,    -1,    -1,    -1,   180,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,    -1,    -1,   180,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,
-     180,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,    -1,    -1,   180,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,    -1,    -1,   180,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,
-     178,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,   178,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,    -1,   178,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,   178,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,   178,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,   161,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,   184,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,   184,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,   184,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,   184,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,   182,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,   182,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,   182,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,
-     178,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,   178,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,    -1,   178,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,   178,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,   178,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,   161,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+     182,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,   182,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,   182,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,   182,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,   182,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,
-     178,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,
-      -1,   178,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,
-     176,    -1,   178,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,    -1,    -1,    -1,
-      -1,   176,    -1,   178,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,    -1,    -1,
-      -1,    -1,   176,    -1,   178,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,    -1,
-      -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,   161,
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+     182,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,   182,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,   182,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,   182,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,   182,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,   182,
      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-      -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,   178,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,    -1,    -1,    -1,    -1,   176,    -1,
-     178,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,    -1,    -1,    -1,    -1,   176
+     172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,    -1,
+     182,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,   180,
+      -1,   182,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,    -1,    -1,    -1,    -1,
+     180,    -1,   182,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,    -1,    -1,    -1,
+      -1,   180,    -1,   182,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,    -1,    -1,
+      -1,    -1,   180,    -1,   182,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,    -1,
+      -1,    -1,    -1,   180,    -1,   182,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+      -1,    -1,    -1,    -1,   180
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint16 yystos[] =
 {
-       0,     1,   188,   189,     6,     0,     4,    12,    13,    37,
-      38,    48,    49,    50,    53,    57,    58,    60,    61,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      86,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,    98,    99,   100,   101,   102,   103,   104,   108,   109,
-     110,   116,   121,   122,   123,   124,   127,   129,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   145,
-     146,   147,   148,   190,   192,   193,   213,   227,   232,   235,
-     236,   237,   238,   239,   240,   241,   261,   262,   263,   264,
-     282,   283,     3,     4,     5,     9,    10,    11,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    51,
-      52,    54,    55,    56,    62,    63,   136,   142,   143,   144,
-     149,   150,   151,   152,   153,   167,   168,   172,   177,   179,
-     181,   182,   184,   186,   211,   265,   266,   278,   279,   282,
-     283,    13,    70,   177,   177,     6,   184,     6,     6,     6,
-       6,     6,   179,   179,   177,   184,   177,   177,     4,   177,
-     184,   177,   177,     4,   184,   177,   177,    74,    70,    70,
-       6,   184,    64,    67,    70,    70,    70,    67,    70,    72,
-      72,    64,    67,    70,    72,    67,    70,    72,    67,    70,
-     177,    67,   127,   140,   141,   184,   167,   168,   177,   184,
-     268,   269,   268,   184,    64,    67,    70,   184,   268,     4,
-      64,    68,    80,    70,    72,    70,    67,     4,   136,   184,
-       4,     6,    64,    67,    70,    67,    70,     4,     4,     4,
-       4,     5,    36,    64,    67,    70,    72,    84,   168,   177,
-     184,   232,   241,   265,   271,   272,   273,   283,     4,   177,
-     177,   177,     4,   184,   275,     4,   177,   177,     6,     6,
-     179,     4,     4,     5,   184,     5,   184,     4,   265,     6,
-     177,   184,   177,   179,   186,     7,   154,   155,   156,   157,
-     174,   175,   209,   210,     4,   179,   181,   177,   179,   211,
-     211,   211,   211,   211,   211,   211,   211,   211,   211,   211,
-     211,   211,   211,   211,   211,   211,   211,   211,   211,   211,
-     211,   211,   211,   211,   177,   177,   177,   177,   177,   177,
-     211,   211,     7,   177,   177,   177,   177,   177,   265,   265,
-     265,   265,   180,   265,     4,   127,   128,     4,   282,   283,
-       4,   232,   233,   234,   184,   184,     6,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,   176,   184,     6,   179,   210,     6,   265,     4,   278,
-     279,   283,   278,   265,   215,   218,   265,   168,   265,   273,
-     274,   265,   265,   177,   265,   274,   265,   265,   177,   274,
-     265,   265,   271,   177,   184,   274,   272,   272,   272,   177,
-     177,   272,   272,   272,   177,   228,   229,   230,   231,   177,
-     177,   177,   271,   265,     4,   271,   275,   184,   184,   268,
-     268,   268,   265,   265,   167,   168,   184,   184,   268,   184,
-     184,   184,   167,   168,   177,   234,   268,   184,   177,   184,
-     177,   177,   177,   272,   272,   271,   177,     4,     6,   179,
-     179,   234,     6,   184,   184,   184,   272,   272,   179,   179,
-     179,   179,   181,   211,   179,     5,   184,     5,     5,     5,
-      64,    67,    70,    72,   184,   265,   273,   265,   185,   274,
-       8,   169,     6,     6,   265,   265,   265,   181,   265,   184,
-     130,   265,   265,   265,     6,     6,   234,     6,   234,   179,
-       6,   271,   271,   184,   265,   184,   279,   271,     6,   179,
-     265,     4,   265,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   278,   281,   278,   278,   278,   278,
-     278,   278,   278,   281,   265,   279,   265,   278,   278,   278,
-     283,   279,   178,     7,   209,   180,     7,   209,   210,   181,
-       7,   179,   185,    64,    67,    70,    72,   227,   265,   274,
-     265,   265,   265,   265,   265,   265,   265,   265,   265,   265,
-     265,   265,   265,   265,   265,   194,   265,     6,   179,   181,
-     178,   183,   178,   183,   183,   180,   183,   214,   180,   214,
-     178,   169,   183,   185,   178,   178,   265,   178,   185,   178,
-     178,   265,   185,   178,   178,     7,   265,   265,   185,     6,
-       6,     6,   265,   265,     7,     7,   259,   259,   265,   177,
-     177,   177,   177,   265,   265,   265,     7,   184,   178,     6,
-     184,   234,   234,   183,   183,   183,   268,   268,   233,   233,
-     183,   265,   265,   265,   265,   245,   183,   234,   265,   265,
-     265,   265,   265,     7,   260,     6,     7,   265,     6,   265,
-     265,   185,   274,   274,   274,     6,     6,   265,   265,   265,
-     265,     4,   178,   180,   184,   212,     4,   265,   184,   184,
-     184,   184,   274,   178,   185,   265,   184,   265,   273,   178,
-     178,   178,   127,   183,   234,   184,     8,   178,   180,   185,
-     185,   178,   183,   185,   274,   180,   265,     6,     6,   265,
-     180,   210,   212,   212,   212,   212,   212,   212,   212,   212,
-     212,   212,   212,   183,   212,   212,   212,   212,   212,   212,
-     212,   183,   183,   183,   183,   212,   183,   212,   183,   178,
-     178,   183,   183,   183,   178,   267,   280,     6,   183,   178,
-     183,   178,   178,   209,   271,   181,   209,   210,   279,   265,
-       6,     4,     4,   184,   276,   180,   184,   184,   184,   184,
-     185,   185,     8,     4,   117,   118,   119,   120,   185,   197,
-     201,   204,   206,   207,   180,   265,     4,     6,   164,   191,
-     274,     6,   274,   265,     6,   283,     6,   278,     7,   265,
-     273,   130,     7,     7,   178,     7,   130,     7,     7,   178,
-     130,     7,     7,   265,   178,   185,   184,   178,   178,   265,
-     271,     4,   258,     6,   178,   224,   265,   279,   224,   224,
-     224,   178,   178,   178,   271,   274,   181,   234,   185,   185,
-     268,   265,   265,   185,   185,   265,   268,   183,   183,   183,
-      87,    97,   105,   106,   107,   111,   112,   113,   114,   255,
-     256,   268,   185,   242,   178,   185,   178,   178,   178,   265,
-       6,   265,   178,   180,   180,   185,   185,   185,   180,   180,
-     183,   180,   274,   180,   185,   274,   274,   274,   274,   185,
-       8,   274,     7,     7,     7,   181,   265,   185,   265,   265,
-       7,   181,   184,   271,     6,   185,   209,   210,   185,   180,
-     181,   210,   278,   265,   265,   265,   265,   278,   274,   278,
-     278,   278,   278,   220,   222,   265,   278,   265,     6,     4,
-     127,   128,   265,     6,     6,     6,     7,   179,   275,   277,
-       6,   274,   274,   274,   274,   212,   265,   198,   177,   177,
-     184,   208,     6,   210,   180,   164,   278,   178,   178,   183,
-       7,   268,    70,    72,   271,   271,     7,   271,    70,    72,
-     271,   271,     7,    72,   271,   271,     6,     7,     7,   274,
-       7,     7,    87,   257,     6,     7,   178,   178,   178,   178,
-       7,     7,     7,     6,   185,     4,   185,   183,   183,   183,
-     185,   185,   268,   268,   268,     4,     6,   184,     6,   177,
-       6,   115,     6,   115,     6,   115,     6,   115,   185,   256,
-     183,   255,     7,     6,     7,     7,     7,     6,   184,     6,
-       6,     6,    70,   265,     6,     6,   265,   181,   185,   185,
-     185,   185,   185,   265,   185,   271,   271,   271,     4,   183,
-       8,     8,   178,     4,     4,   271,   185,   178,   265,     6,
-       6,     4,     6,   212,   212,   212,   212,   212,   212,   183,
-     178,   178,   183,   212,   221,   183,   212,   223,   178,   178,
-       6,     7,   209,   210,   181,     7,     6,   275,   265,   183,
-     185,   185,   185,   185,   185,   209,   177,   265,   265,   270,
-     271,   184,   181,     6,     6,   191,     6,   265,   184,   265,
-     279,     6,   184,   184,    80,   226,   226,   271,     6,   184,
-     184,     6,     6,   271,   184,     6,     6,     5,   271,   185,
-     271,   271,     4,     6,   271,     7,     7,     7,     7,   271,
-     271,   271,     7,     6,     7,   265,   265,   265,   184,   184,
-     183,   185,   183,   185,   183,   185,   179,   265,   271,   265,
-       6,     6,     6,     6,   265,   268,   185,     5,   184,   271,
-     184,   184,   184,   271,   274,   184,     6,   180,     4,   212,
-       6,     6,   126,   265,   265,   265,     6,     6,     7,   183,
-       6,   209,     6,   210,   278,     4,     4,   279,   265,     6,
-       4,   276,     6,   180,   275,     6,     6,     6,     6,   271,
-     195,   265,   183,   183,   183,   185,   196,   265,     4,   278,
-     183,   265,   279,   265,   265,   268,     6,     6,     6,   265,
-     265,     6,   265,     5,     6,   184,     6,   130,   225,   265,
-       6,   271,   271,   271,   271,     6,     4,     6,     6,   265,
-     265,   279,   185,   178,   183,   185,   233,   233,   268,     6,
-     246,   268,     6,   247,   268,     6,   248,   265,   185,   183,
-     178,   185,   183,     6,   168,   268,     6,   270,   268,   268,
-       6,   185,   265,     6,   271,   183,   185,     8,   185,   178,
-     184,   265,   279,   271,   271,   178,   184,   271,   279,   184,
-     265,   279,     6,     6,     7,     6,   181,     6,   178,   183,
-     265,   265,   271,   184,   183,   185,     6,   265,   216,   217,
-     185,   185,   185,   185,   185,     5,   270,    68,     6,     6,
-       6,     6,     6,   184,   184,     6,     6,   184,   265,   185,
-     185,   183,   184,   183,   184,   183,   184,   180,     6,   271,
-       7,   184,   265,   183,   185,   183,   183,     6,   185,   125,
-     265,   265,   274,     6,     6,   185,     6,   219,   265,   281,
-     275,   128,   199,   265,   183,   183,   270,   265,     6,   183,
-     220,   222,     6,     6,     6,     6,     6,     6,   185,   184,
-     270,   274,   233,   183,   185,   265,   268,   255,   265,   268,
-     255,   265,   268,   255,     6,   183,   185,   271,   234,   185,
-     268,     6,   274,   268,   265,   185,   185,   185,     6,   183,
-     185,     7,   185,     6,   184,   265,   265,   185,   265,   185,
-     185,   184,   265,   185,   185,   185,   265,   185,   183,   185,
-     185,   183,   185,   185,   183,   185,   271,     6,    87,   185,
-     243,   184,   183,   185,   183,     6,     6,   265,   279,   196,
-     178,   183,     6,   184,   183,   265,   185,     6,     6,   185,
-       6,   249,   265,     6,     6,   250,   265,     6,     6,   251,
-     265,     6,   185,   265,   255,   234,   274,     6,   268,   274,
-       7,   185,   202,   265,   270,   265,   183,   184,   185,   184,
-     185,   184,   185,     6,     6,   185,   185,   244,   185,   183,
-     185,   279,     6,   184,   178,   185,   185,   265,   255,     6,
-     252,   255,     6,   253,   255,     6,   254,   255,     6,   274,
-       6,   200,   278,   205,   184,     6,   185,   185,   184,   185,
-     184,   185,   184,   185,   185,   183,   185,   184,   270,     6,
-       6,   255,     6,   255,     6,   255,     6,   278,     6,   203,
-     278,   185,   185,   185,   185,   183,   185,     6,     6,     6,
-       6,   278,     6
+       0,     1,   192,   193,     6,     0,     4,    12,    13,    37,
+      38,    50,    51,    52,    55,    57,    61,    62,    64,    65,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
+      89,    90,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   112,
+     113,   114,   120,   125,   126,   127,   128,   131,   133,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+     149,   150,   151,   152,   194,   196,   197,   217,   234,   235,
+     238,   239,   240,   241,   242,   243,   244,   265,   266,   267,
+     268,   286,   287,     3,     4,     5,     9,    10,    11,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    53,    54,    56,    58,    59,    60,    66,    67,
+     140,   146,   147,   148,   153,   154,   155,   156,   157,   171,
+     172,   176,   181,   183,   185,   186,   188,   190,   215,   269,
+     270,   282,   283,   286,   287,    13,    74,   181,   181,     6,
+     188,     6,     6,     6,   181,     6,     6,   183,   183,   181,
+     188,   181,   181,     4,   181,   188,   181,   181,     4,   188,
+     181,   181,    78,    74,    74,     6,   188,    68,    71,    74,
+      74,    74,    71,    74,    76,    76,    68,    71,    74,    76,
+      71,    74,    76,    71,    74,   181,    71,   131,   144,   145,
+     188,   171,   172,   181,   188,   272,   273,   272,   188,    68,
+      71,    74,   188,   272,     4,    68,    72,    84,    74,    76,
+      74,    71,     4,   140,   188,     4,     6,    68,    71,    74,
+      71,    74,     4,     4,     4,     4,     5,    36,    68,    71,
+      74,    76,    88,   172,   181,   188,   235,   244,   269,   275,
+     276,   277,   286,   287,     4,   181,   181,   181,     4,   188,
+     279,     4,   181,   181,     6,     6,   183,     4,   286,   287,
+       4,     5,   188,     5,   188,     4,   269,     6,   181,   188,
+     181,   183,   190,   215,     7,   158,   159,   160,   161,   178,
+     179,   213,   214,     4,   183,   185,   183,   215,   215,   215,
+     215,   215,   215,   215,   215,   215,   215,   215,   215,   215,
+     215,   215,   215,   215,   215,   215,   215,   215,   215,   215,
+     215,   215,   181,   181,   181,   181,   181,   181,   215,   181,
+     215,   215,   215,     7,   181,   181,   181,   181,   181,   269,
+     269,   269,   269,   184,   269,     4,   131,   132,   287,     4,
+     235,   236,   237,   188,   188,     6,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     180,   188,     6,   183,   214,     6,   269,     4,   282,   283,
+     287,   282,   269,   282,   285,   219,   222,   269,   172,   269,
+     277,   278,   269,   269,   181,   269,   278,   269,   269,   181,
+     278,   269,   269,   275,   181,   188,   278,   276,   276,   276,
+     181,   181,   276,   276,   276,   181,   181,   181,   181,   181,
+     181,   181,   181,   275,   269,     4,   275,   279,   188,   188,
+     272,   272,   272,   269,   269,   171,   172,   188,   188,   272,
+     188,   188,   188,   171,   172,   181,   237,   272,   188,   181,
+     188,   181,   181,   181,   276,   276,   275,   181,     4,     6,
+     183,   183,   237,     6,   188,   188,   188,   276,   276,   183,
+     183,   183,   183,   185,   215,   183,     5,   134,   188,     5,
+     134,     5,   134,     5,   134,    68,    71,    74,    76,   188,
+     269,   277,   269,   189,   278,     8,   173,     6,   183,   215,
+       6,   269,   269,   269,   185,   269,   188,   134,   269,   269,
+     269,     6,     6,   237,     6,   237,   183,     6,   275,   275,
+     184,   269,   188,   188,   283,   275,     6,   183,   269,     4,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   285,   282,   285,   282,   282,   282,   275,   282,
+     282,   269,   285,   282,   269,   283,   269,   282,   282,   282,
+     287,   283,   182,     7,   213,   184,     7,   213,   214,   185,
+       7,   183,   189,    68,    71,    74,    76,   234,   269,   278,
+     269,   269,   269,   269,   269,   269,   269,   269,   269,   269,
+     269,   269,   269,   269,   269,   198,   269,     6,   183,   185,
+     182,   187,   182,   187,   187,   182,   187,   184,   187,   218,
+     184,   218,   182,   173,   187,   189,   182,   182,   269,   182,
+     189,   182,   182,   269,   189,   182,   182,     7,   269,   269,
+     189,     6,     6,     6,   269,   269,     7,     7,   262,   262,
+     269,   228,   269,   283,   229,   269,   283,   230,   269,   283,
+     231,   269,   283,   269,   269,   269,     7,   188,   182,     6,
+     188,   237,   237,   187,   187,   187,   272,   272,   236,   236,
+     187,   269,   269,   269,   269,   248,   187,   237,   269,   269,
+     269,   269,   269,     7,   263,     6,     7,   269,     6,   269,
+     269,   189,   278,   278,   278,     6,     6,   269,   269,   269,
+     269,     4,   182,   184,   188,   216,   287,    50,   269,    50,
+      50,    50,     5,   188,     5,   188,     5,   188,     5,   188,
+     278,   182,   189,   269,   188,   269,   277,   188,   216,   182,
+     182,   182,   131,   187,   237,   188,     8,   182,   184,   189,
+     189,   182,   187,   189,   213,   184,   269,   278,     6,     6,
+     269,   184,   214,   216,   216,   216,   216,   216,   216,   216,
+     216,   216,   216,   216,   187,   216,   216,   216,   216,   216,
+     216,   216,   187,   187,   187,   216,   187,   216,   216,   182,
+     182,   187,   187,   187,   187,   187,   182,   216,   271,   284,
+       6,   187,   182,   187,   182,   182,   213,   275,   185,   213,
+     214,   283,   269,     6,     4,     4,   188,   280,   184,   188,
+     188,   188,   188,   189,   189,     8,     4,   121,   122,   123,
+     124,   189,   201,   205,   208,   210,   211,   184,   269,     4,
+       6,   168,   195,   278,     6,   278,   269,     6,   282,     6,
+     287,     6,   282,     7,   269,   277,   134,     7,     7,   182,
+       7,   134,     7,     7,   182,   134,     7,     7,   269,   182,
+     189,   188,   182,   182,   269,   275,     4,   261,     6,   182,
+     182,   182,   182,   182,   182,   182,   182,   275,   278,   185,
+     237,   189,   189,   272,   269,   269,   189,   189,   269,   272,
+     187,   187,   187,    91,   101,   109,   110,   111,   115,   116,
+     117,   118,   258,   259,   272,   189,   245,   182,   189,   182,
+     182,   182,   269,     6,   269,   182,   184,   184,   189,   189,
+     189,   184,   184,   187,   184,   278,   184,   188,   189,   188,
+     188,   188,   278,   278,   278,   278,   189,     8,   278,   278,
+       7,     7,     7,   185,   269,   189,   269,   269,     7,   185,
+     188,   275,     6,   275,   213,   214,   189,   189,   184,   185,
+     214,   282,   269,   269,   269,   269,   278,   282,   275,   282,
+     282,   283,   224,   226,   269,   282,   269,     6,     4,   131,
+     132,   269,     6,     6,     6,     7,   183,   279,   281,     6,
+     278,   278,   278,   278,   216,   269,   202,   181,   181,   188,
+     212,     6,   214,   184,   168,   282,   182,   182,   187,     7,
+     272,    74,    76,   275,   275,     7,   275,    74,    76,   275,
+     275,     7,    76,   275,   275,     6,     7,     7,   278,     7,
+       7,    91,   260,     6,     7,   213,   213,   213,   213,     7,
+       7,     7,     6,   189,     4,   189,   187,   187,   187,   189,
+     189,   272,   272,   272,     4,     6,   188,     6,   181,     6,
+     119,     6,   119,     6,   119,     6,   119,   189,   259,   187,
+     258,     7,     6,     7,     7,     7,     6,   188,     6,     6,
+       6,    74,   269,     6,     6,   269,   185,   189,   269,   269,
+     269,   269,   189,   189,   189,   189,   269,   189,   189,   275,
+     275,   275,     4,   187,     8,     8,   182,     4,     4,   275,
+     189,     6,   269,     6,   216,     6,     4,     6,   216,   216,
+     216,   216,   216,   187,   182,   182,   182,   187,   187,   216,
+     225,   187,   216,   227,   182,   182,     6,     7,   213,   214,
+     185,     7,     6,   279,   269,   187,   189,   189,   189,   189,
+     189,   213,   181,   269,   269,   274,   275,   188,   185,     6,
+       6,   195,     6,   269,   188,   269,   283,     6,   188,   188,
+      84,   233,   233,   275,     6,   188,   188,     6,     6,   275,
+     188,     6,     6,     5,   275,   189,   275,   275,     4,     6,
+     275,   275,   275,   275,   275,   275,   275,   275,     7,     6,
+       7,   269,   269,   269,   188,   188,   187,   189,   187,   189,
+     187,   189,   183,   269,   275,   269,     6,     6,     6,     6,
+     269,   272,   189,     5,   188,   275,   188,   188,   188,   275,
+     278,   188,     6,   184,     4,   216,   187,   187,   187,   187,
+     216,     6,     6,   130,   269,   269,   269,     6,     6,     7,
+     187,     6,     6,   213,   214,   282,   283,     4,     4,   283,
+     269,     6,     4,   280,     6,   184,   279,     6,     6,     6,
+       6,   275,   199,   269,   187,   187,   187,   189,   200,   269,
+       4,   282,   187,   269,   283,   269,   269,   272,     6,     6,
+       6,   269,   269,     6,   269,     5,     6,   188,     6,   134,
+     232,   269,     6,     6,     6,     6,     6,     6,     4,     6,
+       6,   269,   269,   283,   189,   182,   187,   189,   236,   236,
+     272,     6,   249,   272,     6,   250,   272,     6,   251,   269,
+     189,   187,   182,   189,   187,     6,   172,   272,     6,   274,
+     272,   272,     6,   189,   269,     6,   269,   269,   269,   269,
+     275,   187,   189,     8,   189,   182,   188,   269,   283,   275,
+     275,   182,   216,   188,   275,   283,   188,   269,   283,     6,
+       6,     7,     6,   185,     6,   182,   187,   269,   269,   275,
+     188,   187,   189,     6,   269,   220,   221,   189,   189,   189,
+     189,   189,     5,   274,    72,     6,   188,   188,     6,     6,
+     188,   269,   189,   189,   187,   188,   187,   188,   187,   188,
+     184,     6,   275,     7,   188,   269,   187,   189,   187,   187,
+       6,   189,   187,   187,   187,   187,   129,   269,   269,   278,
+       6,     6,   189,     6,   223,   269,   285,   279,   132,   203,
+     269,   187,   187,   274,   269,     6,   187,   224,   226,     6,
+       6,     6,     6,     6,     6,   189,   188,   274,   278,   236,
+     187,   189,   269,   272,   258,   269,   272,   258,   269,   272,
+     258,     6,   187,   189,   275,   237,   189,   272,     6,   278,
+     272,   269,   269,   269,   269,   269,   189,   189,   189,     6,
+     187,   189,     7,   189,     6,   188,   269,   269,   189,   269,
+     189,   189,   188,   269,   189,   189,   189,   269,   189,   187,
+     189,   189,   187,   189,   189,   187,   189,   275,     6,    91,
+     189,   246,   188,   187,   189,   187,   187,   187,   187,   187,
+       6,     6,   269,   283,   200,   182,   187,     6,   188,   187,
+     269,   189,     6,    91,   264,   189,     6,   252,   269,     6,
+       6,   253,   269,     6,     6,   254,   269,     6,   189,   269,
+     258,   237,   278,     6,   272,   278,   269,   269,   269,   269,
+       7,   189,   206,   269,   274,   269,   187,   275,     6,   188,
+     189,   188,   189,   188,   189,     6,     6,   189,   189,   247,
+     189,   187,   189,   187,   187,   187,   187,   283,     6,   188,
+     182,   189,   189,   269,   258,     6,   255,   258,     6,   256,
+     258,     6,   257,   258,     6,   278,     6,   269,   269,   269,
+     269,   204,   282,   209,   188,     6,   189,   189,   188,   189,
+     188,   189,   188,   189,   189,   187,   187,   187,   187,   187,
+     189,   188,   274,     6,     6,   258,     6,   258,     6,   258,
+       6,   269,   269,   269,   269,   282,     6,   207,   282,   189,
+     189,   189,   189,   189,   189,   189,   189,   187,   189,     6,
+       6,     6,     6,   282,     6
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -3569,78 +3798,50 @@ static const yytype_uint16 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
       yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
 
-
+/* Error token number */
 #define YYTERROR	1
 #define YYERRCODE	256
 
 
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
+/* This macro is provided for backward compatibility. */
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
 /* YYLEX -- calling `yylex' with the right arguments.  */
-
 #ifdef YYLEX_PARAM
 # define YYLEX yylex (YYLEX_PARAM)
 #else
@@ -3690,6 +3891,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
     YYSTYPE const * const yyvaluep;
 #endif
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
@@ -3698,11 +3901,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 # else
   YYUSE (yyoutput);
 # endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
+  YYUSE (yytype);
 }
 
 
@@ -3739,17 +3938,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -3783,11 +3985,11 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       		       );
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
@@ -3824,7 +4026,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -3927,115 +4128,145 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULL;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -4060,44 +4291,31 @@ yydestruct (yymsg, yytype, yyvaluep)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
+  YYUSE (yytype);
 }
-

 
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
 
 
 
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
-YYSTYPE yylval;
+
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
 
 /* Number of syntax errors so far.  */
 int yynerrs;
 
 
-
 /*----------.
 | yyparse.  |
 `----------*/
@@ -4124,14 +4342,37 @@ yyparse ()
 #endif
 #endif
 {
-  
-  int yystate;
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks through separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
   int yyn;
   int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
+  /* Lookahead token as an internal (translated) token number.  */
   int yytoken = 0;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
@@ -4139,54 +4380,22 @@ yyparse ()
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-
-
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
+  yychar = YYEMPTY; /* Cause a token to be read.  */
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -4213,7 +4422,6 @@ yyparse ()
 	YYSTYPE *yyvs1 = yyvs;
 	yytype_int16 *yyss1 = yyss;
 
-
 	/* Each stack pointer address is followed by the size of the
 	   data in use in that stack, in bytes.  This used to be a
 	   conditional around just the two extra args, but that might
@@ -4221,7 +4429,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -4244,9 +4451,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -4257,7 +4463,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -4267,6 +4472,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -4275,16 +4483,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -4310,29 +4518,27 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
   goto yynewstate;
 
@@ -4369,117 +4575,138 @@ yyreduce:
   switch (yyn)
     {
         case 3:
-#line 183 "Gmsh.y"
-    { yyerrok; return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 184 "Gmsh.y"
+    { yyerrok; return 1; }
     break;
 
   case 6:
-#line 194 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 195 "Gmsh.y"
+    { return 1; }
     break;
 
   case 7:
-#line 195 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 196 "Gmsh.y"
+    { return 1; }
     break;
 
   case 8:
-#line 196 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 197 "Gmsh.y"
+    { return 1; }
     break;
 
   case 9:
-#line 197 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 198 "Gmsh.y"
+    { return 1; }
     break;
 
   case 10:
-#line 198 "Gmsh.y"
-    { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 199 "Gmsh.y"
+    { List_Delete((yyvsp[(1) - (1)].l)); return 1; }
     break;
 
   case 11:
-#line 199 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 200 "Gmsh.y"
+    { return 1; }
     break;
 
   case 12:
-#line 200 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 201 "Gmsh.y"
+    { return 1; }
     break;
 
   case 13:
-#line 201 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 202 "Gmsh.y"
+    { return 1; }
     break;
 
   case 14:
-#line 202 "Gmsh.y"
-    { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 203 "Gmsh.y"
+    { List_Delete((yyvsp[(1) - (1)].l)); return 1; }
     break;
 
   case 15:
-#line 203 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 204 "Gmsh.y"
+    { return 1; }
     break;
 
   case 16:
-#line 204 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 205 "Gmsh.y"
+    { return 1; }
     break;
 
   case 17:
-#line 205 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 206 "Gmsh.y"
+    { return 1; }
     break;
 
   case 18:
-#line 206 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 207 "Gmsh.y"
+    { return 1; }
     break;
 
   case 19:
-#line 207 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 208 "Gmsh.y"
+    { return 1; }
     break;
 
   case 20:
-#line 208 "Gmsh.y"
-    { return 1; ;}
+/* Line 1787 of yacc.c  */
+#line 209 "Gmsh.y"
+    { return 1; }
     break;
 
   case 21:
-#line 213 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 214 "Gmsh.y"
     {
       (yyval.c) = (char*)"w";
-    ;}
+    }
     break;
 
   case 22:
-#line 217 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 218 "Gmsh.y"
     {
       (yyval.c) = (char*)"a";
-    ;}
+    }
     break;
 
   case 23:
-#line 224 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 225 "Gmsh.y"
     {
       Msg::Direct((yyvsp[(3) - (5)].c));
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 24:
-#line 229 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 230 "Gmsh.y"
     {
       Msg::Error((yyvsp[(3) - (5)].c));
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
   case 25:
-#line 234 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 235 "Gmsh.y"
     {
       std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c));
       FILE *fp = Fopen(tmp.c_str(), (yyvsp[(5) - (7)].c));
@@ -4492,11 +4719,12 @@ yyreduce:
       }
       Free((yyvsp[(3) - (7)].c));
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
   case 26:
-#line 248 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 249 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (7)].c), (yyvsp[(5) - (7)].l), tmpstring);
@@ -4508,11 +4736,12 @@ yyreduce:
 	Msg::Direct(tmpstring);
       Free((yyvsp[(3) - (7)].c));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 27:
-#line 261 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 262 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (7)].c), (yyvsp[(5) - (7)].l), tmpstring);
@@ -4524,11 +4753,12 @@ yyreduce:
 	Msg::Error(tmpstring);
       Free((yyvsp[(3) - (7)].c));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
   case 28:
-#line 274 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 275 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (9)].c), (yyvsp[(5) - (9)].l), tmpstring);
@@ -4550,11 +4780,12 @@ yyreduce:
       Free((yyvsp[(3) - (9)].c));
       Free((yyvsp[(8) - (9)].c));
       List_Delete((yyvsp[(5) - (9)].l));
-    ;}
+    }
     break;
 
   case 29:
-#line 302 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 303 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){
@@ -4567,11 +4798,12 @@ yyreduce:
 	delete ViewData;
 #endif
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 30:
-#line 316 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 317 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -4583,11 +4815,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 31:
-#line 329 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 330 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -4599,11 +4832,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
   case 32:
-#line 342 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 343 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (8)].c), "View")){
@@ -4617,40 +4851,46 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(2) - (8)].c));
-    ;}
+    }
     break;
 
   case 33:
-#line 360 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 361 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData = new PViewDataList();
 #endif
-    ;}
+    }
     break;
 
   case 39:
-#line 374 "Gmsh.y"
-    { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 375 "Gmsh.y"
+    { ViewCoord.push_back((yyvsp[(1) - (1)].d)); }
     break;
 
   case 40:
-#line 376 "Gmsh.y"
-    { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 377 "Gmsh.y"
+    { ViewCoord.push_back((yyvsp[(3) - (3)].d)); }
     break;
 
   case 41:
-#line 381 "Gmsh.y"
-    { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 382 "Gmsh.y"
+    { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); }
     break;
 
   case 42:
-#line 383 "Gmsh.y"
-    { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 384 "Gmsh.y"
+    { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); }
     break;
 
   case 43:
-#line 388 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 389 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strncmp((yyvsp[(1) - (1)].c), "SP", 2)){
@@ -4753,11 +4993,12 @@ yyreduce:
 #endif
       ViewCoord.clear();
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 44:
-#line 492 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 493 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(ViewValueList){
@@ -4766,40 +5007,44 @@ yyreduce:
 	    ViewValueList->push_back(ViewCoord[3 * j + i]);
       }
 #endif
-    ;}
+    }
     break;
 
   case 45:
-#line 502 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 503 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(ViewValueList) (*ViewNumList)++;
 #endif
-    ;}
+    }
     break;
 
   case 46:
-#line 511 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 512 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]);
 #endif
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 47:
-#line 518 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 519 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]);
 #endif
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 48:
-#line 528 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 529 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->T2D.push_back((yyvsp[(3) - (8)].d));
@@ -4807,60 +5052,66 @@ yyreduce:
       ViewData->T2D.push_back((yyvsp[(7) - (8)].d));
       ViewData->T2D.push_back(ViewData->T2C.size());
 #endif
-    ;}
+    }
     break;
 
   case 49:
-#line 537 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 538 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->NbT2++;
 #endif
-    ;}
+    }
     break;
 
   case 50:
-#line 546 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 547 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]);
 #endif
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
   case 51:
-#line 553 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 554 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]);
 #endif
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
   case 52:
-#line 563 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 564 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->T3D.push_back((yyvsp[(3) - (10)].d)); ViewData->T3D.push_back((yyvsp[(5) - (10)].d));
       ViewData->T3D.push_back((yyvsp[(7) - (10)].d)); ViewData->T3D.push_back((yyvsp[(9) - (10)].d));
       ViewData->T3D.push_back(ViewData->T3C.size());
 #endif
-    ;}
+    }
     break;
 
   case 53:
-#line 571 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 572 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewData->NbT3++;
 #endif
-    ;}
+    }
     break;
 
   case 54:
-#line 581 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 582 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       int type =
@@ -4875,11 +5126,12 @@ yyreduce:
       ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)),
                                          ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l)));
 #endif
-    ;}
+    }
     break;
 
   case 55:
-#line 600 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 601 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       int type =
@@ -4894,81 +5146,95 @@ yyreduce:
                                          ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)),
                                          ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l)));
 #endif
-    ;}
+    }
     break;
 
   case 56:
-#line 619 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 620 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       ViewValueList = &ViewData->Time;
 #endif
-    ;}
+    }
     break;
 
   case 57:
-#line 625 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 626 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
   case 58:
-#line 632 "Gmsh.y"
-    { (yyval.i) = 0; ;}
+/* Line 1787 of yacc.c  */
+#line 633 "Gmsh.y"
+    { (yyval.i) = 0; }
     break;
 
   case 59:
-#line 633 "Gmsh.y"
-    { (yyval.i) = 1; ;}
+/* Line 1787 of yacc.c  */
+#line 634 "Gmsh.y"
+    { (yyval.i) = 1; }
     break;
 
   case 60:
-#line 634 "Gmsh.y"
-    { (yyval.i) = 2; ;}
+/* Line 1787 of yacc.c  */
+#line 635 "Gmsh.y"
+    { (yyval.i) = 2; }
     break;
 
   case 61:
-#line 635 "Gmsh.y"
-    { (yyval.i) = 3; ;}
+/* Line 1787 of yacc.c  */
+#line 636 "Gmsh.y"
+    { (yyval.i) = 3; }
     break;
 
   case 62:
-#line 636 "Gmsh.y"
-    { (yyval.i) = 4; ;}
+/* Line 1787 of yacc.c  */
+#line 637 "Gmsh.y"
+    { (yyval.i) = 4; }
     break;
 
   case 63:
-#line 640 "Gmsh.y"
-    { (yyval.i) = 1; ;}
+/* Line 1787 of yacc.c  */
+#line 641 "Gmsh.y"
+    { (yyval.i) = 1; }
     break;
 
   case 64:
-#line 641 "Gmsh.y"
-    { (yyval.i) = -1; ;}
+/* Line 1787 of yacc.c  */
+#line 642 "Gmsh.y"
+    { (yyval.i) = -1; }
     break;
 
   case 65:
-#line 647 "Gmsh.y"
-    { (yyval.c) = (char*)"("; ;}
+/* Line 1787 of yacc.c  */
+#line 648 "Gmsh.y"
+    { (yyval.c) = (char*)"("; }
     break;
 
   case 66:
-#line 647 "Gmsh.y"
-    { (yyval.c) = (char*)"["; ;}
+/* Line 1787 of yacc.c  */
+#line 648 "Gmsh.y"
+    { (yyval.c) = (char*)"["; }
     break;
 
   case 67:
-#line 648 "Gmsh.y"
-    { (yyval.c) = (char*)")"; ;}
+/* Line 1787 of yacc.c  */
+#line 649 "Gmsh.y"
+    { (yyval.c) = (char*)")"; }
     break;
 
   case 68:
-#line 648 "Gmsh.y"
-    { (yyval.c) = (char*)"]"; ;}
+/* Line 1787 of yacc.c  */
+#line 649 "Gmsh.y"
+    { (yyval.c) = (char*)"]"; }
     break;
 
   case 71:
-#line 657 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 658 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c)) && (yyvsp[(2) - (4)].i) && List_Nbr((yyvsp[(3) - (4)].l)) == 1){
         yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (4)].c));
@@ -5027,11 +5293,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (4)].c));
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
   case 72:
-#line 718 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 719 "Gmsh.y"
     {
       gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]);
       s.list = true;
@@ -5059,55 +5326,94 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
   case 73:
-#line 747 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 748 "Gmsh.y"
     {
-      assignVariable((yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(5) - (7)].i), (yyvsp[(6) - (7)].d));
-      Free((yyvsp[(1) - (7)].c));
-    ;}
+      gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]);
+      s.list = true;
+      double d;
+      switch((yyvsp[(4) - (6)].i)){
+      case 0: // affect
+        s.value.clear(); // fall-through
+      case 1: // append
+        for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){
+          List_Read((yyvsp[(5) - (6)].l), i, &d);
+          s.value.push_back(d);
+        }
+        break;
+      case 2: // remove
+        for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){
+          List_Read((yyvsp[(5) - (6)].l), i, &d);
+          std::vector<double>::iterator it = std::find(s.value.begin(),
+                                                       s.value.end(), d);
+          if(it != s.value.end()) s.value.erase(it);
+        }
+        break;
+      default:
+        yymsg(0, "Operators *= and /= not available for lists");
+        break;
+      }
+      Free((yyvsp[(1) - (6)].c));
+      List_Delete((yyvsp[(5) - (6)].l));
+    }
     break;
 
   case 74:
-#line 752 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 777 "Gmsh.y"
     {
       assignVariable((yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(5) - (7)].i), (yyvsp[(6) - (7)].d));
       Free((yyvsp[(1) - (7)].c));
-    ;}
+    }
     break;
 
   case 75:
-#line 757 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 782 "Gmsh.y"
     {
       assignVariable((yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(5) - (7)].i), (yyvsp[(6) - (7)].d));
       Free((yyvsp[(1) - (7)].c));
-    ;}
+    }
     break;
 
   case 76:
-#line 762 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 787 "Gmsh.y"
+    {
+      assignVariable((yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(5) - (7)].i), (yyvsp[(6) - (7)].d));
+      Free((yyvsp[(1) - (7)].c));
+    }
+    break;
+
+  case 77:
+/* Line 1787 of yacc.c  */
+#line 792 "Gmsh.y"
     {
       assignVariables((yyvsp[(1) - (9)].c), (yyvsp[(4) - (9)].l), (yyvsp[(7) - (9)].i), (yyvsp[(8) - (9)].l));
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(4) - (9)].l));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
-  case 77:
-#line 769 "Gmsh.y"
+  case 78:
+/* Line 1787 of yacc.c  */
+#line 799 "Gmsh.y"
     {
       assignVariables((yyvsp[(1) - (9)].c), (yyvsp[(4) - (9)].l), (yyvsp[(7) - (9)].i), (yyvsp[(8) - (9)].l));
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(4) - (9)].l));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
-  case 78:
-#line 776 "Gmsh.y"
+  case 79:
+/* Line 1787 of yacc.c  */
+#line 806 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
@@ -5121,54 +5427,60 @@ yyreduce:
           yymsg(0, "Variable '%s' is a list", (yyvsp[(1) - (3)].c));
       }
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
-  case 79:
-#line 791 "Gmsh.y"
+  case 80:
+/* Line 1787 of yacc.c  */
+#line 821 "Gmsh.y"
     {
       incrementVariable((yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].i));
       Free((yyvsp[(1) - (6)].c));
-    ;}
+    }
     break;
 
-  case 80:
-#line 796 "Gmsh.y"
+  case 81:
+/* Line 1787 of yacc.c  */
+#line 826 "Gmsh.y"
     {
       incrementVariable((yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].i));
       Free((yyvsp[(1) - (6)].c));
-    ;}
+    }
     break;
 
-  case 81:
-#line 801 "Gmsh.y"
+  case 82:
+/* Line 1787 of yacc.c  */
+#line 831 "Gmsh.y"
     {
       gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c));
       Free((yyvsp[(1) - (4)].c));
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 82:
-#line 810 "Gmsh.y"
+  case 83:
+/* Line 1787 of yacc.c  */
+#line 840 "Gmsh.y"
     {
       std::string tmp((yyvsp[(5) - (6)].c));
       StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), tmp);
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
-  case 83:
-#line 816 "Gmsh.y"
+  case 84:
+/* Line 1787 of yacc.c  */
+#line 846 "Gmsh.y"
     {
       std::string tmp((yyvsp[(8) - (9)].c));
       StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), tmp);
       Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c));
-    ;}
+    }
     break;
 
-  case 84:
-#line 825 "Gmsh.y"
+  case 85:
+/* Line 1787 of yacc.c  */
+#line 855 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d)){
@@ -5185,11 +5497,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d);
       }
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c));
-    ;}
+    }
     break;
 
-  case 85:
-#line 843 "Gmsh.y"
+  case 86:
+/* Line 1787 of yacc.c  */
+#line 873 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d)){
@@ -5206,11 +5519,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d);
       }
       Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
-  case 86:
-#line 861 "Gmsh.y"
+  case 87:
+/* Line 1787 of yacc.c  */
+#line 891 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d)){
@@ -5218,11 +5532,12 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d);
       }
       Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
-  case 87:
-#line 870 "Gmsh.y"
+  case 88:
+/* Line 1787 of yacc.c  */
+#line 900 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d)){
@@ -5230,27 +5545,30 @@ yyreduce:
 	NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d);
       }
       Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c));
-    ;}
+    }
     break;
 
-  case 88:
-#line 882 "Gmsh.y"
+  case 89:
+/* Line 1787 of yacc.c  */
+#line 912 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u));
       Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c));
-    ;}
+    }
     break;
 
-  case 89:
-#line 887 "Gmsh.y"
+  case 90:
+/* Line 1787 of yacc.c  */
+#line 917 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u));
       Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c));
-    ;}
+    }
     break;
 
-  case 90:
-#line 895 "Gmsh.y"
+  case 91:
+/* Line 1787 of yacc.c  */
+#line 925 "Gmsh.y"
     {
       GmshColorTable *ct = GetColorTable(0);
       if(!ct)
@@ -5269,11 +5587,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
-  case 91:
-#line 915 "Gmsh.y"
+  case 92:
+/* Line 1787 of yacc.c  */
+#line 945 "Gmsh.y"
     {
       GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d));
       if(!ct)
@@ -5292,11 +5611,12 @@ yyreduce:
       }
       Free((yyvsp[(1) - (9)].c));
       List_Delete((yyvsp[(8) - (9)].l));
-    ;}
+    }
     break;
 
-  case 92:
-#line 938 "Gmsh.y"
+  case 93:
+/* Line 1787 of yacc.c  */
+#line 968 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       if(!strcmp((yyvsp[(1) - (5)].c),"Background"))
@@ -5306,22 +5626,24 @@ yyreduce:
       else
 	yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c));
 #endif
-    ;}
+    }
     break;
 
-  case 93:
-#line 949 "Gmsh.y"
+  case 94:
+/* Line 1787 of yacc.c  */
+#line 979 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       if(!GModel::current()->getFields()->newField((int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)))
 	yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c));
 #endif
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
-  case 94:
-#line 957 "Gmsh.y"
+  case 95:
+/* Line 1787 of yacc.c  */
+#line 987 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
@@ -5342,11 +5664,12 @@ yyreduce:
 	yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d));
 #endif
       Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
-  case 95:
-#line 979 "Gmsh.y"
+  case 96:
+/* Line 1787 of yacc.c  */
+#line 1009 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
@@ -5368,11 +5691,12 @@ yyreduce:
 #endif
       Free((yyvsp[(6) - (9)].c));
       Free((yyvsp[(8) - (9)].c));
-    ;}
+    }
     break;
 
-  case 96:
-#line 1002 "Gmsh.y"
+  case 97:
+/* Line 1787 of yacc.c  */
+#line 1032 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (11)].d));
@@ -5397,11 +5721,12 @@ yyreduce:
 #endif
       Free((yyvsp[(6) - (11)].c));
       List_Delete((yyvsp[(9) - (11)].l));
-    ;}
+    }
     break;
 
-  case 97:
-#line 1028 "Gmsh.y"
+  case 98:
+/* Line 1787 of yacc.c  */
+#line 1058 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (7)].d));
@@ -5418,11 +5743,12 @@ yyreduce:
 	yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (7)].d));
 #endif
       Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
-  case 98:
-#line 1049 "Gmsh.y"
+  case 99:
+/* Line 1787 of yacc.c  */
+#line 1079 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
       try {
@@ -5433,11 +5759,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
-  case 99:
-#line 1061 "Gmsh.y"
+  case 100:
+/* Line 1787 of yacc.c  */
+#line 1091 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
       try {
@@ -5448,11 +5775,12 @@ yyreduce:
       }
 #endif
       Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c));
-    ;}
+    }
     break;
 
-  case 103:
-#line 1079 "Gmsh.y"
+  case 104:
+/* Line 1787 of yacc.c  */
+#line 1109 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (3)].c));
       std::vector<double> val(1, 0.);
@@ -5460,11 +5788,12 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 104:
-#line 1088 "Gmsh.y"
+  case 105:
+/* Line 1787 of yacc.c  */
+#line 1118 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (5)].c));
       std::vector<double> val(1, (yyvsp[(5) - (5)].d));
@@ -5472,16 +5801,18 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (5)].c));
-    ;}
+    }
     break;
 
-  case 105:
-#line 1097 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+  case 106:
+/* Line 1787 of yacc.c  */
+#line 1127 "Gmsh.y"
+    { floatOptions.clear(); charOptions.clear(); }
     break;
 
-  case 106:
-#line 1099 "Gmsh.y"
+  case 107:
+/* Line 1787 of yacc.c  */
+#line 1129 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (9)].c));
       std::vector<double> val(1, (yyvsp[(6) - (9)].d));
@@ -5490,11 +5821,12 @@ yyreduce:
         gmsh_yysymbols[key].value = val;
       }
       Free((yyvsp[(3) - (9)].c));
-    ;}
+    }
     break;
 
-  case 107:
-#line 1109 "Gmsh.y"
+  case 108:
+/* Line 1787 of yacc.c  */
+#line 1139 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (5)].c)), val((yyvsp[(5) - (5)].c));
       if(!gmsh_yystringsymbols.count(key)){
@@ -5502,16 +5834,18 @@ yyreduce:
       }
       Free((yyvsp[(3) - (5)].c));
       Free((yyvsp[(5) - (5)].c));
-    ;}
+    }
     break;
 
-  case 108:
-#line 1118 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+  case 109:
+/* Line 1787 of yacc.c  */
+#line 1148 "Gmsh.y"
+    { floatOptions.clear(); charOptions.clear(); }
     break;
 
-  case 109:
-#line 1120 "Gmsh.y"
+  case 110:
+/* Line 1787 of yacc.c  */
+#line 1150 "Gmsh.y"
     {
       std::string key((yyvsp[(3) - (9)].c)), val((yyvsp[(6) - (9)].c));
       if(!gmsh_yysymbols.count(key)){
@@ -5520,37 +5854,41 @@ yyreduce:
       }
       Free((yyvsp[(3) - (9)].c));
       Free((yyvsp[(6) - (9)].c));
-    ;}
+    }
     break;
 
-  case 111:
-#line 1134 "Gmsh.y"
+  case 112:
+/* Line 1787 of yacc.c  */
+#line 1164 "Gmsh.y"
     {
       std::string name((yyvsp[(3) - (3)].c));
       Msg::UndefineOnelabParameter(name);
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 112:
-#line 1142 "Gmsh.y"
+  case 113:
+/* Line 1787 of yacc.c  */
+#line 1172 "Gmsh.y"
     {
       (yyval.l) = List_Create(20,20,sizeof(doubleXstring));
       doubleXstring v = {(yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].c)};
       List_Add((yyval.l), &v);
-    ;}
+    }
     break;
 
-  case 113:
-#line 1148 "Gmsh.y"
+  case 114:
+/* Line 1787 of yacc.c  */
+#line 1178 "Gmsh.y"
     {
       doubleXstring v = {(yyvsp[(3) - (5)].d), (yyvsp[(5) - (5)].c)};
       List_Add((yyval.l), &v);
-    ;}
+    }
     break;
 
-  case 116:
-#line 1160 "Gmsh.y"
+  case 117:
+/* Line 1787 of yacc.c  */
+#line 1190 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
@@ -5560,11 +5898,12 @@ yyreduce:
       }
       Free((yyvsp[(2) - (3)].c));
       List_Delete((yyvsp[(3) - (3)].l));
-    ;}
+    }
     break;
 
-  case 117:
-#line 1171 "Gmsh.y"
+  case 118:
+/* Line 1787 of yacc.c  */
+#line 1201 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (5)].c));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -5577,43 +5916,47 @@ yyreduce:
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++)
         Free(((doubleXstring*)List_Pointer((yyvsp[(4) - (5)].l), i))->s);
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 118:
-#line 1186 "Gmsh.y"
+  case 119:
+/* Line 1787 of yacc.c  */
+#line 1216 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
       std::string val((yyvsp[(3) - (3)].c));
       charOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 121:
-#line 1202 "Gmsh.y"
+  case 122:
+/* Line 1787 of yacc.c  */
+#line 1232 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
       double val = (yyvsp[(3) - (3)].d);
       floatOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 122:
-#line 1210 "Gmsh.y"
+  case 123:
+/* Line 1787 of yacc.c  */
+#line 1240 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (3)].c));
       std::string val((yyvsp[(3) - (3)].c));
       charOptions[key].push_back(val);
       Free((yyvsp[(2) - (3)].c));
       Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 123:
-#line 1219 "Gmsh.y"
+  case 124:
+/* Line 1787 of yacc.c  */
+#line 1249 "Gmsh.y"
     {
       std::string key((yyvsp[(2) - (5)].c));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -5625,35 +5968,92 @@ yyreduce:
       }
       Free((yyvsp[(2) - (5)].c));
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 124:
-#line 1237 "Gmsh.y"
+  case 125:
+/* Line 1787 of yacc.c  */
+#line 1267 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(1) - (1)].d);
-    ;}
+    }
     break;
 
-  case 125:
-#line 1241 "Gmsh.y"
+  case 126:
+/* Line 1787 of yacc.c  */
+#line 1271 "Gmsh.y"
     {
       (yyval.i) = GModel::current()->setPhysicalName
-        (std::string((yyvsp[(1) - (1)].c)), curPhysDim,
-         ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+        (std::string((yyvsp[(1) - (1)].c)), 0, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
-  case 126:
-#line 1251 "Gmsh.y"
+  case 127:
+/* Line 1787 of yacc.c  */
+#line 1280 "Gmsh.y"
+    {
+      (yyval.i) = (int)(yyvsp[(1) - (1)].d);
+    }
+    break;
+
+  case 128:
+/* Line 1787 of yacc.c  */
+#line 1284 "Gmsh.y"
+    {
+      (yyval.i) = GModel::current()->setPhysicalName
+        (std::string((yyvsp[(1) - (1)].c)), 1, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free((yyvsp[(1) - (1)].c));
+    }
+    break;
+
+  case 129:
+/* Line 1787 of yacc.c  */
+#line 1293 "Gmsh.y"
+    {
+      (yyval.i) = (int)(yyvsp[(1) - (1)].d);
+    }
+    break;
+
+  case 130:
+/* Line 1787 of yacc.c  */
+#line 1297 "Gmsh.y"
+    {
+      (yyval.i) = GModel::current()->setPhysicalName
+        (std::string((yyvsp[(1) - (1)].c)), 2, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free((yyvsp[(1) - (1)].c));
+    }
+    break;
+
+  case 131:
+/* Line 1787 of yacc.c  */
+#line 1306 "Gmsh.y"
+    {
+      (yyval.i) = (int)(yyvsp[(1) - (1)].d);
+    }
+    break;
+
+  case 132:
+/* Line 1787 of yacc.c  */
+#line 1310 "Gmsh.y"
+    {
+      (yyval.i) = GModel::current()->setPhysicalName
+        (std::string((yyvsp[(1) - (1)].c)), 3, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free((yyvsp[(1) - (1)].c));
+    }
+    break;
+
+  case 133:
+/* Line 1787 of yacc.c  */
+#line 1319 "Gmsh.y"
     {
       (yyval.l) = 0;
-    ;}
+    }
     break;
 
-  case 127:
-#line 1255 "Gmsh.y"
+  case 134:
+/* Line 1787 of yacc.c  */
+#line 1323 "Gmsh.y"
     {
       (yyval.l) = List_Create(1, 1, sizeof(Vertex*));
       Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d));
@@ -5662,25 +6062,28 @@ yyreduce:
       else{
 	List_Add((yyval.l), &v);
       }
-    ;}
+    }
     break;
 
-  case 128:
-#line 1267 "Gmsh.y"
+  case 135:
+/* Line 1787 of yacc.c  */
+#line 1335 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
-    ;}
+    }
     break;
 
-  case 129:
-#line 1271 "Gmsh.y"
+  case 136:
+/* Line 1787 of yacc.c  */
+#line 1339 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
-  case 130:
-#line 1281 "Gmsh.y"
+  case 137:
+/* Line 1787 of yacc.c  */
+#line 1349 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindPoint(num)){
@@ -5702,44 +6105,56 @@ yyreduce:
       }
       (yyval.s).Type = MSH_POINT;
       (yyval.s).Num = num;
-    ;}
-    break;
-
-  case 131:
-#line 1304 "Gmsh.y"
-    {
-      curPhysDim = 0;
-    ;}
+    }
     break;
 
-  case 132:
-#line 1308 "Gmsh.y"
+  case 138:
+/* Line 1787 of yacc.c  */
+#line 1372 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(5) - (9)].i);
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){
+      int num = (int)(yyvsp[(4) - (8)].i);
+      int op = (yyvsp[(6) - (8)].i);
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_POINT);
+      if(p && op == 0){
 	yymsg(0, "Physical point %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical point %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete((yyvsp[(8) - (9)].l));
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
+          double d;
+          List_Read((yyvsp[(7) - (8)].l), i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical point %d", num);
+      }
+      List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_PHYSICAL_POINT;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 133:
-#line 1324 "Gmsh.y"
+  case 139:
+/* Line 1787 of yacc.c  */
+#line 1404 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
 	List_Read((yyvsp[(3) - (6)].l), i, &d);
 	Vertex *v = FindPoint((int)d);
-	if(v)
+	if(v){
 	  v->lc = (yyvsp[(5) - (6)].d);
+        }
 	else{
 	  GVertex *gv = GModel::current()->getVertexByTag((int)d);
 	  if(gv)
@@ -5750,11 +6165,12 @@ yyreduce:
       // dummy values
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
-  case 134:
-#line 1346 "Gmsh.y"
+  case 140:
+/* Line 1787 of yacc.c  */
+#line 1427 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -5771,11 +6187,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_LINE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 135:
-#line 1364 "Gmsh.y"
+  case 141:
+/* Line 1787 of yacc.c  */
+#line 1445 "Gmsh.y"
     {
       for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	double dnum;
@@ -5795,11 +6212,12 @@ yyreduce:
 	  }
 	}
       }
-    ;}
+    }
     break;
 
-  case 136:
-#line 1385 "Gmsh.y"
+  case 142:
+/* Line 1787 of yacc.c  */
+#line 1466 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -5816,11 +6234,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_SPLN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 137:
-#line 1403 "Gmsh.y"
+  case 143:
+/* Line 1787 of yacc.c  */
+#line 1484 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
       if(FindCurve(num)){
@@ -5849,11 +6268,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (8)].l));
       (yyval.s).Type = MSH_SEGM_CIRC;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 138:
-#line 1433 "Gmsh.y"
+  case 144:
+/* Line 1787 of yacc.c  */
+#line 1514 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
       if(FindCurve(num)){
@@ -5882,11 +6302,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (8)].l));
       (yyval.s).Type = MSH_SEGM_ELLI;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 139:
-#line 1463 "Gmsh.y"
+  case 145:
+/* Line 1787 of yacc.c  */
+#line 1544 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -5903,11 +6324,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_BSPLN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 140:
-#line 1481 "Gmsh.y"
+  case 146:
+/* Line 1787 of yacc.c  */
+#line 1562 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -5924,11 +6346,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_SEGM_BEZIER;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 141:
-#line 1500 "Gmsh.y"
+  case 147:
+/* Line 1787 of yacc.c  */
+#line 1581 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (11)].d);
       if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){
@@ -5953,11 +6376,12 @@ yyreduce:
       List_Delete((yyvsp[(8) - (11)].l));
       (yyval.s).Type = MSH_SEGM_NURBS;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 142:
-#line 1526 "Gmsh.y"
+  case 148:
+/* Line 1787 of yacc.c  */
+#line 1607 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindEdgeLoop(num)){
@@ -5974,11 +6398,12 @@ yyreduce:
       Free((yyvsp[(2) - (8)].c));
       (yyval.s).Type = MSH_SEGM_LOOP;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 143:
-#line 1544 "Gmsh.y"
+  case 149:
+/* Line 1787 of yacc.c  */
+#line 1625 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindCurve(num)){
@@ -5995,37 +6420,48 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SEGM_COMPOUND;
       (yyval.s).Num = num;
-    ;}
-    break;
-
-  case 144:
-#line 1562 "Gmsh.y"
-    {
-      curPhysDim = 1;
-    ;}
+    }
     break;
 
-  case 145:
-#line 1566 "Gmsh.y"
+  case 150:
+/* Line 1787 of yacc.c  */
+#line 1643 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(5) - (9)].i);
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){
+      int num = (int)(yyvsp[(4) - (8)].i);
+      int op = (yyvsp[(6) - (8)].i);
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_LINE);
+      if(p && op == 0){
 	yymsg(0, "Physical line %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical line %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete((yyvsp[(8) - (9)].l));
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
+          double d;
+          List_Read((yyvsp[(7) - (8)].l), i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical line %d", num);
+      }
+      List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_PHYSICAL_LINE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 146:
-#line 1585 "Gmsh.y"
+  case 151:
+/* Line 1787 of yacc.c  */
+#line 1678 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurface(num)){
@@ -6042,11 +6478,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SURF_PLAN;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 147:
-#line 1603 "Gmsh.y"
+  case 152:
+/* Line 1787 of yacc.c  */
+#line 1696 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (9)].d), type = 0;
       if(FindSurface(num)){
@@ -6084,39 +6521,43 @@ yyreduce:
       List_Delete((yyvsp[(7) - (9)].l));
       (yyval.s).Type = type;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 148:
-#line 1642 "Gmsh.y"
+  case 153:
+/* Line 1787 of yacc.c  */
+#line 1735 "Gmsh.y"
     {
       myGmshSurface = 0;
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
-  case 149:
-#line 1648 "Gmsh.y"
+  case 154:
+/* Line 1787 of yacc.c  */
+#line 1741 "Gmsh.y"
     {
       myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d));
       (yyval.s).Type = 0;
       (yyval.s).Num = 0;
-    ;}
+    }
     break;
 
-  case 150:
-#line 1654 "Gmsh.y"
+  case 155:
+/* Line 1787 of yacc.c  */
+#line 1747 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (10)].d);
       myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c));
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 151:
-#line 1661 "Gmsh.y"
+  case 156:
+/* Line 1787 of yacc.c  */
+#line 1754 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
@@ -6140,11 +6581,12 @@ yyreduce:
       }
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 152:
-#line 1686 "Gmsh.y"
+  case 157:
+/* Line 1787 of yacc.c  */
+#line 1779 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
@@ -6168,11 +6610,12 @@ yyreduce:
       }
       (yyval.s).Type = 0;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 153:
-#line 1711 "Gmsh.y"
+  case 158:
+/* Line 1787 of yacc.c  */
+#line 1804 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurfaceLoop(num)){
@@ -6188,11 +6631,12 @@ yyreduce:
       Free((yyvsp[(2) - (8)].c));
       (yyval.s).Type = MSH_SURF_LOOP;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 154:
-#line 1728 "Gmsh.y"
+  case 159:
+/* Line 1787 of yacc.c  */
+#line 1821 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurface(num)){
@@ -6210,11 +6654,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_SURF_COMPOUND;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 155:
-#line 1748 "Gmsh.y"
+  case 160:
+/* Line 1787 of yacc.c  */
+#line 1841 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (12)].d);
       if(FindSurface(num)){
@@ -6246,37 +6691,48 @@ yyreduce:
       Free((yyvsp[(8) - (12)].c));
       (yyval.s).Type = MSH_SURF_COMPOUND;
       (yyval.s).Num = num;
-    ;}
-    break;
-
-  case 156:
-#line 1781 "Gmsh.y"
-    {
-      curPhysDim = 2;
-    ;}
+    }
     break;
 
-  case 157:
-#line 1785 "Gmsh.y"
+  case 161:
+/* Line 1787 of yacc.c  */
+#line 1874 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(5) - (9)].i);
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
+      int num = (int)(yyvsp[(4) - (8)].i);
+      int op = (yyvsp[(6) - (8)].i);
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE);
+      if(p && op == 0){
 	yymsg(0, "Physical surface %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical surface %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete((yyvsp[(8) - (9)].l));
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
+          double d;
+          List_Read((yyvsp[(7) - (8)].l), i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical surface %d", num);
+      }
+      List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_PHYSICAL_SURFACE;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 158:
-#line 1805 "Gmsh.y"
+  case 162:
+/* Line 1787 of yacc.c  */
+#line 1910 "Gmsh.y"
     {
       yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -6293,11 +6749,12 @@ yyreduce:
       List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 159:
-#line 1823 "Gmsh.y"
+  case 163:
+/* Line 1787 of yacc.c  */
+#line 1928 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindVolume(num)){
@@ -6313,11 +6770,12 @@ yyreduce:
       List_Delete((yyvsp[(6) - (7)].l));
       (yyval.s).Type = MSH_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 160:
-#line 1840 "Gmsh.y"
+  case 164:
+/* Line 1787 of yacc.c  */
+#line 1945 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindVolume(num)){
@@ -6329,80 +6787,96 @@ yyreduce:
           v->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
 	Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
       }
-      List_Delete((yyvsp[(7) - (8)].l));
-      (yyval.s).Type = MSH_VOLUME_COMPOUND;
-      (yyval.s).Num = num;
-    ;}
-    break;
-
-  case 161:
-#line 1856 "Gmsh.y"
-    {
-      curPhysDim = 3;
-    ;}
+      List_Delete((yyvsp[(7) - (8)].l));
+      (yyval.s).Type = MSH_VOLUME_COMPOUND;
+      (yyval.s).Num = num;
+    }
     break;
 
-  case 162:
-#line 1860 "Gmsh.y"
+  case 165:
+/* Line 1787 of yacc.c  */
+#line 1961 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(5) - (9)].i);
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
+      int num = (int)(yyvsp[(4) - (8)].i);
+      int op = (yyvsp[(6) - (8)].i);
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME);
+      if(p && op == 0){
 	yymsg(0, "Physical volume %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical volume %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete((yyvsp[(8) - (9)].l));
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
+          double d;
+          List_Read((yyvsp[(7) - (8)].l), i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical volume %d", num);
+      }
+      List_Delete((yyvsp[(7) - (8)].l));
       (yyval.s).Type = MSH_PHYSICAL_VOLUME;
       (yyval.s).Num = num;
-    ;}
+    }
     break;
 
-  case 163:
-#line 1882 "Gmsh.y"
+  case 166:
+/* Line 1787 of yacc.c  */
+#line 1998 "Gmsh.y"
     {
       TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
-    ;}
+    }
     break;
 
-  case 164:
-#line 1887 "Gmsh.y"
+  case 167:
+/* Line 1787 of yacc.c  */
+#line 2003 "Gmsh.y"
     {
       RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l));
       (yyval.l) = (yyvsp[(10) - (11)].l);
-    ;}
+    }
     break;
 
-  case 165:
-#line 1892 "Gmsh.y"
+  case 168:
+/* Line 1787 of yacc.c  */
+#line 2008 "Gmsh.y"
     {
       SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
-    ;}
+    }
     break;
 
-  case 166:
-#line 1897 "Gmsh.y"
+  case 169:
+/* Line 1787 of yacc.c  */
+#line 2013 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(5) - (9)].d), (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
-    ;}
+    }
     break;
 
-  case 167:
-#line 1902 "Gmsh.y"
+  case 170:
+/* Line 1787 of yacc.c  */
+#line 2018 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].v)[0], (yyvsp[(5) - (9)].v)[1], (yyvsp[(5) - (9)].v)[2], (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
-    ;}
+    }
     break;
 
-  case 168:
-#line 1907 "Gmsh.y"
+  case 171:
+/* Line 1787 of yacc.c  */
+#line 2023 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
       if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){
@@ -6424,55 +6898,62 @@ yyreduce:
       }
       Free((yyvsp[(1) - (4)].c));
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
-  case 169:
-#line 1930 "Gmsh.y"
+  case 172:
+/* Line 1787 of yacc.c  */
+#line 2046 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
       List_Delete((yyvsp[(4) - (9)].l));
-    ;}
+    }
     break;
 
-  case 170:
-#line 1936 "Gmsh.y"
+  case 173:
+/* Line 1787 of yacc.c  */
+#line 2052 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape*));
       List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
       List_Delete((yyvsp[(7) - (9)].l));
       SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l));
       List_Delete(tmp);
-    ;}
+    }
     break;
 
-  case 171:
-#line 1946 "Gmsh.y"
-    { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
+  case 174:
+/* Line 1787 of yacc.c  */
+#line 2062 "Gmsh.y"
+    { (yyval.l) = (yyvsp[(1) - (1)].l); }
     break;
 
-  case 172:
-#line 1947 "Gmsh.y"
-    { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
+  case 175:
+/* Line 1787 of yacc.c  */
+#line 2063 "Gmsh.y"
+    { (yyval.l) = (yyvsp[(1) - (1)].l); }
     break;
 
-  case 173:
-#line 1952 "Gmsh.y"
+  case 176:
+/* Line 1787 of yacc.c  */
+#line 2068 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
-    ;}
+    }
     break;
 
-  case 174:
-#line 1956 "Gmsh.y"
+  case 177:
+/* Line 1787 of yacc.c  */
+#line 2072 "Gmsh.y"
     {
       List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
-    ;}
+    }
     break;
 
-  case 175:
-#line 1960 "Gmsh.y"
+  case 178:
+/* Line 1787 of yacc.c  */
+#line 2076 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6494,11 +6975,12 @@ yyreduce:
 	    yymsg(1, "Unknown point %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
-  case 176:
-#line 1983 "Gmsh.y"
+  case 179:
+/* Line 1787 of yacc.c  */
+#line 2099 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6520,11 +7002,12 @@ yyreduce:
 	    yymsg(1, "Unknown curve %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
-  case 177:
-#line 2006 "Gmsh.y"
+  case 180:
+/* Line 1787 of yacc.c  */
+#line 2122 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6546,11 +7029,12 @@ yyreduce:
 	    yymsg(1, "Unknown surface %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
-  case 178:
-#line 2029 "Gmsh.y"
+  case 181:
+/* Line 1787 of yacc.c  */
+#line 2145 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -6572,11 +7056,12 @@ yyreduce:
 	    yymsg(1, "Unknown volume %d", TheShape.Num);
 	}
       }
-    ;}
+    }
     break;
 
-  case 179:
-#line 2057 "Gmsh.y"
+  case 182:
+/* Line 1787 of yacc.c  */
+#line 2173 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(7) - (8)].l)) == 4){
@@ -6596,11 +7081,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d));
 #endif
-    ;}
+    }
     break;
 
-  case 180:
-#line 2078 "Gmsh.y"
+  case 183:
+/* Line 1787 of yacc.c  */
+#line 2194 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       int t = (int)(yyvsp[(4) - (10)].d);
@@ -6625,11 +7111,12 @@ yyreduce:
         List_Delete(*(List_T**)List_Pointer((yyvsp[(8) - (10)].l), i));
       List_Delete((yyvsp[(8) - (10)].l));
 #endif
-    ;}
+    }
     break;
 
-  case 181:
-#line 2105 "Gmsh.y"
+  case 184:
+/* Line 1787 of yacc.c  */
+#line 2221 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(12) - (14)].l)) == 0){
@@ -6648,11 +7135,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d));
 #endif
-    ;}
+    }
     break;
 
-  case 182:
-#line 2126 "Gmsh.y"
+  case 185:
+/* Line 1787 of yacc.c  */
+#line 2242 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(14) - (16)].l)) == 0){
@@ -6672,11 +7160,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (16)].d));
 #endif
-    ;}
+    }
     break;
 
-  case 183:
-#line 2147 "Gmsh.y"
+  case 186:
+/* Line 1787 of yacc.c  */
+#line 2263 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(List_Nbr((yyvsp[(10) - (12)].l)) == 1){
@@ -6695,11 +7184,12 @@ yyreduce:
       else
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (12)].d));
 #endif
-    ;}
+    }
     break;
 
-  case 184:
-#line 2167 "Gmsh.y"
+  case 187:
+/* Line 1787 of yacc.c  */
+#line 2283 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (8)].c), "Union")){
@@ -6810,11 +7300,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d));
       Free((yyvsp[(2) - (8)].c));
 #endif
-    ;}
+    }
     break;
 
-  case 185:
-#line 2279 "Gmsh.y"
+  case 188:
+/* Line 1787 of yacc.c  */
+#line 2395 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (8)].c), "MathEval")){
@@ -6832,11 +7323,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition");
       Free((yyvsp[(2) - (8)].c)); Free((yyvsp[(7) - (8)].c));
 #endif
-    ;}
+    }
     break;
 
-  case 186:
-#line 2298 "Gmsh.y"
+  case 189:
+/* Line 1787 of yacc.c  */
+#line 2414 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (6)].c), "CutMesh")){
@@ -6873,11 +7365,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition");
       Free((yyvsp[(2) - (6)].c));
 #endif
-    ;}
+    }
     break;
 
-  case 187:
-#line 2337 "Gmsh.y"
+  case 190:
+/* Line 1787 of yacc.c  */
+#line 2453 "Gmsh.y"
     {
 #if defined(HAVE_DINTEGRATION)
       if(!strcmp((yyvsp[(2) - (14)].c), "Cylinder") && List_Nbr((yyvsp[(12) - (14)].l)) == 1){
@@ -6979,11 +7472,12 @@ yyreduce:
         yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d));
       Free((yyvsp[(2) - (14)].c));
 #endif
-    ;}
+    }
     break;
 
-  case 188:
-#line 2445 "Gmsh.y"
+  case 191:
+/* Line 1787 of yacc.c  */
+#line 2561 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -6991,20 +7485,22 @@ yyreduce:
 	DeleteShape(TheShape.Type, TheShape.Num);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
-  case 189:
-#line 2454 "Gmsh.y"
+  case 192:
+/* Line 1787 of yacc.c  */
+#line 2570 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d));
 #endif
-    ;}
+    }
     break;
 
-  case 190:
-#line 2460 "Gmsh.y"
+  case 193:
+/* Line 1787 of yacc.c  */
+#line 2576 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -7018,11 +7514,12 @@ yyreduce:
 	yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c));
 #endif
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
-  case 191:
-#line 2475 "Gmsh.y"
+  case 194:
+/* Line 1787 of yacc.c  */
+#line 2591 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
         ClearProject();
@@ -7049,11 +7546,12 @@ yyreduce:
 	  yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c));
       }
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 192:
-#line 2503 "Gmsh.y"
+  case 195:
+/* Line 1787 of yacc.c  */
+#line 2619 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){
@@ -7064,11 +7562,12 @@ yyreduce:
 	yymsg(0, "Unknown command 'Delete %s %s'", (yyvsp[(2) - (4)].c), (yyvsp[(3) - (4)].c));
 #endif
       Free((yyvsp[(2) - (4)].c)); Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 193:
-#line 2520 "Gmsh.y"
+  case 196:
+/* Line 1787 of yacc.c  */
+#line 2636 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7076,11 +7575,12 @@ yyreduce:
 	ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u), false);
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 194:
-#line 2529 "Gmsh.y"
+  case 197:
+/* Line 1787 of yacc.c  */
+#line 2645 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){
 	Shape TheShape;
@@ -7088,29 +7588,32 @@ yyreduce:
 	ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(3) - (6)].u), true);
       }
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
-  case 195:
-#line 2543 "Gmsh.y"
+  case 198:
+/* Line 1787 of yacc.c  */
+#line 2659 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 1, false);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 196:
-#line 2549 "Gmsh.y"
+  case 199:
+/* Line 1787 of yacc.c  */
+#line 2665 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 0, false);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 197:
-#line 2555 "Gmsh.y"
+  case 200:
+/* Line 1787 of yacc.c  */
+#line 2671 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -7118,11 +7621,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 1, false);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
-  case 198:
-#line 2564 "Gmsh.y"
+  case 201:
+/* Line 1787 of yacc.c  */
+#line 2680 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7130,11 +7634,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 1, true);
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 199:
-#line 2573 "Gmsh.y"
+  case 202:
+/* Line 1787 of yacc.c  */
+#line 2689 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -7142,11 +7647,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 0, false);
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
-  case 200:
-#line 2582 "Gmsh.y"
+  case 203:
+/* Line 1787 of yacc.c  */
+#line 2698 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -7154,11 +7660,12 @@ yyreduce:
 	VisibilityShape(TheShape.Type, TheShape.Num, 0, true);
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 201:
-#line 2596 "Gmsh.y"
+  case 204:
+/* Line 1787 of yacc.c  */
+#line 2712 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
         std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c));
@@ -7206,15 +7713,41 @@ yyreduce:
         std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c));
 	CreateSingleDir(tmp);
       }
+      else if(!strcmp((yyvsp[(1) - (3)].c), "OnelabRun")){
+        Msg::RunOnelabClient((yyvsp[(2) - (3)].c));
+      }
       else{
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));
       }
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 202:
-#line 2649 "Gmsh.y"
+  case 205:
+/* Line 1787 of yacc.c  */
+#line 2768 "Gmsh.y"
+    {
+      int n = List_Nbr((yyvsp[(3) - (5)].l));
+      if(n == 1){
+        char *s; List_Read((yyvsp[(3) - (5)].l), 0, &s);
+        Msg::RunOnelabClient(s);
+        Free(s);
+      }
+      else if(n == 2){
+        char *s, *t; List_Read((yyvsp[(3) - (5)].l), 0, &s); List_Read((yyvsp[(3) - (5)].l), 1, &t);
+        Msg::RunOnelabClient(s, t);
+        Free(s); Free(t);
+      }
+      else{
+        yymsg(0, "OnelabRun takes one or two arguments");
+      }
+      List_Delete((yyvsp[(3) - (5)].l));
+    }
+    break;
+
+  case 206:
+/* Line 1787 of yacc.c  */
+#line 2786 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){
@@ -7230,11 +7763,12 @@ yyreduce:
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));
 #endif
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
-  case 203:
-#line 2666 "Gmsh.y"
+  case 207:
+/* Line 1787 of yacc.c  */
+#line 2803 "Gmsh.y"
     {
 #if defined(HAVE_POST) && defined(HAVE_MESH)
       if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh")  && !strcmp((yyvsp[(3) - (7)].c), "View")){
@@ -7248,11 +7782,12 @@ yyreduce:
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));
 #endif
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(3) - (7)].c));
-    ;}
+    }
     break;
 
-  case 204:
-#line 2681 "Gmsh.y"
+  case 208:
+/* Line 1787 of yacc.c  */
+#line 2818 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
 	SleepInSeconds((yyvsp[(2) - (3)].d));
@@ -7270,11 +7805,12 @@ yyreduce:
       else
 	yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
-  case 205:
-#line 2700 "Gmsh.y"
+  case 209:
+/* Line 1787 of yacc.c  */
+#line 2837 "Gmsh.y"
     {
 #if defined(HAVE_PLUGINS)
        try {
@@ -7285,11 +7821,12 @@ yyreduce:
        }
 #endif
        Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-     ;}
+     }
     break;
 
-  case 206:
-#line 2712 "Gmsh.y"
+  case 210:
+/* Line 1787 of yacc.c  */
+#line 2849 "Gmsh.y"
     {
 #if defined(HAVE_POST)
       if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews"))
@@ -7312,95 +7849,106 @@ yyreduce:
 	yymsg(0, "Unknown 'Combine' command");
 #endif
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 207:
-#line 2736 "Gmsh.y"
+  case 211:
+/* Line 1787 of yacc.c  */
+#line 2873 "Gmsh.y"
     {
       Msg::Exit(0);
-    ;}
+    }
     break;
 
-  case 208:
-#line 2740 "Gmsh.y"
+  case 212:
+/* Line 1787 of yacc.c  */
+#line 2877 "Gmsh.y"
     {
       gmsh_yyerrorstate = 999; // this will be checked when yyparse returns
       YYABORT;
-    ;}
+    }
     break;
 
-  case 209:
-#line 2745 "Gmsh.y"
+  case 213:
+/* Line 1787 of yacc.c  */
+#line 2882 "Gmsh.y"
     {
       // FIXME: this is a hack to force a transfer from the old DB to
       // the new DB. This will become unnecessary if/when we fill the
       // GModel directly during parsing.
       GModel::current()->importGEOInternals();
-    ;}
+    }
     break;
 
-  case 210:
-#line 2752 "Gmsh.y"
+  case 214:
+/* Line 1787 of yacc.c  */
+#line 2889 "Gmsh.y"
     {
       CTX::instance()->forcedBBox = 0;
       GModel::current()->importGEOInternals();
       SetBoundingBox();
-    ;}
+    }
     break;
 
-  case 211:
-#line 2758 "Gmsh.y"
+  case 215:
+/* Line 1787 of yacc.c  */
+#line 2895 "Gmsh.y"
     {
       CTX::instance()->forcedBBox = 1;
       SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
-    ;}
+    }
     break;
 
-  case 212:
-#line 2763 "Gmsh.y"
+  case 216:
+/* Line 1787 of yacc.c  */
+#line 2900 "Gmsh.y"
     {
 #if defined(HAVE_OPENGL)
       drawContext::global()->draw();
 #endif
-    ;}
+    }
     break;
 
-  case 213:
-#line 2769 "Gmsh.y"
+  case 217:
+/* Line 1787 of yacc.c  */
+#line 2906 "Gmsh.y"
     {
 #if defined(HAVE_OPENGL)
      CTX::instance()->mesh.changed = ENT_ALL;
      for(unsigned int index = 0; index < PView::list.size(); index++)
        PView::list[index]->setChanged(true);
 #endif
-    ;}
+    }
     break;
 
-  case 214:
-#line 2777 "Gmsh.y"
+  case 218:
+/* Line 1787 of yacc.c  */
+#line 2914 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh();
-    ;}
+    }
     break;
 
-  case 215:
-#line 2781 "Gmsh.y"
+  case 219:
+/* Line 1787 of yacc.c  */
+#line 2918 "Gmsh.y"
     {
       GModel::current()->createTopologyFromMesh(1);
-    ;}
+    }
     break;
 
-  case 216:
-#line 2785 "Gmsh.y"
+  case 220:
+/* Line 1787 of yacc.c  */
+#line 2922 "Gmsh.y"
     {
       GModel::current()->importGEOInternals();
       GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
-    ;}
+    }
     break;
 
-  case 217:
-#line 2791 "Gmsh.y"
+  case 221:
+/* Line 1787 of yacc.c  */
+#line 2928 "Gmsh.y"
     {
       int lock = CTX::instance()->lock;
       CTX::instance()->lock = 0;
@@ -7453,22 +8001,24 @@ yyreduce:
         List_Delete(*(List_T**)List_Pointer((yyvsp[(9) - (16)].l), i));
       List_Delete((yyvsp[(9) - (16)].l));
       CTX::instance()->lock = lock;
-    ;}
+    }
     break;
 
-  case 218:
-#line 2845 "Gmsh.y"
+  case 222:
+/* Line 1787 of yacc.c  */
+#line 2982 "Gmsh.y"
     {
 #if defined(HAVE_MESH)
       SetOrderN(GModel::current(), (yyvsp[(2) - (3)].d), CTX::instance()->mesh.secondOrderLinear,
                 CTX::instance()->mesh.secondOrderIncomplete,
                 CTX::instance()->mesh.meshOnlyVisible);
 #endif
-    ;}
+    }
     break;
 
-  case 219:
-#line 2858 "Gmsh.y"
+  case 223:
+/* Line 1787 of yacc.c  */
+#line 2995 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
@@ -7484,11 +8034,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
-  case 220:
-#line 2875 "Gmsh.y"
+  case 224:
+/* Line 1787 of yacc.c  */
+#line 3012 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
@@ -7504,11 +8055,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
-  case 221:
-#line 2892 "Gmsh.y"
+  case 225:
+/* Line 1787 of yacc.c  */
+#line 3029 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
@@ -7528,11 +8080,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
-  case 222:
-#line 2913 "Gmsh.y"
+  case 226:
+/* Line 1787 of yacc.c  */
+#line 3050 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
@@ -7552,11 +8105,12 @@ yyreduce:
 	yymsg(0, "Reached maximum number of imbricated loops");
 	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
       }
-    ;}
+    }
     break;
 
-  case 223:
-#line 2934 "Gmsh.y"
+  case 227:
+/* Line 1787 of yacc.c  */
+#line 3071 "Gmsh.y"
     {
       if(ImbricatedLoop <= 0){
 	yymsg(0, "Invalid For/EndFor loop");
@@ -7590,439 +8144,485 @@ yyreduce:
 	else
 	  ImbricatedLoop--;
       }
-    ;}
+    }
     break;
 
-  case 224:
-#line 2969 "Gmsh.y"
+  case 228:
+/* Line 1787 of yacc.c  */
+#line 3106 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->createFunction
-         ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
+         (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c));
       skip_until(NULL, "Return");
-      //FIXME: wee leak $2
-    ;}
+      Free((yyvsp[(2) - (2)].c));
+    }
     break;
 
-  case 225:
-#line 2977 "Gmsh.y"
+  case 229:
+/* Line 1787 of yacc.c  */
+#line 3114 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->leaveFunction
          (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Error while exiting function");
-    ;}
+    }
     break;
 
-  case 226:
-#line 2983 "Gmsh.y"
+  case 230:
+/* Line 1787 of yacc.c  */
+#line 3120 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->enterFunction
-         ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
+         (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Unknown function %s", (yyvsp[(2) - (3)].c));
-      //FIXME: wee leak $2
-    ;}
+      Free((yyvsp[(2) - (3)].c));
+    }
     break;
 
-  case 227:
-#line 2990 "Gmsh.y"
+  case 231:
+/* Line 1787 of yacc.c  */
+#line 3127 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
-    ;}
+    }
     break;
 
-  case 228:
-#line 2994 "Gmsh.y"
+  case 232:
+/* Line 1787 of yacc.c  */
+#line 3131 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
-  case 229:
-#line 3003 "Gmsh.y"
+  case 233:
+/* Line 1787 of yacc.c  */
+#line 3140 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l),
 		    (yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 230:
-#line 3011 "Gmsh.y"
+  case 234:
+/* Line 1787 of yacc.c  */
+#line 3148 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l),
 		    0., 0., 0., (yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d),
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(10) - (11)].l));
-    ;}
+    }
     break;
 
-  case 231:
-#line 3019 "Gmsh.y"
+  case 235:
+/* Line 1787 of yacc.c  */
+#line 3156 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l),
 		    (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].v)[0], (yyvsp[(7) - (13)].v)[1], (yyvsp[(7) - (13)].v)[2], (yyvsp[(9) - (13)].d),
 		    NULL, (yyval.l));
       List_Delete((yyvsp[(12) - (13)].l));
-    ;}
+    }
     break;
 
-  case 232:
-#line 3027 "Gmsh.y"
+  case 236:
+/* Line 1787 of yacc.c  */
+#line 3164 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 233:
-#line 3033 "Gmsh.y"
+  case 237:
+/* Line 1787 of yacc.c  */
+#line 3170 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l),
 		    (yyvsp[(2) - (7)].v)[0], (yyvsp[(2) - (7)].v)[1], (yyvsp[(2) - (7)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(4) - (7)].l));
-    ;}
+    }
     break;
 
-  case 234:
-#line 3041 "Gmsh.y"
+  case 238:
+/* Line 1787 of yacc.c  */
+#line 3178 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 235:
-#line 3047 "Gmsh.y"
+  case 239:
+/* Line 1787 of yacc.c  */
+#line 3184 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l),
 		    0., 0., 0., (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].d),
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(10) - (13)].l));
-    ;}
+    }
     break;
 
-  case 236:
-#line 3055 "Gmsh.y"
+  case 240:
+/* Line 1787 of yacc.c  */
+#line 3192 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 237:
-#line 3061 "Gmsh.y"
+  case 241:
+/* Line 1787 of yacc.c  */
+#line 3198 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l),
 		    (yyvsp[(3) - (15)].v)[0], (yyvsp[(3) - (15)].v)[1], (yyvsp[(3) - (15)].v)[2], (yyvsp[(5) - (15)].v)[0], (yyvsp[(5) - (15)].v)[1], (yyvsp[(5) - (15)].v)[2], (yyvsp[(7) - (15)].v)[0], (yyvsp[(7) - (15)].v)[1], (yyvsp[(7) - (15)].v)[2], (yyvsp[(9) - (15)].d),
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(12) - (15)].l));
-    ;}
+    }
     break;
 
-  case 238:
-#line 3069 "Gmsh.y"
+  case 242:
+/* Line 1787 of yacc.c  */
+#line 3206 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 239:
-#line 3075 "Gmsh.y"
+  case 243:
+/* Line 1787 of yacc.c  */
+#line 3212 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
 		    &extr, (yyval.l));
       List_Delete((yyvsp[(3) - (6)].l));
-    ;}
+    }
     break;
 
-  case 240:
-#line 3083 "Gmsh.y"
+  case 244:
+/* Line 1787 of yacc.c  */
+#line 3220 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 241:
-#line 3090 "Gmsh.y"
+  case 245:
+/* Line 1787 of yacc.c  */
+#line 3227 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 242:
-#line 3097 "Gmsh.y"
+  case 246:
+/* Line 1787 of yacc.c  */
+#line 3234 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d),
 		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 243:
-#line 3104 "Gmsh.y"
+  case 247:
+/* Line 1787 of yacc.c  */
+#line 3241 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 244:
-#line 3111 "Gmsh.y"
+  case 248:
+/* Line 1787 of yacc.c  */
+#line 3248 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 245:
-#line 3118 "Gmsh.y"
+  case 249:
+/* Line 1787 of yacc.c  */
+#line 3255 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
 		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 246:
-#line 3125 "Gmsh.y"
+  case 250:
+/* Line 1787 of yacc.c  */
+#line 3262 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 247:
-#line 3132 "Gmsh.y"
+  case 251:
+/* Line 1787 of yacc.c  */
+#line 3269 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 248:
-#line 3139 "Gmsh.y"
+  case 252:
+/* Line 1787 of yacc.c  */
+#line 3276 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d),
 		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
 		   NULL, (yyval.l));
-    ;}
+    }
     break;
 
-  case 249:
-#line 3146 "Gmsh.y"
+  case 253:
+/* Line 1787 of yacc.c  */
+#line 3283 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 250:
-#line 3152 "Gmsh.y"
+  case 254:
+/* Line 1787 of yacc.c  */
+#line 3289 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 251:
-#line 3159 "Gmsh.y"
+  case 255:
+/* Line 1787 of yacc.c  */
+#line 3296 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 252:
-#line 3165 "Gmsh.y"
+  case 256:
+/* Line 1787 of yacc.c  */
+#line 3302 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 253:
-#line 3172 "Gmsh.y"
+  case 257:
+/* Line 1787 of yacc.c  */
+#line 3309 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 254:
-#line 3178 "Gmsh.y"
+  case 258:
+/* Line 1787 of yacc.c  */
+#line 3315 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d),
 		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 255:
-#line 3185 "Gmsh.y"
+  case 259:
+/* Line 1787 of yacc.c  */
+#line 3322 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 256:
-#line 3191 "Gmsh.y"
+  case 260:
+/* Line 1787 of yacc.c  */
+#line 3328 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 257:
-#line 3198 "Gmsh.y"
+  case 261:
+/* Line 1787 of yacc.c  */
+#line 3335 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 258:
-#line 3204 "Gmsh.y"
+  case 262:
+/* Line 1787 of yacc.c  */
+#line 3341 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 259:
-#line 3211 "Gmsh.y"
+  case 263:
+/* Line 1787 of yacc.c  */
+#line 3348 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 260:
-#line 3217 "Gmsh.y"
+  case 264:
+/* Line 1787 of yacc.c  */
+#line 3354 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d),
 		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 261:
-#line 3224 "Gmsh.y"
+  case 265:
+/* Line 1787 of yacc.c  */
+#line 3361 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 262:
-#line 3230 "Gmsh.y"
+  case 266:
+/* Line 1787 of yacc.c  */
+#line 3367 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 263:
-#line 3237 "Gmsh.y"
+  case 267:
+/* Line 1787 of yacc.c  */
+#line 3374 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 264:
-#line 3243 "Gmsh.y"
+  case 268:
+/* Line 1787 of yacc.c  */
+#line 3380 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 265:
-#line 3250 "Gmsh.y"
+  case 269:
+/* Line 1787 of yacc.c  */
+#line 3387 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
       extr.mesh.QuadToTri = NO_QUADTRI;
       extr.mesh.ScaleLast = false;
-    ;}
+    }
     break;
 
-  case 266:
-#line 3256 "Gmsh.y"
+  case 270:
+/* Line 1787 of yacc.c  */
+#line 3393 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d),
 		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
 		   &extr, (yyval.l));
-    ;}
+    }
     break;
 
-  case 267:
-#line 3267 "Gmsh.y"
+  case 271:
+/* Line 1787 of yacc.c  */
+#line 3404 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
-  case 268:
-#line 3270 "Gmsh.y"
+  case 272:
+/* Line 1787 of yacc.c  */
+#line 3407 "Gmsh.y"
     {
-    ;}
+    }
     break;
 
-  case 269:
-#line 3276 "Gmsh.y"
+  case 273:
+/* Line 1787 of yacc.c  */
+#line 3413 "Gmsh.y"
     {
       int n = (int)fabs((yyvsp[(3) - (5)].d));
       if(n){ // we accept n==0 to easily disable layers
@@ -8033,11 +8633,12 @@ yyreduce:
         extr.mesh.NbElmLayer.push_back((int)fabs((yyvsp[(3) - (5)].d)));
         extr.mesh.hLayer.push_back(1.);
       }
-    ;}
+    }
     break;
 
-  case 270:
-#line 3288 "Gmsh.y"
+  case 274:
+/* Line 1787 of yacc.c  */
+#line 3425 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l));
@@ -8056,11 +8657,12 @@ yyreduce:
 	yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l)));
       List_Delete((yyvsp[(3) - (7)].l));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
-  case 271:
-#line 3308 "Gmsh.y"
+  case 275:
+/* Line 1787 of yacc.c  */
+#line 3445 "Gmsh.y"
     {
       yymsg(0, "Explicit region numbers in layers are deprecated");
       extr.mesh.ExtrudeMesh = true;
@@ -8082,85 +8684,96 @@ yyreduce:
       List_Delete((yyvsp[(3) - (9)].l));
       List_Delete((yyvsp[(5) - (9)].l));
       List_Delete((yyvsp[(7) - (9)].l));
-    ;}
+    }
     break;
 
-  case 272:
-#line 3332 "Gmsh.y"
+  case 276:
+/* Line 1787 of yacc.c  */
+#line 3469 "Gmsh.y"
     {
       extr.mesh.ScaleLast = true;
-    ;}
+    }
     break;
 
-  case 273:
-#line 3336 "Gmsh.y"
+  case 277:
+/* Line 1787 of yacc.c  */
+#line 3473 "Gmsh.y"
     {
       extr.mesh.Recombine = true;
-    ;}
+    }
     break;
 
-  case 274:
-#line 3340 "Gmsh.y"
+  case 278:
+/* Line 1787 of yacc.c  */
+#line 3477 "Gmsh.y"
     {
       yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
-    ;}
+    }
     break;
 
-  case 275:
-#line 3344 "Gmsh.y"
+  case 279:
+/* Line 1787 of yacc.c  */
+#line 3481 "Gmsh.y"
     {
       yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead.");
-    ;}
+    }
     break;
 
-  case 276:
-#line 3348 "Gmsh.y"
+  case 280:
+/* Line 1787 of yacc.c  */
+#line 3485 "Gmsh.y"
     {
       yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, "
             "which has no requirement for the number of extrusion layers and meshes "
             "with body-centered vertices.");
-    ;}
+    }
     break;
 
-  case 277:
-#line 3354 "Gmsh.y"
+  case 281:
+/* Line 1787 of yacc.c  */
+#line 3491 "Gmsh.y"
     {
       yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, "
             "which has no requirement for the number of extrusion layers and meshes "
             "with body-centered vertices.");
-    ;}
+    }
     break;
 
-  case 278:
-#line 3360 "Gmsh.y"
+  case 282:
+/* Line 1787 of yacc.c  */
+#line 3497 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1;
-    ;}
+    }
     break;
 
-  case 279:
-#line 3364 "Gmsh.y"
+  case 283:
+/* Line 1787 of yacc.c  */
+#line 3501 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB;
-    ;}
+    }
     break;
 
-  case 280:
-#line 3368 "Gmsh.y"
+  case 284:
+/* Line 1787 of yacc.c  */
+#line 3505 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_NOVERTS_1;
-    ;}
+    }
     break;
 
-  case 281:
-#line 3372 "Gmsh.y"
+  case 285:
+/* Line 1787 of yacc.c  */
+#line 3509 "Gmsh.y"
     {
       extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB;
-    ;}
+    }
     break;
 
-  case 282:
-#line 3376 "Gmsh.y"
+  case 286:
+/* Line 1787 of yacc.c  */
+#line 3513 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (9)].d);
       if(FindSurface(num)){
@@ -8178,29 +8791,32 @@ yyreduce:
 	}
       }
       List_Delete((yyvsp[(6) - (9)].l));
-    ;}
+    }
     break;
 
-  case 283:
-#line 3395 "Gmsh.y"
+  case 287:
+/* Line 1787 of yacc.c  */
+#line 3532 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "Index"))
         extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d);
       else if(!strcmp((yyvsp[(2) - (6)].c), "View"))
         extr.mesh.ViewIndex = (yyvsp[(4) - (6)].d);
       Free((yyvsp[(2) - (6)].c));
-    ;}
+    }
     break;
 
-  case 284:
-#line 3407 "Gmsh.y"
+  case 288:
+/* Line 1787 of yacc.c  */
+#line 3544 "Gmsh.y"
     {
       (yyval.v)[0] = (yyval.v)[1] = 1.;
-    ;}
+    }
     break;
 
-  case 285:
-#line 3411 "Gmsh.y"
+  case 289:
+/* Line 1787 of yacc.c  */
+#line 3548 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power"))
         (yyval.v)[0] = 1.;
@@ -8212,18 +8828,20 @@ yyreduce:
       }
       (yyval.v)[1] = (yyvsp[(3) - (3)].d);
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 286:
-#line 3426 "Gmsh.y"
+  case 290:
+/* Line 1787 of yacc.c  */
+#line 3563 "Gmsh.y"
     {
       (yyval.i) = -1; // left
-    ;}
+    }
     break;
 
-  case 287:
-#line 3430 "Gmsh.y"
+  case 291:
+/* Line 1787 of yacc.c  */
+#line 3567 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "Right"))
         (yyval.i) = 1;
@@ -8236,39 +8854,60 @@ yyreduce:
       else // "Alternate" -> "Alternate Right"
 	(yyval.i) = 2;
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
-  case 288:
-#line 3446 "Gmsh.y"
+  case 292:
+/* Line 1787 of yacc.c  */
+#line 3583 "Gmsh.y"
     {
      (yyval.l) = List_Create(1, 1, sizeof(double));
-   ;}
+   }
     break;
 
-  case 289:
-#line 3450 "Gmsh.y"
+  case 293:
+/* Line 1787 of yacc.c  */
+#line 3587 "Gmsh.y"
     {
      (yyval.l) = (yyvsp[(2) - (2)].l);
-   ;}
+   }
     break;
 
-  case 290:
-#line 3455 "Gmsh.y"
+  case 294:
+/* Line 1787 of yacc.c  */
+#line 3592 "Gmsh.y"
     {
       (yyval.i) = 45;
-    ;}
+    }
     break;
 
-  case 291:
-#line 3459 "Gmsh.y"
+  case 295:
+/* Line 1787 of yacc.c  */
+#line 3596 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(2) - (2)].d);
-    ;}
+    }
     break;
 
-  case 292:
-#line 3466 "Gmsh.y"
+  case 296:
+/* Line 1787 of yacc.c  */
+#line 3602 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(1, 1, sizeof(double));
+    }
+    break;
+
+  case 297:
+/* Line 1787 of yacc.c  */
+#line 3606 "Gmsh.y"
+    {
+      (yyval.l) = (yyvsp[(2) - (2)].l);
+    }
+    break;
+
+  case 298:
+/* Line 1787 of yacc.c  */
+#line 3613 "Gmsh.y"
     {
       int type = (int)(yyvsp[(6) - (7)].v)[0];
       double coef = fabs((yyvsp[(6) - (7)].v)[1]);
@@ -8323,11 +8962,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (7)].l));
       }
-    ;}
+    }
     break;
 
-  case 293:
-#line 3522 "Gmsh.y"
+  case 299:
+/* Line 1787 of yacc.c  */
+#line 3669 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (6)].l));
       if(k != 0 && k != 3 && k != 4){
@@ -8396,19 +9036,21 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
-  case 294:
-#line 3592 "Gmsh.y"
+  case 300:
+/* Line 1787 of yacc.c  */
+#line 3739 "Gmsh.y"
     {
       yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
-    ;}
+    }
     break;
 
-  case 295:
-#line 3597 "Gmsh.y"
+  case 301:
+/* Line 1787 of yacc.c  */
+#line 3744 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (5)].l));
       if(k != 0 && k != 6 && k != 8){
@@ -8474,11 +9116,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 296:
-#line 3664 "Gmsh.y"
+  case 302:
+/* Line 1787 of yacc.c  */
+#line 3811 "Gmsh.y"
     {
       if(!(yyvsp[(2) - (3)].l)){
   	  List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes);
@@ -8508,27 +9151,29 @@ yyreduce:
             if(gr)
               gr->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1;
             else
-              yymsg(1, "Unknown region %d", (int)d);
+              yymsg(1, "Unknown volume %d", (int)d);
           }
         }
         List_Delete((yyvsp[(2) - (3)].l));
       }
-    ;}
+    }
     break;
 
-  case 297:
-#line 3700 "Gmsh.y"
+  case 303:
+/* Line 1787 of yacc.c  */
+#line 3847 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (7)].l)); i++){
 	double d;
 	List_Read((yyvsp[(4) - (7)].l), i, &d);
 	CTX::instance()->mesh.algo2d_per_face[(int)d] = (int)(yyvsp[(6) - (7)].d);
       }
-    ;}
+    }
     break;
 
-  case 298:
-#line 3708 "Gmsh.y"
+  case 304:
+/* Line 1787 of yacc.c  */
+#line 3855 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (5)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -8570,11 +9215,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (5)].l));
       }
-    ;}
+    }
     break;
 
-  case 299:
-#line 3751 "Gmsh.y"
+  case 305:
+/* Line 1787 of yacc.c  */
+#line 3898 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes);
@@ -8612,11 +9258,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 300:
-#line 3790 "Gmsh.y"
+  case 306:
+/* Line 1787 of yacc.c  */
+#line 3937 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -8635,11 +9282,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(3) - (6)].l));
-    ;}
+    }
     break;
 
-  case 301:
-#line 3810 "Gmsh.y"
+  case 307:
+/* Line 1787 of yacc.c  */
+#line 3957 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){
 	yymsg(0, "Number of master (%d) different from number of slave (%d) lines",
@@ -8665,39 +9313,48 @@ yyreduce:
       }
       List_Delete((yyvsp[(3) - (6)].l));
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
-  case 302:
-#line 3838 "Gmsh.y"
+  case 308:
+/* Line 1787 of yacc.c  */
+#line 3985 "Gmsh.y"
     {
-      if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){
+      if (List_Nbr((yyvsp[(5) - (13)].l)) != List_Nbr((yyvsp[(10) - (13)].l))){
 	yymsg(0, "Number of master surface edges (%d) different from number of "
-              "slave (%d) edges", List_Nbr((yyvsp[(10) - (12)].l)), List_Nbr((yyvsp[(5) - (12)].l)));
+              "slave (%d) edges", List_Nbr((yyvsp[(10) - (13)].l)), List_Nbr((yyvsp[(5) - (13)].l)));
       }
       else{
-        int j_master = (int)(yyvsp[(8) - (12)].d);
-        int j_slave = (int)(yyvsp[(3) - (12)].d);
+        int j_master = (int)(yyvsp[(8) - (13)].d);
+        int j_slave = (int)(yyvsp[(3) - (13)].d);
         Surface *s_slave = FindSurface(abs(j_slave));
+	std::vector<double> transfo;
+	for(int i = 0; i < List_Nbr((yyvsp[(12) - (13)].l)); i++){
+	  double d;
+	  List_Read((yyvsp[(12) - (13)].l), i, &d);
+	  transfo.push_back(d);
+	}
         if(s_slave){
 	  GModel::current()->getGEOInternals()->periodicFaces[j_slave] = j_master;
-          for (int i = 0; i < List_Nbr((yyvsp[(5) - (12)].l)); i++){
+          for (int i = 0; i < List_Nbr((yyvsp[(5) - (13)].l)); i++){
             double dm, ds;
-            List_Read((yyvsp[(5) - (12)].l), i, &ds);
-            List_Read((yyvsp[(10) - (12)].l), i, &dm);
+            List_Read((yyvsp[(5) - (13)].l), i, &ds);
+            List_Read((yyvsp[(10) - (13)].l), i, &dm);
 	    GModel::current()->getGEOInternals()->periodicEdges[(int)ds] = (int)dm;
             s_slave->edgeCounterparts[(int)ds] = (int)dm;
+            s_slave->affineTransform = transfo;
           }
         }
         else{
           GFace *gf = GModel::current()->getFaceByTag(abs(j_slave));
           if(gf){
             gf->setMeshMaster(j_master);
-            for (int i = 0; i < List_Nbr((yyvsp[(5) - (12)].l)); i++){
+            for (int i = 0; i < List_Nbr((yyvsp[(5) - (13)].l)); i++){
               double dm, ds;
-              List_Read((yyvsp[(5) - (12)].l), i, &ds);
-              List_Read((yyvsp[(10) - (12)].l), i, &dm);
+              List_Read((yyvsp[(5) - (13)].l), i, &ds);
+              List_Read((yyvsp[(10) - (13)].l), i, &dm);
               gf->edgeCounterparts[(int)ds] = (int)dm;
+	      gf->affineTransform = transfo;
 	      GEdge *ges = GModel::current()->getEdgeByTag(abs((int)ds));
 	      ges->setMeshMaster((int)dm);
             }
@@ -8705,13 +9362,15 @@ yyreduce:
           else yymsg(0, "Unknown surface %d", j_slave);
         }
       }
-      List_Delete((yyvsp[(5) - (12)].l));
-      List_Delete((yyvsp[(10) - (12)].l));
-    ;}
+      List_Delete((yyvsp[(5) - (13)].l));
+      List_Delete((yyvsp[(10) - (13)].l));
+      List_Delete((yyvsp[(12) - (13)].l));
+    }
     break;
 
-  case 303:
-#line 3877 "Gmsh.y"
+  case 309:
+/* Line 1787 of yacc.c  */
+#line 4033 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8721,9 +9380,14 @@ yyreduce:
         GFace *gf = GModel::current()->getFaceByTag((int)(yyvsp[(8) - (10)].d));
         if(gf){
           for(int i = 0; i < List_Nbr((yyvsp[(3) - (10)].l)); i++){
-            int iPoint;
-            List_Read((yyvsp[(3) - (10)].l), i, &iPoint);
+            double d;
+            List_Read((yyvsp[(3) - (10)].l), i, &d);
+            int iPoint = (int)d;
             GVertex *gv = GModel::current()->getVertexByTag(iPoint);
+            if(!gv){ // sync model in case the embedded point is a .geo point
+              GModel::current()->importGEOInternals();
+              gv = GModel::current()->getVertexByTag(iPoint);
+            }
             if(gv)
               gf->addEmbeddedVertex(gv);
             else
@@ -8733,11 +9397,12 @@ yyreduce:
         else
           yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
       }
-    ;}
+    }
     break;
 
-  case 304:
-#line 3900 "Gmsh.y"
+  case 310:
+/* Line 1787 of yacc.c  */
+#line 4061 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -8747,9 +9412,14 @@ yyreduce:
         GFace *gf = GModel::current()->getFaceByTag((int)(yyvsp[(8) - (10)].d));
         if(gf){
           for(int i = 0; i < List_Nbr((yyvsp[(3) - (10)].l)); i++){
-            int iCurve;
-            List_Read((yyvsp[(3) - (10)].l), i, &iCurve);
+            double d;
+            List_Read((yyvsp[(3) - (10)].l), i, &d);
+            int iCurve = (int)d;
             GEdge *ge = GModel::current()->getEdgeByTag(iCurve);
+            if(!ge){ // sync model in case the embedded line is a .geo line
+              GModel::current()->importGEOInternals();
+              ge = GModel::current()->getEdgeByTag(iCurve);
+            }
             if(ge)
               gf->addEmbeddedEdge(ge);
             else
@@ -8759,25 +9429,28 @@ yyreduce:
         else
           yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
       }
-    ;}
+    }
     break;
 
-  case 305:
-#line 3923 "Gmsh.y"
+  case 311:
+/* Line 1787 of yacc.c  */
+#line 4089 "Gmsh.y"
     {
       Msg::Error("Point in Volume not implemented yet");
-    ;}
+    }
     break;
 
-  case 306:
-#line 3927 "Gmsh.y"
+  case 312:
+/* Line 1787 of yacc.c  */
+#line 4093 "Gmsh.y"
     {
       Msg::Error("Line in Volume not implemented yet");
-    ;}
+    }
     break;
 
-  case 307:
-#line 3931 "Gmsh.y"
+  case 313:
+/* Line 1787 of yacc.c  */
+#line 4097 "Gmsh.y"
     {
       Volume *v = FindVolume((int)(yyvsp[(8) - (10)].d));
       if(v){
@@ -8787,9 +9460,14 @@ yyreduce:
         GRegion *gr = GModel::current()->getRegionByTag((int)(yyvsp[(8) - (10)].d));
         if(gr){
           for(int i = 0; i < List_Nbr((yyvsp[(3) - (10)].l)); i++){
-            int iSurface;
-            List_Read((yyvsp[(3) - (10)].l), i, &iSurface);
+            double d;
+            List_Read((yyvsp[(3) - (10)].l), i, &d);
+            int iSurface = (int)d;
             GFace *gf = GModel::current()->getFaceByTag(iSurface);
+            if(!gf){ // sync model in case the embedded face is a .geo face
+              GModel::current()->importGEOInternals();
+              gf = GModel::current()->getFaceByTag(iSurface);
+            }
             if(gf)
               gr->addEmbeddedFace(gf);
             else
@@ -8797,13 +9475,14 @@ yyreduce:
           }
         }
         else
-          yymsg(0, "Unknown region %d", (int)(yyvsp[(8) - (10)].d));
+          yymsg(0, "Unknown volume %d", (int)(yyvsp[(8) - (10)].d));
       }
-    ;}
+    }
     break;
 
-  case 308:
-#line 3954 "Gmsh.y"
+  case 314:
+/* Line 1787 of yacc.c  */
+#line 4125 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -8841,11 +9520,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 309:
-#line 3993 "Gmsh.y"
+  case 315:
+/* Line 1787 of yacc.c  */
+#line 4164 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
@@ -8883,11 +9563,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 310:
-#line 4032 "Gmsh.y"
+  case 316:
+/* Line 1787 of yacc.c  */
+#line 4203 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
         for(GModel::viter it = GModel::current()->firstVertex();
@@ -8907,11 +9588,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 311:
-#line 4053 "Gmsh.y"
+  case 317:
+/* Line 1787 of yacc.c  */
+#line 4224 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
         for(GModel::eiter it = GModel::current()->firstEdge();
@@ -8931,11 +9613,12 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 312:
-#line 4074 "Gmsh.y"
+  case 318:
+/* Line 1787 of yacc.c  */
+#line 4245 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].l)){
         for(GModel::fiter it = GModel::current()->firstFace();
@@ -8955,18 +9638,20 @@ yyreduce:
         }
         List_Delete((yyvsp[(3) - (4)].l));
       }
-    ;}
+    }
     break;
 
-  case 313:
-#line 4101 "Gmsh.y"
+  case 319:
+/* Line 1787 of yacc.c  */
+#line 4272 "Gmsh.y"
     {
       ReplaceAllDuplicates();
-    ;}
+    }
     break;
 
-  case 314:
-#line 4105 "Gmsh.y"
+  case 320:
+/* Line 1787 of yacc.c  */
+#line 4276 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
         ReplaceAllDuplicates();
@@ -8975,11 +9660,12 @@ yyreduce:
       else
         yymsg(0, "Unknown coherence command");
       Free((yyvsp[(2) - (3)].c));
-    ;}
+    }
     break;
 
-  case 315:
-#line 4115 "Gmsh.y"
+  case 321:
+/* Line 1787 of yacc.c  */
+#line 4286 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){
         double d;
@@ -9008,35 +9694,40 @@ yyreduce:
         yymsg(0, "Need at least two points to merge");
       ReplaceAllDuplicates();
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
-  case 316:
-#line 4149 "Gmsh.y"
-    { (yyval.c) = (char*)"Homology"; ;}
+  case 322:
+/* Line 1787 of yacc.c  */
+#line 4320 "Gmsh.y"
+    { (yyval.c) = (char*)"Homology"; }
     break;
 
-  case 317:
-#line 4150 "Gmsh.y"
-    { (yyval.c) = (char*)"Cohomology"; ;}
+  case 323:
+/* Line 1787 of yacc.c  */
+#line 4321 "Gmsh.y"
+    { (yyval.c) = (char*)"Cohomology"; }
     break;
 
-  case 318:
-#line 4151 "Gmsh.y"
-    { (yyval.c) = (char*)"Betti"; ;}
+  case 324:
+/* Line 1787 of yacc.c  */
+#line 4322 "Gmsh.y"
+    { (yyval.c) = (char*)"Betti"; }
     break;
 
-  case 319:
-#line 4156 "Gmsh.y"
+  case 325:
+/* Line 1787 of yacc.c  */
+#line 4327 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < 4; i++) dim.push_back(i);
       GModel::current()->addHomologyRequest((yyvsp[(1) - (2)].c), domain, subdomain, dim);
-    ;}
+    }
     break;
 
-  case 320:
-#line 4162 "Gmsh.y"
+  case 326:
+/* Line 1787 of yacc.c  */
+#line 4333 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){
@@ -9047,11 +9738,12 @@ yyreduce:
       for(int i = 0; i < 4; i++) dim.push_back(i);
       GModel::current()->addHomologyRequest((yyvsp[(1) - (5)].c), domain, subdomain, dim);
       List_Delete((yyvsp[(3) - (5)].l));
-    ;}
+    }
     break;
 
-  case 321:
-#line 4174 "Gmsh.y"
+  case 327:
+/* Line 1787 of yacc.c  */
+#line 4345 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
@@ -9068,11 +9760,12 @@ yyreduce:
       GModel::current()->addHomologyRequest((yyvsp[(1) - (7)].c), domain, subdomain, dim);
       List_Delete((yyvsp[(3) - (7)].l));
       List_Delete((yyvsp[(5) - (7)].l));
-    ;}
+    }
     break;
 
-  case 322:
-#line 4192 "Gmsh.y"
+  case 328:
+/* Line 1787 of yacc.c  */
+#line 4363 "Gmsh.y"
     {
       std::vector<int> domain, subdomain, dim;
       for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){
@@ -9094,290 +9787,345 @@ yyreduce:
       List_Delete((yyvsp[(6) - (10)].l));
       List_Delete((yyvsp[(8) - (10)].l));
       List_Delete((yyvsp[(3) - (10)].l));
-    ;}
-    break;
-
-  case 323:
-#line 4219 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
-    break;
-
-  case 324:
-#line 4220 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
-    break;
-
-  case 325:
-#line 4221 "Gmsh.y"
-    { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
-    break;
-
-  case 326:
-#line 4222 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
-    break;
-
-  case 327:
-#line 4223 "Gmsh.y"
-    { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
-    break;
-
-  case 328:
-#line 4224 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
+    }
     break;
 
   case 329:
-#line 4225 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
+/* Line 1787 of yacc.c  */
+#line 4390 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (1)].d);           }
     break;
 
   case 330:
-#line 4226 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
+/* Line 1787 of yacc.c  */
+#line 4391 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(2) - (3)].d);           }
     break;
 
   case 331:
-#line 4228 "Gmsh.y"
-    {
-      if(!(yyvsp[(3) - (3)].d))
-	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
-      else
-	(yyval.d) = (yyvsp[(1) - (3)].d) / (yyvsp[(3) - (3)].d);
-    ;}
+/* Line 1787 of yacc.c  */
+#line 4392 "Gmsh.y"
+    { (yyval.d) = -(yyvsp[(2) - (2)].d);          }
     break;
 
   case 332:
-#line 4234 "Gmsh.y"
-    { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
+/* Line 1787 of yacc.c  */
+#line 4393 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(2) - (2)].d);           }
     break;
 
   case 333:
-#line 4235 "Gmsh.y"
-    { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
+/* Line 1787 of yacc.c  */
+#line 4394 "Gmsh.y"
+    { (yyval.d) = !(yyvsp[(2) - (2)].d);          }
     break;
 
   case 334:
-#line 4236 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
+/* Line 1787 of yacc.c  */
+#line 4395 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      }
     break;
 
   case 335:
-#line 4237 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
+/* Line 1787 of yacc.c  */
+#line 4396 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      }
     break;
 
   case 336:
-#line 4238 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4397 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      }
     break;
 
   case 337:
-#line 4239 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4399 "Gmsh.y"
+    {
+      if(!(yyvsp[(3) - (3)].d))
+	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
+      else
+	(yyval.d) = (yyvsp[(1) - (3)].d) / (yyvsp[(3) - (3)].d);
+    }
     break;
 
   case 338:
-#line 4240 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4405 "Gmsh.y"
+    { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  }
     break;
 
   case 339:
-#line 4241 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4406 "Gmsh.y"
+    { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  }
     break;
 
   case 340:
-#line 4242 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4407 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      }
     break;
 
   case 341:
-#line 4243 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
+/* Line 1787 of yacc.c  */
+#line 4408 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      }
     break;
 
   case 342:
-#line 4244 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;}
+/* Line 1787 of yacc.c  */
+#line 4409 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     }
     break;
 
   case 343:
-#line 4245 "Gmsh.y"
-    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
+/* Line 1787 of yacc.c  */
+#line 4410 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     }
     break;
 
   case 344:
-#line 4246 "Gmsh.y"
-    { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
+/* Line 1787 of yacc.c  */
+#line 4411 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     }
     break;
 
   case 345:
-#line 4247 "Gmsh.y"
-    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
+/* Line 1787 of yacc.c  */
+#line 4412 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     }
     break;
 
   case 346:
-#line 4248 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4413 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     }
     break;
 
   case 347:
-#line 4249 "Gmsh.y"
-    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
+/* Line 1787 of yacc.c  */
+#line 4414 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     }
     break;
 
   case 348:
-#line 4250 "Gmsh.y"
-    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4415 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); }
     break;
 
   case 349:
-#line 4251 "Gmsh.y"
-    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
+/* Line 1787 of yacc.c  */
+#line 4416 "Gmsh.y"
+    { (yyval.d) = exp((yyvsp[(3) - (4)].d));      }
     break;
 
   case 350:
-#line 4252 "Gmsh.y"
-    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4417 "Gmsh.y"
+    { (yyval.d) = log((yyvsp[(3) - (4)].d));      }
     break;
 
   case 351:
-#line 4253 "Gmsh.y"
-    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
+/* Line 1787 of yacc.c  */
+#line 4418 "Gmsh.y"
+    { (yyval.d) = log10((yyvsp[(3) - (4)].d));    }
     break;
 
   case 352:
-#line 4254 "Gmsh.y"
-    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4419 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     }
     break;
 
   case 353:
-#line 4255 "Gmsh.y"
-    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
+/* Line 1787 of yacc.c  */
+#line 4420 "Gmsh.y"
+    { (yyval.d) = sin((yyvsp[(3) - (4)].d));      }
     break;
 
   case 354:
-#line 4256 "Gmsh.y"
-    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4421 "Gmsh.y"
+    { (yyval.d) = asin((yyvsp[(3) - (4)].d));     }
     break;
 
   case 355:
-#line 4257 "Gmsh.y"
-    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4422 "Gmsh.y"
+    { (yyval.d) = cos((yyvsp[(3) - (4)].d));      }
     break;
 
   case 356:
-#line 4258 "Gmsh.y"
-    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4423 "Gmsh.y"
+    { (yyval.d) = acos((yyvsp[(3) - (4)].d));     }
     break;
 
   case 357:
-#line 4259 "Gmsh.y"
-    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4424 "Gmsh.y"
+    { (yyval.d) = tan((yyvsp[(3) - (4)].d));      }
     break;
 
   case 358:
-#line 4260 "Gmsh.y"
-    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
+/* Line 1787 of yacc.c  */
+#line 4425 "Gmsh.y"
+    { (yyval.d) = atan((yyvsp[(3) - (4)].d));     }
     break;
 
   case 359:
-#line 4261 "Gmsh.y"
-    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
+/* Line 1787 of yacc.c  */
+#line 4426 "Gmsh.y"
+    { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));}
     break;
 
   case 360:
-#line 4262 "Gmsh.y"
-    { (yyval.d) = floor((yyvsp[(3) - (4)].d) + 0.5); ;}
+/* Line 1787 of yacc.c  */
+#line 4427 "Gmsh.y"
+    { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 361:
-#line 4263 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 4428 "Gmsh.y"
+    { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 362:
-#line 4264 "Gmsh.y"
-    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 4429 "Gmsh.y"
+    { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     }
     break;
 
   case 363:
-#line 4265 "Gmsh.y"
-    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
+/* Line 1787 of yacc.c  */
+#line 4430 "Gmsh.y"
+    { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     }
     break;
 
   case 364:
-#line 4266 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
+/* Line 1787 of yacc.c  */
+#line 4431 "Gmsh.y"
+    { (yyval.d) = floor((yyvsp[(3) - (4)].d));    }
     break;
 
   case 365:
-#line 4275 "Gmsh.y"
-    { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
+/* Line 1787 of yacc.c  */
+#line 4432 "Gmsh.y"
+    { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     }
     break;
 
   case 366:
-#line 4276 "Gmsh.y"
-    { (yyval.d) = 3.141592653589793; ;}
+/* Line 1787 of yacc.c  */
+#line 4433 "Gmsh.y"
+    { (yyval.d) = floor((yyvsp[(3) - (4)].d) + 0.5); }
     break;
 
   case 367:
-#line 4277 "Gmsh.y"
-    { (yyval.d) = Msg::GetCommRank(); ;}
+/* Line 1787 of yacc.c  */
+#line 4434 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 368:
-#line 4278 "Gmsh.y"
-    { (yyval.d) = Msg::GetCommSize(); ;}
+/* Line 1787 of yacc.c  */
+#line 4435 "Gmsh.y"
+    { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); }
     break;
 
   case 369:
-#line 4279 "Gmsh.y"
-    { (yyval.d) = GetGmshMajorVersion(); ;}
+/* Line 1787 of yacc.c  */
+#line 4436 "Gmsh.y"
+    { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); }
     break;
 
   case 370:
-#line 4280 "Gmsh.y"
-    { (yyval.d) = GetGmshMinorVersion(); ;}
+/* Line 1787 of yacc.c  */
+#line 4437 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; }
     break;
 
   case 371:
-#line 4281 "Gmsh.y"
-    { (yyval.d) = GetGmshPatchVersion(); ;}
+/* Line 1787 of yacc.c  */
+#line 4446 "Gmsh.y"
+    { (yyval.d) = (yyvsp[(1) - (1)].d); }
     break;
 
   case 372:
-#line 4282 "Gmsh.y"
-    { (yyval.d) = Cpu(); ;}
+/* Line 1787 of yacc.c  */
+#line 4447 "Gmsh.y"
+    { (yyval.d) = 3.141592653589793; }
     break;
 
   case 373:
-#line 4283 "Gmsh.y"
-    { (yyval.d) = GetMemoryUsage()/1024./1024.; ;}
+/* Line 1787 of yacc.c  */
+#line 4448 "Gmsh.y"
+    { (yyval.d) = Msg::GetCommRank(); }
     break;
 
   case 374:
-#line 4284 "Gmsh.y"
-    { (yyval.d) = TotalRam(); ;}
+/* Line 1787 of yacc.c  */
+#line 4449 "Gmsh.y"
+    { (yyval.d) = Msg::GetCommSize(); }
     break;
 
   case 375:
-#line 4289 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+/* Line 1787 of yacc.c  */
+#line 4450 "Gmsh.y"
+    { (yyval.d) = GetGmshMajorVersion(); }
     break;
 
   case 376:
-#line 4291 "Gmsh.y"
+/* Line 1787 of yacc.c  */
+#line 4451 "Gmsh.y"
+    { (yyval.d) = GetGmshMinorVersion(); }
+    break;
+
+  case 377:
+/* Line 1787 of yacc.c  */
+#line 4452 "Gmsh.y"
+    { (yyval.d) = GetGmshPatchVersion(); }
+    break;
+
+  case 378:
+/* Line 1787 of yacc.c  */
+#line 4453 "Gmsh.y"
+    { (yyval.d) = Cpu(); }
+    break;
+
+  case 379:
+/* Line 1787 of yacc.c  */
+#line 4454 "Gmsh.y"
+    { (yyval.d) = GetMemoryUsage()/1024./1024.; }
+    break;
+
+  case 380:
+/* Line 1787 of yacc.c  */
+#line 4455 "Gmsh.y"
+    { (yyval.d) = TotalRam(); }
+    break;
+
+  case 381:
+/* Line 1787 of yacc.c  */
+#line 4460 "Gmsh.y"
+    { floatOptions.clear(); charOptions.clear(); }
+    break;
+
+  case 382:
+/* Line 1787 of yacc.c  */
+#line 4462 "Gmsh.y"
     {
       std::vector<double> val(1, (yyvsp[(3) - (6)].d));
       Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions);
       (yyval.d) = val[0];
-    ;}
+    }
     break;
 
-  case 377:
-#line 4297 "Gmsh.y"
+  case 383:
+/* Line 1787 of yacc.c  */
+#line 4468 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));
@@ -9393,11 +10141,12 @@ yyreduce:
           (yyval.d) = s.value[0];
       }
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
-  case 378:
-#line 4314 "Gmsh.y"
+  case 384:
+/* Line 1787 of yacc.c  */
+#line 4485 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -9414,11 +10163,12 @@ yyreduce:
           (yyval.d) = s.value[index];
       }
       Free((yyvsp[(1) - (4)].c));
-    ;}
+    }
     break;
 
-  case 379:
-#line 4332 "Gmsh.y"
+  case 385:
+/* Line 1787 of yacc.c  */
+#line 4503 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -9435,28 +10185,31 @@ yyreduce:
           (yyval.d) = s.value[index];
       }
       Free((yyvsp[(1) - (4)].c));
-    ;}
+    }
     break;
 
-  case 380:
-#line 4350 "Gmsh.y"
+  case 386:
+/* Line 1787 of yacc.c  */
+#line 4521 "Gmsh.y"
     {
       (yyval.d) = gmsh_yysymbols.count((yyvsp[(3) - (4)].c));
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 381:
-#line 4355 "Gmsh.y"
+  case 387:
+/* Line 1787 of yacc.c  */
+#line 4526 "Gmsh.y"
     {
       std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c));
       (yyval.d) = !StatFile(tmp);
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 382:
-#line 4361 "Gmsh.y"
+  case 388:
+/* Line 1787 of yacc.c  */
+#line 4532 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
@@ -9467,11 +10220,12 @@ yyreduce:
 	(yyval.d) = s.value.size();
       }
       Free((yyvsp[(2) - (4)].c));
-    ;}
+    }
     break;
 
-  case 383:
-#line 4373 "Gmsh.y"
+  case 389:
+/* Line 1787 of yacc.c  */
+#line 4544 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
@@ -9487,11 +10241,12 @@ yyreduce:
           (yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i));
       }
       Free((yyvsp[(1) - (2)].c));
-    ;}
+    }
     break;
 
-  case 384:
-#line 4390 "Gmsh.y"
+  case 390:
+/* Line 1787 of yacc.c  */
+#line 4561 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -9508,11 +10263,12 @@ yyreduce:
           (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
       }
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
-  case 385:
-#line 4408 "Gmsh.y"
+  case 391:
+/* Line 1787 of yacc.c  */
+#line 4579 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -9529,27 +10285,30 @@ yyreduce:
           (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
       }
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
-  case 386:
-#line 4429 "Gmsh.y"
+  case 392:
+/* Line 1787 of yacc.c  */
+#line 4600 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d));
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 387:
-#line 4434 "Gmsh.y"
+  case 393:
+/* Line 1787 of yacc.c  */
+#line 4605 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d));
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
-    ;}
+    }
     break;
 
-  case 388:
-#line 4439 "Gmsh.y"
+  case 394:
+/* Line 1787 of yacc.c  */
+#line 4610 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
@@ -9558,11 +10317,12 @@ yyreduce:
 	(yyval.d) = d;
       }
       Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 389:
-#line 4449 "Gmsh.y"
+  case 395:
+/* Line 1787 of yacc.c  */
+#line 4620 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
@@ -9571,19 +10331,36 @@ yyreduce:
 	(yyval.d) = d;
       }
       Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c));
-    ;}
+    }
     break;
 
-  case 390:
-#line 4459 "Gmsh.y"
+  case 396:
+/* Line 1787 of yacc.c  */
+#line 4630 "Gmsh.y"
     {
       (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
-    ;}
+    }
     break;
 
-  case 391:
-#line 4464 "Gmsh.y"
+  case 397:
+/* Line 1787 of yacc.c  */
+#line 4635 "Gmsh.y"
+    {
+      int matches = 0;
+      for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
+        double d;
+        List_Read((yyvsp[(3) - (6)].l), i, &d);
+        matches += List_Search((yyvsp[(5) - (6)].l), &d, fcmp_double);
+      }
+      (yyval.d) = matches;
+      Free((yyvsp[(3) - (6)].l)); Free((yyvsp[(5) - (6)].l));
+    }
+    break;
+
+  case 398:
+/* Line 1787 of yacc.c  */
+#line 4646 "Gmsh.y"
     {
       std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c));
       if(s.find(substr) != std::string::npos)
@@ -9591,19 +10368,21 @@ yyreduce:
       else
         (yyval.d) = 0.;
       Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
-  case 392:
-#line 4473 "Gmsh.y"
+  case 399:
+/* Line 1787 of yacc.c  */
+#line 4655 "Gmsh.y"
     {
       (yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
-  case 393:
-#line 4478 "Gmsh.y"
+  case 400:
+/* Line 1787 of yacc.c  */
+#line 4660 "Gmsh.y"
     {
       int align = 0, font = 0, fontsize = CTX::instance()->glFontSize;
       if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){
@@ -9626,148 +10405,167 @@ yyreduce:
       }
       List_Delete((yyvsp[(3) - (4)].l));
       (yyval.d) = (double)((align<<16)|(font<<8)|(fontsize));
-    ;}
+    }
     break;
 
-  case 394:
-#line 4505 "Gmsh.y"
+  case 401:
+/* Line 1787 of yacc.c  */
+#line 4687 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
-    ;}
+    }
     break;
 
-  case 395:
-#line 4509 "Gmsh.y"
+  case 402:
+/* Line 1787 of yacc.c  */
+#line 4691 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
-  case 396:
-#line 4513 "Gmsh.y"
+  case 403:
+/* Line 1787 of yacc.c  */
+#line 4695 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
-    ;}
+    }
     break;
 
-  case 397:
-#line 4517 "Gmsh.y"
+  case 404:
+/* Line 1787 of yacc.c  */
+#line 4699 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
-    ;}
+    }
     break;
 
-  case 398:
-#line 4521 "Gmsh.y"
+  case 405:
+/* Line 1787 of yacc.c  */
+#line 4703 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
-    ;}
+    }
     break;
 
-  case 399:
-#line 4528 "Gmsh.y"
+  case 406:
+/* Line 1787 of yacc.c  */
+#line 4710 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (11)].d);  (yyval.v)[1] = (yyvsp[(4) - (11)].d);  (yyval.v)[2] = (yyvsp[(6) - (11)].d);  (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d);
-    ;}
+    }
     break;
 
-  case 400:
-#line 4532 "Gmsh.y"
+  case 407:
+/* Line 1787 of yacc.c  */
+#line 4714 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (9)].d);  (yyval.v)[1] = (yyvsp[(4) - (9)].d);  (yyval.v)[2] = (yyvsp[(6) - (9)].d);  (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0;
-    ;}
+    }
     break;
 
-  case 401:
-#line 4536 "Gmsh.y"
+  case 408:
+/* Line 1787 of yacc.c  */
+#line 4718 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
-    ;}
+    }
     break;
 
-  case 402:
-#line 4540 "Gmsh.y"
+  case 409:
+/* Line 1787 of yacc.c  */
+#line 4722 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
-    ;}
+    }
     break;
 
-  case 403:
-#line 4547 "Gmsh.y"
+  case 410:
+/* Line 1787 of yacc.c  */
+#line 4729 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
-    ;}
+    }
     break;
 
-  case 404:
-#line 4552 "Gmsh.y"
+  case 411:
+/* Line 1787 of yacc.c  */
+#line 4734 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
-    ;}
+    }
     break;
 
-  case 405:
-#line 4559 "Gmsh.y"
+  case 412:
+/* Line 1787 of yacc.c  */
+#line 4741 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
-    ;}
+    }
     break;
 
-  case 406:
-#line 4564 "Gmsh.y"
+  case 413:
+/* Line 1787 of yacc.c  */
+#line 4746 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
-  case 407:
-#line 4568 "Gmsh.y"
+  case 414:
+/* Line 1787 of yacc.c  */
+#line 4750 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
-    ;}
+    }
     break;
 
-  case 408:
-#line 4573 "Gmsh.y"
+  case 415:
+/* Line 1787 of yacc.c  */
+#line 4755 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
-    ;}
+    }
     break;
 
-  case 409:
-#line 4577 "Gmsh.y"
+  case 416:
+/* Line 1787 of yacc.c  */
+#line 4759 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) = - (*pd);
       }
-    ;}
+    }
     break;
 
-  case 410:
-#line 4585 "Gmsh.y"
+  case 417:
+/* Line 1787 of yacc.c  */
+#line 4767 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) *= (yyvsp[(1) - (5)].d);
       }
-    ;}
+    }
     break;
 
-  case 411:
-#line 4596 "Gmsh.y"
+  case 418:
+/* Line 1787 of yacc.c  */
+#line 4778 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
-  case 412:
-#line 4600 "Gmsh.y"
+  case 419:
+/* Line 1787 of yacc.c  */
+#line 4782 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
         (yyval.l) = 0;
@@ -9775,43 +10573,47 @@ yyreduce:
         yyerror("Unknown special string for list replacement");
         (yyval.l) = List_Create(2, 1, sizeof(double));
       }
-    ;}
+    }
     break;
 
-  case 413:
-#line 4612 "Gmsh.y"
+  case 420:
+/* Line 1787 of yacc.c  */
+#line 4794 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) = - (*pd);
       }
-    ;}
+    }
     break;
 
-  case 414:
-#line 4620 "Gmsh.y"
+  case 421:
+/* Line 1787 of yacc.c  */
+#line 4802 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
 	double *pd = (double*)List_Pointer((yyval.l), i);
 	(*pd) *= (yyvsp[(1) - (3)].d);
       }
-    ;}
+    }
     break;
 
-  case 415:
-#line 4628 "Gmsh.y"
+  case 422:
+/* Line 1787 of yacc.c  */
+#line 4810 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d));
           ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.))
 	List_Add((yyval.l), &d);
-    ;}
+    }
     break;
 
-  case 416:
-#line 4635 "Gmsh.y"
+  case 423:
+/* Line 1787 of yacc.c  */
+#line 4817 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!(yyvsp[(5) - (5)].d)){  //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0)
@@ -9820,11 +10622,12 @@ yyreduce:
       else
 	for(double d = (yyvsp[(1) - (5)].d); ((yyvsp[(5) - (5)].d) > 0) ? (d <= (yyvsp[(3) - (5)].d)) : (d >= (yyvsp[(3) - (5)].d)); d += (yyvsp[(5) - (5)].d))
 	  List_Add((yyval.l), &d);
-   ;}
+   }
     break;
 
-  case 417:
-#line 4645 "Gmsh.y"
+  case 424:
+/* Line 1787 of yacc.c  */
+#line 4827 "Gmsh.y"
     {
       // Returns the coordinates of a point and fills a list with it.
       // This allows to ensure e.g. that relative point positions are
@@ -9832,50 +10635,96 @@ yyreduce:
       Vertex *v = FindPoint((int)(yyvsp[(3) - (4)].d));
       (yyval.l) = List_Create(3, 1, sizeof(double));
       if(!v) {
-	yymsg(0, "Unknown point '%d'", (int)(yyvsp[(3) - (4)].d));
-	double d = 0.0;
-	List_Add((yyval.l), &d);
-	List_Add((yyval.l), &d);
-	List_Add((yyval.l), &d);
+        GVertex *gv = GModel::current()->getVertexByTag((int)(yyvsp[(3) - (4)].d));
+        if(gv){
+          double x = gv->x(), y = gv->y(), z = gv->z();
+          List_Add((yyval.l), &x);
+          List_Add((yyval.l), &y);
+          List_Add((yyval.l), &z);
+        }
+        else{
+          yymsg(0, "Unknown point '%d'", (int)(yyvsp[(3) - (4)].d));
+          double d = 0.0;
+          List_Add((yyval.l), &d);
+          List_Add((yyval.l), &d);
+          List_Add((yyval.l), &d);
+        }
       }
       else{
 	List_Add((yyval.l), &v->Pos.X);
 	List_Add((yyval.l), &v->Pos.Y);
 	List_Add((yyval.l), &v->Pos.Z);
       }
-    ;}
+    }
+    break;
+
+  case 425:
+/* Line 1787 of yacc.c  */
+#line 4856 "Gmsh.y"
+    {
+      (yyval.l) = GetAllElementaryEntityNumbers(0);
+    }
+    break;
+
+  case 426:
+/* Line 1787 of yacc.c  */
+#line 4860 "Gmsh.y"
+    {
+      (yyval.l) = GetAllElementaryEntityNumbers(1);
+    }
+    break;
+
+  case 427:
+/* Line 1787 of yacc.c  */
+#line 4864 "Gmsh.y"
+    {
+      (yyval.l) = GetAllElementaryEntityNumbers(2);
+    }
     break;
 
-  case 418:
-#line 4665 "Gmsh.y"
+  case 428:
+/* Line 1787 of yacc.c  */
+#line 4868 "Gmsh.y"
     {
-      (yyval.l) = GetAllEntityNumbers(0);
-    ;}
+      (yyval.l) = GetAllElementaryEntityNumbers(3);
+    }
     break;
 
-  case 419:
-#line 4669 "Gmsh.y"
+  case 429:
+/* Line 1787 of yacc.c  */
+#line 4872 "Gmsh.y"
     {
-      (yyval.l) = GetAllEntityNumbers(1);
-    ;}
+      (yyval.l) = GetAllPhysicalEntityNumbers(0);
+    }
     break;
 
-  case 420:
-#line 4673 "Gmsh.y"
+  case 430:
+/* Line 1787 of yacc.c  */
+#line 4876 "Gmsh.y"
     {
-      (yyval.l) = GetAllEntityNumbers(2);
-    ;}
+      (yyval.l) = GetAllPhysicalEntityNumbers(1);
+    }
     break;
 
-  case 421:
-#line 4677 "Gmsh.y"
+  case 431:
+/* Line 1787 of yacc.c  */
+#line 4880 "Gmsh.y"
     {
-      (yyval.l) = GetAllEntityNumbers(3);
-    ;}
+      (yyval.l) = GetAllPhysicalEntityNumbers(2);
+    }
     break;
 
-  case 422:
-#line 4681 "Gmsh.y"
+  case 432:
+/* Line 1787 of yacc.c  */
+#line 4884 "Gmsh.y"
+    {
+      (yyval.l) = GetAllPhysicalEntityNumbers(3);
+    }
+    break;
+
+  case 433:
+/* Line 1787 of yacc.c  */
+#line 4888 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9891,10 +10740,10 @@ yyreduce:
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[0].find((int)num);
-          if(it != groups[0].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(0, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add((yyval.l), &d);
@@ -9903,11 +10752,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 423:
-#line 4710 "Gmsh.y"
+  case 434:
+/* Line 1787 of yacc.c  */
+#line 4917 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9923,10 +10773,10 @@ yyreduce:
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[1].find((int)num);
-          if(it != groups[1].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(1, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add((yyval.l), &d);
@@ -9935,11 +10785,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 424:
-#line 4739 "Gmsh.y"
+  case 435:
+/* Line 1787 of yacc.c  */
+#line 4946 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9955,10 +10806,10 @@ yyreduce:
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[2].find((int)num);
-          if(it != groups[2].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(2, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add((yyval.l), &d);
@@ -9967,11 +10818,12 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 425:
-#line 4768 "Gmsh.y"
+  case 436:
+/* Line 1787 of yacc.c  */
+#line 4975 "Gmsh.y"
     {
       (yyval.l) = List_Create(10, 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
@@ -9987,10 +10839,10 @@ yyreduce:
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[3].find((int)num);
-          if(it != groups[3].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(3, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add((yyval.l), &d);
@@ -9999,11 +10851,76 @@ yyreduce:
         }
       }
       List_Delete((yyvsp[(4) - (5)].l));
-    ;}
+    }
     break;
 
-  case 426:
-#line 4797 "Gmsh.y"
+  case 437:
+/* Line 1787 of yacc.c  */
+#line 5005 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box((yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d));
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 0);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add((yyval.l), &d);
+      }
+    }
+    break;
+
+  case 438:
+/* Line 1787 of yacc.c  */
+#line 5018 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box((yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d));
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 1);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add((yyval.l), &d);
+      }
+    }
+    break;
+
+  case 439:
+/* Line 1787 of yacc.c  */
+#line 5031 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box((yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d));
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 2);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add((yyval.l), &d);
+      }
+    }
+    break;
+
+  case 440:
+/* Line 1787 of yacc.c  */
+#line 5044 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box((yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d));
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 3);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add((yyval.l), &d);
+      }
+    }
+    break;
+
+  case 441:
+/* Line 1787 of yacc.c  */
+#line 5056 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -10012,11 +10929,12 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(1) - (1)].l));
-    ;}
+    }
     break;
 
-  case 427:
-#line 4807 "Gmsh.y"
+  case 442:
+/* Line 1787 of yacc.c  */
+#line 5066 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -10025,11 +10943,12 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(1) - (1)].l));
-    ;}
+    }
     break;
 
-  case 428:
-#line 4817 "Gmsh.y"
+  case 443:
+/* Line 1787 of yacc.c  */
+#line 5076 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -10040,11 +10959,28 @@ yyreduce:
 	  List_Add((yyval.l), &s.value[i]);
       }
       Free((yyvsp[(1) - (3)].c));
-    ;}
+    }
     break;
 
-  case 429:
-#line 4829 "Gmsh.y"
+  case 444:
+/* Line 1787 of yacc.c  */
+#line 5088 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(2, 1, sizeof(double));
+      if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
+	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
+      else{
+        gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (3)].c)]);
+	for(unsigned int i = 0; i < s.value.size(); i++)
+	  List_Add((yyval.l), &s.value[i]);
+      }
+      Free((yyvsp[(1) - (3)].c));
+    }
+    break;
+
+  case 445:
+/* Line 1787 of yacc.c  */
+#line 5100 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c)))
@@ -10055,11 +10991,12 @@ yyreduce:
 	  List_Add((yyval.l), &s.value[i]);
       }
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 430:
-#line 4841 "Gmsh.y"
+  case 446:
+/* Line 1787 of yacc.c  */
+#line 5112 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -10076,33 +11013,59 @@ yyreduce:
       }
       Free((yyvsp[(1) - (6)].c));
       List_Delete((yyvsp[(4) - (6)].l));
-    ;}
+    }
     break;
 
-  case 431:
-#line 4862 "Gmsh.y"
+  case 447:
+/* Line 1787 of yacc.c  */
+#line 5130 "Gmsh.y"
+    {
+      (yyval.l) = List_Create(2, 1, sizeof(double));
+      if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
+	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c));
+      else{
+        gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]);
+	for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
+	  int index = (int)(*(double*)List_Pointer_Fast((yyvsp[(4) - (6)].l), i));
+	  if((int)s.value.size() < index + 1)
+	    yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), index);
+	  else
+	    List_Add((yyval.l), &s.value[index]);
+	}
+      }
+      Free((yyvsp[(1) - (6)].c));
+      List_Delete((yyvsp[(4) - (6)].l));
+    }
+    break;
+
+  case 448:
+/* Line 1787 of yacc.c  */
+#line 5151 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
-    ;}
+    }
     break;
 
-  case 432:
-#line 4867 "Gmsh.y"
+  case 449:
+/* Line 1787 of yacc.c  */
+#line 5156 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
-    ;}
+    }
     break;
 
-  case 433:
-#line 4871 "Gmsh.y"
+  case 450:
+/* Line 1787 of yacc.c  */
+#line 5160 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
-    ;}
+    }
     break;
 
-  case 434:
-#line 4875 "Gmsh.y"
+  case 451:
+/* Line 1787 of yacc.c  */
+#line 5164 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -10110,52 +11073,58 @@ yyreduce:
 	List_Add((yyval.l), &d);
       }
       List_Delete((yyvsp[(3) - (3)].l));
-    ;}
+    }
     break;
 
-  case 435:
-#line 4887 "Gmsh.y"
+  case 452:
+/* Line 1787 of yacc.c  */
+#line 5176 "Gmsh.y"
     {
       (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
-    ;}
+    }
     break;
 
-  case 436:
-#line 4891 "Gmsh.y"
+  case 453:
+/* Line 1787 of yacc.c  */
+#line 5180 "Gmsh.y"
     {
       (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
-    ;}
+    }
     break;
 
-  case 437:
-#line 4903 "Gmsh.y"
+  case 454:
+/* Line 1787 of yacc.c  */
+#line 5192 "Gmsh.y"
     {
       int flag;
       (yyval.u) = GetColorForString(-1, (yyvsp[(1) - (1)].c), &flag);
       if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c));
       Free((yyvsp[(1) - (1)].c));
-    ;}
+    }
     break;
 
-  case 438:
-#line 4910 "Gmsh.y"
+  case 455:
+/* Line 1787 of yacc.c  */
+#line 5199 "Gmsh.y"
     {
       unsigned int val = 0;
       ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
       (yyval.u) = val;
       Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c));
-    ;}
+    }
     break;
 
-  case 439:
-#line 4920 "Gmsh.y"
+  case 456:
+/* Line 1787 of yacc.c  */
+#line 5209 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
-    ;}
+    }
     break;
 
-  case 440:
-#line 4924 "Gmsh.y"
+  case 457:
+/* Line 1787 of yacc.c  */
+#line 5213 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d));
@@ -10166,33 +11135,37 @@ yyreduce:
 	  List_Add((yyval.l), &ct->table[i]);
       }
       Free((yyvsp[(1) - (6)].c));
-    ;}
+    }
     break;
 
-  case 441:
-#line 4939 "Gmsh.y"
+  case 458:
+/* Line 1787 of yacc.c  */
+#line 5228 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
-    ;}
+    }
     break;
 
-  case 442:
-#line 4944 "Gmsh.y"
+  case 459:
+/* Line 1787 of yacc.c  */
+#line 5233 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
-    ;}
+    }
     break;
 
-  case 443:
-#line 4951 "Gmsh.y"
+  case 460:
+/* Line 1787 of yacc.c  */
+#line 5240 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
-    ;}
+    }
     break;
 
-  case 444:
-#line 4955 "Gmsh.y"
+  case 461:
+/* Line 1787 of yacc.c  */
+#line 5244 "Gmsh.y"
     {
       if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
@@ -10204,93 +11177,109 @@ yyreduce:
 	strcpy((yyval.c), val.c_str());
 	Free((yyvsp[(1) - (1)].c));
       }
-    ;}
+    }
     break;
 
-  case 445:
-#line 4968 "Gmsh.y"
+  case 462:
+/* Line 1787 of yacc.c  */
+#line 5257 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out);
       (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
       strcpy((yyval.c), out.c_str());
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
-    ;}
+    }
     break;
 
-  case 446:
-#line 4976 "Gmsh.y"
+  case 463:
+/* Line 1787 of yacc.c  */
+#line 5265 "Gmsh.y"
     {
       std::string out;
       StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out);
       (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char));
       strcpy((yyval.c), out.c_str());
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
-    ;}
+    }
     break;
 
-  case 447:
-#line 4987 "Gmsh.y"
+  case 464:
+/* Line 1787 of yacc.c  */
+#line 5276 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
-    ;}
+    }
     break;
 
-  case 448:
-#line 4991 "Gmsh.y"
+  case 465:
+/* Line 1787 of yacc.c  */
+#line 5280 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32 * sizeof(char));
       time_t now;
       time(&now);
       strcpy((yyval.c), ctime(&now));
       (yyval.c)[strlen((yyval.c)) - 1] = '\0';
-    ;}
+    }
     break;
 
-  case 449:
-#line 4999 "Gmsh.y"
+  case 466:
+/* Line 1787 of yacc.c  */
+#line 5288 "Gmsh.y"
     {
       std::string action = Msg::GetGmshOnelabAction();
       (yyval.c) = (char *)Malloc(action.size() + 1);
       strcpy((yyval.c), action.c_str());
-    ;}
+    }
     break;
 
-  case 450:
-#line 5005 "Gmsh.y"
+  case 467:
+/* Line 1787 of yacc.c  */
+#line 5294 "Gmsh.y"
     {
       const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c));
       if(!env) env = "";
       (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char));
       strcpy((yyval.c), env);
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 451:
-#line 5013 "Gmsh.y"
+  case 468:
+/* Line 1787 of yacc.c  */
+#line 5302 "Gmsh.y"
     {
       std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
       strcpy((yyval.c), s.c_str());
       Free((yyvsp[(3) - (6)].c));
       Free((yyvsp[(5) - (6)].c));
-    ;}
+    }
     break;
 
-  case 452:
-#line 5021 "Gmsh.y"
+  case 469:
+/* Line 1787 of yacc.c  */
+#line 5310 "Gmsh.y"
     {
-      (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char));
-      strcpy((yyval.c), (yyvsp[(3) - (6)].c));
-      strcat((yyval.c), (yyvsp[(5) - (6)].c));
-      Free((yyvsp[(3) - (6)].c));
-      Free((yyvsp[(5) - (6)].c));
-    ;}
+      int size = 1;
+      for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
+        size += strlen(*(char**)List_Pointer((yyvsp[(3) - (4)].l), i)) + 1;
+      (yyval.c) = (char*)Malloc(size * sizeof(char));
+      (yyval.c)[0] = '\0';
+      for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
+        char *s;
+        List_Read((yyvsp[(3) - (4)].l), i, &s);
+        strcat((yyval.c), s);
+        Free(s);
+      }
+      List_Delete((yyvsp[(3) - (4)].l));
+    }
     break;
 
-  case 453:
-#line 5029 "Gmsh.y"
+  case 470:
+/* Line 1787 of yacc.c  */
+#line 5325 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10303,11 +11292,12 @@ yyreduce:
       }
       if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c));
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 454:
-#line 5043 "Gmsh.y"
+  case 471:
+/* Line 1787 of yacc.c  */
+#line 5339 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -10320,11 +11310,12 @@ yyreduce:
       else
 	strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]);
       Free((yyvsp[(3) - (4)].c));
-    ;}
+    }
     break;
 
-  case 455:
-#line 5057 "Gmsh.y"
+  case 472:
+/* Line 1787 of yacc.c  */
+#line 5353 "Gmsh.y"
     {
       std::string input = (yyvsp[(3) - (8)].c);
       std::string substr_old = (yyvsp[(5) - (8)].c);
@@ -10335,13 +11326,14 @@ yyreduce:
       Free((yyvsp[(3) - (8)].c));
       Free((yyvsp[(5) - (8)].c));
       Free((yyvsp[(7) - (8)].c));
-    ;}
+    }
     break;
 
-  case 456:
-#line 5069 "Gmsh.y"
+  case 473:
+/* Line 1787 of yacc.c  */
+#line 5365 "Gmsh.y"
     {
-      int size = 0;
+      int size = 1;
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
         size += strlen(*(char**)List_Pointer((yyvsp[(3) - (4)].l), i)) + 1;
       (yyval.c) = (char*)Malloc(size * sizeof(char));
@@ -10354,18 +11346,35 @@ yyreduce:
         if(i != List_Nbr((yyvsp[(3) - (4)].l)) - 1) strcat((yyval.c), "\n");
       }
       List_Delete((yyvsp[(3) - (4)].l));
-    ;}
+    }
     break;
 
-  case 457:
-#line 5085 "Gmsh.y"
+  case 474:
+/* Line 1787 of yacc.c  */
+#line 5381 "Gmsh.y"
+    {
+      if((yyvsp[(3) - (8)].d)){
+        (yyval.c) = (yyvsp[(5) - (8)].c);
+        Free((yyvsp[(7) - (8)].c));
+      }
+      else{
+        (yyval.c) = (yyvsp[(7) - (8)].c);
+        Free((yyvsp[(5) - (8)].c));
+      }
+    }
+    break;
+
+  case 475:
+/* Line 1787 of yacc.c  */
+#line 5392 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
-    ;}
+    }
     break;
 
-  case 458:
-#line 5089 "Gmsh.y"
+  case 476:
+/* Line 1787 of yacc.c  */
+#line 5396 "Gmsh.y"
     {
       char tmpstring[5000];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -10383,75 +11392,105 @@ yyreduce:
 	Free((yyvsp[(3) - (6)].c));
       }
       List_Delete((yyvsp[(5) - (6)].l));
-    ;}
+    }
     break;
 
-  case 459:
-#line 5108 "Gmsh.y"
-    { floatOptions.clear(); charOptions.clear(); ;}
+  case 477:
+/* Line 1787 of yacc.c  */
+#line 5415 "Gmsh.y"
+    {
+      std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c));
+      (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char));
+      strcpy((yyval.c), tmp.c_str());
+      Free((yyvsp[(3) - (4)].c));
+    }
     break;
 
-  case 460:
-#line 5110 "Gmsh.y"
+  case 478:
+/* Line 1787 of yacc.c  */
+#line 5422 "Gmsh.y"
+    { floatOptions.clear(); charOptions.clear(); }
+    break;
+
+  case 479:
+/* Line 1787 of yacc.c  */
+#line 5424 "Gmsh.y"
     {
       std::string val((yyvsp[(3) - (6)].c));
       Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions);
       (yyval.c) = (char*)Malloc((val.size() + 1) * sizeof(char));
       strcpy((yyval.c), val.c_str());
       Free((yyvsp[(3) - (6)].c));
-    ;}
+    }
     break;
 
-  case 461:
-#line 5121 "Gmsh.y"
+  case 480:
+/* Line 1787 of yacc.c  */
+#line 5435 "Gmsh.y"
     {
       (yyval.l) = List_Create(20,20,sizeof(char*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].c)));
-    ;}
+    }
     break;
 
-  case 462:
-#line 5126 "Gmsh.y"
-    { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;}
+  case 481:
+/* Line 1787 of yacc.c  */
+#line 5440 "Gmsh.y"
+    { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); }
     break;
 
-  case 463:
-#line 5132 "Gmsh.y"
+  case 482:
+/* Line 1787 of yacc.c  */
+#line 5446 "Gmsh.y"
     {
       char tmpstr[256];
       sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d));
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(1) - (5)].c))+strlen(tmpstr)+1)*sizeof(char));
       strcpy((yyval.c), (yyvsp[(1) - (5)].c)); strcat((yyval.c), tmpstr);
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
-  case 464:
-#line 5141 "Gmsh.y"
+  case 483:
+/* Line 1787 of yacc.c  */
+#line 5455 "Gmsh.y"
     {
       char tmpstr[256];
       sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d));
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(1) - (5)].c))+strlen(tmpstr)+1)*sizeof(char)) ;
       strcpy((yyval.c), (yyvsp[(1) - (5)].c)) ; strcat((yyval.c), tmpstr) ;
       Free((yyvsp[(1) - (5)].c));
-    ;}
+    }
     break;
 
-  case 465:
-#line 5154 "Gmsh.y"
-    { (yyval.c) = (yyvsp[(1) - (1)].c); ;}
+  case 484:
+/* Line 1787 of yacc.c  */
+#line 5468 "Gmsh.y"
+    { (yyval.c) = (yyvsp[(1) - (1)].c); }
     break;
 
-  case 466:
-#line 5157 "Gmsh.y"
-    { (yyval.c) = (yyvsp[(1) - (1)].c); ;}
+  case 485:
+/* Line 1787 of yacc.c  */
+#line 5471 "Gmsh.y"
+    { (yyval.c) = (yyvsp[(1) - (1)].c); }
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 10453 "Gmsh.tab.cpp"
+/* Line 1787 of yacc.c  */
+#line 11481 "Gmsh.tab.cpp"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -10460,7 +11499,6 @@ yyreduce:
 
   *++yyvsp = yyval;
 
-
   /* Now `shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
@@ -10480,6 +11518,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -10487,37 +11529,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -10525,7 +11566,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -10542,7 +11583,7 @@ yyerrlab:
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -10576,7 +11617,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -10599,10 +11640,9 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
 
   /* Shift the error token.  */
@@ -10626,7 +11666,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -10637,9 +11677,14 @@ yyexhaustedlab:
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -10663,7 +11708,8 @@ yyreturn:
 }
 
 
-#line 5161 "Gmsh.y"
+/* Line 2050 of yacc.c  */
+#line 5475 "Gmsh.y"
 
 
 void assignVariable(const std::string &name, int index, int assignType,
@@ -10821,6 +11867,7 @@ void PrintParserSymbols(bool help, std::vector<std::string> &vec)
       it != gmsh_yysymbols.end(); it++){
     gmsh_yysymbol s(it->second);
     std::ostringstream sstream;
+    sstream.precision(12);
     sstream << it->first;
     if(s.list){
       sstream << "[] = {";
@@ -10889,7 +11936,7 @@ void yymsg(int level, const char *fmt, ...)
     Msg::Error("'%s', line %d : %s", gmsh_yyname.c_str(), gmsh_yylineno - 1, tmp);
     gmsh_yyerrorstate++;
   }
-  else
+  else{
     Msg::Warning("'%s', line %d : %s", gmsh_yyname.c_str(), gmsh_yylineno - 1, tmp);
+  }
 }
-
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index 4d0de63..d8a8e21 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.7.12-4996.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,20 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+#ifndef YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
+# define YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gmsh_yydebug;
+#endif
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -81,303 +88,142 @@
      tStrPrefix = 297,
      tStrRelative = 298,
      tStrReplace = 299,
-     tStrFind = 300,
-     tStrCmp = 301,
-     tTextAttributes = 302,
-     tBoundingBox = 303,
-     tDraw = 304,
-     tSetChanged = 305,
-     tToday = 306,
-     tOnelabAction = 307,
-     tSyncModel = 308,
-     tCpu = 309,
-     tMemory = 310,
-     tTotalMemory = 311,
-     tCreateTopology = 312,
-     tCreateTopologyNoHoles = 313,
-     tDistanceFunction = 314,
-     tDefineConstant = 315,
-     tUndefineConstant = 316,
-     tDefineNumber = 317,
-     tDefineString = 318,
-     tPoint = 319,
-     tCircle = 320,
-     tEllipse = 321,
-     tLine = 322,
-     tSphere = 323,
-     tPolarSphere = 324,
-     tSurface = 325,
-     tSpline = 326,
-     tVolume = 327,
-     tCharacteristic = 328,
-     tLength = 329,
-     tParametric = 330,
-     tElliptic = 331,
-     tRefineMesh = 332,
-     tAdaptMesh = 333,
-     tRelocateMesh = 334,
-     tPlane = 335,
-     tRuled = 336,
-     tTransfinite = 337,
-     tComplex = 338,
-     tPhysical = 339,
-     tCompound = 340,
-     tPeriodic = 341,
-     tUsing = 342,
-     tPlugin = 343,
-     tDegenerated = 344,
-     tRecursive = 345,
-     tRotate = 346,
-     tTranslate = 347,
-     tSymmetry = 348,
-     tDilate = 349,
-     tExtrude = 350,
-     tLevelset = 351,
-     tRecombine = 352,
-     tSmoother = 353,
-     tSplit = 354,
-     tDelete = 355,
-     tCoherence = 356,
-     tIntersect = 357,
-     tMeshAlgorithm = 358,
-     tReverse = 359,
-     tLayers = 360,
-     tScaleLast = 361,
-     tHole = 362,
-     tAlias = 363,
-     tAliasWithOptions = 364,
-     tCopyOptions = 365,
-     tQuadTriAddVerts = 366,
-     tQuadTriNoNewVerts = 367,
-     tQuadTriSngl = 368,
-     tQuadTriDbl = 369,
-     tRecombLaterals = 370,
-     tTransfQuadTri = 371,
-     tText2D = 372,
-     tText3D = 373,
-     tInterpolationScheme = 374,
-     tTime = 375,
-     tCombine = 376,
-     tBSpline = 377,
-     tBezier = 378,
-     tNurbs = 379,
-     tNurbsOrder = 380,
-     tNurbsKnots = 381,
-     tColor = 382,
-     tColorTable = 383,
-     tFor = 384,
-     tIn = 385,
-     tEndFor = 386,
-     tIf = 387,
-     tEndIf = 388,
-     tExit = 389,
-     tAbort = 390,
-     tField = 391,
-     tReturn = 392,
-     tCall = 393,
-     tFunction = 394,
-     tShow = 395,
-     tHide = 396,
-     tGetValue = 397,
-     tGetEnv = 398,
-     tGetString = 399,
-     tHomology = 400,
-     tCohomology = 401,
-     tBetti = 402,
-     tSetOrder = 403,
-     tExists = 404,
-     tFileExists = 405,
-     tGMSH_MAJOR_VERSION = 406,
-     tGMSH_MINOR_VERSION = 407,
-     tGMSH_PATCH_VERSION = 408,
-     tAFFECTDIVIDE = 409,
-     tAFFECTTIMES = 410,
-     tAFFECTMINUS = 411,
-     tAFFECTPLUS = 412,
-     tOR = 413,
-     tAND = 414,
-     tNOTEQUAL = 415,
-     tEQUAL = 416,
-     tGREATEROREQUAL = 417,
-     tLESSOREQUAL = 418,
-     UNARYPREC = 419,
-     tMINUSMINUS = 420,
-     tPLUSPLUS = 421
+     tFind = 300,
+     tStrFind = 301,
+     tStrCmp = 302,
+     tStrChoice = 303,
+     tTextAttributes = 304,
+     tBoundingBox = 305,
+     tDraw = 306,
+     tSetChanged = 307,
+     tToday = 308,
+     tFixRelativePath = 309,
+     tSyncModel = 310,
+     tOnelabAction = 311,
+     tOnelabRun = 312,
+     tCpu = 313,
+     tMemory = 314,
+     tTotalMemory = 315,
+     tCreateTopology = 316,
+     tCreateTopologyNoHoles = 317,
+     tDistanceFunction = 318,
+     tDefineConstant = 319,
+     tUndefineConstant = 320,
+     tDefineNumber = 321,
+     tDefineString = 322,
+     tPoint = 323,
+     tCircle = 324,
+     tEllipse = 325,
+     tLine = 326,
+     tSphere = 327,
+     tPolarSphere = 328,
+     tSurface = 329,
+     tSpline = 330,
+     tVolume = 331,
+     tCharacteristic = 332,
+     tLength = 333,
+     tParametric = 334,
+     tElliptic = 335,
+     tRefineMesh = 336,
+     tAdaptMesh = 337,
+     tRelocateMesh = 338,
+     tPlane = 339,
+     tRuled = 340,
+     tTransfinite = 341,
+     tComplex = 342,
+     tPhysical = 343,
+     tCompound = 344,
+     tPeriodic = 345,
+     tUsing = 346,
+     tPlugin = 347,
+     tDegenerated = 348,
+     tRecursive = 349,
+     tRotate = 350,
+     tTranslate = 351,
+     tSymmetry = 352,
+     tDilate = 353,
+     tExtrude = 354,
+     tLevelset = 355,
+     tRecombine = 356,
+     tSmoother = 357,
+     tSplit = 358,
+     tDelete = 359,
+     tCoherence = 360,
+     tIntersect = 361,
+     tMeshAlgorithm = 362,
+     tReverse = 363,
+     tLayers = 364,
+     tScaleLast = 365,
+     tHole = 366,
+     tAlias = 367,
+     tAliasWithOptions = 368,
+     tCopyOptions = 369,
+     tQuadTriAddVerts = 370,
+     tQuadTriNoNewVerts = 371,
+     tQuadTriSngl = 372,
+     tQuadTriDbl = 373,
+     tRecombLaterals = 374,
+     tTransfQuadTri = 375,
+     tText2D = 376,
+     tText3D = 377,
+     tInterpolationScheme = 378,
+     tTime = 379,
+     tCombine = 380,
+     tBSpline = 381,
+     tBezier = 382,
+     tNurbs = 383,
+     tNurbsOrder = 384,
+     tNurbsKnots = 385,
+     tColor = 386,
+     tColorTable = 387,
+     tFor = 388,
+     tIn = 389,
+     tEndFor = 390,
+     tIf = 391,
+     tEndIf = 392,
+     tExit = 393,
+     tAbort = 394,
+     tField = 395,
+     tReturn = 396,
+     tCall = 397,
+     tFunction = 398,
+     tShow = 399,
+     tHide = 400,
+     tGetValue = 401,
+     tGetEnv = 402,
+     tGetString = 403,
+     tHomology = 404,
+     tCohomology = 405,
+     tBetti = 406,
+     tSetOrder = 407,
+     tExists = 408,
+     tFileExists = 409,
+     tGMSH_MAJOR_VERSION = 410,
+     tGMSH_MINOR_VERSION = 411,
+     tGMSH_PATCH_VERSION = 412,
+     tAFFECTDIVIDE = 413,
+     tAFFECTTIMES = 414,
+     tAFFECTMINUS = 415,
+     tAFFECTPLUS = 416,
+     tOR = 417,
+     tAND = 418,
+     tNOTEQUAL = 419,
+     tEQUAL = 420,
+     tGREATEROREQUAL = 421,
+     tLESSOREQUAL = 422,
+     UNARYPREC = 423,
+     tMINUSMINUS = 424,
+     tPLUSPLUS = 425
    };
 #endif
-/* Tokens.  */
-#define tDOUBLE 258
-#define tSTRING 259
-#define tBIGSTR 260
-#define tEND 261
-#define tAFFECT 262
-#define tDOTS 263
-#define tPi 264
-#define tMPI_Rank 265
-#define tMPI_Size 266
-#define tEuclidian 267
-#define tCoordinates 268
-#define tExp 269
-#define tLog 270
-#define tLog10 271
-#define tSqrt 272
-#define tSin 273
-#define tAsin 274
-#define tCos 275
-#define tAcos 276
-#define tTan 277
-#define tRand 278
-#define tAtan 279
-#define tAtan2 280
-#define tSinh 281
-#define tCosh 282
-#define tTanh 283
-#define tFabs 284
-#define tFloor 285
-#define tCeil 286
-#define tRound 287
-#define tFmod 288
-#define tModulo 289
-#define tHypot 290
-#define tList 291
-#define tPrintf 292
-#define tError 293
-#define tStr 294
-#define tSprintf 295
-#define tStrCat 296
-#define tStrPrefix 297
-#define tStrRelative 298
-#define tStrReplace 299
-#define tStrFind 300
-#define tStrCmp 301
-#define tTextAttributes 302
-#define tBoundingBox 303
-#define tDraw 304
-#define tSetChanged 305
-#define tToday 306
-#define tOnelabAction 307
-#define tSyncModel 308
-#define tCpu 309
-#define tMemory 310
-#define tTotalMemory 311
-#define tCreateTopology 312
-#define tCreateTopologyNoHoles 313
-#define tDistanceFunction 314
-#define tDefineConstant 315
-#define tUndefineConstant 316
-#define tDefineNumber 317
-#define tDefineString 318
-#define tPoint 319
-#define tCircle 320
-#define tEllipse 321
-#define tLine 322
-#define tSphere 323
-#define tPolarSphere 324
-#define tSurface 325
-#define tSpline 326
-#define tVolume 327
-#define tCharacteristic 328
-#define tLength 329
-#define tParametric 330
-#define tElliptic 331
-#define tRefineMesh 332
-#define tAdaptMesh 333
-#define tRelocateMesh 334
-#define tPlane 335
-#define tRuled 336
-#define tTransfinite 337
-#define tComplex 338
-#define tPhysical 339
-#define tCompound 340
-#define tPeriodic 341
-#define tUsing 342
-#define tPlugin 343
-#define tDegenerated 344
-#define tRecursive 345
-#define tRotate 346
-#define tTranslate 347
-#define tSymmetry 348
-#define tDilate 349
-#define tExtrude 350
-#define tLevelset 351
-#define tRecombine 352
-#define tSmoother 353
-#define tSplit 354
-#define tDelete 355
-#define tCoherence 356
-#define tIntersect 357
-#define tMeshAlgorithm 358
-#define tReverse 359
-#define tLayers 360
-#define tScaleLast 361
-#define tHole 362
-#define tAlias 363
-#define tAliasWithOptions 364
-#define tCopyOptions 365
-#define tQuadTriAddVerts 366
-#define tQuadTriNoNewVerts 367
-#define tQuadTriSngl 368
-#define tQuadTriDbl 369
-#define tRecombLaterals 370
-#define tTransfQuadTri 371
-#define tText2D 372
-#define tText3D 373
-#define tInterpolationScheme 374
-#define tTime 375
-#define tCombine 376
-#define tBSpline 377
-#define tBezier 378
-#define tNurbs 379
-#define tNurbsOrder 380
-#define tNurbsKnots 381
-#define tColor 382
-#define tColorTable 383
-#define tFor 384
-#define tIn 385
-#define tEndFor 386
-#define tIf 387
-#define tEndIf 388
-#define tExit 389
-#define tAbort 390
-#define tField 391
-#define tReturn 392
-#define tCall 393
-#define tFunction 394
-#define tShow 395
-#define tHide 396
-#define tGetValue 397
-#define tGetEnv 398
-#define tGetString 399
-#define tHomology 400
-#define tCohomology 401
-#define tBetti 402
-#define tSetOrder 403
-#define tExists 404
-#define tFileExists 405
-#define tGMSH_MAJOR_VERSION 406
-#define tGMSH_MINOR_VERSION 407
-#define tGMSH_PATCH_VERSION 408
-#define tAFFECTDIVIDE 409
-#define tAFFECTTIMES 410
-#define tAFFECTMINUS 411
-#define tAFFECTPLUS 412
-#define tOR 413
-#define tAND 414
-#define tNOTEQUAL 415
-#define tEQUAL 416
-#define tGREATEROREQUAL 417
-#define tLESSOREQUAL 418
-#define UNARYPREC 419
-#define tMINUSMINUS 420
-#define tPLUSPLUS 421
-
-
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 100 "Gmsh.y"
 {
+/* Line 2053 of yacc.c  */
+#line 99 "Gmsh.y"
+
   char *c;
   int i;
   unsigned int u;
@@ -385,14 +231,30 @@ typedef union YYSTYPE
   double v[5];
   Shape s;
   List_T *l;
-}
-/* Line 1529 of yacc.c.  */
-#line 391 "Gmsh.tab.hpp"
-	YYSTYPE;
+
+
+/* Line 2053 of yacc.c  */
+#line 238 "Gmsh.tab.hpp"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE gmsh_yylval;
 
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void *YYPARSE_PARAM);
+#else
+int gmsh_yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int gmsh_yyparse (void);
+#else
+int gmsh_yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED  */
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index e557d10..4d23c71 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,5 +1,5 @@
 %{
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -67,7 +67,6 @@ static std::vector<double> ViewCoord;
 static std::vector<double> *ViewValueList = 0;
 static int *ViewNumList = 0;
 static ExtrudeParams extr;
-static int curPhysDim = 0;
 static gmshSurface *myGmshSurface = 0;
 #define MAX_RECUR_LOOPS 100
 static int ImbricatedLoop = 0;
@@ -115,9 +114,10 @@ struct doubleXstring{
 %token tAtan tAtan2 tSinh tCosh tTanh tFabs tFloor tCeil tRound
 %token tFmod tModulo tHypot tList
 %token tPrintf tError tStr tSprintf tStrCat tStrPrefix tStrRelative tStrReplace
-%token tStrFind tStrCmp
+%token tFind tStrFind tStrCmp tStrChoice
 %token tTextAttributes
-%token tBoundingBox tDraw tSetChanged tToday tOnelabAction tSyncModel
+%token tBoundingBox tDraw tSetChanged tToday tFixRelativePath tSyncModel
+%token tOnelabAction tOnelabRun
 %token tCpu tMemory tTotalMemory
 %token tCreateTopology tCreateTopologyNoHoles
 %token tDistanceFunction tDefineConstant tUndefineConstant
@@ -133,7 +133,7 @@ struct doubleXstring{
 %token tLayers tScaleLast tHole tAlias tAliasWithOptions tCopyOptions
 %token tQuadTriAddVerts tQuadTriNoNewVerts tQuadTriSngl tQuadTriDbl
 %token tRecombLaterals tTransfQuadTri
-%token tText2D tText3D tInterpolationScheme  tTime tCombine
+%token tText2D tText3D tInterpolationScheme tTime tCombine
 %token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots
 %token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit tAbort
 %token tField tReturn tCall tFunction tShow tHide tGetValue tGetEnv tGetString
@@ -142,7 +142,8 @@ struct doubleXstring{
 
 %type <d> FExpr FExpr_Single
 %type <v> VExpr VExpr_Single CircleOptions TransfiniteType
-%type <i> NumericAffectation NumericIncrement PhysicalId
+%type <i> NumericAffectation NumericIncrement
+%type <i> PhysicalId0 PhysicalId1 PhysicalId2 PhysicalId3
 %type <i> TransfiniteArrangement RecombineAngle
 %type <u> ColorExpr
 %type <c> StringExpr StringExprVar SendToFile HomologyCommand
@@ -153,7 +154,7 @@ struct doubleXstring{
 %type <l> RecursiveListOfListOfDouble Enumeration
 %type <l> ListOfColor RecursiveListOfColor
 %type <l> ListOfShapes Transform Extrude MultipleShape
-%type <l> TransfiniteCorners InSphereCenter
+%type <l> TransfiniteCorners InSphereCenter PeriodicTransform
 %type <s> Shape
 
 // Operators (with ascending priority): cf. C language
@@ -641,7 +642,7 @@ NumericIncrement :
   | tMINUSMINUS    { $$ = -1; }
 ;
 
-// these are for either compatibility with getdp syntax (square brackets instead
+// these are for compatibility with the syntax in GetDP (square brackets instead
 // of parentheses)
 
 LP : '(' { $$ = (char*)"("; } | '[' { $$ = (char*)"["; } ;
@@ -743,6 +744,35 @@ Affectation :
       Free($1);
       List_Delete($5);
     }
+  | StringIndex '[' ']' NumericAffectation ListOfDouble tEND
+    {
+      gmsh_yysymbol &s(gmsh_yysymbols[$1]);
+      s.list = true;
+      double d;
+      switch($4){
+      case 0: // affect
+        s.value.clear(); // fall-through
+      case 1: // append
+        for(int i = 0; i < List_Nbr($5); i++){
+          List_Read($5, i, &d);
+          s.value.push_back(d);
+        }
+        break;
+      case 2: // remove
+        for(int i = 0; i < List_Nbr($5); i++){
+          List_Read($5, i, &d);
+          std::vector<double>::iterator it = std::find(s.value.begin(),
+                                                       s.value.end(), d);
+          if(it != s.value.end()) s.value.erase(it);
+        }
+        break;
+      default:
+        yymsg(0, "Operators *= and /= not available for lists");
+        break;
+      }
+      Free($1);
+      List_Delete($5);
+    }
   | tSTRING '[' FExpr ']' NumericAffectation FExpr tEND
     {
       assignVariable($1, (int)$3, $5, $6);
@@ -765,7 +795,7 @@ Affectation :
       List_Delete($4);
       List_Delete($8);
     }
-  | StringIndex '(' '{' RecursiveListOfDouble '}' ')' NumericAffectation ListOfDouble tEND
+  | StringIndex LP '{' RecursiveListOfDouble '}' RP NumericAffectation ListOfDouble tEND
     {
       assignVariables($1, $4, $7, $8);
       Free($1);
@@ -1232,7 +1262,20 @@ CharParameterOption :
 
 //  S H A P E
 
-PhysicalId :
+PhysicalId0 :
+    FExpr
+    {
+      $$ = (int)$1;
+    }
+  | StringExpr
+    {
+      $$ = GModel::current()->setPhysicalName
+        (std::string($1), 0, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free($1);
+    }
+;
+
+PhysicalId1 :
     FExpr
     {
       $$ = (int)$1;
@@ -1240,8 +1283,33 @@ PhysicalId :
   | StringExpr
     {
       $$ = GModel::current()->setPhysicalName
-        (std::string($1), curPhysDim,
-         ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+        (std::string($1), 1, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free($1);
+    }
+;
+
+PhysicalId2 :
+    FExpr
+    {
+      $$ = (int)$1;
+    }
+  | StringExpr
+    {
+      $$ = GModel::current()->setPhysicalName
+        (std::string($1), 2, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+      Free($1);
+    }
+;
+
+PhysicalId3 :
+    FExpr
+    {
+      $$ = (int)$1;
+    }
+  | StringExpr
+    {
+      $$ = GModel::current()->setPhysicalName
+        (std::string($1), 3, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
       Free($1);
     }
 ;
@@ -1300,23 +1368,35 @@ Shape :
       $$.Type = MSH_POINT;
       $$.Num = num;
     }
-  | tPhysical tPoint
-    {
-      curPhysDim = 0;
-    }
-    '(' PhysicalId ')' tAFFECT ListOfDouble tEND
+  | tPhysical tPoint '(' PhysicalId0 ')' NumericAffectation ListOfDouble tEND
     {
-      int num = (int)$5;
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){
+      int num = (int)$4;
+      int op = $6;
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_POINT);
+      if(p && op == 0){
 	yymsg(0, "Physical point %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt($8);
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical point %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt($7);
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete($8);
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr($7); i++){
+          double d;
+          List_Read($7, i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical point %d", num);
+      }
+      List_Delete($7);
       $$.Type = MSH_PHYSICAL_POINT;
       $$.Num = num;
     }
@@ -1326,8 +1406,9 @@ Shape :
 	double d;
 	List_Read($3, i, &d);
 	Vertex *v = FindPoint((int)d);
-	if(v)
+	if(v){
 	  v->lc = $5;
+        }
 	else{
 	  GVertex *gv = GModel::current()->getVertexByTag((int)d);
 	  if(gv)
@@ -1558,23 +1639,35 @@ Shape :
       $$.Type = MSH_SEGM_COMPOUND;
       $$.Num = num;
     }
-  | tPhysical tLine
+  | tPhysical tLine '(' PhysicalId1 ')' NumericAffectation ListOfDouble tEND
     {
-      curPhysDim = 1;
-    }
-    '(' PhysicalId ')' tAFFECT ListOfDouble tEND
-    {
-      int num = (int)$5;
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){
+      int num = (int)$4;
+      int op = $6;
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_LINE);
+      if(p && op == 0){
 	yymsg(0, "Physical line %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt($8);
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical line %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt($7);
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete($8);
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr($7); i++){
+          double d;
+          List_Read($7, i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical line %d", num);
+      }
+      List_Delete($7);
       $$.Type = MSH_PHYSICAL_LINE;
       $$.Num = num;
     }
@@ -1777,23 +1870,35 @@ Shape :
       $$.Type = MSH_SURF_COMPOUND;
       $$.Num = num;
     }
-  | tPhysical tSurface
-    {
-      curPhysDim = 2;
-    }
-    '(' PhysicalId ')' tAFFECT ListOfDouble tEND
+  | tPhysical tSurface '(' PhysicalId2 ')' NumericAffectation ListOfDouble tEND
     {
-      int num = (int)$5;
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
+      int num = (int)$4;
+      int op = $6;
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE);
+      if(p && op == 0){
 	yymsg(0, "Physical surface %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt($8);
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical surface %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt($7);
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete($8);
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr($7); i++){
+          double d;
+          List_Read($7, i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical surface %d", num);
+      }
+      List_Delete($7);
       $$.Type = MSH_PHYSICAL_SURFACE;
       $$.Num = num;
     }
@@ -1852,27 +1957,38 @@ Shape :
       $$.Type = MSH_VOLUME_COMPOUND;
       $$.Num = num;
     }
-  | tPhysical tVolume
+  | tPhysical tVolume '(' PhysicalId3 ')' NumericAffectation ListOfDouble tEND
     {
-      curPhysDim = 3;
-    }
-    '(' PhysicalId ')' tAFFECT ListOfDouble tEND
-    {
-      int num = (int)$5;
-      if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
+      int num = (int)$4;
+      int op = $6;
+      PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME);
+      if(p && op == 0){
 	yymsg(0, "Physical volume %d already exists", num);
       }
-      else{
-	List_T *temp = ListOfDouble2ListOfInt($8);
-	PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
+      else if(!p && op > 0){
+	yymsg(0, "Physical volume %d does not exists", num);
+      }
+      else if(op == 0){
+	List_T *temp = ListOfDouble2ListOfInt($7);
+	p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
 	List_Delete(temp);
 	List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
       }
-      List_Delete($8);
+      else if(op == 1){
+        for(int i = 0; i < List_Nbr($7); i++){
+          double d;
+          List_Read($7, i, &d);
+          int j = (int)d;
+          List_Add(p->Entities, &j);
+        }
+      }
+      else{
+	yymsg(0, "Unsupported operation on physical volume %d", num);
+      }
+      List_Delete($7);
       $$.Type = MSH_PHYSICAL_VOLUME;
       $$.Num = num;
     }
-
 ;
 
 //  T R A N S F O R M
@@ -2640,11 +2756,32 @@ Command :
         std::string tmp = FixRelativePath(gmsh_yyname, $2);
 	CreateSingleDir(tmp);
       }
+      else if(!strcmp($1, "OnelabRun")){
+        Msg::RunOnelabClient($2);
+      }
       else{
 	yymsg(0, "Unknown command '%s'", $1);
       }
       Free($1); Free($2);
     }
+  | tOnelabRun '(' RecursiveListOfStringExprVar ')' tEND
+    {
+      int n = List_Nbr($3);
+      if(n == 1){
+        char *s; List_Read($3, 0, &s);
+        Msg::RunOnelabClient(s);
+        Free(s);
+      }
+      else if(n == 2){
+        char *s, *t; List_Read($3, 0, &s); List_Read($3, 1, &t);
+        Msg::RunOnelabClient(s, t);
+        Free(s); Free(t);
+      }
+      else{
+        yymsg(0, "OnelabRun takes one or two arguments");
+      }
+      List_Delete($3);
+    }
   | tSTRING tSTRING '[' FExpr ']' StringExprVar tEND
     {
 #if defined(HAVE_POST)
@@ -2968,10 +3105,10 @@ Loop :
   | tFunction tSTRING
     {
       if(!FunctionManager::Instance()->createFunction
-         ($2, gmsh_yyin, gmsh_yyname, gmsh_yylineno))
+         (std::string($2), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Redefinition of function %s", $2);
       skip_until(NULL, "Return");
-      //FIXME: wee leak $2
+      Free($2);
     }
   | tReturn
     {
@@ -2979,12 +3116,12 @@ Loop :
          (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Error while exiting function");
     }
-  | tCall tSTRING tEND
+  | tCall String__Index tEND
     {
       if(!FunctionManager::Instance()->enterFunction
-         ($2, &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
+         (std::string($2), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(0, "Unknown function %s", $2);
-      //FIXME: wee leak $2
+      Free($2);
     }
   | tIf '(' FExpr ')'
     {
@@ -3461,6 +3598,16 @@ RecombineAngle :
     }
 ;
 
+PeriodicTransform :
+    {
+      $$ = List_Create(1, 1, sizeof(double));
+    }
+  | tUsing ListOfDouble
+    {
+      $$ = $2;
+    }
+;
+
 Constraints :
     tTransfinite tLine ListOfDoubleOrAll tAFFECT FExpr TransfiniteType tEND
     {
@@ -3690,7 +3837,7 @@ Constraints :
             if(gr)
               gr->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1;
             else
-              yymsg(1, "Unknown region %d", (int)d);
+              yymsg(1, "Unknown volume %d", (int)d);
           }
         }
         List_Delete($2);
@@ -3834,7 +3981,7 @@ Constraints :
       List_Delete($5);
     }
   | tPeriodic tSurface FExpr '{' RecursiveListOfDouble '}' tAFFECT FExpr
-    '{' RecursiveListOfDouble '}'  tEND
+    '{' RecursiveListOfDouble '}'  PeriodicTransform tEND
     {
       if (List_Nbr($5) != List_Nbr($10)){
 	yymsg(0, "Number of master surface edges (%d) different from number of "
@@ -3844,6 +3991,12 @@ Constraints :
         int j_master = (int)$8;
         int j_slave = (int)$3;
         Surface *s_slave = FindSurface(abs(j_slave));
+	std::vector<double> transfo;
+	for(int i = 0; i < List_Nbr($12); i++){
+	  double d;
+	  List_Read($12, i, &d);
+	  transfo.push_back(d);
+	}
         if(s_slave){
 	  GModel::current()->getGEOInternals()->periodicFaces[j_slave] = j_master;
           for (int i = 0; i < List_Nbr($5); i++){
@@ -3852,6 +4005,7 @@ Constraints :
             List_Read($10, i, &dm);
 	    GModel::current()->getGEOInternals()->periodicEdges[(int)ds] = (int)dm;
             s_slave->edgeCounterparts[(int)ds] = (int)dm;
+            s_slave->affineTransform = transfo;
           }
         }
         else{
@@ -3863,6 +4017,7 @@ Constraints :
               List_Read($5, i, &ds);
               List_Read($10, i, &dm);
               gf->edgeCounterparts[(int)ds] = (int)dm;
+	      gf->affineTransform = transfo;
 	      GEdge *ges = GModel::current()->getEdgeByTag(abs((int)ds));
 	      ges->setMeshMaster((int)dm);
             }
@@ -3872,6 +4027,7 @@ Constraints :
       }
       List_Delete($5);
       List_Delete($10);
+      List_Delete($12);
     }
   | tPoint '{' RecursiveListOfDouble '}' tIn tSurface '{' FExpr '}' tEND
     {
@@ -3883,9 +4039,14 @@ Constraints :
         GFace *gf = GModel::current()->getFaceByTag((int)$8);
         if(gf){
           for(int i = 0; i < List_Nbr($3); i++){
-            int iPoint;
-            List_Read($3, i, &iPoint);
+            double d;
+            List_Read($3, i, &d);
+            int iPoint = (int)d;
             GVertex *gv = GModel::current()->getVertexByTag(iPoint);
+            if(!gv){ // sync model in case the embedded point is a .geo point
+              GModel::current()->importGEOInternals();
+              gv = GModel::current()->getVertexByTag(iPoint);
+            }
             if(gv)
               gf->addEmbeddedVertex(gv);
             else
@@ -3906,9 +4067,14 @@ Constraints :
         GFace *gf = GModel::current()->getFaceByTag((int)$8);
         if(gf){
           for(int i = 0; i < List_Nbr($3); i++){
-            int iCurve;
-            List_Read($3, i, &iCurve);
+            double d;
+            List_Read($3, i, &d);
+            int iCurve = (int)d;
             GEdge *ge = GModel::current()->getEdgeByTag(iCurve);
+            if(!ge){ // sync model in case the embedded line is a .geo line
+              GModel::current()->importGEOInternals();
+              ge = GModel::current()->getEdgeByTag(iCurve);
+            }
             if(ge)
               gf->addEmbeddedEdge(ge);
             else
@@ -3937,9 +4103,14 @@ Constraints :
         GRegion *gr = GModel::current()->getRegionByTag((int)$8);
         if(gr){
           for(int i = 0; i < List_Nbr($3); i++){
-            int iSurface;
-            List_Read($3, i, &iSurface);
+            double d;
+            List_Read($3, i, &d);
+            int iSurface = (int)d;
             GFace *gf = GModel::current()->getFaceByTag(iSurface);
+            if(!gf){ // sync model in case the embedded face is a .geo face
+              GModel::current()->importGEOInternals();
+              gf = GModel::current()->getFaceByTag(iSurface);
+            }
             if(gf)
               gr->addEmbeddedFace(gf);
             else
@@ -3947,7 +4118,7 @@ Constraints :
           }
         }
         else
-          yymsg(0, "Unknown region %d", (int)$8);
+          yymsg(0, "Unknown volume %d", (int)$8);
       }
     }
   | tReverse tSurface ListOfDoubleOrAll tEND
@@ -4460,6 +4631,17 @@ FExpr_Single :
       $$ = Msg::GetValue($3, $5);
       Free($3);
     }
+  | tFind '(' ListOfDouble ',' ListOfDouble ')'
+    {
+      int matches = 0;
+      for(int i = 0; i < List_Nbr($3); i++){
+        double d;
+        List_Read($3, i, &d);
+        matches += List_Search($5, &d, fcmp_double);
+      }
+      $$ = matches;
+      Free($3); Free($5);
+    }
   | tStrFind '(' StringExprVar ',' StringExprVar ')'
     {
       std::string s($3), substr($5);
@@ -4649,11 +4831,20 @@ FExpr_Multi :
       Vertex *v = FindPoint((int)$3);
       $$ = List_Create(3, 1, sizeof(double));
       if(!v) {
-	yymsg(0, "Unknown point '%d'", (int)$3);
-	double d = 0.0;
-	List_Add($$, &d);
-	List_Add($$, &d);
-	List_Add($$, &d);
+        GVertex *gv = GModel::current()->getVertexByTag((int)$3);
+        if(gv){
+          double x = gv->x(), y = gv->y(), z = gv->z();
+          List_Add($$, &x);
+          List_Add($$, &y);
+          List_Add($$, &z);
+        }
+        else{
+          yymsg(0, "Unknown point '%d'", (int)$3);
+          double d = 0.0;
+          List_Add($$, &d);
+          List_Add($$, &d);
+          List_Add($$, &d);
+        }
       }
       else{
 	List_Add($$, &v->Pos.X);
@@ -4663,19 +4854,35 @@ FExpr_Multi :
     }
   | tPoint tBIGSTR
     {
-      $$ = GetAllEntityNumbers(0);
+      $$ = GetAllElementaryEntityNumbers(0);
     }
   | tLine tBIGSTR
     {
-      $$ = GetAllEntityNumbers(1);
+      $$ = GetAllElementaryEntityNumbers(1);
     }
   | tSurface tBIGSTR
     {
-      $$ = GetAllEntityNumbers(2);
+      $$ = GetAllElementaryEntityNumbers(2);
     }
   | tVolume tBIGSTR
     {
-      $$ = GetAllEntityNumbers(3);
+      $$ = GetAllElementaryEntityNumbers(3);
+    }
+  | tPhysical tPoint tBIGSTR
+    {
+      $$ = GetAllPhysicalEntityNumbers(0);
+    }
+  | tPhysical tLine tBIGSTR
+    {
+      $$ = GetAllPhysicalEntityNumbers(1);
+    }
+  | tPhysical tSurface tBIGSTR
+    {
+      $$ = GetAllPhysicalEntityNumbers(2);
+    }
+  | tPhysical tVolume tBIGSTR
+    {
+      $$ = GetAllPhysicalEntityNumbers(3);
     }
   | tPhysical tPoint '{' RecursiveListOfDouble '}'
     {
@@ -4693,10 +4900,10 @@ FExpr_Multi :
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[0].find((int)num);
-          if(it != groups[0].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(0, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add($$, &d);
@@ -4722,10 +4929,10 @@ FExpr_Multi :
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[1].find((int)num);
-          if(it != groups[1].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(1, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add($$, &d);
@@ -4751,10 +4958,10 @@ FExpr_Multi :
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[2].find((int)num);
-          if(it != groups[2].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(2, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add($$, &d);
@@ -4780,10 +4987,10 @@ FExpr_Multi :
           }
         }
         else{
-          std::map<int, std::vector<GEntity*> > groups[4];
-          GModel::current()->getPhysicalGroups(groups);
-          std::map<int, std::vector<GEntity*> >::iterator it = groups[3].find((int)num);
-          if(it != groups[3].end()){
+          std::map<int, std::vector<GEntity*> > groups;
+          GModel::current()->getPhysicalGroups(3, groups);
+          std::map<int, std::vector<GEntity*> >::iterator it = groups.find((int)num);
+          if(it != groups.end()){
             for(unsigned j = 0; j < it->second.size(); j++){
               double d = it->second[j]->tag();
               List_Add($$, &d);
@@ -4793,6 +5000,58 @@ FExpr_Multi :
       }
       List_Delete($4);
     }
+  | tPoint tIn tBoundingBox
+      '{' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr '}'
+    {
+      $$ = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box($5, $7, $9, $11, $13, $15);
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 0);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add($$, &d);
+      }
+    }
+  | tLine tIn tBoundingBox
+      '{' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr '}'
+    {
+      $$ = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box($5, $7, $9, $11, $13, $15);
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 1);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add($$, &d);
+      }
+    }
+  | tSurface tIn tBoundingBox
+      '{' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr '}'
+    {
+      $$ = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box($5, $7, $9, $11, $13, $15);
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 2);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add($$, &d);
+      }
+    }
+  | tVolume tIn tBoundingBox
+      '{' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr ',' FExpr '}'
+    {
+      $$ = List_Create(10, 1, sizeof(double));
+      GModel::current()->importGEOInternals();
+      SBoundingBox3d box($5, $7, $9, $11, $13, $15);
+      std::vector<GEntity*> entities;
+      GModel::current()->getEntitiesInBox(entities, box, 3);
+      for(unsigned int i = 0; i < entities.size(); i++){
+        double d = entities[i]->tag();
+	List_Add($$, &d);
+      }
+    }
   | Transform
     {
       $$ = List_Create(List_Nbr($1), 1, sizeof(double));
@@ -4825,7 +5084,19 @@ FExpr_Multi :
       }
       Free($1);
     }
-  | tList '[' tSTRING ']'
+  | StringIndex LP RP
+    {
+      $$ = List_Create(2, 1, sizeof(double));
+      if(!gmsh_yysymbols.count($1))
+	yymsg(0, "Unknown variable '%s'", $1);
+      else{
+        gmsh_yysymbol &s(gmsh_yysymbols[$1]);
+	for(unsigned int i = 0; i < s.value.size(); i++)
+	  List_Add($$, &s.value[i]);
+      }
+      Free($1);
+    }
+  | tList '[' String__Index ']'
     {
       $$ = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count($3))
@@ -4855,6 +5126,24 @@ FExpr_Multi :
       Free($1);
       List_Delete($4);
     }
+  | StringIndex LP '{' RecursiveListOfDouble '}' RP
+    {
+      $$ = List_Create(2, 1, sizeof(double));
+      if(!gmsh_yysymbols.count($1))
+	yymsg(0, "Unknown variable '%s'", $1);
+      else{
+        gmsh_yysymbol &s(gmsh_yysymbols[$1]);
+	for(int i = 0; i < List_Nbr($4); i++){
+	  int index = (int)(*(double*)List_Pointer_Fast($4, i));
+	  if((int)s.value.size() < index + 1)
+	    yymsg(0, "Uninitialized variable '%s[%d]'", $1, index);
+	  else
+	    List_Add($$, &s.value[index]);
+	}
+      }
+      Free($1);
+      List_Delete($4);
+    }
 ;
 
 RecursiveListOfDouble :
@@ -5017,13 +5306,20 @@ StringExpr :
       Free($3);
       Free($5);
     }
-  | tStrCat LP StringExprVar ',' StringExprVar RP
+  | tStrCat LP RecursiveListOfStringExprVar RP
     {
-      $$ = (char *)Malloc((strlen($3) + strlen($5) + 1) * sizeof(char));
-      strcpy($$, $3);
-      strcat($$, $5);
-      Free($3);
-      Free($5);
+      int size = 1;
+      for(int i = 0; i < List_Nbr($3); i++)
+        size += strlen(*(char**)List_Pointer($3, i)) + 1;
+      $$ = (char*)Malloc(size * sizeof(char));
+      $$[0] = '\0';
+      for(int i = 0; i < List_Nbr($3); i++){
+        char *s;
+        List_Read($3, i, &s);
+        strcat($$, s);
+        Free(s);
+      }
+      List_Delete($3);
     }
   | tStrPrefix '(' StringExprVar ')'
     {
@@ -5067,7 +5363,7 @@ StringExpr :
     }
   | tStr LP RecursiveListOfStringExprVar RP
     {
-      int size = 0;
+      int size = 1;
       for(int i = 0; i < List_Nbr($3); i++)
         size += strlen(*(char**)List_Pointer($3, i)) + 1;
       $$ = (char*)Malloc(size * sizeof(char));
@@ -5081,6 +5377,17 @@ StringExpr :
       }
       List_Delete($3);
     }
+  | tStrChoice LP FExpr ',' StringExpr ',' StringExpr RP
+    {
+      if($3){
+        $$ = $5;
+        Free($7);
+      }
+      else{
+        $$ = $7;
+        Free($5);
+      }
+    }
   | tSprintf LP StringExprVar RP
     {
       $$ = $3;
@@ -5104,6 +5411,13 @@ StringExpr :
       }
       List_Delete($5);
     }
+  | tFixRelativePath LP StringExprVar RP
+    {
+      std::string tmp = FixRelativePath(gmsh_yyname, $3);
+      $$ = (char*)Malloc((tmp.size() + 1) * sizeof(char));
+      strcpy($$, tmp.c_str());
+      Free($3);
+    }
   | tDefineString LP StringExpr
     { floatOptions.clear(); charOptions.clear(); }
     CharParameterOptions RP
@@ -5315,6 +5629,7 @@ void PrintParserSymbols(bool help, std::vector<std::string> &vec)
       it != gmsh_yysymbols.end(); it++){
     gmsh_yysymbol s(it->second);
     std::ostringstream sstream;
+    sstream.precision(12);
     sstream << it->first;
     if(s.list){
       sstream << "[] = {";
@@ -5383,6 +5698,7 @@ void yymsg(int level, const char *fmt, ...)
     Msg::Error("'%s', line %d : %s", gmsh_yyname.c_str(), gmsh_yylineno - 1, tmp);
     gmsh_yyerrorstate++;
   }
-  else
+  else{
     Msg::Warning("'%s', line %d : %s", gmsh_yyname.c_str(), gmsh_yylineno - 1, tmp);
+  }
 }
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index 4bd14b2..20a6257 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -28,7 +28,7 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -66,7 +66,6 @@ typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
 #else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
@@ -74,7 +73,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -105,6 +103,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -375,13 +375,13 @@ static void yy_fatal_error (yyconst char msg[]  );
  */
 #define YY_DO_BEFORE_ACTION \
 	(yytext_ptr) = yy_bp; \
-	gmsh_yyleng = (yy_size_t) (yy_cp - yy_bp); \
+	gmsh_yyleng = (size_t) (yy_cp - yy_bp); \
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 187
-#define YY_END_OF_BUFFER 188
+#define YY_NUM_RULES 191
+#define YY_END_OF_BUFFER 192
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -389,108 +389,111 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[909] =
+static yyconst flex_int16_t yy_accept[932] =
     {   0,
-        0,    0,  188,  186,    1,    1,  186,    5,  186,    6,
-      186,  186,  186,  186,  186,  181,   21,    2,  186,   16,
-      186,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  186,   28,   24,   19,   25,   17,
-       26,   18,    0,  183,    3,    4,   20,  182,  181,    0,
-       29,   27,   30,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-
-      185,  103,  102,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  124,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  167,  168,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,   23,   22,    0,
-      182,    0,    0,  184,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,   54,   65,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,   74,  185,
-      185,  185,  185,  185,  185,   90,  185,  185,  185,  185,
-
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  110,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      150,  185,  185,  185,  185,  185,  156,  185,  185,  185,
-      185,  175,  185,  185,  185,  185,  185,  185,  185,  185,
-        0,  183,    0,    0,  182,  185,   32,  185,  185,  185,
-      185,  185,   37,   39,  185,  185,  185,  185,   62,  185,
-       47,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-       53,  185,  185,  185,  185,  185,   72,  185,  185,  185,
-
-      185,  185,  185,   83,  185,   85,  185,  185,  185,   89,
-      185,  185,  185,  185,  185,   98,   99,  185,  185,  185,
-      185,  185,  185,  185,  185,  108,  109,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  141,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  164,  151,  185,
-      185,  185,  185,  149,  185,  185,  185,  185,  185,  185,
-      185,  170,  174,  185,  185,  185,  185,  185,  185,  185,
-       10,   15,    9,    8,  185,   12,   14,    0,  182,   31,
-      185,   35,  185,  185,  185,   41,  185,   43,  185,  185,
-
-      185,  185,  185,  185,  185,   57,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,   80,   82,
-      185,  185,  185,   86,  185,   88,  185,  185,  185,  185,
-      185,  185,  101,  185,  185,  106,  185,  185,  185,  111,
-      185,  185,  185,  185,  185,  119,  185,  121,  185,  185,
-      185,  125,  185,  126,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  139,  140,  185,  185,  185,  185,
-      185,  185,  154,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  176,  185,  185,  185,  179,  185,   11,
-      185,   13,  185,  185,   34,   38,   40,  185,   44,  185,
-
-      185,  185,   48,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,   69,   71,  185,  185,   79,  185,
-       84,  185,  185,  185,  185,  185,   92,  185,  185,  185,
-      185,  185,  112,  107,  185,  185,  185,  118,  185,  115,
-      185,  185,  185,  185,  130,  185,  129,  185,  185,  185,
-      185,  185,  144,  185,  138,  185,  185,  185,  185,  152,
-      153,  185,  158,  163,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  180,    7,  185,  185,
-       42,   45,  185,  185,  185,  185,  185,  185,   52,   56,
-      185,  185,  185,  185,  185,  185,  185,  185,   76,  185,
-
-      185,  185,   77,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  145,  185,
-      185,  185,  185,  157,  162,  185,  185,  185,  155,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,   59,  185,  185,  185,  185,
-      185,  185,  185,   75,   78,  185,  185,   91,  185,  185,
-      185,  185,   94,  100,  185,  185,  113,  116,  117,  185,
-      185,  185,  122,  123,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  148,  147,  185,  185,
-
-      185,  165,  185,  185,  185,  185,  185,  185,  185,   33,
-      185,  185,  185,  185,   50,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,   81,  185,  185,  185,  185,   93,
-      185,  104,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  135,  137,  185,  185,  185,  185,  160,  185,  185,
-      166,  185,  185,  185,  185,  173,  185,  185,  185,   61,
-      185,   51,   58,  185,  185,  185,  185,  185,  185,  185,
-       87,  185,  185,  185,  185,  185,  185,  127,  185,  185,
-      133,  185,  185,  185,  142,  185,  185,   73,  185,  159,
-      185,  185,  185,  185,  185,  185,   46,  185,   60,   49,
-
-      185,  185,  185,  185,   70,  185,  185,  185,  185,  185,
-      185,  128,  185,  185,  134,  185,  185,  185,  161,  185,
-      177,  185,  171,  185,  185,  185,  185,  185,   67,   68,
-      185,  185,  185,  185,  185,  120,  185,  185,  185,  143,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  114,  185,  185,  185,  185,  185,  172,  185,
-      185,   55,   63,   66,  185,  185,  185,  185,  185,  185,
-      136,  146,  169,  185,  185,  185,  185,  185,  185,  185,
-      131,  185,  185,   36,  185,  185,  185,  185,  185,  185,
-      178,  185,  185,  185,  185,  185,  132,  185,   95,   96,
-
-       97,  185,  185,  185,  185,  105,   64,    0
+        0,    0,  192,  190,    1,    1,  190,    5,  190,    6,
+      190,  190,  190,  190,  190,  185,   21,    2,  190,   16,
+      190,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  190,   28,   24,   19,   25,   17,
+       26,   18,    0,  187,    3,    4,   20,  186,  185,    0,
+       29,   27,   30,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+
+      189,  105,  104,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  127,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  171,  172,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,   23,   22,    0,
+      186,    0,    0,  188,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,   54,   65,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,   74,  189,
+      189,  189,  189,  189,  189,  189,  189,   92,  189,  189,
+
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  112,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  153,  189,  189,  189,  189,  189,  159,  189,
+      189,  189,  189,  179,  189,  189,  189,  189,  189,  189,
+      189,  189,    0,  187,    0,    0,  186,  189,   32,  189,
+      189,  189,  189,  189,   37,   39,  189,  189,  189,  189,
+       62,  189,   47,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,   53,  189,  189,  189,  189,  189,   72,  189,
+
+      189,  189,  189,  189,  189,   83,  189,   85,  189,  189,
+       87,  189,  189,   91,  189,  189,  189,  189,  189,  100,
+      101,  189,  189,  189,  189,  189,  189,  189,  189,  110,
+      111,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  144,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  168,  154,  189,  189,  189,  189,  152,  189,  189,
+      189,  189,  189,  189,  189,  174,  178,  189,  189,  189,
+      189,  189,  189,  189,   10,   15,    9,    8,  189,   12,
+       14,    0,  186,   31,  189,   35,  189,  189,  189,   41,
+
+      189,   43,  189,  189,  189,  189,  189,  189,  189,   57,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,   80,   82,  189,  189,  189,   86,  189,  189,
+       90,  189,  189,  189,  189,  189,  189,  103,  189,  189,
+      108,  189,  189,  189,  113,  189,  189,  189,  189,  189,
+      121,  189,  124,  189,  189,  189,  128,  189,  129,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  142,
+      143,  189,  189,  189,  189,  189,  189,  157,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  180,
+      189,  189,  189,  183,  189,   11,  189,   13,  189,  189,
+
+       34,   38,   40,  189,   44,  189,  189,  189,   48,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+       69,   71,  189,  189,   79,  189,   84,  189,  189,  189,
+      189,  189,  189,   94,  189,  189,  189,  189,  189,  114,
+      109,  189,  189,  189,  120,  189,  117,  189,  189,  189,
+      189,  133,  189,  132,  189,  189,  189,  189,  189,  147,
+      189,  141,  189,  189,  189,  189,  155,  156,  189,  161,
+      189,  166,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  184,    7,  189,  189,   42,   45,
+      189,  189,  189,  189,  189,  189,   52,   56,  189,  189,
+
+      189,  189,  189,  189,  189,  189,   76,  189,  189,  189,
+       77,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,  148,  189,
+      189,  189,  189,  160,  189,  165,  189,  189,  189,  158,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  189,  189,  189,   59,  189,  189,  189,
+      189,  189,  189,  189,   75,   78,  189,  189,  189,   93,
+      189,  189,  189,  189,   96,  102,  189,  189,  115,  118,
+      119,  189,  189,  189,  189,  125,  126,  189,  189,  189,
+
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  151,
+      150,  189,  189,  189,  189,  169,  189,  189,  189,  189,
+      189,  189,  189,   33,  189,  189,  189,  189,   50,  189,
+      189,  189,  189,  189,  189,  189,  189,  189,   81,  189,
+      189,  189,  189,  189,   95,  189,  106,  189,  189,  123,
+      189,  189,  189,  189,  189,  189,  189,  138,  140,  189,
+      189,  189,  189,  167,  163,  189,  189,  170,  189,  189,
+      189,  189,  177,  189,  189,  189,   61,  189,   51,   58,
+      189,  189,  189,  189,  189,  189,  189,   88,  189,  189,
+      189,  189,  189,  189,  189,  130,  189,  189,  136,  189,
+
+      189,  189,  145,  189,  189,   73,  189,  162,  189,  189,
+      189,  189,  189,  189,   46,  189,   60,   49,  189,  189,
+      189,  189,   70,  189,  189,  189,  189,  189,  189,  189,
+      131,  189,  189,  137,  189,  189,  189,  164,  189,  181,
+      189,  175,  189,  189,  189,  189,  189,   67,   68,  189,
+      189,  189,  189,  189,  189,  122,  189,  189,  189,  146,
+      189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
+      189,  189,  189,  116,  189,  189,  189,  189,  189,  176,
+      189,  189,   55,   63,   66,  189,  189,  189,  189,  189,
+      189,  189,  139,  149,  173,  189,  189,  189,   89,  189,
+
+      189,  189,  189,  134,  189,  189,   36,  189,  189,  189,
+      189,  189,  189,  182,  189,  189,  189,  189,  189,  135,
+      189,   97,   98,   99,  189,  189,  189,  189,  107,   64,
+        0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -537,215 +540,221 @@ static yyconst flex_int32_t yy_meta[74] =
         2,    2,    1
     } ;
 
-static yyconst flex_int16_t yy_base[910] =
+static yyconst flex_int16_t yy_base[933] =
     {   0,
-        0,    0, 1041, 1042, 1042, 1042, 1019, 1042, 1033, 1042,
-     1017,   65,   66,   64,   76,   78, 1042, 1042, 1016, 1015,
-     1014,   49,   49,   56,   67,   68,   81,   50,   80,   97,
-        0,  974,   97,  108,  966,   61,  107,  965,  118,  125,
-      158,   62,  970,  978,  956, 1042, 1042, 1042, 1042, 1042,
-     1042, 1042, 1017,  184, 1042, 1042, 1042,  199,  214,  229,
-     1042, 1042, 1042,    0,  966,  965,  977,  968,  973,  966,
-      973,  958,   37,  952,   58,  962,  969,  952,  194,  948,
-      962,  149,  955,  964,  953,  959,  945,  958,  116,  958,
-      109,  945,  944,  940,  943,  961,  935,  949,   24,  937,
-
-      956,    0,  931,  935,  924,   84,  130,  940,  962,  158,
-      941,  927,  938,  938,  924,  923,  915,    0,  116,   98,
-      929,  936,  923,  182,  127,  924,  933,  914,  918,  918,
-      916,  199,  912,  911,  910,  145,    0,    0,  938,  912,
-      901,  158,  922,  918,  912,  909,  897, 1042, 1042,  255,
-      260,  269,  275,  280,  901,  899,  901,  914,  273,  901,
-      900,  901,  892,  901,  896,  897,  895,  895,  888,  901,
-       82,  889,  159,  885,  877,  892,    0,  898,  889,  892,
-      891,  894,  872,  884,  206,  878,  880,  195,    0,  873,
-      871,  877,  882,  872,  881,    0,  881,  900,  272,  877,
-
-      876,  866,  865,  898,  872,  857,  870,  867,  868,  867,
-      852,  903,  869,  854,  859,  846,  863,  853,  858,  861,
-      852,  842,  846,  851,  844,  855,  842,  850,  849,  239,
-      843,  837,  830,  844,  847,  834,  841,  834,  280,  822,
-      835,  828,  836,  831,  830,  819,  282,  831,  824,  832,
-      854,  825,  813,  830,  829,  816,  823,  814,  806,  268,
-      324,  329,  338,  343,  348,  806,    0,  805,  805,  808,
-      812,  819,    0,  851,  809,  808,  811,  811,    0,  794,
-        0,  812,  801,  794,  798,  792,  799,  243,  803,  816,
-        0,  786,  791,  790,  783,  782,    0,  785,  785,  792,
-
-      780,  787,  776,    0,  774,    0,  789,  812,  774,    0,
-      771,  789,  775,  768,  785,    0,    0,  774,  765,  790,
-      765,  763,  763,  760,  767,    0,    0,  811,  240,  759,
-      799,  763,  755,  771,  754,  758,  755,  759,  762,  757,
-      746,  747,  744,  261,    0,  750,  744,  747,  756,  741,
-      740,  737,  751,  750,  748,  744,  734,    0,    0,  731,
-      732,  242,  735,    0,  199,  738,  729,  740,  743,  738,
-      754,    0,    0,  765,  716,  728,  720,  731,  729,  723,
-        0,    0,  723,    0,  728,  721,    0,  353,  358,    0,
-      743,  732,  711,  715,  714,    0,  713,    0,  708,  715,
-
-      712,  719,  716,  715,  705,  723,  704,  711,  695,  705,
-      698,  707,  706,  705,  704,  703,  258,  690,    0,    0,
-      702,  687,  700,    0,  680,    0,  693,  290,  680,  683,
-      688,  684,    0,  706,  678,    0,  677,  686,  675,    0,
-      691,  682,  666,  678,  674,    0,  685,    0,  681,  681,
-      681,    0,  670,    0,  688,  675,  663,  677,  660,  672,
-      675,  662,  656,  668,    0,    0,  685,  670,  666,  661,
-      663,  662,    0,  647,  646,  649,  650,  657,  273,  658,
-      641,  645,  639,    0,  669,  209,  647,    0,  650,    0,
-      647,    0,  648,  643,    0,    0,  683,  645,    0,  636,
-
-      637,  628,    0,  633,  634,  643,  638,  619,  628,  627,
-      620,  643,  351,  620,    0,    0,  325,  627,    0,  626,
-        0,  629,  624,  618,  288,  655,    0,  621,  609,  621,
-      637,  621,    0,    0,  620,  611,  598,    0,  615,    0,
-      645,  601,  610,  617,    0,  602,    0,  607,  344,  606,
-      626,  594,    0,  607,    0,  610,  597,  604,  603,    0,
-        0,  601,    0,    0,  602,  599,  603,  592,  597,  584,
-      596,  580,  593,  340,  596,  583,    0,    0,  577,  575,
-        0,    0,  586,  599,  586,  587,  575,  586,    0,    0,
-      583,  585,  576,  570,  569,  562,  562,  579,    0,  561,
-
-      575,  576,    0,  558,  562,  589,  584,  577,  558,  565,
-      545,  581,  564,  547,  555,  559,  549,  559,  544,  557,
-      548,  550,  357,  556,  543,  534,  549,  548,    0,  534,
-      544,  533,  532,    0,    0,  539,  528,  545,    0,  521,
-      539,  526,  530,  521,  527,  520,  533,  529,  528,  558,
-      520,  516,  527,  524,  519,    0,  510,  514,  512,  513,
-      513,  507,  504,    0,    0,  509,  502,    0,  530,  529,
-      540,  510,    0,    0,  540,  496,    0,    0,    0,  497,
-      494,  503,    0,    0,  506,  506,  507,  494,  494,  487,
-      500,  499,  485,  514,  482,  495,    0,    0,  476,  489,
-
-      494,    0,  485,   40,   45,   99,  120,  134,  193,    0,
-      183,  172,  250,  273,    0,  263,  297,  298,  322,  323,
-      320,  337,  332,  337,    0,  325,  351,  354,  365,    0,
-      355,    0,  343,  345,  354,  342,  356,  351,  374,  357,
-      360,    0,    0,  358,  362,  381,  365,    0,  350,  367,
-        0,  371,  357,  372,  358,    0,  364,  364,  357,    0,
-      363,    0,    0,  364,  365,  373,  366,  381,  375,  385,
-        0,  390,  391,  392,  409,  375,  381,    0,  391,  400,
-        0,  393,  388,  383,    0,  383,  401,    0,  398,    0,
-      384,  381,  411,  402,  395,  390,    0,  391,    0,    0,
-
-      397,  411,  396,  407,    0,  418,  419,  420,  428,  411,
-      407,    0,  417,  401,    0,  423,  417,  402,    0,  408,
-        0,  411,    0,  411,  422,  423,  426,  421,    0,    0,
-      455,  456,  457,  449,  427,    0,  423,  444,  431,    0,
-      438,  439,  436,  427,  433,  445,  425,  431,  458,  459,
-      460,  454,    0,  436,  451,  439,  441,  441,    0,  459,
-      448,    0,  473,    0,  469,  470,  472,  473,  450,  452,
-        0,    0,    0,  457,  453,  458,  489,  490,  491,  498,
-        0,  458,  459,    0,  496,  490,  491,  492,  500,  466,
-        0,  471,  497,  498,  499,  509,    0,  479,    0,    0,
-
-        0,  503,  487,  513,  476,    0,    0, 1042,  540
+        0,    0, 1064, 1065, 1065, 1065, 1042, 1065, 1056, 1065,
+     1040,   65,   66,   64,   76,   78, 1065, 1065, 1039, 1038,
+     1037,   49,   49,   56,   67,   68,   81,   50,   80,   97,
+        0,  997,   97,  108,  989,   61,  107,  988,  118,  125,
+      158,   62,  993, 1001,  979, 1065, 1065, 1065, 1065, 1065,
+     1065, 1065, 1040,  184, 1065, 1065, 1065,  199,  214,  229,
+     1065, 1065, 1065,    0,  989,  988, 1000,  991,  996,  989,
+      996,  981,   37,  975,   58,  985,  992,  975,  194,  971,
+      985,  149,  978,  987,  976,  982,  968,  981,  116,  981,
+      202,  968,  967,  963,  966,  984,  958,  972,   24,  960,
+
+      979,    0,  954,  958,  947,   84,   96,  963,  985,  158,
+      964,  950,  961,  961,  947,  946,  938,    0,  116,  137,
+      952,  959,  946,  182,  138,  947,  956,  937,  941,  941,
+      939,  203,  935,  934,  933,  149,    0,    0,  961,  935,
+      924,  167,  945,  941,  935,  932,  920, 1065, 1065,  260,
+      265,  274,  280,  285,  924,  922,  924,  937,  222,  924,
+      923,  924,  915,  924,  919,  920,  918,  918,  911,  924,
+       82,  912,  105,  908,  900,  915,    0,  921,  912,  915,
+      914,  917,  895,  907,  193,  901,  903,  220,    0,  896,
+      894,  900,  905,  905,  915,  893,  902,    0,  902,  921,
+
+      193,  898,  897,  887,  886,  919,  893,  878,  891,  888,
+      889,  888,  873,  924,  890,  875,  880,  867,  884,  874,
+      879,  882,  873,  863,  867,  872,  865,  876,  863,  871,
+      870,  204,  864,  858,  851,  865,  868,  855,  862,  855,
+      278,  843,  856,  849,  857,  852,  851,  840,  280,  852,
+      845,  853,  875,  846,  834,  851,  850,  837,  844,  835,
+      827,  261,  317,  322,  331,  336,  341,  827,    0,  826,
+      826,  829,  833,  840,    0,  872,  830,  829,  832,  832,
+        0,  815,    0,  833,  822,  815,  819,  813,  820,  246,
+      824,  837,    0,  807,  812,  811,  804,  803,    0,  806,
+
+      806,  813,  801,  808,  797,    0,  795,    0,  810,  833,
+        0,  807,  794,    0,  791,  809,  795,  788,  805,    0,
+        0,  794,  785,  810,  785,  783,  783,  780,  787,    0,
+        0,  831,  269,  779,  819,  783,  775,  791,  774,  778,
+      775,  779,  782,  777,  766,  767,  764,  300,    0,  770,
+      764,  767,  776,  761,  760,  757,  771,  770,  768,  764,
+      754,    0,    0,  751,  752,  246,  755,    0,  312,  758,
+      749,  760,  763,  758,  774,    0,    0,  785,  736,  748,
+      740,  751,  749,  743,    0,    0,  743,    0,  748,  741,
+        0,  348,  359,    0,  763,  752,  731,  735,  734,    0,
+
+      733,    0,  728,  735,  732,  739,  736,  735,  725,  743,
+      724,  731,  715,  725,  718,  727,  726,  725,  724,  723,
+      256,  710,    0,    0,  722,  707,  720,    0,  700,  711,
+        0,  712,  278,  699,  702,  707,  703,    0,  725,  697,
+        0,  696,  705,  694,    0,  710,  701,  685,  697,  693,
+        0,  704,    0,  700,  700,  700,    0,  689,    0,  707,
+      694,  682,  696,  679,  691,  694,  681,  675,  687,    0,
+        0,  704,  689,  685,  680,  682,  681,    0,  666,  665,
+      669,  667,  668,  675,  128,  676,  659,  663,  657,    0,
+      687,  324,  665,    0,  668,    0,  665,    0,  666,  661,
+
+        0,    0,  701,  663,    0,  654,  655,  646,    0,  651,
+      652,  661,  656,  637,  646,  645,  638,  661,  343,  638,
+        0,    0,  272,  645,    0,  644,    0,  647,  642,  649,
+      635,  347,  672,    0,  638,  626,  638,  654,  638,    0,
+        0,  637,  628,  615,    0,  632,    0,  346,  619,  628,
+      635,    0,  620,    0,  625,  325,  624,  644,  612,    0,
+      625,    0,  628,  615,  622,  621,    0,    0,  619,    0,
+      615,    0,  619,  616,  620,  609,  614,  601,  613,  597,
+      610,  341,  613,  600,    0,    0,  594,  592,    0,    0,
+      603,  616,  603,  604,  592,  603,    0,    0,  600,  602,
+
+      593,  587,  586,  579,  579,  596,    0,  578,  592,  593,
+        0,  575,  573,  578,  605,  600,  593,  574,  581,  561,
+      597,  580,  563,  571,  575,  565,  575,  557,  559,  572,
+      563,  565,  362,  571,  558,  549,  564,  563,    0,  549,
+      559,  548,  547,    0,  560,    0,  553,  542,  559,    0,
+      535,  553,  540,  544,  535,  541,  534,  547,  543,  542,
+      572,  534,  530,  541,  538,  533,    0,  524,  528,  526,
+      527,  527,  521,  518,    0,    0,  523,  516,  525,    0,
+      543,  542,  553,  523,    0,    0,  553,  509,    0,    0,
+        0,  510,  507,  512,  515,    0,    0,  518,  518,  519,
+
+      506,  506,   30,   54,   95,  111,  159,  191,  216,    0,
+        0,  275,  273,  331,  339,    0,  332,  335,  331,  345,
+      338,  343,  371,    0,  362,  339,  342,  346,    0,  334,
+      354,  355,  348,  348,  346,  363,  358,  363,    0,  351,
+      349,  378,  379,  390,    0,  379,    0,  367,  368,    0,
+      375,  362,  377,  371,  394,  377,  380,    0,    0,  378,
+      382,  401,  385,    0,    0,  369,  386,    0,  390,  376,
+      390,  376,    0,  382,  382,  375,    0,  381,    0,    0,
+      382,  383,  391,  384,  399,  392,  402,    0,  403,  409,
+      410,  411,  428,  394,  400,    0,  410,  419,    0,  412,
+
+      407,  402,    0,  402,  420,    0,  417,    0,  403,  400,
+      430,  421,  414,  409,    0,  410,    0,    0,  416,  430,
+      415,  426,    0,  443,  438,  439,  440,  448,  431,  428,
+        0,  437,  421,    0,  443,  437,  422,    0,  428,    0,
+      431,    0,  432,  442,  443,  446,  441,    0,    0,  454,
+      476,  477,  478,  470,  448,    0,  444,  465,  452,    0,
+      459,  460,  457,  448,  454,  466,  446,  452,  453,  480,
+      481,  482,  476,    0,  458,  473,  461,  463,  463,    0,
+      481,  470,    0,  495,    0,  477,  493,  494,  495,  496,
+      473,  475,    0,    0,    0,  480,  476,  481,    0,  512,
+
+      513,  514,  521,    0,  481,  482,    0,  519,  513,  514,
+      515,  523,  489,    0,  494,  520,  521,  522,  532,    0,
+      502,    0,    0,    0,  526,  510,  536,  499,    0,    0,
+     1065,  563
     } ;
 
-static yyconst flex_int16_t yy_def[910] =
+static yyconst flex_int16_t yy_def[933] =
     {   0,
-      908,    1,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  908,  908,  908,
-      908,  908,  908,  908,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      908,  908,  908,  908,  908,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  908,  908,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-
-      909,  909,  909,  909,  909,  909,  909,    0,  908
+      931,    1,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  931,  931,  931,
+      931,  931,  931,  931,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  931,  931,  931,  931,  931,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  931,  931,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+      932,  932,  932,  932,  932,  932,  932,  932,  932,  932,
+        0,  931
     } ;
 
-static yyconst flex_int16_t yy_nxt[1116] =
+static yyconst flex_int16_t yy_nxt[1139] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   15,   16,   16,   16,   16,   16,   17,   18,   19,
@@ -755,124 +764,126 @@ static yyconst flex_int16_t yy_nxt[1116] =
        31,   31,   31,   31,   31,   31,   31,   31,   31,   44,
        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
        31,   31,   45,   49,   53,   51,   54,   54,   54,   54,
-       54,  201,  202,   55,   96,   50,   52,   56,   58,   72,
-       59,   59,   59,   59,   59,  752,   57,   65,   66,   67,
+       54,  203,  204,   55,   96,   50,   52,   56,   58,   72,
+       59,   59,   59,   59,   59,  757,   57,   65,   66,   67,
 
-       73,   97,  163,   75,   60,  753,   68,   76,  164,   74,
+       73,   97,  163,   75,   60,  758,   68,   76,  164,   74,
        77,   78,   69,   70,   71,  166,   79,   80,   82,   81,
       113,  144,   83,  167,  114,   85,  145,   86,   90,   60,
-       84,   87,  101,  284,   88,   98,   91,   89,   92,   93,
-       99,   94,  285,  208,  105,  109,  754,   95,  106,  102,
-      100,  209,  107,  225,  115,  226,  103,  108,  116,  110,
-      192,  117,  118,  223,  119,  123,  193,  120,  111,  124,
-      121,  188,  137,  138,  127,  755,  128,  189,  125,  129,
-      130,  190,  224,  131,  126,  756,  132,  133,  139,  210,
-      134,  135,  235,  236,  211,  136,   54,   54,   54,   54,
-
-       54,  179,  180,  249,  250,  140,  181,  287,  254,  141,
-      150,  151,  151,  151,  151,  151,  214,  757,  142,  758,
-      288,  143,  215,  255,   58,  152,   59,   59,   59,   59,
-       59,  230,  759,  299,  231,  150,  300,  153,  153,  232,
-       60,  154,  154,  154,  154,  154,  475,  233,  171,  234,
-      152,  172,  173,  243,  174,  175,  244,  476,  176,  303,
-      304,  574,  245,  261,  261,   60,  575,  262,  262,  262,
-      262,  262,  151,  151,  151,  151,  151,  264,  264,  441,
-      442,  265,  265,  265,  265,  265,  263,  154,  154,  154,
-      154,  154,  154,  154,  154,  154,  154,  270,  313,  346,
-
-      408,  472,  457,  409,  356,  347,  365,  473,  760,  366,
-      606,  263,  314,  271,  272,  315,  357,  381,  607,  367,
-      382,  368,  517,  518,  525,  383,  457,  526,  761,  384,
-      567,  385,  386,  762,  568,  387,  262,  262,  262,  262,
-      262,  262,  262,  262,  262,  262,  388,  388,  763,  764,
-      389,  389,  389,  389,  389,  265,  265,  265,  265,  265,
-      265,  265,  265,  265,  265,  389,  389,  389,  389,  389,
-      389,  389,  389,  389,  389,  595,  599,  624,  644,  686,
-      600,  765,  687,  766,  767,  768,  596,  769,  770,  771,
-      772,  597,  688,  773,  774,  645,  775,  689,  776,  625,
-
-      777,  624,  644,  778,  686,  779,  780,  687,  781,  782,
-      783,  784,  785,  786,  787,  788,  688,  789,  790,  791,
-      792,  689,  793,  794,  795,  796,  797,  798,  799,  800,
-      801,  802,  803,  782,  804,  805,  806,  807,  808,  809,
-      810,  811,  812,  813,  814,  815,  816,  817,  818,  819,
-      820,  821,  822,  823,  824,  825,  826,  827,  828,  829,
-      830,  831,  832,  833,  834,  835,  836,  813,  837,  838,
-      839,  840,  841,  842,  843,  844,  822,  845,  846,  847,
-      848,  849,  850,  851,  852,  853,  854,  855,  856,  857,
-      858,  859,  860,  861,  862,  863,  864,  865,  866,  867,
+       84,   87,  101,  286,   88,   98,   91,   89,   92,   93,
+       99,   94,  287,  210,  105,  109,  759,   95,  106,  102,
+      100,  211,  107,  289,  115,  212,  103,  108,  116,  110,
+      213,  117,  118,  225,  119,  123,  290,  120,  111,  124,
+      121,  188,  137,  138,  127,  760,  128,  189,  125,  129,
+      130,  190,  226,  131,  126,  575,  132,  133,  139,  576,
+      134,  135,  227,  761,  228,  136,   54,   54,   54,   54,
+
+       54,  179,  180,  237,  238,  140,  181,  251,  252,  141,
+      150,  151,  151,  151,  151,  151,  216,  256,  142,  317,
+      301,  143,  217,  302,   58,  152,   59,   59,   59,   59,
+       59,  232,  257,  318,  233,  150,  319,  153,  153,  234,
+       60,  154,  154,  154,  154,  154,  272,  235,  171,  236,
+      152,  172,  173,  192,  174,  175,  762,  245,  176,  193,
+      246,  194,  273,  274,  350,   60,  247,  763,  263,  263,
+      351,  195,  264,  264,  264,  264,  264,  151,  151,  151,
+      151,  151,  266,  266,  305,  306,  267,  267,  267,  267,
+      267,  265,  154,  154,  154,  154,  154,  154,  154,  154,
+
+      154,  154,  360,  412,  369,  477,  413,  370,  446,  447,
+      385,  478,  532,  386,  361,  533,  265,  371,  387,  372,
+      523,  524,  388,  607,  389,  390,  764,  608,  391,  264,
+      264,  264,  264,  264,  264,  264,  264,  264,  264,  392,
+      392,  462,  765,  393,  393,  393,  393,  393,  267,  267,
+      267,  267,  267,  267,  267,  267,  267,  267,  634,  480,
+      393,  393,  393,  393,  393,  462,  481,  603,  627,  615,
+      482,  393,  393,  393,  393,  393,  582,  616,  604,  655,
+      635,  583,  634,  605,  699,  628,  766,  700,  767,  768,
+      769,  770,  771,  772,  773,  774,  656,  701,  775,  776,
+
+      777,  778,  702,  655,  779,  780,  781,  782,  783,  699,
+      784,  785,  700,  786,  787,  788,  789,  790,  791,  792,
+      793,  701,  794,  795,  796,  797,  702,  798,  799,  800,
+      801,  802,  803,  804,  805,  806,  807,  808,  809,  810,
+      811,  812,  813,  814,  815,  816,  817,  818,  819,  820,
+      821,  822,  823,  800,  824,  825,  826,  827,  828,  829,
+      830,  831,  832,  833,  834,  835,  836,  837,  838,  839,
+      840,  841,  842,  843,  844,  845,  846,  847,  848,  849,
+      850,  851,  852,  853,  854,  855,  832,  856,  857,  858,
+      859,  860,  861,  862,  863,  841,  864,  865,  866,  867,
 
       868,  869,  870,  871,  872,  873,  874,  875,  876,  877,
-      878,  855,  879,  880,  881,  882,  883,  884,  885,  886,
-      887,  888,  889,  890,  891,  892,  893,  894,  895,  896,
-      897,  898,  899,  900,  901,  902,  903,  904,  905,  906,
-      907,   64,  751,  750,  749,  748,  747,  746,  745,  744,
-      743,  742,  741,  740,  739,  738,  737,  736,  735,  734,
-      733,  732,  731,  730,  729,  728,  727,  726,  725,  724,
-      723,  722,  721,  720,  719,  718,  717,  716,  715,  714,
-      713,  712,  711,  710,  709,  708,  707,  706,  705,  704,
-      703,  702,  701,  700,  699,  698,  697,  696,  695,  694,
-
-      693,  692,  691,  690,  685,  684,  683,  682,  681,  680,
-      679,  678,  677,  676,  675,  674,  673,  672,  671,  670,
-      669,  668,  667,  666,  665,  664,  663,  662,  661,  660,
-      659,  658,  657,  656,  655,  654,  653,  652,  651,  650,
-      649,  648,  647,  646,  643,  642,  641,  640,  639,  638,
-      637,  636,  635,  634,  633,  632,  631,  630,  629,  628,
-      627,  626,  623,  622,  621,  620,  619,  618,  617,  616,
-      615,  614,  613,  612,  611,  610,  609,  608,  605,  604,
-      603,  602,  601,  598,  594,  593,  592,  591,  590,  589,
-      588,  587,  586,  585,  584,  583,  582,  581,  580,  579,
-
-      578,  577,  576,  573,  572,  571,  570,  569,  566,  565,
-      564,  563,  562,  561,  560,  559,  558,  557,  556,  555,
-      554,  553,  552,  551,  550,  549,  548,  547,  546,  545,
-      544,  543,  542,  541,  540,  539,  538,  537,  536,  535,
-      534,  533,  532,  531,  530,  529,  528,  527,  524,  523,
-      522,  521,  520,  519,  516,  515,  514,  513,  512,  511,
-      510,  509,  508,  507,  506,  505,  504,  503,  502,  501,
-      500,  499,  498,  497,  496,  495,  494,  493,  492,  491,
-      490,  489,  488,  487,  486,  485,  484,  483,  482,  481,
-      480,  479,  478,  477,  474,  471,  470,  469,  468,  467,
-
-      466,  465,  464,  463,  462,  461,  460,  459,  458,  456,
-      455,  454,  453,  452,  451,  450,  449,  448,  447,  446,
-      445,  444,  443,  440,  439,  438,  437,  436,  435,  434,
-      433,  432,  431,  430,  429,  428,  427,  426,  425,  424,
-      423,  422,  421,  420,  419,  418,  417,  416,  415,  414,
-      413,  412,  411,  410,  407,  406,  405,  404,  403,  402,
-      401,  400,  399,  398,  397,  396,  395,  394,  393,  392,
-      391,  390,  380,  379,  378,  377,  376,  375,  374,  373,
-      372,  371,  370,  369,  364,  363,  362,  361,  360,  359,
-      358,  355,  354,  353,  352,  351,  350,  349,  348,  345,
-
-      344,  343,  342,  341,  340,  339,  338,  337,  336,  335,
-      334,  333,  332,  331,  330,  329,  328,  327,  326,  325,
-      324,  323,  322,  321,  320,  319,  318,  317,  316,  312,
-      311,  310,  309,  308,  307,  306,  305,  302,  301,  298,
-      297,  296,  295,  294,  293,  292,  291,  290,  289,  286,
-      283,  282,  281,  280,  279,  278,  277,  276,  275,  274,
-      273,  269,  268,  267,  266,  260,  259,  258,  257,  256,
-      253,  252,  251,  248,  247,  246,  242,  241,  240,  239,
-      238,  237,  229,  228,  227,  222,  221,  220,  219,  218,
-      217,  216,  213,  212,  207,  206,  205,  204,  203,  200,
-
-      199,  198,  197,  196,  195,  194,  191,  187,  186,  185,
-      184,  183,  182,  178,  177,  170,  169,  168,  165,  162,
-      161,  160,  159,  158,  157,  156,  155,  149,  148,  147,
-      146,  122,  112,  104,   63,   62,   61,   48,   47,   46,
-      908,    3,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908
+      878,  879,  880,  881,  882,  883,  884,  885,  886,  887,
+      888,  889,  890,  891,  892,  893,  894,  895,  896,  897,
+      898,  899,  876,  900,  901,  902,  903,  904,  905,  906,
+      907,  908,  909,  910,  911,  912,  913,  914,  915,  916,
+      917,  918,  919,  920,  921,  922,  923,  924,  925,  926,
+      927,  928,  929,  930,   64,  756,  755,  754,  753,  752,
+      751,  750,  749,  748,  747,  746,  745,  744,  743,  742,
+      741,  740,  739,  738,  737,  736,  735,  734,  733,  732,
+      731,  730,  729,  728,  727,  726,  725,  724,  723,  722,
+
+      721,  720,  719,  718,  717,  716,  715,  714,  713,  712,
+      711,  710,  709,  708,  707,  706,  705,  704,  703,  698,
+      697,  696,  695,  694,  693,  692,  691,  690,  689,  688,
+      687,  686,  685,  684,  683,  682,  681,  680,  679,  678,
+      677,  676,  675,  674,  673,  672,  671,  670,  669,  668,
+      667,  666,  665,  664,  663,  662,  661,  660,  659,  658,
+      657,  654,  653,  652,  651,  650,  649,  648,  647,  646,
+      645,  644,  643,  642,  641,  640,  639,  638,  637,  636,
+      633,  632,  631,  630,  629,  626,  625,  624,  623,  622,
+      621,  620,  619,  618,  617,  614,  613,  612,  611,  610,
+
+      609,  606,  602,  601,  600,  599,  598,  597,  596,  595,
+      594,  593,  592,  591,  590,  589,  588,  587,  586,  585,
+      584,  581,  580,  579,  578,  577,  574,  573,  572,  571,
+      570,  569,  568,  567,  566,  565,  564,  563,  562,  561,
+      560,  559,  558,  557,  556,  555,  554,  553,  552,  551,
+      550,  549,  548,  547,  546,  545,  544,  543,  542,  541,
+      540,  539,  538,  537,  536,  535,  534,  531,  530,  529,
+      528,  527,  526,  525,  522,  521,  520,  519,  518,  517,
+      516,  515,  514,  513,  512,  511,  510,  509,  508,  507,
+      506,  505,  504,  503,  502,  501,  500,  499,  498,  497,
+
+      496,  495,  494,  493,  492,  491,  490,  489,  488,  487,
+      486,  485,  484,  483,  479,  476,  475,  474,  473,  472,
+      471,  470,  469,  468,  467,  466,  465,  464,  463,  461,
+      460,  459,  458,  457,  456,  455,  454,  453,  452,  451,
+      450,  449,  448,  445,  444,  443,  442,  441,  440,  439,
+      438,  437,  436,  435,  434,  433,  432,  431,  430,  429,
+      428,  427,  426,  425,  424,  423,  422,  421,  420,  419,
+      418,  417,  416,  415,  414,  411,  410,  409,  408,  407,
+      406,  405,  404,  403,  402,  401,  400,  399,  398,  397,
+      396,  395,  394,  384,  383,  382,  381,  380,  379,  378,
+
+      377,  376,  375,  374,  373,  368,  367,  366,  365,  364,
+      363,  362,  359,  358,  357,  356,  355,  354,  353,  352,
+      349,  348,  347,  346,  345,  344,  343,  342,  341,  340,
+      339,  338,  337,  336,  335,  334,  333,  332,  331,  330,
+      329,  328,  327,  326,  325,  324,  323,  322,  321,  320,
+      316,  315,  314,  313,  312,  311,  310,  309,  308,  307,
+      304,  303,  300,  299,  298,  297,  296,  295,  294,  293,
+      292,  291,  288,  285,  284,  283,  282,  281,  280,  279,
+      278,  277,  276,  275,  271,  270,  269,  268,  262,  261,
+      260,  259,  258,  255,  254,  253,  250,  249,  248,  244,
+
+      243,  242,  241,  240,  239,  231,  230,  229,  224,  223,
+      222,  221,  220,  219,  218,  215,  214,  209,  208,  207,
+      206,  205,  202,  201,  200,  199,  198,  197,  196,  191,
+      187,  186,  185,  184,  183,  182,  178,  177,  170,  169,
+      168,  165,  162,  161,  160,  159,  158,  157,  156,  155,
+      149,  148,  147,  146,  122,  112,  104,   63,   62,   61,
+       48,   47,   46,  931,    3,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931
     } ;
 
-static yyconst flex_int16_t yy_chk[1116] =
+static yyconst flex_int16_t yy_chk[1139] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -883,120 +894,122 @@ static yyconst flex_int16_t yy_chk[1116] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,   12,   14,   13,   14,   14,   14,   14,
        14,   99,   99,   15,   28,   12,   13,   15,   16,   23,
-       16,   16,   16,   16,   16,  704,   15,   22,   22,   22,
+       16,   16,   16,   16,   16,  703,   15,   22,   22,   22,
 
-       23,   28,   73,   24,   16,  705,   22,   24,   73,   23,
+       23,   28,   73,   24,   16,  704,   22,   24,   73,   23,
        24,   24,   22,   22,   22,   75,   24,   24,   25,   24,
        36,   42,   25,   75,   36,   26,   42,   26,   27,   16,
        25,   26,   30,  171,   26,   29,   27,   26,   27,   27,
-       29,   27,  171,  106,   33,   34,  706,   27,   33,   30,
-       29,  106,   33,  120,   37,  120,   30,   33,   37,   34,
-       91,   37,   37,  119,   37,   39,   91,   37,   34,   39,
-       37,   89,   41,   41,   40,  707,   40,   89,   39,   40,
-       40,   89,  119,   40,   39,  708,   40,   40,   41,  107,
-       40,   40,  125,  125,  107,   40,   54,   54,   54,   54,
-
-       54,   82,   82,  136,  136,   41,   82,  173,  142,   41,
-       54,   58,   58,   58,   58,   58,  110,  709,   41,  711,
-      173,   41,  110,  142,   59,   58,   59,   59,   59,   59,
-       59,  124,  712,  185,  124,   54,  185,   60,   60,  124,
-       59,   60,   60,   60,   60,   60,  365,  124,   79,  124,
-       58,   79,   79,  132,   79,   79,  132,  365,   79,  188,
-      188,  486,  132,  150,  150,   59,  486,  150,  150,  150,
-      150,  150,  151,  151,  151,  151,  151,  152,  152,  329,
-      329,  152,  152,  152,  152,  152,  151,  153,  153,  153,
-      153,  153,  154,  154,  154,  154,  154,  159,  199,  230,
-
-      288,  362,  344,  288,  239,  230,  247,  362,  713,  247,
-      525,  151,  199,  159,  159,  199,  239,  260,  525,  247,
-      260,  247,  417,  417,  428,  260,  344,  428,  714,  260,
-      479,  260,  260,  716,  479,  260,  261,  261,  261,  261,
-      261,  262,  262,  262,  262,  262,  263,  263,  717,  718,
-      263,  263,  263,  263,  263,  264,  264,  264,  264,  264,
-      265,  265,  265,  265,  265,  388,  388,  388,  388,  388,
-      389,  389,  389,  389,  389,  513,  517,  549,  574,  623,
-      517,  719,  623,  720,  721,  722,  513,  723,  724,  726,
-      727,  513,  623,  728,  729,  574,  731,  623,  733,  549,
-
-      734,  549,  574,  735,  623,  736,  737,  623,  738,  739,
-      740,  741,  744,  745,  746,  747,  623,  749,  750,  752,
-      753,  623,  754,  755,  757,  758,  759,  761,  764,  765,
-      766,  767,  768,  739,  769,  770,  772,  773,  774,  775,
-      776,  777,  779,  780,  782,  783,  784,  786,  787,  789,
-      791,  792,  793,  794,  795,  796,  798,  801,  802,  803,
-      804,  806,  807,  808,  809,  810,  811,  780,  813,  814,
-      816,  817,  818,  820,  822,  824,  793,  825,  826,  827,
-      828,  831,  832,  833,  834,  835,  837,  838,  839,  841,
-      842,  843,  844,  845,  846,  847,  848,  849,  850,  851,
-
-      852,  854,  855,  856,  857,  858,  860,  861,  863,  865,
-      866,  838,  867,  868,  869,  870,  874,  875,  876,  877,
-      878,  879,  880,  882,  883,  885,  886,  887,  888,  889,
-      890,  892,  893,  894,  895,  896,  898,  902,  903,  904,
-      905,  909,  703,  701,  700,  699,  696,  695,  694,  693,
-      692,  691,  690,  689,  688,  687,  686,  685,  682,  681,
-      680,  676,  675,  672,  671,  670,  669,  667,  666,  663,
-      662,  661,  660,  659,  658,  657,  655,  654,  653,  652,
-      651,  650,  649,  648,  647,  646,  645,  644,  643,  642,
-      641,  640,  638,  637,  636,  633,  632,  631,  630,  628,
-
-      627,  626,  625,  624,  622,  621,  620,  619,  618,  617,
-      616,  615,  614,  613,  612,  611,  610,  609,  608,  607,
-      606,  605,  604,  602,  601,  600,  598,  597,  596,  595,
-      594,  593,  592,  591,  588,  587,  586,  585,  584,  583,
-      580,  579,  576,  575,  573,  572,  571,  570,  569,  568,
-      567,  566,  565,  562,  559,  558,  557,  556,  554,  552,
-      551,  550,  548,  546,  544,  543,  542,  541,  539,  537,
-      536,  535,  532,  531,  530,  529,  528,  526,  524,  523,
-      522,  520,  518,  514,  512,  511,  510,  509,  508,  507,
-      506,  505,  504,  502,  501,  500,  498,  497,  494,  493,
-
-      491,  489,  487,  485,  483,  482,  481,  480,  478,  477,
-      476,  475,  474,  472,  471,  470,  469,  468,  467,  464,
-      463,  462,  461,  460,  459,  458,  457,  456,  455,  453,
-      451,  450,  449,  447,  445,  444,  443,  442,  441,  439,
-      438,  437,  435,  434,  432,  431,  430,  429,  427,  425,
-      423,  422,  421,  418,  416,  415,  414,  413,  412,  411,
-      410,  409,  408,  407,  406,  405,  404,  403,  402,  401,
-      400,  399,  397,  395,  394,  393,  392,  391,  386,  385,
-      383,  380,  379,  378,  377,  376,  375,  374,  371,  370,
-      369,  368,  367,  366,  363,  361,  360,  357,  356,  355,
-
-      354,  353,  352,  351,  350,  349,  348,  347,  346,  343,
-      342,  341,  340,  339,  338,  337,  336,  335,  334,  333,
-      332,  331,  330,  328,  325,  324,  323,  322,  321,  320,
-      319,  318,  315,  314,  313,  312,  311,  309,  308,  307,
-      305,  303,  302,  301,  300,  299,  298,  296,  295,  294,
-      293,  292,  290,  289,  287,  286,  285,  284,  283,  282,
-      280,  278,  277,  276,  275,  274,  272,  271,  270,  269,
-      268,  266,  259,  258,  257,  256,  255,  254,  253,  252,
-      251,  250,  249,  248,  246,  245,  244,  243,  242,  241,
-      240,  238,  237,  236,  235,  234,  233,  232,  231,  229,
-
-      228,  227,  226,  225,  224,  223,  222,  221,  220,  219,
-      218,  217,  216,  215,  214,  213,  212,  211,  210,  209,
-      208,  207,  206,  205,  204,  203,  202,  201,  200,  198,
-      197,  195,  194,  193,  192,  191,  190,  187,  186,  184,
-      183,  182,  181,  180,  179,  178,  176,  175,  174,  172,
-      170,  169,  168,  167,  166,  165,  164,  163,  162,  161,
-      160,  158,  157,  156,  155,  147,  146,  145,  144,  143,
-      141,  140,  139,  135,  134,  133,  131,  130,  129,  128,
-      127,  126,  123,  122,  121,  117,  116,  115,  114,  113,
-      112,  111,  109,  108,  105,  104,  103,  101,  100,   98,
-
-       97,   96,   95,   94,   93,   92,   90,   88,   87,   86,
-       85,   84,   83,   81,   80,   78,   77,   76,   74,   72,
-       71,   70,   69,   68,   67,   66,   65,   53,   45,   44,
-       43,   38,   35,   32,   21,   20,   19,   11,    9,    7,
-        3,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-
-      908,  908,  908,  908,  908,  908,  908,  908,  908,  908,
-      908,  908,  908,  908,  908
+       29,   27,  171,  106,   33,   34,  705,   27,   33,   30,
+       29,  106,   33,  173,   37,  107,   30,   33,   37,   34,
+      107,   37,   37,  119,   37,   39,  173,   37,   34,   39,
+       37,   89,   41,   41,   40,  706,   40,   89,   39,   40,
+       40,   89,  119,   40,   39,  485,   40,   40,   41,  485,
+       40,   40,  120,  707,  120,   40,   54,   54,   54,   54,
+
+       54,   82,   82,  125,  125,   41,   82,  136,  136,   41,
+       54,   58,   58,   58,   58,   58,  110,  142,   41,  201,
+      185,   41,  110,  185,   59,   58,   59,   59,   59,   59,
+       59,  124,  142,  201,  124,   54,  201,   60,   60,  124,
+       59,   60,   60,   60,   60,   60,  159,  124,   79,  124,
+       58,   79,   79,   91,   79,   79,  708,  132,   79,   91,
+      132,   91,  159,  159,  232,   59,  132,  709,  150,  150,
+      232,   91,  150,  150,  150,  150,  150,  151,  151,  151,
+      151,  151,  152,  152,  188,  188,  152,  152,  152,  152,
+      152,  151,  153,  153,  153,  153,  153,  154,  154,  154,
+
+      154,  154,  241,  290,  249,  366,  290,  249,  333,  333,
+      262,  366,  433,  262,  241,  433,  151,  249,  262,  249,
+      421,  421,  262,  523,  262,  262,  712,  523,  262,  263,
+      263,  263,  263,  263,  264,  264,  264,  264,  264,  265,
+      265,  348,  713,  265,  265,  265,  265,  265,  266,  266,
+      266,  266,  266,  267,  267,  267,  267,  267,  556,  369,
+      392,  392,  392,  392,  392,  348,  369,  519,  548,  532,
+      369,  393,  393,  393,  393,  393,  492,  532,  519,  582,
+      556,  492,  556,  519,  633,  548,  714,  633,  715,  717,
+      718,  719,  720,  721,  722,  723,  582,  633,  725,  726,
+
+      727,  728,  633,  582,  730,  731,  732,  733,  734,  633,
+      735,  736,  633,  737,  738,  740,  741,  742,  743,  744,
+      746,  633,  748,  749,  751,  752,  633,  753,  754,  755,
+      756,  757,  760,  761,  762,  763,  766,  767,  769,  770,
+      771,  772,  774,  775,  776,  778,  781,  782,  783,  784,
+      785,  786,  787,  755,  789,  790,  791,  792,  793,  794,
+      795,  797,  798,  800,  801,  802,  804,  805,  807,  809,
+      810,  811,  812,  813,  814,  816,  819,  820,  821,  822,
+      824,  825,  826,  827,  828,  829,  798,  830,  832,  833,
+      835,  836,  837,  839,  841,  811,  843,  844,  845,  846,
+
+      847,  850,  851,  852,  853,  854,  855,  857,  858,  859,
+      861,  862,  863,  864,  865,  866,  867,  868,  869,  870,
+      871,  872,  873,  875,  876,  877,  878,  879,  881,  882,
+      884,  886,  858,  887,  888,  889,  890,  891,  892,  896,
+      897,  898,  900,  901,  902,  903,  905,  906,  908,  909,
+      910,  911,  912,  913,  915,  916,  917,  918,  919,  921,
+      925,  926,  927,  928,  932,  702,  701,  700,  699,  698,
+      695,  694,  693,  692,  688,  687,  684,  683,  682,  681,
+      679,  678,  677,  674,  673,  672,  671,  670,  669,  668,
+      666,  665,  664,  663,  662,  661,  660,  659,  658,  657,
+
+      656,  655,  654,  653,  652,  651,  649,  648,  647,  645,
+      643,  642,  641,  640,  638,  637,  636,  635,  634,  632,
+      631,  630,  629,  628,  627,  626,  625,  624,  623,  622,
+      621,  620,  619,  618,  617,  616,  615,  614,  613,  612,
+      610,  609,  608,  606,  605,  604,  603,  602,  601,  600,
+      599,  596,  595,  594,  593,  592,  591,  588,  587,  584,
+      583,  581,  580,  579,  578,  577,  576,  575,  574,  573,
+      571,  569,  566,  565,  564,  563,  561,  559,  558,  557,
+      555,  553,  551,  550,  549,  546,  544,  543,  542,  539,
+      538,  537,  536,  535,  533,  531,  530,  529,  528,  526,
+
+      524,  520,  518,  517,  516,  515,  514,  513,  512,  511,
+      510,  508,  507,  506,  504,  503,  500,  499,  497,  495,
+      493,  491,  489,  488,  487,  486,  484,  483,  482,  481,
+      480,  479,  477,  476,  475,  474,  473,  472,  469,  468,
+      467,  466,  465,  464,  463,  462,  461,  460,  458,  456,
+      455,  454,  452,  450,  449,  448,  447,  446,  444,  443,
+      442,  440,  439,  437,  436,  435,  434,  432,  430,  429,
+      427,  426,  425,  422,  420,  419,  418,  417,  416,  415,
+      414,  413,  412,  411,  410,  409,  408,  407,  406,  405,
+      404,  403,  401,  399,  398,  397,  396,  395,  390,  389,
+
+      387,  384,  383,  382,  381,  380,  379,  378,  375,  374,
+      373,  372,  371,  370,  367,  365,  364,  361,  360,  359,
+      358,  357,  356,  355,  354,  353,  352,  351,  350,  347,
+      346,  345,  344,  343,  342,  341,  340,  339,  338,  337,
+      336,  335,  334,  332,  329,  328,  327,  326,  325,  324,
+      323,  322,  319,  318,  317,  316,  315,  313,  312,  310,
+      309,  307,  305,  304,  303,  302,  301,  300,  298,  297,
+      296,  295,  294,  292,  291,  289,  288,  287,  286,  285,
+      284,  282,  280,  279,  278,  277,  276,  274,  273,  272,
+      271,  270,  268,  261,  260,  259,  258,  257,  256,  255,
+
+      254,  253,  252,  251,  250,  248,  247,  246,  245,  244,
+      243,  242,  240,  239,  238,  237,  236,  235,  234,  233,
+      231,  230,  229,  228,  227,  226,  225,  224,  223,  222,
+      221,  220,  219,  218,  217,  216,  215,  214,  213,  212,
+      211,  210,  209,  208,  207,  206,  205,  204,  203,  202,
+      200,  199,  197,  196,  195,  194,  193,  192,  191,  190,
+      187,  186,  184,  183,  182,  181,  180,  179,  178,  176,
+      175,  174,  172,  170,  169,  168,  167,  166,  165,  164,
+      163,  162,  161,  160,  158,  157,  156,  155,  147,  146,
+      145,  144,  143,  141,  140,  139,  135,  134,  133,  131,
+
+      130,  129,  128,  127,  126,  123,  122,  121,  117,  116,
+      115,  114,  113,  112,  111,  109,  108,  105,  104,  103,
+      101,  100,   98,   97,   96,   95,   94,   93,   92,   90,
+       88,   87,   86,   85,   84,   83,   81,   80,   78,   77,
+       76,   74,   72,   71,   70,   69,   68,   67,   66,   65,
+       53,   45,   44,   43,   38,   35,   32,   21,   20,   19,
+       11,    9,    7,    3,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
+      931,  931,  931,  931,  931,  931,  931,  931
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -1015,7 +1028,7 @@ int gmsh_yy_flex_debug = 0;
 char *gmsh_yytext;
 #line 1 "Gmsh.l"
 #line 2 "Gmsh.l"
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -1076,7 +1089,7 @@ void   skipline(void);
 #define YY_NO_UNISTD_H
 #endif
 
-#line 1080 "Gmsh.yy.cpp"
+#line 1093 "Gmsh.yy.cpp"
 
 #define INITIAL 0
 
@@ -1165,7 +1178,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )
+#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -1176,7 +1189,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		size_t n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -1261,7 +1274,7 @@ YY_DECL
 #line 72 "Gmsh.l"
 
 
-#line 1265 "Gmsh.yy.cpp"
+#line 1278 "Gmsh.yy.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -1314,13 +1327,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 909 )
+				if ( yy_current_state >= 932 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 1042 );
+		while ( yy_base[yy_current_state] != 1065 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1778,500 +1791,520 @@ return tField;
 case 87:
 YY_RULE_SETUP
 #line 166 "Gmsh.l"
-return tFileExists;
+return tFind;
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
 #line 167 "Gmsh.l"
-return tFloor;
+return tFileExists;
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
 #line 168 "Gmsh.l"
-return tFmod;
+return tFixRelativePath;
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
 #line 169 "Gmsh.l"
-return tFor;
+return tFloor;
 	YY_BREAK
 case 91:
 YY_RULE_SETUP
 #line 170 "Gmsh.l"
-return tFunction;
+return tFmod;
 	YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 172 "Gmsh.l"
-return tGetEnv;
+#line 171 "Gmsh.l"
+return tFor;
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 173 "Gmsh.l"
-return tGetString;
+#line 172 "Gmsh.l"
+return tFunction;
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
 #line 174 "Gmsh.l"
-return tGetValue;
+return tGetEnv;
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
 #line 175 "Gmsh.l"
-return tGMSH_MAJOR_VERSION;
+return tGetString;
 	YY_BREAK
 case 96:
 YY_RULE_SETUP
 #line 176 "Gmsh.l"
-return tGMSH_MINOR_VERSION;
+return tGetValue;
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
 #line 177 "Gmsh.l"
-return tGMSH_PATCH_VERSION;
+return tGMSH_MAJOR_VERSION;
 	YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 179 "Gmsh.l"
-return tHide;
+#line 178 "Gmsh.l"
+return tGMSH_MINOR_VERSION;
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 180 "Gmsh.l"
-return tHole;
+#line 179 "Gmsh.l"
+return tGMSH_PATCH_VERSION;
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
 #line 181 "Gmsh.l"
-return tHomology;
+return tHide;
 	YY_BREAK
 case 101:
 YY_RULE_SETUP
 #line 182 "Gmsh.l"
-return tHypot;
+return tHole;
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 184 "Gmsh.l"
-return tIn;
+#line 183 "Gmsh.l"
+return tHomology;
 	YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 185 "Gmsh.l"
-return tIf;
+#line 184 "Gmsh.l"
+return tHypot;
 	YY_BREAK
 case 104:
 YY_RULE_SETUP
 #line 186 "Gmsh.l"
-return tIntersect;
+return tIn;
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
 #line 187 "Gmsh.l"
-return tInterpolationScheme;
+return tIf;
 	YY_BREAK
 case 106:
 YY_RULE_SETUP
-#line 189 "Gmsh.l"
-return tNurbsKnots;
+#line 188 "Gmsh.l"
+return tIntersect;
 	YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 191 "Gmsh.l"
-return tLength;
+#line 189 "Gmsh.l"
+return tInterpolationScheme;
 	YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 192 "Gmsh.l"
-return tLine;
+#line 191 "Gmsh.l"
+return tNurbsKnots;
 	YY_BREAK
 case 109:
 YY_RULE_SETUP
 #line 193 "Gmsh.l"
-return tList;
+return tLength;
 	YY_BREAK
 case 110:
 YY_RULE_SETUP
 #line 194 "Gmsh.l"
-return tLog;
+return tLine;
 	YY_BREAK
 case 111:
 YY_RULE_SETUP
 #line 195 "Gmsh.l"
-return tLog10;
+return tList;
 	YY_BREAK
 case 112:
 YY_RULE_SETUP
 #line 196 "Gmsh.l"
-return tLayers;
+return tLog;
 	YY_BREAK
 case 113:
 YY_RULE_SETUP
 #line 197 "Gmsh.l"
-return tLevelset;
+return tLog10;
 	YY_BREAK
 case 114:
 YY_RULE_SETUP
-#line 199 "Gmsh.l"
-return tMeshAlgorithm;
+#line 198 "Gmsh.l"
+return tLayers;
 	YY_BREAK
 case 115:
 YY_RULE_SETUP
-#line 200 "Gmsh.l"
-return tModulo;
+#line 199 "Gmsh.l"
+return tLevelset;
 	YY_BREAK
 case 116:
 YY_RULE_SETUP
 #line 201 "Gmsh.l"
-return tMPI_Rank;
+return tMeshAlgorithm;
 	YY_BREAK
 case 117:
 YY_RULE_SETUP
 #line 202 "Gmsh.l"
-return tMPI_Size;
+return tModulo;
 	YY_BREAK
 case 118:
 YY_RULE_SETUP
 #line 203 "Gmsh.l"
-return tMemory;
+return tMPI_Rank;
 	YY_BREAK
 case 119:
 YY_RULE_SETUP
-#line 205 "Gmsh.l"
-return tNurbs;
+#line 204 "Gmsh.l"
+return tMPI_Size;
 	YY_BREAK
 case 120:
 YY_RULE_SETUP
-#line 207 "Gmsh.l"
-return tOnelabAction;
+#line 205 "Gmsh.l"
+return tMemory;
 	YY_BREAK
 case 121:
 YY_RULE_SETUP
-#line 208 "Gmsh.l"
-return tNurbsOrder;
+#line 207 "Gmsh.l"
+return tNurbs;
 	YY_BREAK
 case 122:
 YY_RULE_SETUP
-#line 210 "Gmsh.l"
-return tPeriodic;
+#line 209 "Gmsh.l"
+return tOnelabAction;
 	YY_BREAK
 case 123:
 YY_RULE_SETUP
-#line 211 "Gmsh.l"
-return tPhysical;
+#line 210 "Gmsh.l"
+return tOnelabRun;
 	YY_BREAK
 case 124:
 YY_RULE_SETUP
-#line 212 "Gmsh.l"
-return tPi;
+#line 211 "Gmsh.l"
+return tNurbsOrder;
 	YY_BREAK
 case 125:
 YY_RULE_SETUP
 #line 213 "Gmsh.l"
-return tPlane;
+return tPeriodic;
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
 #line 214 "Gmsh.l"
-return tPoint;
+return tPhysical;
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
 #line 215 "Gmsh.l"
-return tParametric;
+return tPi;
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
 #line 216 "Gmsh.l"
-return tPolarSphere;
+return tPlane;
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
 #line 217 "Gmsh.l"
-return tPrintf;
+return tPoint;
 	YY_BREAK
 case 130:
 YY_RULE_SETUP
 #line 218 "Gmsh.l"
-return tPlugin;
+return tParametric;
 	YY_BREAK
 case 131:
 YY_RULE_SETUP
-#line 220 "Gmsh.l"
-return tQuadTriAddVerts;
+#line 219 "Gmsh.l"
+return tPolarSphere;
 	YY_BREAK
 case 132:
 YY_RULE_SETUP
-#line 221 "Gmsh.l"
-return tQuadTriNoNewVerts;
+#line 220 "Gmsh.l"
+return tPrintf;
 	YY_BREAK
 case 133:
 YY_RULE_SETUP
-#line 223 "Gmsh.l"
-return tQuadTriDbl;
+#line 221 "Gmsh.l"
+return tPlugin;
 	YY_BREAK
 case 134:
 YY_RULE_SETUP
-#line 224 "Gmsh.l"
-return tQuadTriSngl;
+#line 223 "Gmsh.l"
+return tQuadTriAddVerts;
 	YY_BREAK
 case 135:
 YY_RULE_SETUP
-#line 226 "Gmsh.l"
-return tRecombine;
+#line 224 "Gmsh.l"
+return tQuadTriNoNewVerts;
 	YY_BREAK
 case 136:
 YY_RULE_SETUP
-#line 227 "Gmsh.l"
-return tRecombLaterals;
+#line 226 "Gmsh.l"
+return tQuadTriDbl;
 	YY_BREAK
 case 137:
 YY_RULE_SETUP
-#line 228 "Gmsh.l"
-return tRecursive;
+#line 227 "Gmsh.l"
+return tQuadTriSngl;
 	YY_BREAK
 case 138:
 YY_RULE_SETUP
 #line 229 "Gmsh.l"
-return tRotate;
+return tRecombine;
 	YY_BREAK
 case 139:
 YY_RULE_SETUP
 #line 230 "Gmsh.l"
-return tRound;
+return tRecombLaterals;
 	YY_BREAK
 case 140:
 YY_RULE_SETUP
 #line 231 "Gmsh.l"
-return tRuled;
+return tRecursive;
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
 #line 232 "Gmsh.l"
-return tRand;
+return tRotate;
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
 #line 233 "Gmsh.l"
-return tRefineMesh;
+return tRound;
 	YY_BREAK
 case 143:
 YY_RULE_SETUP
 #line 234 "Gmsh.l"
-return tRelocateMesh;
+return tRuled;
 	YY_BREAK
 case 144:
 YY_RULE_SETUP
 #line 235 "Gmsh.l"
-return tReturn;
+return tRand;
 	YY_BREAK
 case 145:
 YY_RULE_SETUP
 #line 236 "Gmsh.l"
-return tReverse;
+return tRefineMesh;
 	YY_BREAK
 case 146:
 YY_RULE_SETUP
-#line 238 "Gmsh.l"
-return tScaleLast;
+#line 237 "Gmsh.l"
+return tRelocateMesh;
 	YY_BREAK
 case 147:
 YY_RULE_SETUP
-#line 239 "Gmsh.l"
-return tSmoother;
+#line 238 "Gmsh.l"
+return tReturn;
 	YY_BREAK
 case 148:
 YY_RULE_SETUP
-#line 240 "Gmsh.l"
-return tSetOrder;
+#line 239 "Gmsh.l"
+return tReverse;
 	YY_BREAK
 case 149:
 YY_RULE_SETUP
 #line 241 "Gmsh.l"
-return tSqrt;
+return tScaleLast;
 	YY_BREAK
 case 150:
 YY_RULE_SETUP
 #line 242 "Gmsh.l"
-return tSin;
+return tSmoother;
 	YY_BREAK
 case 151:
 YY_RULE_SETUP
 #line 243 "Gmsh.l"
-return tSinh;
+return tSetOrder;
 	YY_BREAK
 case 152:
 YY_RULE_SETUP
 #line 244 "Gmsh.l"
-return tSphere;
+return tSqrt;
 	YY_BREAK
 case 153:
 YY_RULE_SETUP
 #line 245 "Gmsh.l"
-return tSpline;
+return tSin;
 	YY_BREAK
 case 154:
 YY_RULE_SETUP
 #line 246 "Gmsh.l"
-return tSplit;
+return tSinh;
 	YY_BREAK
 case 155:
 YY_RULE_SETUP
 #line 247 "Gmsh.l"
-return tSurface;
+return tSphere;
 	YY_BREAK
 case 156:
 YY_RULE_SETUP
 #line 248 "Gmsh.l"
-return tStr;
+return tSpline;
 	YY_BREAK
 case 157:
 YY_RULE_SETUP
 #line 249 "Gmsh.l"
-return tSprintf;
+return tSplit;
 	YY_BREAK
 case 158:
 YY_RULE_SETUP
 #line 250 "Gmsh.l"
-return tStrCat;
+return tSurface;
 	YY_BREAK
 case 159:
 YY_RULE_SETUP
 #line 251 "Gmsh.l"
-return tStrReplace;
+return tStr;
 	YY_BREAK
 case 160:
 YY_RULE_SETUP
 #line 252 "Gmsh.l"
-return tStrPrefix;
+return tSprintf;
 	YY_BREAK
 case 161:
 YY_RULE_SETUP
 #line 253 "Gmsh.l"
-return tStrRelative;
+return tStrCat;
 	YY_BREAK
 case 162:
 YY_RULE_SETUP
 #line 254 "Gmsh.l"
-return tStrFind;
+return tStrReplace;
 	YY_BREAK
 case 163:
 YY_RULE_SETUP
 #line 255 "Gmsh.l"
-return tStrCmp;
+return tStrPrefix;
 	YY_BREAK
 case 164:
 YY_RULE_SETUP
 #line 256 "Gmsh.l"
-return tShow;
+return tStrRelative;
 	YY_BREAK
 case 165:
 YY_RULE_SETUP
 #line 257 "Gmsh.l"
-return tSymmetry;
+return tStrFind;
 	YY_BREAK
 case 166:
 YY_RULE_SETUP
 #line 258 "Gmsh.l"
-return tSyncModel;
+return tStrCmp;
 	YY_BREAK
 case 167:
 YY_RULE_SETUP
-#line 260 "Gmsh.l"
-return tText2D;
+#line 259 "Gmsh.l"
+return tStrChoice;
 	YY_BREAK
 case 168:
 YY_RULE_SETUP
-#line 261 "Gmsh.l"
-return tText3D;
+#line 260 "Gmsh.l"
+return tShow;
 	YY_BREAK
 case 169:
 YY_RULE_SETUP
-#line 262 "Gmsh.l"
-return tTextAttributes;
+#line 261 "Gmsh.l"
+return tSymmetry;
 	YY_BREAK
 case 170:
 YY_RULE_SETUP
-#line 263 "Gmsh.l"
-return tTime;
+#line 262 "Gmsh.l"
+return tSyncModel;
 	YY_BREAK
 case 171:
 YY_RULE_SETUP
 #line 264 "Gmsh.l"
-return tTransfinite;
+return tText2D;
 	YY_BREAK
 case 172:
 YY_RULE_SETUP
 #line 265 "Gmsh.l"
-return tTransfQuadTri;
+return tText3D;
 	YY_BREAK
 case 173:
 YY_RULE_SETUP
 #line 266 "Gmsh.l"
-return tTranslate;
+return tTextAttributes;
 	YY_BREAK
 case 174:
 YY_RULE_SETUP
 #line 267 "Gmsh.l"
-return tTanh;
+return tTime;
 	YY_BREAK
 case 175:
 YY_RULE_SETUP
 #line 268 "Gmsh.l"
-return tTan;
+return tTransfinite;
 	YY_BREAK
 case 176:
 YY_RULE_SETUP
 #line 269 "Gmsh.l"
-return tToday;
+return tTransfQuadTri;
 	YY_BREAK
 case 177:
 YY_RULE_SETUP
 #line 270 "Gmsh.l"
-return tTotalMemory;
+return tTranslate;
 	YY_BREAK
 case 178:
 YY_RULE_SETUP
-#line 272 "Gmsh.l"
-return tUndefineConstant;
+#line 271 "Gmsh.l"
+return tTanh;
 	YY_BREAK
 case 179:
 YY_RULE_SETUP
-#line 273 "Gmsh.l"
-return tUsing;
+#line 272 "Gmsh.l"
+return tTan;
 	YY_BREAK
 case 180:
 YY_RULE_SETUP
-#line 275 "Gmsh.l"
-return tVolume;
+#line 273 "Gmsh.l"
+return tToday;
 	YY_BREAK
 case 181:
-#line 278 "Gmsh.l"
+YY_RULE_SETUP
+#line 274 "Gmsh.l"
+return tTotalMemory;
+	YY_BREAK
 case 182:
-#line 279 "Gmsh.l"
+YY_RULE_SETUP
+#line 276 "Gmsh.l"
+return tUndefineConstant;
+	YY_BREAK
 case 183:
-#line 280 "Gmsh.l"
+YY_RULE_SETUP
+#line 277 "Gmsh.l"
+return tUsing;
+	YY_BREAK
 case 184:
 YY_RULE_SETUP
-#line 280 "Gmsh.l"
-{ gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; }
+#line 279 "Gmsh.l"
+return tVolume;
 	YY_BREAK
 case 185:
-YY_RULE_SETUP
 #line 282 "Gmsh.l"
-{ gmsh_yylval.c = strsave((char*)gmsh_yytext); return tSTRING; }
-	YY_BREAK
 case 186:
+#line 283 "Gmsh.l"
+case 187:
+#line 284 "Gmsh.l"
+case 188:
 YY_RULE_SETUP
 #line 284 "Gmsh.l"
-return gmsh_yytext[0];
+{ gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; }
 	YY_BREAK
-case 187:
+case 189:
 YY_RULE_SETUP
 #line 286 "Gmsh.l"
+{ gmsh_yylval.c = strsave((char*)gmsh_yytext); return tSTRING; }
+	YY_BREAK
+case 190:
+YY_RULE_SETUP
+#line 288 "Gmsh.l"
+return gmsh_yytext[0];
+	YY_BREAK
+case 191:
+YY_RULE_SETUP
+#line 290 "Gmsh.l"
 ECHO;
 	YY_BREAK
-#line 2275 "Gmsh.yy.cpp"
+#line 2308 "Gmsh.yy.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -2464,7 +2497,7 @@ static int yy_get_next_buffer (void)
 			{ /* Not enough room in the buffer - grow it. */
 
 			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
 
 			int yy_c_buf_p_offset =
 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -2563,7 +2596,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 909 )
+			if ( yy_current_state >= 932 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2591,13 +2624,13 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 909 )
+		if ( yy_current_state >= 932 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 908);
+	yy_is_jam = (yy_current_state == 931);
 
-	return yy_is_jam ? 0 : yy_current_state;
+		return yy_is_jam ? 0 : yy_current_state;
 }
 
     static void yyunput (int c, register char * yy_bp )
@@ -2685,7 +2718,7 @@ static int yy_get_next_buffer (void)
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( gmsh_yywrap( ) )
-						return 0;
+						return EOF;
 
 					if ( ! (yy_did_buffer_switch_on_eof) )
 						YY_NEW_FILE;
@@ -2821,10 +2854,6 @@ static void gmsh_yy_load_buffer_state  (void)
 	gmsh_yyfree((void *) b  );
 }
 
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a gmsh_yyrestart() or at EOF.
@@ -3029,8 +3058,8 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
@@ -3038,7 +3067,8 @@ YY_BUFFER_STATE gmsh_yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes
 {
 	YY_BUFFER_STATE b;
 	char *buf;
-	yy_size_t n, i;
+	yy_size_t n;
+	int i;
     
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
@@ -3268,7 +3298,7 @@ void gmsh_yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 286 "Gmsh.l"
+#line 290 "Gmsh.l"
 
 
 
diff --git a/Parser/Parser.h b/Parser/Parser.h
index 8c30286..0b2157c 100644
--- a/Parser/Parser.h
+++ b/Parser/Parser.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/AnalyseCurvedMesh.cpp b/Plugin/AnalyseCurvedMesh.cpp
index 657ccbc..c6862a2 100644
--- a/Plugin/AnalyseCurvedMesh.cpp
+++ b/Plugin/AnalyseCurvedMesh.cpp
@@ -1,29 +1,20 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include "AnalyseCurvedMesh.h"
-#include "GModel.h"
 #include "OS.h"
 #include "Context.h"
-
-#include <cmath>
-#include <queue>
-#include <sstream>
-
-//#include "Gmsh.h"
-//#include "GmshMessage.h"
-//#include "polynomialBasis.h"
-//#include <fstream>
-//#include "PView.h"
-
 #if defined(HAVE_OPENGL)
 #include "drawContext.h"
 #endif
-#if defined(HAVE_FLTK)
-#include "FlGui.h"
-#endif
+#include "PView.h"
+#include "GModel.h"
+#include "MElement.h"
+#include "bezierBasis.h"
+#include "MetricBasis.h"
+#include <sstream>
 
 namespace {
 
@@ -41,12 +32,12 @@ private:
   fullVector<double> _jacBez;
   double _minL, _maxL, _minB, _maxB; //Extremum of Jac at corners and of bezier values
   int _depthSub;
-  const JacobianBasis *_jfs;
+  const bezierBasis *_bfs;
 
 public:
-  BezierJacobian(fullVector<double> &, const JacobianBasis *, int depth);
+  BezierJacobian(fullVector<double>&, const bezierBasis*, int depth);
   void subDivisions(fullVector<double> &vect) const
-    {_jfs->subdivideBezierCoeff(_jacBez, vect);}
+    {_bfs->subDivisor.mult(_jacBez, vect);}
 
   bool boundsOk(double tol, double minL, double maxL) {
     return (minL <= 0 || _minB > 0) &&
@@ -64,9 +55,9 @@ public:
 } // namespace
 
 StringXNumber CurvedMeshOptions_Number[] = {
-  {GMSH_FULLRC, "Show: (0) Jacobian, (1) Metric", NULL, 1},
-  {GMSH_FULLRC, "Number of PView", NULL, 2},
-  {GMSH_FULLRC, "Hidding threshold", NULL, .1},
+  {GMSH_FULLRC, "Show: 0:J, 1:R, 2:J&&R", NULL, 1},
+  {GMSH_FULLRC, "Draw PView", NULL, 1},
+  {GMSH_FULLRC, "Hidding threshold", NULL, 10},
   {GMSH_FULLRC, "Dimension of elements", NULL, -1},
   {GMSH_FULLRC, "Recompute bounds", NULL, 0},
   {GMSH_FULLRC, "Tolerance", NULL, 1e-3}
@@ -89,30 +80,36 @@ StringXNumber *GMSH_AnalyseCurvedMeshPlugin::getOption(int iopt)
 std::string GMSH_AnalyseCurvedMeshPlugin::getHelp() const
 {
   return "Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. "
-    "It computes, min(J) where J is the scaled Jacobian determinant. Eventually, "
-    "it computes min(R) where R is the ratio between the smaller and the greater "
-    "of the eigenvalues of the metric. It creates one or more PView and hides "
+    "It computes, min(J) where J is the scaled Jacobian determinant and, if "
+    "asked, min(R) where R is the ratio between the smaller and the greater "
+    "of the eigenvalues of the metric. It creates a PView and hides "
     "elements for which min({J, R}) < 'Hidding threshold'.\n"
     "\n"
+    "J is faster to compute but gives informations only on validity while R "
+    "gives also informations on quality.\n"
+    "\n"
     "Parameters:\n"
     "\n"
-    "- Show [...] = {0, 1}: If 0, computes Jacobian and shows min(J). If 1, computes "
-    "Jacobian and metric and shows min(R).\n"
+    "- Show [...] = {0, 1, 2}: If 0, computes Jacobian and shows min(J). If 1, "
+    "computes Jacobian and metric and shows min(R). If 2, behaves like it is 1 "
+    "but draw the two min(J) and min(R) PView\n"
     "\n"
-    "- Number of PView = {0, 1, 2}: If 1, create one PView with all elements. If 2, create "
-    "two PView, one with straight-sided elements and one with curved elements.\n"
+    "- Draw PView = {0, 1}: Creates a PView of min({J, R}) if it does not "
+    "exist already. If 'Recompute' = 1, a new PView is redrawed.\n"
     "\n"
     "- Hidding threshold = [0,1]: Hides all element for which min(R) or min(J) "
     "is strictly greater than the threshold. If = 1, no effect, if = 0 hide "
     "all elements except invalid.\n"
     "\n"
-    "- Dimension = {-1, 1, 2, 3}: If = -1, analyse element of the greater dimension.\n"
+    "- Dimension = {-1, 1, 2, 3, 4}: If = -1, analyse element of the greater "
+    "dimension. If = 4, analyse 2D and 3D elements\n"
     "\n"
-    "- Recompute = {0,1}: If the mesh has changed, set to 1 to recompute the bounds.\n"
+    "- Recompute = {0,1}: If the mesh has changed, set to 1 to recompute the "
+    "bounds.\n"
     "\n"
-    "- Tolerance = ]0, 1[: Tolerance on the computation of min(R) or min(J). "
-    "It should be at most 0.01 but it can be set to 1 to just check the validity of "
-    "the mesh.";
+    "- Tolerance = ]0, 1[: Tolerance on the computation of min({R, J}). "
+    "It should be at most 0.01 but it can be set to 1 or greater to just check "
+    "the validity of the mesh.";
 }
 
 // Execution
@@ -120,115 +117,94 @@ PView *GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
 {
   _m = GModel::current();
   _computeMetric = static_cast<int>(CurvedMeshOptions_Number[0].def);
-  _numPView      = static_cast<int>(CurvedMeshOptions_Number[1].def);
+  bool drawPView = static_cast<int>(CurvedMeshOptions_Number[1].def);
   _threshold     = static_cast<double>(CurvedMeshOptions_Number[2].def);
-  _dim           = static_cast<int>(CurvedMeshOptions_Number[3].def);
-  _recompute     = static_cast<bool>(CurvedMeshOptions_Number[4].def);
+  int askedDim   = static_cast<int>(CurvedMeshOptions_Number[3].def);
+  bool recompute = static_cast<bool>(CurvedMeshOptions_Number[4].def);
   _tol           = static_cast<double>(CurvedMeshOptions_Number[5].def);
 
-  if (_dim < 0 || _dim > 3) _dim = _m->getDim();
+  if (askedDim < 0 || askedDim > 4) askedDim = _m->getDim();
 
-  if (_recompute) {
+  if (recompute) {
     _data.clear();
-    _computedJ3D = false;
-    _computedJ2D = false;
-    _computedJ1D = false;
-    _computedR3D = false;
-    _computedR2D = false;
+    if (askedDim < 4) {
+      _computedR[askedDim-1] = false;
+      _computedJ[askedDim-1] = false;
+      _PViewJ[askedDim-1] = false;
+      _PViewR[askedDim-1] = false;
+    }
+    else {
+      _computedR[1] = _computedR[2] = false;
+      _computedJ[1] = _computedJ[2] = false;
+      _PViewJ[1] = _PViewJ[2] = false;
+      _PViewR[1] = _PViewR[2] = false;
+    }
     _msgHide = true;
-    _1PViewJ = false;
-    _2PViewJ = false;
-    _1PViewR = false;
-    _2PViewR = false;
   }
 
-  if ((_dim == 1 && !_computedJ1D) ||
-      (_dim == 2 && !_computedJ2D) ||
-      (_dim == 3 && !_computedJ3D)   ) {
-    double time = Cpu();
-    Msg::StatusBar(true, "Computing Jacobian for %dD elements...", _dim);
-    _computeMinMaxJandValidity();
-    Msg::StatusBar(true, "... Done computing Jacobian (%g seconds)", Cpu()-time);
-    _printStatJacobian();
-  }
-
-  if (_computeMetric &&
-      ((_dim == 2 && !_computedR2D) ||
-       (_dim == 3 && !_computedR3D)   )) {
-    double time = Cpu();
-    Msg::StatusBar(true, "Computing metric for %dD elements...", _dim);
-    _computeMinR();
-    Msg::StatusBar(true, "... Done computing metric (%g seconds)", Cpu()-time);
-    _printStatMetric();
-  }
-
-  if (_computeMetric &&
-      (_dim == 1 ||
-       (_dim == 2 && !_computedR2D) ||
-       (_dim == 3 && !_computedR3D))) {
-    return 0;
+  // Compute J and/or R
+  for (int dim = 1; dim <= 3 && dim <= _m->getDim(); ++dim) {
+    if ((askedDim == 4 && dim > 1) || dim == askedDim) {
+      if (!_computedJ[dim-1]) {
+        double time = Cpu();
+        Msg::StatusBar(true, "Computing Jacobian for %dD elements...", dim);
+        _computeMinMaxJandValidity(dim);
+        Msg::StatusBar(true, "... Done computing Jacobian (%g seconds)", Cpu()-time);
+        _printStatJacobian();
+      }
+      if (_computeMetric && !_computedR[dim-1]) {
+        double time = Cpu();
+        Msg::StatusBar(true, "Computing metric for %dD elements...", dim);
+        _computeMinR(dim);
+        Msg::StatusBar(true, "... Done computing metric (%g seconds)", Cpu()-time);
+        _printStatMetric();
+      }
+    }
   }
 
   // Create PView
-
-  std::map<int, std::vector<double> > *dataPV1 = NULL;
-  std::map<int, std::vector<double> > *dataPV2 = NULL;
-  std::stringstream name1, name2;
-  if (_numPView == 1 &&
-      ((_computeMetric && !_1PViewR) || (!_computeMetric && !_1PViewJ))) {
-    dataPV1 = new std::map<int, std::vector<double> >();
-    if (_computeMetric) {
-      name1 << "min R";
-      _1PViewR = true;
-    }
-    else {
-      name1 << "min J";
-      _1PViewJ = true;
-    }
-    for (unsigned int i = 0; i < _data.size(); ++i) {
-      MElement *const el = _data[i].element();
-      if (el->getDim() == _dim) {
-        double val = _computeMetric ? _data[i].minR() : _data[i].minJ();
-        (*dataPV1)[el->getNum()].push_back(val);
+  if (drawPView)
+  for (int dim = 1; dim <= 3; ++dim) {
+    if ((askedDim == 4 && dim > 1) || dim == askedDim) {
+      if (!_PViewJ[dim-1] && _computeMetric != 1) {
+        _PViewJ[dim-1] = true;
+        std::map<int, std::vector<double> > dataPV;
+        for (unsigned int i = 0; i < _data.size(); ++i) {
+          MElement *const el = _data[i].element();
+          if (el->getDim() == dim) {
+            dataPV[el->getNum()].push_back(_data[i].minJ());
+          }
+        }
+        if (dataPV.size()) {
+          std::stringstream name;
+          name << "min J " << dim << "D";
+          new PView(name.str().c_str(), "ElementData", _m, dataPV);
+        }
       }
-    }
-  }
-  else if (_numPView == 2 &&
-      ((_computeMetric && !_2PViewR) || (!_computeMetric && !_2PViewJ))) {
-    dataPV1 = new std::map<int, std::vector<double> >();
-    dataPV2 = new std::map<int, std::vector<double> >();
-    if (_computeMetric) {
-      name1 << "min R straight";
-      name2 << "min R curved";
-      _2PViewR = true;
-    }
-    else {
-      name1 << "min J straight";
-      name2 << "min J curved";
-      _2PViewJ = true;
-    }
-    for (unsigned int i = 0; i < _data.size(); ++i) {
-      MElement *const el = _data[i].element();
-      if (el->getDim() == _dim) {
-        double val = _computeMetric ? _data[i].minR() : _data[i].minJ();
-        if (_data[i].maxJ() - _data[i].minJ() < _tol * 1e-2)
-          (*dataPV1)[el->getNum()].push_back(val);
-        else
-          (*dataPV2)[el->getNum()].push_back(val);
+      if (!_PViewR[dim-1] && _computeMetric) {
+        _PViewR[dim-1] = true;
+        std::map<int, std::vector<double> > dataPV;
+        for (unsigned int i = 0; i < _data.size(); ++i) {
+          MElement *const el = _data[i].element();
+          if (el->getDim() == dim)
+            dataPV[el->getNum()].push_back(_data[i].minR());
+        }
+        if (dataPV.size()) {
+          std::stringstream name;
+          name << "min R " << dim << "D";
+          new PView(name.str().c_str(), "ElementData", _m, dataPV);
+        }
       }
     }
   }
 
-  if (dataPV1) new PView(name1.str().c_str(), "ElementData", _m, *dataPV1);
-  if (dataPV2) new PView(name2.str().c_str(), "ElementData", _m, *dataPV2);
-
-  //
-
+  // Hide elements
 #if defined(HAVE_OPENGL)
-  if (_hideWithThreshold() && _msgHide) {
+  if (_hideWithThreshold(askedDim) && _msgHide) {
     _msgHide = false;
     Msg::Info("Note: Some elements have been hidden (param 'Hidding Threshold').");
-    Msg::Info("      (To revert visibility : Tools > Visibility > Interactive > Show All)");
+    Msg::Info("      (To revert: set 'Hidding Threshold' to 1 and rerun");
+    Msg::Info("                  or, Tools > Visibility > Interactive > Show All)");
   }
   CTX::instance()->mesh.changed = (ENT_ALL);
   drawContext::global()->draw();
@@ -237,11 +213,12 @@ PView *GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
   return 0;
 }
 
-void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity()
+void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim)
 {
-  switch (_dim) {
+  if (_computedJ[dim-1]) return;
+
+  switch (dim) {
     case 3 :
-      if (_computedJ3D) break;
       for (GModel::riter it = _m->firstRegion(); it != _m->lastRegion(); it++) {
         GRegion *r = *it;
         unsigned int numType[5] = {0, 0, 0, 0, 0};
@@ -252,11 +229,9 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity()
           _computeMinMaxJandValidity(el, numType[type]);
         }
       }
-      _computedJ3D = true;
       break;
 
     case 2 :
-      if (_computedJ2D) break;
       for (GModel::fiter it = _m->firstFace(); it != _m->lastFace(); it++) {
         GFace *f = *it;
         unsigned int numType[3] = {0, 0, 0};
@@ -267,24 +242,23 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity()
           _computeMinMaxJandValidity(el, numType[type]);
         }
       }
-      _computedJ2D = true;
       break;
 
     case 1 :
-      if (_computedJ1D) break;
       for (GModel::eiter it = _m->firstEdge(); it != _m->lastEdge(); it++) {
         GEdge *e = *it;
         unsigned int numElement = e->getNumMeshElements();
         MElement *const *el = e->getStartElementType(0);
         _computeMinMaxJandValidity(el, numElement);
       }
-      _computedJ1D = true;
       break;
 
     default :
-      Msg::Error("I can not analyse any element.");
+      Msg::Fatal("This should not happen.");
       return;
   }
+
+  _computedJ[dim-1] = true;
 }
 
 void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el, int numEl)
@@ -297,12 +271,15 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el
     Msg::Error("Jacobian function space not implemented for type of element %d", el[0]->getNum());
     return;
   }
+  const bezierBasis *bfs = jfs->getBezier();
+
+  _data.reserve(_data.size() + numEl);
 
   const int numSamplingPt = jfs->getNumJacNodes();
   const int numMapNodes = jfs->getNumMapNodes();
   fullVector<double> jacobian(numSamplingPt);
   fullVector<double> jacBez(numSamplingPt);
-  fullVector<double> subJacBez(jfs->getNumSubNodes());
+  fullVector<double> subJacBez(bfs->getNumSubNodes());
 
   for (int k = 0; k < numEl; ++k) {
     fullMatrix<double> nodesXYZ(numMapNodes,3);
@@ -310,7 +287,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el
     jfs->getScaledJacobian(nodesXYZ,jacobian);
     jfs->lag2Bez(jacobian, jacBez);
 
-    BezierJacobian *bj = new BezierJacobian(jacBez, jfs, 0);
+    BezierJacobian *bj = new BezierJacobian(jacBez, bfs, 0);
     std::vector<BezierJacobian*> heap;
     heap.push_back(bj);
 
@@ -324,17 +301,23 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el
 
       bj->subDivisions(subJacBez);
       currentDepth = bj->depth() + 1;
-      if (currentDepth > 20) Msg::Error("depth is too damn high !");
+      if (currentDepth > 20) {
+        static int a = 0;
+        if (++a == 1)
+          Msg::Error("depth is too damn high ! elem type %d",
+                     el[k]->getTypeForMSH());
+      }
 
-      for (int i = 0; i < jfs->getNumDivisions(); i++) {
+      for (int i = 0; i < bfs->getNumDivision(); i++) {
         jacBez.setAsProxy(subJacBez, i * numSamplingPt, numSamplingPt);
-        bj = new BezierJacobian(jacBez, jfs, currentDepth);
-        minL = std::min(minL, bj->minL());
-        maxL = std::max(maxL, bj->maxL());
+        BezierJacobian *newbj = new BezierJacobian(jacBez, bfs, currentDepth);
+        minL = std::min(minL, newbj->minL());
+        maxL = std::max(maxL, newbj->maxL());
 
-        heap.push_back(bj);
+        heap.push_back(newbj);
         push_heap(heap.begin(), heap.end(), lessMinVal());
       }
+      delete bj;
     }
 
     make_heap(heap.begin(), heap.end(), lessMax());
@@ -346,17 +329,23 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el
 
       bj->subDivisions(subJacBez);
       currentDepth = bj->depth() + 1;
-      if (currentDepth > 20) Msg::Error("depth is too damn high !");
+      if (currentDepth > 20) {
+        static int a = 0;
+        if (++a == 1)
+          Msg::Error("depth is too damn high ! elem type %d",
+                     el[k]->getTypeForMSH());
+      }
 
-      for (int i = 0; i < jfs->getNumDivisions(); i++) {
+      for (int i = 0; i < bfs->getNumDivision(); i++) {
         jacBez.setAsProxy(subJacBez, i * numSamplingPt, numSamplingPt);
-        bj = new BezierJacobian(jacBez, jfs, currentDepth);
-        minL = std::min(minL, bj->minL());
-        maxL = std::max(maxL, bj->maxL());
+        BezierJacobian *newbj = new BezierJacobian(jacBez, bfs, currentDepth);
+        minL = std::min(minL, newbj->minL());
+        maxL = std::max(maxL, newbj->maxL());
 
-        heap.push_back(bj);
+        heap.push_back(newbj);
         push_heap(heap.begin(), heap.end(), lessMax());
       }
+      delete bj;
     }
 
     double minB = minL;
@@ -364,52 +353,15 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(MElement *const*el
     for (unsigned int i = 0; i < heap.size(); ++i) {
       minB = std::min(minB, heap[i]->minB());
       maxB = std::max(maxB, heap[i]->maxB());
+      delete heap[i];
     }
-
-    // TODO REMOVE #include "BasisFactory.h"
-
-    /*if (el[k]->getNum() == 26776) {
-      Msg::Info("%g %g %g %g", minB, minL, maxL, maxB);
-
-      / *const nodalBasis* nb = BasisFactory::getNodalBasis(el[k]->getTypeForMSH());
-      int tag1 = ElementType::getTag(el[k]->getType(), 1);
-      const nodalBasis* nb1 = BasisFactory::getNodalBasis(tag1);
-
-      //double *f;
-      //f = new double[nb1->points.size1()];
-      fullMatrix<double> f;
-      nb1->f(nb->points, f);
-      Msg::Info("SIZES [%d %d] (%d, %d)", f.size1(), f.size2(), nb->points.size1(), nb1->points.size1());
-
-      for (int i = 0; i < nb->points.size1(); ++i) {
-        double X[3] = {0, 0, 0};
-        for (int j = 0; j < f.size2(); ++j) {
-          X[0] += el[k]->getVertex(j)->x() * f(i, j);
-          X[1] += el[k]->getVertex(j)->y() * f(i, j);
-          X[2] += el[k]->getVertex(j)->z() * f(i, j);
-        }
-        if (std::abs(X[0] - el[k]->getVertex(i)->x()) < 1e-12 &&
-            std::abs(X[1] - el[k]->getVertex(i)->y()) < 1e-12 &&
-            std::abs(X[2] - el[k]->getVertex(i)->z()) < 1e-12);
-        else {
-          Msg::Info("aaarg %d/%d : [%g %g %g] ([%g %g %g])", i+1, nb->points.size1(),
-              el[k]->getVertex(i)->x(), el[k]->getVertex(i)->y(), el[k]->getVertex(i)->z(),
-              X[0], X[1], X[2]);
-        }
-      }* /
-    }*/
-
     _data.push_back(CurvedMeshPluginData(el[k], minB, maxB));
   }
 }
 
-void GMSH_AnalyseCurvedMeshPlugin::_computeMinR()
+void GMSH_AnalyseCurvedMeshPlugin::_computeMinR(int dim)
 {
-  if (_dim == 1 ||
-      (_dim == 2 && _computedR2D) ||
-      (_dim == 3 && _computedR3D)) {
-    return;
-  }
+  if (_computedR[dim-1]) return;
 
   MetricBasis::setTol(_tol);
 
@@ -418,37 +370,40 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinR()
 
   for (unsigned int i = 0; i < _data.size(); ++i) {
     MElement *const el = _data[i].element();
-    if (el->getDim() == _dim) {
+    if (el->getDim() == dim) {
       if (_data[i].minJ() <= 0)
         _data[i].setMinR(0);
       else if (_data[i].maxJ() - _data[i].minJ() < _tol * 1e-2)
-        _data[i].setMinR(MetricBasis::sampleR(el, 0));
+        _data[i].setMinR(MetricBasis::minSampledR(el, 0));
       else
         _data[i].setMinR(MetricBasis::boundMinR(el));
     }
     if (i >= nextCheck) {
       nextCheck += _data.size() / 100;
-      if (Cpu() - time > 10. && i*100/_data.size() > percentage + 4) {
-        percentage = i*100/_data.size();
-        time = Cpu();
+      double curTime = Cpu();
+      unsigned int curPercentage = i*100/_data.size();
+      if ((curTime - time > 10. && curPercentage > percentage + 4) ||
+          (curTime - time > 15. && curPercentage < 5)) {
+        percentage = curPercentage;
+        time = curTime;
         Msg::StatusBar(true, "%d%% (remaining time ~%g secondes)",
-            percentage, (Cpu()-initial) / (i+1) * (_data.size() - i-1));
+            percentage, (time-initial) / (i+1) * (_data.size() - i-1));
       }
     }
   }
 
-  if (_dim == 2) _computedR2D = true;
-  if (_dim == 3) _computedR3D = true;
+  _computedR[dim-1] = true;
 }
 
-bool GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold()
+bool GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold(int askedDim)
 {
   if (_threshold >= 1.) return false;
 
   bool ans = false;
   for (unsigned int i = 0; i < _data.size(); ++i) {
     MElement *const el = _data[i].element();
-    if (el->getDim() == _dim) {
+    const int dim = el->getDim();
+    if ((askedDim == 4 && dim > 1) || dim == askedDim) {
       if (( _computeMetric && _data[i].minR() > _threshold) ||
           (!_computeMetric && _data[i].minJ() > _threshold)   ) {
         el->setVisibility(0);
@@ -465,7 +420,7 @@ bool GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold()
 void GMSH_AnalyseCurvedMeshPlugin::_printStatMetric()
 {
   if (_data.empty()) {
-    Msg::Info("No stat to print...");
+    Msg::Info("No stat to print.");
     return;
   }
   double infminR, supminR, avgminR;
@@ -485,7 +440,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatMetric()
 void GMSH_AnalyseCurvedMeshPlugin::_printStatJacobian()
 {
   if (_data.empty()) {
-    Msg::Info("No stat to print...");
+    Msg::Info("No stat to print.");
     return;
   }
   double infminJ, supminJ, avgminJ;
@@ -517,15 +472,15 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatJacobian()
 }
 
 BezierJacobian::BezierJacobian(fullVector<double> &v,
-    const JacobianBasis *jfs, int depth)
+    const bezierBasis *bfs, int depth)
 {
   _jacBez = v;
   _depthSub = depth;
-  _jfs = jfs;
+  _bfs = bfs;
 
   _minL = _maxL = v(0);
   int i = 1;
-  for (; i < jfs->getNumLagCoeff(); i++) {
+  for (; i < bfs->getNumLagCoeff(); i++) {
     if (_minL > v(i)) _minL = v(i);
     if (_maxL < v(i)) _maxL = v(i);
   }
diff --git a/Plugin/AnalyseCurvedMesh.h b/Plugin/AnalyseCurvedMesh.h
index 0fe626a..f458285 100644
--- a/Plugin/AnalyseCurvedMesh.h
+++ b/Plugin/AnalyseCurvedMesh.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -7,11 +7,8 @@
 #define _ANALYSECURVEDMESH_H_
 
 #include "Plugin.h"
-#include "JacobianBasis.h"
-#include "MetricBasis.h"
-#include "MElement.h"
-
 #include <vector>
+class MElement;
 
 extern "C"
 {
@@ -41,30 +38,28 @@ public:
 class GMSH_AnalyseCurvedMeshPlugin : public GMSH_PostPlugin
 {
 private :
-  int _dim;
   GModel *_m;
   double _threshold, _tol;
-  int _numPView, _computeMetric;
-  bool _recompute;
-  bool _computedR3D, _computedR2D;
-  bool _computedJ3D, _computedJ2D, _computedJ1D;
-  bool _1PViewJ, _2PViewJ, _1PViewR, _2PViewR;
+  int _computeMetric;
+
+  // for 1d, 2d, 3d
+  bool _computedR[3], _computedJ[3], _PViewJ[3], _PViewR[3];
   bool _msgHide;
 
   std::vector<CurvedMeshPluginData> _data;
 
 public :
   GMSH_AnalyseCurvedMeshPlugin() {
-    _computedR3D = false;
-    _computedR2D = false;
-    _computedJ3D = false;
-    _computedJ2D = false;
-    _computedJ1D = false;
+    _m = NULL;
+    _threshold = _tol = -1;
+    _computeMetric = -1;
+    for (int i = 0; i < 3; ++i) {
+      _computedR[i] = false;
+      _computedJ[i] = false;
+      _PViewJ[i] = false;
+      _PViewR[i] = false;
+    }
     _msgHide = true;
-    _1PViewJ = false;
-    _2PViewJ = false;
-    _1PViewR = false;
-    _2PViewR = false;
   }
   std::string getName() const { return "AnalyseCurvedMesh"; }
   std::string getShortHelp() const {
@@ -75,12 +70,29 @@ public :
   int getNbOptions() const;
   StringXNumber *getOption(int);
   PView *execute(PView *);
+  void setTol(double tol) {_tol = tol;}
+  void computeMinJ(MElement *const *el, int numEl, double *minJ, bool *straight) {
+    std::vector<CurvedMeshPluginData> save(_data);
+    _data.clear();
+    _computeMinMaxJandValidity(el, numEl);
+    if (minJ) {
+      for (unsigned int i = 0; i < _data.size(); ++i) {
+        minJ[i] = _data[i].minJ();
+      }
+    }
+    if (straight) {
+      for (unsigned int i = 0; i < _data.size(); ++i) {
+        straight[i] = _data[i].maxJ() - _data[i].minJ() < _tol * 1e-1;
+      }
+    }
+    _data = save;
+  }
 
 private :
-  void _computeMinMaxJandValidity();
+  void _computeMinMaxJandValidity(int dim);
   void _computeMinMaxJandValidity(MElement *const *, int numEl);
-  void _computeMinR();
-  bool _hideWithThreshold();
+  void _computeMinR(int dim);
+  bool _hideWithThreshold(int askedDim);
   void _printStatMetric();
   void _printStatJacobian();
 };
diff --git a/Plugin/Annotate.cpp b/Plugin/Annotate.cpp
index 0943f55..f190d62 100644
--- a/Plugin/Annotate.cpp
+++ b/Plugin/Annotate.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Annotate.h b/Plugin/Annotate.h
index 5204e73..90caf94 100644
--- a/Plugin/Annotate.h
+++ b/Plugin/Annotate.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Bubbles.cpp b/Plugin/Bubbles.cpp
index 3b4d1c1..160b07e 100644
--- a/Plugin/Bubbles.cpp
+++ b/Plugin/Bubbles.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Bubbles.h b/Plugin/Bubbles.h
index 8cc2ae6..9812bf3 100644
--- a/Plugin/Bubbles.h
+++ b/Plugin/Bubbles.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt
index 48fc3a4..fbace74 100644
--- a/Plugin/CMakeLists.txt
+++ b/Plugin/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -32,8 +32,9 @@ set(SRC
   Scal2Tens.cpp Scal2Vec.cpp
   CutMesh.cpp
   NewView.cpp
-  SimplePartition.cpp Crack.cpp
+  SimplePartition.cpp Crack.cpp DuplicateBoundaries.cpp
   FaultZone.cpp
+  MeshSubEntities.cpp
 )
 
 file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
diff --git a/Plugin/Crack.cpp b/Plugin/Crack.cpp
index 26b31e3..8731985 100644
--- a/Plugin/Crack.cpp
+++ b/Plugin/Crack.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Crack.h b/Plugin/Crack.h
index ddd5879..a2bad6c 100644
--- a/Plugin/Crack.h
+++ b/Plugin/Crack.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Curl.cpp b/Plugin/Curl.cpp
index 09ecf3b..3a01413 100644
--- a/Plugin/Curl.cpp
+++ b/Plugin/Curl.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Curl.h b/Plugin/Curl.h
index 1adc0e0..d5eafab 100644
--- a/Plugin/Curl.h
+++ b/Plugin/Curl.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutBox.cpp b/Plugin/CutBox.cpp
index ad57ac2..e45bcda 100644
--- a/Plugin/CutBox.cpp
+++ b/Plugin/CutBox.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutBox.h b/Plugin/CutBox.h
index 2b480d3..7284a33 100644
--- a/Plugin/CutBox.h
+++ b/Plugin/CutBox.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp
index c39d3bb..85095f7 100644
--- a/Plugin/CutGrid.cpp
+++ b/Plugin/CutGrid.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutGrid.h b/Plugin/CutGrid.h
index cd05f16..c3b4550 100644
--- a/Plugin/CutGrid.h
+++ b/Plugin/CutGrid.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutMesh.cpp b/Plugin/CutMesh.cpp
index c9a54b2..f2305f0 100644
--- a/Plugin/CutMesh.cpp
+++ b/Plugin/CutMesh.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutMesh.h b/Plugin/CutMesh.h
index 61fc28d..674648a 100644
--- a/Plugin/CutMesh.h
+++ b/Plugin/CutMesh.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp
index 3624dab..83d7b75 100644
--- a/Plugin/CutParametric.cpp
+++ b/Plugin/CutParametric.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutParametric.h b/Plugin/CutParametric.h
index e50b3e8..edfb1c0 100644
--- a/Plugin/CutParametric.h
+++ b/Plugin/CutParametric.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp
index 8877826..82df764 100644
--- a/Plugin/CutPlane.cpp
+++ b/Plugin/CutPlane.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutPlane.h b/Plugin/CutPlane.h
index e11fc2b..d1d6ec7 100644
--- a/Plugin/CutPlane.h
+++ b/Plugin/CutPlane.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp
index 2bf34da..426ddd6 100644
--- a/Plugin/CutSphere.cpp
+++ b/Plugin/CutSphere.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/CutSphere.h b/Plugin/CutSphere.h
index d45c202..9d4b3b5 100644
--- a/Plugin/CutSphere.h
+++ b/Plugin/CutSphere.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/DiscretizationError.cpp b/Plugin/DiscretizationError.cpp
index c64471c..5ca3e30 100644
--- a/Plugin/DiscretizationError.cpp
+++ b/Plugin/DiscretizationError.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/DiscretizationError.h b/Plugin/DiscretizationError.h
index 20badda..d66d6cc 100644
--- a/Plugin/DiscretizationError.h
+++ b/Plugin/DiscretizationError.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Distance.cpp b/Plugin/Distance.cpp
index aa7b088..0be2818 100644
--- a/Plugin/Distance.cpp
+++ b/Plugin/Distance.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Distance.h b/Plugin/Distance.h
index 611564d..896b7ed 100644
--- a/Plugin/Distance.h
+++ b/Plugin/Distance.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Divergence.cpp b/Plugin/Divergence.cpp
index 8e3d9a1..1c35250 100644
--- a/Plugin/Divergence.cpp
+++ b/Plugin/Divergence.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Divergence.h b/Plugin/Divergence.h
index b3aa28a..f985b42 100644
--- a/Plugin/Divergence.h
+++ b/Plugin/Divergence.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/DuplicateBoundaries.cpp b/Plugin/DuplicateBoundaries.cpp
new file mode 100644
index 0000000..04fdb16
--- /dev/null
+++ b/Plugin/DuplicateBoundaries.cpp
@@ -0,0 +1,4840 @@
+// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "DuplicateBoundaries.h"
+#include "GModel.h"
+#include "discreteEdge.h"
+#include "discreteFace.h"
+#include "MElement.h"
+#include "MLine.h"
+#include "MTriangle.h"
+#include "MQuadrangle.h"
+#include "MPrism.h"
+#include "MEdge.h"
+#include <fstream>
+#include <sstream>
+#include "Context.h"
+
+StringXNumber DuplicateBoundariesOptions_Number[] = {
+  {GMSH_FULLRC, "Dummy", NULL, 1.},
+};
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterDuplicateBoundariesPlugin()
+  {
+    return new GMSH_DuplicateBoundariesPlugin();
+  }
+}
+
+std::string GMSH_DuplicateBoundariesPlugin::getHelp() const
+{
+  return "Plugin(DuplicateBoundaries) is not documented yet.";
+}
+
+int GMSH_DuplicateBoundariesPlugin::getNbOptions() const
+{
+  return sizeof(DuplicateBoundariesOptions_Number) / sizeof(StringXNumber);
+}
+
+StringXNumber *GMSH_DuplicateBoundariesPlugin::getOption(int iopt)
+{
+  return &DuplicateBoundariesOptions_Number[iopt];
+}
+
+class EdgeData{
+public:
+  EdgeData(MEdge e) : edge(e) {}
+  MEdge edge;
+  std::vector<MVertex*> data;
+};
+
+struct Less_EdgeData : public std::binary_function<EdgeData, EdgeData, bool> {
+  bool operator()(const EdgeData &e1, const EdgeData &e2) const
+  {
+    if(e1.edge.getMinVertex() < e2.edge.getMinVertex()) return true;
+    if(e1.edge.getMinVertex() > e2.edge.getMinVertex()) return false;
+    if(e1.edge.getMaxVertex() < e2.edge.getMaxVertex()) return true;
+    return false;
+  }
+};
+
+//OLF VERSION ONLY DUPLICATING NODES
+
+//PView *GMSH_DuplicateBoundariesPlugin::execute(PView *view)
+//{
+//	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+//	GModel *m = GModel::current();
+//	std::map<std::pair<MVertex*,GRegion*>,MVertex* > VertexAssociation;
+//	for (GModel::viter itv = m->firstVertex();itv != m->lastVertex();itv++){
+////		std::cout<<"entering first for"<<std::endl;
+//		GVertex* vTmp = (*itv);
+//		std::list<GRegion*> r = vTmp->regions();
+//		std::cout<<"size of mesh_vertices: "<<vTmp->mesh_vertices.size()<<std::endl;
+//		MVertex *vMesh = vTmp->mesh_vertices[0];
+//		std::cout<<"size of r: "<<r.size()<<std::endl;
+//		// for all regions, create association
+////		for (int i = 0; i < vTmp->getNumMeshVertices();i++){
+////			std::cout<<"entering second for"<<std::endl;
+////			MVertex* vMesh = vTmp->getMeshVertex(i);
+////			for (GModel::riter itr = vTmp->regions().begin();itr != vTmp->regions().end();itr++){
+//		for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+//			std::cout<<"entering third for"<<std::endl;
+//			GRegion* vReg = (*itr);
+//			//				std::cout<<"we have the region "<<vReg->
+//			MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+//			vReg->mesh_vertices.push_back(newv);
+//			VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+//			std::cout<<"end third for"<<std::endl;
+//		}
+////			std::cout<<"end second for"<<std::endl;
+////		}
+////		std::cout<<"end first for"<<std::endl;
+//	}
+//	std::cout<<"Phase 1 done for DuplicateBoundaries"<<std::endl;
+//	for (GModel::eiter ite = m->firstEdge();ite != m->lastEdge();ite++){
+//		GEdge* eTmp = (*ite);
+//		for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+//			MVertex* vMesh = eTmp->mesh_vertices[i];
+//			std::list<GRegion*> r = eTmp->regions();
+//			for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+//				GRegion* vReg = (*itr);
+//				MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+//				vReg->mesh_vertices.push_back(newv);
+//				VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+//			}
+//		}
+//	}
+//	std::cout<<"Phase 2 done for DuplicateBoundaries"<<std::endl;
+//	for (GModel::fiter itf = m->firstFace();itf != m->lastFace();itf++){
+//		GFace* fTmp = (*itf);
+//		for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+//			MVertex* vMesh = fTmp->mesh_vertices[i];
+//			std::list<GRegion*> r = fTmp->regions();
+//			for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+//				GRegion* vReg = (*itr);
+//				MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+//				vReg->mesh_vertices.push_back(newv);
+//				VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+//			}
+//		}
+//	}
+//	std::cout<<"Phase 3 done for DuplicateBoundaries"<<std::endl;
+//	for (GModel::riter itr = m->firstRegion();itr != m->lastRegion();itr++){
+//		GRegion* rTmp = (*itr);
+//		for (int i = 0; i < rTmp->getNumMeshElements();i++){
+//			MElement* elem = rTmp->getMeshElement(i);
+//			for (int j = 0;j < elem->getNumVertices();j++){
+//				MVertex* vert = elem->getVertex(j);
+//				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexAssociation.find(std::make_pair(vert,rTmp));
+//				if (itMap != VertexAssociation.end()){
+//					elem->setVertex(j,itMap->second);
+//				}
+//			}
+//		}
+//	}
+//	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+//	return view;
+//}
+
+double GMSH_DuplicateBoundariesPlugin::abs(double x){
+	if (x < 0.0){
+		return (-x);
+	}
+	else{
+		return x;
+	}
+}
+
+PView *GMSH_DuplicateBoundariesPlugin::executeBis(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GFace*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GFace*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+//	int PhysicalSeeds = m->setPhysicalName("Seeds",3);
+//
+//	//std::cout<<"number for seeds: "<<PhysicalSeeds<<" and for interface: "<<PhysicalInterface<<std::endl;
+//
+//	for (GModel::riter itf= m->firstRegion();itf != m->lastRegion();itf++){
+//		GRegion* fTmp = (*itf);
+//		fTmp->addPhysicalEntity(PhysicalSeeds);
+//	}
+	int PhysicalInterface = m->setPhysicalName("Interface",3);
+	std::cout<<"DEBUT INIT"<<std::endl;
+	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+
+
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+//			std::cout<<"TEST INITIAL"<<std::endl;
+
+			if (elem->getVertex(0)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(0)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(1)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(1)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(2)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(2)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+		}
+
+
+		if (fTmp->numRegions() == 2){
+			ToDuplicateList.insert(fTmp);
+		}
+		else{
+			facesBound.push_back(fTmp);
+			//ToDuplicateListBoundary.insert(fTmp);
+		}
+	}
+	std::cout<<"FIN INIT"<<std::endl;
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		double x = 0.0;
+		double y = 0.0;
+		double z = 0.0;
+
+		std::list<GVertex*> vertices;
+
+		vertices = facesBound[i]->vertices();
+
+		for(std::list<GVertex*>::iterator it2=vertices.begin();it2!=vertices.end();it2++){
+			x = x + (*it2)->x();
+			y = y + (*it2)->y();
+			z = z + (*it2)->z();
+		}
+
+		x = x/vertices.size();
+		y = y/vertices.size();
+		z = z/vertices.size();
+
+		centers.insert(std::pair<GFace*,SPoint3>(facesBound[i],SPoint3(x,y,z)));
+	}
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		for(unsigned int j=0;j<facesBound.size();j++){
+			std::map<GFace*,SPoint3>::iterator it3 = centers.find(facesBound[i]);
+			std::map<GFace*,SPoint3>::iterator it4 = centers.find(facesBound[j]);
+
+			SPoint3 p1 = it3->second;
+			SPoint3 p2 = it4->second;
+
+
+			//				categories.push_back(val);
+
+			//				print_segment(p1,p2,file);
+
+			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+						std::cout<<"case 1"<<std::endl;
+//						std::cout<<"on a p1.x() = "<<p1.x()<<" et p2.x() = "<<p2.x()<<" et abs((p2.x()-p1.x()-1.0)) = "<<abs((p2.x()-p1.x()-1.0))<<std::endl;
+//						std::cout<<"on a abs(0.5) = "<<abs(0.5)<<" et abs(-0.5) = "<<abs(-0.5)<<" et abs(1.5) = "<<abs(1.5)<<" et abs(-1.5) = "<<abs(-1.5)<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 2"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 3"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 4"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 5"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 6"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 7"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 8"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 9"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}
+			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}else if (abs((p1.x()-p2.x()))<0.0001){
+				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 10"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 11"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 12"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()))<0.0001){
+					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 13"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}
+		}
+	}
+	std::cout<<"on a une taille de facesBound = "<<facesBound.size()<<" et ToDuplicateListBoundary = "<<ToDuplicateListBoundary.size()<<std::endl;
+
+	int counterNbDone = 10000;
+	//int tagEdges = 10000;
+	for (std::set<GFace*>::iterator itr = ToDuplicateList.begin();itr != ToDuplicateList.end();itr++){
+		std::cout<<"on est entre pour la fois numero "<<counterNbDone<<std::endl;
+		counterNbDone++;
+		GFace* fTmp = (*itr);
+		//on doit dupliquer la face, les noeuds, les aretes, puis creer une region entre les deux
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		GRegion *rTmp = fTmp->getRegion(1);
+		std::list<GFace*> facesReg;
+		facesReg = rTmp->faces();
+		std::cout<<"rmtp a un nombre INITIAL de faces de "<<rTmp->faces().size()<<std::endl;
+		for (std::list<GFace*>::iterator it2=facesReg.begin();it2!=facesReg.end();it2++){
+			GFace* fTemp = (*it2);
+			std::cout<<" ID "<<fTemp->tag();
+		}
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+
+
+
+
+		std::cout<<"nb de faces de la region 2: "<<rTmp->faces().size()<<std::endl;
+		std::cout<<"nb de points de la face 1 de region 2: "<<rTmp->faces().front()->vertices().size()<<std::endl;
+		std::cout<<"nb de points de la region 2: "<<rTmp->vertices().size()<<std::endl;
+
+		int counterPts = 0;
+		for(std::list<GFace*>::iterator it2=facesReg.begin();it2!=facesReg.end();it2++){
+			GFace* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+
+		std::cout<<"debut boucle for "<<counterNbDone<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			std::cout<<"point 1 "<<counterNbDone<<std::endl;
+			GVertex* vTmp = (*itv);
+			std::cout<<"point 2 "<<counterNbDone<<std::endl;
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+//			double ponderatedX = 1.0 * vTmp->x() + 0.0 * xCenterReg;
+//			double ponderatedY = 1.0 * vTmp->y() + 0.0 * yCenterReg;
+//			double ponderatedZ = 1.0 * vTmp->z() + 0.0 * zCenterReg;
+			//GVertex* newv = new gmshVertex(m,vTmp->prescribedMeshSizeAtVertex());
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+			std::cout<<"point 3 "<<counterNbDone<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			std::cout<<"test du ancien point: "<<vTmp->x()<<" et "<<vTmp->y()<<" et "<<vTmp->z()<<std::endl;
+			//creation des Gedge correspondantes
+			std::cout<<"point 4 "<<counterNbDone<<std::endl;
+			std::cout<<"test du nouveau point: "<<newv->x()<<" et "<<newv->y()<<" et "<<newv->z()<<std::endl;
+			//GEdge* newE = new GEdge(m,tagEdges,vTmp,newv);
+			//tagEdges++;
+			//m->add(newE);
+			std::cout<<"point gloubigoulba "<<counterNbDone<<std::endl;
+			GEdge* newE = m->addLine(vTmp,newv);
+			std::cout<<"point 5 "<<counterNbDone<<std::endl;
+			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			std::cout<<"point 6 "<<counterNbDone<<std::endl;
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			std::cout<<"point 7 "<<counterNbDone<<std::endl;
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			std::cout<<"point 8 "<<counterNbDone<<std::endl;
+			VertexAssociation[vMesh] = newMv;
+			std::cout<<"point 9 "<<counterNbDone<<std::endl;
+			newv->addMeshVertex(newMv);
+			if (newMv->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<newMv->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (vMesh->getNum() > 100000){
+				std::cout<<"What ? on a un getnum vtmp de "<<newMv->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+		}
+		std::cout<<"apres points "<<counterNbDone<<std::endl;
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+			GEdgeAssociation[eTmp] = newE;
+			newEdgesVector.push_back(newE);
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(eTmp);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(newE);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+				VertexAssociation[vMesh] = newMv;
+				newE->addMeshVertex(newMv);
+			}
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MLine *newLine = new MLine(firstETmp,lastETmp);
+				newE->addLine(newLine);
+			}
+		}
+		std::cout<<"apres lignes "<<counterNbDone<<std::endl;
+		std::vector<std::vector<GEdge*> > VecOfVec;
+		VecOfVec.push_back(newEdgesVector);
+		//creation de la nouvelle face
+		GFace* GFaceAssociation = m->addPlanarFace(VecOfVec);
+		//maintenant traitement mesh
+		for (unsigned int i = 0; i < fTmp->mesh_vertices.size();i++){
+			MVertex *vMesh = fTmp->mesh_vertices[i];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+			VertexAssociation[vMesh] = newMv;
+			GFaceAssociation->addMeshVertex(newMv);
+		}
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+			MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+			MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+			MTriangle *newTri = new MTriangle(firstE,secondE,thirdE);
+			GFaceAssociation->addTriangle(newTri);
+
+			if (elem->getVertex(0)->getNum() > 100000){
+				std::cout<<"ANCIENT TRI on a un getnum de "<<elem->getVertex(0)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(1)->getNum() > 100000){
+				std::cout<<"ANCIENT TRI on a un getnum de "<<elem->getVertex(1)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(2)->getNum() > 100000){
+				std::cout<<"ANCIENT TRI on a un getnum de "<<elem->getVertex(2)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+
+			if (firstE->getNum() > 100000){
+				std::cout<<"CREAT TRI on a un getnum de "<<firstE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (secondE->getNum() > 100000){
+				std::cout<<"CREAT TRI on a un getnum de "<<secondE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (thirdE->getNum() > 100000){
+				std::cout<<"CREAT TRI on a un getnum de "<<thirdE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+
+		}
+		std::cout<<"apres faces "<<counterNbDone<<std::endl;
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		VectorFaces.push_back(fTmp);
+		listFaces.push_back(fTmp);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(GFaceAssociation);
+		listFaces.push_back(GFaceAssociation);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		std::cout<<"creation de la nouvelle region "<<counterNbDone<<std::endl;
+		//creation de la nouvelle region
+
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+//		std::cout<<"plop 1"<<std::endl;
+		std::list<GFace*> RegFaces = rTmp->faces();
+//		std::cout<<"plop 2"<<std::endl;
+		std::list<GFace*>::iterator it = std::find(RegFaces.begin(), RegFaces.end(), fTmp);
+//		std::cout<<"plop 3"<<std::endl;
+//		std::cout<<"RegFaces a un nombre de faces de "<<RegFaces.size()<<std::endl;
+		std::cout<<(*it)->tag()<<std::endl;
+		if(it != RegFaces.end()) RegFaces.erase(it);
+//		std::cout<<"RegFaces a un nombre de faces de "<<RegFaces.size()<<std::endl;
+//		if(it != RegFaces.end()) RegFaces.remove((*it));
+//		std::cout<<"plop 4"<<std::endl;
+		RegFaces.push_back(GFaceAssociation);
+//		std::cout<<GFaceAssociation->tag()<<std::endl;
+//		std::cout<<"plop 5"<<std::endl;
+		rTmp->set(RegFaces);
+//		std::cout<<"rmtp a un nombre de faces de "<<rTmp->faces().size()<<std::endl;
+		std::list<GFace*> NewFacesReg;
+		NewFacesReg = rTmp->faces();
+		for (std::list<GFace*>::iterator it2=NewFacesReg.begin();it2!=NewFacesReg.end();it2++){
+			GFace* fTemp = (*it2);
+//			std::cout<<" ID "<<fTemp->tag();
+			for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+				GEdge* eTmp = (*ite);
+				GEdge* newE = GEdgeAssociation[eTmp];
+				fTemp->replaceEdge(eTmp,newE);
+			}
+		}
+		std::cout<<"plop 6"<<std::endl;
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+//			std::cout<<"on an element with a number of vertices of: "<<elem->getNumVertices()<<std::endl;
+
+			if (elem->getVertex(0)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(0)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(1)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(1)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (elem->getVertex(2)->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<elem->getVertex(2)->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+
+//			std::cout<<"on a un element avec un nb de vertex de "<<elem->getNumVertices()<<std::endl;
+			MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+			MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+			MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+
+			if (firstE->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<firstE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (secondE->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<secondE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+			if (thirdE->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<thirdE->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+//			std::cout<<"on a les 3 vertices: "<<elem->getVertex(0)->getNum()<<" "<<elem->getVertex(1)->getNum()<<" "<<elem->getVertex(2)->getNum()<<std::endl;
+//			std::cout<<"et les 3 vertices: "<<firstE->getNum()<<" "<<secondE->getNum()<<" "<<thirdE->getNum()<<std::endl;
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(elem->getVertex(0),elem->getVertex(1),elem->getVertex(2),firstE,secondE,thirdE);
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+//			std::cout<<"fin de for"<<std::endl;
+		}
+		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < rTmp->getNumMeshElements();i++){
+			MElement* elem = rTmp->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<MVertex*,MVertex* >::iterator itMap = VertexAssociation.find(vert);
+				if (itMap != VertexAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		std::cout<<"plop 7"<<std::endl;
+//		std::cout<<"rmtp a un nombre de faces de "<<rTmp->faces().size()<<std::endl;
+		int countTmp = 0;
+		//maitenant refonte points dans faces
+		for (std::list<GFace*>::iterator itTmp = NewFacesReg.begin();itTmp != NewFacesReg.end();itTmp++){
+			GFace* GFaceTmp = (*itTmp);
+//			std::cout<<GFaceTmp->tag()<<std::endl;
+			countTmp++;
+//			std::cout<<" iteration "<<countTmp<<std::endl;
+			for (unsigned int i = 0; i < GFaceTmp->getNumMeshElements();i++){
+//				std::cout<<" plop 7.1"<<std::endl;
+				MElement* elem = GFaceTmp->getMeshElement(i);
+				for (int j = 0;j < elem->getNumVertices();j++){
+//					std::cout<<" plop 7.2"<<std::endl;
+					MVertex* vert = elem->getVertex(j);
+//					std::cout<<" plop 7.3"<<std::endl;
+					std::map<MVertex*,MVertex* >::iterator itMap = VertexAssociation.find(vert);
+//					std::cout<<" plop 7.4"<<std::endl;
+					if (itMap != VertexAssociation.end()){
+//						std::cout<<"on va changer un point"<<std::endl;
+//						if (elem->getNumVertices() != 3){
+//							std::cout<<"on a un pb ! nb de vertices de "<<elem->getNumVertices()<<std::endl;
+//							while (1){
+//
+//							}
+//						}
+						elem->setVertex(j,itMap->second);
+						if (elem->getVertex(j)->getNum() > 100000){
+							std::cout<<"PENDANT CHANGEMENT on a un getnum de "<<elem->getVertex(j)->getNum()<<std::endl;
+							while (1){
+
+							}
+						}
+						if (itMap->second->getNum() > 100000){
+							std::cout<<"PENDANT CHANGEMENT on a un ITMAP getnum de "<<itMap->second->getNum()<<std::endl;
+							while (1){
+
+							}
+						}
+
+
+						std::vector<MVertex*> FaceVerti = GFaceTmp->mesh_vertices;
+						std::vector<MVertex*>::iterator itHere = std::find(FaceVerti.begin(), FaceVerti.end(), vert);
+						if(itHere != FaceVerti.end()) {
+							FaceVerti.erase(itHere);
+							FaceVerti.push_back(itMap->second);
+							GFaceTmp->mesh_vertices = FaceVerti;
+						}
+
+
+//						std::cout<<"rmtp a un nombre de faces de "<<rTmp->faces().size()<<std::endl;
+//						std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//						std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//						std::cout<<"youpi"<<std::endl;
+					}
+				}
+			}
+//			std::cout<<"plop 8"<<std::endl;
+		}
+	}
+
+	//maintenant on attaque les faces au bord
+	for (std::set<GFace*>::iterator itr = ToDuplicateListBoundary.begin();itr != ToDuplicateListBoundary.end();itr++){
+		std::cout<<"AU BORD on est entre pour la fois numero "<<counterNbDone<<std::endl;
+		counterNbDone++;
+		GFace* fTmp = (*itr);
+		//on doit dupliquer la face, les noeuds, les aretes, puis creer une region entre les deux
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		GRegion *rTmp = fTmp->getRegion(0);
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+
+		std::list<GFace*> facesReg;
+
+		facesReg = rTmp->faces();
+
+		int counterPts = 0;
+		for(std::list<GFace*>::iterator it2=facesReg.begin();it2!=facesReg.end();it2++){
+			GFace* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+
+//		std::cout<<"debut boucle for "<<counterNbDone<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+//			std::cout<<"point 1 "<<counterNbDone<<std::endl;
+			GVertex* vTmp = (*itv);
+//			std::cout<<"point 2 "<<counterNbDone<<std::endl;
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+//			double ponderatedX = 1.0 * vTmp->x() + 0.0 * xCenterReg;
+//			double ponderatedY = 1.0 * vTmp->y() + 0.0 * yCenterReg;
+//			double ponderatedZ = 1.0 * vTmp->z() + 0.0 * zCenterReg;
+			//GVertex* newv = new gmshVertex(m,vTmp->prescribedMeshSizeAtVertex());
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+//			std::cout<<"point 3 "<<counterNbDone<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			//creation des Gedge correspondantes
+//			std::cout<<"point 4 "<<counterNbDone<<std::endl;
+//			std::cout<<"test du nouveau point: "<<newv->x()<<" et "<<newv->y()<<" et "<<newv->z()<<std::endl;
+			//GEdge* newE = new GEdge(m,tagEdges,vTmp,newv);
+			//tagEdges++;
+			//m->add(newE);
+			GEdge* newE = m->addLine(vTmp,newv);
+//			std::cout<<"point 5 "<<counterNbDone<<std::endl;
+			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+//			std::cout<<"point 6 "<<counterNbDone<<std::endl;
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+//			std::cout<<"point 7 "<<counterNbDone<<std::endl;
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+//			std::cout<<"point 8 "<<counterNbDone<<std::endl;
+			VertexAssociation[vMesh] = newMv;
+//			std::cout<<"point 9 "<<counterNbDone<<std::endl;
+			newv->addMeshVertex(newMv);
+			if (newMv->getNum() > 100000){
+				std::cout<<"on a un getnum de "<<newMv->getNum()<<std::endl;
+				while (1){
+
+				}
+			}
+		}
+//		std::cout<<"apres points "<<counterNbDone<<std::endl;
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+			GEdgeAssociation[eTmp] = newE;
+			newEdgesVector.push_back(newE);
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(eTmp);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(newE);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+				VertexAssociation[vMesh] = newMv;
+				newE->addMeshVertex(newMv);
+			}
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MLine *newLine = new MLine(firstETmp,lastETmp);
+				newE->addLine(newLine);
+			}
+		}
+//		std::cout<<"apres lignes "<<counterNbDone<<std::endl;
+		std::vector<std::vector<GEdge*> > VecOfVec;
+		VecOfVec.push_back(newEdgesVector);
+		//creation de la nouvelle face
+		GFace* GFaceAssociation = m->addPlanarFace(VecOfVec);
+		//maintenant traitement mesh
+		for (unsigned int i = 0; i < fTmp->mesh_vertices.size();i++){
+			MVertex *vMesh = fTmp->mesh_vertices[i];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+			VertexAssociation[vMesh] = newMv;
+			GFaceAssociation->addMeshVertex(newMv);
+		}
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+			MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+			MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+			MTriangle *newTri = new MTriangle(firstE,secondE,thirdE);
+			GFaceAssociation->addTriangle(newTri);
+		}
+//		std::cout<<"apres faces "<<counterNbDone<<std::endl;
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		VectorFaces.push_back(fTmp);
+		listFaces.push_back(fTmp);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(GFaceAssociation);
+		listFaces.push_back(GFaceAssociation);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+//		std::cout<<"creation de la nouvelle region "<<counterNbDone<<std::endl;
+		//creation de la nouvelle region
+
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->set(listFaces);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		m->add(createdRegion);
+
+
+		std::list<GFace*> RegFaces = rTmp->faces();
+		std::list<GFace*>::iterator it = std::find(RegFaces.begin(), RegFaces.end(), fTmp);
+		std::cout<<(*it)->tag()<<std::endl;
+		if(it != RegFaces.end()) RegFaces.erase(it);
+		RegFaces.push_back(GFaceAssociation);
+		rTmp->set(RegFaces);
+		std::list<GFace*> NewFacesReg;
+		NewFacesReg = rTmp->faces();
+		for (std::list<GFace*>::iterator it2=NewFacesReg.begin();it2!=NewFacesReg.end();it2++){
+			GFace* fTemp = (*it2);
+			for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+				GEdge* eTmp = (*ite);
+				GEdge* newE = GEdgeAssociation[eTmp];
+				fTemp->replaceEdge(eTmp,newE);
+			}
+		}
+
+
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+//			std::cout<<"on a un element avec un nb de vertex de "<<elem->getNumVertices()<<std::endl;
+			MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+			MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+			MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(elem->getVertex(0),elem->getVertex(1),elem->getVertex(2),firstE,secondE,thirdE);
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+//			std::cout<<"fin de for"<<std::endl;
+		}
+		for (unsigned int i = 0; i < rTmp->getNumMeshElements();i++){
+			MElement* elem = rTmp->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<MVertex*,MVertex* >::iterator itMap = VertexAssociation.find(vert);
+				if (itMap != VertexAssociation.end()){
+					elem->setVertex(j,itMap->second);
+				}
+			}
+		}
+
+
+		int countTmp = 0;
+		//maitenant refonte points dans faces
+		for (std::list<GFace*>::iterator itTmp = NewFacesReg.begin();itTmp != NewFacesReg.end();itTmp++){
+			GFace* GFaceTmp = (*itTmp);
+			countTmp++;
+			for (unsigned int i = 0; i < GFaceTmp->getNumMeshElements();i++){
+				MElement* elem = GFaceTmp->getMeshElement(i);
+				for (int j = 0;j < elem->getNumVertices();j++){
+					MVertex* vert = elem->getVertex(j);
+					std::map<MVertex*,MVertex* >::iterator itMap = VertexAssociation.find(vert);
+					if (itMap != VertexAssociation.end()){
+						elem->setVertex(j,itMap->second);
+						std::vector<MVertex*> FaceVerti = GFaceTmp->mesh_vertices;
+						std::vector<MVertex*>::iterator itHere = std::find(FaceVerti.begin(), FaceVerti.end(), vert);
+						if(itHere != FaceVerti.end()) {
+							FaceVerti.erase(itHere);
+							FaceVerti.push_back(itMap->second);
+							GFaceTmp->mesh_vertices = FaceVerti;
+						}
+					}
+				}
+			}
+		}
+
+
+	}
+
+/*
+	//now we put all info into a file
+	//to being with we put all boundary vertices into a unique set
+	std::vector<MEdge*> ListBoundaryVectors;
+	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+		if (fTmp->regions().size() == 1){
+			//for each node we are going to test the displacement
+			std::list<GEdge*> elist = fTmp->edges();
+			for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+
+			}
+		}
+	}
+	std::ofstream file2("PeriodicMatches.txt");
+	file2 << "PeriodicalNodes\n\n";
+	file2 << "Displacement 1.0 0.0 0.0\n\n";
+	file2 << "Displacement 0.0 1.0 0.0\n\n";
+	file2 << "Displacement 0.0 0.0 1.0\n\n";
+*/
+
+
+
+
+
+
+
+/*
+	std::map<std::pair<MVertex*,GRegion*>,MVertex* > VertexAssociation;
+	for (GModel::viter itv = m->firstVertex();itv != m->lastVertex();itv++){
+//		std::cout<<"entering first for"<<std::endl;
+		GVertex* vTmp = (*itv);
+		std::list<GRegion*> r = vTmp->regions();
+		std::cout<<"size of mesh_vertices: "<<vTmp->mesh_vertices.size()<<std::endl;
+		MVertex *vMesh = vTmp->mesh_vertices[0];
+		std::cout<<"size of r: "<<r.size()<<std::endl;
+		// for all regions, create association
+//		for (int i = 0; i < vTmp->getNumMeshVertices();i++){
+//			std::cout<<"entering second for"<<std::endl;
+//			MVertex* vMesh = vTmp->getMeshVertex(i);
+//			for (GModel::riter itr = vTmp->regions().begin();itr != vTmp->regions().end();itr++){
+		for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+			std::cout<<"entering third for"<<std::endl;
+			GRegion* vReg = (*itr);
+			//				std::cout<<"we have the region "<<vReg->
+			MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+			vReg->mesh_vertices.push_back(newv);
+			VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+			std::cout<<"end third for"<<std::endl;
+		}
+//			std::cout<<"end second for"<<std::endl;
+//		}
+//		std::cout<<"end first for"<<std::endl;
+	}
+	std::cout<<"Phase 1 done for DuplicateBoundaries"<<std::endl;
+	for (GModel::eiter ite = m->firstEdge();ite != m->lastEdge();ite++){
+		GEdge* eTmp = (*ite);
+		for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+			MVertex* vMesh = eTmp->mesh_vertices[i];
+			std::list<GRegion*> r = eTmp->regions();
+			for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+				GRegion* vReg = (*itr);
+				MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+				vReg->mesh_vertices.push_back(newv);
+				VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+			}
+		}
+	}
+	std::cout<<"Phase 2 done for DuplicateBoundaries"<<std::endl;
+	for (GModel::fiter itf = m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+		for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+			MVertex* vMesh = fTmp->mesh_vertices[i];
+			std::list<GRegion*> r = fTmp->regions();
+			for (std::list<GRegion*>::iterator itr = r.begin();itr != r.end();itr++){
+				GRegion* vReg = (*itr);
+				MVertex *newv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)vReg);
+				vReg->mesh_vertices.push_back(newv);
+				VertexAssociation[std::make_pair(vMesh,vReg)] = newv;
+			}
+		}
+	}
+	std::cout<<"Phase 3 done for DuplicateBoundaries"<<std::endl;
+	for (GModel::riter itr = m->firstRegion();itr != m->lastRegion();itr++){
+		GRegion* rTmp = (*itr);
+		for (int i = 0; i < rTmp->getNumMeshElements();i++){
+			MElement* elem = rTmp->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexAssociation.find(std::make_pair(vert,rTmp));
+				if (itMap != VertexAssociation.end()){
+					elem->setVertex(j,itMap->second);
+				}
+			}
+		}
+	}
+	*/
+//	std::cout<<"number for seeds: "<<PhysicalSeeds<<" and for interface: "<<PhysicalInterface<<std::endl;
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+PView *GMSH_DuplicateBoundariesPlugin::executeFourth(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GFace*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GFace*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+	std::vector<std::pair<GFace*,GFace*> > newPairs;
+	int PhysicalInterface = m->setPhysicalName("Interface",3);
+	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+		if (fTmp->numRegions() == 2){
+			ToDuplicateList.insert(fTmp);
+		}
+		else{
+			ToDuplicateListBoundary.insert(fTmp);
+			facesBound.push_back(fTmp);
+		}
+	}
+
+
+
+
+
+
+
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		double x = 0.0;
+		double y = 0.0;
+		double z = 0.0;
+
+		std::list<GVertex*> vertices;
+
+		vertices = facesBound[i]->vertices();
+
+		for(std::list<GVertex*>::iterator it2=vertices.begin();it2!=vertices.end();it2++){
+			x = x + (*it2)->x();
+			y = y + (*it2)->y();
+			z = z + (*it2)->z();
+		}
+
+		x = x/vertices.size();
+		y = y/vertices.size();
+		z = z/vertices.size();
+
+		centers.insert(std::pair<GFace*,SPoint3>(facesBound[i],SPoint3(x,y,z)));
+	}
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		for(unsigned int j=0;j<facesBound.size();j++){
+			std::map<GFace*,SPoint3>::iterator it3 = centers.find(facesBound[i]);
+			std::map<GFace*,SPoint3>::iterator it4 = centers.find(facesBound[j]);
+
+			SPoint3 p1 = it3->second;
+			SPoint3 p2 = it4->second;
+
+
+			//				categories.push_back(val);
+
+			//				print_segment(p1,p2,file);
+
+			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 1"<<std::endl;
+//						std::cout<<"on a p1.x() = "<<p1.x()<<" et p2.x() = "<<p2.x()<<" et abs((p2.x()-p1.x()-1.0)) = "<<abs((p2.x()-p1.x()-1.0))<<std::endl;
+//						std::cout<<"on a abs(0.5) = "<<abs(0.5)<<" et abs(-0.5) = "<<abs(-0.5)<<" et abs(1.5) = "<<abs(1.5)<<" et abs(-1.5) = "<<abs(-1.5)<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 2"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 3"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 4"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 5"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 6"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 7"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 8"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 9"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}
+			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}else if (abs((p1.x()-p2.x()))<0.0001){
+				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 10"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 11"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 12"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()))<0.0001){
+					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 13"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}
+		}
+	}
+	std::cout<<"on a une taille de facesBound = "<<facesBound.size()<<" et ToDuplicateListBoundary = "<<ToDuplicateListBoundary.size()<<std::endl;
+
+
+
+
+
+
+
+
+
+
+	std::map<std::pair<MVertex*,GRegion*>,MVertex* > VertexGlobalAssociation;
+	std::map<std::pair<GVertex*,GRegion*>,GVertex* > GVertexGlobalAssociation;
+	std::map<std::pair<GEdge*,GRegion*>,GEdge* > GEdgeGlobalAssociation;
+	std::map<std::pair<GFace*,GRegion*>,GFace* > GFaceGlobalAssociation;
+//	for (GModel::viter itv= m->firstVertex();itv != m->lastVertex();itv++){
+//		GVertex* vTmp = (*itv);
+//		std::vector<GVertex* > vecTmp;
+//		vecTmp.clear();
+//		GVertexGlobalAssociation[vTmp] = vecTmp;
+//		for (int i = 0; i < vTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = vTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+//		GEdge* eTmp = (*ite);
+//		std::vector<GEdge* > vecTmp;
+//		vecTmp.clear();
+//		GEdgeGlobalAssociation[eTmp] = vecTmp;
+//		for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = eTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+//		GFace* fTmp = (*itf);
+//		for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = fTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::riter itr= m->firstRegion();itr != m->lastRegion();itr++){
+//		GRegion* rTmp = (*itr);
+//		for (int i = 0; i < rTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = rTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+	std::cout<<"entree dans regions first pass"<<std::endl;
+	for (GModel::riter itr= m->firstRegion();itr != m->lastRegion();itr++){
+		GRegion* rTmp = (*itr);
+		std::list<GFace*> RegFaces = rTmp->faces();
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		//int counterNbDone = 10000;
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+		int counterPts = 0;
+		for(std::list<GFace*>::iterator it2=RegFaces.begin();it2!=RegFaces.end();it2++){
+			GFace* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+		//duplication noeud et aretes au niveau de la region directement
+		std::list<GVertex*> vlist;
+
+
+		std::cout<<"wut 1"<<std::endl;
+		std::list<GFace*> listFacesTmp = rTmp->faces();
+		for (std::list<GFace*>::iterator itTp = listFacesTmp.begin();itTp != listFacesTmp.end();itTp++){
+			std::cout<<"wut 2"<<std::endl;
+			std::list<GVertex*> vlist2;
+			std::cout<<"wut 3"<<std::endl;
+			vlist2 = (*itTp)->vertices();
+			std::cout<<"wut 4"<<std::endl;
+			for (std::list<GVertex*>::iterator itTp2 = vlist2.begin();itTp2 != vlist2.end();itTp2++){
+				std::cout<<"wut 5"<<std::endl;
+				if(std::find(vlist.begin(), vlist.end(), *itTp2) == vlist.end())
+					vlist.push_back(*itTp2);
+				std::cout<<"wut 6"<<std::endl;
+			}
+			std::cout<<"wut 7"<<std::endl;
+		}
+		std::cout<<"wut 8"<<std::endl;
+
+
+		std::cout<<"on a une taille vlist de "<<vlist.size()<<std::endl;
+		std::cout<<"init done entering vertices"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			GVertex* vTmp = (*itv);
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+			std::cout<<"inserted correspondance between : "<<vTmp->tag()<<" and : "<<newv->tag()<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			GVertexGlobalAssociation[std::make_pair(vTmp,rTmp)] = newv;
+			//creation des Gedge correspondantes
+//			GEdge* newE = m->addLine(vTmp,newv);
+//			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			VertexAssociation[vMesh] = newMv;
+			VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+			newv->addMeshVertex(newMv);
+		}
+		//maintenant on soccupe de duppliquer les edges de la region
+		std::list<GEdge*> elist = rTmp->edges();
+		std::cout<<"on a une taille elist de "<<elist.size()<<std::endl;
+		std::cout<<"vertices done entering edges"<<std::endl;
+
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			std::cout<<"before addline"<<std::endl;
+			std::cout<<"begin ID : "<<eTmp->getBeginVertex()->tag()<<" and end ID : "<<eTmp->getEndVertex()->tag()<<std::endl;
+			std::cout<<"corresponding begin ID : "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<" and end ID : "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+			std::cout<<"after addline"<<std::endl;
+			GEdgeAssociation[eTmp] = newE;
+			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+			//creation des GFace correspondantes
+//			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+//			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+//			std::vector<GEdge*> VecEdgesTmp;
+//			VecEdgesTmp.push_back(eTmp);
+//			VecEdgesTmp.push_back(firstE);
+//			VecEdgesTmp.push_back(newE);
+//			VecEdgesTmp.push_back(lastE);
+//			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+//			VecOfVecTmp.push_back(VecEdgesTmp);
+//			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+//			SurroundingsFaces.push_back(newFaceTmp);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				newE->addMeshVertex(newMv);
+			}
+			std::cout<<"after newvertices"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MLine *newLine = new MLine(firstETmp,lastETmp);
+				newE->addLine(newLine);
+			}
+			std::cout<<"after newMlines"<<std::endl;
+		}
+		std::cout<<"edges done entering faces"<<std::endl;
+		for (std::list<GFace*>::iterator itf = RegFaces.begin();itf != RegFaces.end();itf++){
+			GFace* fTmp = (*itf);
+			std::vector<GEdge*> newEdgesVector;
+			std::list<GEdge*> elistFace = fTmp->edges();
+			for (std::list<GEdge*>::iterator ite = elistFace.begin();ite != elistFace.end();ite++){
+				GEdge* eTmp = (*ite);
+				GEdge* eToFind = GEdgeAssociation[eTmp];
+				newEdgesVector.push_back(eToFind);
+			}
+			std::vector<std::vector<GEdge*> > VecOfVec;
+			VecOfVec.push_back(newEdgesVector);
+			//creation de la nouvelle face
+			GFace* GFaceAssociation = m->addPlanarFace(VecOfVec);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < fTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = fTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				GFaceAssociation->addMeshVertex(newMv);
+			}
+			for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+				MElement* elem = fTmp->getMeshElement(i);
+				MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+				MTriangle *newTri = new MTriangle(firstE,secondE,thirdE);
+				GFaceAssociation->addTriangle(newTri);
+			}
+			GFaceGlobalAssociation[std::make_pair(fTmp,rTmp)] = GFaceAssociation;
+		}
+		std::cout<<"faces done for regions"<<std::endl;
+	}
+	std::cout<<"Regions done first pass"<<std::endl;
+	int counterNbDone = 10000;
+	//maintenant on va traiter les faces initiales
+	for (std::set<GFace*>::iterator itf = ToDuplicateList.begin();itf != ToDuplicateList.end();itf++){
+		counterNbDone++;
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		GRegion* reg2 = fTmp->getRegion(1);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			GVertex* v2=0;
+			std::map<std::pair<GVertex*,GRegion*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg2));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,v2);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* e1=0;
+			GEdge* e2=0;
+			std::map<std::pair<GEdge*,GRegion*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg1));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e1 = itMap->second;
+			}
+			itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg2));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e2 = itMap->second;
+			}
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				e1->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (e2->getBeginVertex() != firstE->getEndVertex()){
+				e2->reverse();
+			}
+			if (lastE->getBeginVertex() != e2->getEndVertex()){
+				lastE->reverse();
+			}
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(e1);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(e2);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		GFace* f1;
+		GFace* f2;
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f1 = itMap->second;
+		}
+		itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg2));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f2 = itMap->second;
+		}
+		VectorFaces.push_back(f1);
+		listFaces.push_back(f1);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(f2);
+		listFaces.push_back(f2);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		//creation de la nouvelle region
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			MVertex* v4=0;
+			MVertex* v5=0;
+			MVertex* v6=0;
+			std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(v1,v2,v3,v4,v5,v6);
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+//			std::cout<<"fin de for"<<std::endl;
+		}
+		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < reg1->getNumMeshElements();i++){
+			MElement* elem = reg1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		for (unsigned int i = 0; i < reg2->getNumMeshElements();i++){
+			MElement* elem = reg2->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg2));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+	std::cout<<"interior faces done"<<std::endl;
+	//maintenant on va traiter les faces du bord
+	for (std::set<GFace*>::iterator itf = ToDuplicateListBoundary.begin();itf != ToDuplicateListBoundary.end();itf++){
+		counterNbDone++;
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			std::map<std::pair<GVertex*,GRegion*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,vTmp);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* e1=0;
+			std::map<std::pair<GEdge*,GRegion*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg1));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e1 = itMap->second;
+			}
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				e1->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (eTmp->getBeginVertex() != firstE->getEndVertex()){
+				eTmp->reverse();
+			}
+			if (lastE->getBeginVertex() != eTmp->getEndVertex()){
+				lastE->reverse();
+			}
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(e1);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(eTmp);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		GFace* f1;
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f1 = itMap->second;
+		}
+		VectorFaces.push_back(f1);
+		listFaces.push_back(f1);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(fTmp);
+		listFaces.push_back(fTmp);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		//creation de la nouvelle region
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(v1,v2,v3,elem->getVertex(0),elem->getVertex(1),elem->getVertex(2));
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+			//			std::cout<<"fin de for"<<std::endl;
+		}
+		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < reg1->getNumMeshElements();i++){
+			MElement* elem = reg1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+	std::ofstream file("MicrostructurePolycrystal3D.pos");
+	file << "View \"test\" {\n";
+
+	std::ofstream file2("PERIODIC.map");
+	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = pairs.begin();itP != pairs.end();itP++){
+		std::pair<GFace*,GFace*> pairTmp = (*itP);
+		GFace* ToReplaceFace = pairTmp.second;
+		GRegion* rTmp = ToReplaceFace->getRegion(0);
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(ToReplaceFace,rTmp));
+		if (itMap != GFaceGlobalAssociation.end()){
+			GFace* associatedFace = (*itMap).second;
+
+
+
+
+
+
+			std::map<GFace*,SPoint3>::iterator it3 = centers.find(pairTmp.first);
+			std::map<GFace*,SPoint3>::iterator it4 = centers.find(ToReplaceFace);
+
+			SPoint3 p1 = it3->second;
+			SPoint3  p2 = it4->second;
+
+			//double delta_x = fabs(p2.x()-p1.x());
+			//double delta_y = fabs(p2.y()-p1.y());
+			//double delta_z = fabs(p2.z()-p1.z());
+
+
+			file << "SL ("
+					<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
+					<< p2.x() << ", " << p2.y() << ", " << p2.z()
+					<< "){10, 20};\n";
+
+			//file2 << "PERIODIC\tSURFACE"<<faces[i]->tag() << "\tSURFACE" << faces[j]->tag() << "\t" << p2.x()-p1.x() << "\t" << p2.y()-p1.y() << "\t" << p2.z()-p1.z() << "\n";
+			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONT = FRONT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACK = BACK + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}
+			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONT = FRONT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACK = BACK + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}
+				}
+			}else if (abs((p1.x()-p2.x()))<0.0001){
+				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tLEFT = LEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFT = LEFT + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()))<0.0001){
+					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tTOP = TOP + SURFACE"<<ToReplaceFace->tag()<<"\n";
+						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tTOP = TOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<ToReplaceFace->tag()<<"\n";
+					}
+				}
+			}
+//			count++;
+
+
+
+
+
+
+
+			newPairs.push_back(std::make_pair(pairTmp.first,associatedFace));
+		}
+	}
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = newPairs.begin();itP != newPairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//	}
+
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+
+
+
+
+PView *GMSH_DuplicateBoundariesPlugin::execute(PView *view)
+{
+	GModel *m = GModel::current();
+	if (m->getDim() == 3){
+		view = GMSH_DuplicateBoundariesPlugin::executeDuplicate(view);
+	}
+	else if (m->getDim() == 2){
+		view = GMSH_DuplicateBoundariesPlugin::execute2DWithBound(view);
+	}
+	//view = GMSH_DuplicateBoundariesPlugin::ComputeBestSeeds(view);
+	//view = GMSH_DuplicateBoundariesPlugin::execute2D(view);
+	//view = GMSH_DuplicateBoundariesPlugin::execute2DWithBound(view);
+	return view;
+}
+
+
+
+PView *GMSH_DuplicateBoundariesPlugin::executeDuplicate(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GFace*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GFace*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+	std::vector<std::pair<GFace*,GFace*> > newPairs;
+	int PhysicalInterface = m->setPhysicalName("Interface",3);
+	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+		if (fTmp->numRegions() == 2){
+			ToDuplicateList.insert(fTmp);
+		}
+		else{
+//			ToDuplicateListBoundary.insert(fTmp);
+			facesBound.push_back(fTmp);
+		}
+	}
+
+
+
+
+
+
+
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		double x = 0.0;
+		double y = 0.0;
+		double z = 0.0;
+
+		std::list<GVertex*> vertices;
+
+		vertices = facesBound[i]->vertices();
+
+		for(std::list<GVertex*>::iterator it2=vertices.begin();it2!=vertices.end();it2++){
+			x = x + (*it2)->x();
+			y = y + (*it2)->y();
+			z = z + (*it2)->z();
+		}
+
+		x = x/vertices.size();
+		y = y/vertices.size();
+		z = z/vertices.size();
+
+		centers.insert(std::pair<GFace*,SPoint3>(facesBound[i],SPoint3(x,y,z)));
+	}
+
+	for(unsigned int i=0;i<facesBound.size();i++){
+		for(unsigned int j=0;j<facesBound.size();j++){
+			std::map<GFace*,SPoint3>::iterator it3 = centers.find(facesBound[i]);
+			std::map<GFace*,SPoint3>::iterator it4 = centers.find(facesBound[j]);
+
+			SPoint3 p1 = it3->second;
+			SPoint3 p2 = it4->second;
+
+
+			//				categories.push_back(val);
+
+			//				print_segment(p1,p2,file);
+
+			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 1"<<std::endl;
+//						std::cout<<"on a p1.x() = "<<p1.x()<<" et p2.x() = "<<p2.x()<<" et abs((p2.x()-p1.x()-1.0)) = "<<abs((p2.x()-p1.x()-1.0))<<std::endl;
+//						std::cout<<"on a abs(0.5) = "<<abs(0.5)<<" et abs(-0.5) = "<<abs(-0.5)<<" et abs(1.5) = "<<abs(1.5)<<" et abs(-1.5) = "<<abs(-1.5)<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 2"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 3"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 4"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 5"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 6"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 7"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 8"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 9"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}
+			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}else if (abs((p1.x()-p2.x()))<0.0001){
+				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 10"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 11"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 12"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						//NOTHING
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						//NOTHING
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}else if (abs((p1.y()-p2.y()))<0.0001){
+					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						pairs.push_back(std::pair<GFace*,GFace*>(facesBound[i],facesBound[j]));
+						ToDuplicateListBoundary.insert(facesBound[i]);
+//						std::cout<<"case 13"<<std::endl;
+//						std::cout<<"on a mis dans la liste: x "<<p1.x()<<" y "<<p1.y()<<" z "<<p1.z()<<std::endl;
+//						std::cout<<"on avait pour second: x "<<p2.x()<<" y "<<p2.y()<<" z "<<p2.z()<<std::endl;
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						//NOTHING
+					}
+				}
+			}
+		}
+	}
+//	std::cout<<"on a une taille de facesBound = "<<facesBound.size()<<" et ToDuplicateListBoundary = "<<ToDuplicateListBoundary.size()<<std::endl;
+
+
+
+
+
+
+
+
+
+
+	std::map<std::pair<MVertex*,GRegion*>,MVertex* > VertexGlobalAssociation;
+	std::map<std::pair<GVertex*,GRegion*>,GVertex* > GVertexGlobalAssociation;
+	std::map<std::pair<GEdge*,GRegion*>,GEdge* > GEdgeGlobalAssociation;
+	std::map<std::pair<GFace*,GRegion*>,GFace* > GFaceGlobalAssociation;
+//	for (GModel::viter itv= m->firstVertex();itv != m->lastVertex();itv++){
+//		GVertex* vTmp = (*itv);
+//		std::vector<GVertex* > vecTmp;
+//		vecTmp.clear();
+//		GVertexGlobalAssociation[vTmp] = vecTmp;
+//		for (int i = 0; i < vTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = vTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+//		GEdge* eTmp = (*ite);
+//		std::vector<GEdge* > vecTmp;
+//		vecTmp.clear();
+//		GEdgeGlobalAssociation[eTmp] = vecTmp;
+//		for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = eTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+//		GFace* fTmp = (*itf);
+//		for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = fTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	for (GModel::riter itr= m->firstRegion();itr != m->lastRegion();itr++){
+//		GRegion* rTmp = (*itr);
+//		for (int i = 0; i < rTmp->mesh_vertices.size();i++){
+//			MVertex *vMesh = rTmp->mesh_vertices[i];
+//			std::vector<MVertex* > vecTmpBis;
+//			vecTmpBis.clear();
+//			VertexGlobalAssociation[vMesh] = vecTmpBis;
+//		}
+//	}
+//	std::cout<<"entree dans regions first pass"<<std::endl;
+	for (GModel::riter itr= m->firstRegion();itr != m->lastRegion();itr++){
+		GRegion* rTmp = (*itr);
+		std::list<GFace*> RegFaces = rTmp->faces();
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		//int counterNbDone = 10000;
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+		int counterPts = 0;
+		for(std::list<GFace*>::iterator it2=RegFaces.begin();it2!=RegFaces.end();it2++){
+			GFace* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+		//duplication noeud et aretes au niveau de la region directement
+		std::list<GVertex*> vlist;
+
+
+//		std::cout<<"wut 1"<<std::endl;
+		std::list<GFace*> listFacesTmp = rTmp->faces();
+		for (std::list<GFace*>::iterator itTp = listFacesTmp.begin();itTp != listFacesTmp.end();itTp++){
+//			std::cout<<"wut 2"<<std::endl;
+			std::list<GVertex*> vlist2;
+//			std::cout<<"wut 3"<<std::endl;
+			vlist2 = (*itTp)->vertices();
+//			std::cout<<"wut 4"<<std::endl;
+			for (std::list<GVertex*>::iterator itTp2 = vlist2.begin();itTp2 != vlist2.end();itTp2++){
+//				std::cout<<"wut 5"<<std::endl;
+				if(std::find(vlist.begin(), vlist.end(), *itTp2) == vlist.end())
+					vlist.push_back(*itTp2);
+//				std::cout<<"wut 6"<<std::endl;
+			}
+//			std::cout<<"wut 7"<<std::endl;
+		}
+//		std::cout<<"wut 8"<<std::endl;
+
+
+//		std::cout<<"on a une taille vlist de "<<vlist.size()<<std::endl;
+//		std::cout<<"init done entering vertices"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			GVertex* vTmp = (*itv);
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+//			std::cout<<"inserted correspondance between : "<<vTmp->tag()<<" and : "<<newv->tag()<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			GVertexGlobalAssociation[std::make_pair(vTmp,rTmp)] = newv;
+			//creation des Gedge correspondantes
+//			GEdge* newE = m->addLine(vTmp,newv);
+//			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			VertexAssociation[vMesh] = newMv;
+			VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+			newv->addMeshVertex(newMv);
+		}
+		//maintenant on soccupe de duppliquer les edges de la region
+		std::list<GEdge*> elist = rTmp->edges();
+//		std::cout<<"on a une taille elist de "<<elist.size()<<std::endl;
+//		std::cout<<"vertices done entering edges"<<std::endl;
+
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+//			std::cout<<"before addline"<<std::endl;
+//			std::cout<<"begin ID : "<<eTmp->getBeginVertex()->tag()<<" and end ID : "<<eTmp->getEndVertex()->tag()<<std::endl;
+//			std::cout<<"corresponding begin ID : "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<" and end ID : "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+//			std::cout<<"after addline"<<std::endl;
+			GEdgeAssociation[eTmp] = newE;
+			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+			//creation des GFace correspondantes
+//			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+//			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+//			std::vector<GEdge*> VecEdgesTmp;
+//			VecEdgesTmp.push_back(eTmp);
+//			VecEdgesTmp.push_back(firstE);
+//			VecEdgesTmp.push_back(newE);
+//			VecEdgesTmp.push_back(lastE);
+//			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+//			VecOfVecTmp.push_back(VecEdgesTmp);
+//			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+//			SurroundingsFaces.push_back(newFaceTmp);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				newE->addMeshVertex(newMv);
+			}
+//			std::cout<<"after newvertices"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *midETmp = VertexAssociation.find(elem->getVertex(2))->second;
+				MLine3 *newLine = new MLine3(firstETmp,lastETmp,midETmp);
+				newE->addLine(newLine);
+			}
+//			std::cout<<"after newMlines"<<std::endl;
+		}
+//		std::cout<<"edges done entering faces"<<std::endl;
+		for (std::list<GFace*>::iterator itf = RegFaces.begin();itf != RegFaces.end();itf++){
+			GFace* fTmp = (*itf);
+			std::vector<GEdge*> newEdgesVector;
+			std::list<GEdge*> elistFace = fTmp->edges();
+			for (std::list<GEdge*>::iterator ite = elistFace.begin();ite != elistFace.end();ite++){
+				GEdge* eTmp = (*ite);
+				GEdge* eToFind = GEdgeAssociation[eTmp];
+				newEdgesVector.push_back(eToFind);
+			}
+			std::vector<std::vector<GEdge*> > VecOfVec;
+			VecOfVec.push_back(newEdgesVector);
+			//creation de la nouvelle face
+			GFace* GFaceAssociation = m->addPlanarFace(VecOfVec);
+//			int tagTmp = GFaceAssociation->tag();
+//			std::ostringstream ss;
+//			ss << tagTmp;
+////			char *intStr = itoa(tagTmp);
+//			std::string nameSurf = "SURFACE";
+////			nameSurf += std::string(intStr);
+//			nameSurf += ss.str();
+//			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+//			GFaceAssociation->addPhysicalEntity(PhysicalSurfaceTmp);
+//			std::cout<<"on a associe a la face : "<<fTmp->tag()<<" la face : "<<GFaceAssociation->tag()<<std::endl;
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < fTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = fTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				GFaceAssociation->addMeshVertex(newMv);
+			}
+			for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+				MElement* elem = fTmp->getMeshElement(i);
+				MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+				MVertex *fourthE = VertexAssociation.find(elem->getVertex(3))->second;
+				MVertex *fifthE = VertexAssociation.find(elem->getVertex(4))->second;
+				MVertex *sisthE = VertexAssociation.find(elem->getVertex(5))->second;
+				MTriangle6 *newTri = new MTriangle6(firstE,secondE,thirdE,fourthE,fifthE,sisthE);
+				GFaceAssociation->addTriangle(newTri);
+			}
+			GFaceGlobalAssociation[std::make_pair(fTmp,rTmp)] = GFaceAssociation;
+		}
+//		std::cout<<"faces done for regions"<<std::endl;
+	}
+//	std::cout<<"Regions done first pass"<<std::endl;
+	int counterNbDone = 10000;
+	//maintenant on va traiter les faces initiales
+	for (std::set<GFace*>::iterator itf = ToDuplicateList.begin();itf != ToDuplicateList.end();itf++){
+		counterNbDone++;
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		GRegion* reg2 = fTmp->getRegion(1);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			GVertex* v2=0;
+			std::map<std::pair<GVertex*,GRegion*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg2));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,v2);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* e1=0;
+			GEdge* e2=0;
+			std::map<std::pair<GEdge*,GRegion*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg1));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e1 = itMap->second;
+			}
+			itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg2));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e2 = itMap->second;
+			}
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				e1->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (e2->getBeginVertex() != firstE->getEndVertex()){
+				e2->reverse();
+			}
+			if (lastE->getBeginVertex() != e2->getEndVertex()){
+				lastE->reverse();
+			}
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(e1);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(e2);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		GFace* f1;
+		GFace* f2;
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f1 = itMap->second;
+		}
+		itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg2));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f2 = itMap->second;
+		}
+		VectorFaces.push_back(f1);
+		listFaces.push_back(f1);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(f2);
+		listFaces.push_back(f2);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		//creation de la nouvelle region
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			MVertex* v4=0;
+			MVertex* v5=0;
+			MVertex* v6=0;
+			std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(v1,v3,v2,v4,v6,v5);
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+//			std::cout<<"fin de for"<<std::endl;
+
+			//second
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri2 = new MPrism(v1,v3,v2,v4,v6,v5);
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri2);
+			//third
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri3 = new MPrism(v1,v3,v2,v4,v6,v5);
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri3);
+			//fourth
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri4 = new MPrism(v1,v3,v2,v4,v6,v5);
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri4);
+		}
+//		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < reg1->getNumMeshElements();i++){
+			MElement* elem = reg1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		for (unsigned int i = 0; i < reg2->getNumMeshElements();i++){
+			MElement* elem = reg2->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg2));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+//	std::cout<<"interior faces done"<<std::endl;
+	//maintenant on va traiter les faces du bord
+	for (std::set<GFace*>::iterator itf = ToDuplicateListBoundary.begin();itf != ToDuplicateListBoundary.end();itf++){
+		counterNbDone++;
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			std::map<std::pair<GVertex*,GRegion*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,vTmp);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* e1=0;
+			std::map<std::pair<GEdge*,GRegion*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg1));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e1 = itMap->second;
+			}
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				e1->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (eTmp->getBeginVertex() != firstE->getEndVertex()){
+				eTmp->reverse();
+			}
+			if (lastE->getBeginVertex() != eTmp->getEndVertex()){
+				lastE->reverse();
+			}
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(e1);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(eTmp);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		GFace* f1;
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f1 = itMap->second;
+		}
+		VectorFaces.push_back(f1);
+		listFaces.push_back(f1);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(fTmp);
+		listFaces.push_back(fTmp);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		//creation de la nouvelle region
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(v1,v3,v2,elem->getVertex(0),elem->getVertex(5),elem->getVertex(3));
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+			//			std::cout<<"fin de for"<<std::endl;
+			//second
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri2 = new MPrism(v1,v3,v2,elem->getVertex(1),elem->getVertex(3),elem->getVertex(4));
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri2);
+			//third
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri3 = new MPrism(v1,v3,v2,elem->getVertex(2),elem->getVertex(4),elem->getVertex(5));
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri3);
+			//fourth
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(4),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri4 = new MPrism(v1,v3,v2,elem->getVertex(3),elem->getVertex(5),elem->getVertex(4));
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri4);
+		}
+//		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < reg1->getNumMeshElements();i++){
+			MElement* elem = reg1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+	std::ofstream file("MicrostructurePolycrystal3D.pos");
+	file << "View \"test\" {\n";
+
+	std::ofstream file2("PERIODIC.map");
+	std::ofstream file3("SetAdd.map");
+	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = pairs.begin();itP != pairs.end();itP++){
+		std::pair<GFace*,GFace*> pairTmp = (*itP);
+		GFace* ToReplaceFace = pairTmp.second;
+		GRegion* rTmp = ToReplaceFace->getRegion(0);
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(ToReplaceFace,rTmp));
+		if (itMap != GFaceGlobalAssociation.end()){
+			GFace* associatedFace = (*itMap).second;
+
+
+
+
+
+			file3 <<associatedFace->tag()<<"\tSURFACE"<<associatedFace->tag()<<"\tNSET "<<"\n";
+
+			int tagTmp = associatedFace->tag();
+			std::ostringstream ss;
+			ss << tagTmp;
+//			char *intStr = itoa(tagTmp);
+			std::string nameSurf = "SURFACE";
+//			nameSurf += std::string(intStr);
+			nameSurf += ss.str();
+			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+			associatedFace->addPhysicalEntity(PhysicalSurfaceTmp);
+
+			std::map<GFace*,SPoint3>::iterator it3 = centers.find(pairTmp.first);
+			std::map<GFace*,SPoint3>::iterator it4 = centers.find(ToReplaceFace);
+
+			SPoint3 p1 = it3->second;
+			SPoint3  p2 = it4->second;
+
+			//double delta_x = fabs(p2.x()-p1.x());
+			//double delta_y = fabs(p2.y()-p1.y());
+			//double delta_z = fabs(p2.z()-p1.z());
+
+
+			file << "SL ("
+					<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
+					<< p2.x() << ", " << p2.y() << ", " << p2.z()
+					<< "){10, 20};\n";
+
+			//file2 << "PERIODIC\tSURFACE"<<faces[i]->tag() << "\tSURFACE" << faces[j]->tag() << "\t" << p2.x()-p1.x() << "\t" << p2.y()-p1.y() << "\t" << p2.z()-p1.z() << "\n";
+			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONT = FRONT + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACK = BACK + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}
+			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+				if (abs((p2.y()-p1.y()))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONT = FRONT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACK = BACK + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+					}
+				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+					}
+				}
+			}else if (abs((p1.x()-p2.x()))<0.0001){
+				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tLEFT = LEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+					if (abs((p2.z()-p1.z()))<0.0001){
+						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFT = LEFT + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+					}
+				}else if (abs((p1.y()-p2.y()))<0.0001){
+					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+						file2 << "NSET\tTOP = TOP + SURFACE"<<associatedFace->tag()<<"\n";
+						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+						file2 << "NSET\tTOP = TOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+					}
+				}
+			}
+//			count++;
+
+
+
+
+
+
+
+			newPairs.push_back(std::make_pair(pairTmp.first,associatedFace));
+		}
+	}
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = newPairs.begin();itP != newPairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//	}
+
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+
+
+
+
+
+
+
+
+
+
+PView *GMSH_DuplicateBoundariesPlugin::execute2D(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GEdge*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GFace*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+	std::vector<std::pair<GFace*,GFace*> > newPairs;
+	int PhysicalInterface = m->setPhysicalName("Interface",2);
+//	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+//		GFace* ftmp= (*itf);
+//		std::list<GEdge*> edgesFace = ftmp->edges();
+////		std::cout<<"size de edgesFace "<<edgesFace.size()<<std::endl;
+//		for (std::list<GEdge*>::iterator it2=edgesFace.begin();it2!=edgesFace.end();it2++){
+//			GEdge* etmp = (*it2);
+////			std::cout<<"on a la edge "<<etmp->tag()<<std::endl;
+////			std::cout<<"size de face de etmp before : "<<etmp->faces().size()<<std::endl;
+//			etmp->addFace(ftmp);
+////			std::cout<<"size de face de etmp after : "<<etmp->faces().size()<<std::endl;
+//		}
+//	}
+	for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+		GEdge* eTmp = (*ite);
+//		std::cout<<"on a size de face de etmp de "<<eTmp->faces().size()<<std::endl;
+		if (eTmp->faces().size() == 2){
+			ToDuplicateList.insert(eTmp);
+		}
+	}
+
+
+
+
+
+
+
+
+
+
+	std::map<std::pair<MVertex*,GFace*>,MVertex* > VertexGlobalAssociation;
+	std::map<std::pair<GVertex*,GFace*>,GVertex* > GVertexGlobalAssociation;
+	std::map<std::pair<GEdge*,GFace*>,GEdge* > GEdgeGlobalAssociation;
+	std::map<std::pair<GFace*,GRegion*>,GFace* > GFaceGlobalAssociation;
+	std::cout<<"entree dans regions first pass"<<std::endl;
+	for (GModel::fiter itr= m->firstFace();itr != m->lastFace();itr++){
+		GFace* rTmp = (*itr);
+		std::list<GEdge*> RegEdges = rTmp->edges();
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		//int counterNbDone = 10000;
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+		int counterPts = 0;
+		for(std::list<GEdge*>::iterator it2=RegEdges.begin();it2!=RegEdges.end();it2++){
+			GEdge* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+		//duplication noeud et aretes au niveau de la region directement
+		std::list<GVertex*> vlist;
+
+
+//		std::cout<<"wut 1"<<std::endl;
+		std::list<GEdge*> listedgesTmp = rTmp->edges();
+		std::cout<<"listeEdge size "<<listedgesTmp.size()<<std::endl;
+		for (std::list<GEdge*>::iterator itTp = listedgesTmp.begin();itTp != listedgesTmp.end();itTp++){
+//			std::cout<<"wut 2"<<std::endl;
+			std::list<GVertex*> vlist2;
+//			std::cout<<"wut 3"<<std::endl;
+			if(std::find(vlist.begin(), vlist.end(),(*itTp)->getBeginVertex()) == vlist.end())
+				vlist.push_back((*itTp)->getBeginVertex());
+			if(std::find(vlist.begin(), vlist.end(),(*itTp)->getEndVertex()) == vlist.end())
+				vlist.push_back((*itTp)->getEndVertex());
+//			vlist2 = (*itTp)->vertices();
+//			std::cout<<"vlist2 size "<<vlist2.size()<<std::endl;
+////			std::cout<<"wut 4"<<std::endl;
+//			for (std::list<GVertex*>::iterator itTp2 = vlist2.begin();itTp2 != vlist2.end();itTp2++){
+////				std::cout<<"wut 5"<<std::endl;
+//				if(std::find(vlist.begin(), vlist.end(), *itTp2) == vlist.end())
+//					vlist.push_back(*itTp2);
+////				std::cout<<"wut 6"<<std::endl;
+//			}
+//			std::cout<<"wut 7"<<std::endl;
+		}
+//		std::cout<<"wut 8"<<std::endl;
+
+
+//		std::cout<<"on a une taille vlist de "<<vlist.size()<<std::endl;
+//		std::cout<<"init done entering vertices"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			GVertex* vTmp = (*itv);
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+//			std::cout<<"inserted correspondance between : "<<vTmp->tag()<<" and : "<<newv->tag()<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			GVertexGlobalAssociation[std::make_pair(vTmp,rTmp)] = newv;
+			//creation des Gedge correspondantes
+//			GEdge* newE = m->addLine(vTmp,newv);
+//			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			VertexAssociation[vMesh] = newMv;
+			VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+			newv->addMeshVertex(newMv);
+		}
+		//maintenant on soccupe de duppliquer les edges de la region
+		std::list<GEdge*> elist = rTmp->edges();
+		std::cout<<"on a une taille elist de "<<elist.size()<<std::endl;
+		std::cout<<"vertices done entering edges"<<std::endl;
+
+		std::vector<GFace*> SurroundingsFaces;
+//		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+//			//duplication Gedge
+//			GEdge* eTmp = (*ite);
+////			std::cout<<"before addline"<<std::endl;
+////			std::cout<<"begin ID : "<<eTmp->getBeginVertex()->tag()<<" and end ID : "<<eTmp->getEndVertex()->tag()<<std::endl;
+////			std::cout<<"corresponding begin ID : "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<" and end ID : "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+//			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+////			std::cout<<"after addline"<<std::endl;
+//			GEdgeAssociation[eTmp] = newE;
+//			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+//			//creation des GFace correspondantes
+////			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+////			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+////			std::vector<GEdge*> VecEdgesTmp;
+////			VecEdgesTmp.push_back(eTmp);
+////			VecEdgesTmp.push_back(firstE);
+////			VecEdgesTmp.push_back(newE);
+////			VecEdgesTmp.push_back(lastE);
+////			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+////			VecOfVecTmp.push_back(VecEdgesTmp);
+////			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+////			SurroundingsFaces.push_back(newFaceTmp);
+//			//maintenant traitement mesh
+//			for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+//				MVertex *vMesh = eTmp->mesh_vertices[i];
+//				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+//				VertexAssociation[vMesh] = newMv;
+//				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				newE->addMeshVertex(newMv);
+//			}
+////			std::cout<<"after newvertices"<<std::endl;
+//			for (int i = 0; i < eTmp->getNumMeshElements();i++){
+//				MElement* elem = eTmp->getMeshElement(i);
+//				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+//				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+//				MVertex *midETmp = VertexAssociation.find(elem->getVertex(2))->second;
+//				MLine3 *newLine = new MLine3(firstETmp,lastETmp,midETmp);
+//				newE->addLine(newLine);
+//			}
+////			std::cout<<"after newMlines"<<std::endl;
+//		}
+		std::cout<<"edges done entering faces"<<std::endl;
+		std::cout<<"RegEdges size : "<<RegEdges.size()<<std::endl;
+		for (std::list<GEdge*>::iterator itf = RegEdges.begin();itf != RegEdges.end();itf++){
+			GEdge* eTmp = (*itf);
+//			std::vector<GEdge*> newEdgesVector;
+//			std::list<GEdge*> elistFace = fTmp->edges();
+//			for (std::list<GEdge*>::iterator ite = elistFace.begin();ite != elistFace.end();ite++){
+//				GEdge* eTmp = (*ite);
+//				GEdge* eToFind = GEdgeAssociation[eTmp];
+//				newEdgesVector.push_back(eToFind);
+//			}
+//			std::vector<std::vector<GEdge*> > VecOfVec;
+//			VecOfVec.push_back(newEdgesVector);
+			//creation de la nouvelle face
+			std::cout<<"before newvertices"<<std::endl;
+			std::cout<<"beginvertex : "<<eTmp->getBeginVertex()->tag()<<std::endl;
+			std::cout<<"endvertex : "<<eTmp->getEndVertex()->tag()<<std::endl;
+			std::cout<<"associated begin "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<std::endl;
+			std::cout<<"associated end "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getBeginVertex()],GVertexAssociation[eTmp->getEndVertex()]);
+//			std::cout<<"plop1"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+//				std::cout<<"plop2"<<std::endl;
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+//				std::cout<<"plop3"<<std::endl;
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+//				std::cout<<"plop4"<<std::endl;
+				VertexAssociation[vMesh] = newMv;
+//				std::cout<<"plop5"<<std::endl;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				std::cout<<"plop6"<<std::endl;
+				newE->addMeshVertex(newMv);
+//				std::cout<<"plop7"<<std::endl;
+			}
+			std::cout<<"after newvertices"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *midETmp = VertexAssociation.find(elem->getVertex(2))->second;
+				MLine3 *newLine = new MLine3(firstETmp,lastETmp,midETmp);
+				newE->addLine(newLine);
+			}
+			std::cout<<"after addline"<<std::endl;
+			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+//			GEdge* GFaceAssociation = m->addPlanarFace(VecOfVec);
+//			int tagTmp = GFaceAssociation->tag();
+//			std::ostringstream ss;
+//			ss << tagTmp;
+////			char *intStr = itoa(tagTmp);
+//			std::string nameSurf = "SURFACE";
+////			nameSurf += std::string(intStr);
+//			nameSurf += ss.str();
+//			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+//			GFaceAssociation->addPhysicalEntity(PhysicalSurfaceTmp);
+//			std::cout<<"on a associe a la face : "<<fTmp->tag()<<" la face : "<<GFaceAssociation->tag()<<std::endl;
+//			//maintenant traitement mesh
+//			for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+//				MVertex *vMesh = fTmp->mesh_vertices[i];
+//				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+//				VertexAssociation[vMesh] = newMv;
+//				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				GFaceAssociation->addMeshVertex(newMv);
+//			}
+//			for (int i = 0; i < fTmp->getNumMeshElements();i++){
+//				MElement* elem = fTmp->getMeshElement(i);
+//				MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+//				MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+//				MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+//				MVertex *fourthE = VertexAssociation.find(elem->getVertex(3))->second;
+//				MVertex *fifthE = VertexAssociation.find(elem->getVertex(4))->second;
+//				MVertex *sisthE = VertexAssociation.find(elem->getVertex(5))->second;
+//				MTriangle6 *newTri = new MTriangle6(firstE,secondE,thirdE,fourthE,fifthE,sisthE);
+//				GFaceAssociation->addTriangle(newTri);
+//			}
+//			GFaceGlobalAssociation[std::make_pair(fTmp,rTmp)] = GFaceAssociation;
+		}
+//		std::cout<<"faces done for regions"<<std::endl;
+	}
+	std::cout<<"Regions done first pass"<<std::endl;
+	int counterNbDone = 10000;
+	//maintenant on va traiter les faces initiales
+	for (std::set<GEdge*>::iterator itf = ToDuplicateList.begin();itf != ToDuplicateList.end();itf++){
+		counterNbDone++;
+		std::cout<<"entree dans toduplicateList numero "<<counterNbDone<<std::endl;
+		GEdge* eTmp = (*itf);
+		std::list<GFace*> listFacesTmpT = eTmp->faces();
+		std::cout<<"on a une taille de list faces de "<<listFacesTmpT.size()<<std::endl;
+		std::list<GFace*>::iterator itTmpFace = listFacesTmpT.begin();
+		GFace* fac1 = (*itTmpFace);
+		itTmpFace++;
+		GFace* fac2 = (*itTmpFace);
+		//pour commencer on cree des aretes entre les vertex
+//		std::list<GVertex*> vlist = eTmp->vertices();
+		std::list<GVertex*> vlist;
+		vlist.push_back(eTmp->getBeginVertex());
+		vlist.push_back(eTmp->getEndVertex());
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		std::cout<<"entre dans vlist.begin"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			std::cout<<"test1"<<std::endl;
+			std::cout<<"on a fac1 "<<fac1->tag()<<" et fac2 "<<fac2->tag()<<" et vTmp "<<vTmp->tag()<<std::endl;
+			GVertex* v1=0;
+			GVertex* v2=0;
+			std::map<std::pair<GVertex*,GFace*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,fac1));
+			std::cout<<"test2"<<std::endl;
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+				std::cout<<"assigned v1"<<std::endl;
+			}
+			std::cout<<"test3"<<std::endl;
+			itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,fac2));
+			std::cout<<"test4"<<std::endl;
+			if (itMap != GVertexGlobalAssociation.end()){
+				v2 = itMap->second;
+				std::cout<<"assigned v2"<<std::endl;
+			}
+			std::cout<<"test5"<<std::endl;
+			GEdge* newE = m->addLine(v1,v2);
+			std::cout<<"test6"<<std::endl;
+			SurroudingEdges[vTmp] = newE;
+			std::cout<<"test7"<<std::endl;
+		}
+		std::cout<<"vertex traites"<<std::endl;
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+//		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		//duplication Gedge
+		//			GEdge* eTmp = (*ite);
+		GEdge* e1=0;
+		GEdge* e2=0;
+		std::map<std::pair<GEdge*,GFace*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,fac1));
+		if (itMap != GEdgeGlobalAssociation.end()){
+			e1 = itMap->second;
+		}
+		itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,fac2));
+		if (itMap != GEdgeGlobalAssociation.end()){
+			e2 = itMap->second;
+		}
+		std::cout<<"creation des GFace correspondantes"<<std::endl;
+		//creation des GFace correspondantes
+		GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+		GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			e1->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (e2->getBeginVertex() != firstE->getEndVertex()){
+			e2->reverse();
+		}
+		if (lastE->getBeginVertex() != e2->getEndVertex()){
+			lastE->reverse();
+		}
+		std::vector<GEdge*> VecEdgesTmp;
+		VecEdgesTmp.push_back(e1);
+		VecEdgesTmp.push_back(firstE);
+		VecEdgesTmp.push_back(e2);
+		VecEdgesTmp.push_back(lastE);
+		std::vector<std::vector<GEdge*> > VecOfVecTmp;
+		VecOfVecTmp.push_back(VecEdgesTmp);
+		GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+		//			SurroundingsFaces.push_back(newFaceTmp);
+
+		//creation de la nouvelle region
+//		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		newFaceTmp->addPhysicalEntity(PhysicalInterface);
+//		createdRegion->set(listFaces);
+//		m->add(createdRegion);
+		std::cout<<"eTmp->getNumMeshElements() "<<eTmp->getNumMeshElements()<<std::endl;
+		for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+			MElement* elem = eTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			MVertex* v4=0;
+			//MVertex* v5;
+			//MVertex* v6;
+			std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),fac2));
+//			if (itMap != VertexGlobalAssociation.end()){
+//				v5 = itMap->second;
+//			}
+//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),fac2));
+//			if (itMap != VertexGlobalAssociation.end()){
+//				v6 = itMap->second;
+//			}
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MQuadrangle *newQua = new MQuadrangle(v1,v2,v3,v4);
+			std::cout<<"addition du quad "<<newQua->getNum()<<" avec les vertices "<<v1->getNum()<<" ; "<<v2->getNum()<<" ; "<<v3->getNum()<<" ; "<<v4->getNum()<<std::endl;
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			newFaceTmp->addQuadrangle(newQua);
+//			std::cout<<"fin de for"<<std::endl;
+
+			//second
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),fac2));
+			//			if (itMap != VertexGlobalAssociation.end()){
+			//				v5 = itMap->second;
+			//			}
+			//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),fac2));
+			//			if (itMap != VertexGlobalAssociation.end()){
+			//				v6 = itMap->second;
+			//			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MQuadrangle *newQua2 = new MQuadrangle(v1,v2,v3,v4);
+			std::cout<<"addition du quad "<<newQua2->getNum()<<" avec les vertices "<<v1->getNum()<<" ; "<<v2->getNum()<<" ; "<<v3->getNum()<<" ; "<<v4->getNum()<<std::endl;
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			newFaceTmp->addQuadrangle(newQua2);
+
+
+
+
+		}
+//		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < fac1->getNumMeshElements();i++){
+			MElement* elem = fac1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,fac1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		for (unsigned int i = 0; i < fac2->getNumMeshElements();i++){
+			MElement* elem = fac2->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,fac2));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+	std::cout<<"interior faces done"<<std::endl;
+	//maintenant on va traiter les faces du bord
+//	std::ofstream file("MicrostructurePolycrystal3D.pos");
+//	file << "View \"test\" {\n";
+//
+//	std::ofstream file2("PERIODIC.map");
+//	std::ofstream file3("SetAdd.map");
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = pairs.begin();itP != pairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//		GFace* ToReplaceFace = pairTmp.second;
+//		GRegion* rTmp = ToReplaceFace->getRegion(0);
+//		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(ToReplaceFace,rTmp));
+//		if (itMap != GFaceGlobalAssociation.end()){
+//			GFace* associatedFace = (*itMap).second;
+//
+//
+//
+//
+//
+//			file3 <<associatedFace->tag()<<"\tSURFACE"<<associatedFace->tag()<<"\tNSET "<<"\n";
+//
+//			int tagTmp = associatedFace->tag();
+//			std::ostringstream ss;
+//			ss << tagTmp;
+////			char *intStr = itoa(tagTmp);
+//			std::string nameSurf = "SURFACE";
+////			nameSurf += std::string(intStr);
+//			nameSurf += ss.str();
+//			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+//			associatedFace->addPhysicalEntity(PhysicalSurfaceTmp);
+//
+//			std::map<GFace*,SPoint3>::iterator it3 = centers.find(pairTmp.first);
+//			std::map<GFace*,SPoint3>::iterator it4 = centers.find(ToReplaceFace);
+//
+//			SPoint3 p1 = it3->second;
+//			SPoint3  p2 = it4->second;
+//
+//			double delta_x = fabs(p2.x()-p1.x());
+//			double delta_y = fabs(p2.y()-p1.y());
+//			double delta_z = fabs(p2.z()-p1.z());
+//
+//
+//			file << "SL ("
+//					<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
+//					<< p2.x() << ", " << p2.y() << ", " << p2.z()
+//					<< "){10, 20};\n";
+//
+//			//file2 << "PERIODIC\tSURFACE"<<faces[i]->tag() << "\tSURFACE" << faces[j]->tag() << "\t" << p2.x()-p1.x() << "\t" << p2.y()-p1.y() << "\t" << p2.z()-p1.z() << "\n";
+//			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+//				if (abs((p2.y()-p1.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONT = FRONT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACK = BACK + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}
+//			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+//				if (abs((p2.y()-p1.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONT = FRONT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACK = BACK + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}
+//			}else if (abs((p1.x()-p2.x()))<0.0001){
+//				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFT = LEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFT = LEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tTOP = TOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tTOP = TOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}
+//			}
+////			count++;
+//
+//
+//
+//
+//
+//
+//
+//			newPairs.push_back(std::make_pair(pairTmp.first,associatedFace));
+//		}
+//	}
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = newPairs.begin();itP != newPairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//	}
+
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PView *GMSH_DuplicateBoundariesPlugin::execute2DWithBound(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GEdge*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GEdge*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+	std::vector<std::pair<GFace*,GFace*> > newPairs;
+	int PhysicalInterface = m->setPhysicalName("Interface",2);
+//	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+//		GFace* ftmp= (*itf);
+//		std::list<GEdge*> edgesFace = ftmp->edges();
+////		std::cout<<"size de edgesFace "<<edgesFace.size()<<std::endl;
+//		for (std::list<GEdge*>::iterator it2=edgesFace.begin();it2!=edgesFace.end();it2++){
+//			GEdge* etmp = (*it2);
+////			std::cout<<"on a la edge "<<etmp->tag()<<std::endl;
+////			std::cout<<"size de face de etmp before : "<<etmp->faces().size()<<std::endl;
+//			etmp->addFace(ftmp);
+////			std::cout<<"size de face de etmp after : "<<etmp->faces().size()<<std::endl;
+//		}
+//	}
+	for (GModel::eiter ite= m->firstEdge();ite != m->lastEdge();ite++){
+		GEdge* eTmp = (*ite);
+//		std::cout<<"on a size de face de etmp de "<<eTmp->faces().size()<<std::endl;
+		if (eTmp->faces().size() == 2){
+			ToDuplicateList.insert(eTmp);
+		}
+		else{
+			ToDuplicateListBoundary.insert(eTmp);
+		}
+	}
+
+
+
+
+
+
+
+
+
+
+	std::map<std::pair<MVertex*,GFace*>,MVertex* > VertexGlobalAssociation;
+	std::map<std::pair<GVertex*,GFace*>,GVertex* > GVertexGlobalAssociation;
+	std::map<std::pair<GEdge*,GFace*>,GEdge* > GEdgeGlobalAssociation;
+	std::map<std::pair<GFace*,GRegion*>,GFace* > GFaceGlobalAssociation;
+//	std::cout<<"entree dans regions first pass"<<std::endl;
+	for (GModel::fiter itr= m->firstFace();itr != m->lastFace();itr++){
+		GFace* rTmp = (*itr);
+		std::list<GEdge*> RegEdges = rTmp->edges();
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		//int counterNbDone = 10000;
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+		int counterPts = 0;
+		for(std::list<GEdge*>::iterator it2=RegEdges.begin();it2!=RegEdges.end();it2++){
+			GEdge* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+		//duplication noeud et aretes au niveau de la region directement
+		std::list<GVertex*> vlist;
+
+
+//		std::cout<<"wut 1"<<std::endl;
+		std::list<GEdge*> listedgesTmp = rTmp->edges();
+//		std::cout<<"listeEdge size "<<listedgesTmp.size()<<std::endl;
+		for (std::list<GEdge*>::iterator itTp = listedgesTmp.begin();itTp != listedgesTmp.end();itTp++){
+//			std::cout<<"wut 2"<<std::endl;
+			std::list<GVertex*> vlist2;
+//			std::cout<<"wut 3"<<std::endl;
+			if(std::find(vlist.begin(), vlist.end(),(*itTp)->getBeginVertex()) == vlist.end())
+				vlist.push_back((*itTp)->getBeginVertex());
+			if(std::find(vlist.begin(), vlist.end(),(*itTp)->getEndVertex()) == vlist.end())
+				vlist.push_back((*itTp)->getEndVertex());
+//			vlist2 = (*itTp)->vertices();
+//			std::cout<<"vlist2 size "<<vlist2.size()<<std::endl;
+////			std::cout<<"wut 4"<<std::endl;
+//			for (std::list<GVertex*>::iterator itTp2 = vlist2.begin();itTp2 != vlist2.end();itTp2++){
+////				std::cout<<"wut 5"<<std::endl;
+//				if(std::find(vlist.begin(), vlist.end(), *itTp2) == vlist.end())
+//					vlist.push_back(*itTp2);
+////				std::cout<<"wut 6"<<std::endl;
+//			}
+//			std::cout<<"wut 7"<<std::endl;
+		}
+//		std::cout<<"wut 8"<<std::endl;
+
+
+//		std::cout<<"on a une taille vlist de "<<vlist.size()<<std::endl;
+//		std::cout<<"init done entering vertices"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			GVertex* vTmp = (*itv);
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+//			std::cout<<"inserted correspondance between : "<<vTmp->tag()<<" and : "<<newv->tag()<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			GVertexGlobalAssociation[std::make_pair(vTmp,rTmp)] = newv;
+			//creation des Gedge correspondantes
+//			GEdge* newE = m->addLine(vTmp,newv);
+//			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			VertexAssociation[vMesh] = newMv;
+			VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+			newv->addMeshVertex(newMv);
+		}
+		//maintenant on soccupe de duppliquer les edges de la region
+		std::list<GEdge*> elist = rTmp->edges();
+//		std::cout<<"on a une taille elist de "<<elist.size()<<std::endl;
+//		std::cout<<"vertices done entering edges"<<std::endl;
+
+		std::vector<GFace*> SurroundingsFaces;
+//		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+//			//duplication Gedge
+//			GEdge* eTmp = (*ite);
+////			std::cout<<"before addline"<<std::endl;
+////			std::cout<<"begin ID : "<<eTmp->getBeginVertex()->tag()<<" and end ID : "<<eTmp->getEndVertex()->tag()<<std::endl;
+////			std::cout<<"corresponding begin ID : "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<" and end ID : "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+//			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+////			std::cout<<"after addline"<<std::endl;
+//			GEdgeAssociation[eTmp] = newE;
+//			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+//			//creation des GFace correspondantes
+////			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+////			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+////			std::vector<GEdge*> VecEdgesTmp;
+////			VecEdgesTmp.push_back(eTmp);
+////			VecEdgesTmp.push_back(firstE);
+////			VecEdgesTmp.push_back(newE);
+////			VecEdgesTmp.push_back(lastE);
+////			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+////			VecOfVecTmp.push_back(VecEdgesTmp);
+////			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+////			SurroundingsFaces.push_back(newFaceTmp);
+//			//maintenant traitement mesh
+//			for (int i = 0; i < eTmp->mesh_vertices.size();i++){
+//				MVertex *vMesh = eTmp->mesh_vertices[i];
+//				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+//				VertexAssociation[vMesh] = newMv;
+//				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				newE->addMeshVertex(newMv);
+//			}
+////			std::cout<<"after newvertices"<<std::endl;
+//			for (int i = 0; i < eTmp->getNumMeshElements();i++){
+//				MElement* elem = eTmp->getMeshElement(i);
+//				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+//				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+//				MVertex *midETmp = VertexAssociation.find(elem->getVertex(2))->second;
+//				MLine3 *newLine = new MLine3(firstETmp,lastETmp,midETmp);
+//				newE->addLine(newLine);
+//			}
+////			std::cout<<"after newMlines"<<std::endl;
+//		}
+//		std::cout<<"edges done entering faces"<<std::endl;
+//		std::cout<<"RegEdges size : "<<RegEdges.size()<<std::endl;
+		for (std::list<GEdge*>::iterator itf = RegEdges.begin();itf != RegEdges.end();itf++){
+			GEdge* eTmp = (*itf);
+//			std::vector<GEdge*> newEdgesVector;
+//			std::list<GEdge*> elistFace = fTmp->edges();
+//			for (std::list<GEdge*>::iterator ite = elistFace.begin();ite != elistFace.end();ite++){
+//				GEdge* eTmp = (*ite);
+//				GEdge* eToFind = GEdgeAssociation[eTmp];
+//				newEdgesVector.push_back(eToFind);
+//			}
+//			std::vector<std::vector<GEdge*> > VecOfVec;
+//			VecOfVec.push_back(newEdgesVector);
+			//creation de la nouvelle face
+//			std::cout<<"before newvertices"<<std::endl;
+//			std::cout<<"beginvertex : "<<eTmp->getBeginVertex()->tag()<<std::endl;
+//			std::cout<<"endvertex : "<<eTmp->getEndVertex()->tag()<<std::endl;
+//			std::cout<<"associated begin "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<std::endl;
+//			std::cout<<"associated end "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getBeginVertex()],GVertexAssociation[eTmp->getEndVertex()]);
+//			std::cout<<"plop1"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+//				std::cout<<"plop2"<<std::endl;
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+//				std::cout<<"plop3"<<std::endl;
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+//				std::cout<<"plop4"<<std::endl;
+				VertexAssociation[vMesh] = newMv;
+//				std::cout<<"plop5"<<std::endl;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				std::cout<<"plop6"<<std::endl;
+				newE->addMeshVertex(newMv);
+//				std::cout<<"plop7"<<std::endl;
+			}
+//			std::cout<<"after newvertices"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *midETmp = VertexAssociation.find(elem->getVertex(2))->second;
+				MLine3 *newLine = new MLine3(firstETmp,lastETmp,midETmp);
+				newE->addLine(newLine);
+			}
+//			std::cout<<"after addline"<<std::endl;
+			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+//			GEdge* GFaceAssociation = m->addPlanarFace(VecOfVec);
+//			int tagTmp = GFaceAssociation->tag();
+//			std::ostringstream ss;
+//			ss << tagTmp;
+////			char *intStr = itoa(tagTmp);
+//			std::string nameSurf = "SURFACE";
+////			nameSurf += std::string(intStr);
+//			nameSurf += ss.str();
+//			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+//			GFaceAssociation->addPhysicalEntity(PhysicalSurfaceTmp);
+//			std::cout<<"on a associe a la face : "<<fTmp->tag()<<" la face : "<<GFaceAssociation->tag()<<std::endl;
+//			//maintenant traitement mesh
+//			for (int i = 0; i < fTmp->mesh_vertices.size();i++){
+//				MVertex *vMesh = fTmp->mesh_vertices[i];
+//				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+//				VertexAssociation[vMesh] = newMv;
+//				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+//				GFaceAssociation->addMeshVertex(newMv);
+//			}
+//			for (int i = 0; i < fTmp->getNumMeshElements();i++){
+//				MElement* elem = fTmp->getMeshElement(i);
+//				MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+//				MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+//				MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+//				MVertex *fourthE = VertexAssociation.find(elem->getVertex(3))->second;
+//				MVertex *fifthE = VertexAssociation.find(elem->getVertex(4))->second;
+//				MVertex *sisthE = VertexAssociation.find(elem->getVertex(5))->second;
+//				MTriangle6 *newTri = new MTriangle6(firstE,secondE,thirdE,fourthE,fifthE,sisthE);
+//				GFaceAssociation->addTriangle(newTri);
+//			}
+//			GFaceGlobalAssociation[std::make_pair(fTmp,rTmp)] = GFaceAssociation;
+		}
+//		std::cout<<"faces done for regions"<<std::endl;
+	}
+//	std::cout<<"Regions done first pass"<<std::endl;
+	int counterNbDone = 10000;
+	//maintenant on va traiter les faces initiales
+	for (std::set<GEdge*>::iterator itf = ToDuplicateList.begin();itf != ToDuplicateList.end();itf++){
+		counterNbDone++;
+//		std::cout<<"entree dans toduplicateList numero "<<counterNbDone<<std::endl;
+		GEdge* eTmp = (*itf);
+		std::list<GFace*> listFacesTmpT = eTmp->faces();
+//		std::cout<<"on a une taille de list faces de "<<listFacesTmpT.size()<<std::endl;
+		std::list<GFace*>::iterator itTmpFace = listFacesTmpT.begin();
+		GFace* fac1 = (*itTmpFace);
+		itTmpFace++;
+		GFace* fac2 = (*itTmpFace);
+		//pour commencer on cree des aretes entre les vertex
+//		std::list<GVertex*> vlist = eTmp->vertices();
+		std::list<GVertex*> vlist;
+		vlist.push_back(eTmp->getBeginVertex());
+		vlist.push_back(eTmp->getEndVertex());
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+//		std::cout<<"entre dans vlist.begin"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+//			std::cout<<"test1"<<std::endl;
+//			std::cout<<"on a fac1 "<<fac1->tag()<<" et fac2 "<<fac2->tag()<<" et vTmp "<<vTmp->tag()<<std::endl;
+			GVertex* v1=0;
+			GVertex* v2=0;
+			std::map<std::pair<GVertex*,GFace*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,fac1));
+//			std::cout<<"test2"<<std::endl;
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+//				std::cout<<"assigned v1"<<std::endl;
+			}
+//			std::cout<<"test3"<<std::endl;
+			itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,fac2));
+//			std::cout<<"test4"<<std::endl;
+			if (itMap != GVertexGlobalAssociation.end()){
+				v2 = itMap->second;
+//				std::cout<<"assigned v2"<<std::endl;
+			}
+//			std::cout<<"test5"<<std::endl;
+			GEdge* newE = m->addLine(v1,v2);
+//			std::cout<<"test6"<<std::endl;
+			SurroudingEdges[vTmp] = newE;
+//			std::cout<<"test7"<<std::endl;
+		}
+//		std::cout<<"vertex traites"<<std::endl;
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+//		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		//duplication Gedge
+		//			GEdge* eTmp = (*ite);
+		GEdge* e1=0;
+		GEdge* e2=0;
+		std::map<std::pair<GEdge*,GFace*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,fac1));
+		if (itMap != GEdgeGlobalAssociation.end()){
+			e1 = itMap->second;
+		}
+		itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,fac2));
+		if (itMap != GEdgeGlobalAssociation.end()){
+			e2 = itMap->second;
+		}
+//		std::cout<<"creation des GFace correspondantes"<<std::endl;
+		//creation des GFace correspondantes
+		GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+		GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			e1->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (e2->getBeginVertex() != firstE->getEndVertex()){
+			e2->reverse();
+		}
+		if (lastE->getBeginVertex() != e2->getEndVertex()){
+			lastE->reverse();
+		}
+		std::vector<GEdge*> VecEdgesTmp;
+		VecEdgesTmp.push_back(e1);
+		VecEdgesTmp.push_back(firstE);
+		VecEdgesTmp.push_back(e2);
+		VecEdgesTmp.push_back(lastE);
+		std::vector<std::vector<GEdge*> > VecOfVecTmp;
+		VecOfVecTmp.push_back(VecEdgesTmp);
+		GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+		//			SurroundingsFaces.push_back(newFaceTmp);
+
+		//creation de la nouvelle region
+//		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		newFaceTmp->addPhysicalEntity(PhysicalInterface);
+//		createdRegion->set(listFaces);
+//		m->add(createdRegion);
+//		std::cout<<"eTmp->getNumMeshElements() "<<eTmp->getNumMeshElements()<<std::endl;
+		for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+			MElement* elem = eTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			MVertex* v4=0;
+			//MVertex* v5;
+			//MVertex* v6;
+			std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),fac2));
+//			if (itMap != VertexGlobalAssociation.end()){
+//				v5 = itMap->second;
+//			}
+//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),fac2));
+//			if (itMap != VertexGlobalAssociation.end()){
+//				v6 = itMap->second;
+//			}
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MQuadrangle *newQua = new MQuadrangle(v1,v2,v3,v4);
+//			std::cout<<"addition du quad "<<newQua->getNum()<<" avec les vertices "<<v1->getNum()<<" ; "<<v2->getNum()<<" ; "<<v3->getNum()<<" ; "<<v4->getNum()<<std::endl;
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			newFaceTmp->addQuadrangle(newQua);
+//			std::cout<<"fin de for"<<std::endl;
+
+			//second
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(3),fac2));
+			//			if (itMap != VertexGlobalAssociation.end()){
+			//				v5 = itMap->second;
+			//			}
+			//			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(5),fac2));
+			//			if (itMap != VertexGlobalAssociation.end()){
+			//				v6 = itMap->second;
+			//			}
+			//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MQuadrangle *newQua2 = new MQuadrangle(v1,v2,v3,v4);
+//			std::cout<<"addition du quad "<<newQua2->getNum()<<" avec les vertices "<<v1->getNum()<<" ; "<<v2->getNum()<<" ; "<<v3->getNum()<<" ; "<<v4->getNum()<<std::endl;
+			//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			newFaceTmp->addQuadrangle(newQua2);
+
+
+
+
+		}
+//		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < fac1->getNumMeshElements();i++){
+			MElement* elem = fac1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,fac1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		for (unsigned int i = 0; i < fac2->getNumMeshElements();i++){
+			MElement* elem = fac2->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,fac2));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+//	std::cout<<"interior faces done"<<std::endl;
+
+
+
+
+
+
+
+
+	//maintenant on va traiter les faces du bord
+	for (std::set<GEdge*>::iterator itf = ToDuplicateListBoundary.begin();itf != ToDuplicateListBoundary.end();itf++){
+		counterNbDone++;
+		GEdge* eTmp = (*itf);
+		std::list<GFace*> listFacesTmpT = eTmp->faces();
+		std::list<GFace*>::iterator itTmpFace = listFacesTmpT.begin();
+		GFace* fac1 = (*itTmpFace);
+//		GFace* reg1 = fTmp->getRegion(0);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist;
+		vlist.push_back(eTmp->getBeginVertex());
+		vlist.push_back(eTmp->getEndVertex());
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			std::map<std::pair<GVertex*,GFace*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,fac1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,vTmp);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+//		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+//		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+		//duplication Gedge
+		//			GEdge* eTmp = (*ite);
+		GEdge* e1=0;
+		std::map<std::pair<GEdge*,GFace*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,fac1));
+		if (itMap != GEdgeGlobalAssociation.end()){
+			e1 = itMap->second;
+		}
+		//creation des GFace correspondantes
+		GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+		GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			e1->reverse();
+		}
+		if (firstE->getBeginVertex() != e1->getEndVertex()){
+			firstE->reverse();
+		}
+		if (eTmp->getBeginVertex() != firstE->getEndVertex()){
+			eTmp->reverse();
+		}
+		if (lastE->getBeginVertex() != eTmp->getEndVertex()){
+			lastE->reverse();
+		}
+		std::vector<GEdge*> VecEdgesTmp;
+		VecEdgesTmp.push_back(e1);
+		VecEdgesTmp.push_back(firstE);
+		VecEdgesTmp.push_back(eTmp);
+		VecEdgesTmp.push_back(lastE);
+		std::vector<std::vector<GEdge*> > VecOfVecTmp;
+		VecOfVecTmp.push_back(VecEdgesTmp);
+		GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+//		SurroundingsFaces.push_back(newFaceTmp);
+//		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+//		GFace* f1;
+//		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+//		if (itMap != GFaceGlobalAssociation.end()){
+//			f1 = itMap->second;
+//		}
+//		VectorFaces.push_back(f1);
+//		listFaces.push_back(f1);
+//		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+//			VectorFaces.push_back(SurroundingsFaces[i]);
+//			listFaces.push_back(SurroundingsFaces[i]);
+//		}
+//		VectorFaces.push_back(fTmp);
+//		listFaces.push_back(fTmp);
+//		std::vector<std::vector<GFace*> > VecOfVecGFace;
+//		VecOfVecGFace.push_back(VectorFaces);
+//		//creation de la nouvelle region
+//		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		newFaceTmp->addPhysicalEntity(PhysicalInterface);
+//		createdRegion->set(listFaces);
+//		m->add(createdRegion);
+		for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+			MElement* elem = eTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			//MVertex* v3;
+			std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			MQuadrangle *newQua = new MQuadrangle(v1,v2,elem->getVertex(2),elem->getVertex(0));
+			newFaceTmp->addQuadrangle(newQua);
+			//second
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),fac1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			MQuadrangle *newQua2 = new MQuadrangle(v1,v2,elem->getVertex(1),elem->getVertex(2));
+			newFaceTmp->addQuadrangle(newQua2);
+		}
+//		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < fac1->getNumMeshElements();i++){
+			MElement* elem = fac1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GFace*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,fac1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//	std::ofstream file("MicrostructurePolycrystal3D.pos");
+//	file << "View \"test\" {\n";
+//
+//	std::ofstream file2("PERIODIC.map");
+//	std::ofstream file3("SetAdd.map");
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = pairs.begin();itP != pairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//		GFace* ToReplaceFace = pairTmp.second;
+//		GRegion* rTmp = ToReplaceFace->getRegion(0);
+//		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(ToReplaceFace,rTmp));
+//		if (itMap != GFaceGlobalAssociation.end()){
+//			GFace* associatedFace = (*itMap).second;
+//
+//
+//
+//
+//
+//			file3 <<associatedFace->tag()<<"\tSURFACE"<<associatedFace->tag()<<"\tNSET "<<"\n";
+//
+//			int tagTmp = associatedFace->tag();
+//			std::ostringstream ss;
+//			ss << tagTmp;
+////			char *intStr = itoa(tagTmp);
+//			std::string nameSurf = "SURFACE";
+////			nameSurf += std::string(intStr);
+//			nameSurf += ss.str();
+//			int PhysicalSurfaceTmp = m->setPhysicalName(nameSurf,2);
+//			associatedFace->addPhysicalEntity(PhysicalSurfaceTmp);
+//
+//			std::map<GFace*,SPoint3>::iterator it3 = centers.find(pairTmp.first);
+//			std::map<GFace*,SPoint3>::iterator it4 = centers.find(ToReplaceFace);
+//
+//			SPoint3 p1 = it3->second;
+//			SPoint3  p2 = it4->second;
+//
+//			double delta_x = fabs(p2.x()-p1.x());
+//			double delta_y = fabs(p2.y()-p1.y());
+//			double delta_z = fabs(p2.z()-p1.z());
+//
+//
+//			file << "SL ("
+//					<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
+//					<< p2.x() << ", " << p2.y() << ", " << p2.z()
+//					<< "){10, 20};\n";
+//
+//			//file2 << "PERIODIC\tSURFACE"<<faces[i]->tag() << "\tSURFACE" << faces[j]->tag() << "\t" << p2.x()-p1.x() << "\t" << p2.y()-p1.y() << "\t" << p2.z()-p1.z() << "\n";
+//			if (abs((p2.x()-p1.x()-1.0))<0.0001){
+//				if (abs((p2.y()-p1.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONT = FRONT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACK = BACK + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}
+//			}else if (abs((p1.x()-p2.x()-1.0))<0.0001){
+//				if (abs((p2.y()-p1.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONT = FRONT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACK = BACK + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if(abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTBOTTOM = FRONTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKTOP = BACKTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTTOP = FRONTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKBOTTOM = BACKBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTLEFT = FRONTLEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHT = BACKRIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTBOTTOM = FRONTLEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTTOP = BACKRIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTLEFTTOP = FRONTLEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKRIGHTBOTTOM = BACKRIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tFRONTRIGHT = FRONTRIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFT = BACKLEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTBOTTOM = FRONTRIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTTOP = BACKLEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tFRONTRIGHTTOP = FRONTRIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBACKLEFTBOTTOM = BACKLEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}
+//			}else if (abs((p1.x()-p2.x()))<0.0001){
+//				if (abs((p2.y()-p1.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFT = LEFT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()-1.0))<0.0001){
+//					if (abs((p2.z()-p1.z()))<0.0001){
+//						file2 << "NSET\tRIGHT = RIGHT + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFT = LEFT + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTBOTTOM = RIGHTBOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFTTOP = LEFTTOP + SURFACE"<<associatedFace->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tRIGHTTOP = RIGHTTOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tLEFTBOTTOM = LEFTBOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}else if (abs((p1.y()-p2.y()))<0.0001){
+//					if (abs((p2.z()-p1.z()-1.0))<0.0001){
+//						file2 << "NSET\tTOP = TOP + SURFACE"<<associatedFace->tag()<<"\n";
+//						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<pairTmp.first->tag()<<"\n";
+//					}else if (abs((p1.z()-p2.z()-1.0))<0.0001){
+//						file2 << "NSET\tTOP = TOP + SURFACE"<<pairTmp.first->tag()<<"\n";
+//						file2 << "NSET\tBOTTOM = BOTTOM + SURFACE"<<associatedFace->tag()<<"\n";
+//					}
+//				}
+//			}
+////			count++;
+//
+//
+//
+//
+//
+//
+//
+//			newPairs.push_back(std::make_pair(pairTmp.first,associatedFace));
+//		}
+//	}
+//	for (std::vector<std::pair<GFace*,GFace*> >::iterator itP = newPairs.begin();itP != newPairs.end();itP++){
+//		std::pair<GFace*,GFace*> pairTmp = (*itP);
+//	}
+
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PView *GMSH_DuplicateBoundariesPlugin::executeTer(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	std::set<GFace*> ToDuplicateList;
+	ToDuplicateList.clear();
+	std::set<GFace*> ToDuplicateListBoundary;
+	ToDuplicateListBoundary.clear();
+	std::vector<GFace*> facesBound;
+	facesBound.clear();
+	std::map<GFace*,SPoint3> centers;
+	std::vector<std::pair<GFace*,GFace*> > pairs;
+	std::vector<std::pair<GFace*,GFace*> > newPairs;
+	int PhysicalInterface = m->setPhysicalName("Interface",3);
+	int PhysicalBoundary = m->setPhysicalName("Boundary",2);
+	for (GModel::fiter itf= m->firstFace();itf != m->lastFace();itf++){
+		GFace* fTmp = (*itf);
+		if (fTmp->numRegions() == 2){
+			ToDuplicateList.insert(fTmp);
+		}
+		else{
+			ToDuplicateListBoundary.insert(fTmp);
+			facesBound.push_back(fTmp);
+		}
+	}
+
+
+
+
+
+
+
+	std::map<std::pair<MVertex*,GRegion*>,MVertex* > VertexGlobalAssociation;
+	std::map<std::pair<GVertex*,GRegion*>,GVertex* > GVertexGlobalAssociation;
+	std::map<std::pair<GEdge*,GRegion*>,GEdge* > GEdgeGlobalAssociation;
+	std::map<std::pair<GFace*,GRegion*>,GFace* > GFaceGlobalAssociation;
+
+	std::cout<<"entree dans regions first pass"<<std::endl;
+	for (GModel::riter itr= m->firstRegion();itr != m->lastRegion();itr++){
+		GRegion* rTmp = (*itr);
+		std::list<GFace*> RegFaces = rTmp->faces();
+		std::map<MVertex*,MVertex* > VertexAssociation;
+		std::map<GVertex*,GVertex* > GVertexAssociation;
+		std::map<GEdge*,GEdge* > GEdgeAssociation;
+		//int counterNbDone = 10000;
+		double xCenterReg = 0.0;
+		double yCenterReg = 0.0;
+		double zCenterReg = 0.0;
+		int counterPts = 0;
+		for(std::list<GFace*>::iterator it2=RegFaces.begin();it2!=RegFaces.end();it2++){
+			GFace* fTemp = (*it2);
+			std::list<GVertex*> verticesFace = fTemp->vertices();
+			for (std::list<GVertex*>::iterator it3=verticesFace.begin();it3!=verticesFace.end();it3++){
+				xCenterReg = xCenterReg + (*it3)->x();
+				yCenterReg = yCenterReg + (*it3)->y();
+				zCenterReg = zCenterReg + (*it3)->z();
+				counterPts++;
+			}
+		}
+		xCenterReg = xCenterReg/counterPts;
+		yCenterReg = yCenterReg/counterPts;
+		zCenterReg = zCenterReg/counterPts;
+		//duplication noeud et aretes au niveau de la region directement
+		std::list<GVertex*> vlist;
+
+
+		std::cout<<"wut 1"<<std::endl;
+		std::list<GFace*> listFacesTmp = rTmp->faces();
+		for (std::list<GFace*>::iterator itTp = listFacesTmp.begin();itTp != listFacesTmp.end();itTp++){
+			std::cout<<"wut 2"<<std::endl;
+			std::list<GVertex*> vlist2;
+			std::cout<<"wut 3"<<std::endl;
+			vlist2 = (*itTp)->vertices();
+			std::cout<<"wut 4"<<std::endl;
+			for (std::list<GVertex*>::iterator itTp2 = vlist2.begin();itTp2 != vlist2.end();itTp2++){
+				std::cout<<"wut 5"<<std::endl;
+				if(std::find(vlist.begin(), vlist.end(), *itTp2) == vlist.end())
+					vlist.push_back(*itTp2);
+				std::cout<<"wut 6"<<std::endl;
+			}
+			std::cout<<"wut 7"<<std::endl;
+		}
+		std::cout<<"wut 8"<<std::endl;
+
+
+		std::cout<<"on a une taille vlist de "<<vlist.size()<<std::endl;
+		std::cout<<"init done entering vertices"<<std::endl;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			//duplication Gvertex
+			GVertex* vTmp = (*itv);
+			double ponderatedX = 0.99999999999 * vTmp->x() + 0.00000000001 * xCenterReg;
+			double ponderatedY = 0.99999999999 * vTmp->y() + 0.00000000001 * yCenterReg;
+			double ponderatedZ = 0.99999999999 * vTmp->z() + 0.00000000001 * zCenterReg;
+			GVertex* newv = m->addVertex(ponderatedX,ponderatedY,ponderatedZ,vTmp->prescribedMeshSizeAtVertex());
+			std::cout<<"inserted correspondance between : "<<vTmp->tag()<<" and : "<<newv->tag()<<std::endl;
+			GVertexAssociation[vTmp] = newv;
+			GVertexGlobalAssociation[std::make_pair(vTmp,rTmp)] = newv;
+			//creation des Gedge correspondantes
+//			GEdge* newE = m->addLine(vTmp,newv);
+//			SurroudingEdges[vTmp] = newE;
+			//maintenant traitement mesh
+			MVertex *vMesh = vTmp->mesh_vertices[0];
+			MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newv);
+			VertexAssociation[vMesh] = newMv;
+			VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+			newv->addMeshVertex(newMv);
+		}
+		//maintenant on soccupe de duppliquer les edges de la region
+		std::list<GEdge*> elist = rTmp->edges();
+		std::cout<<"on a une taille elist de "<<elist.size()<<std::endl;
+		std::cout<<"vertices done entering edges"<<std::endl;
+
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			std::cout<<"before addline"<<std::endl;
+			std::cout<<"begin ID : "<<eTmp->getBeginVertex()->tag()<<" and end ID : "<<eTmp->getEndVertex()->tag()<<std::endl;
+			std::cout<<"corresponding begin ID : "<<GVertexAssociation[eTmp->getBeginVertex()]->tag()<<" and end ID : "<<GVertexAssociation[eTmp->getEndVertex()]->tag()<<std::endl;
+			GEdge* newE = m->addLine(GVertexAssociation[eTmp->getEndVertex()],GVertexAssociation[eTmp->getBeginVertex()]);
+			std::cout<<"after addline"<<std::endl;
+			GEdgeAssociation[eTmp] = newE;
+			GEdgeGlobalAssociation[std::make_pair(eTmp,rTmp)] = newE;
+			//creation des GFace correspondantes
+//			GEdge* firstE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+//			GEdge* lastE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+//			std::vector<GEdge*> VecEdgesTmp;
+//			VecEdgesTmp.push_back(eTmp);
+//			VecEdgesTmp.push_back(firstE);
+//			VecEdgesTmp.push_back(newE);
+//			VecEdgesTmp.push_back(lastE);
+//			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+//			VecOfVecTmp.push_back(VecEdgesTmp);
+//			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+//			SurroundingsFaces.push_back(newFaceTmp);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < eTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = eTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)newE);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				newE->addMeshVertex(newMv);
+			}
+			std::cout<<"after newvertices"<<std::endl;
+			for (unsigned int i = 0; i < eTmp->getNumMeshElements();i++){
+				MElement* elem = eTmp->getMeshElement(i);
+				MVertex *firstETmp = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *lastETmp = VertexAssociation.find(elem->getVertex(1))->second;
+				MLine *newLine = new MLine(firstETmp,lastETmp);
+				newE->addLine(newLine);
+			}
+			std::cout<<"after newMlines"<<std::endl;
+		}
+		std::cout<<"edges done entering faces"<<std::endl;
+		for (std::list<GFace*>::iterator itf = RegFaces.begin();itf != RegFaces.end();itf++){
+			GFace* fTmp = (*itf);
+			std::vector<GEdge*> newEdgesVector;
+			std::list<GEdge*> elistFace = fTmp->edges();
+			for (std::list<GEdge*>::iterator ite = elistFace.begin();ite != elistFace.end();ite++){
+				GEdge* eTmp = (*ite);
+				GEdge* eToFind = GEdgeAssociation[eTmp];
+				newEdgesVector.push_back(eToFind);
+			}
+			std::vector<std::vector<GEdge*> > VecOfVec;
+			VecOfVec.push_back(newEdgesVector);
+			//creation de la nouvelle face
+			GFace* GFaceAssociation = m->addPlanarFace(VecOfVec);
+			//maintenant traitement mesh
+			for (unsigned int i = 0; i < fTmp->mesh_vertices.size();i++){
+				MVertex *vMesh = fTmp->mesh_vertices[i];
+				MVertex *newMv = new MVertex(vMesh->x(), vMesh->y(), vMesh->z(), (GEntity*)GFaceAssociation);
+				VertexAssociation[vMesh] = newMv;
+				VertexGlobalAssociation[std::make_pair(vMesh,rTmp)] = newMv;
+				GFaceAssociation->addMeshVertex(newMv);
+			}
+			for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+				MElement* elem = fTmp->getMeshElement(i);
+				MVertex *firstE = VertexAssociation.find(elem->getVertex(0))->second;
+				MVertex *secondE = VertexAssociation.find(elem->getVertex(1))->second;
+				MVertex *thirdE = VertexAssociation.find(elem->getVertex(2))->second;
+				MTriangle *newTri = new MTriangle(firstE,secondE,thirdE);
+				GFaceAssociation->addTriangle(newTri);
+			}
+			GFaceGlobalAssociation[std::make_pair(fTmp,rTmp)] = GFaceAssociation;
+		}
+		std::cout<<"faces done for regions"<<std::endl;
+	}
+	std::cout<<"Regions done first pass"<<std::endl;
+	int counterNbDone = 10000;
+	//maintenant on va traiter les faces initiales
+	for (std::set<GFace*>::iterator itf = ToDuplicateList.begin();itf != ToDuplicateList.end();itf++){
+		counterNbDone++;
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		GRegion* reg2 = fTmp->getRegion(1);
+		//pour commencer on cree des aretes entre les vertex
+		std::list<GVertex*> vlist = fTmp->vertices();
+		std::map<GVertex*,GEdge* > SurroudingEdges;
+		for (std::list<GVertex*>::iterator itv = vlist.begin();itv != vlist.end();itv++){
+			GVertex* vTmp = (*itv);
+			GVertex* v1=0;
+			GVertex* v2=0;
+			std::map<std::pair<GVertex*,GRegion*>,GVertex* >::iterator itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg1));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = GVertexGlobalAssociation.find(std::make_pair(vTmp,reg2));
+			if (itMap != GVertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			GEdge* newE = m->addLine(v1,v2);
+			SurroudingEdges[vTmp] = newE;
+		}
+		//ici tous les vertex sont traites
+		//on va traiter les edges
+		std::list<GEdge*> elist = fTmp->edges();
+		std::vector<GEdge*> newEdgesVector;
+		std::vector<GFace*> SurroundingsFaces;
+		for (std::list<GEdge*>::iterator ite = elist.begin();ite != elist.end();ite++){
+			//duplication Gedge
+			GEdge* eTmp = (*ite);
+			GEdge* e1=0;
+			GEdge* e2=0;
+			std::map<std::pair<GEdge*,GRegion*>,GEdge* >::iterator itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg1));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e1 = itMap->second;
+			}
+			itMap = GEdgeGlobalAssociation.find(std::make_pair(eTmp,reg2));
+			if (itMap != GEdgeGlobalAssociation.end()){
+				e2 = itMap->second;
+			}
+			//creation des GFace correspondantes
+			GEdge* firstE = SurroudingEdges.find(eTmp->getBeginVertex())->second;
+			GEdge* lastE = SurroudingEdges.find(eTmp->getEndVertex())->second;
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				e1->reverse();
+			}
+			if (firstE->getBeginVertex() != e1->getEndVertex()){
+				firstE->reverse();
+			}
+			if (e2->getBeginVertex() != firstE->getEndVertex()){
+				e2->reverse();
+			}
+			if (lastE->getBeginVertex() != e2->getEndVertex()){
+				lastE->reverse();
+			}
+			std::vector<GEdge*> VecEdgesTmp;
+			VecEdgesTmp.push_back(e1);
+			VecEdgesTmp.push_back(firstE);
+			VecEdgesTmp.push_back(e2);
+			VecEdgesTmp.push_back(lastE);
+			std::vector<std::vector<GEdge*> > VecOfVecTmp;
+			VecOfVecTmp.push_back(VecEdgesTmp);
+			GFace* newFaceTmp = m->addPlanarFace(VecOfVecTmp);
+			SurroundingsFaces.push_back(newFaceTmp);
+		}
+		std::vector<GFace*> VectorFaces;
+		std::list<GFace*> listFaces;
+		GFace* f1;
+		GFace* f2;
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f1 = itMap->second;
+		}
+		itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg2));
+		if (itMap != GFaceGlobalAssociation.end()){
+			f2 = itMap->second;
+		}
+		VectorFaces.push_back(f1);
+		listFaces.push_back(f1);
+		for (unsigned int i = 0;i < SurroundingsFaces.size();i++){
+			VectorFaces.push_back(SurroundingsFaces[i]);
+			listFaces.push_back(SurroundingsFaces[i]);
+		}
+		VectorFaces.push_back(f2);
+		listFaces.push_back(f2);
+		std::vector<std::vector<GFace*> > VecOfVecGFace;
+		VecOfVecGFace.push_back(VectorFaces);
+		//creation de la nouvelle region
+		GRegion* createdRegion = new GRegion(m,counterNbDone);
+		createdRegion->addPhysicalEntity(PhysicalInterface);
+		createdRegion->set(listFaces);
+		m->add(createdRegion);
+		for (unsigned int i = 0; i < fTmp->getNumMeshElements();i++){
+			MElement* elem = fTmp->getMeshElement(i);
+			MVertex* v1=0;
+			MVertex* v2=0;
+			MVertex* v3=0;
+			MVertex* v4=0;
+			MVertex* v5=0;
+			MVertex* v6=0;
+			std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v1 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v2 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg1));
+			if (itMap != VertexGlobalAssociation.end()){
+				v3 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(0),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v4 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(1),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v5 = itMap->second;
+			}
+			itMap = VertexGlobalAssociation.find(std::make_pair(elem->getVertex(2),reg2));
+			if (itMap != VertexGlobalAssociation.end()){
+				v6 = itMap->second;
+			}
+//			std::cout<<"creation de prisme "<<counterNbDone<<std::endl;
+			MPrism *newPri = new MPrism(v1,v2,v3,v4,v5,v6);
+//			std::cout<<"addition de prisme "<<counterNbDone<<std::endl;
+
+			createdRegion->addPrism(newPri);
+//			std::cout<<"fin de for"<<std::endl;
+		}
+		std::cout<<"apres region, refonte points "<<counterNbDone<<std::endl;
+		for (unsigned int i = 0; i < reg1->getNumMeshElements();i++){
+			MElement* elem = reg1->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg1));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+		for (unsigned int i = 0; i < reg2->getNumMeshElements();i++){
+			MElement* elem = reg2->getMeshElement(i);
+			for (int j = 0;j < elem->getNumVertices();j++){
+				MVertex* vert = elem->getVertex(j);
+				std::map<std::pair<MVertex*,GRegion*>,MVertex* >::iterator itMap = VertexGlobalAssociation.find(std::make_pair(vert,reg2));
+				if (itMap != VertexGlobalAssociation.end()){
+//					std::cout<<"on va changer un point"<<std::endl;
+					elem->setVertex(j,itMap->second);
+//					std::cout<<"on a introduit "<<itMap->second->getNum()<<std::endl;
+//					std::cout<<"maintenant elem j "<<elem->getVertex(j)->getNum()<<std::endl;
+//					std::cout<<"youpi"<<std::endl;
+				}
+			}
+		}
+	}
+	std::cout<<"interior faces done"<<std::endl;
+
+	for (std::set<GFace*>::iterator itf = ToDuplicateListBoundary.begin();itf != ToDuplicateListBoundary.end();itf++){
+		GFace* fTmp = (*itf);
+		GRegion* reg1 = fTmp->getRegion(0);
+		std::map<std::pair<GFace*,GRegion*>,GFace* >::iterator itMap = GFaceGlobalAssociation.find(std::make_pair(fTmp,reg1));
+		GFace* f1 = itMap->second;
+		f1->addPhysicalEntity(PhysicalBoundary);
+	}
+
+
+	std::cout<<"End of DuplicateBoundaries"<<std::endl;
+	return view;
+}
+
+PView *GMSH_DuplicateBoundariesPlugin::ComputeBestSeeds(PView *view)
+{
+	std::cout<<"starting DuplicateBoundaries"<<std::endl;
+	GModel *m = GModel::current();
+	m->setFactory("geo");
+	return view;
+}
+
diff --git a/Plugin/DuplicateBoundaries.h b/Plugin/DuplicateBoundaries.h
new file mode 100644
index 0000000..ac4dbc6
--- /dev/null
+++ b/Plugin/DuplicateBoundaries.h
@@ -0,0 +1,39 @@
+// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _DUPLICATEBOUNDARIES_H_
+#define _DUPLICATEBOUNDARIES_H_
+
+#include "Plugin.h"
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterDuplicateBoundariesPlugin();
+}
+
+class GMSH_DuplicateBoundariesPlugin : public GMSH_PostPlugin
+{
+ public:
+  GMSH_DuplicateBoundariesPlugin(){}
+  std::string getName() const { return "DuplicateBoundaries"; }
+  std::string getShortHelp() const
+  {
+    return "Duplicate Boundaries";
+  }
+  std::string getHelp() const;
+  int getNbOptions() const;
+  StringXNumber* getOption(int iopt);
+  double abs(double x);
+  PView *execute(PView *);
+  PView *execute2D(PView *);
+  PView *execute2DWithBound(PView *);
+  PView *executeDuplicate(PView *);
+  PView *executeBis(PView *);
+  PView *executeTer(PView *);
+  PView *executeFourth(PView *);
+  PView *ComputeBestSeeds(PView *);
+};
+
+#endif
diff --git a/Plugin/Eigenvalues.cpp b/Plugin/Eigenvalues.cpp
index 7e6324d..7f76311 100644
--- a/Plugin/Eigenvalues.cpp
+++ b/Plugin/Eigenvalues.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Eigenvalues.h b/Plugin/Eigenvalues.h
index 4579e5b..fdbb11c 100644
--- a/Plugin/Eigenvalues.h
+++ b/Plugin/Eigenvalues.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Eigenvectors.cpp b/Plugin/Eigenvectors.cpp
index 32f6a32..696e917 100644
--- a/Plugin/Eigenvectors.cpp
+++ b/Plugin/Eigenvectors.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Eigenvectors.h b/Plugin/Eigenvectors.h
index 75ac0ce..80cda03 100644
--- a/Plugin/Eigenvectors.h
+++ b/Plugin/Eigenvectors.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ExtractEdges.cpp b/Plugin/ExtractEdges.cpp
index 48b2254..55a8dfd 100644
--- a/Plugin/ExtractEdges.cpp
+++ b/Plugin/ExtractEdges.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ExtractEdges.h b/Plugin/ExtractEdges.h
index 88f1bc7..5f4a31f 100644
--- a/Plugin/ExtractEdges.h
+++ b/Plugin/ExtractEdges.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ExtractElements.cpp b/Plugin/ExtractElements.cpp
index 6fcca36..e4ea3b6 100644
--- a/Plugin/ExtractElements.cpp
+++ b/Plugin/ExtractElements.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ExtractElements.h b/Plugin/ExtractElements.h
index 5d76617..8aff54e 100644
--- a/Plugin/ExtractElements.h
+++ b/Plugin/ExtractElements.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/FaultZone.cpp b/Plugin/FaultZone.cpp
index 4b13c72..e42e251 100644
--- a/Plugin/FaultZone.cpp
+++ b/Plugin/FaultZone.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -40,18 +40,21 @@ extern "C"
 
 std::string GMSH_FaultZonePlugin::getHelp() const
 {
-  return "Plugin(FaultZone) convert all the embedded lines of an existing surfacic mesh to flat quadrangles. "
-         "Flat quadrangles represent joint elements suitable to model a fault zone with Code_Aster."
-         "\n\n"
-         "`SurfaceTag' must be an existing plane surface containing embedded lines. "
-         "Embedded lines must have been added to the surface via the command Line In Surface. "
-         "The surface must be meshed with quadratic incomplete elements."
-         "\n\n"
-         "`Thickness' is the thichness of the flat quadrangles. "
-         "Set a value different to zero can be helpfull to check the connectivity. "
-         "\n\n"
-         "`Prefix' is the prefix of the name of physicals containing the new embedded. "
-         "All physicals containing embedded lines are replaced by physicals containing the coresponding joint elements.";
+  return "Plugin(FaultZone) convert all the embedded lines of an existing "
+    "surfacic mesh to flat quadrangles. Flat quadrangles represent joint "
+    "elements suitable to model a fault zone with Code_Aster."
+    "\n\n"
+    "`SurfaceTag' must be an existing plane surface containing embedded "
+    "lines. Embedded lines must have been added to the surface via the "
+    "command Line In Surface. "
+    "The surface must be meshed with quadratic incomplete elements."
+    "\n\n"
+    "`Thickness' is the thichness of the flat quadrangles. "
+    "Set a value different to zero can be helpfull to check the connectivity. "
+    "\n\n"
+    "`Prefix' is the prefix of the name of physicals containing the new embedded. "
+    "All physicals containing embedded lines are replaced by physicals containing "
+    "the coresponding joint elements.";
 }
 
 int GMSH_FaultZonePlugin::getNbOptions() const
@@ -107,7 +110,8 @@ PView *GMSH_FaultZonePlugin::execute(PView *view)
     if ((*itl)->length() != 0) break;
   if (itl == embeddedEdges.end()){
     Msg::Error("No line to treat in this surface");
-    Msg::Error("The plugin FaultZone may have been already run for this surface. Reload your geometry");
+    Msg::Error("The plugin FaultZone may have been already run for this surface. "
+               "Reload your geometry");
     return view;
   }
 
@@ -180,7 +184,8 @@ void GMSH_FaultZoneMesher::RetriveFissuresInfos(GFace* gFace){
 
   // set with all the MVertex of the fissures
   std::set < MVertex* > allFissuresVertices;
-  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();itl != embeddedEdges.end(); ++itl){
+  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();
+      itl != embeddedEdges.end(); ++itl){
     GEdge *gEdge = *itl;
     for (unsigned int i = 0; i < gEdge->getNumMeshVertices(); i++){
       allFissuresVertices.insert(gEdge->getMeshVertex(i));
@@ -219,7 +224,8 @@ void GMSH_FaultZoneMesher::RetriveFissuresInfos(GFace* gFace){
     }
   }
 
-  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();itl != embeddedEdges.end(); ++itl){
+  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();
+      itl != embeddedEdges.end(); ++itl){
     GEdge *gEdge = *itl;
     if (gEdge->length() == 0)// nothing to do if there is no element
       continue;
@@ -237,7 +243,7 @@ void GMSH_FaultZoneMesher::RetriveFissuresInfos(GFace* gFace){
     vectTanBegin.normalize();
     vectTanEnd.normalize();
     double norm = vectNorm.normalize();
-    assert(norm);
+    if(!norm) Msg::Error("norm == 0 in Plugin(FaultZone)");
 
     // fill _jointElements and _fissureByHeavNode
     for(unsigned int i = 0; i < gEdge->getNumMeshElements(); i++){
@@ -258,9 +264,11 @@ void GMSH_FaultZoneMesher::RetriveFissuresInfos(GFace* gFace){
       }
 
       // the MElements are considered connected if the quadratic node is connected
-      std::set < MVertex* >::iterator its2 = allConnectedQuadraticVertices.find( mElem->getVertex(2) );
+      std::set < MVertex* >::iterator its2 = allConnectedQuadraticVertices.find
+        (mElem->getVertex(2));
       if (its2 == allConnectedQuadraticVertices.end()){
-        Msg::Warning("Element edge %d seams to be not connected, it will be ignored", mElem->getNum());
+        Msg::Warning("Element edge %d seams to be not connected, it will be ignored",
+                     mElem->getNum());
         continue;
       }
 
@@ -319,7 +327,8 @@ const double GMSH_FaultZoneMesher::tolerance = 1.e-12;
 void GMSH_FaultZoneMesher::DuplicateNodes(){
 
   // fill _nodeJointByHeavOrJunctionNode and _nodesByJunctionNode
-  for(std::map<MVertex*,std::vector<GEdge*> >::iterator itm=_fissuresByJunctionNode.begin();itm != _fissuresByJunctionNode.end();){
+  for(std::map<MVertex*,std::vector<GEdge*> >::iterator itm =
+        _fissuresByJunctionNode.begin();itm != _fissuresByJunctionNode.end();){
     MVertex *mVert = itm->first;
     std::vector < GEdge* > fissures = itm->second;
 
@@ -346,7 +355,8 @@ void GMSH_FaultZoneMesher::DuplicateNodes(){
   }
 
   // fill _nodeJointByHeavOrJunctionNode and _nodeByHeavNode
-  for(std::map<MVertex*,GEdge*>::iterator itm=_fissureByHeavNode.begin();itm != _fissureByHeavNode.end(); itm++){
+  for(std::map<MVertex*,GEdge*>::iterator itm=_fissureByHeavNode.begin();
+      itm != _fissureByHeavNode.end(); itm++){
     MVertex *mVert = itm->first;
     if (mVert->getPolynomialOrder() == 1){
       MVertex *mVertJoint;
@@ -377,7 +387,8 @@ void GMSH_FaultZoneMesher::DuplicateNodes(){
 //================================================================================
 void GMSH_FaultZoneMesher::ComputeHeavisideFunction(){
 
-  for (std::map<MVertex*,std::vector<GEdge*> >::iterator itm = _fissuresByJunctionNode.begin(); itm != _fissuresByJunctionNode.end(); itm++){
+  for (std::map<MVertex*,std::vector<GEdge*> >::iterator itm =
+         _fissuresByJunctionNode.begin(); itm != _fissuresByJunctionNode.end(); itm++){
     MVertex *mVert = itm->first;
     std::vector < GEdge* > fissures = itm->second;
     unsigned int size = fissures.size();
@@ -411,7 +422,8 @@ void GMSH_FaultZoneMesher::ComputeHeavisideFunction(){
       if (!under) heav[i] = 1;
       if (under && !upper) heav[i] = -1;
 
-      // compute the heaviside functions of the precedent fissures for a point located on fissure i
+      // compute the heaviside functions of the precedent fissures for a point
+      // located on fissure i
       for (unsigned int j=0; j < i;j++){
         double lsn = -dot(vectsNor[j], vectsTan[i]);
         if (fabs(lsn) < tolerance){
@@ -437,7 +449,8 @@ void GMSH_FaultZoneMesher::ComputeHeavisideFunction(){
         heavFunc.insert(heavFunc.begin(), heav);
       }
       else{
-        // find the domain where the fissure i is and duplicates it with value -1 and +1 for the fissure i
+        // find the domain where the fissure i is and duplicates it with value
+        // -1 and +1 for the fissure i
         //
         //                                       Fissure1
         //                                       /
@@ -481,10 +494,11 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
 
   SVector3 vectPoint = SVector3(mVert->point(), sPoint);
   double norm = vectPoint.normalize();
-  assert(norm);
+  if(!norm) Msg::Error("norm == 0 in Plugin(FaultZone)");
 
   std::vector < int > heav;
-  if (_nodeByHeavNode.find( mVert ) != _nodeByHeavNode.end()){// if it is a pure heaviside node
+  if (_nodeByHeavNode.find( mVert ) != _nodeByHeavNode.end()){
+    // if it is a pure heaviside node
     SVector3 vectNorm = _vectNormByFissure[_fissureByHeavNode[mVert]];
     double lsn = dot(vectPoint, vectNorm);
     if (fabs(lsn) < tolerance){
@@ -496,7 +510,8 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
     }
     heav.push_back(sign(lsn));
   }
-  else if (_nodesByJunctionNode.find( mVert ) != _nodesByJunctionNode.end()){ // if it is a junction node
+  else if (_nodesByJunctionNode.find( mVert ) != _nodesByJunctionNode.end()){
+    // if it is a junction node
     std::vector < GEdge* > fissures = _fissuresByJunctionNode[mVert];
     unsigned int size = fissures.size();
     for (unsigned int i=0; i < size; i++){
@@ -525,12 +540,14 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
  * this function also replace physical edges containning the embedded edges by
  * new corresponding physical faces
  */
- //================================================================================
-void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std::string prefix){
+//================================================================================
+void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace,
+                                               std::string prefix){
 
   std::list< GEdge * > embeddedEdges = gFace->embeddedEdges();
   std::map < int , int > discreteFaceEntityByEmbeddedEdgeEntity;
-  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();itl != embeddedEdges.end(); ++itl){
+  for(std::list<GEdge*>::const_iterator itl = embeddedEdges.begin();
+      itl != embeddedEdges.end(); ++itl){
     GEdge *gEdge = *itl;
     if (gEdge->length() == 0)// nothing to do if there is no element
       continue;
@@ -554,7 +571,10 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
       SVector3 nor = _vectNormByFissure[gEdge];
       SVector3 tan = mElem->getEdge(0).tangent();
       int changeOri = (dot(crossprod(nor, tan), vectZ) > 0);
-      if (changeOri) Msg::Warning("Reverting local numbering node for element %d to set outgoing normal for its corresponding joint element",mElem->getNum());
+      if (changeOri)
+        Msg::Warning("Reverting local numbering node for element %d to set "
+                     "outgoing normal for its corresponding joint element",
+                     mElem->getNum());
       // retriving MVertices to create the new MElement
       for(int i = 0; i < mElem->getNumVertices(); i++){
         MVertex *mVert = mElem->getVertex(i);
@@ -595,7 +615,8 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
           mVerts[_numNodeHeavSup[j]] = nodes[findMatchingHeav(heavFunc, heav)];
         }
       }
-      // association of the MVertices (created in function DuplicateNodes) to the new GEntity (created here)
+      // association of the MVertices (created in function DuplicateNodes) to
+      // the new GEntity (created here)
       for(int j =0; j<8; j++){
         MVertex *mVert = mVerts[j];
         assert(mVert!= NULL);
@@ -623,7 +644,8 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
       for(int j = 0; j < List_Nbr(p->Entities); j++){
         int num;
         List_Read(p->Entities, j, &num);
-        std::map < int ,int >::iterator itm = discreteFaceEntityByEmbeddedEdgeEntity.find(num);
+        std::map < int ,int >::iterator itm =
+          discreteFaceEntityByEmbeddedEdgeEntity.find(num);
         if (itm != discreteFaceEntityByEmbeddedEdgeEntity.end()){
           List_Add(faceEntities, &itm->second);
         }
@@ -631,7 +653,8 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
       if (List_Nbr(faceEntities) > 0){
         std::stringstream sufix;
         sufix << p->Num;
-        int num = gModel->setPhysicalName(prefix+sufix.str(), 2, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
+        int num = gModel->setPhysicalName
+          (prefix+sufix.str(), 2, ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
         PhysicalGroup *pnew = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, faceEntities);
         List_Add(gModel->getGEOInternals()->PhysicalGroups, &pnew);
         for(int j = 0; j < List_Nbr(faceEntities); j++){
@@ -672,7 +695,7 @@ const int GMSH_FaultZoneMesher::_numNodeJoint[2]   = {7, 5};
  * and _nodesByJunctionNode maps. In case of _nodesByJunctionNode, the
  * _heavFuncByJunctionNode map is used to determinate the corresponding node.
  */
- //================================================================================
+//================================================================================
 void GMSH_FaultZoneMesher::ModifyElementsConnectivity(GFace* gFace){
 
   // modif connectivity in _connectedElements
@@ -683,7 +706,8 @@ void GMSH_FaultZoneMesher::ModifyElementsConnectivity(GFace* gFace){
     mElem->getVertices(mVerts);
     for (unsigned j = 0; j < mVerts.size(); j++){
       MVertex *mVert = mVerts[j];
-      if (_nodeByHeavNode.find( mVert ) == _nodeByHeavNode.end() && _nodesByJunctionNode.find( mVert ) == _nodesByJunctionNode.end())
+      if (_nodeByHeavNode.find( mVert ) == _nodeByHeavNode.end() &&
+          _nodesByJunctionNode.find( mVert ) == _nodesByJunctionNode.end())
         continue;
 
       std::vector < int > heav = HeavisideFunc(mVert, bary);
@@ -716,7 +740,8 @@ void GMSH_FaultZoneMesher::ModifyElementsConnectivity(GFace* gFace){
 void GMSH_FaultZoneMesher::ModifyJointNodePosition(double eps){
 
   // for pure heaviside nodes
-  for (std::map<MVertex*,MVertex*>::iterator itm = _nodeByHeavNode.begin(); itm != _nodeByHeavNode.end(); itm++){
+  for (std::map<MVertex*,MVertex*>::iterator itm = _nodeByHeavNode.begin();
+       itm != _nodeByHeavNode.end(); itm++){
     // under side
     MVertex *mVert = itm->first;
     SVector3 vectNorm = _vectNormByFissure[_fissureByHeavNode[mVert]];
@@ -733,7 +758,8 @@ void GMSH_FaultZoneMesher::ModifyJointNodePosition(double eps){
 
   // for junction nodes
   std::map < MVertex*, std::set < MElement* > > connectedElementsByJunctionNode;
-  for (std::map<MVertex*,std::vector<MVertex*> >::iterator itm = _nodesByJunctionNode.begin(); itm != _nodesByJunctionNode.end(); itm++){
+  for (std::map<MVertex*,std::vector<MVertex*> >::iterator itm =
+         _nodesByJunctionNode.begin(); itm != _nodesByJunctionNode.end(); itm++){
     std::vector < MVertex* > nodes = itm->second;
     for (unsigned int i=0; i< nodes.size(); i++){
       std::set < MElement* > mElements;
@@ -742,7 +768,8 @@ void GMSH_FaultZoneMesher::ModifyJointNodePosition(double eps){
   }
 
   std::map<MVertex*,std::set<MElement*> >::iterator itm;
-  for(elementsIt its = _connectedElements.begin();its != _connectedElements.end(); ++its){
+  for(elementsIt its = _connectedElements.begin();
+      its != _connectedElements.end(); ++its){
     MElement *mElem = *its;
     std::vector<MVertex*> mVerts;
     mElem->getVertices(mVerts);
@@ -754,14 +781,16 @@ void GMSH_FaultZoneMesher::ModifyJointNodePosition(double eps){
     }
   }
 
-  for (itm = connectedElementsByJunctionNode.begin(); itm != connectedElementsByJunctionNode.end(); itm++){
+  for (itm = connectedElementsByJunctionNode.begin();
+       itm != connectedElementsByJunctionNode.end(); itm++){
     MVertex *mVert = itm->first;
     SPoint3 point = mVert->point();
 
     std::set < MElement* > mElements = itm->second;
     assert(mElements.size() > 0);
     SVector3 vect = SVector3(0,0,0);
-    for (std::set < MElement* >::iterator its = mElements.begin(); its != mElements.end(); its++){
+    for (std::set < MElement* >::iterator its = mElements.begin();
+         its != mElements.end(); its++){
       MElement *mElem = *its;
       SPoint3 bary = mElem->barycenter();
       SVector3 vectPointBary = SVector3(point, bary)*fabs(mElem->getVolume());
diff --git a/Plugin/FaultZone.h b/Plugin/FaultZone.h
index 6af2840..f4cb9d3 100644
--- a/Plugin/FaultZone.h
+++ b/Plugin/FaultZone.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/FieldFromAmplitudePhase.cpp b/Plugin/FieldFromAmplitudePhase.cpp
index 2cfc266..a2609c2 100644
--- a/Plugin/FieldFromAmplitudePhase.cpp
+++ b/Plugin/FieldFromAmplitudePhase.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/FieldFromAmplitudePhase.h b/Plugin/FieldFromAmplitudePhase.h
index cc36e37..32a4a2f 100644
--- a/Plugin/FieldFromAmplitudePhase.h
+++ b/Plugin/FieldFromAmplitudePhase.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Gradient.cpp b/Plugin/Gradient.cpp
index 24f7e79..2f3dc38 100644
--- a/Plugin/Gradient.cpp
+++ b/Plugin/Gradient.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Gradient.h b/Plugin/Gradient.h
index 2615d87..560e1d2 100644
--- a/Plugin/Gradient.h
+++ b/Plugin/Gradient.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HarmonicToTime.cpp b/Plugin/HarmonicToTime.cpp
index 97cb4fd..e875fbb 100644
--- a/Plugin/HarmonicToTime.cpp
+++ b/Plugin/HarmonicToTime.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HarmonicToTime.h b/Plugin/HarmonicToTime.h
index d836c55..995efba 100644
--- a/Plugin/HarmonicToTime.h
+++ b/Plugin/HarmonicToTime.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HomologyComputation.cpp b/Plugin/HomologyComputation.cpp
index 44eb97d..01d8fe6 100644
--- a/Plugin/HomologyComputation.cpp
+++ b/Plugin/HomologyComputation.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HomologyComputation.h b/Plugin/HomologyComputation.h
index 0d38d73..57fa7d1 100644
--- a/Plugin/HomologyComputation.h
+++ b/Plugin/HomologyComputation.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HomologyPostProcessing.cpp b/Plugin/HomologyPostProcessing.cpp
index 656acc8..60485dc 100644
--- a/Plugin/HomologyPostProcessing.cpp
+++ b/Plugin/HomologyPostProcessing.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/HomologyPostProcessing.h b/Plugin/HomologyPostProcessing.h
index 6eb4ed1..31a7d74 100644
--- a/Plugin/HomologyPostProcessing.h
+++ b/Plugin/HomologyPostProcessing.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Integrate.cpp b/Plugin/Integrate.cpp
index be2f253..1065d28 100644
--- a/Plugin/Integrate.cpp
+++ b/Plugin/Integrate.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -10,7 +10,8 @@
 StringXNumber IntegrateOptions_Number[] = {
   {GMSH_FULLRC, "View", NULL, -1.},
   {GMSH_FULLRC, "OverTime", NULL, -1.},
-  {GMSH_FULLRC, "Dimension", NULL, -1.}
+  {GMSH_FULLRC, "Dimension", NULL, -1.},
+  {GMSH_FULLRC, "Visible", NULL, 1.}
 };
 
 extern "C"
@@ -30,8 +31,10 @@ std::string GMSH_IntegratePlugin::getHelp() const
     "the circulation/flux of the field over "
     "line/surface elements is calculated.\n\n"
     "If `View' < 0, the plugin is run on the current view.\n\n"
-    "If `OverTime' = 1 , the plugin integrates the scalar view "
-    "over time instead of over space.\n\n"
+    "If `OverTime' = i > -1 , the plugin integrates the scalar view "
+    "over time instead of over space, starting at iteration i."
+    "If `Visible' = 1, the plugin only integrates over"
+    "visible entities.\n\n"
     "Plugin(Integrate) creates one new view.";
 }
 
@@ -50,6 +53,7 @@ PView *GMSH_IntegratePlugin::execute(PView * v)
   int iView = (int)IntegrateOptions_Number[0].def;
   int overTime = (int)IntegrateOptions_Number[1].def;
   int dimension = (int)IntegrateOptions_Number[2].def;
+  bool visible = (bool)IntegrateOptions_Number[3].def;
 
   PView *v1 = getView(iView, v);
   if(!v1) return v;
@@ -69,8 +73,9 @@ PView *GMSH_IntegratePlugin::execute(PView * v)
       double res = 0, resv[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
       bool simpleSum = false;
       for(int ent = 0; ent < data1->getNumEntities(step); ent++){
+        if(visible && data1->skipEntity(step, ent)) continue;
 	for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){
-	  if(data1->skipElement(step, ent, ele)) continue;
+	  if(data1->skipElement(step, ent, ele, visible)) continue;
 	  int numComp = data1->getNumComponents(step, ent, ele);
 	  int numEdges = data1->getNumEdges(step, ent, ele);
 	  bool scalar = (numComp == 1);
@@ -134,7 +139,7 @@ PView *GMSH_IntegratePlugin::execute(PView * v)
 	int numNodes = data1->getNumNodes(timeBeg, ent, ele);
 	int type = data1->getType(timeBeg, ent, ele);
 	int numComp = data1->getNumComponents(timeBeg, ent, ele);
-	if (numComp != 1) Msg::Error("Can only integrate in time scalar views");
+	if (numComp != 1) Msg::Error("Can only integrate scalar views over time");
 	std::vector<double> *out = data2->incrementList(numComp, type, numNodes);
 	std::vector<double> x(numNodes), y(numNodes), z(numNodes);
 	for(int nod = 0; nod < numNodes; nod++)
@@ -143,9 +148,9 @@ PView *GMSH_IntegratePlugin::execute(PView * v)
 	for(int nod = 0; nod < numNodes; nod++) out->push_back(y[nod]);
 	for(int nod = 0; nod < numNodes; nod++) out->push_back(z[nod]);
 
-	double time = 0.0;
 	std::vector<double> timeIntegral(numNodes, 0.);
-	for(int step = timeBeg; step < timeEnd; step++){
+        double time = (overTime > 0) ? data1->getTime(timeBeg+overTime-1) : 0.0;
+	for(int step = timeBeg + overTime; step < timeEnd; step++){
 	  if(!data1->hasTimeStep(step)) continue;
 	  double newTime  = data1->getTime(step);
 	  double dt = newTime - time;
diff --git a/Plugin/Integrate.h b/Plugin/Integrate.h
index 10642fb..91ebc8e 100644
--- a/Plugin/Integrate.h
+++ b/Plugin/Integrate.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Isosurface.cpp b/Plugin/Isosurface.cpp
index 6cf4519..bb0606d 100644
--- a/Plugin/Isosurface.cpp
+++ b/Plugin/Isosurface.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Isosurface.h b/Plugin/Isosurface.h
index f5a8992..beee885 100644
--- a/Plugin/Isosurface.h
+++ b/Plugin/Isosurface.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Lambda2.cpp b/Plugin/Lambda2.cpp
index 9513497..7327d74 100644
--- a/Plugin/Lambda2.cpp
+++ b/Plugin/Lambda2.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Lambda2.h b/Plugin/Lambda2.h
index a910455..69c211a 100644
--- a/Plugin/Lambda2.h
+++ b/Plugin/Lambda2.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp
index 8036dac..a8c82c9 100644
--- a/Plugin/Levelset.cpp
+++ b/Plugin/Levelset.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -702,6 +702,50 @@ static bool recur_sign_change(adaptivePrism *t,
   }
 }
 
+static bool recur_sign_change(adaptivePyramid *t,
+                              const GMSH_LevelsetPlugin *plug)
+{
+  if (!t->e[0] || t->visible){
+    double v1 = plug->levelset(t->p[0]->X, t->p[0]->Y, t->p[0]->Z, t->p[0]->val);
+    double v2 = plug->levelset(t->p[1]->X, t->p[1]->Y, t->p[1]->Z, t->p[1]->val);
+    double v3 = plug->levelset(t->p[2]->X, t->p[2]->Y, t->p[2]->Z, t->p[2]->val);
+    double v4 = plug->levelset(t->p[3]->X, t->p[3]->Y, t->p[3]->Z, t->p[3]->val);
+    double v5 = plug->levelset(t->p[4]->X, t->p[4]->Y, t->p[4]->Z, t->p[4]->val);
+    if(v1 * v2 > 0 && v1 * v3 > 0 && v1 * v4 > 0 && v1 * v5 > 0)
+      t->visible = false;
+    else
+      t->visible = true;
+    return t->visible;
+  }
+  else{
+    bool sc1  = recur_sign_change(t->e[0], plug);
+    bool sc2  = recur_sign_change(t->e[1], plug);
+    bool sc3  = recur_sign_change(t->e[2], plug);
+    bool sc4  = recur_sign_change(t->e[3], plug);
+    bool sc5  = recur_sign_change(t->e[4], plug);
+    bool sc6  = recur_sign_change(t->e[5], plug);
+    bool sc7  = recur_sign_change(t->e[6], plug);
+    bool sc8  = recur_sign_change(t->e[7], plug);
+    bool sc9  = recur_sign_change(t->e[8], plug);
+    bool sc10 = recur_sign_change(t->e[9], plug);
+    if(sc1 || sc2 || sc3 || sc4 || sc5 || sc6 || sc7 || sc8 || sc9 || sc10){
+      if (!sc1)  t->e[0]->visible = true;
+      if (!sc2)  t->e[1]->visible = true;
+      if (!sc3)  t->e[2]->visible = true;
+      if (!sc4)  t->e[3]->visible = true;
+      if (!sc5)  t->e[4]->visible = true;
+      if (!sc6)  t->e[5]->visible = true;
+      if (!sc7)  t->e[6]->visible = true;
+      if (!sc8)  t->e[7]->visible = true;
+      if (!sc9)  t->e[8]->visible = true;
+      if (!sc10) t->e[9]->visible = true;
+      return true;
+    }
+    t->visible = false;
+    return false;
+  }
+}
+
 void GMSH_LevelsetPlugin::assignSpecificVisibility() const
 {
   if(adaptiveTriangle::all.size()){
@@ -724,4 +768,8 @@ void GMSH_LevelsetPlugin::assignSpecificVisibility() const
     adaptivePrism *p = *adaptivePrism::all.begin();
     if(!p->visible) p->visible = !recur_sign_change(p, this);
   }
+  if(adaptivePyramid::all.size()){
+    adaptivePyramid *p = *adaptivePyramid::all.begin();
+    if(!p->visible) p->visible = !recur_sign_change(p, this);
+  }
 }
diff --git a/Plugin/Levelset.h b/Plugin/Levelset.h
index d2fd86a..e2c738d 100644
--- a/Plugin/Levelset.h
+++ b/Plugin/Levelset.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/LongitudeLatitude.cpp b/Plugin/LongitudeLatitude.cpp
index a4864c9..1d97797 100644
--- a/Plugin/LongitudeLatitude.cpp
+++ b/Plugin/LongitudeLatitude.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "LongitudeLatitude.h"
 #include "OpenFile.h"
 
diff --git a/Plugin/LongitudeLatitude.h b/Plugin/LongitudeLatitude.h
index cb18d08..27c286b 100644
--- a/Plugin/LongitudeLatitude.h
+++ b/Plugin/LongitudeLatitude.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/MakeSimplex.cpp b/Plugin/MakeSimplex.cpp
index b778e9a..e750767 100644
--- a/Plugin/MakeSimplex.cpp
+++ b/Plugin/MakeSimplex.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/MakeSimplex.h b/Plugin/MakeSimplex.h
index 666285a..2117cc4 100644
--- a/Plugin/MakeSimplex.h
+++ b/Plugin/MakeSimplex.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/MathEval.cpp b/Plugin/MathEval.cpp
index 9c232aa..cba1de3 100644
--- a/Plugin/MathEval.cpp
+++ b/Plugin/MathEval.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/MathEval.h b/Plugin/MathEval.h
index c03f21e..a326698 100644
--- a/Plugin/MathEval.h
+++ b/Plugin/MathEval.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/MeshSubEntities.cpp b/Plugin/MeshSubEntities.cpp
new file mode 100644
index 0000000..a8d4bee
--- /dev/null
+++ b/Plugin/MeshSubEntities.cpp
@@ -0,0 +1,151 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#include "MeshSubEntities.h"
+#include "GModel.h"
+#include "discreteVertex.h"
+#include "discreteEdge.h"
+#include "discreteFace.h"
+#include "MElement.h"
+#include "MPoint.h"
+#include "MLine.h"
+#include "MTriangle.h"
+#include "MQuadrangle.h"
+#include "MEdge.h"
+#include "MFace.h"
+#include "Context.h"
+
+StringXNumber MeshSubEntitiesOptions_Number[] = {
+  {GMSH_FULLRC, "InputDimension", NULL, 1.},
+  {GMSH_FULLRC, "InputPhysicalGroup", NULL, 1.},
+  {GMSH_FULLRC, "OuputDimension", NULL, 0.},
+  {GMSH_FULLRC, "OuputPhysicalGroup", NULL, 2000.},
+};
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterMeshSubEntitiesPlugin()
+  {
+    return new GMSH_MeshSubEntitiesPlugin();
+  }
+}
+
+std::string GMSH_MeshSubEntitiesPlugin::getHelp() const
+{
+  return "Plugin(MeshSubEntities) creates mesh elements for the "
+    "entities of dimension `OutputDimension' (0 for vertices, "
+    "1 for edges, 2 for faces) of the `InputPhysicalGroup' of "
+    "dimension `InputDimension'. The plugin creates new elements "
+    "belonging to `OutputPhysicalGroup'.";
+}
+
+int GMSH_MeshSubEntitiesPlugin::getNbOptions() const
+{
+  return sizeof(MeshSubEntitiesOptions_Number) / sizeof(StringXNumber);
+}
+
+StringXNumber *GMSH_MeshSubEntitiesPlugin::getOption(int iopt)
+{
+  return &MeshSubEntitiesOptions_Number[iopt];
+}
+
+PView *GMSH_MeshSubEntitiesPlugin::execute(PView *view)
+{
+  int inputdim = (int)MeshSubEntitiesOptions_Number[0].def;
+  int inputphysical = (int)MeshSubEntitiesOptions_Number[1].def;
+  int outputdim = (int)MeshSubEntitiesOptions_Number[2].def;
+  int outphysical = (int)MeshSubEntitiesOptions_Number[3].def;
+
+  if(inputdim < 0 || inputdim > 3 || outputdim < 0 || outputdim > 3 ||
+     outputdim > inputdim){
+    Msg::Error("Bad dimensions");
+    return view;
+  }
+
+  GModel *m = GModel::current();
+  std::map<int, std::vector<GEntity*> > groups;
+  m->getPhysicalGroups(inputdim, groups);
+  std::vector<GEntity*> entities = groups[inputphysical];
+
+  if(entities.empty()){
+    Msg::Error("Physical group %d (dimension %d) is empty", inputphysical, inputdim);
+    return view;
+  }
+
+  // get input elements
+  std::vector<MElement*> elements;
+  for(unsigned int i = 0; i < entities.size(); i++)
+    for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++)
+      elements.push_back(entities[i]->getMeshElement(j));
+
+  if(outputdim == 0){ // create point elements for mesh vertices
+    std::set<MVertex*> vertices;
+    for(unsigned int i = 0; i < elements.size(); i++){
+      for(int j = 0; j < elements[i]->getNumVertices(); j++){
+        MVertex *v = elements[i]->getVertex(j);
+        vertices.insert(v);
+      }
+    }
+    for(std::set<MVertex*>::const_iterator it = vertices.begin();
+        it != vertices.end(); ++it){
+      MVertex *v = *it;
+      GVertex *gv = 0;
+      if(v->onWhat() && v->onWhat()->dim() == 0){
+        gv = (GVertex*)v->onWhat();
+      }
+      else{
+        gv = new discreteVertex(m, m->getMaxElementaryNumber(0) + 1);
+        v->setEntity(gv);
+        m->add(gv);
+      }
+      gv->physicals.push_back(outphysical);
+      if(gv->points.empty())
+        gv->points.push_back(new MPoint(v));
+    }
+    m->pruneMeshVertexAssociations();
+  }
+  else if(outputdim == 1){ // create line elements for mesh edges
+    std::set<MEdge, Less_Edge> edges;
+    for(unsigned int i = 0; i < elements.size(); i++){
+      for(int j = 0; j < elements[i]->getNumEdges(); j++){
+        MEdge e = elements[i]->getEdge(j);
+        edges.insert(e);
+      }
+    }
+    for(std::set<MEdge, Less_Edge>::const_iterator it = edges.begin();
+        it != edges.end(); ++it){
+      const MEdge &e = *it;
+      GEdge *ge = 0;
+      MVertex *v0 = e.getVertex(0), *v1 = e.getVertex(1);
+      if(v0->onWhat() && v1->onWhat()){
+        if(v0->onWhat()->dim() == 1 &&
+           ((v1->onWhat()->dim() == 1 && v0->onWhat() == v1->onWhat()) ||
+             v1->onWhat()->dim() == 0))
+          ge = (GEdge*)v0->onWhat();
+        else if(v1->onWhat()->dim() == 1 &&
+                ((v0->onWhat()->dim() == 1 && v0->onWhat() == v1->onWhat()) ||
+                  v0->onWhat()->dim() == 0))
+          ge = (GEdge*)v1->onWhat();
+      }
+      if(!ge){
+        ge = new discreteEdge(m, m->getMaxElementaryNumber(1) + 1, 0, 0);
+        v0->setEntity(ge);
+        v1->setEntity(ge);
+        m->add(ge);
+      }
+      ge->physicals.push_back(outphysical);
+      if(ge->lines.empty())
+        ge->lines.push_back(new MLine(v0, v1));
+    }
+  }
+  else{
+    Msg::Error("Plugin(MeshSubEntities) not coded yet for output dim %d",
+               outputdim);
+  }
+
+  CTX::instance()->mesh.changed = ENT_ALL;
+
+  return view;
+}
diff --git a/Plugin/MeshSubEntities.h b/Plugin/MeshSubEntities.h
new file mode 100644
index 0000000..5ad8482
--- /dev/null
+++ b/Plugin/MeshSubEntities.h
@@ -0,0 +1,31 @@
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+#ifndef _MESH_ENTITIES_H_
+#define _MESH_ENTITIES_H_
+
+#include "Plugin.h"
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterMeshSubEntitiesPlugin();
+}
+
+class GMSH_MeshSubEntitiesPlugin : public GMSH_PostPlugin
+{
+ public:
+  GMSH_MeshSubEntitiesPlugin(){}
+  std::string getName() const { return "MeshSubEntities"; }
+  std::string getShortHelp() const
+  {
+    return "Mesh subentities generator";
+  }
+  std::string getHelp() const;
+  int getNbOptions() const;
+  StringXNumber* getOption(int iopt);
+  PView *execute(PView *);
+};
+
+#endif
diff --git a/Plugin/MinMax.cpp b/Plugin/MinMax.cpp
index 3b0c060..4517989 100644
--- a/Plugin/MinMax.cpp
+++ b/Plugin/MinMax.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,7 +9,8 @@
 StringXNumber MinMaxOptions_Number[] = {
   {GMSH_FULLRC, "View", NULL, -1.},
   {GMSH_FULLRC, "OverTime", NULL, 0},
-  {GMSH_FULLRC, "Argument", NULL, 0}
+  {GMSH_FULLRC, "Argument", NULL, 0},
+  {GMSH_FULLRC, "Visible", NULL, 1}
 };
 
 extern "C"
@@ -23,9 +24,11 @@ extern "C"
 std::string GMSH_MinMaxPlugin::getHelp() const
 {
   return "Plugin(MinMax) computes the min/max of a view.\n\n"
-    "If `View' < 0, the plugin is run on the current view.\n\n"
-    "If `OverTime' = 1, calculates the min/max over space AND time\n\n"
-    "If `Argument' = 1, calculates the min/max AND the argmin/argmax\n\n"
+    "If `View' < 0, the plugin is run on the current view. "
+    "If `OverTime' = 1, the plugin calculates the min/max over "
+    "space and time. If `Argument' = 1, the plugin calculates the "
+    "min/max and the argmin/argmax. If `Visible' = 1, the plugin "
+    "is only applied to visible entities.\n\n"
     "Plugin(MinMax) creates two new views.";
 }
 
@@ -44,6 +47,7 @@ PView *GMSH_MinMaxPlugin::execute(PView * v)
   int iView = (int)MinMaxOptions_Number[0].def;
   int overTime = (int)MinMaxOptions_Number[1].def;
   int argument = (int)MinMaxOptions_Number[2].def;
+  bool visible = (bool)MinMaxOptions_Number[3].def;
 
   PView *v1 = getView(iView, v);
   if(!v1) return v;
@@ -64,15 +68,16 @@ PView *GMSH_MinMaxPlugin::execute(PView * v)
     dataMax->NbSP = 1;
   }
 
-  double min=VAL_INF, max=-VAL_INF, timeMin=0, timeMax=0;
+  double min = VAL_INF, max = -VAL_INF, timeMin = 0, timeMax = 0;
 
   for(int step = 0; step < data1->getNumTimeSteps(); step++){
     if(data1->hasTimeStep(step)){
-
       double minView = VAL_INF, maxView = -VAL_INF;
       double xmin = 0., ymin = 0., zmin = 0., xmax = 0., ymax = 0., zmax = 0.;
       for(int ent = 0; ent < data1->getNumEntities(step); ent++){
+        if(visible && data1->skipEntity(step, ent)) continue;
 	for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){
+	  if(data1->skipElement(step, ent, ele, visible)) continue;
 	  for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){
 	    double val;
 	    data1->getScalarValue(step, ent, ele, nod, val);
diff --git a/Plugin/MinMax.h b/Plugin/MinMax.h
index 50dce4a..6738e60 100644
--- a/Plugin/MinMax.h
+++ b/Plugin/MinMax.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ModifyComponent.cpp b/Plugin/ModifyComponent.cpp
index 3802181..6ade12f 100644
--- a/Plugin/ModifyComponent.cpp
+++ b/Plugin/ModifyComponent.cpp
@@ -1,9 +1,10 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <vector>
+#include <algorithm>
 #include "GmshConfig.h"
 #include "ModifyComponent.h"
 #include "OctreePost.h"
diff --git a/Plugin/ModifyComponent.h b/Plugin/ModifyComponent.h
index 2cd4119..b24a338 100644
--- a/Plugin/ModifyComponent.h
+++ b/Plugin/ModifyComponent.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ModulusPhase.cpp b/Plugin/ModulusPhase.cpp
index 8921953..3b0bc01 100644
--- a/Plugin/ModulusPhase.cpp
+++ b/Plugin/ModulusPhase.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/ModulusPhase.h b/Plugin/ModulusPhase.h
index f943602..d644a94 100644
--- a/Plugin/ModulusPhase.h
+++ b/Plugin/ModulusPhase.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NearToFarField.cpp b/Plugin/NearToFarField.cpp
index efa2e30..e2f03d4 100644
--- a/Plugin/NearToFarField.cpp
+++ b/Plugin/NearToFarField.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NearToFarField.h b/Plugin/NearToFarField.h
index 3c2fd81..58af059 100644
--- a/Plugin/NearToFarField.h
+++ b/Plugin/NearToFarField.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NearestNeighbor.cpp b/Plugin/NearestNeighbor.cpp
index 904bdff..ad87031 100644
--- a/Plugin/NearestNeighbor.cpp
+++ b/Plugin/NearestNeighbor.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NearestNeighbor.h b/Plugin/NearestNeighbor.h
index e7f6bb5..f461ba6 100644
--- a/Plugin/NearestNeighbor.h
+++ b/Plugin/NearestNeighbor.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NewView.cpp b/Plugin/NewView.cpp
index 05405a8..628c3ef 100644
--- a/Plugin/NewView.cpp
+++ b/Plugin/NewView.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/NewView.h b/Plugin/NewView.h
index 6490cb7..5f437bf 100644
--- a/Plugin/NewView.h
+++ b/Plugin/NewView.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Particles.cpp b/Plugin/Particles.cpp
index 3529007..38dc79f 100644
--- a/Plugin/Particles.cpp
+++ b/Plugin/Particles.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Particles.h b/Plugin/Particles.h
index 9b38532..a3b185c 100644
--- a/Plugin/Particles.h
+++ b/Plugin/Particles.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp
index afcfe69..c717afa 100644
--- a/Plugin/Plugin.cpp
+++ b/Plugin/Plugin.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Plugin.h b/Plugin/Plugin.h
index 5d328f8..c716565 100644
--- a/Plugin/Plugin.h
+++ b/Plugin/Plugin.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/PluginManager.cpp b/Plugin/PluginManager.cpp
index bf4593b..b9e2508 100644
--- a/Plugin/PluginManager.cpp
+++ b/Plugin/PluginManager.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -25,6 +25,7 @@
 #include "ExtractElements.h"
 #include "SimplePartition.h"
 #include "Crack.h"
+#include "DuplicateBoundaries.h"
 #include "HarmonicToTime.h"
 #include "ModulusPhase.h"
 #include "Integrate.h"
@@ -61,6 +62,7 @@
 #include "CutMesh.h"
 #include "NewView.h"
 #include "FaultZone.h"
+#include "MeshSubEntities.h"
 
 // for testing purposes only :-)
 #undef HAVE_DLOPEN
@@ -183,10 +185,8 @@ void PluginManager::registerDefaultPlugins()
                       ("Skin", GMSH_RegisterSkinPlugin()));
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
                       ("MathEval", GMSH_RegisterMathEvalPlugin()));
-# if 1 // experimental (Amaury)
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
                       ("AnalyseCurvedMesh", GMSH_RegisterAnalyseCurvedMeshPlugin()));
-#endif
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
                       ("CurvedBndDist", GMSH_RegisterCurvedBndDistPlugin()));
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
@@ -257,6 +257,10 @@ void PluginManager::registerDefaultPlugins()
                       ("Crack", GMSH_RegisterCrackPlugin()));
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
                       ("FaultZone", GMSH_RegisterFaultZonePlugin()));
+    allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
+                      ("DuplicateBoundaries", GMSH_RegisterDuplicateBoundariesPlugin()));
+    allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
+                      ("MeshSubEntities", GMSH_RegisterMeshSubEntitiesPlugin()));
 #if defined(HAVE_TETGEN)
     allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
                       ("Tetrahedralize", GMSH_RegisterTetrahedralizePlugin()));
diff --git a/Plugin/PluginManager.h b/Plugin/PluginManager.h
index 5817607..510ecc7 100644
--- a/Plugin/PluginManager.h
+++ b/Plugin/PluginManager.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp
index 39f5d7e..dde6cb3 100644
--- a/Plugin/Probe.cpp
+++ b/Plugin/Probe.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Probe.h b/Plugin/Probe.h
index baaf364..e8b73fe 100644
--- a/Plugin/Probe.h
+++ b/Plugin/Probe.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Remove.cpp b/Plugin/Remove.cpp
index 590b0ce..c3a0321 100644
--- a/Plugin/Remove.cpp
+++ b/Plugin/Remove.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Remove.h b/Plugin/Remove.h
index 5e6277c..2bba0fd 100644
--- a/Plugin/Remove.h
+++ b/Plugin/Remove.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Scal2Tens.cpp b/Plugin/Scal2Tens.cpp
index 408559a..28b6037 100644
--- a/Plugin/Scal2Tens.cpp
+++ b/Plugin/Scal2Tens.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Scal2Tens.h b/Plugin/Scal2Tens.h
index 41c9454..2950e55 100644
--- a/Plugin/Scal2Tens.h
+++ b/Plugin/Scal2Tens.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Scal2Vec.cpp b/Plugin/Scal2Vec.cpp
index 87a0bfd..64d203f 100644
--- a/Plugin/Scal2Vec.cpp
+++ b/Plugin/Scal2Vec.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Scal2Vec.h b/Plugin/Scal2Vec.h
index d83ee6c..de74739 100644
--- a/Plugin/Scal2Vec.h
+++ b/Plugin/Scal2Vec.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/SimplePartition.cpp b/Plugin/SimplePartition.cpp
index 2f393da..d9be890 100644
--- a/Plugin/SimplePartition.cpp
+++ b/Plugin/SimplePartition.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/SimplePartition.h b/Plugin/SimplePartition.h
index a5c7a1e..380dd60 100644
--- a/Plugin/SimplePartition.h
+++ b/Plugin/SimplePartition.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp
index 9c1e23f..72ef85c 100644
--- a/Plugin/Skin.cpp
+++ b/Plugin/Skin.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Skin.h b/Plugin/Skin.h
index 396f9e5..d3b65db 100644
--- a/Plugin/Skin.h
+++ b/Plugin/Skin.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp
index f64a7e4..9fc29c1 100644
--- a/Plugin/Smooth.cpp
+++ b/Plugin/Smooth.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Smooth.h b/Plugin/Smooth.h
index 7c2f33e..7b4a5d0 100644
--- a/Plugin/Smooth.h
+++ b/Plugin/Smooth.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/SphericalRaise.cpp b/Plugin/SphericalRaise.cpp
index 278a4c1..3ed870c 100644
--- a/Plugin/SphericalRaise.cpp
+++ b/Plugin/SphericalRaise.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/SphericalRaise.h b/Plugin/SphericalRaise.h
index ce6f9af..0f06875 100644
--- a/Plugin/SphericalRaise.h
+++ b/Plugin/SphericalRaise.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp
index 7c6f223..8659e52 100644
--- a/Plugin/StreamLines.cpp
+++ b/Plugin/StreamLines.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/StreamLines.h b/Plugin/StreamLines.h
index d0c0012..8154cc1 100644
--- a/Plugin/StreamLines.h
+++ b/Plugin/StreamLines.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Tetrahedralize.cpp b/Plugin/Tetrahedralize.cpp
index f26f57b..2be4879 100644
--- a/Plugin/Tetrahedralize.cpp
+++ b/Plugin/Tetrahedralize.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Tetrahedralize.h b/Plugin/Tetrahedralize.h
index 6e10ebd..a399cf4 100644
--- a/Plugin/Tetrahedralize.h
+++ b/Plugin/Tetrahedralize.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp
index 9c04be6..33ff1f1 100644
--- a/Plugin/Transform.cpp
+++ b/Plugin/Transform.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Transform.h b/Plugin/Transform.h
index 21c99f9..ba20c54 100644
--- a/Plugin/Transform.h
+++ b/Plugin/Transform.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp
index be24d3f..8d62fb5 100644
--- a/Plugin/Triangulate.cpp
+++ b/Plugin/Triangulate.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -19,6 +19,7 @@
 #endif
 
 StringXNumber TriangulateOptions_Number[] = {
+  {GMSH_FULLRC, "Algorithm", NULL, 0.},
   {GMSH_FULLRC, "View", NULL, -1.}
 };
 
@@ -35,7 +36,8 @@ std::string GMSH_TriangulatePlugin::getHelp() const
   return "Plugin(Triangulate) triangulates the points in the "
     "view `View', assuming that all the points belong "
     "to a surface that can be projected one-to-one "
-    "onto a plane.\n\n"
+    "onto a plane. Algorithm selects the old (0) or new (1) "
+    "meshing algorithm.\n\n"
     "If `View' < 0, the plugin is run on the current view.\n\n"
     "Plugin(Triangulate) creates one new view.";
 }
@@ -67,7 +69,8 @@ class PointData : public MVertex {
 
 PView *GMSH_TriangulatePlugin::execute(PView *v)
 {
-  int iView = (int)TriangulateOptions_Number[0].def;
+  int algo = (int)TriangulateOptions_Number[0].def;
+  int iView = (int)TriangulateOptions_Number[1].def;
 
   PView *v1 = getView(iView, v);
   if(!v1) return v;
@@ -123,110 +126,116 @@ PView *GMSH_TriangulatePlugin::execute(PView *v)
   }
   delete s;
 
-#if 0 // old code
-
-  // build a point record structure for the divide and conquer algorithm
-  DocRecord doc(points.size());
-  for(unsigned int i = 0; i < points.size(); i++){
-    double XX = CTX::instance()->mesh.randFactor * lc * (double)rand() / (double)RAND_MAX;
-    double YY = CTX::instance()->mesh.randFactor * lc * (double)rand() / (double)RAND_MAX;
-    doc.points[i].where.h = points[i]->x() + XX;
-    doc.points[i].where.v = points[i]->y() + YY;
-    doc.points[i].adjacent = NULL;
-    doc.points[i].data = (void*)points[i];
-  }
+  PView *v2;
+  PViewDataList *data2;
 
-  // triangulate
-  try{
-    doc.MakeMeshWithPoints();
-  }
-  catch(const char *err){
-    Msg::Error("%s", err);
-  }
+  if(algo == 0) {// using old code
 
-  // create output (using unperturbed data)
-  PView *v2 = new PView();
-  PViewDataList *data2 = getDataList(v2);
-  for(int i = 0; i < doc.numTriangles; i++){
-    int a = doc.triangles[i].a;
-    int b = doc.triangles[i].b;
-    int c = doc.triangles[i].c;
-    int n = doc.numPoints;
-    if(a < 0 || a >= n || b < 0 || b >= n || c < 0 || c >= n){
-      Msg::Warning("Skipping bad triangle %d", i);
-      continue;
+    // build a point record structure for the divide and conquer algorithm
+    DocRecord doc(points.size());
+    for(unsigned int i = 0; i < points.size(); i++){
+      double XX = CTX::instance()->mesh.randFactor * lc * (double)rand() / (double)RAND_MAX;
+      double YY = CTX::instance()->mesh.randFactor * lc * (double)rand() / (double)RAND_MAX;
+      doc.points[i].where.h = points[i]->x() + XX;
+      doc.points[i].where.v = points[i]->y() + YY;
+      doc.points[i].adjacent = NULL;
+      doc.points[i].data = (void*)points[i];
     }
-    PointData *p[3];
-    p[0] = (PointData*)doc.points[doc.triangles[i].a].data;
-    p[1] = (PointData*)doc.points[doc.triangles[i].b].data;
-    p[2] = (PointData*)doc.points[doc.triangles[i].c].data;
-    int numComp = 0;
-    std::vector<double> *vec = 0;
-    if((int)p[0]->v.size() == 3 + 9 * numSteps &&
-       (int)p[1]->v.size() == 3 + 9 * numSteps &&
-       (int)p[2]->v.size() == 3 + 9 * numSteps){
-      numComp = 9; data2->NbTT++; vec = &data2->TT;
+
+    // triangulate
+    try{
+      doc.MakeMeshWithPoints();
     }
-    else if((int)p[0]->v.size() == 3 + 3 * numSteps &&
-            (int)p[1]->v.size() == 3 + 3 * numSteps &&
-            (int)p[2]->v.size() == 3 + 3 * numSteps){
-      numComp = 3; data2->NbVT++; vec = &data2->VT;
+    catch(const char *err){
+      Msg::Error("%s", err);
     }
-    else{
-      numComp = 1; data2->NbST++; vec = &data2->ST;
+
+    // create output (using unperturbed data)
+    v2 = new PView();
+    data2 = getDataList(v2);
+    for(int i = 0; i < doc.numTriangles; i++){
+      int a = doc.triangles[i].a;
+      int b = doc.triangles[i].b;
+      int c = doc.triangles[i].c;
+      int n = doc.numPoints;
+      if(a < 0 || a >= n || b < 0 || b >= n || c < 0 || c >= n){
+        Msg::Warning("Skipping bad triangle %d", i);
+        continue;
+      }
+      PointData *p[3];
+      p[0] = (PointData*)doc.points[doc.triangles[i].a].data;
+      p[1] = (PointData*)doc.points[doc.triangles[i].b].data;
+      p[2] = (PointData*)doc.points[doc.triangles[i].c].data;
+      int numComp = 0;
+      std::vector<double> *vec = 0;
+      if((int)p[0]->v.size() == 3 + 9 * numSteps &&
+         (int)p[1]->v.size() == 3 + 9 * numSteps &&
+         (int)p[2]->v.size() == 3 + 9 * numSteps){
+        numComp = 9; data2->NbTT++; vec = &data2->TT;
+      }
+      else if((int)p[0]->v.size() == 3 + 3 * numSteps &&
+              (int)p[1]->v.size() == 3 + 3 * numSteps &&
+              (int)p[2]->v.size() == 3 + 3 * numSteps){
+        numComp = 3; data2->NbVT++; vec = &data2->VT;
+      }
+      else{
+        numComp = 1; data2->NbST++; vec = &data2->ST;
+      }
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[0]);
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[1]);
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[2]);
+      for(int step = 0; step < numSteps; step++)
+        for(int nod = 0; nod < 3; nod++)
+          for(int comp = 0; comp < numComp; comp++)
+            vec->push_back(p[nod]->v[3 + numComp * step + comp]);
     }
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[0]);
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[1]);
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[2]);
-    for(int step = 0; step < numSteps; step++)
-      for(int nod = 0; nod < 3; nod++)
-        for(int comp = 0; comp < numComp; comp++)
-          vec->push_back(p[nod]->v[3 + numComp * step + comp]);
-  }
 
-#else // new code
-  Msg::Info("Using new triangulation code");
-  std::vector<MTriangle*> tris;
-  for(unsigned int i = 0; i < points.size(); i++) {
-    double XX = 1.e-12 * lc * (double)rand() / (double)RAND_MAX;
-    double YY = 1.e-12 * lc * (double)rand() / (double)RAND_MAX;
-    points[i]->x() += XX;
-    points[i]->y() += YY;
   }
-  delaunayMeshIn2D(points, tris);
-
-  PView *v2 = new PView();
-  PViewDataList *data2 = getDataList(v2);
-  for(unsigned int i = 0; i < tris.size(); i++){
-    PointData *p[3];
-    p[0] = (PointData*)tris[i]->getVertex(0);
-    p[1] = (PointData*)tris[i]->getVertex(1);
-    p[2] = (PointData*)tris[i]->getVertex(2);
-    int numComp = 0;
-    std::vector<double> *vec = 0;
-    if((int)p[0]->v.size() == 3 + 9 * numSteps &&
-       (int)p[1]->v.size() == 3 + 9 * numSteps &&
-       (int)p[2]->v.size() == 3 + 9 * numSteps){
-      numComp = 9; data2->NbTT++; vec = &data2->TT;
-    }
-    else if((int)p[0]->v.size() == 3 + 3 * numSteps &&
-            (int)p[1]->v.size() == 3 + 3 * numSteps &&
-            (int)p[2]->v.size() == 3 + 3 * numSteps){
-      numComp = 3; data2->NbVT++; vec = &data2->VT;
+  else{ // new code
+
+    Msg::Info("Using new triangulation code");
+    std::vector<MTriangle*> tris;
+    for(unsigned int i = 0; i < points.size(); i++) {
+      double XX = 1.e-12 * lc * (double)rand() / (double)RAND_MAX;
+      double YY = 1.e-12 * lc * (double)rand() / (double)RAND_MAX;
+      points[i]->x() += XX;
+      points[i]->y() += YY;
     }
-    else{
-      numComp = 1; data2->NbST++; vec = &data2->ST;
+    delaunayMeshIn2D(points, tris);
+
+    v2 = new PView();
+    data2 = getDataList(v2);
+    for(unsigned int i = 0; i < tris.size(); i++){
+      PointData *p[3];
+      p[0] = (PointData*)tris[i]->getVertex(0);
+      p[1] = (PointData*)tris[i]->getVertex(1);
+      p[2] = (PointData*)tris[i]->getVertex(2);
+      int numComp = 0;
+      std::vector<double> *vec = 0;
+      if((int)p[0]->v.size() == 3 + 9 * numSteps &&
+         (int)p[1]->v.size() == 3 + 9 * numSteps &&
+         (int)p[2]->v.size() == 3 + 9 * numSteps){
+        numComp = 9; data2->NbTT++; vec = &data2->TT;
+      }
+      else if((int)p[0]->v.size() == 3 + 3 * numSteps &&
+              (int)p[1]->v.size() == 3 + 3 * numSteps &&
+              (int)p[2]->v.size() == 3 + 3 * numSteps){
+        numComp = 3; data2->NbVT++; vec = &data2->VT;
+      }
+      else{
+        numComp = 1; data2->NbST++; vec = &data2->ST;
+      }
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[0]);
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[1]);
+      for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[2]);
+      for(int step = 0; step < numSteps; step++)
+        for(int nod = 0; nod < 3; nod++)
+          for(int comp = 0; comp < numComp; comp++)
+            vec->push_back(p[nod]->v[3 + numComp * step + comp]);
+      delete tris[i];
     }
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[0]);
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[1]);
-    for(int nod = 0; nod < 3; nod++) vec->push_back(p[nod]->v[2]);
-    for(int step = 0; step < numSteps; step++)
-      for(int nod = 0; nod < 3; nod++)
-        for(int comp = 0; comp < numComp; comp++)
-          vec->push_back(p[nod]->v[3 + numComp * step + comp]);
-    delete tris[i];
+
   }
-#endif
 
   for(unsigned int i = 0; i < points.size(); i++)
     delete points[i];
diff --git a/Plugin/Triangulate.h b/Plugin/Triangulate.h
index 2cdd269..7b3f3b3 100644
--- a/Plugin/Triangulate.h
+++ b/Plugin/Triangulate.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Warp.cpp b/Plugin/Warp.cpp
index d2c2d73..0103686 100644
--- a/Plugin/Warp.cpp
+++ b/Plugin/Warp.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Plugin/Warp.h b/Plugin/Warp.h
index b945357..79cabd5 100644
--- a/Plugin/Warp.h
+++ b/Plugin/Warp.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/CMakeLists.txt b/Post/CMakeLists.txt
index 7c688dd..ca2a6d7 100644
--- a/Post/CMakeLists.txt
+++ b/Post/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/ColorTable.cpp b/Post/ColorTable.cpp
index 63b018b..9fb5719 100644
--- a/Post/ColorTable.cpp
+++ b/Post/ColorTable.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -13,6 +13,7 @@
 // and Andre Battaiola.
 
 #include <string.h>
+#include <algorithm>
 #include "GmshMessage.h"
 #include "ColorTable.h"
 #include "Context.h"
diff --git a/Post/ColorTable.h b/Post/ColorTable.h
index d842080..74ad157 100644
--- a/Post/ColorTable.h
+++ b/Post/ColorTable.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/OctreePost.cpp b/Post/OctreePost.cpp
index c05758c..90a9c16 100644
--- a/Post/OctreePost.cpp
+++ b/Post/OctreePost.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -424,7 +424,7 @@ static MElement *getElement(double P[3], GModel *m,
 
 bool OctreePost::_getValue(void *in, int dim, int nbNod, int nbComp,
                            double P[3], int step, double *values,
-                           double *elementSize)
+                           double *elementSize, bool grad)
 {
   if(!in) return false;
 
@@ -436,15 +436,28 @@ bool OctreePost::_getValue(void *in, int dim, int nbNod, int nbComp,
 
   e->xyz2uvw(P, U);
   if(step < 0){
-    for(int i = 0; i < _theViewDataList->getNumTimeSteps(); i++)
-      for(int j = 0; j < nbComp; j++)
-        values[nbComp * i + j] = e->interpolate(&V[nbNod * nbComp * i + j],
-                                                U[0], U[1], U[2], nbComp);
+    for(int i = 0; i < _theViewDataList->getNumTimeSteps(); i++){
+      for(int j = 0; j < nbComp; j++){
+        if(!grad){
+          values[nbComp * i + j] = e->interpolate(&V[nbNod * nbComp * i + j],
+                                                  U[0], U[1], U[2], nbComp);
+        }
+        else{
+          e->interpolateGrad(&V[nbNod * nbComp * i + j], U[0], U[1], U[2],
+                             &values[3 * (nbComp * i + j)], nbComp);
+        }
+      }
+    }
   }
   else{
-    for(int j = 0; j < nbComp; j++)
-      values[j] = e->interpolate(&V[nbNod * nbComp * step + j],
-                                 U[0], U[1], U[2], nbComp);
+    for(int j = 0; j < nbComp; j++){
+      if(!grad)
+        values[j] = e->interpolate(&V[nbNod * nbComp * step + j],
+                                   U[0], U[1], U[2], nbComp);
+      else
+        e->interpolateGrad(&V[nbNod * nbComp * step + j], U[0], U[1], U[2],
+                           &values[3 * j], nbComp);
+    }
   }
 
   if(elementSize) *elementSize = e->maxEdgeLength();
@@ -454,7 +467,7 @@ bool OctreePost::_getValue(void *in, int dim, int nbNod, int nbComp,
 }
 
 bool OctreePost::_getValue(void *in, int nbComp, double P[3], int timestep,
-                           double *values, double *elementSize)
+                           double *values, double *elementSize, bool grad)
 {
   if(!in) return false;
 
@@ -483,11 +496,21 @@ bool OctreePost::_getValue(void *in, int nbComp, double P[3], int timestep,
                                               nodeval[nod * nbComp + comp]);
       }
       for(int comp = 0; comp < nbComp; comp++){
-        double val = e->interpolate(&nodeval[comp], U[0], U[1], U[2], nbComp);
-        if(timestep < 0)
-          values[nbComp * step + comp] = val;
-        else
-          values[comp] = val;
+        if(!grad){
+          double val = e->interpolate(&nodeval[comp], U[0], U[1], U[2], nbComp);
+          if(timestep < 0)
+            values[nbComp * step + comp] = val;
+          else
+            values[comp] = val;
+        }
+        else{
+          if(timestep < 0)
+            e->interpolateGrad(&nodeval[comp], U[0], U[1], U[2],
+                               &values[3 * (nbComp * step + comp)], nbComp);
+          else
+            e->interpolateGrad(&nodeval[comp], U[0], U[1], U[2],
+                               &values[3 * comp], nbComp);
+        }
       }
     }
   }
@@ -498,44 +521,48 @@ bool OctreePost::_getValue(void *in, int nbComp, double P[3], int timestep,
 
 bool OctreePost::searchScalar(double x, double y, double z, double *values,
                               int step, double *size,
-                              int qn, double *qx, double *qy, double *qz)
+                              int qn, double *qx, double *qy, double *qz,
+                              bool grad)
 {
   double P[3] = {x, y, z};
+  int mult = grad ? 3 : 1;
 
   if(step < 0){
     int numSteps = 1;
     if(_theViewDataList) numSteps = _theViewDataList->getNumTimeSteps();
     else if(_theViewDataGModel) numSteps = _theViewDataGModel->getNumTimeSteps();
-    for(int i = 0; i < numSteps; i++){
-      values[i] = 0.0;
+    for(int i = 0; i < numSteps * mult; i++){
+      values[i] = 0.;
     }
   }
-  else
-    values[0] = 0.0;
+  else{
+    for(int i = 0; i < mult; i++)
+      values[i] = 0.;
+  }
 
   if(_theViewDataList){
     if(_getValue(getElement(P, _SS, 4, qn, qx, qy, qz),
-                 3, 4, 1, P, step, values, size)) return true;
+                 3, 4, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SH, 8, qn, qx, qy, qz),
-                 3, 8, 1, P, step, values, size)) return true;
+                 3, 8, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SI, 6, qn, qx, qy, qz),
-                 3, 6, 1, P, step, values, size)) return true;
+                 3, 6, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SY, 5, qn, qx, qy, qz),
-                 3, 5, 1, P, step, values, size)) return true;
+                 3, 5, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _ST, 3, qn, qx, qy, qz),
-                 2, 3, 1, P, step, values, size)) return true;
+                 2, 3, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SQ, 4, qn, qx, qy, qz),
-                 2, 4, 1, P, step, values, size)) return true;
+                 2, 4, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SL, 2, qn, qx, qy, qz),
-                 1, 2, 1, P, step, values, size)) return true;
+                 1, 2, 1, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _SPP, 1, qn, qx, qy, qz),
-                 0, 1, 1, P, step, values, size)) return true;
+                 0, 1, 1, P, step, values, size, grad)) return true;
   }
   else if(_theViewDataGModel){
     GModel *m = _theViewDataGModel->getModel((step < 0) ? 0 : step);
     if(m){
       if(_getValue(getElement(P, m, qn, qx, qy, qz),
-                   1, P, step, values, size)) return true;
+                   1, P, step, values, size, grad)) return true;
     }
   }
 
@@ -544,15 +571,16 @@ bool OctreePost::searchScalar(double x, double y, double z, double *values,
 
 bool OctreePost::searchScalarWithTol(double x, double y, double z, double *values,
                                      int step, double *size, double tol,
-                                     int qn, double *qx, double *qy, double *qz)
+                                     int qn, double *qx, double *qy, double *qz,
+                                     bool grad)
 {
-  bool a = searchScalar(x, y, z, values, step, size, qn, qx, qy, qz);
+  bool a = searchScalar(x, y, z, values, step, size, qn, qx, qy, qz, grad);
   if(!a && tol != 0.){
     double oldtol1 = element::getTolerance();
     double oldtol2 = MElement::getTolerance();
     element::setTolerance(tol);
     MElement::setTolerance(tol);
-    a = searchScalar(x, y, z, values, step, size, qn, qx, qy, qz);
+    a = searchScalar(x, y, z, values, step, size, qn, qx, qy, qz, grad);
     element::setTolerance(oldtol1);
     MElement::setTolerance(oldtol2);
   }
@@ -561,44 +589,47 @@ bool OctreePost::searchScalarWithTol(double x, double y, double z, double *value
 
 bool OctreePost::searchVector(double x, double y, double z, double *values,
                               int step, double *size,
-                              int qn, double *qx, double *qy, double *qz)
+                              int qn, double *qx, double *qy, double *qz,
+                              bool grad)
 {
   double P[3] = {x, y, z};
+  int mult = grad ? 3 : 1;
 
   if(step < 0){
     int numSteps = 1;
     if(_theViewDataList) numSteps = _theViewDataList->getNumTimeSteps();
     else if(_theViewDataGModel) numSteps = _theViewDataGModel->getNumTimeSteps();
-    for(int i = 0; i < 3 * numSteps; i++)
-      values[i] = 0.0;
+    for(int i = 0; i < 3 * numSteps * mult; i++)
+      values[i] = 0.;
+  }
+  else{
+    for(int i = 0; i < 3 * mult; i++)
+      values[i] = 0.;
   }
-  else
-    for(int i = 0; i < 3; i++)
-      values[i] = 0.0;
 
   if(_theViewDataList){
     if(_getValue(getElement(P, _VS, 4, qn, qx, qy, qz),
-                 3, 4, 3, P, step, values, size)) return true;
+                 3, 4, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VH, 8, qn, qx, qy, qz),
-                 3, 8, 3, P, step, values, size)) return true;
+                 3, 8, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VI, 6, qn, qx, qy, qz),
-                 3, 6, 3, P, step, values, size)) return true;
+                 3, 6, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VY, 5, qn, qx, qy, qz),
-                 3, 5, 3, P, step, values, size)) return true;
+                 3, 5, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VT, 3, qn, qx, qy, qz),
-                 2, 3, 3, P, step, values, size)) return true;
+                 2, 3, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VQ, 4, qn, qx, qy, qz),
-                 2, 4, 3, P, step, values, size)) return true;
+                 2, 4, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VL, 2, qn, qx, qy, qz),
-                 1, 2, 3, P, step, values, size)) return true;
+                 1, 2, 3, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _VPP, 1, qn, qx, qy, qz),
-                 0, 1, 3, P, step, values, size)) return true;
+                 0, 1, 3, P, step, values, size, grad)) return true;
   }
   else if(_theViewDataGModel){
     GModel *m = _theViewDataGModel->getModel((step < 0) ? 0 : step);
     if(m){
       if(_getValue(getElement(P, m, qn, qx, qy, qz),
-                   3, P, step, values, size)) return true;
+                   3, P, step, values, size, grad)) return true;
     }
   }
 
@@ -607,15 +638,16 @@ bool OctreePost::searchVector(double x, double y, double z, double *values,
 
 bool OctreePost::searchVectorWithTol(double x, double y, double z, double *values,
                                      int step, double *size, double tol,
-                                     int qn, double *qx, double *qy, double *qz)
+                                     int qn, double *qx, double *qy, double *qz,
+                                     bool grad)
 {
-  bool a = searchVector(x, y, z, values, step, size, qn, qx, qy, qz);
+  bool a = searchVector(x, y, z, values, step, size, qn, qx, qy, qz, grad);
   if(!a && tol != 0.){
     double oldtol1 = element::getTolerance();
     double oldtol2 = MElement::getTolerance();
     element::setTolerance(tol);
     MElement::setTolerance(tol);
-    a = searchVector(x, y, z, values, step, size, qn, qx, qy, qz);
+    a = searchVector(x, y, z, values, step, size, qn, qx, qy, qz, grad);
     element::setTolerance(oldtol1);
     MElement::setTolerance(oldtol2);
   }
@@ -624,44 +656,47 @@ bool OctreePost::searchVectorWithTol(double x, double y, double z, double *value
 
 bool OctreePost::searchTensor(double x, double y, double z, double *values,
                               int step, double *size,
-                              int qn, double *qx, double *qy, double *qz)
+                              int qn, double *qx, double *qy, double *qz,
+                              bool grad)
 {
   double P[3] = {x, y, z};
+  int mult = grad ? 3 : 1;
 
   if(step < 0){
     int numSteps = 1;
     if(_theViewDataList) numSteps = _theViewDataList->getNumTimeSteps();
     else if(_theViewDataGModel) numSteps = _theViewDataGModel->getNumTimeSteps();
-    for(int i = 0; i < 9 * numSteps; i++)
-      values[i] = 0.0;
+    for(int i = 0; i < 9 * numSteps * mult; i++)
+      values[i] = 0.;
+  }
+  else{
+    for(int i = 0; i < 9 * mult; i++)
+      values[i] = 0.;
   }
-  else
-    for(int i = 0; i < 9; i++)
-      values[i] = 0.0;
 
   if(_theViewDataList){
     if(_getValue(getElement(P, _TS, 4, qn, qx, qy, qz),
-                 3, 4, 9, P, step, values, size)) return true;
+                 3, 4, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TH, 8, qn, qx, qy, qz),
-                 3, 8, 9, P, step, values, size)) return true;
+                 3, 8, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TI, 6, qn, qx, qy, qz),
-                 3, 6, 9, P, step, values, size)) return true;
+                 3, 6, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TY, 5, qn, qx, qy, qz),
-                 3, 5, 9, P, step, values, size)) return true;
+                 3, 5, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TT, 3, qn, qx, qy, qz),
-                 2, 3, 9, P, step, values, size)) return true;
+                 2, 3, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TQ, 4, qn, qx, qy, qz),
-                 2, 4, 9, P, step, values, size)) return true;
+                 2, 4, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TL, 2, qn, qx, qy, qz),
-                 1, 2, 9, P, step, values, size)) return true;
+                 1, 2, 9, P, step, values, size, grad)) return true;
     if(_getValue(getElement(P, _TPP, 1, qn, qx, qy, qz),
-                 0, 1, 9, P, step, values, size)) return true;
+                 0, 1, 9, P, step, values, size, grad)) return true;
   }
   else if(_theViewDataGModel){
     GModel *m = _theViewDataGModel->getModel((step < 0) ? 0 : step);
     if(m){
       if(_getValue(getElement(P, m, qn, qx, qy, qz),
-                   9, P, step, values, size)) return true;
+                   9, P, step, values, size, grad)) return true;
     }
   }
 
@@ -670,15 +705,16 @@ bool OctreePost::searchTensor(double x, double y, double z, double *values,
 
 bool OctreePost::searchTensorWithTol(double x, double y, double z, double *values,
                                      int step, double *size, double tol,
-                                     int qn, double *qx, double *qy, double *qz)
+                                     int qn, double *qx, double *qy, double *qz,
+                                     bool grad)
 {
-  bool a = searchTensor(x, y, z, values, step, size, qn, qx, qy, qz);
+  bool a = searchTensor(x, y, z, values, step, size, qn, qx, qy, qz, grad);
   if(!a && tol != 0.){
     double oldtol1 = element::getTolerance();
     double oldtol2 = MElement::getTolerance();
     element::setTolerance(tol);
     MElement::setTolerance(tol);
-    a = searchTensor(x, y, z, values, step, size, qn, qx, qy, qz);
+    a = searchTensor(x, y, z, values, step, size, qn, qx, qy, qz, grad);
     element::setTolerance(oldtol1);
     MElement::setTolerance(oldtol2);
   }
diff --git a/Post/OctreePost.h b/Post/OctreePost.h
index bc38401..6a4e254 100644
--- a/Post/OctreePost.h
+++ b/Post/OctreePost.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -29,9 +29,9 @@ class OctreePost
   void _create(PViewData *data);
   bool _getValue(void *in, int dim, int nbNod, int nbComp,
                  double P[3], int step, double *values,
-                 double *elementSize);
+                 double *elementSize, bool grad);
   bool _getValue(void *in, int nbComp, double P[3], int step,
-                 double *values, double *elementSize);
+                 double *values, double *elementSize, bool grad);
  public :
   OctreePost(PView *v);
   OctreePost(PViewData *data);
@@ -41,25 +41,32 @@ class OctreePost
   // time steps are present, they are all interpolated unless time step is set
   // to a different value than -1. If qn is given, n node coordinates stored in
   // qx/y/z are used to select which element is used to interpolate (if the
-  // query returned more than one)
+  // query returned more than one). If grad is true, return the component-wise
+  // derivative (gradient) in xyz coordinates instead of the value.
   bool searchScalar(double x, double y, double z, double *values,
                     int step=-1, double *size=0,
-                    int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                    int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                    bool grad=false);
   bool searchScalarWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2,
-                           int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                           int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                           bool grad=false);
   bool searchVector(double x, double y, double z, double *values,
                     int step=-1, double *size=0,
-                    int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                    int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                    bool grad=false);
   bool searchVectorWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2,
-                           int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                           int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                           bool grad=false);
   bool searchTensor(double x, double y, double z, double *values,
                     int step=-1, double *size=0,
-                    int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                    int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                    bool grad=false);
   bool searchTensorWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2,
-                           int qn=0, double *qx=0, double *qy=0, double *qz=0);
+                           int qn=0, double *qx=0, double *qy=0, double *qz=0,
+                           bool grad=false);
 };
 
 #endif
diff --git a/Post/PView.cpp b/Post/PView.cpp
index af94217..cf99584 100644
--- a/Post/PView.cpp
+++ b/Post/PView.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PView.h b/Post/PView.h
index af1f99d..46a173d 100644
--- a/Post/PView.h
+++ b/Post/PView.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewAsSimpleFunction.cpp b/Post/PViewAsSimpleFunction.cpp
index b488695..3984068 100644
--- a/Post/PViewAsSimpleFunction.cpp
+++ b/Post/PViewAsSimpleFunction.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewAsSimpleFunction.h b/Post/PViewAsSimpleFunction.h
index ddb8839..a5e92af 100644
--- a/Post/PViewAsSimpleFunction.h
+++ b/Post/PViewAsSimpleFunction.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewData.cpp b/Post/PViewData.cpp
index 768d88f..c6820fe 100644
--- a/Post/PViewData.cpp
+++ b/Post/PViewData.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -189,54 +189,54 @@ bool PViewData::combineSpace(nameData &nd)
 
 bool PViewData::searchScalar(double x, double y, double z, double *values,
                              int step, double *size, int qn,
-                             double *qx, double *qy, double *qz)
+                             double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchScalar(x, y, z, values, step, size,
-                               qn, qx, qy, qz);
+                               qn, qx, qy, qz, grad);
 }
 
 bool PViewData::searchScalarWithTol(double x, double y, double z, double *values,
                                     int step, double *size, double tol, int qn,
-                                    double *qx, double *qy, double *qz)
+                                    double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchScalarWithTol(x, y, z, values, step, size, tol,
-                                      qn, qx, qy, qz);
+                                      qn, qx, qy, qz, grad);
 }
 
 bool PViewData::searchVector(double x, double y, double z, double *values,
                              int step, double *size, int qn,
-                             double *qx, double *qy, double *qz)
+                             double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchVector(x, y, z, values, step, size,
-                               qn, qx, qy, qz);
+                               qn, qx, qy, qz, grad);
 }
 
 bool PViewData::searchVectorWithTol(double x, double y, double z, double *values,
                                     int step, double *size, double tol, int qn,
-                                    double *qx, double *qy, double *qz)
+                                    double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchVectorWithTol(x, y, z, values, step, size, tol,
-                                      qn, qx, qy, qz);
+                                      qn, qx, qy, qz, grad);
 }
 
 bool PViewData::searchTensor(double x, double y, double z, double *values,
                              int step, double *size, int qn,
-                             double *qx, double *qy, double *qz)
+                             double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchTensor(x, y, z, values, step, size,
-                               qn, qx, qy, qz);
+                               qn, qx, qy, qz, grad);
 }
 
 bool PViewData::searchTensorWithTol(double x, double y, double z, double *values,
                                     int step, double *size, double tol, int qn,
-                                    double *qx, double *qy, double *qz)
+                                    double *qx, double *qy, double *qz, bool grad)
 {
   if(!_octree) _octree = new OctreePost(this);
   return _octree->searchTensorWithTol(x, y, z, values, step, size, tol,
-                                      qn, qx, qy, qz);
+                                      qn, qx, qy, qz, grad);
 }
diff --git a/Post/PViewData.h b/Post/PViewData.h
index c4e8d1c..3bcef8c 100644
--- a/Post/PViewData.h
+++ b/Post/PViewData.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -254,22 +254,22 @@ class PViewData {
   // to a different value than -1.
   bool searchScalar(double x, double y, double z, double *values,
                     int step=-1, double *size=0, int qn=0,
-                    double *qx=0, double *qy=0, double *qz=0);
+                    double *qx=0, double *qy=0, double *qz=0, bool grad=false);
   bool searchScalarWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2, int qn=0,
-                           double *qx=0, double *qy=0, double *qz=0);
+                           double *qx=0, double *qy=0, double *qz=0, bool grad=false);
   bool searchVector(double x, double y, double z, double *values,
                     int step=-1, double *size=0, int qn=0,
-                    double *qx=0, double *qy=0, double *qz=0);
+                    double *qx=0, double *qy=0, double *qz=0, bool grad=false);
   bool searchVectorWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2, int qn=0,
-                           double *qx=0, double *qy=0, double *qz=0);
+                           double *qx=0, double *qy=0, double *qz=0, bool grad=false);
   bool searchTensor(double x, double y, double z, double *values,
                     int step=-1, double *size=0, int qn=0,
-                    double *qx=0, double *qy=0, double *qz=0);
+                    double *qx=0, double *qy=0, double *qz=0, bool grad=false);
   bool searchTensorWithTol(double x, double y, double z, double *values,
                            int step=-1, double *size=0, double tol=1.e-2, int qn=0,
-                           double *qx=0, double *qy=0, double *qz=0);
+                           double *qx=0, double *qy=0, double *qz=0, bool grad=false);
 
   // I/O routines
   virtual bool writeSTL(const std::string &fileName);
diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp
index 42a878e..2870f23 100644
--- a/Post/PViewDataGModel.cpp
+++ b/Post/PViewDataGModel.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -15,6 +15,7 @@
 #include "MElementCut.h"
 #include "Numeric.h"
 #include "GmshMessage.h"
+#include "pyramidalBasis.h"
 
 PViewDataGModel::PViewDataGModel(DataType type)
   : PViewData(), _min(VAL_INF), _max(-VAL_INF), _type(type)
@@ -143,12 +144,18 @@ bool PViewDataGModel::finalize(bool computeMinMax, const std::string &interpolat
           // the mesh is curved
           MElement *e = _getOneElementOfGivenType(model, it->first);
           if(e && e->getPolynomialOrder() > 1 && e->getFunctionSpace()){
-            const polynomialBasis *fs = (polynomialBasis*) e->getFunctionSpace();
-            setInterpolationMatrices(it->first, *(it->second[0]), *(it->second[1]),
+            if (it->first == TYPE_PYR) { // KH 18/9/2014 very nasty fix since pyramids /= polynomial
+              const pyramidalBasis  *fs = (pyramidalBasis*) e->getFunctionSpace();
+              setInterpolationMatrices(it->first, *(it->second[0]), *(it->second[1]),
                                      fs->coefficients, fs->monomials);
+            }
+            else {
+              const polynomialBasis *fs = (polynomialBasis*) e->getFunctionSpace();
+              setInterpolationMatrices(it->first, *(it->second[0]), *(it->second[1]),
+                                       fs->coefficients, fs->monomials);
+            }
           }
-          else
-            setInterpolationMatrices(it->first, *(it->second[0]), *(it->second[1]));
+          else setInterpolationMatrices(it->first, *(it->second[0]), *(it->second[1]));
         }
         else if(it->second.size() == 4){
           // use provided matrices for field and geometry
@@ -168,38 +175,62 @@ bool PViewDataGModel::finalize(bool computeMinMax, const std::string &interpolat
     // type, assume isoparametric elements (except for ElementData,
     // for which we know the interpolation: it's constant)
     int types[] = {TYPE_PNT, TYPE_LIN, TYPE_TRI, TYPE_QUA, TYPE_TET, TYPE_HEX,
-                   TYPE_PRI, /*TYPE_PYR - Not polynomial!,*/ TYPE_POLYG, TYPE_POLYH};
+                   TYPE_PRI,TYPE_PYR, TYPE_POLYG, TYPE_POLYH};
     for(unsigned int i = 0; i < sizeof(types) / sizeof(types[0]); i++){
       if(!haveInterpolationMatrices(types[i])){
         MElement *e = _getOneElementOfGivenType(model, types[i]);
         if(e){
-          const polynomialBasis *fs = (polynomialBasis*) e->getFunctionSpace();
+          
+          const polynomialBasis *fs = dynamic_cast<const polynomialBasis*> (e->getFunctionSpace());
           if(fs){
             if(e->getPolynomialOrder() > 1){
               if(_type == ElementData){
                 // data is constant per element: force the interpolation matrix
                 fullMatrix<double> coef(1, 1);
-                coef(0, 0) = 1.;
-                fullMatrix<double> mono(1, 3);
-                mono(0, 0) = 0.;
-                mono(0, 1) = 0.;
-                mono(0, 2) = 0.;
-                setInterpolationMatrices(types[i], coef, mono,
-                                         fs->coefficients, fs->monomials);
-              }
+                  coef(0, 0) = 1.;
+                  fullMatrix<double> mono(1, 3);
+                  mono(0, 0) = 0.;
+                  mono(0, 1) = 0.;
+                  mono(0, 2) = 0.;
+                  setInterpolationMatrices(types[i], coef, mono,
+                                           fs->coefficients, fs->monomials);
+                }
               else
-                setInterpolationMatrices(types[i], fs->coefficients, fs->monomials,
+                setInterpolationMatrices(types[i],
+                                         fs->coefficients, fs->monomials,
                                          fs->coefficients, fs->monomials);
-            }
+              }
             else
               setInterpolationMatrices(types[i], fs->coefficients, fs->monomials);
           }
+          else {
+            const pyramidalBasis *fs = dynamic_cast<const pyramidalBasis*> (e->getFunctionSpace());
+            if(fs){
+              if(e->getPolynomialOrder() > 1){
+                if(_type == ElementData){
+                  // data is constant per element: force the interpolation matrix
+                  fullMatrix<double> coef(1, 1);
+                  coef(0, 0) = 1.;
+                  fullMatrix<double> mono(1, 3);
+                  mono(0, 0) = 0.;
+                  mono(0, 1) = 0.;
+                  mono(0, 2) = 0.;
+                  setInterpolationMatrices(types[i], coef, mono,
+                                           fs->coefficients, fs->monomials);
+                }
+                else
+                  setInterpolationMatrices(types[i],
+                                           fs->coefficients, fs->monomials,
+                                           fs->coefficients, fs->monomials);
+              }
+              else
+                setInterpolationMatrices(types[i], fs->coefficients, fs->monomials);
+            }
+          }
         }
       }
     }
-
   }
-
   return PViewData::finalize();
 }
 
diff --git a/Post/PViewDataGModel.h b/Post/PViewDataGModel.h
index 226396b..04965f2 100644
--- a/Post/PViewDataGModel.h
+++ b/Post/PViewDataGModel.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -114,6 +114,7 @@ class stepData{
   }
   Real *getData(int index, bool allocIfNeeded=false, int mult=1)
   {
+    if(index < 0) return 0;
     if(allocIfNeeded){
       if(index >= getNumData()) resizeData(index + 100); // optimize this
       if(!(*_data)[index]){
diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp
index 2aa3a33..1d9f2e2 100644
--- a/Post/PViewDataGModelIO.cpp
+++ b/Post/PViewDataGModelIO.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -89,6 +89,7 @@ bool PViewDataGModel::readMSH(const std::string &viewName, const std::string &fi
     else{
       if(fscanf(fp, "%d", &num) != 1) return false;
     }
+    if(num < 0) return false;
     int mult = 1;
     if(_type == ElementNodeData || _type == GaussPointData){
       if(binary){
diff --git a/Post/PViewDataIO.cpp b/Post/PViewDataIO.cpp
index 5b11050..6dda3e7 100644
--- a/Post/PViewDataIO.cpp
+++ b/Post/PViewDataIO.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp
index 1886fee..fe39970 100644
--- a/Post/PViewDataList.cpp
+++ b/Post/PViewDataList.cpp
@@ -1,8 +1,9 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
+#include <algorithm>
 #include "PViewDataList.h"
 #include "GmshMessage.h"
 #include "GmshDefines.h"
@@ -10,6 +11,7 @@
 #include "Numeric.h"
 #include "SmoothData.h"
 #include "Context.h"
+#include "polynomialBasis.h"
 
 PViewDataList::PViewDataList(bool isAdapted)
   : PViewData(), NbTimeStep(0), Min(VAL_INF), Max(-VAL_INF),
@@ -905,7 +907,7 @@ void PViewDataList::setOrder2(int type)
   case TYPE_TET: typeMSH = MSH_TET_10; break;
   case TYPE_HEX: typeMSH = MSH_HEX_27; break;
   case TYPE_PRI: typeMSH = MSH_PRI_18; break;
-  // case TYPE_PYR: typeMSH = MSH_PYR_14; break;
+  case TYPE_PYR: typeMSH = MSH_PYR_14; break;
   }
   const polynomialBasis *fs = (polynomialBasis*)BasisFactory::getNodalBasis(typeMSH);
   if(!fs){
diff --git a/Post/PViewDataList.h b/Post/PViewDataList.h
index 88e57e1..b76f8a6 100644
--- a/Post/PViewDataList.h
+++ b/Post/PViewDataList.h
@@ -1,5 +1,5 @@
 
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewDataListIO.cpp b/Post/PViewDataListIO.cpp
index 3228133..75ee8bb 100644
--- a/Post/PViewDataListIO.cpp
+++ b/Post/PViewDataListIO.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -11,7 +11,7 @@
 #include "StringUtils.h"
 #include "GmshMessage.h"
 #include "GmshDefines.h"
-#include "MVertexPositionSet.h"
+#include "MVertexRTree.h"
 #include "Context.h"
 #include "adaptiveData.h"
 #include "OS.h"
@@ -463,9 +463,8 @@ public:
 };
 
 static void createElements(std::vector<double> &list, int nbelm, int nbnod,
-                           MVertexPositionSet &pos, std::vector<MElement*> &elements,
-                           double eps, int type,
-                           std::map<MVertex*, nodeData> *vertexData)
+                           MVertexRTree &pos, std::vector<MElement*> &elements,
+                           int type, std::map<MVertex*, nodeData> *vertexData)
 {
   if(!nbelm) return;
   int t = 0;
@@ -533,7 +532,7 @@ static void createElements(std::vector<double> &list, int nbelm, int nbnod,
     double *z = &list[i + 2 * nbnod];
     std::vector<MVertex*> verts(nbnod);
     for(int j = 0; j < nbnod; j++){
-      verts[j] = pos.find(x[j], y[j], z[j], eps);
+      verts[j] = pos.find(x[j], y[j], z[j]);
       if(vertexData)
         (*vertexData)[verts[j]] = nodeData(nbnod, j, &list[i + 3 * nbnod]);
     }
@@ -572,7 +571,13 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
     if(*numEle) numComponents = std::min(numComponents, numComp);
     createVertices(*list, *numEle, numNodes, vertices);
   }
-  MVertexPositionSet pos(vertices);
+  MVertexRTree pos(eps);
+  std::vector<MVertex*> unique;
+  for(unsigned int i = 0; i < vertices.size(); i++){
+    if(!pos.insert(vertices[i]))
+      unique.push_back(vertices[i]);
+  }
+  vertices.clear();
 
   std::map<MVertex *, nodeData> vertexData;
 
@@ -580,24 +585,22 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
     std::vector<double> *list = 0;
     int *numEle = 0, numComp, numNodes;
     int typ = _getRawData(i, &list, &numEle, &numComp, &numNodes);
-    createElements(*list, *numEle, numNodes, pos, elements, eps, typ,
+    createElements(*list, *numEle, numNodes, pos, elements, typ,
                    forceNodeData ? &vertexData : 0);
   }
 
-  int globalNumNodes = 0;
-  for(unsigned int i = 0; i < vertices.size(); i++)
-    if(vertices[i]->getIndex() < 0)
-      vertices[i]->setIndex(++globalNumNodes);
+  int num = 0;
+  for(unsigned int i = 0; i < unique.size(); i++)
+    unique[i]->setIndex(++num);
 
   fprintf(fp, "$MeshFormat\n2.2 0 8\n$EndMeshFormat\n");
 
   if(saveMesh){
     fprintf(fp, "$Nodes\n");
-    fprintf(fp, "%d\n", globalNumNodes);
-    for(unsigned int i = 0; i < vertices.size(); i++){
-      MVertex *v = vertices[i];
-      if(v->getIndex() > 0)
-        fprintf(fp, "%d %.16g %.16g %.16g\n", v->getIndex(), v->x(), v->y(), v->z());
+    fprintf(fp, "%d\n", (int)unique.size());
+    for(unsigned int i = 0; i < unique.size(); i++){
+      MVertex *v = unique[i];
+      fprintf(fp, "%d %.16g %.16g %.16g\n", v->getIndex(), v->x(), v->y(), v->z());
     }
     fprintf(fp, "$EndNodes\n");
 
@@ -644,7 +647,7 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
     else
       fprintf(fp, "1\n\"%s\"\n", getName().c_str());
     fprintf(fp, "1\n%.16g\n", getTime(ts));
-    int size = forceNodeData ? globalNumNodes : (int)elements.size();
+    int size = forceNodeData ? (int)unique.size() : (int)elements.size();
     if(partitionNum)
       fprintf(fp, "4\n%d\n%d\n%d\n%d\n", ts, numComponents, size,
               partitionNum);
@@ -652,23 +655,21 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
       fprintf(fp, "3\n%d\n%d\n%d\n", ts, numComponents, size);
 
     if(forceNodeData){
-      for(unsigned int i = 0; i < vertices.size(); i++){
-        MVertex *v = vertices[i];
-        if(v->getIndex() > 0){
-          fprintf(fp, "%d", v->getIndex());
-          int nbnod = vertexData[v].nbnod;
-          int nod = vertexData[v].nod;
-          double *d = vertexData[v].data;
-          for(int j = 0; j < numComponents; j++)
-            fprintf(fp, " %.16g",
-                    d[numComponents * nbnod * ts + numComponents * nod + j]);
-          fprintf(fp, "\n");
-        }
+      for(unsigned int i = 0; i < unique.size(); i++){
+        MVertex *v = unique[i];
+        fprintf(fp, "%d", v->getIndex());
+        int nbnod = vertexData[v].nbnod;
+        int nod = vertexData[v].nod;
+        double *d = vertexData[v].data;
+        for(int j = 0; j < numComponents; j++)
+          fprintf(fp, " %.16g",
+                  d[numComponents * nbnod * ts + numComponents * nod + j]);
+        fprintf(fp, "\n");
       }
       fprintf(fp, "$EndNodeData\n");
     }
     else{
-      int num = 0;
+      int n = 0;
       for(int i = 0; i < 24; i++){
         std::vector<double> *list = 0;
         int *numEle = 0, numComp, numNodes;
@@ -680,7 +681,7 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
           int nb = list->size() / *numEle;
           for(unsigned int i = 0; i < list->size(); i += nb){
             double *v = &(*list)[i + 3 * numNodes];
-            fprintf(fp, "%d %d", ++num, mult);
+            fprintf(fp, "%d %d", ++n, mult);
             for(int j = 0; j < numComponents * mult; j++)
               fprintf(fp, " %.16g", v[numComponents * mult * ts + j]);
             fprintf(fp, "\n");
diff --git a/Post/PViewDataRemote.h b/Post/PViewDataRemote.h
index 72bbbae..1fe6342 100644
--- a/Post/PViewDataRemote.h
+++ b/Post/PViewDataRemote.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewFactory.cpp b/Post/PViewFactory.cpp
index 8448a32..5114ccb 100644
--- a/Post/PViewFactory.cpp
+++ b/Post/PViewFactory.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewFactory.h b/Post/PViewFactory.h
index 77e49fe..f5d4d79 100644
--- a/Post/PViewFactory.h
+++ b/Post/PViewFactory.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewIO.cpp b/Post/PViewIO.cpp
index 9932ded..ae0db35 100644
--- a/Post/PViewIO.cpp
+++ b/Post/PViewIO.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewOptions.cpp b/Post/PViewOptions.cpp
index b3c8b91..6e602a9 100644
--- a/Post/PViewOptions.cpp
+++ b/Post/PViewOptions.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h
index 622c841..be251b0 100644
--- a/Post/PViewOptions.h
+++ b/Post/PViewOptions.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -57,8 +57,8 @@ class PViewOptions {
     DoubleLogarithmic = 3
   };
 
-  int type;
-  int position[2], size[2], autoPosition;
+  int type, autoPosition;
+  double position[2], size[2];
   std::string format;
   int axes, axesAutoPosition, axesMikado;
   double axesTics[3];
diff --git a/Post/PViewVertexArrays.cpp b/Post/PViewVertexArrays.cpp
index d26d909..8f89700 100644
--- a/Post/PViewVertexArrays.cpp
+++ b/Post/PViewVertexArrays.cpp
@@ -1,9 +1,10 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
 
 #include <string.h>
+#include <algorithm>
 #include "GmshMessage.h"
 #include "GmshDefines.h"
 #include "onelab.h"
diff --git a/Post/adaptiveData.cpp b/Post/adaptiveData.cpp
index 2d91ede..d1b5156 100644
--- a/Post/adaptiveData.cpp
+++ b/Post/adaptiveData.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -6,6 +6,7 @@
 #include <math.h>
 #include <list>
 #include <set>
+#include <algorithm>
 #include "adaptiveData.h"
 #include "Plugin.h"
 #include "OS.h"
@@ -20,6 +21,7 @@ std::set<adaptiveVertex> adaptiveQuadrangle::allVertices;
 std::set<adaptiveVertex> adaptiveTetrahedron::allVertices;
 std::set<adaptiveVertex> adaptiveHexahedron::allVertices;
 std::set<adaptiveVertex> adaptivePrism::allVertices;
+std::set<adaptiveVertex> adaptivePyramid::allVertices;
 
 std::list<adaptivePoint*> adaptivePoint::all;
 std::list<adaptiveLine*> adaptiveLine::all;
@@ -28,6 +30,7 @@ std::list<adaptiveQuadrangle*> adaptiveQuadrangle::all;
 std::list<adaptiveTetrahedron*> adaptiveTetrahedron::all;
 std::list<adaptiveHexahedron*> adaptiveHexahedron::all;
 std::list<adaptivePrism*> adaptivePrism::all;
+std::list<adaptivePyramid*> adaptivePyramid::all;
 
 int adaptivePoint::numNodes = 1;
 int adaptiveLine::numNodes = 2;
@@ -36,6 +39,7 @@ int adaptiveQuadrangle::numNodes = 4;
 int adaptivePrism::numNodes = 6;
 int adaptiveTetrahedron::numNodes = 4;
 int adaptiveHexahedron::numNodes = 8;
+int adaptivePyramid::numNodes = 5;
 
 int adaptivePoint::numEdges = 0;
 int adaptiveLine::numEdges = 1;
@@ -44,6 +48,7 @@ int adaptiveQuadrangle::numEdges = 4;
 int adaptivePrism::numEdges = 9;
 int adaptiveTetrahedron::numEdges = 6;
 int adaptiveHexahedron::numEdges = 12;
+int adaptivePyramid::numEdges = 8;
 
 template <class T>
 static void cleanElement()
@@ -66,6 +71,40 @@ static void computeShapeFunctions(fullMatrix<double> *coeffs, fullMatrix<double>
   coeffs->mult(*tmp, *sf);
 }
 
+/*! Bergot space is characterised by polynomials
+  \f$ \mathcal B_{ijk} =
+  \mathcal P_i \left(\frac{\xi }{1-\zeta}\right)
+  \mathcal P_j \left(\frac{\eta}{1-\zeta}\right)
+  \left(1-\zeta\right)^{max(i,j)}
+  \mathcal P^{2 max(i,j),0}_k \left(2 \zeta -1\right)~|~i,j \leq p, k \leq p - max(i,j) \f$
+  and hence by the "monomials"
+  \f$ \mu_{ijk} =
+  \left(\frac{\xi }{\1-\zeta}\right)^i
+  \left(\frac{\eta}{\1-\zeta}\right)^j
+  \left(1-\zeta\right)^{max(i,j)} \zeta^k~|~i,j \leq p~,~k \leq p-max(i,j)
+  \f$
+*/
+static void computeShapeFunctionsPyramid(fullMatrix<double> *coeffs,
+                                         fullMatrix<double> *eexps,
+                                         double u, double v, double w,
+                                         fullVector<double> *sf,
+                                         fullVector<double> *tmp)
+{
+
+  double oneMinW = (w==1) ? 1e-12:1-w;
+  for(int l = 0; l < eexps->size1(); l++) {
+    int i = (*eexps)(l,0);
+    int j = (*eexps)(l,1);
+    int k = (*eexps)(l,2);
+    int m = std::max(i,j);
+    (*tmp)(l)  = pow(u,i);
+    (*tmp)(l) *= pow(v,j);
+    (*tmp)(l) *= pow(w,k);
+    (*tmp)(l) *= pow(oneMinW,m-i-j);
+  }
+  coeffs->mult(*tmp, *sf);
+}
+
 adaptiveVertex *adaptiveVertex::add(double x, double y, double z,
                                   std::set<adaptiveVertex> &allVertices)
 {
@@ -883,6 +922,163 @@ void adaptivePrism::recurError(adaptivePrism *p, double AVG, double tol)
   }
 }
 
+void adaptivePyramid::create(int maxlevel)
+{
+  cleanElement<adaptivePyramid>();
+  adaptiveVertex *p1 = adaptiveVertex::add(-1, -1, 0, allVertices);
+  adaptiveVertex *p2 = adaptiveVertex::add(1, -1, 0, allVertices);
+  adaptiveVertex *p3 = adaptiveVertex::add(1, 1, 0, allVertices);
+  adaptiveVertex *p4 = adaptiveVertex::add(-1, 1, 0, allVertices);
+  adaptiveVertex *p5 = adaptiveVertex::add(0, 0, 1, allVertices);
+  adaptivePyramid *p = new adaptivePyramid(p1, p2, p3, p4, p5);
+  recurCreate(p, maxlevel, 0);
+}
+
+void adaptivePyramid::recurCreate(adaptivePyramid *p, int maxlevel, int level)
+{
+  all.push_back(p);
+  if(level++ >= maxlevel) return;
+
+  // quad points
+  adaptiveVertex *p1 = p->p[0];
+  adaptiveVertex *p2 = p->p[1];
+  adaptiveVertex *p3 = p->p[2];
+  adaptiveVertex *p4 = p->p[3];
+
+  // apex
+  adaptiveVertex *p5 = p->p[4];
+
+  // center of the quad
+
+  adaptiveVertex *p1234 = adaptiveVertex::add
+    ((p1->x + p2->x + p3->x + p4->x)*0.25,
+     (p1->y + p2->y + p3->y + p4->y)*0.25,
+     (p1->z + p2->z + p3->z + p4->z)*0.25,allVertices);
+
+  // quad edge points
+
+  adaptiveVertex *p12 = adaptiveVertex::add
+    ((p1->x + p2->x)*0.5,
+     (p1->y + p2->y)*0.5,
+     (p1->z + p2->z)*0.5,allVertices);
+
+  adaptiveVertex *p23 = adaptiveVertex::add
+    ((p2->x + p3->x)*0.5,
+     (p2->y + p3->y)*0.5,
+     (p2->z + p3->z)*0.5,allVertices);
+
+  adaptiveVertex *p34 = adaptiveVertex::add
+    ((p3->x + p4->x)*0.5,
+     (p3->y + p4->y)*0.5,
+     (p3->z + p4->z)*0.5,allVertices);
+
+  adaptiveVertex *p41 = adaptiveVertex::add
+    ((p4->x + p1->x)*0.5,
+     (p4->y + p1->y)*0.5,
+     (p4->z + p1->z)*0.5,allVertices);
+
+  // quad vertex to apex edge points
+
+  adaptiveVertex *p15 = adaptiveVertex::add
+    ((p1->x + p5->x)*0.5,
+     (p1->y + p5->y)*0.5,
+     (p1->z + p5->z)*0.5,allVertices);
+
+  adaptiveVertex *p25 = adaptiveVertex::add
+    ((p2->x + p5->x)*0.5,
+     (p2->y + p5->y)*0.5,
+     (p2->z + p5->z)*0.5,allVertices);
+
+  adaptiveVertex *p35 = adaptiveVertex::add
+    ((p3->x + p5->x)*0.5,
+     (p3->y + p5->y)*0.5,
+     (p3->z + p5->z)*0.5,allVertices);
+
+  adaptiveVertex *p45 = adaptiveVertex::add
+    ((p4->x + p5->x)*0.5,
+     (p4->y + p5->y)*0.5,
+     (p4->z + p5->z)*0.5,allVertices);
+
+  // four base pyramids on the quad base
+
+  p->e[0] = new adaptivePyramid(p1, p12, p1234, p41, p15);
+  recurCreate(p->e[0], maxlevel, level);
+  p->e[1] = new adaptivePyramid(p2, p23, p1234, p12, p25);
+  recurCreate(p->e[1], maxlevel, level);
+  p->e[2] = new adaptivePyramid(p3, p34, p1234, p23, p35);
+  recurCreate(p->e[2], maxlevel, level);
+  p->e[3] = new adaptivePyramid(p4, p41, p1234, p34, p45);
+  recurCreate(p->e[3], maxlevel, level);
+
+  // top pyramids
+
+  p->e[4] = new adaptivePyramid(p15,p25,p35,p45,p5);
+  recurCreate(p->e[4], maxlevel, level);
+  p->e[5] = new adaptivePyramid(p15,p45,p35,p25,p1234);
+  recurCreate(p->e[5], maxlevel, level);
+
+  // degenerated pyramids to replace the remaining tetrahedral holes
+  // degenerated quad in the interior of the element, apices on the quad edges
+
+  p->e[6] = new adaptivePyramid(p1234,p25,p15,p1234,p12);
+  recurCreate(p->e[6], maxlevel, level);
+  p->e[7] = new adaptivePyramid(p1234,p35,p25,p1234,p23);
+  recurCreate(p->e[7], maxlevel, level);
+  p->e[8] = new adaptivePyramid(p1234,p45,p35,p1234,p34);
+  recurCreate(p->e[8], maxlevel, level);
+  p->e[9] = new adaptivePyramid(p1234,p15,p45,p1234,p41);
+  recurCreate(p->e[9], maxlevel, level);
+}
+
+void adaptivePyramid::error(double AVG, double tol)
+{
+  adaptivePyramid *p = *all.begin();
+  recurError(p, AVG, tol);
+}
+
+void adaptivePyramid::recurError(adaptivePyramid *p, double AVG, double tol)
+{
+  if(!p->e[0])
+    p->visible = true;
+  else {
+    double vi[10];
+    for (int i = 0; i < 10; i++) vi[i] = p->e[i]->V();
+    double vr = 0;
+    for (int i = 0; i < 6 ; i++) vr += vi[i];     // pyramids   have volume V/8
+    for (int i = 6; i < 10; i++) vr += vi[i]*0.5; // tetrahedra have volume V/16
+    vr /= 8.;
+    const double v = p->V();
+    if(!p->e[0]->e[0]) {
+      if(fabs(v - vr) > AVG * tol){
+        p->visible = false;
+        for (int i = 0; i < 10; i++) recurError(p->e[i],AVG,tol);
+      }
+      else
+        p->visible = true;
+    }
+    else {
+      bool err = false;
+      for(int i = 0; i < 10; i++){
+        double vj[10];
+        for (int j = 0; j < 10; j++) vj[j] = p->e[i]->e[j]->V();
+        double vri = 0;
+        for (int j = 0; j < 6 ; j++) vri += vj[j];
+        for (int j = 6; j < 10; j++) vri += vj[j]*0.5;
+        vri /= 8.;
+        err |= (fabs((vi[i] - vri)) > AVG * tol);
+      }
+      err |= (fabs((v - vr)) > AVG * tol);
+      if(err) {
+        p->visible = false;
+        for(int i = 0; i < 10; i++)
+          recurError(p->e[i], AVG, tol);
+      }
+      else
+        p->visible = true;
+    }
+  }
+}
+
 template <class T>
 adaptiveElements<T>::adaptiveElements(std::vector<fullMatrix<double>*> &p)
   : _coeffsVal(0), _eexpsVal(0), _interpolVal(0),
@@ -960,6 +1156,61 @@ void adaptiveElements<T>::init(int level)
 #endif
 }
 
+template <>
+void adaptiveElements<adaptivePyramid>::init(int level)
+{
+#ifdef TIMER
+  double t1 = GetTimeInSeconds();
+#endif
+
+  adaptivePyramid::create(level);
+  int numVals  = _coeffsVal  ? _coeffsVal->size1()  : adaptivePyramid::numNodes;
+  int numNodes = _coeffsGeom ? _coeffsGeom->size1() : adaptivePyramid::numNodes;
+
+  if(_interpolVal) delete _interpolVal;
+  _interpolVal = new fullMatrix<double>(adaptivePyramid::allVertices.size(), numVals);
+
+  if(_interpolGeom) delete _interpolGeom;
+  _interpolGeom = new fullMatrix<double>(adaptivePyramid::allVertices.size(), numNodes);
+
+  fullVector<double> sfv(numVals), *tmpv = 0;
+  fullVector<double> sfg(numNodes), *tmpg = 0;
+  if(_eexpsVal) tmpv = new fullVector<double>(_eexpsVal->size1());
+  if(_eexpsGeom) tmpg = new fullVector<double>(_eexpsGeom->size1());
+
+  int i = 0;
+  for(std::set<adaptiveVertex>::iterator it = adaptivePyramid::allVertices.begin();
+      it != adaptivePyramid::allVertices.end(); ++it) {
+
+    if(_coeffsVal && _eexpsVal)
+      computeShapeFunctionsPyramid(_coeffsVal, _eexpsVal,
+                            it->x, it->y, it->z, &sfv, tmpv);
+    else
+      adaptivePyramid::GSF(it->x, it->y, it->z, sfv);
+
+    for(int j = 0; j < numVals; j++)
+      (*_interpolVal)(i, j) = sfv(j);
+
+    if(_coeffsGeom && _eexpsGeom)
+      computeShapeFunctionsPyramid(_coeffsGeom, _eexpsGeom,
+                            it->x, it->y, it->z, &sfg, tmpg);
+    else
+      adaptivePyramid::GSF(it->x, it->y, it->z, sfg);
+    for(int j = 0; j < numNodes; j++)
+      (*_interpolGeom)(i, j) = sfg(j);
+
+    i++;
+  }
+
+  if(tmpv) delete tmpv;
+  if(tmpg) delete tmpg;
+
+#ifdef TIMER
+  adaptiveData::timerInit += GetTimeInSeconds() - t1;
+  return;
+#endif
+}
+
 template <class T>
 void adaptiveElements<T>::adapt(double tol, int numComp,
                                 std::vector<PCoords> &coords,
@@ -1051,7 +1302,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp,
     adaptiveVertex *p = (adaptiveVertex*)&(*it);
     p->val = res(i);
     if(resxyz){
-      p->valx = (*resxyz)(i, 0);
+      p->val  = (*resxyz)(i, 0);
       p->valy = (*resxyz)(i, 1);
       p->valz = (*resxyz)(i, 2);
     }
@@ -1087,7 +1338,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp,
         if(numComp == 1)
           values.push_back(PValues(p[i]->val));
         else
-          values.push_back(PValues(p[i]->valx, p[i]->valy, p[i]->valz));
+          values.push_back(PValues(p[i]->val, p[i]->valy, p[i]->valz));
       }
     }
   }
@@ -1134,6 +1385,11 @@ void adaptiveElements<T>::addInView(double tol, int step,
     outNb = (numComp == 1) ? &out->NbSI : &out->NbVI;
     outList = (numComp == 1) ? &out->SI : &out->VI;
     break;
+  case 8:
+    numEle = in->getNumPyramids();
+    outNb = (numComp == 1) ? &out->NbSY : &out->NbVY;
+    outList = (numComp == 1) ? &out->SY : &out->VY;
+    break;
   case 12:
     numEle = in->getNumHexahedra();
     outNb = (numComp == 1) ? &out->NbSH : &out->NbVH;
@@ -1194,7 +1450,7 @@ void adaptiveElements<T>::addInView(double tol, int step,
 adaptiveData::adaptiveData(PViewData *data)
   : _step(-1), _level(-1), _tol(-1.), _inData(data),
     _points(0), _lines(0), _triangles(0), _quadrangles(0),
-    _tetrahedra(0), _hexahedra(0), _prisms(0)
+    _tetrahedra(0), _hexahedra(0), _prisms(0),_pyramids(0)
 {
   _outData = new PViewDataList(true);
   _outData->setName(data->getName() + "_adapted");
@@ -1227,6 +1483,10 @@ adaptiveData::adaptiveData(PViewData *data)
     _inData->getInterpolationMatrices(TYPE_HEX, p);
     _hexahedra = new adaptiveElements<adaptiveHexahedron>(p);
   }
+  if(_inData->getNumPyramids()){
+    _inData->getInterpolationMatrices(TYPE_PYR, p);
+    _pyramids = new adaptiveElements<adaptivePyramid>(p);
+  }
 }
 
 adaptiveData::~adaptiveData()
@@ -1238,6 +1498,7 @@ adaptiveData::~adaptiveData()
   if(_tetrahedra) delete _tetrahedra;
   if(_prisms) delete _prisms;
   if(_hexahedra) delete _hexahedra;
+  if(_pyramids) delete _pyramids;
   delete _outData;
 }
 
@@ -1257,6 +1518,7 @@ void adaptiveData::changeResolution(int step, int level, double tol,
     if(_tetrahedra) _tetrahedra->init(level);
     if(_prisms) _prisms->init(level);
     if(_hexahedra) _hexahedra->init(level);
+    if(_pyramids)  _pyramids->init(level);
   }
   if(plug || _step != step || _level != level || _tol != tol){
     _outData->setDirty(true);
@@ -1267,6 +1529,7 @@ void adaptiveData::changeResolution(int step, int level, double tol,
     if(_tetrahedra) _tetrahedra->addInView(tol, step, _inData, _outData, plug);
     if(_prisms) _prisms->addInView(tol, step, _inData, _outData, plug);
     if(_hexahedra) _hexahedra->addInView(tol, step, _inData, _outData, plug);
+    if(_pyramids) _pyramids->addInView(tol, step, _inData, _outData, plug);
     _outData->finalize();
   }
   _step = step;
diff --git a/Post/adaptiveData.h b/Post/adaptiveData.h
index ff8a28e..781f531 100644
--- a/Post/adaptiveData.h
+++ b/Post/adaptiveData.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -9,6 +9,8 @@
 #include <list>
 #include <set>
 #include <vector>
+#include <cstdlib>
+#include <algorithm>
 #include "fullMatrix.h"
 
 class PViewData;
@@ -17,10 +19,11 @@ class GMSH_PostPlugin;
 
 class adaptiveVertex {
  public:
-  double x, y, z, X, Y, Z;
-  double val, valx, valy, valz;
+  float  x, y, z;        //!< parametric coordinates
+  double X, Y, Z;        //!< cartesian coordinates
+  double val,valy,valz;  //!< maximal three values
  public:
-  static adaptiveVertex *add(double x, double y, double z, 
+  static adaptiveVertex *add(double x, double y, double z,
                              std::set<adaptiveVertex> &allVertice);
   bool operator < (const adaptiveVertex &other) const
   {
@@ -47,7 +50,7 @@ class adaptivePoint {
   {
     p[0] = p1;
     e[0] = 0;
-  } 
+  }
   inline double V() const
   {
     return p[0]->val;
@@ -77,7 +80,7 @@ class adaptiveLine {
     p[0] = p1;
     p[1] = p2;
     e[0] = e[1] = 0;
-  } 
+  }
   inline double V() const
   {
     return (p[0]->val + p[1]->val) / 2.;
@@ -135,8 +138,8 @@ class adaptiveQuadrangle {
   static std::set<adaptiveVertex> allVertices;
   static int numNodes, numEdges;
  public:
-  adaptiveQuadrangle(adaptiveVertex *p1, adaptiveVertex *p2, 
-                     adaptiveVertex *p3, adaptiveVertex *p4)    
+  adaptiveQuadrangle(adaptiveVertex *p1, adaptiveVertex *p2,
+                     adaptiveVertex *p3, adaptiveVertex *p4)
     : visible(false)
   {
     p[0] = p1;
@@ -171,7 +174,7 @@ class adaptivePrism {
   static std::set<adaptiveVertex> allVertices;
   static int numNodes, numEdges;
  public:
-  adaptivePrism(adaptiveVertex *p1, adaptiveVertex *p2, adaptiveVertex *p3, 
+  adaptivePrism(adaptiveVertex *p1, adaptiveVertex *p2, adaptiveVertex *p3,
                 adaptiveVertex *p4, adaptiveVertex *p5, adaptiveVertex *p6)
     : visible(false)
   {
@@ -212,7 +215,7 @@ class adaptiveTetrahedron {
   static std::set<adaptiveVertex> allVertices;
   static int numNodes, numEdges;
  public:
-  adaptiveTetrahedron(adaptiveVertex *p1, adaptiveVertex *p2, 
+  adaptiveTetrahedron(adaptiveVertex *p1, adaptiveVertex *p2,
                       adaptiveVertex *p3, adaptiveVertex *p4)
     : visible(false)
   {
@@ -249,8 +252,8 @@ class adaptiveHexahedron {
   static std::set<adaptiveVertex> allVertices;
   static int numNodes, numEdges;
  public:
-  adaptiveHexahedron(adaptiveVertex *p1, adaptiveVertex *p2, adaptiveVertex *p3, 
-                     adaptiveVertex *p4, adaptiveVertex *p5, adaptiveVertex *p6, 
+  adaptiveHexahedron(adaptiveVertex *p1, adaptiveVertex *p2, adaptiveVertex *p3,
+                     adaptiveVertex *p4, adaptiveVertex *p5, adaptiveVertex *p6,
                      adaptiveVertex *p7, adaptiveVertex *p8)
     : visible(false)
   {
@@ -287,7 +290,56 @@ class adaptiveHexahedron {
   static void recurError(adaptiveHexahedron *h, double AVG, double tol);
 };
 
-class PCoords { 
+// modif koen.hillewaert at cenaero.be, 31/07/2014
+
+class adaptivePyramid {
+ public:
+  bool visible;
+  adaptiveVertex *p[5];
+  adaptivePyramid *e[10];
+  static std::list<adaptivePyramid*> all;
+  static std::set<adaptiveVertex> allVertices;
+  static int numNodes, numEdges;
+ public:
+  adaptivePyramid(adaptiveVertex *p1,
+                  adaptiveVertex *p2,
+                  adaptiveVertex *p3,
+                  adaptiveVertex *p4,
+                  adaptiveVertex *p5)
+    : visible(false)
+  {
+    p[0] = p1;
+    p[1] = p2;
+    p[2] = p3;
+    p[3] = p4;
+    p[4] = p5;
+    for (int i=0;i<10;i++) e[i] = NULL;
+  }
+  inline double V() const
+  {
+    return (p[0]->val +
+            p[1]->val +
+            p[2]->val +
+            p[3]->val +
+            p[4]->val) / 5.;
+  }
+  // barycentric coordinates ?
+  inline static void GSF(double u, double v, double w, fullVector<double> &sf)
+  {
+    double ww = 0.25 / std::max(1e-14,1.-w);
+    sf(0) = (1 - u - w) * (1 - v - w) * ww;
+    sf(1) = (1 + u - w) * (1 - v - w) * ww;
+    sf(2) = (1 + u - w) * (1 + v - w) * ww;
+    sf(3) = (1 - u - w) * (1 + v - w) * ww;
+    sf(4) = w;
+  }
+  static void create(int maxlevel);
+  static void recurCreate(adaptivePyramid *h, int maxlevel, int level);
+  static void error(double AVG, double tol);
+  static void recurError(adaptivePyramid *h, double AVG, double tol);
+};
+
+class PCoords {
  public:
   double c[3];
   PCoords(double x, double y, double z)
@@ -329,7 +381,7 @@ class adaptiveElements {
   // adapt all the T-type elements in the input view and add the
   // refined elements in the output view (we will remove this when we
   // switch to true on-the-fly local refinement in drawPost())
-  void addInView(double tol, int step, PViewData *in, PViewDataList *out, 
+  void addInView(double tol, int step, PViewData *in, PViewDataList *out,
                  GMSH_PostPlugin *plug=0);
 };
 
@@ -346,6 +398,7 @@ class adaptiveData {
   adaptiveElements<adaptiveTetrahedron> *_tetrahedra;
   adaptiveElements<adaptiveHexahedron> *_hexahedra;
   adaptiveElements<adaptivePrism> *_prisms;
+  adaptiveElements<adaptivePyramid> *_pyramids;
  public:
   static double timerInit, timerAdapt;
   adaptiveData(PViewData *data);
diff --git a/Post/shapeFunctions.cpp b/Post/shapeFunctions.cpp
index 132c3a9..976ef57 100644
--- a/Post/shapeFunctions.cpp
+++ b/Post/shapeFunctions.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Post/shapeFunctions.h b/Post/shapeFunctions.h
index 3bd0bdc..6a2a94a 100644
--- a/Post/shapeFunctions.h
+++ b/Post/shapeFunctions.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/CMakeLists.txt b/Qt/CMakeLists.txt
index 2e3ef98..d6ebcac 100644
--- a/Qt/CMakeLists.txt
+++ b/Qt/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/GLWidget.cpp b/Qt/GLWidget.cpp
index b19c1f5..49642b6 100644
--- a/Qt/GLWidget.cpp
+++ b/Qt/GLWidget.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/GLWidget.h b/Qt/GLWidget.h
index d04218b..a77e5c9 100644
--- a/Qt/GLWidget.h
+++ b/Qt/GLWidget.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/Main.cpp b/Qt/Main.cpp
index 537103a..3eef4a4 100644
--- a/Qt/Main.cpp
+++ b/Qt/Main.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/QGui.cpp b/Qt/QGui.cpp
index 49192a0..0dcdc53 100644
--- a/Qt/QGui.cpp
+++ b/Qt/QGui.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/QGui.h b/Qt/QGui.h
index 084e145..772a957 100644
--- a/Qt/QGui.h
+++ b/Qt/QGui.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/graphicWindow.cpp b/Qt/graphicWindow.cpp
index d626bef..9490854 100644
--- a/Qt/graphicWindow.cpp
+++ b/Qt/graphicWindow.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Qt/graphicWindow.h b/Qt/graphicWindow.h
index eeea4ac..b1a183b 100644
--- a/Qt/graphicWindow.h
+++ b/Qt/graphicWindow.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/README.txt b/README.txt
index 9c75d54..c133fb0 100644
--- a/README.txt
+++ b/README.txt
@@ -1,8 +1,9 @@
 This is Gmsh, an automatic three-dimensional finite element mesh generator with
 built-in pre- and post-processing facilities.
 
-Gmsh is distributed under the terms of the GNU General Public License, Version 2
-or later, with an exception to allow for easier linking with external
+Gmsh is copyright (C) 1997-2015 C. Geuzaine and J.-F. Remacle, and is
+distributed under the terms of the GNU General Public License, Version 2 or
+later, with an exception to allow for easier linking with external
 libraries. See doc/LICENSE.txt and doc/CREDITS.txt for more information.
 
 See the doc/ and tutorial/ directories for documentation. The reference manual
diff --git a/Solver/CMakeLists.txt b/Solver/CMakeLists.txt
index a4d1657..82902ad 100644
--- a/Solver/CMakeLists.txt
+++ b/Solver/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -12,6 +12,7 @@ set(SRC
   groupOfElements.cpp
   elasticityTerm.cpp
 elasticitySolver.cpp
+  thermicSolver.cpp
   SElement.cpp
   eigenSolver.cpp
   multiscaleLaplace.cpp
diff --git a/Solver/FuncGradDisc.h b/Solver/FuncGradDisc.h
index 2462a53..f557280 100644
--- a/Solver/FuncGradDisc.h
+++ b/Solver/FuncGradDisc.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/FuncHeaviside.h b/Solver/FuncHeaviside.h
index 651bcc0..80ae0ff 100644
--- a/Solver/FuncHeaviside.h
+++ b/Solver/FuncHeaviside.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/SElement.cpp b/Solver/SElement.cpp
index f2818b3..a6d7afc 100644
--- a/Solver/SElement.cpp
+++ b/Solver/SElement.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/SElement.h b/Solver/SElement.h
index afc291b..22f40ec 100644
--- a/Solver/SElement.h
+++ b/Solver/SElement.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor33.cpp b/Solver/STensor33.cpp
index c7ca7bb..d176d0b 100644
--- a/Solver/STensor33.cpp
+++ b/Solver/STensor33.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor33.h b/Solver/STensor33.h
index f43e03d..8fc14aa 100644
--- a/Solver/STensor33.h
+++ b/Solver/STensor33.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -102,6 +102,9 @@ class STensor33 {
     return *this;
   }*/
   void print(const char *) const;
+
+  const double* data() const{return _val;}
+  double* data() {return _val;}
 };
 
 // tensor product
diff --git a/Solver/STensor43.cpp b/Solver/STensor43.cpp
index d1969ce..33a9833 100644
--- a/Solver/STensor43.cpp
+++ b/Solver/STensor43.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor43.h b/Solver/STensor43.h
index 4f75313..40d0bf5 100644
--- a/Solver/STensor43.h
+++ b/Solver/STensor43.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -78,6 +78,11 @@ class STensor43 {
     for (int i = 0; i < 81; i++) _val[i] += other._val[i];
     return *this;
   }
+  STensor43& operator -= (const STensor43 &other)
+  {
+    for (int i = 0; i < 81; i++) _val[i] -= other._val[i];
+    return *this;
+  }
   STensor43& operator *= (const double &other)
   {
     for (int i = 0; i < 81; i++) _val[i] *= other;
@@ -148,6 +153,8 @@ class STensor43 {
     return *this;
   }*/
   void print(const char *) const;
+  const double* data() const {return _val;}
+  double* data() {return _val;}
 };
 
 // tensor product
diff --git a/Solver/STensor53.cpp b/Solver/STensor53.cpp
index 45ed284..5ea71e3 100644
--- a/Solver/STensor53.cpp
+++ b/Solver/STensor53.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor53.h b/Solver/STensor53.h
index 92c6b6e..b43ff07 100644
--- a/Solver/STensor53.h
+++ b/Solver/STensor53.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor63.cpp b/Solver/STensor63.cpp
index 5fd3d15..1368fb4 100644
--- a/Solver/STensor63.cpp
+++ b/Solver/STensor63.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/STensor63.h b/Solver/STensor63.h
index 92f0942..1eaa2fc 100644
--- a/Solver/STensor63.h
+++ b/Solver/STensor63.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/crossConfTerm.h b/Solver/crossConfTerm.h
index a326037..07cc693 100644
--- a/Solver/crossConfTerm.h
+++ b/Solver/crossConfTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/distanceTerm.h b/Solver/distanceTerm.h
index c6b8881..51c1558 100644
--- a/Solver/distanceTerm.h
+++ b/Solver/distanceTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/dofManager.cpp b/Solver/dofManager.cpp
index a6fff9b..b163ac1 100644
--- a/Solver/dofManager.cpp
+++ b/Solver/dofManager.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/dofManager.h b/Solver/dofManager.h
index e6e477b..dfeee16 100644
--- a/Solver/dofManager.h
+++ b/Solver/dofManager.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/eigenSolver.cpp b/Solver/eigenSolver.cpp
index 17ee431..55ebb64 100644
--- a/Solver/eigenSolver.cpp
+++ b/Solver/eigenSolver.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -39,19 +39,19 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
   if(!_A) return false;
   Mat A = _A->getMatrix();
   Mat B = _B ? _B->getMatrix() : PETSC_NULL;
-  
+
   PetscInt N, M;
   _try(MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY));
   _try(MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY));
   _try(MatGetSize(A, &N, &M));
-  
+
   PetscInt N2, M2;
   if (_B) {
     _try(MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY));
     _try(MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY));
     _try(MatGetSize(B, &N2, &M2));
   }
-  
+
   // generalized eigenvalue problem A x - \lambda B x = 0
   EPS eps;
   _try(EPSCreate(PETSC_COMM_WORLD, &eps));
@@ -60,7 +60,7 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
     _try(EPSSetProblemType(eps, _B ? EPS_GHEP : EPS_HEP));
   else
     _try(EPSSetProblemType(eps, _B ? EPS_GNHEP : EPS_NHEP));
-  
+
   // set some default options
   _try(EPSSetDimensions(eps, numEigenValues, PETSC_DECIDE, PETSC_DECIDE));
   _try(EPSSetTolerances(eps, tolVal, iterMax));
@@ -74,10 +74,10 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
     _try(EPSSetType(eps, EPSPOWER));
   else
     Msg::Fatal("eigenSolver: method '%s' not available", method.c_str());
-  
+
   // override these options at runtime, petsc-style
   _try(EPSSetFromOptions(eps));
-  
+
   // force options specified directly as arguments
   if (numEigenValues)
     _try(EPSSetDimensions(eps, numEigenValues, PETSC_DECIDE, PETSC_DECIDE));
@@ -87,7 +87,7 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
     _try(EPSSetWhichEigenpairs(eps, EPS_SMALLEST_REAL));
   else if (which=="largest")
     _try(EPSSetWhichEigenpairs(eps, EPS_LARGEST_MAGNITUDE));
-  
+
   // print info
 #if (SLEPC_VERSION_RELEASE == 0 || (SLEPC_VERSION_MAJOR > 3 || (SLEPC_VERSION_MAJOR == 3 && SLEPC_VERSION_MINOR >= 4)))
   EPSType type;
@@ -96,7 +96,7 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
 #endif
   _try(EPSGetType(eps, &type));
   Msg::Debug("SLEPc solution method: %s", type);
-  
+
   PetscInt nev;
   _try(EPSGetDimensions(eps, &nev, PETSC_NULL, PETSC_NULL));
   Msg::Debug("SLEPc number of requested eigenvalues: %d", nev);
@@ -104,12 +104,12 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
   PetscInt maxit;
   _try(EPSGetTolerances(eps, &tol, &maxit));
   Msg::Debug("SLEPc stopping condition: tol=%g, maxit=%d", tol, maxit);
-  
+
   // solve
   Msg::Info("SLEPc solving...");
   double t1 = Cpu();
   _try(EPSSolve(eps));
-  
+
   // check convergence
   int its;
   _try(EPSGetIterationNumber(eps, &its));
@@ -127,12 +127,12 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
   else if (reason==EPS_DIVERGED_NONSYMMETRIC)
     Msg::Error("The operator is nonsymmetric");
 #endif
-  
+
   // get number of converged approximate eigenpairs
   PetscInt nconv;
   _try(EPSGetConverged(eps, &nconv));
   Msg::Debug("SLEPc number of converged eigenpairs: %d", nconv);
-  
+
   // ignore additional eigenvalues if we get more than what we asked
   if (nconv>nev) nconv = nev;
 
@@ -186,12 +186,13 @@ bool eigenSolver::solve(int numEigenValues, std::string which, std::string metho
     Msg::Warning("SLEPc failed");
     return false;
   }
-  
+
 }
 
-void eigenSolver::normalize_mode(double scale) {
+void eigenSolver::normalize_mode(std::vector<int> modeView, double scale) {
   Msg::Info("Normalize all eigenvectors");
-  for (unsigned int i=0; i<_eigenVectors.size(); i++) {
+  for (unsigned int imode=0; imode<modeView.size(); imode++) {
+    int i = modeView[imode];
     double norm = 0.;
     for (unsigned int j=0; j<_eigenVectors[i].size(); j++) {
       std::complex<double> val = _eigenVectors[i][j];
diff --git a/Solver/eigenSolver.h b/Solver/eigenSolver.h
index 0a7a94e..0b6191a 100644
--- a/Solver/eigenSolver.h
+++ b/Solver/eigenSolver.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -30,10 +30,10 @@ class eigenSolver {
               bool hermitian=true);
   bool solve(int numEigenValues=0, std::string which="", std::string method="krylovschur",
              double tolVal=1.e-7, int iterMax=20);
-  
+
   int getNumEigenValues() {return _eigenValues.size();}
   int getNumberEigenvectors() {return _eigenVectors.size();}
-  
+
   std::complex<double> getEigenValue(int num) {
     return _eigenValues[num];
   }
@@ -43,9 +43,9 @@ class eigenSolver {
   std::vector<std::complex<double> > &getEigenVector(int num) {
     return _eigenVectors[num];
   }
-  
-  void normalize_mode(double scale=1.);
-  
+
+  void normalize_mode(std::vector<int> modeView, double scale=1.);
+
   void clear() {
     _eigenValues.clear();
     _eigenVectors.clear();
@@ -73,7 +73,7 @@ class eigenSolver {
   std::complex<double> getEigenValue(int num) {return 0.;}
   std::complex<double> getEigenVectorComp(int num, int com) {return 0.;}
   std::vector<std::complex<double> > &getEigenVector(int num) {return _dummy;}
-  void normalize_mode(double scale=1.) {}
+  void normalize_mode(std::vector<int> modeView, double scale=1.) {}
   void clear() {}
 };
 
diff --git a/Solver/elasticitySolver.cpp b/Solver/elasticitySolver.cpp
index 58d1aa0..5e5534c 100644
--- a/Solver/elasticitySolver.cpp
+++ b/Solver/elasticitySolver.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -61,8 +61,8 @@ void elasticitySolver::setMesh(const std::string &meshFileName)
   _dim = pModel->getNumRegions() ? 3 : 2;
 
   if (LagSpace) delete LagSpace;
-  if (_dim==3) LagSpace=new VectorLagrangeFunctionSpace(_tag);
-  if (_dim==2) LagSpace=new VectorLagrangeFunctionSpace
+  if (_dim==3) LagSpace = new VectorLagrangeFunctionSpace(_tag);
+  if (_dim==2) LagSpace = new VectorLagrangeFunctionSpace
                  (_tag,VectorLagrangeFunctionSpace::VECTOR_X,
                   VectorLagrangeFunctionSpace::VECTOR_Y);
 
@@ -72,29 +72,27 @@ void elasticitySolver::setMesh(const std::string &meshFileName)
 
 void elasticitySolver::exportKb()
 {
-  FILE *f = Fopen ( "K.txt", "w" );
-  double valeur;
   std::string sysname = "A";
-  for ( int i = 0 ; i < pAssembler->sizeOfR() ; i ++ )
-  {
-    for ( int j = 0 ; j < pAssembler->sizeOfR() ; j ++ )
-    {
-      pAssembler->getLinearSystem ( sysname )->getFromMatrix ( i,j, valeur );
-      fprintf ( f,"%+e ",valeur ) ;
+  double valeur;
+  FILE *f = Fopen("K.txt", "w");
+  if(f){
+    for (int i = 0; i < pAssembler->sizeOfR(); i++){
+      for (int j = 0; j < pAssembler->sizeOfR(); j++ ){
+        pAssembler->getLinearSystem(sysname)->getFromMatrix (i, j, valeur);
+        fprintf (f, "%+e ", valeur) ;
+      }
+      fprintf(f,"\n");
     }
-    fprintf ( f,"\n" );
+    fclose (f);
   }
-
-  fclose ( f );
-
-  f = Fopen ( "b.txt", "w" );
-  for ( int i = 0 ; i < pAssembler->sizeOfR() ; i ++ )
-  {
-    pAssembler->getLinearSystem ( sysname )->getFromRightHandSide ( i,valeur );
-    fprintf ( f,"%+e\n",valeur ) ;
+  f = Fopen("b.txt", "w");
+  if(f){
+    for (int i = 0; i < pAssembler->sizeOfR(); i++){
+      pAssembler->getLinearSystem(sysname)->getFromRightHandSide(i, valeur);
+      fprintf(f, "%+e\n", valeur);
+    }
+    fclose(f);
   }
-
-  fclose ( f );
 }
 
 void elasticitySolver::solve()
@@ -119,12 +117,11 @@ void elasticitySolver::solve()
 //   printLinearSystem(lsys);
 
   double energ=0;
-  for (unsigned int i = 0; i < elasticFields.size(); i++)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); i++){
     SolverField<SVector3> Field(pAssembler, LagSpace);
     IsotropicElasticTerm Eterm(Field,elasticFields[i]._E,elasticFields[i]._nu);
     BilinearTermToScalarTerm Elastic_Energy_Term(Eterm);
-    Assemble(Elastic_Energy_Term,elasticFields[i].g->begin(),elasticFields[i].g->end(),
+    Assemble(Elastic_Energy_Term, elasticFields[i].g->begin(), elasticFields[i].g->end(),
              Integ_Bulk,energ);
   }
   printf("elastic energy=%f\n",energ);
@@ -135,8 +132,7 @@ void elasticitySolver::postSolve()
   GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
 
   double energ=0;
-  for (unsigned int i = 0; i < elasticFields.size(); i++)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); i++){
     SolverField<SVector3> Field(pAssembler, LagSpace);
     IsotropicElasticTerm Eterm(Field,elasticFields[i]._E,elasticFields[i]._nu);
     BilinearTermToScalarTerm Elastic_Energy_Term(Eterm);
@@ -149,6 +145,10 @@ void elasticitySolver::postSolve()
 void elasticitySolver::readInputFile(const std::string &fn)
 {
   FILE *f = Fopen(fn.c_str(), "r");
+  if(!f){
+    Msg::Error("Could not open file '%s'", fn.c_str());
+    return;
+  }
   char what[256];
   while(!feof(f)){
     if(fscanf(f, "%s", what) != 1){
@@ -156,12 +156,8 @@ void elasticitySolver::readInputFile(const std::string &fn)
       return;
     }
     if(what[0]=='#'){
-      /*
-      char *line=NULL;
-      size_t l = 0;
-      int r = getline(&line,&l,f);
-      free(line);
-      */
+      char buffer[1024];
+      fgets(buffer, sizeof(buffer), f);
     }
     else if (!strcmp(what, "ElasticDomain")){
       elasticField field;
@@ -185,7 +181,7 @@ void elasticitySolver::readInputFile(const std::string &fn)
       }
       field._tag = _tag;
       field._d = SVector3(d1, d2, d3);
-      field._f = simpleFunction<double>(val);
+      field._f = new simpleFunction<double>(val);
       field.g = new groupOfElements (_dim - 1, physical);
       LagrangeMultiplierFields.push_back(field);
     }
@@ -319,6 +315,7 @@ void elasticitySolver::readInputFile(const std::string &fn)
       int tag=1;
       gLevelsetPlane ls(a,b,c,d,tag);
       pModel = pModel->buildCutGModel(&ls);
+      pModel->writeMSH("cutMesh.msh");
     }
     else if (!strcmp(what, "CutMeshSphere")){
       double x, y, z, r;
@@ -329,6 +326,19 @@ void elasticitySolver::readInputFile(const std::string &fn)
       int tag=1;
       gLevelsetSphere ls(x,y,z,r,tag);
       pModel = pModel->buildCutGModel(&ls);
+      pModel->writeMSH("cutMesh.msh");
+    }
+    else if (!strcmp(what, "CutMeshMathExpr")){
+      char expr[256];
+      if(fscanf(f, "%s", expr) != 1){
+        fclose(f);
+        return;
+      }
+      std::string exprS(expr);
+      int tag=1;
+      gLevelsetMathEval ls(exprS,tag);
+      pModel = pModel->buildCutGModel(&ls);
+      pModel->writeMSH("cutMesh.msh");
     }
     else {
       Msg::Error("Invalid input : '%s'", what);
@@ -338,7 +348,8 @@ void elasticitySolver::readInputFile(const std::string &fn)
 }
 
 
-void elasticitySolver::addDirichletBC (int dim, int entityId, int component, double value) {
+void elasticitySolver::addDirichletBC(int dim, int entityId, int component, double value)
+{
   dirichletBC diri;
   diri.g = new groupOfElements (dim, entityId);
   diri._f= new simpleFunction<double>(value);
@@ -353,8 +364,14 @@ void elasticitySolver::addDirichletBC (int dim, int entityId, int component, dou
   allDirichlet.push_back(diri);
 }
 
+void elasticitySolver::addDirichletBC(int dim, std::string phys, int component, double value)
+{
+  int entityId = pModel->getPhysicalNumber(dim, phys);
+  addDirichletBC(dim, entityId, component, value);
+}
 
-void elasticitySolver::addNeumannBC (int dim, int entityId, const std::vector<double> value) {
+void elasticitySolver::addNeumannBC(int dim, int entityId, const std::vector<double> value)
+{
   if(value.size()!=3) return;
   neumannBC neu;
   neu.g = new groupOfElements (dim, entityId);
@@ -369,9 +386,14 @@ void elasticitySolver::addNeumannBC (int dim, int entityId, const std::vector<do
   allNeumann.push_back(neu);
 }
 
+void elasticitySolver::addNeumannBC(int dim, std::string phys, const std::vector<double> value)
+{
+  int entityId = pModel->getPhysicalNumber(dim, phys);
+  addNeumannBC(dim, entityId, value);
+}
 
-
-void elasticitySolver::addElasticDomain (int physical, double e, double nu){
+void elasticitySolver::addElasticDomain(int physical, double e, double nu)
+{
   elasticField field;
   field._tag = _tag;
   field._E = e;
@@ -380,6 +402,12 @@ void elasticitySolver::addElasticDomain (int physical, double e, double nu){
   elasticFields.push_back(field);
 }
 
+void elasticitySolver::addElasticDomain(std::string phys, double e, double nu)
+{
+  int entityId = pModel->getPhysicalNumber(_dim, phys);
+  addElasticDomain(entityId, e, nu);
+}
+
 elasticitySolver::elasticitySolver(GModel *model, int tag)
 {
   pModel = model;
@@ -387,7 +415,9 @@ elasticitySolver::elasticitySolver(GModel *model, int tag)
   _tag = tag;
   pAssembler = NULL;
   if (_dim==3) LagSpace=new VectorLagrangeFunctionSpace(_tag);
-  if (_dim==2) LagSpace=new VectorLagrangeFunctionSpace(_tag,VectorLagrangeFunctionSpace::VECTOR_X,VectorLagrangeFunctionSpace::VECTOR_Y);
+  if (_dim==2) LagSpace=new VectorLagrangeFunctionSpace(_tag,
+                VectorLagrangeFunctionSpace::VECTOR_X,
+                VectorLagrangeFunctionSpace::VECTOR_Y);
   LagrangeMultiplierSpace = new ScalarLagrangeFunctionSpace(_tag+1);
 }
 
@@ -401,28 +431,24 @@ void elasticitySolver::assemble(linearSystem<double> *lsys)
   // numbered afterwards
 
   // Dirichlet conditions
-  for (unsigned int i = 0; i < allDirichlet.size(); i++)
-  {
+  for (unsigned int i = 0; i < allDirichlet.size(); i++){
     FilterDofComponent filter(allDirichlet[i]._comp);
-    FixNodalDofs(*LagSpace,allDirichlet[i].g->begin(),allDirichlet[i].g->end(),
-                 *pAssembler,*allDirichlet[i]._f,filter);
+    FixNodalDofs(*LagSpace, allDirichlet[i].g->begin(), allDirichlet[i].g->end(),
+                 *pAssembler, *allDirichlet[i]._f, filter);
   }
   // LagrangeMultipliers
-  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
     NumberDofs(*LagrangeMultiplierSpace, LagrangeMultiplierFields[i].g->begin(),
                LagrangeMultiplierFields[i].g->end(), *pAssembler);
   }
   // Elastic Fields
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     if(elasticFields[i]._E != 0.)
       NumberDofs(*LagSpace, elasticFields[i].g->begin(), elasticFields[i].g->end(),
                  *pAssembler);
   }
   // Voids
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     if(elasticFields[i]._E == 0.)
       FixVoidNodalDofs(*LagSpace, elasticFields[i].g->begin(), elasticFields[i].g->end(),
                        *pAssembler);
@@ -430,19 +456,17 @@ void elasticitySolver::assemble(linearSystem<double> *lsys)
   // Neumann conditions
   GaussQuadrature Integ_Boundary(GaussQuadrature::Val);
 
-  for (unsigned int i = 0; i < allNeumann.size(); i++)
-  {
-    LoadTerm<SVector3> Lterm(*LagSpace,*allNeumann[i]._f);
-    Assemble(Lterm,*LagSpace,allNeumann[i].g->begin(),allNeumann[i].g->end(),
+  for (unsigned int i = 0; i < allNeumann.size(); i++){
+    LoadTerm<SVector3> Lterm(*LagSpace, allNeumann[i]._f);
+    Assemble(Lterm, *LagSpace, allNeumann[i].g->begin(), allNeumann[i].g->end(),
              Integ_Boundary,*pAssembler);
   }
   // Assemble cross term, laplace term and rhs term for LM
   GaussQuadrature Integ_LagrangeMult(GaussQuadrature::ValVal);
   GaussQuadrature Integ_Laplace(GaussQuadrature::GradGrad);
-  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); i++)
-  {
-    LagrangeMultiplierTerm LagTerm(*LagSpace, *LagrangeMultiplierSpace,
-                                   LagrangeMultiplierFields[i]._d);
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); i++){
+    LagrangeMultiplierTerm<SVector3> LagTerm(*LagSpace, *LagrangeMultiplierSpace,
+                                             LagrangeMultiplierFields[i]._d);
     Assemble(LagTerm, *LagSpace, *LagrangeMultiplierSpace,
              LagrangeMultiplierFields[i].g->begin(),
              LagrangeMultiplierFields[i].g->end(), Integ_LagrangeMult, *pAssembler);
@@ -458,11 +482,10 @@ void elasticitySolver::assemble(linearSystem<double> *lsys)
   }
   // Assemble elastic term for
   GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
-  for (unsigned int i = 0; i < elasticFields.size(); i++)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); i++){
     IsotropicElasticTerm Eterm(*LagSpace,elasticFields[i]._E,elasticFields[i]._nu);
-    Assemble(Eterm,*LagSpace,elasticFields[i].g->begin(),elasticFields[i].g->end(),
-             Integ_Bulk,*pAssembler);
+    Assemble(Eterm, *LagSpace, elasticFields[i].g->begin(), elasticFields[i].g->end(),
+             Integ_Bulk, *pAssembler);
   }
 
   /*for (int i=0;i<pAssembler->sizeOfR();i++){
@@ -479,87 +502,122 @@ void elasticitySolver::assemble(linearSystem<double> *lsys)
 
 }
 
-void elasticitySolver::getSolutionOnElement (MElement *el, fullMatrix<double> &sol) {
+void elasticitySolver::computeEffectiveStiffness(std::vector<double> stiff)
+{
+  double st[6] = {0., 0., 0., 0., 0., 0.};
+  double volTot = 0.;
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
+    double E = elasticFields[i]._E;
+    double nu = elasticFields[i]._nu;
+    SolverField<SVector3> Field(pAssembler, LagSpace);
+    for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
+      double vol = e->getVolume() * e->getVolumeSign();
+      int nbVertex = e->getNumVertices();
+      std::vector<SVector3> val(nbVertex);
 
-}
+      double valx[256];
+      double valy[256];
+      double valz[256];
+      for (int k = 0; k < nbVertex; k++){
+	MVertex *v = e->getVertex(k);
+	MPoint p(v);
+	Field.f(&p, 0, 0, 0, val[k]);
+	valx[k] = val[k](0);
+	valy[k] = val[k](1);
+	valz[k] = val[k](2);
+      }
 
-#if defined(HAVE_POST)
-/*
-static void deformation(dofManager<double> *a, MElement *e,
-			double u, double v, double w, int _tag, double *eps){
-  double valx[256];
-  double valy[256];
-  double valz[256];
-  for (int k = 0; k < e->getNumVertices(); k++){
-    a->getDofValue(e->getVertex(k), 0, _tag, valx[k]);
-    a->getDofValue(e->getVertex(k), 1, _tag, valy[k]);
-    a->getDofValue(e->getVertex(k), 2, _tag, valz[k]);
+      double gradux[3];
+      double graduy[3];
+      double graduz[3];
+      SPoint3 center = e->barycenterUVW();
+      double u = center.x(), v = center.y(), w = center.z();
+      e->interpolateGrad(valx, u, v, w, gradux);
+      e->interpolateGrad(valy, u, v, w, graduy);
+      e->interpolateGrad(valz, u, v, w, graduz);
+
+      double eps[6] = {gradux[0], graduy[1], graduz[2],
+		       0.5 * (gradux[1] + graduy[0]),
+		       0.5 * (gradux[2] + graduz[0]),
+		       0.5 * (graduy[2] + graduz[1])};
+
+      double A = E / (1. + nu);
+      double B = A * (nu / (1. - 2 * nu));
+      double trace = eps[0] + eps[1] + eps[2] ;
+      st[0] += (A * eps[0] + B * trace) * vol;
+      st[1] += (A * eps[1] + B * trace) * vol;
+      st[2] += (A * eps[2] + B * trace) * vol;
+      st[3] += (A * eps[3]) * vol;
+      st[4] += (A * eps[4]) * vol;
+      st[5] += (A * eps[5]) * vol;
+      volTot += vol;
+    }
   }
-  double gradux[3];
-  double graduy[3];
-  double graduz[3];
-  e->interpolateGrad(valx, u, v, w, gradux);
-  e->interpolateGrad(valy, u, v, w, graduy);
-  e->interpolateGrad(valz, u, v, w, graduz);
-
-  eps[0] = gradux[0];
-  eps[1] = graduy[1];
-  eps[2] = graduz[2];
-  eps[3] = 0.5 * (gradux[1] + graduy[0]);
-  eps[4] = 0.5 * (gradux[2] + graduz[0]);
-  eps[5] = 0.5 * (graduy[2] + graduz[1]);
+  for(int i = 0; i < 6;i++)
+    stiff[i] = st[i] / volTot;
 }
 
-static double vonMises(dofManager<double> *a, MElement *e,
-                       double u, double v, double w,
-                       double E, double nu, int _tag){
-
-  double valx[256];
-  double valy[256];
-  double valz[256];
-  for (int k = 0; k < e->getNumVertices(); k++){
-    a->getDofValue(e->getVertex(k), 0, _tag, valx[k]);
-    a->getDofValue(e->getVertex(k), 1, _tag, valy[k]);
-    a->getDofValue(e->getVertex(k), 2, _tag, valz[k]);
+void elasticitySolver::computeEffectiveStrain(std::vector<double> strain)
+{
+  double st[6] = {0., 0., 0., 0., 0., 0.};
+  double volTot = 0.;
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
+    SolverField<SVector3> Field(pAssembler, LagSpace);
+    for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
+      double vol = e->getVolume() * e->getVolumeSign();
+      int nbVertex = e->getNumVertices();
+      std::vector<SVector3> val(nbVertex);
+
+      double valx[256];
+      double valy[256];
+      double valz[256];
+      for (int k = 0; k < nbVertex; k++){
+	MVertex *v = e->getVertex(k);
+	MPoint p(v);
+	Field.f(&p, 0, 0, 0, val[k]);
+	valx[k] = val[k](0);
+	valy[k] = val[k](1);
+	valz[k] = val[k](2);
+      }
+
+      double gradux[3];
+      double graduy[3];
+      double graduz[3];
+      SPoint3 center = e->barycenterUVW();
+      double u = center.x(), v = center.y(), w = center.z();
+      e->interpolateGrad(valx, u, v, w, gradux);
+      e->interpolateGrad(valy, u, v, w, graduy);
+      e->interpolateGrad(valz, u, v, w, graduz);
+
+      st[0] += gradux[0] * vol;
+      st[1] += graduy[1] * vol;
+      st[2] += graduz[2] * vol;
+      st[3] += 0.5 * (gradux[1] + graduy[0]) * vol;
+      st[4] += 0.5 * (gradux[2] + graduz[0]) * vol;
+      st[5] += 0.5 * (graduy[2] + graduz[1]) * vol;
+      volTot += vol;
+    }
   }
-  double gradux[3];
-  double graduy[3];
-  double graduz[3];
-  e->interpolateGrad(valx, u, v, w, gradux);
-  e->interpolateGrad(valy, u, v, w, graduy);
-  e->interpolateGrad(valz, u, v, w, graduz);
-
-  double eps[6] = {gradux[0], graduy[1], graduz[2],
-                   0.5 * (gradux[1] + graduy[0]),
-                   0.5 * (gradux[2] + graduz[0]),
-                   0.5 * (graduy[2] + graduz[1])};
-  double A = E / (1. + nu);
-  double B = A * (nu / (1. - 2 * nu));
-  double trace = eps[0] + eps[1] + eps[2] ;
-  double sxx = A * eps[0] + B * trace;
-  double syy = A * eps[1] + B * trace;
-  double szz = A * eps[2] + B * trace;
-  double sxy = A * eps[3];
-  double sxz = A * eps[4];
-  double syz = A * eps[5];
-
-  double s[9] = {sxx, sxy, sxz, sxy, syy, syz,sxz, syz, szz};
-
-  return ComputeVonMises(s);
+  for(int i = 0; i < 6;i++)
+    strain[i] = st[i] / volTot;
 }
-*/
+
+#if defined(HAVE_POST)
 
 PView* elasticitySolver::buildDisplacementView (const std::string postFileName)
 {
   std::cout <<  "build Displacement View"<< std::endl;
   std::set<MVertex*> v;
-  std::map<MVertex*,MElement*> vCut;
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  std::map<MVertex*, MElement*> vCut;
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     if(elasticFields[i]._E == 0.) continue;
     for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
          it != elasticFields[i].g->end(); ++it){
-      MElement *e=*it;
+      MElement *e = *it;
       if(e->getParent()) {
         for (int j = 0; j < e->getNumVertices(); ++j) {
           if(vCut.find(e->getVertex(j)) == vCut.end())
@@ -577,18 +635,20 @@ PView* elasticitySolver::buildDisplacementView (const std::string postFileName)
   for (std::set<MVertex*>::iterator it = v.begin(); it != v.end(); ++it){
     SVector3 val;
     MPoint p(*it);
-    Field.f(&p,0,0,0,val);
-    std::vector<double> vec(3);vec[0]=val(0);vec[1]=val(1);vec[2]=val(2);
-    data[(*it)->getNum()]=vec;
+    Field.f(&p, 0, 0, 0, val);
+    std::vector<double> vec(3);
+    vec[0] = val(0); vec[1] = val(1); vec[2] = val(2);
+    data[(*it)->getNum()] = vec;
   }
   for (std::map<MVertex*,MElement*>::iterator it = vCut.begin(); it != vCut.end(); ++it){
     SVector3 val;
     double uvw[3];
     double xyz[3] = {it->first->x(), it->first->y(), it->first->z()};
     it->second->xyz2uvw(xyz, uvw);
-    Field.f(it->second,uvw[0],uvw[1],uvw[2],val);
-    std::vector<double> vec(3);vec[0]=val(0);vec[1]=val(1);vec[2]=val(2);
-    data[it->first->getNum()]=vec;
+    Field.f(it->second, uvw[0], uvw[1], uvw[2], val);
+    std::vector<double> vec(3);
+    vec[0] = val(0); vec[1] = val(1); vec[2] = val(2);
+    data[it->first->getNum()] = vec;
   }
   PView *pv = new PView (postFileName, "NodeData", pModel, data, 0.0);
   return pv;
@@ -596,20 +656,19 @@ PView* elasticitySolver::buildDisplacementView (const std::string postFileName)
 
 PView* elasticitySolver::buildStressesView (const std::string postFileName)
 {
+  double sti[6] = {0., 0., 0., 0., 0., 0.};
+  double str[6] = {0., 0., 0., 0., 0., 0.};
+  double volTot = 0.;
   std::cout <<  "build stresses view"<< std::endl;
   std::map<int, std::vector<double> > data;
-  GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     double E = elasticFields[i]._E;
     double nu = elasticFields[i]._nu;
     SolverField<SVector3> Field(pAssembler, LagSpace);
-    IsotropicElasticTerm Eterm(Field,elasticFields[i]._E,elasticFields[i]._nu);
-    BilinearTermToScalarTerm Elastic_Energy_Term(Eterm);
     for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
-         it != elasticFields[i].g->end(); ++it)
-    {
-      MElement *e=*it;
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
+      double vol = e->getVolume() * e->getVolumeSign();
       int nbVertex = e->getNumVertices();
       std::vector<SVector3> val(nbVertex);
 
@@ -619,16 +678,17 @@ PView* elasticitySolver::buildStressesView (const std::string postFileName)
       for (int k = 0; k < nbVertex; k++){
 	MVertex *v = e->getVertex(k);
 	MPoint p(v);
-	Field.f(&p,0,0,0,val[k]);
-	valx[k] =val[k](0);
-	valy[k] =val[k](1);
-	valz[k] =val[k](2);
+	Field.f(&p, 0, 0, 0, val[k]);
+	valx[k] = val[k](0);
+	valy[k] = val[k](1);
+	valz[k] = val[k](2);
       }
 
       double gradux[3];
       double graduy[3];
       double graduz[3];
-      double u=0.33, v=0.33, w=0.0;
+      SPoint3 center = e->barycenterUVW();
+      double u = center.x(), v = center.y(), w = center.z();
       e->interpolateGrad(valx, u, v, w, gradux);
       e->interpolateGrad(valy, u, v, w, graduy);
       e->interpolateGrad(valz, u, v, w, graduz);
@@ -638,7 +698,6 @@ PView* elasticitySolver::buildStressesView (const std::string postFileName)
 		       0.5 * (gradux[2] + graduz[0]),
 		       0.5 * (graduy[2] + graduz[1])};
 
-
       double A = E / (1. + nu);
       double B = A * (nu / (1. - 2 * nu));
       double trace = eps[0] + eps[1] + eps[2] ;
@@ -650,15 +709,79 @@ PView* elasticitySolver::buildStressesView (const std::string postFileName)
       double syz = A * eps[5];
 
       std::vector<double> vec(9);
-      vec[0]=sxx; vec[1]=sxy; vec[2]=sxz; vec[3]=sxy; vec[4]=syy;
-      vec[5]=syz; vec[6]=sxz; vec[7]=syz; vec[8]=szz;
-
-      data[e->getNum()]=vec;
+      vec[0] = sxx; vec[1] = sxy; vec[2] = sxz;
+      vec[3] = sxy; vec[4] = syy; vec[5] = syz;
+      vec[6] = sxz; vec[7] = syz; vec[8] = szz;
+
+      data[e->getNum()] = vec;
+
+      for(int k = 0; k < 6; k++)
+        str[k] += eps[k] * vol;
+      sti[0] += sxx * vol;
+      sti[1] += syy * vol;
+      sti[2] += szz * vol;
+      sti[3] += sxy * vol;
+      sti[4] += sxz * vol;
+      sti[5] += syz * vol;
+      volTot += vol;
     }
   }
+  for(int i = 0; i < 6; i++){
+    str[i] = str[i] / volTot;
+    sti[i] = sti[i] / volTot;
+  }
+  printf("effective stiffn = ");for(int i = 0; i < 6; i++) printf("%g ",sti[i]);printf("\n");
+  printf("effective strain = ");for(int i = 0; i < 6; i++) printf("%g ",str[i]);printf("\n");
+
   PView *pv = new PView (postFileName, "ElementData", pModel, data, 0.0);
   return pv;
+}
 
+PView* elasticitySolver::buildStrainView (const std::string postFileName)
+{
+  std::cout <<  "build strain view"<< std::endl;
+  std::map<int, std::vector<double> > data;
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
+    SolverField<SVector3> Field(pAssembler, LagSpace);
+    for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
+      int nbVertex = e->getNumVertices();
+      std::vector<SVector3> val(nbVertex);
+
+      double valx[256];
+      double valy[256];
+      double valz[256];
+      for (int k = 0; k < nbVertex; k++){
+	MVertex *v = e->getVertex(k);
+	MPoint p(v);
+	Field.f(&p, 0, 0, 0, val[k]);
+	valx[k] = val[k](0);
+	valy[k] = val[k](1);
+	valz[k] = val[k](2);
+      }
+
+      double gradux[3];
+      double graduy[3];
+      double graduz[3];
+      double u = 0.33, v = 0.33, w = 0.0;
+      e->interpolateGrad(valx, u, v, w, gradux);
+      e->interpolateGrad(valy, u, v, w, graduy);
+      e->interpolateGrad(valz, u, v, w, graduz);
+
+      std::vector<double> vec(9);
+      vec[0] = gradux[0];
+      vec[4] = graduy[1];
+      vec[8] = graduy[2];
+      vec[1] = vec[3] = 0.5 * (gradux[0] + graduy[1]);
+      vec[2] = vec[6] = 0.5 * (gradux[0] + graduz[2]);
+      vec[5] = vec[7] = 0.5 * (gradux[1] + graduz[2]);
+
+      data[e->getNum()] = vec;
+    }
+  }
+  PView *pv = new PView(postFileName, "ElementData", pModel, data, 0.0);
+  return pv;
 }
 
 PView* elasticitySolver::buildLagrangeMultiplierView (const std::string postFileName)
@@ -666,20 +789,17 @@ PView* elasticitySolver::buildLagrangeMultiplierView (const std::string postFile
   std::cout <<  "build Lagrange Multiplier View"<< std::endl;
   if(!LagrangeMultiplierSpace) return new PView();
   std::set<MVertex*> v;
-  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
     for(groupOfElements::elementContainer::const_iterator it =
           LagrangeMultiplierFields[i].g->begin();
-        it != LagrangeMultiplierFields[i].g->end(); ++it)
-    {
+        it != LagrangeMultiplierFields[i].g->end(); ++it){
       MElement *e = *it;
       for (int j = 0; j < e->getNumVertices(); ++j) v.insert(e->getVertex(j));
     }
   }
   std::map<int, std::vector<double> > data;
   SolverField<double> Field(pAssembler, LagrangeMultiplierSpace);
-  for(std::set<MVertex*>::iterator it = v.begin(); it != v.end(); ++it)
-  {
+  for(std::set<MVertex*>::iterator it = v.begin(); it != v.end(); ++it){
     double val;
     MPoint p(*it);
     Field.f(&p, 0, 0, 0, val);
@@ -697,60 +817,95 @@ PView *elasticitySolver::buildElasticEnergyView(const std::string postFileName)
   std::cout <<  "build Elastic Energy View"<< std::endl;
   std::map<int, std::vector<double> > data;
   GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     if(elasticFields[i]._E == 0.) continue;
     SolverField<SVector3> Field(pAssembler, LagSpace);
-    IsotropicElasticTerm Eterm(Field,elasticFields[i]._E,elasticFields[i]._nu);
+    IsotropicElasticTerm Eterm(Field, elasticFields[i]._E, elasticFields[i]._nu);
     BilinearTermToScalarTerm Elastic_Energy_Term(Eterm);
     ScalarTermConstant<double> One(1.0);
     for (groupOfElements::elementContainer::const_iterator it =
-           elasticFields[i].g->begin(); it != elasticFields[i].g->end(); ++it)
-    {
+           elasticFields[i].g->begin(); it != elasticFields[i].g->end(); ++it){
       MElement *e = *it;
       double energ;
       double vol;
       IntPt *GP;
-      int npts=Integ_Bulk.getIntPoints(e,&GP);
-      Elastic_Energy_Term.get(e,npts,GP,energ);
-      One.get(e,npts,GP,vol);
+      int npts = Integ_Bulk.getIntPoints(e, &GP);
+      Elastic_Energy_Term.get(e, npts, GP, energ);
+      One.get(e, npts, GP, vol);
       std::vector<double> vec;
-      vec.push_back(energ/vol);
-      data[e->getNum()]=vec;
+      vec.push_back(energ / vol);
+      data[e->getNum()] = vec;
     }
   }
   PView *pv = new PView (postFileName, "ElementData", pModel, data, 0.0);
   return pv;
 }
 
+PView *elasticitySolver::buildVolumeView(const std::string postFileName)
+{
+  std::cout <<  "build Volume View";
+  std::map<int, std::vector<double> > data;
+  double voltot = 0; double length = 0;
+  GaussQuadrature Integ_Vol(GaussQuadrature::Val);
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
+    ScalarTermConstant<double> One(1.0);
+    for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
+      double vol;
+      IntPt *GP;
+      int npts = Integ_Vol.getIntPoints(e, &GP);
+      One.get(e, npts, GP, vol);
+      voltot += vol;
+      std::vector<double> vec;
+      vec.push_back(vol);
+      data[e->getNum()] = vec;
+    }
+  }
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
+    ScalarTermConstant<double> One(1.0);
+    for (groupOfElements::elementContainer::const_iterator it = LagrangeMultiplierFields[i].g->begin();
+         it != LagrangeMultiplierFields[i].g->end(); ++it){
+      MElement *e = *it;
+      double l;
+      IntPt *GP;
+      int npts = Integ_Vol.getIntPoints(e, &GP);
+      One.get(e, npts, GP, l);
+      length += l;
+    }
+    std::cout << " : length " << LagrangeMultiplierFields[i]._tag << " = " << length;
+    length = 0;
+  }
+  PView *pv = new PView (postFileName, "ElementData", pModel, data, 0.0, 1);
+  std::cout << " / total vol = " << voltot << std::endl;
+  return pv;
+}
+
 PView *elasticitySolver::buildVonMisesView(const std::string postFileName)
 {
   std::cout <<  "build elastic view"<< std::endl;
   std::map<int, std::vector<double> > data;
   GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
-  for (unsigned int i = 0; i < elasticFields.size(); ++i)
-  {
+  for (unsigned int i = 0; i < elasticFields.size(); ++i){
     SolverField<SVector3> Field(pAssembler, LagSpace);
-    IsotropicElasticTerm Eterm(Field,elasticFields[i]._E,elasticFields[i]._nu);
+    IsotropicElasticTerm Eterm(Field, elasticFields[i]._E, elasticFields[i]._nu);
     BilinearTermToScalarTerm Elastic_Energy_Term(Eterm);
     for (groupOfElements::elementContainer::const_iterator it = elasticFields[i].g->begin();
-         it != elasticFields[i].g->end(); ++it)
-    {
-      MElement *e=*it;
+         it != elasticFields[i].g->end(); ++it){
+      MElement *e = *it;
       double energ;
       IntPt *GP;
-      int npts=Integ_Bulk.getIntPoints(e,&GP);
-      Elastic_Energy_Term.get(e,npts,GP,energ);
+      int npts = Integ_Bulk.getIntPoints(e, &GP);
+      Elastic_Energy_Term.get(e, npts, GP, energ);
       std::vector<double> vec;
       vec.push_back(energ);
-      data[(*it)->getNum()]=vec;
+      data[(*it)->getNum()] = vec;
     }
   }
   PView *pv = new PView (postFileName, "ElementData", pModel, data, 0.0);
   return pv;
 }
 
-
 #else
 
 PView* elasticitySolver::buildDisplacementView(const std::string postFileName)
@@ -759,6 +914,12 @@ PView* elasticitySolver::buildDisplacementView(const std::string postFileName)
   return 0;
 }
 
+PView* elasticitySolver::buildStrainView(const std::string postFileName)
+{
+  Msg::Error("Post-pro module not available");
+  return 0;
+}
+
 PView* elasticitySolver::buildLagrangeMultiplierView (const std::string postFileName)
 {
   Msg::Error("Post-pro module not available");
@@ -782,5 +943,10 @@ PView* elasticitySolver::buildStressesView (const std::string postFileName)
   Msg::Error("Post-pro module not available");
   return 0;
 }
+PView *elasticitySolver::buildVolumeView(const std::string postFileName)
+{
+  Msg::Error("Post-pro module not available");
+  return 0;
+}
 
 #endif
diff --git a/Solver/elasticitySolver.h b/Solver/elasticitySolver.h
index cfb8791..27811f3 100644
--- a/Solver/elasticitySolver.h
+++ b/Solver/elasticitySolver.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -22,7 +22,7 @@ struct LagrangeMultiplierField {
   groupOfElements *g;
   double _tau;
   SVector3 _d;
-  simpleFunction<double> _f;
+  simpleFunction<double> *_f;
   LagrangeMultiplierField() : _tag(0), g(0){}
 };
 
@@ -78,9 +78,12 @@ class elasticitySolver
 
   elasticitySolver(GModel *model, int tag);
 
-  void addDirichletBC (int dim, int entityId, int component, double value);
-  void addNeumannBC (int dim, int entityId, const std::vector<double> value);
-  void addElasticDomain (int tag, double e, double nu);
+  void addDirichletBC(int dim, int entityId, int component, double value);
+  void addDirichletBC(int dim, std::string phys, int component, double value);
+  void addNeumannBC(int dim, int entityId, const std::vector<double> value);
+  void addNeumannBC(int dim, std::string phys, const std::vector<double> value);
+  void addElasticDomain(int tag, double e, double nu);
+  void addElasticDomain(std::string phys, double e, double nu);
 
   virtual ~elasticitySolver()
   {
@@ -95,12 +98,15 @@ class elasticitySolver
   void solve();
   void postSolve();
   void exportKb();
-  void getSolutionOnElement(MElement *el, fullMatrix<double> &sol);
+  void computeEffectiveStiffness(std::vector<double> stiff);
+  void computeEffectiveStrain(std::vector<double> strain);
   virtual PView *buildDisplacementView(const std::string postFileName);
+  virtual PView *buildStrainView(const std::string postFileName);
   virtual PView *buildStressesView(const std::string postFileName);
   virtual PView *buildLagrangeMultiplierView(const std::string posFileName);
   virtual PView *buildElasticEnergyView(const std::string postFileName);
   virtual PView *buildVonMisesView(const std::string postFileName);
+  virtual PView *buildVolumeView(const std::string postFileName);
   // std::pair<PView *, PView*> buildErrorEstimateView
   //   (const std::string &errorFileName, double, int);
   // std::pair<PView *, PView*> buildErrorEstimateView
diff --git a/Solver/elasticityTerm.cpp b/Solver/elasticityTerm.cpp
index 3f6d0ec..5b518f6 100644
--- a/Solver/elasticityTerm.cpp
+++ b/Solver/elasticityTerm.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/elasticityTerm.h b/Solver/elasticityTerm.h
index 50680da..8916567 100644
--- a/Solver/elasticityTerm.h
+++ b/Solver/elasticityTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/femTerm.h b/Solver/femTerm.h
index 85d8ccd..096338e 100644
--- a/Solver/femTerm.h
+++ b/Solver/femTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -54,7 +54,7 @@ class femTerm {
                    groupOfElements &C) const
   {
     groupOfElements::elementContainer::const_iterator it = L.begin();
-    for ( ; it != L.end() ; ++it){
+    for ( ; it != L.end(); ++it){
       MElement *eL = *it;
       if (&C == &L || C.find(eL)){
         SElement se(eL);
@@ -78,7 +78,7 @@ class femTerm {
   {
     const int nbR = localMatrix.size1();
     const int nbC = localMatrix.size2();
-    std::vector<Dof> R,C; // better use default consdtructors and reserve the right amount of space to avoid reallocation
+    std::vector<Dof> R, C; // better use default consdtructors and reserve the right amount of space to avoid reallocation
     R.reserve(nbR);
     C.reserve(nbC);
     bool sym=true; 
@@ -90,12 +90,12 @@ class femTerm {
         Dof c(getLocalDofC(se, j));
         R.push_back(r);
         C.push_back(c);
-        if (!(r==c)) sym=false;
+        if (!(r == c)) sym = false;
       }
     }
     else
     {
-      sym=false;
+      sym = false;
       for (int j = 0; j < nbR; j++)
         R.push_back(getLocalDofR(se, j));
       for (int k = 0; k < nbC; k++)
@@ -118,6 +118,31 @@ class femTerm {
       dm.fixVertex(v[i], comp, field, e(v[i]->x(), v[i]->y(), v[i]->z()));
   }
 
+  void neumannNodalBC(MElement *e, int comp, int field,
+                      const simpleFunction<dataVec> &fct,
+                      dofManager<dataVec> &dm)
+  {
+    double jac[3][3];
+    double sf[256];
+    int integrationOrder = 2 * e->getPolynomialOrder();
+    int npts;
+    IntPt *GP;
+    e->getIntegrationPoints(integrationOrder, &npts, &GP);
+    for (int ip = 0; ip < npts; ip++){
+      const double u = GP[ip].pt[0];
+      const double v = GP[ip].pt[1];
+      const double w = GP[ip].pt[2];
+      const double weight = GP[ip].weight;
+      const double detJ = e->getJacobian(u, v, w, jac);
+      SPoint3 p; e->pnt(u, v, w, p);
+      e->getShapeFunctions(u, v, w, sf);
+      const dataVec FCT = fct(p.x(), p.y(), p.z());
+      for (int k = 0; k < e->getNumShapeFunctions(); k++){
+        dm.assemble(e->getShapeFunctionNode(k), comp, field, detJ * weight * sf[k] * FCT);
+      }
+    }
+  }
+
   void neumannNodalBC(int physical, int dim, int comp, int field,
                       const simpleFunction<dataVec> &fct,
                       dofManager<dataVec> &dm)
@@ -127,30 +152,31 @@ class femTerm {
     m->getPhysicalGroups(groups);
     std::map<int, std::vector<GEntity*> >::iterator it = groups[dim].find(physical);
     if (it == groups[dim].end()) return;
-    double jac[3][3];
-    double sf[256];
     for (unsigned int i = 0; i < it->second.size(); ++i){
       GEntity *ge = it->second[i];
       for (unsigned int j = 0; j < ge->getNumMeshElements(); j++){
         MElement *e = ge->getMeshElement(j);
-        int integrationOrder = 2 * e->getPolynomialOrder();
-        int nbNodes = e->getNumVertices();
-        int npts;
-        IntPt *GP;
-        e->getIntegrationPoints(integrationOrder, &npts, &GP);
-        for (int ip = 0; ip < npts; ip++){
-          const double u = GP[ip].pt[0];
-          const double v = GP[ip].pt[1];
-          const double w = GP[ip].pt[2];
-          const double weight = GP[ip].weight;
-          const double detJ = e->getJacobian(u, v, w, jac);
-          SPoint3 p; e->pnt(u, v, w, p);
-          e->getShapeFunctions(u, v, w, sf);
-          const dataVec FCT = fct(p.x(), p.y(), p.z());
-          for (int k = 0; k < nbNodes; k++){
-            dm.assemble(e->getVertex(k), comp, field, detJ * weight * sf[k] * FCT);
-          }
-        }
+        neumannNodalBC(e, comp, field, fct, dm);
+      }
+    }
+  }
+  void neumannNormalNodalBC(int physical, int dim, int field,
+                            const simpleFunction<dataVec> &fct,
+                            dofManager<dataVec> &dm)
+  {
+    std::map<int, std::vector<GEntity*> > groups[4];
+    GModel *m = _gm;
+    m->getPhysicalGroups(groups);
+    std::map<int, std::vector<GEntity*> >::iterator it = groups[dim].find(physical);
+    if (it == groups[dim].end()) return;
+    for (unsigned int i = 0; i < it->second.size(); ++i){
+      GEntity *ge = it->second[i];
+      for (unsigned int j = 0; j < ge->getNumMeshElements(); j++){
+        MElement *e = ge->getMeshElement(j);
+        
+        neumannNodalBC(e, 0, field, fct, dm);
+        neumannNodalBC(e, 1, field, fct, dm);
+        neumannNodalBC(e, 2, field, fct, dm);
       }
     }
   }
@@ -182,8 +208,8 @@ class DummyfemTerm : public femTerm<double>
  private : // i dont want to mess with this anymore
   virtual int sizeOfC(SElement *se) const {return 0;}
   virtual int sizeOfR(SElement *se) const {return 0;}
-  virtual Dof getLocalDofR(SElement *se, int iRow) const {return Dof(0,0);}
-  virtual Dof getLocalDofC(SElement *se, int iCol) const {return Dof(0,0);}
+  virtual Dof getLocalDofR(SElement *se, int iRow) const {return Dof(0, 0);}
+  virtual Dof getLocalDofC(SElement *se, int iCol) const {return Dof(0, 0);}
   virtual void elementMatrix(SElement *se, fullMatrix<dataMat> &m) const {m.scale(0.);}
   virtual void elementVector(SElement *se, fullVector<dataVec> &m) const {m.scale(0.);}
 };
diff --git a/Solver/filters.cpp b/Solver/filters.cpp
index ec4dc24..fb38906 100644
--- a/Solver/filters.cpp
+++ b/Solver/filters.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/filters.h b/Solver/filters.h
index ae3bb32..0d762e6 100644
--- a/Solver/filters.h
+++ b/Solver/filters.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/frameSolver.h b/Solver/frameSolver.h
index d716ec4..dbe7238 100644
--- a/Solver/frameSolver.h
+++ b/Solver/frameSolver.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/functionSpace.cpp b/Solver/functionSpace.cpp
index 2bf4820..9a84a81 100644
--- a/Solver/functionSpace.cpp
+++ b/Solver/functionSpace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/functionSpace.h b/Solver/functionSpace.h
index d890cd0..09cddbe 100644
--- a/Solver/functionSpace.h
+++ b/Solver/functionSpace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -69,6 +69,9 @@ class FunctionSpaceBase
   virtual ~FunctionSpaceBase(){}
   virtual int getNumKeys(MElement *ele) = 0; // if one needs the number of dofs
   virtual void getKeys(MElement *ele, std::vector<Dof> &keys) = 0;
+  virtual void getKeysOnVertex(MElement* ele, MVertex* v, const std::vector<int>& comp, std::vector<Dof>& keys){
+    Msg::Warning("this function is defined to get Dofs of vertex %d on element %d",v->getNum(),ele->getNum());
+  }
   virtual FunctionSpaceBase* clone(const std::vector<int>& comp) const {return NULL;}
 };
 
@@ -115,7 +118,8 @@ class ScalarLagrangeFunctionSpaceOfElement : public FunctionSpace<double>
   virtual void f(MElement *ele, double u, double v, double w, std::vector<ValType> &vals)
   {
     if(ele->getParent()) {
-      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B) { //FIXME MPolygonBorders...
+      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B ||
+         ele->getTypeForMSH() == MSH_POLYG_B) { //FIXME MPolygonBorders...
         ele->movePointFromParentSpaceToElementSpace(u, v, w);
       }
     }
@@ -128,7 +132,8 @@ class ScalarLagrangeFunctionSpaceOfElement : public FunctionSpace<double>
   virtual void gradf(MElement *ele, double u, double v, double w, std::vector<GradType> &grads)
   {
     if(ele->getParent()) {
-      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B) { //FIXME MPolygonBorders...
+      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B ||
+         ele->getTypeForMSH() == MSH_POLYG_B) { //FIXME MPolygonBorders...
         ele->movePointFromParentSpaceToElementSpace(u, v, w);
       }
     }
@@ -150,7 +155,8 @@ class ScalarLagrangeFunctionSpaceOfElement : public FunctionSpace<double>
   virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector<HessType> &hess)
   {
     if(ele->getParent()) {
-      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B) { //FIXME MPolygonBorders...
+      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B ||
+         ele->getTypeForMSH() == MSH_POLYG_B) { //FIXME MPolygonBorders...
         ele->movePointFromParentSpaceToElementSpace(u, v, w);
       }
     }
@@ -169,7 +175,8 @@ class ScalarLagrangeFunctionSpaceOfElement : public FunctionSpace<double>
   virtual void gradfuvw(MElement *ele, double u, double v, double w, std::vector<GradType> &grads)
   {
     if(ele->getParent()) {
-      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B) { //FIXME MPolygonBorders...
+      if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B ||
+         ele->getTypeForMSH() == MSH_POLYG_B) { //FIXME MPolygonBorders...
         ele->movePointFromParentSpaceToElementSpace(u, v, w);
       }
     }
diff --git a/Solver/groupOfElements.cpp b/Solver/groupOfElements.cpp
index 791b764..53de4a4 100644
--- a/Solver/groupOfElements.cpp
+++ b/Solver/groupOfElements.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/groupOfElements.h b/Solver/groupOfElements.h
index 22126f3..536064c 100644
--- a/Solver/groupOfElements.h
+++ b/Solver/groupOfElements.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/helmholtzTerm.h b/Solver/helmholtzTerm.h
index 890e180..8068a15 100644
--- a/Solver/helmholtzTerm.h
+++ b/Solver/helmholtzTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -47,8 +47,9 @@ class helmholtzTerm : public femTerm<scalar> {
   }
   virtual void elementMatrix(SElement *se, fullMatrix<scalar> &m) const
   {
-
     MElement *e = se->getMeshElement();
+    if (_k)_k->setElement(e);
+    if (_a)_a->setElement(e);
     // compute integration rule
     // const int integrationOrder = (_a) ? 2 * e->getPolynomialOrder() : 
     //2 * (e->getPolynomialOrder() - 1);
diff --git a/Solver/laplaceTerm.h b/Solver/laplaceTerm.h
index 1e2d925..182ce80 100644
--- a/Solver/laplaceTerm.h
+++ b/Solver/laplaceTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystem.cpp b/Solver/linearSystem.cpp
index 836a180..a54334d 100644
--- a/Solver/linearSystem.cpp
+++ b/Solver/linearSystem.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystem.h b/Solver/linearSystem.h
index fbce5c3..b008e7e 100644
--- a/Solver/linearSystem.h
+++ b/Solver/linearSystem.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemCSR.cpp b/Solver/linearSystemCSR.cpp
index 35dcb41..9cb38e7 100644
--- a/Solver/linearSystemCSR.cpp
+++ b/Solver/linearSystemCSR.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemCSR.h b/Solver/linearSystemCSR.h
index b234e74..6c05e03 100644
--- a/Solver/linearSystemCSR.h
+++ b/Solver/linearSystemCSR.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemFull.h b/Solver/linearSystemFull.h
index 4cd4342..e67ce54 100644
--- a/Solver/linearSystemFull.h
+++ b/Solver/linearSystemFull.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemGMM.h b/Solver/linearSystemGMM.h
index 1f3f06b..b79fa14 100644
--- a/Solver/linearSystemGMM.h
+++ b/Solver/linearSystemGMM.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemMUMPS.cpp b/Solver/linearSystemMUMPS.cpp
index 91df7c2..cf577c8 100644
--- a/Solver/linearSystemMUMPS.cpp
+++ b/Solver/linearSystemMUMPS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemMUMPS.h b/Solver/linearSystemMUMPS.h
index f175cb5..30ad1e9 100644
--- a/Solver/linearSystemMUMPS.h
+++ b/Solver/linearSystemMUMPS.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemPETSc.cpp b/Solver/linearSystemPETSc.cpp
index 887b1ed..840e119 100644
--- a/Solver/linearSystemPETSc.cpp
+++ b/Solver/linearSystemPETSc.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h
index ef62343..7db6f53 100644
--- a/Solver/linearSystemPETSc.h
+++ b/Solver/linearSystemPETSc.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -63,6 +63,18 @@ typedef struct _p_KSP* KSP;
 #define PetscOptionsGetBool PetscOptionsGetTruth
 #endif
 
+// The petsc3.5 change log says:
+// "KSPSetOperators() no longer has the MatStructure argument. The Mat objects now track that information themselves.
+// Use KPS/PCSetReusePreconditioner() to prevent the recomputation of the preconditioner if the operator changed
+// in the way that SAME_PRECONDITIONER did with KSPSetOperators()"
+// So I guess this should be called with PETSC_TRUE as second argument only for SAME_PRECONDITIONER
+// and false otherwise (i.e. for SAME_NONZERO_PATTERN, DIFFRENT_NONZERO_PATTERN) but it is a guess...
+#if (PETSC_VERSION_MAJOR < 3  || (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR < 5))
+#define KSPSetOperators(_ksp, _a, _b, SAME_PRECONDITIONER) KSPSetOperators(_ksp, _a, _b, SAME_PRECONDITIONER)
+#else
+# define SAME_PRECONDITIONER 999
+# define KSPSetOperators(_ksp, _a, _b, OPT_PRECON) (KSPSetOperators(_ksp, _a, _b), KSPSetReusePreconditioner(_ksp,PetscBool(OPT_PRECON == SAME_PRECONDITIONER)))
+#endif
 
 template <class scalar>
 class linearSystemPETSc : public linearSystem<scalar> {
@@ -102,7 +114,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
   void zeroSolution();
   void printMatlab(const char *filename) const;
   virtual int systemSolve();
-  Mat &getMatrix(){ return _a; }
+  Mat getMatrix(){ return _a; }
   //std::vector<scalar> getData();
   //std::vector<int> getRowPointers();
   //std::vector<int> getColumnsIndices();
diff --git a/Solver/linearSystemPETSc.hpp b/Solver/linearSystemPETSc.hpp
index 136daf3..4db9597 100644
--- a/Solver/linearSystemPETSc.hpp
+++ b/Solver/linearSystemPETSc.hpp
@@ -1,9 +1,9 @@
-#ifdef HAVE_PETSC
+#if defined(HAVE_PETSC)
+
 #include <petsc.h>
 #include <petscksp.h>
 #include "linearSystemPETSc.h"
 
-
 static void  _try(int ierr)
 {
   CHKERRABORT(PETSC_COMM_WORLD, ierr);
@@ -18,6 +18,9 @@ int linearSystemPETSc<scalar>::_getBlockSizeFromParameters() const
 template <class scalar>
 void linearSystemPETSc<scalar>::_kspCreate()
 {
+  // Set option given by the user in its (python script) without using argc,argv or .petscrc
+  if(this->_parameters.count("petsc_solver_options"))
+    _try(PetscOptionsInsertString(this->_parameters["petsc_solver_options"].c_str()));
   _try(KSPCreate(_comm, &_ksp));
   PC pc;
   _try(KSPGetPC(_ksp, &pc));
@@ -76,17 +79,18 @@ linearSystemPETSc<scalar>::~linearSystemPETSc()
 template <class scalar>
 void linearSystemPETSc<scalar>::_assembleMatrixIfNeeded()
 {
+#if defined(HAVE_MPI)
   if (_comm == PETSC_COMM_WORLD){
-    if (Msg::GetCommSize()>1){
+    if (Msg::GetCommSize() > 1){
       int value = _valuesNotAssembled ? 1 : 0;
       int sumValue = 0;
       MPI_Allreduce((void*)&value, (void*)&sumValue, 1, MPI_INT, MPI_SUM, _comm);
       if ((sumValue > 0) &&(sumValue < Msg::GetCommSize())){
-        _valuesNotAssembled= 1;
+        _valuesNotAssembled = 1;
       }
     }
   }
-
+#endif
   if (_valuesNotAssembled) {
     _try(MatAssemblyBegin(_a, MAT_FINAL_ASSEMBLY));
     _try(MatAssemblyEnd(_a, MAT_FINAL_ASSEMBLY));
@@ -176,8 +180,8 @@ void linearSystemPETSc<scalar>::allocate(int nbRows)
   _try(MatSetFromOptions(_a));
   //since PETSc 3.3 GetOwnershipRange and MatGetSize cannot be called before MatXXXSetPreallocation
   _localSize = nbRows;
-  #ifdef HAVE_MPI
-  if (commSize>1){
+#if defined(HAVE_MPI)
+  if (commSize > 1){
     _localRowStart = 0;
     if (Msg::GetCommRank() != 0) {
       MPI_Status status;
@@ -194,11 +198,11 @@ void linearSystemPETSc<scalar>::allocate(int nbRows)
     _localRowEnd = nbRows;
     _globalSize = _localSize;
   }
-  #else
+#else
   _localRowStart = 0;
   _localRowEnd = nbRows;
   _globalSize = _localSize;
-  #endif
+#endif
   // preallocation option must be set after other options
   _try(VecCreate(_comm, &_x));
   _try(VecSetSizes(_x, blockSize * nbRows, PETSC_DETERMINE));
@@ -324,8 +328,9 @@ void linearSystemPETSc<scalar>::getFromSolution(int row, scalar &val) const
 template <class scalar>
 void linearSystemPETSc<scalar>::zeroMatrix()
 {
+#if defined(HAVE_MPI)
   if (_comm == PETSC_COMM_WORLD){
-    if (Msg::GetCommSize()>1){
+    if (Msg::GetCommSize() > 1){
       int value = _entriesPreAllocated ? 1 : 0;
       int sumValue = 0;
       MPI_Allreduce((void*)&value, (void*)&sumValue, 1, MPI_INT, MPI_SUM, _comm);
@@ -334,6 +339,7 @@ void linearSystemPETSc<scalar>::zeroMatrix()
       }
     }
   }
+#endif
   if (_isAllocated && _entriesPreAllocated) {
     _assembleMatrixIfNeeded();
     _try(MatZeroEntries(_a));
diff --git a/Solver/materialLaw.h b/Solver/materialLaw.h
index 9d6f030..6b86fc0 100644
--- a/Solver/materialLaw.h
+++ b/Solver/materialLaw.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/multiscaleLaplace.cpp b/Solver/multiscaleLaplace.cpp
index 59a3c64..6774a3a 100644
--- a/Solver/multiscaleLaplace.cpp
+++ b/Solver/multiscaleLaplace.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -632,28 +632,32 @@ static void printCut(std::map<MEdge,MVertex*,Less_Edge> &cutEdges,
    printf("Writing points.pos \n");
    std::map<MEdge,MVertex*,Less_Edge>::iterator ite = cutEdges.begin();
    FILE *f1 = Fopen("points.pos","w");
-   fprintf(f1,"View\"\"{\n");
-   for ( ; ite != cutEdges.end();++ite){
-     fprintf(f1,"SP(%g,%g,%g){1.0};\n",ite->second->x(),ite->second->y(),ite->second->z());
-   }
-   std::set<MVertex*>::iterator itv = cutVertices.begin();
-   for ( ; itv != cutVertices.end();++itv){
-     fprintf(f1,"SP(%g,%g,%g){3.0};\n",(*itv)->x(),(*itv)->y(),(*itv)->z());
+   if(f1){
+     fprintf(f1,"View\"\"{\n");
+     for ( ; ite != cutEdges.end();++ite){
+       fprintf(f1,"SP(%g,%g,%g){1.0};\n",ite->second->x(),ite->second->y(),ite->second->z());
+     }
+     std::set<MVertex*>::iterator itv = cutVertices.begin();
+     for ( ; itv != cutVertices.end();++itv){
+       fprintf(f1,"SP(%g,%g,%g){3.0};\n",(*itv)->x(),(*itv)->y(),(*itv)->z());
+     }
+     fprintf(f1,"};\n");
+     fclose(f1);
    }
-   fprintf(f1,"};\n");
-   fclose(f1);
 
    printf("Writing edges.pos \n");
    std::set<MEdge,Less_Edge>::iterator itc = theCut.begin();
    FILE *f2 = Fopen("edges.pos","w");
-   fprintf(f2,"View\"\"{\n");
-   for ( ; itc != theCut.end();++itc){
-     fprintf(f2,"SL(%g,%g,%g,%g,%g,%g){1.0,1.0};\n",itc->getVertex(0)->x(),
-             itc->getVertex(0)->y(),itc->getVertex(0)->z(),
-          itc->getVertex(1)->x(),itc->getVertex(1)->y(),itc->getVertex(1)->z());
+   if(f2){
+     fprintf(f2,"View\"\"{\n");
+     for ( ; itc != theCut.end();++itc){
+       fprintf(f2,"SL(%g,%g,%g,%g,%g,%g){1.0,1.0};\n",itc->getVertex(0)->x(),
+               itc->getVertex(0)->y(),itc->getVertex(0)->z(),
+               itc->getVertex(1)->x(),itc->getVertex(1)->y(),itc->getVertex(1)->z());
+     }
+     fprintf(f2,"};\n");
+     fclose(f2);
    }
-   fprintf(f2,"};\n");
-   fclose(f2);
 }
 
 static void printLevel(const char* fn,
@@ -671,6 +675,10 @@ static void printLevel(const char* fn,
 
   bool binary = false;
   FILE *fp = Fopen (fn, "w");
+  if(!fp){
+    Msg::Error("Could not open file '%s'", fn);
+    return;
+  }
   fprintf(fp, "$MeshFormat\n");
   fprintf(fp, "%g %d %d\n", version, binary ? 1 : 0, (int)sizeof(double));
   fprintf(fp, "$EndMeshFormat\n");
diff --git a/Solver/multiscaleLaplace.h b/Solver/multiscaleLaplace.h
index 0b14ee8..4732c48 100644
--- a/Solver/multiscaleLaplace.h
+++ b/Solver/multiscaleLaplace.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/orthogonalTerm.h b/Solver/orthogonalTerm.h
index b060306..5d0e565 100644
--- a/Solver/orthogonalTerm.h
+++ b/Solver/orthogonalTerm.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/quadratureRules.h b/Solver/quadratureRules.h
index aee43bf..e501353 100644
--- a/Solver/quadratureRules.h
+++ b/Solver/quadratureRules.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/solverAlgorithms.h b/Solver/solverAlgorithms.h
index 951f2d7..3cfa0f5 100644
--- a/Solver/solverAlgorithms.h
+++ b/Solver/solverAlgorithms.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/solverField.h b/Solver/solverField.h
index 46b4d61..05a0deb 100644
--- a/Solver/solverField.h
+++ b/Solver/solverField.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/sparsityPattern.cpp b/Solver/sparsityPattern.cpp
index 7d18458..f4f7cfb 100644
--- a/Solver/sparsityPattern.cpp
+++ b/Solver/sparsityPattern.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/sparsityPattern.h b/Solver/sparsityPattern.h
index c91de0a..436f909 100644
--- a/Solver/sparsityPattern.h
+++ b/Solver/sparsityPattern.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/Solver/terms.cpp b/Solver/terms.cpp
index 97f2bf5..ff0a766 100644
--- a/Solver/terms.cpp
+++ b/Solver/terms.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -142,31 +142,6 @@ void IsotropicElasticTerm::get(MElement *ele, int npts, IntPt *GP, fullMatrix<do
   }
 }
 
-void LagrangeMultiplierTerm::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const
-{
-  int nbFF1 = BilinearTerm<SVector3, double>::space1.getNumKeys(ele); //nbVertices*nbcomp of parent
-  int nbFF2 = BilinearTerm<SVector3, double>::space2.getNumKeys(ele); //nbVertices of boundary
-  double jac[3][3];
-  m.resize(nbFF1, nbFF2);
-  m.setAll(0.);
-  for(int i = 0; i < npts; i++)
-  {
-    double u = GP[i].pt[0]; double v = GP[i].pt[1]; double w = GP[i].pt[2];
-    const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac);
-    std::vector<TensorialTraits<SVector3>::ValType> Vals;
-    std::vector<TensorialTraits<double>::ValType> ValsT;
-    BilinearTerm<SVector3,double>::space1.f(ele, u, v, w, Vals);
-    BilinearTerm<SVector3,double>::space2.f(ele, u, v, w, ValsT);
-    for(int j = 0; j < nbFF1; j++)
-    {
-      for(int k = 0; k < nbFF2; k++)
-      {
-        m(j, k) += dot(Vals[j], _d) * ValsT[k] * weight * detJ;
-      }
-    }
-  }
-}
-
 void LagMultTerm::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const
 {
   int nbFF1 = BilinearTerm<SVector3, SVector3>::space1.getNumKeys(ele); //nbVertices*nbcomp of parent
diff --git a/Solver/terms.h b/Solver/terms.h
index 2e00411..115714d 100644
--- a/Solver/terms.h
+++ b/Solver/terms.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -34,8 +34,14 @@ inline double dot(const double &a, const double &b)
 
 inline int delta(int i,int j) {if (i==j) return 1; else return 0;}
 
-
-
+inline void setDirection(double &a, const double &b)
+{
+  a = b;
+}
+inline void setDirection(SVector3 &a, const SVector3 &b)
+{
+  for(int i = 0; i < 3; i++) a(i) = b(i);
+}
 
 template<class T2=double> class  ScalarTermBase
 {
@@ -234,9 +240,9 @@ public :
 template<class T1> class LoadTerm : public LinearTerm<T1>
 {
 protected:
-  simpleFunction<typename TensorialTraits<T1>::ValType> &Load;
+  simpleFunction<typename TensorialTraits<T1>::ValType> *Load;
 public :
-  LoadTerm(FunctionSpace<T1>& space1_, simpleFunction<typename TensorialTraits<T1>::ValType> &Load_) :
+  LoadTerm(FunctionSpace<T1>& space1_, simpleFunction<typename TensorialTraits<T1>::ValType> *Load_) :
       LinearTerm<T1>(space1_), Load(Load_) {}
   virtual ~LoadTerm() {}
   virtual LinearTermBase<double>* clone () const { return new LoadTerm<T1>(LinearTerm<T1>::space1,Load);}
@@ -244,19 +250,19 @@ public :
   virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<double> > &vv) const {};
 };
 
-class LagrangeMultiplierTerm : public BilinearTerm<SVector3, double>
+template<class T1> class LagrangeMultiplierTerm : public BilinearTerm<T1, double>
 {
-  SVector3 _d;
+  T1 _d;
 public :
-  LagrangeMultiplierTerm(FunctionSpace<SVector3>& space1_, FunctionSpace<double>& space2_, const SVector3 &d) :
-      BilinearTerm<SVector3, double>(space1_, space2_)
+  LagrangeMultiplierTerm(FunctionSpace<T1>& space1_, FunctionSpace<double>& space2_, const T1 &d) :
+      BilinearTerm<T1, double>(space1_, space2_)
   {
-    for (int i = 0; i < 3; i++) _d(i) = d(i);
+    setDirection(_d, d);
   }
   virtual ~LagrangeMultiplierTerm() {}
   virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const;
   virtual void get(MElement *ele, int npts, IntPt *GP, std::vector< fullMatrix<double> > &vm) const{};
-  virtual BilinearTermBase* clone () const {return new LagrangeMultiplierTerm(BilinearTerm<SVector3, double>::space1,BilinearTerm<SVector3, double>::space2,_d);}
+  virtual BilinearTermBase* clone () const {return new LagrangeMultiplierTerm(BilinearTerm<T1, double>::space1, BilinearTerm<T1, double>::space2, _d);}
 };
 
 class LagMultTerm : public BilinearTerm<SVector3, SVector3>
@@ -276,9 +282,9 @@ template<class T1> class LoadTermOnBorder : public LinearTerm<T1>
 {
 private :
   double _eqfac;
-  simpleFunction<typename TensorialTraits<T1>::ValType> &Load;
+  simpleFunction<typename TensorialTraits<T1>::ValType> *Load;
 public :
-  LoadTermOnBorder(FunctionSpace<T1>& space1_, simpleFunction<typename TensorialTraits<T1>::ValType> &Load_, double eqfac = 1.0) :
+  LoadTermOnBorder(FunctionSpace<T1>& space1_, simpleFunction<typename TensorialTraits<T1>::ValType> *Load_, double eqfac = 1.0) :
       LinearTerm<T1>(space1_), _eqfac(eqfac), Load(Load_) {}
   virtual ~LoadTermOnBorder() {}
   virtual LinearTermBase<double>* clone () const { return new LoadTermOnBorder<T1>(LinearTerm<T1>::space1,Load,_eqfac);}
diff --git a/Solver/terms.hpp b/Solver/terms.hpp
index fef362b..de7d0ad 100644
--- a/Solver/terms.hpp
+++ b/Solver/terms.hpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -7,7 +7,7 @@
 //   Eric Bechet
 //
 
-#include "terms.h"
+//#include "terms.h"
 
 template<class T2> void LinearTermBase<T2>::get(MElement *ele, int npts, IntPt *GP, fullVector<T2> &vec) const
 {
@@ -101,7 +101,7 @@ template<class T1> void LoadTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fu
     LinearTerm<T1>::space1.f(ele, u, v, w, Vals);
     SPoint3 p;
     ele->pnt(u, v, w, p);
-    typename TensorialTraits<T1>::ValType load = Load(p.x(), p.y(), p.z());
+    typename TensorialTraits<T1>::ValType load = (*Load)(p.x(), p.y(), p.z());
     for(int j = 0; j < nbFF ; ++j)
     {
       m(j) += dot(Vals[j], load) * weight * detJ;
@@ -191,25 +191,49 @@ template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, st
   }
 }
 
-
+template<class T1> void LagrangeMultiplierTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const
+{
+  int nbFF1 = BilinearTerm<T1, double>::space1.getNumKeys(ele); //nbVertices*nbcomp of parent
+  int nbFF2 = BilinearTerm<T1, double>::space2.getNumKeys(ele); //nbVertices of boundary
+  double jac[3][3];
+  m.resize(nbFF1, nbFF2);
+  m.setAll(0.);
+  for(int i = 0; i < npts; i++)
+  {
+    double u = GP[i].pt[0]; double v = GP[i].pt[1]; double w = GP[i].pt[2];
+    const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac);
+    std::vector<typename TensorialTraits<T1>::ValType> Vals;
+    std::vector<TensorialTraits<double>::ValType> ValsT;
+    BilinearTerm<T1,double>::space1.f(ele, u, v, w, Vals);
+    BilinearTerm<T1,double>::space2.f(ele, u, v, w, ValsT);
+    for(int j = 0; j < nbFF1; j++)
+    {
+      for(int k = 0; k < nbFF2; k++)
+      {
+        m(j, k) += dot(Vals[j], _d) * ValsT[k] * weight * detJ;
+      }
+    }
+  }
+}
 
 template<class T1> void LoadTermOnBorder<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m) const
 {
-  MElement *elep;
-  if (ele->getParent()) elep = ele->getParent();
   int nbFF = LinearTerm<T1>::space1.getNumKeys(ele);
   double jac[3][3];
   m.resize(nbFF);
   m.scale(0.);
   for(int i = 0; i < npts; i++)
   {
-    const double u = GP[i].pt[0]; const double v = GP[i].pt[1]; const double w = GP[i].pt[2];
+    double u = GP[i].pt[0]; double v = GP[i].pt[1]; double w = GP[i].pt[2];
     const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac);
     std::vector<typename TensorialTraits<T1>::ValType> Vals;
     LinearTerm<T1>::space1.f(ele, u, v, w, Vals);
+    if(ele->getTypeForMSH() == MSH_LIN_B || ele->getTypeForMSH() == MSH_TRI_B ||
+       ele->getTypeForMSH() == MSH_POLYG_B)
+      ele->movePointFromParentSpaceToElementSpace(u, v, w);
     SPoint3 p;
     ele->pnt(u, v, w, p);
-    typename TensorialTraits<T1>::ValType load = Load(p.x(), p.y(), p.z());
+    typename TensorialTraits<T1>::ValType load = (*Load)(p.x(), p.y(), p.z());
     for(int j = 0; j < nbFF ; ++j){
       m(j) += _eqfac * dot(Vals[j], load) * weight * detJ;
     }
diff --git a/Solver/thermicSolver.cpp b/Solver/thermicSolver.cpp
new file mode 100644
index 0000000..a3ef788
--- /dev/null
+++ b/Solver/thermicSolver.cpp
@@ -0,0 +1,318 @@
+// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to <gmsh at geuz.org>.
+
+#include <string.h>
+#include "GmshConfig.h"
+#include "thermicSolver.h"
+#include "linearSystemCSR.h"
+#include "linearSystemPETSc.h"
+#include "linearSystemGMM.h"
+#include "linearSystemFull.h"
+#include "Numeric.h"
+#include "GModel.h"
+#include "functionSpace.h"
+#include "terms.h"
+#include "solverAlgorithms.h"
+#include "quadratureRules.h"
+#include "solverField.h"
+#include "MPoint.h"
+#include "gmshLevelset.h"
+#if defined(HAVE_POST)
+#include "PView.h"
+#include "PViewData.h"
+#endif
+
+void thermicSolver::setMesh(const std::string &meshFileName)
+{
+  pModel = new GModel();
+  pModel->readMSH(meshFileName.c_str());
+  _dim = pModel->getNumRegions() ? 3 : 2;
+
+  if (LagSpace) delete LagSpace;
+  LagSpace = new ScalarLagrangeFunctionSpace(_tag);
+
+  if (LagrangeMultiplierSpace) delete LagrangeMultiplierSpace;
+  LagrangeMultiplierSpace = new ScalarLagrangeFunctionSpaceOfElement(_tag + 1);
+}
+
+void thermicSolver::solve()
+{
+  linearSystemFull<double> *lsys = new linearSystemFull<double>;
+/*#if defined(HAVE_TAUCS)
+  linearSystemCSRTaucs<double> *lsys = new linearSystemCSRTaucs<double>;
+#elif defined(HAVE_PETSC)
+  linearSystemPETSc<double> *lsys = new linearSystemPETSc<double>;
+#else
+  linearSystemGmm<double> *lsys = new linearSystemGmm<double>;
+  lsys->setNoisy(2);
+#endif*/
+  assemble(lsys);
+  lsys->systemSolve();
+  printf("-- done solving!\n");
+}
+
+void thermicSolver::cutMesh(gLevelset *ls)
+{
+  pModel = pModel->buildCutGModel(ls);
+  pModel->writeMSH("cutMesh.msh");
+}
+
+void thermicSolver::setThermicDomain(int phys, double k)
+{
+  thermicField field;
+  field._k = k;
+  field._tag = _tag;
+  field.g = new groupOfElements (_dim, phys);
+  thermicFields.push_back(field);
+}
+
+void thermicSolver::setLagrangeMultipliers(int phys, double tau, int tag, simpleFunction<double> *f)
+{
+  LagrangeMultiplierFieldT field;
+  field._tau = tau;
+  field._tag = tag;
+  field._f = f;
+  field.g = new groupOfElements (_dim - 1, phys);
+  LagrangeMultiplierFields.push_back(field);
+}
+
+void thermicSolver::setEdgeTemp(int edge, simpleFunction<double> *f)
+{
+  dirichletBCT diri;
+  diri.g = new groupOfElements (1, edge);
+  diri._f = f;
+  diri._tag = edge;
+  diri.onWhat = BoundaryConditionT::ON_EDGE;
+  allDirichlet.push_back(diri);
+}
+
+void thermicSolver::assemble(linearSystem<double> *lsys)
+{
+  if (pAssembler) delete pAssembler;
+  pAssembler = new dofManager<double>(lsys);
+
+  // we first do all fixations. the behavior of the dofManager is to
+  // give priority to fixations : when a dof is fixed, it cannot be
+  // numbered afterwards
+
+  // Dirichlet conditions
+  for (unsigned int i = 0; i < allDirichlet.size(); i++){
+    FilterDofTrivial filter;
+    FixNodalDofs(*LagSpace, allDirichlet[i].g->begin(), allDirichlet[i].g->end(),
+                 *pAssembler, *allDirichlet[i]._f, filter);
+  }
+  // LagrangeMultipliers
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
+    NumberDofs(*LagrangeMultiplierSpace, LagrangeMultiplierFields[i].g->begin(),
+               LagrangeMultiplierFields[i].g->end(), *pAssembler);
+  }
+  // Thermic Fields
+  for (unsigned int i = 0; i < thermicFields.size(); ++i){
+    NumberDofs(*LagSpace, thermicFields[i].g->begin(), thermicFields[i].g->end(), *pAssembler);
+  }
+  // Neumann conditions
+  GaussQuadrature Integ_Boundary(GaussQuadrature::Val);
+  for (unsigned int i = 0; i < allNeumann.size(); i++){
+    std::cout <<  "Neumann BC" << std::endl;
+    LoadTerm<double> Lterm(*LagSpace, allNeumann[i]._f);
+    Assemble(Lterm, *LagSpace, allNeumann[i].g->begin(), allNeumann[i].g->end(),
+             Integ_Boundary, *pAssembler);
+  }
+  // Assemble cross term, laplace term and rhs term for LM
+  GaussQuadrature Integ_LagrangeMult(GaussQuadrature::ValVal);
+  GaussQuadrature Integ_Laplace(GaussQuadrature::GradGrad);
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); i++){
+    printf("Lagrange Mult Lag\n");
+    LagrangeMultiplierTerm<double> LagTerm(*LagSpace, *LagrangeMultiplierSpace, 1.);
+    Assemble(LagTerm, *LagSpace, *LagrangeMultiplierSpace,
+             LagrangeMultiplierFields[i].g->begin(), LagrangeMultiplierFields[i].g->end(),
+             Integ_LagrangeMult, *pAssembler);
+    printf("Lagrange Mult Lap\n");
+    LaplaceTerm<double, double> LapTerm(*LagrangeMultiplierSpace,
+                                        -LagrangeMultiplierFields[i]._tau);
+    Assemble(LapTerm, *LagrangeMultiplierSpace, LagrangeMultiplierFields[i].g->begin(),
+             LagrangeMultiplierFields[i].g->end(), Integ_Laplace, *pAssembler);
+    printf("Lagrange Mult Load\n");
+    LoadTermOnBorder<double> Lterm(*LagrangeMultiplierSpace, LagrangeMultiplierFields[i]._f);
+    Assemble(Lterm, *LagrangeMultiplierSpace, LagrangeMultiplierFields[i].g->begin(),
+             LagrangeMultiplierFields[i].g->end(), Integ_Boundary, *pAssembler);
+  }
+  // Assemble thermic term
+  GaussQuadrature Integ_Bulk(GaussQuadrature::ValVal);
+  for (unsigned int i = 0; i < thermicFields.size(); i++){
+    printf("Thermic Term\n");
+    LaplaceTerm<double, double> Tterm(*LagSpace, thermicFields[i]._k);
+    Assemble(Tterm, *LagSpace, thermicFields[i].g->begin(), thermicFields[i].g->end(),
+             Integ_Bulk, *pAssembler);
+  }
+
+  /*for (int i = 0;i<pAssembler->sizeOfR();i++){
+    for (int j = 0;j<pAssembler->sizeOfR();j++){
+      double d; lsys->getFromMatrix(i, j, d);
+      printf("%g ", d);
+    }
+    double d; lsys->getFromRightHandSide(i, d);
+    printf(" |  %g\n", d);
+  }*/
+
+  printf("nDofs=%d\n", pAssembler->sizeOfR());
+  printf("nFixed=%d\n", pAssembler->sizeOfF());
+}
+
+double thermicSolver::computeL2Norm(simpleFunction<double> *sol) {
+  double val = 0.0;
+  SolverField<double> solField(pAssembler, LagSpace);
+  for (unsigned int i = 0; i < thermicFields.size(); ++i){
+    for (groupOfElements::elementContainer::const_iterator it = thermicFields[i].g->begin(); it != thermicFields[i].g->end(); ++it){
+      MElement *e = *it;
+//printf("element (%g,%g) (%g,%g) (%g,%g)\n",e->getVertex(0)->x(),e->getVertex(0)->y(),e->getVertex(1)->x(),e->getVertex(1)->y(),e->getVertex(2)->x(),e->getVertex(2)->y());
+      int npts;
+      IntPt *GP;
+      double jac[3][3];
+      int integrationOrder = 2 * (e->getPolynomialOrder()+5);
+      e->getIntegrationPoints(integrationOrder, &npts, &GP);
+      for (int j = 0; j < npts; j++){
+        double u = GP[j].pt[0];
+        double v = GP[j].pt[1];
+        double w = GP[j].pt[2];
+        double weight = GP[j].weight;
+        double detJ = fabs(e->getJacobian (u, v, w, jac));
+        SPoint3 p;
+        e->pnt(u, v, w, p);
+	double FEMVALUE;
+	solField.f(e, u, v, w, FEMVALUE);
+        double diff = (*sol)(p.x(), p.y(), p.z()) - FEMVALUE;
+        val += diff * diff * detJ * weight;
+//printf("(%g %g) : detJ=%g we=%g FV=%g sol=%g diff=%g\n",p.x(),p.y(),detJ,weight,FEMVALUE,(*sol)(p.x(), p.y(), p.z()),diff);
+      }
+    }
+  }
+printf("L2Norm = %g\n",sqrt(val));
+  return sqrt(val);
+}
+
+double thermicSolver::computeLagNorm(int tag, simpleFunction<double> *sol) {
+  double val = 0.0, val2 = 0.0;
+  SolverField<double> solField(pAssembler, LagrangeMultiplierSpace);
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
+    if(tag != LagrangeMultiplierFields[i]._tag) continue;
+    for(groupOfElements::elementContainer::const_iterator it = LagrangeMultiplierFields[i].g->begin();
+        it != LagrangeMultiplierFields[i].g->end(); ++it){
+      MElement *e = *it;
+printf("element (%g,%g) (%g,%g)\n",e->getVertex(0)->x(),e->getVertex(0)->y(),e->getVertex(1)->x(),e->getVertex(1)->y());
+      int npts;
+      IntPt *GP;
+      double jac[3][3];
+      int integrationOrder = 2 * (e->getPolynomialOrder()+1);
+      e->getIntegrationPoints(integrationOrder, &npts, &GP);
+      for (int j = 0; j < npts; j++){
+        double u = GP[j].pt[0];
+        double v = GP[j].pt[1];
+        double w = GP[j].pt[2];
+        double weight = GP[j].weight;
+        double detJ = fabs(e->getJacobian (u, v, w, jac));
+        SPoint3 p;
+        e->getParent()->pnt(u, v, w, p);
+	double FEMVALUE;
+	solField.f(e, u, v, w, FEMVALUE);
+        double diff = (*sol)(p.x(), p.y(), p.z()) - FEMVALUE;
+        val += diff * diff * detJ * weight;
+        val2 += (*sol)(p.x(), p.y(), p.z()) * (*sol)(p.x(), p.y(), p.z()) * detJ * weight;
+printf("(%g %g) : u,v=(%g,%g) detJ=%g we=%g FV=%g sol=%g diff=%g\n",p.x(),p.y(),u,v,detJ,weight,FEMVALUE,(*sol)(p.x(), p.y(), p.z()),diff);
+      }
+    }
+  }
+printf("LagNorm = %g\n",sqrt(val/val2));
+  return sqrt(val/val2);
+}
+
+#if defined(HAVE_POST)
+
+PView* thermicSolver::buildTemperatureView (const std::string postFileName)
+{
+  std::cout <<  "build Temperature View"<< std::endl;
+  std::set<MVertex*> v;
+  std::map<MVertex*, MElement*> vCut;
+  for (unsigned int i = 0; i < thermicFields.size(); ++i){
+    for (groupOfElements::elementContainer::const_iterator it = thermicFields[i].g->begin(); it != thermicFields[i].g->end(); ++it){
+      MElement *e = *it;
+      if(e->getParent()) {
+        for (int j = 0; j < e->getNumVertices(); ++j) {
+          if(vCut.find(e->getVertex(j)) == vCut.end())
+            vCut[e->getVertex(j)] = e->getParent();
+        }
+      }
+      else {
+        for (int j = 0; j < e->getNumVertices(); ++j)
+          v.insert(e->getVertex(j));
+      }
+    }
+  }
+  std::map<int, std::vector<double> > data;
+  SolverField<double> Field(pAssembler, LagSpace);
+  for (std::set<MVertex*>::iterator it = v.begin(); it != v.end(); ++it){
+    double val;
+    MPoint p(*it);
+    Field.f(&p, 0, 0, 0, val); //printf("valv=%g\n",val);
+    std::vector<double> vec; vec.push_back(val);
+    data[(*it)->getNum()] = vec;
+  }
+  for (std::map<MVertex*, MElement*>::iterator it = vCut.begin(); it != vCut.end(); ++it){
+    double val;
+    double uvw[3];
+    double xyz[3] = {it->first->x(), it->first->y(), it->first->z()};
+    it->second->xyz2uvw(xyz, uvw);
+    Field.f(it->second, uvw[0], uvw[1], uvw[2], val); //printf("valvc=%g\n",val);
+    std::vector<double> vec; vec.push_back(val);
+    data[it->first->getNum()] = vec;
+  }
+  PView *pv = new PView (postFileName, "NodeData", pModel, data, 0.0, 1);
+  return pv;
+}
+
+PView* thermicSolver::buildLagrangeMultiplierView (const std::string postFileName)
+{
+  std::cout <<  "build Lagrange Multiplier View"<< std::endl;
+  if(!LagrangeMultiplierSpace) return new PView();
+  std::set<MVertex*> v;
+  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
+    for(groupOfElements::elementContainer::const_iterator it = LagrangeMultiplierFields[i].g->begin();
+        it != LagrangeMultiplierFields[i].g->end(); ++it){
+      MElement *e = *it;
+      for (int j = 0; j < e->getNumVertices(); ++j) v.insert(e->getVertex(j));
+    }
+  }
+  std::map<int, std::vector<double> > data;
+  SolverField<double> Field(pAssembler, LagrangeMultiplierSpace);
+  for(std::set<MVertex*>::iterator it = v.begin(); it != v.end(); ++it){
+    double val;
+    MPoint p(*it);
+    Field.f(&p, 0, 0, 0, val);
+    std::vector<double> vec;
+    vec.push_back(val);
+    data[(*it)->getNum()] = vec;
+  }
+  PView *pv = new PView (postFileName, "NodeData", pModel, data, 0.0, 1);
+  return pv;
+}
+
+#else
+PView* thermicSolver::buildTemperatureView(const std::string postFileName)
+{
+  Msg::Error("Post-pro module not available");
+  return 0;
+}
+
+PView* thermicSolver::buildLagrangeMultiplierView (const std::string postFileName)
+{
+  Msg::Error("Post-pro module not available");
+  return 0;
+}
+#endif
+
+
+
+
+
diff --git a/Solver/thermicSolver.h b/Solver/thermicSolver.h
new file mode 100644
index 0000000..59c4245
--- /dev/null
+++ b/Solver/thermicSolver.h
@@ -0,0 +1,100 @@
+// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to <gmsh at geuz.org>.
+
+#ifndef _THERMIC_SOLVER_H_
+#define _THERMIC_SOLVER_H_
+
+#include <map>
+#include <string>
+#include "SVector3.h"
+#include "dofManager.h"
+#include "simpleFunction.h"
+#include "functionSpace.h"
+
+class GModel;
+class PView;
+class groupOfElements;
+class gLevelset;
+
+struct LagrangeMultiplierFieldT {
+  int _tag;
+  groupOfElements *g;
+  double _tau;
+  simpleFunction<double> *_f;
+  LagrangeMultiplierFieldT() : _tag(0), g(0){}
+};
+
+struct thermicField {
+  int _tag; // tag for the dofManager
+  groupOfElements *g; // support for this field
+  double _k; // diffusivity
+  thermicField () : _tag(0), g(0){}
+};
+
+struct BoundaryConditionT
+{
+  int _tag; // tag for the dofManager
+  enum location{UNDEF, ON_VERTEX, ON_EDGE, ON_FACE, ON_VOLUME};
+  location onWhat; // on vertices or elements
+  groupOfElements *g; // support for this BC
+  BoundaryConditionT() : _tag(0), onWhat(UNDEF), g(0) {}
+};
+
+struct dirichletBCT : public BoundaryConditionT
+{
+  simpleFunction<double> *_f;
+  dirichletBCT ():BoundaryConditionT(), _f(0){}
+};
+
+struct neumannBCT  : public BoundaryConditionT
+{
+  simpleFunction<double> *_f;
+  neumannBCT () : BoundaryConditionT(), _f(0){}
+};
+// a thermic solver ...
+class thermicSolver
+{
+ protected:
+  GModel *pModel;
+  int _dim, _tag;
+  dofManager<double> *pAssembler;
+  FunctionSpace<double> *LagSpace;
+  FunctionSpace<double> *LagrangeMultiplierSpace;
+
+  // young modulus and poisson coefficient per physical
+  std::vector<thermicField> thermicFields;
+  std::vector<LagrangeMultiplierFieldT> LagrangeMultiplierFields;
+  // neumann BC
+  std::vector<neumannBCT> allNeumann;
+  // dirichlet BC
+  std::vector<dirichletBCT> allDirichlet;
+
+ public:
+  thermicSolver(int tag) : _tag(tag), pAssembler(0), LagSpace(0), LagrangeMultiplierSpace(0) {}
+
+  virtual ~thermicSolver()
+  {
+    if (LagSpace) delete LagSpace;
+    if (LagrangeMultiplierSpace) delete LagrangeMultiplierSpace;
+    if (pAssembler) delete pAssembler;
+  }
+  void assemble (linearSystem<double> *lsys);
+  virtual void setMesh(const std::string &meshFileName);
+  void cutMesh(gLevelset *ls);
+  void setThermicDomain(int phys, double k);
+  void setLagrangeMultipliers(int phys, double tau, int tag, simpleFunction<double> *f);
+  void setEdgeTemp(int edge, simpleFunction<double> *f);
+  void solve();
+  virtual PView *buildTemperatureView(const std::string postFileName);
+  virtual PView *buildLagrangeMultiplierView(const std::string posFileName);
+  double computeL2Norm(simpleFunction<double> *f);
+  double computeLagNorm(int tag, simpleFunction<double> *f);
+  // std::pair<PView *, PView*> buildErrorEstimateView
+  //   (const std::string &errorFileName, double, int);
+  // std::pair<PView *, PView*> buildErrorEstimateView
+  //   (const std::string &errorFileName, const elasticityData &ref, double, int);
+};
+
+#endif
diff --git a/contrib/ANN/CMakeLists.txt b/contrib/ANN/CMakeLists.txt
index 6e67706..fcc99c5 100644
--- a/contrib/ANN/CMakeLists.txt
+++ b/contrib/ANN/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/Chaco/CMakeLists.txt b/contrib/Chaco/CMakeLists.txt
index 38b5e7d..2133b63 100644
--- a/contrib/Chaco/CMakeLists.txt
+++ b/contrib/Chaco/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/Chaco/main/Gmsh_printf.cpp b/contrib/Chaco/main/Gmsh_printf.cpp
index 8f0a42d..c0aaa27 100644
--- a/contrib/Chaco/main/Gmsh_printf.cpp
+++ b/contrib/Chaco/main/Gmsh_printf.cpp
@@ -6,6 +6,7 @@
 #include <cstdio>
 #include <cstring>
 #include "GmshMessage.h"
+#include <algorithm>
 
 // Overload the printf statements in Chaco to write using Msg::Debug in gmsh
 
diff --git a/contrib/DiscreteIntegration/CMakeLists.txt b/contrib/DiscreteIntegration/CMakeLists.txt
index 51989aa..de421a4 100644
--- a/contrib/DiscreteIntegration/CMakeLists.txt
+++ b/contrib/DiscreteIntegration/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/DiscreteIntegration/README.txt b/contrib/DiscreteIntegration/README.txt
new file mode 100644
index 0000000..84f3a2e
--- /dev/null
+++ b/contrib/DiscreteIntegration/README.txt
@@ -0,0 +1,23 @@
+// DiscreteIntegrate - Copyright (C) 2015 UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
diff --git a/contrib/HighOrderMeshOptimizer/CADDistances.cpp b/contrib/HighOrderMeshOptimizer/CADDistances.cpp
new file mode 100644
index 0000000..980c5d1
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/CADDistances.cpp
@@ -0,0 +1,589 @@
+// TODO: Header
+
+#include "SPoint3.h"
+#include "SVector3.h"
+#include "nodalBasis.h"
+#include "GEdge.h"
+#include "GFace.h"
+#include "MElement.h"
+#include "MLine.h"
+#include "MTriangle.h"
+#include "BasisFactory.h"
+#include "GModel.h"
+#if defined(HAVE_ANN)
+#include "ANN/ANN.h"
+#endif
+#include "CADDistances.h"
+
+
+namespace {
+
+
+// ---------------------------------- Discretization of curves ----------------------------------
+
+
+class parametricLine
+{
+  void recurDiscretize(const double &t1, const double &t2, const SPoint3 &p1,
+                       const SPoint3 &p2, std::vector<SPoint3> &dpts,
+                       std::vector<double> &ts, double Prec, int minDepth,
+                       int maxDepth, int depth) const;
+public:
+  virtual ~parametricLine() {}
+  virtual SPoint3 operator()(double xi) const = 0;
+  virtual SVector3 derivative(double xi) const = 0;
+  virtual SVector3 secondDerivative(double xi) const = 0;
+  SVector3 curvature(double xi) const;
+  void discretize(std::vector<SPoint3> &dpts,std::vector<double> &ts,
+                  double Prec, int minDepth, int maxDepth,
+                  double t0 = 0., double t1 = 1.) const;
+};
+
+
+class parametricLineNodalBasis : public parametricLine
+{
+  const nodalBasis &_basis;
+  const std::vector<SPoint3> &_xyz;
+
+public:
+  parametricLineNodalBasis(const nodalBasis &basis, const std::vector<SPoint3> &xyz);
+  virtual SPoint3 operator()(double xi) const;
+  virtual SVector3 derivative(double xi) const;
+  virtual SVector3 secondDerivative(double xi) const;
+};
+
+
+class parametricLineGEdge : public parametricLine
+{
+  const GEdge *_edge;
+  double _t0, _t1;
+
+public:
+  parametricLineGEdge(const GEdge *edge, double t0, double t1);
+  virtual SPoint3 operator()(double xi) const;
+  virtual SVector3 derivative(double xi) const;
+  virtual SVector3 secondDerivative(double xi) const;
+};
+
+
+void parametricLine::recurDiscretize(const double &t1, const double &t2, const SPoint3 &p1,
+                                     const SPoint3 &p2, std::vector<SPoint3> &dpts,
+                                     std::vector<double> &ts, double Prec, int minDepth,
+                                     int maxDepth, int depth) const
+{
+  double t = 0.5 * (t2 + t1);
+  SPoint3 p = (*this)(t);
+  SVector3 dx(p, (p1+p2)*0.5);
+  if (((depth >= minDepth) && (dx.norm() < Prec)) || (depth >= maxDepth)) {
+    dpts.push_back(p);
+    ts.push_back(t);
+    dpts.push_back(p2);
+    ts.push_back(t2);
+  }
+  else {
+    recurDiscretize(t1, t, p1, p, dpts, ts, Prec, minDepth, maxDepth, depth+1);
+    recurDiscretize(t, t2, p, p2, dpts, ts, Prec, minDepth, maxDepth, depth+1);
+  }
+}
+
+
+void parametricLine::discretize(std::vector<SPoint3> &dpts,
+        std::vector<double> &ts,
+        double Prec, int minDepth, int maxDepth, double t0, double t1) const
+{
+  dpts.push_back((*this)(t0));
+  ts.push_back(t0);
+  recurDiscretize(t0, t1, dpts[0], (*this)(t1), dpts, ts, Prec, minDepth, maxDepth, 0);
+}
+
+
+SVector3 parametricLine::curvature(double xi) const
+{
+  SVector3 xp  = derivative(xi);
+  SVector3 xpp = secondDerivative(xi);
+  const double nxp = xp.norm(), onxp = 1./nxp;
+  SVector3 c = (onxp*onxp*onxp)*(xpp*nxp-xp*dot(xp,xpp)*onxp);
+  return c;
+}
+
+
+parametricLineNodalBasis::parametricLineNodalBasis(const nodalBasis &basis,
+                                                   const std::vector<SPoint3> &xyz):
+  _basis(basis), _xyz(xyz)
+{
+}
+
+
+SPoint3 parametricLineNodalBasis::operator()(double xi) const
+{
+  double *psi = new double[_xyz.size()];
+  SPoint3 p(0., 0., 0.);
+  _basis.f(-1 + 2 * xi, 0., 0., psi);
+  for (size_t j = 0; j < _xyz.size(); ++j) {
+    p[0] += psi[j] * _xyz[j].x();
+    p[1] += psi[j] * _xyz[j].y();
+    p[2] += psi[j] * _xyz[j].z();
+  }
+  delete[] psi;
+  return p;
+}
+
+
+SVector3 parametricLineNodalBasis::derivative(double xi) const
+{
+  double (*dpsi)[3] = new double[_xyz.size()][3];
+  SVector3 p(0., 0., 0.);
+  _basis.df(-1 + 2 * xi, 0., 0., dpsi);
+  for (size_t j = 0; j < _xyz.size(); ++j) {
+    p[0] += dpsi[j][0] * _xyz[j].x();
+    p[1] += dpsi[j][0] * _xyz[j].y();
+    p[2] += dpsi[j][0] * _xyz[j].z();
+  }
+  delete[] dpsi;
+  return p;
+}
+
+
+SVector3 parametricLineNodalBasis::secondDerivative(double xi) const
+{
+  double (*ddpsi)[3][3] = new double[_xyz.size()][3][3];
+  SVector3 p(0, 0, 0);
+  _basis.ddf(-1 + 2 * xi, 0, 0, ddpsi);
+  for (size_t j = 0; j < _xyz.size(); ++j) {
+    p[0] += ddpsi[j][0][0] * _xyz[j].x();
+    p[1] += ddpsi[j][0][0] * _xyz[j].y();
+    p[2] += ddpsi[j][0][0] * _xyz[j].z();
+  }
+  delete[] ddpsi;
+  return p;
+}
+
+
+parametricLineGEdge::parametricLineGEdge(const GEdge *edge, double t0, double t1):
+  _edge(edge), _t0(t0), _t1(t1)
+{
+}
+
+
+SPoint3 parametricLineGEdge::operator()(double xi) const
+{
+  GPoint gp = _edge->point(_t0 + (_t1 - _t0) * xi);
+  return SPoint3 (gp.x(), gp.y(), gp.z());
+}
+
+
+SVector3 parametricLineGEdge::derivative(double xi) const
+{
+  return _edge->firstDer(_t0 + (_t1 - _t0) * xi);
+}
+
+
+SVector3 parametricLineGEdge::secondDerivative(double xi) const
+{
+  return _edge->secondDer(_t0 + (_t1 - _t0) * xi);
+}
+
+
+void oversample(std::vector<SPoint3> &s, double tol)
+{
+  std::vector<SPoint3> t;
+  for (unsigned int i=1;i<s.size();i++){
+    SPoint3 p0 = s[i-1];
+    SPoint3 p1 = s[i];
+    double d = p0.distance(p1);
+    int N = (int) (d / tol);
+    t.push_back(p0);
+    for (int j=1;j<N;j++){
+      const double xi = (double) j/ N;
+      t.push_back(p0 + (p1-p0)*xi);
+    }
+  }
+  t.push_back(s[s.size()-1]);
+  s = t;
+}
+
+
+// ---------------------------------- Discrete Fréchet distance ----------------------------------
+
+
+double recurMinMax(int i, int j, fullMatrix<double> &CA,
+                   const std::vector<SPoint3> &P, const std::vector<SPoint3> &Q)
+{
+  double CAij;
+  if (CA(i,j) > -1.) {
+    CAij = CA(i,j);
+  }
+  else if (i==0 && j==0) {
+    CA(i,j) = P[0].distance(Q[0]);     // update the CA permanent
+    CAij = CA(i,j);                    // set the current relevant value
+  }
+  else if (i>0 && j==0) {
+    CA(i,j) = std::max(recurMinMax(i-1, 0, CA, P, Q), P[i].distance(Q[1]));
+    CAij = CA(i,j);
+  }
+  else if (i==0 && j>0) {
+    CA(i,j) = std::max(recurMinMax(0, j-1, CA, P, Q), P[0].distance(Q[j]));
+    CAij = CA(i,j);
+  }
+  else if (i>0 && j>0) {
+    double temp = std::min(std::min(recurMinMax(i-1, j, CA, P, Q),
+                           recurMinMax(i-1, j-1, CA, P, Q)), recurMinMax(i, j-1, CA, P, Q));
+    CA(i,j) = std::max(temp, P[i].distance(Q[j]));
+    CAij = CA(i,j);
+  }
+  else {
+    CA(i,j) = 1.e22;
+    CAij = CA(i,j);
+  }
+  return CAij;
+}
+
+
+double discreteFrechetDistanceBrute(const std::vector<SPoint3> &P,
+                                    const std::vector<SPoint3> &Q)
+{
+  const int sP = P.size();
+  const int sQ = Q.size();
+  fullMatrix<double> CA(sP, sQ);
+  CA.setAll(-1.);
+  double cm = recurMinMax(sP-1, sQ-1, CA, P, Q);
+  return cm;
+}
+
+
+// ---------------------------------- Discrete Hausdorff distance ----------------------------------
+
+
+double oneSidedMaxDist(const std::vector<SPoint3> &dpts1, const std::vector<SPoint3> &dpts2,
+                       int &iMaxDist, int &jMaxDist)
+{
+  double maxDist = 0.;
+  for (unsigned int i=0; i<dpts1.size(); i++) {
+    double dist = 1.e22;
+    int jDist = 0;
+    for (unsigned int j=0; j<dpts2.size(); j++) {
+      double h = dpts1[i].distance(dpts2[j]);
+      if (h < dist){
+        dist = h;
+        jDist = j;
+      }
+    }
+    if (dist > maxDist) {
+      maxDist = dist;
+      jMaxDist = jDist;
+      iMaxDist = i;
+    }
+  }
+  return maxDist;
+}
+
+
+#if defined(HAVE_ANN)
+double oneSidedMaxDistFast(const std::vector<SPoint3> &dptsA, const ANNpointArray &ptsB,
+                           ANNkd_tree *treeB, double tol)
+{
+  ANNidx idx[1];
+  ANNdist distSq[1];
+  ANNdist maxDistSq = 0.;
+  for (unsigned int i=0; i<dptsA.size(); i++) {
+    ANNcoord xyz[3] = {dptsA[i].x(), dptsA[i].y(), dptsA[i].z()};
+    treeB->annkSearch(xyz, 1, idx, distSq);
+    if (distSq[0] > maxDistSq) maxDistSq = distSq[0];
+  }
+  return sqrt(maxDistSq);
+}
+#endif
+
+
+double discreteHausdorffDistanceBrute(const std::vector<SPoint3> &dpts1,
+                                      const std::vector<SPoint3> &dpts2)
+{
+  int i1, j1, i2, j2;
+  double d1 = oneSidedMaxDist(dpts1, dpts2, i1, j1);
+  double d2 = oneSidedMaxDist(dpts2, dpts1, i2, j2);
+  return (d1 > d2) ? d1 : d2;
+}
+
+
+double discreteHausdorffDistanceFast(const std::vector<SPoint3> &dpts1,
+                                     const std::vector<SPoint3> &dpts2, double tol)
+{
+#if defined(HAVE_ANN)
+  ANNpointArray pts1 = annAllocPts(dpts1.size(), 3);
+  for (unsigned int k=0; k<dpts1.size(); k++) {
+    pts1[k][0] = dpts1[k].x();
+    pts1[k][1] = dpts1[k].y();
+    pts1[k][2] = dpts1[k].z();
+  }
+  ANNkd_tree *tree1 = new ANNkd_tree(pts1, dpts1.size(), 3);
+
+  ANNpointArray pts2 = annAllocPts(dpts2.size(), 3);
+  for (unsigned int k=0; k<dpts2.size(); k++) {
+    pts2[k][0] = dpts2[k].x();
+    pts2[k][1] = dpts2[k].y();
+    pts2[k][2] = dpts2[k].z();
+  }
+  ANNkd_tree *tree2 = new ANNkd_tree(pts2, dpts2.size(), 3);
+
+  double d1 = oneSidedMaxDistFast(dpts1, pts2, tree2, tol);
+  double d2 = oneSidedMaxDistFast(dpts2, pts1, tree1, tol);
+
+  delete tree1, tree2;
+  annDeallocPts(pts1);
+  annDeallocPts(pts2);
+
+  return (d1 > d2) ? d1 : d2;
+#else
+  Msg::Fatal("Gmsh should be compiled using ANN");
+#endif
+}
+
+
+template<int distDef>
+double discreteDistance(MLine *l, GEdge *ed, double tol, int meshDiscr, int geomDiscr)
+{
+  if (ed->geomType() == GEntity::Line) return 0.;
+
+  std::vector<SPoint3> dpts1, dpts2;
+  std::vector<double> ts1, ts2;
+
+  if (geomDiscr == CADDIST_DECASTELJAU)
+    ed->discretize(tol, dpts1, ts1);
+  else {
+    double t0, t1;
+    reparamMeshVertexOnEdge(l->getVertex(0), ed, t0);
+    reparamMeshVertexOnEdge(l->getVertex(1), ed, t1);
+//    if (t1 == 0.) t1 = 1.;  // DBG: Workaround bug closed curves
+    parametricLineGEdge l1(ed, t0, t1);
+    l1.discretize(dpts1, ts1, tol, 5, 45);
+  }
+  oversample(dpts1, tol);
+
+  if (meshDiscr == CADDIST_DECASTELJAU)
+    l->discretize(tol, dpts2, ts2);
+  else {
+    const nodalBasis &basis = *(l->getFunctionSpace());
+    std::vector<SPoint3> xyz;
+    const int nV = l->getNumVertices();
+    for (int i=0; i<nV; ++i) xyz.push_back(l->getVertex(i)->point());
+    parametricLineNodalBasis l2(basis, xyz);
+    int minDepth = std::ceil(std::log(nV)/std::log(2));
+    l2.discretize(dpts2, ts2, tol, minDepth, 10*minDepth);
+  }
+  oversample(dpts2, tol);
+
+  switch (distDef) {
+    case 1: return discreteHausdorffDistanceBrute(dpts1, dpts2);
+    case 2: return discreteHausdorffDistanceFast(dpts1, dpts2, tol);
+    case 3: return discreteFrechetDistanceBrute(dpts1, dpts2);
+  }
+  return -1.;
+}
+
+
+}
+
+
+double discreteHausdorffDistanceBruteEdge(MLine *l, GEdge *ed, double tol,
+                                          int meshDiscr, int geomDiscr)
+{
+  return discreteDistance<1>(l, ed, tol, meshDiscr, geomDiscr);
+}
+
+
+double discreteHausdorffDistanceFastEdge(MLine *l, GEdge *ed, double tol,
+                                         int meshDiscr, int geomDiscr)
+{
+  return discreteDistance<2>(l, ed, tol, meshDiscr, geomDiscr);
+}
+
+
+double discreteFrechetDistanceEdge(MLine *l, GEdge *ed, double tol,
+                                   int meshDiscr, int geomDiscr)
+{
+  return discreteDistance<3>(l, ed, tol, meshDiscr, geomDiscr);
+}
+
+
+// ---------------------------------- Taylor-based distance ----------------------------------
+
+
+double taylorDistanceSq1D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                          const std::vector<SVector3> &tanCAD)
+{
+  const int nV = nodesXYZ.size1();
+  fullMatrix<double> dxyzdX(nV, 3);
+  gb->getGradientsFromNodes(nodesXYZ, &dxyzdX, 0, 0);
+//  const double dx = nodesXYZ(1, 0) - nodesXYZ(0, 0), dy = nodesXYZ(1, 1) - nodesXYZ(0, 1),
+//               dz = nodesXYZ(1, 2) - nodesXYZ(0, 2), h = 0.5*sqrt(dx*dx+dy*dy+dz*dz)/double(nV-1);
+  double distSq = 0.;
+  for (int i=0; i<nV; i++) {
+    SVector3 tanMesh(dxyzdX(i, 0), dxyzdX(i, 1), dxyzdX(i, 2));
+    const double h = 0.25*tanMesh.normalize();                                            // Half of "local edge length"
+    SVector3 diff = (dot(tanCAD[i], tanMesh) > 0) ?
+                    tanCAD[i] - tanMesh : tanCAD[i] + tanMesh;
+    distSq += h*h*diff.normSq();
+  }
+  return distSq;
+}
+
+
+double taylorDistanceSq2D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                          const std::vector<SVector3> &normCAD)
+{
+  const int nV = nodesXYZ.size1();
+  fullMatrix<double> dxyzdX(nV, 3), dxyzdY(nV, 3);
+  gb->getGradientsFromNodes(nodesXYZ, &dxyzdX, &dxyzdY, 0);
+  double distSq = 0.;
+  for (int i=0; i<nV; i++) {
+    const double nz = dxyzdX(i, 0) * dxyzdY(i, 1) - dxyzdX(i, 1) * dxyzdY(i, 0);
+    const double ny = -dxyzdX(i, 0) * dxyzdY(i, 2) + dxyzdX(i, 2) * dxyzdY(i, 0);
+    const double nx = dxyzdX(i, 1) * dxyzdY(i, 2) - dxyzdX(i, 2) * dxyzdY(i, 1);
+    SVector3 normMesh(nx, ny, nz);
+    const double h = 0.25*sqrt(normMesh.normalize());                                     // Half of sqrt of "local area", to be adjusted w.r.t. el. type?
+    SVector3 diff = (dot(normCAD[i], normMesh) > 0) ?
+                    normCAD[i] - normMesh : normCAD[i] + normMesh;
+    distSq += h*h*diff.normSq();
+  }
+  return distSq;
+}
+
+
+double taylorDistanceEdge(MLine *l, GEdge *ge)
+{
+  const int nV = l->getNumVertices();
+  const GradientBasis *gb = BasisFactory::getGradientBasis(FuncSpaceData(l));
+
+  // Coordinates of vertices
+  fullMatrix<double> nodesXYZ(nV, 3);
+  l->getNodesCoord(nodesXYZ);
+
+  // Tangent to CAD at vertices
+  std::vector<SVector3> tanCAD(nV);
+  for (int i=0; i<nV; i++) {
+    double tCAD;
+    reparamMeshVertexOnEdge(l->getVertex(i), ge, tCAD);
+    tanCAD[i] = ge->firstDer(tCAD);
+    tanCAD[i].normalize();
+  }
+
+  // Compute distance
+  return sqrt(taylorDistanceSq1D(gb, nodesXYZ, tanCAD));
+}
+
+
+double taylorDistanceFace(MElement *el, GFace *gf)
+{
+  const int nV = el->getNumVertices();
+  const GradientBasis *gb = BasisFactory::getGradientBasis(FuncSpaceData(el));
+
+  // Coordinates of vertices
+  fullMatrix<double> nodesXYZ(nV, 3);
+  el->getNodesCoord(nodesXYZ);
+
+  // Normal to CAD at vertices
+  std::vector<SVector3> normCAD(nV);
+  for (int i=0; i<nV; i++) {
+    SPoint2 pCAD;
+    reparamMeshVertexOnFace(el->getVertex(i), gf, pCAD);
+    normCAD[i] = gf->normal(pCAD);
+    normCAD[i].normalize();
+  }
+
+  // Compute distance
+  return sqrt(taylorDistanceSq2D(gb, nodesXYZ, normCAD));
+}
+
+
+// ---------------------------------- General functions ----------------------------------
+
+
+void distanceFromElementsToGeometry(GModel *gm, int dim, std::map<MElement*,double> &distances)
+{
+  std::map<MEdge,double,Less_Edge> dist2Edge;
+  for (GModel::eiter it = gm->firstEdge(); it != gm->lastEdge(); ++it) {
+    if ((*it)->geomType() == GEntity::Line) continue;
+    for (unsigned int i = 0; i < (*it)->lines.size(); i++) {
+      double d = taylorDistanceEdge((*it)->lines[i], *it);
+      MEdge e =  (*it)->lines[i]->getEdge(0);
+      dist2Edge[e] = d;
+    }
+  }
+
+  std::map<MFace,double,Less_Face> dist2Face;
+  for(GModel::fiter it = gm->firstFace(); it != gm->lastFace(); ++it){
+    if ((*it)->geomType() == GEntity::Plane) continue;
+    for (unsigned int i = 0; i < (*it)->triangles.size(); i++) {
+      double d = taylorDistanceFace((*it)->triangles[i], *it);
+      MFace f =  (*it)->triangles[i]->getFace(0);
+      dist2Face[f] = d;
+    }
+  }
+
+  std::vector<GEntity*> entities;
+  gm->getEntities(entities);
+  for (int iEnt = 0; iEnt < entities.size(); ++iEnt) {
+    GEntity* &entity = entities[iEnt];
+    if (entity->dim() != dim) continue;
+    for (int iEl = 0; iEl < entity->getNumMeshElements(); iEl++) {       // Detect bad elements
+      MElement *element = entity->getMeshElement(iEl);
+      double d = 0.;
+      for (int iEdge = 0; iEdge < element->getNumEdges(); ++iEdge) {
+        MEdge e =  element->getEdge(iEdge);
+        std::map<MEdge,double,Less_Edge>::iterator it = dist2Edge.find(e);
+        if (it != dist2Edge.end()) d += it->second;
+      }
+      for (int iFace = 0; iFace < element->getNumFaces(); ++iFace) {
+        MFace f =  element->getFace(iFace);
+        std::map<MFace,double,Less_Face>::iterator it = dist2Face.find(f);
+        if (it != dist2Face.end()) d += it->second;
+      }
+      distances[element] = d;
+    }
+  }
+}
+
+
+double distanceToGeometry(GModel *gm, int distType, double tol, int meshDiscr, int geomDiscr)
+{
+  double maxDist = 0.;
+
+  for (GModel::eiter it = gm->firstEdge(); it != gm->lastEdge(); ++it) {
+    if ((*it)->geomType() == GEntity::Line) continue;
+    for (unsigned int i = 0; i < (*it)->lines.size(); i++) {
+      double dist;
+      switch (distType) {
+        case CADDIST_TAYLOR:
+          dist = taylorDistanceEdge((*it)->lines[i], *it);
+          break;
+        case CADDIST_FRECHET:
+          dist = discreteFrechetDistanceEdge((*it)->lines[i], *it,
+                                             tol, meshDiscr, geomDiscr);
+          break;
+        case CADDIST_HAUSFAST:
+          dist = discreteHausdorffDistanceFastEdge((*it)->lines[i], *it,
+                                                   tol, meshDiscr, geomDiscr);
+          break;
+        case CADDIST_HAUSBRUTE:
+          dist = discreteHausdorffDistanceBruteEdge((*it)->lines[i], *it,
+                                                    tol, meshDiscr, geomDiscr);
+          break;
+        default:
+          Msg::Error("Wrong CAD distance type in distanceToGeometry");
+          break;
+      }
+      maxDist = std::max(dist, maxDist);
+    }
+  }
+
+  if (distType == CADDIST_TAYLOR) {
+    for(GModel::fiter it = gm->firstFace(); it != gm->lastFace(); ++it) {
+      if ((*it)->geomType() == GEntity::Plane) continue;
+      for (unsigned int i = 0; i < (*it)->triangles.size(); i++) {
+        maxDist = std::max(taylorDistanceFace((*it)->triangles[i], *it), maxDist);
+      }
+    }
+  }
+
+  return maxDist;
+}
diff --git a/contrib/HighOrderMeshOptimizer/CADDistances.h b/contrib/HighOrderMeshOptimizer/CADDistances.h
new file mode 100644
index 0000000..fb35f13
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/CADDistances.h
@@ -0,0 +1,43 @@
+// TODO: Header
+
+#ifndef _CADDISTANCES_H_
+#define _CADDISTANCES_H_
+
+#include "fullMatrix.h"
+#include <vector>
+#include <map>
+
+
+class GradientBasis;
+class MLine;
+class MElement;
+class GEdge;
+class GFace;
+class SVector3;
+class GModel;
+
+
+enum { CADDIST_GEN, CADDIST_DECASTELJAU };
+enum { CADDIST_TAYLOR, CADDIST_FRECHET, CADDIST_HAUSFAST, CADDIST_HAUSBRUTE };
+
+
+double discreteFrechetDistanceEdge(MLine *l, GEdge *ed, double tol,
+                                   int meshDiscr = CADDIST_GEN, int geomDiscr = CADDIST_GEN);
+double discreteHausdorffDistanceBruteEdge(MLine *l, GEdge *ed, double tol,
+                                          int meshDiscr = CADDIST_GEN, int geomDiscr = CADDIST_GEN);
+double discreteHausdorffDistanceFastEdge(MLine *l, GEdge *ed, double tol,
+                                         int meshDiscr = CADDIST_GEN, int geomDiscr = CADDIST_GEN);
+double taylorDistanceSq1D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                          const std::vector<SVector3> &tanCAD);
+double taylorDistanceSq2D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                          const std::vector<SVector3> &normCAD);
+double taylorDistanceEdge(MLine *l, GEdge *ge);
+double taylorDistanceFace(MElement *el, GFace *gf);
+
+void distanceFromElementsToGeometry(GModel *gm, int dim, std::map<MElement*, double> &distances);
+double distanceToGeometry(GModel *gm, int distType = CADDIST_TAYLOR, double tol = 1e-3,
+                          int meshDiscr = CADDIST_DECASTELJAU,
+                          int geomDiscr = CADDIST_DECASTELJAU);
+
+
+#endif /* _CADDISTANCES_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/CMakeLists.txt b/contrib/HighOrderMeshOptimizer/CMakeLists.txt
index f7311c8..1ebfb5c 100644
--- a/contrib/HighOrderMeshOptimizer/CMakeLists.txt
+++ b/contrib/HighOrderMeshOptimizer/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -8,10 +8,12 @@ set(SRC
   OptHOM.cpp 
   OptHomRun.cpp 
   OptHomIntegralBoundaryDist.cpp
+  OptHomCADDist.cpp
   ParamCoord.cpp 
   SuperEl.cpp 
   OptHomElastic.cpp
   OptHomFastCurving.cpp
+  CADDistances.cpp
 )
 
 file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.hpp)
diff --git a/contrib/HighOrderMeshOptimizer/OptHOM.cpp b/contrib/HighOrderMeshOptimizer/OptHOM.cpp
index fd0e6d1..3200e1b 100644
--- a/contrib/HighOrderMeshOptimizer/OptHOM.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHOM.cpp
@@ -27,6 +27,8 @@
 //
 // Contributors: Thomas Toulorge, Jonathan Lambrechts
 
+static int NEVAL = 0;
+
 #include <iostream>
 #include <algorithm>
 #include "OptHomMesh.h"
@@ -34,6 +36,11 @@
 #include "OptHomRun.h"
 #include "GmshMessage.h"
 #include "GmshConfig.h"
+#include "OptHomCADDist.h"
+#include "MElement.h"
+#include "MLine.h"
+#include "MTriangle.h"
+#include "GModel.h"
 
 #if defined(HAVE_BFGS)
 
@@ -106,22 +113,16 @@ bool OptHOM::addJacObjGrad(double &Obj, alglib::real_1d_array &gradObj)
   return true;
 }
 
-bool OptHOM::addBndObjGrad(double factor, double &Obj, alglib::real_1d_array &gradObj)
-{
-  maxDistCAD = 0.0;
 
+bool OptHOM::addApproximationErrorObjGrad(double factor, double &Obj, alglib::real_1d_array &gradObj, simpleFunction<double>& fct)
+{
   std::vector<double> gradF;
-  double DISTANCE = 0.0;
   for (int iEl = 0; iEl < mesh.nEl(); iEl++) {
     double f;
-    if (mesh.bndDistAndGradients(iEl, f, gradF, geomTol)) {
-      maxDistCAD = std::max(maxDistCAD,f);
-      DISTANCE += f;
-      Obj += f * factor;
-      for (size_t i = 0; i < mesh.nPCEl(iEl); ++i){
-        gradObj[mesh.indPCEl(iEl, i)] += gradF[i] * factor;
-	//	printf("gradf[%d] = %12.5E\n",i,gradF[i]*factor);
-      }
+    mesh.approximationErrorAndGradients(iEl, f, gradF, 1.e-6, fct);
+    Obj += f * factor;
+    for (size_t i = 0; i < mesh.nPCEl(iEl); ++i){
+      gradObj[mesh.indPCEl(iEl, i)] += gradF[i] * factor;
     }
   }
   //  printf("DIST = %12.5E\n",DISTANCE);
@@ -129,6 +130,233 @@ bool OptHOM::addBndObjGrad(double factor, double &Obj, alglib::real_1d_array &gr
 
 }
 
+static void computeGradSFAtNodes (MElement *e, std::vector<std::vector<SVector3> > &gsf)
+{
+  const nodalBasis &elbasis = *e->getFunctionSpace();
+  double s[256][3];
+  for (int j=0;j<e->getNumVertices();j++){
+    std::vector<SVector3> g(e->getNumVertices());
+    double u_mesh = elbasis.points(j,0);
+    double v_mesh = elbasis.points(j,1);
+    e->getGradShapeFunctions ( u_mesh , v_mesh , 0,  s);
+    for (int k=0;k<e->getNumVertices();k++)
+      g[k] = SVector3(s[k][0],s[k][1],s[k][2]);
+    gsf.push_back(g);
+  }
+}
+
+
+bool OptHOM::addBndObjGrad(double factor, double &Obj, alglib::real_1d_array &gradObj)
+{
+  // set the mesh to its present position
+  std::vector<SPoint3> xyz,uvw;
+  mesh.getGEntityPositions(xyz,uvw);
+  mesh.updateGEntityPositions();
+
+  //could be better (e.g. store the model in the Mesh:: datastrucure)
+
+  GModel *gm = GModel::current();
+
+  // for all model edges, compute the error between the geometry and the mesh
+
+  maxDistCAD = 0.0;
+  double distCAD = 0.0;
+
+  for (GModel::eiter it = gm->firstEdge(); it != gm->lastEdge(); ++it){
+    // do not do straight lines
+    if ((*it)->geomType() == GEntity::Line)continue;
+    // look at all mesh lines
+
+    std::vector<bool> doWeCompute((*it)->lines.size());
+    for (unsigned int i=0;i<(*it)->lines.size(); i++){
+      doWeCompute[i] = false;
+      for (unsigned int j=0;j<(*it)->lines[i]->getNumVertices(); j++){
+        int index = mesh.getFreeVertexStartIndex((*it)->lines[i]->getVertex(j));
+        if (index >=0){
+          doWeCompute[i] = true;
+          continue;
+        }
+      }
+    }
+
+    std::vector<double> dist((*it)->lines.size());
+    for (unsigned int i=0;i<(*it)->lines.size(); i++){
+      if (doWeCompute[i]){
+        // compute the distance from the geometry to the mesh
+        dist[i] = MLineGEdgeDistance ( (*it)->lines[i] , *it );
+        maxDistCAD = std::max(maxDistCAD,dist[i]);
+        distCAD += dist [i] * factor;
+      }
+    }
+    // be clever to compute the derivative : iterate on all
+    // Distance = \sum_{lines} Distance (line, GEdge)
+    // For a high order vertex, we compute the derivative only by
+    // recomputing the distance to one only line
+    const double eps = 1.e-6;
+    for (unsigned int i=0;i<(*it)->lines.size(); i++){
+      if (doWeCompute[i]){
+        for (int j=2 ; j<(*it)->lines[i]->getNumVertices()  ; j++){
+          MVertex *v = (*it)->lines[i]->getVertex(j);
+          int index = mesh.getFreeVertexStartIndex(v);
+          //	printf("%d %d (%d %d)\n",v->getNum(),index,v->onWhat()->tag(),v->onWhat()->dim());
+          if (index >= 0){
+            double t;
+            v->getParameter(0,t);
+            SPoint3 pp (v->x(),v->y(),v->z());
+            GPoint gp = (*it)->point(t+eps);
+            v->setParameter(0,t+eps);
+            v->setXYZ(gp.x(),gp.y(),gp.z());
+            double dist2 = MLineGEdgeDistance ( (*it)->lines[i] , *it );
+            double deriv = (dist2 - dist[i])/eps;
+            v->setXYZ(pp.x(),pp.y(),pp.z());
+            v->setParameter(0,t);
+            //	  printf("%g %g %g\n",dist[i],dist2, MLineGEdgeDistance ( (*it)->lines[i] , *it ));
+            // get the index of the vertex
+            gradObj[index] += deriv * factor;
+          }
+        }
+      }
+      //    printf("done\n");
+      // For a low order vertex classified on the GEdge, we recompute
+    // two distances for the two MLines connected to the vertex
+      for (unsigned int i=0;i<(*it)->lines.size()-1; i++){
+        MVertex *v =  (*it)->lines[i]->getVertex(1);
+        int index = mesh.getFreeVertexStartIndex(v);
+        if (index >= 0){
+          double t;
+          v->getParameter(0,t);
+          SPoint3 pp (v->x(),v->y(),v->z());
+          GPoint gp = (*it)->point(t+eps);
+          v->setParameter(0,t+eps);
+          v->setXYZ(gp.x(),gp.y(),gp.z());
+          MLine *l1 = (*it)->lines[i];
+          MLine *l2 = (*it)->lines[i+1];
+          //	printf("%d %d -- %d %d\n",l1->getVertex(0)->getNum(),l1->getVertex(1)->getNum(),l2->getVertex(0)->getNum(),l2->getVertex(1)->getNum());
+          double deriv =
+            (MLineGEdgeDistance ( l1 , *it ) - dist[i])  /eps +
+            (MLineGEdgeDistance ( l2 , *it ) - dist[i+1])/eps;
+          v->setXYZ(pp.x(),pp.y(),pp.z());
+          v->setParameter(0,t);
+          gradObj[index] += deriv * factor;
+        }
+      }
+    }
+  }
+  //  printf("computing distance : 1D part %12.5E\n",distCAD);
+
+  // now the 3D part !
+
+  std::vector<std::vector<SVector3> > gsfT;
+  computeGradSFAtNodes ( (*gm->firstFace())->triangles[0],gsfT);
+
+  std::map<MVertex*,SVector3> normalsToCAD;
+
+
+  for(GModel::fiter it = gm->firstFace(); it != gm->lastFace(); ++it){
+    // do not do plane surfaces
+    if ((*it)->geomType() == GEntity::Plane)continue;
+    std::map<MTriangle*,double> dist;
+
+    std::vector<bool> doWeCompute((*it)->triangles.size());
+    for (unsigned int i=0;i<(*it)->triangles.size(); i++){
+      doWeCompute[i] = false;
+      for (unsigned int j=0;j<(*it)->triangles[i]->getNumVertices(); j++){
+        int index = mesh.getFreeVertexStartIndex((*it)->triangles[i]->getVertex(j));
+        if (index >=0){
+          doWeCompute[i] = true;
+        }
+      }
+      if (doWeCompute[i]){
+        for (unsigned int j=0;j<(*it)->triangles[i]->getNumVertices(); j++){
+          MVertex *v = (*it)->triangles[i]->getVertex(j);
+          if (normalsToCAD.find(v) == normalsToCAD.end()){
+            SPoint2 p_cad;
+            reparamMeshVertexOnFace(v, *it, p_cad);
+            SVector3 tg_cad = (*it)->normal(p_cad);
+            tg_cad.normalize();
+            normalsToCAD[v] = tg_cad;
+          }
+        }
+      }
+    }
+
+    for (unsigned int i=0;i<(*it)->triangles.size(); i++){
+      // compute the distance from the geometry to the mesh
+      if(doWeCompute[i]){
+        const double d = MFaceGFaceDistanceOld((*it)->triangles[i], *it, &gsfT, &normalsToCAD);
+        dist[(*it)->triangles[i]] = d;
+        maxDistCAD = std::max(maxDistCAD,d);
+        distCAD += d * factor;
+      }
+    }
+
+    // be clever again to compute the derivatives
+    const double eps = 1.e-6;
+    for (unsigned int i=0;i<(*it)->triangles.size(); i++){
+      if(doWeCompute[i]){
+        for (unsigned int j=0;j<(*it)->triangles[i]->getNumVertices(); j++){
+          //    for (; itm !=v2t.end(); ++itm){
+          MVertex   *v = (*it)->triangles[i]->getVertex(j);
+          if(v->onWhat()->dim() == 1){
+            int index = mesh.getFreeVertexStartIndex(v);
+            if (index >= 0){
+              MTriangle *t = (*it)->triangles[i];
+              GEdge *ge = v->onWhat()->cast2Edge();
+              double t_;
+              v->getParameter(0,t_);
+              SPoint3 pp (v->x(),v->y(),v->z());
+              GPoint gp = ge->point(t_+eps);
+              v->setParameter(0,t_+eps);
+              v->setXYZ(gp.x(),gp.y(),gp.z());
+              const double distT = dist[t];
+              double deriv =  (MFaceGFaceDistanceOld(t, *it, &gsfT, &normalsToCAD) - distT) /eps;
+              v->setXYZ(pp.x(),pp.y(),pp.z());
+              v->setParameter(0,t_);
+              gradObj[index] += deriv * factor;
+            }
+          }
+
+          if(v->onWhat() == *it){
+            int index = mesh.getFreeVertexStartIndex(v);
+            if (index >= 0){
+              MTriangle *t = (*it)->triangles[i];
+              double uu,vv;
+              v->getParameter(0,uu);
+              v->getParameter(1,vv);
+              SPoint3 pp (v->x(),v->y(),v->z());
+
+              const double distT = dist[t];
+
+              GPoint gp = (*it)->point(uu+eps,vv);
+              v->setParameter(0,uu+eps);
+              v->setXYZ(gp.x(),gp.y(),gp.z());
+              double deriv = (MFaceGFaceDistanceOld(t, *it, &gsfT, &normalsToCAD) - distT) /eps;
+              v->setXYZ(pp.x(),pp.y(),pp.z());
+              v->setParameter(0,uu);
+              gradObj[index] += deriv * factor;
+
+              gp = (*it)->point(uu,vv+eps);
+              v->setParameter(1,vv+eps);
+              v->setXYZ(gp.x(),gp.y(),gp.z());
+              deriv = (MFaceGFaceDistanceOld(t, *it, &gsfT, &normalsToCAD) - distT) /eps;
+              v->setXYZ(pp.x(),pp.y(),pp.z());
+              v->setParameter(1,vv);
+              gradObj[index+1] += deriv * factor;
+            }
+          }
+        }
+      }
+    }
+  }
+  mesh.updateGEntityPositions(xyz,uvw);
+  Obj +=distCAD;
+  //  printf("computing distance : 2D part %12.5E\n",distCAD);
+  //  printf("%22.15E\n",distCAD);
+  return true;
+}
+
+
+
 bool OptHOM::addMetricMinObjGrad(double &Obj, alglib::real_1d_array &gradObj)
 {
 
@@ -156,7 +384,7 @@ bool OptHOM::addMetricMinObjGrad(double &Obj, alglib::real_1d_array &gradObj)
 
 // Contribution of the vertex distance to the objective function value and
 // gradients
-bool OptHOM::addDistObjGrad(double Fact, double Fact2, double &Obj,
+bool OptHOM::addDistObjGrad(double Fact, double &Obj,
                             alglib::real_1d_array &gradObj)
 {
   maxDist = 0;
@@ -164,37 +392,60 @@ bool OptHOM::addDistObjGrad(double Fact, double Fact2, double &Obj,
   int nbBnd = 0;
 
   for (int iFV = 0; iFV < mesh.nFV(); iFV++) {
-    const double Factor = invLengthScaleSq*(mesh.forced(iFV) ? Fact : Fact2);
     const double dSq = mesh.distSq(iFV), dist = sqrt(dSq);
-    Obj += Factor * dSq;
+    Obj += Fact * dSq;
     std::vector<double> gDSq(mesh.nPCFV(iFV));
     mesh.gradDistSq(iFV,gDSq);
     for (int iPC = 0; iPC < mesh.nPCFV(iFV); iPC++)
-      gradObj[mesh.indPCFV(iFV,iPC)] += Factor*gDSq[iPC];
+      gradObj[mesh.indPCFV(iFV,iPC)] += Fact*gDSq[iPC];
     maxDist = std::max(maxDist, dist);
     avgDist += dist;
     nbBnd++;
   }
   if (nbBnd != 0) avgDist /= nbBnd;
 
+  //  printf("DISTANCE %22.15E\n",avgDist);
+
   return true;
 }
 
+// FIXME TEST
+// Assume a unit square centered on 0,0
+// fct is
+//class toto : public simpleFunction<double>
+//{
+//public :
+//  double operator () (double x, double y, double z) const{
+//    const double r = sqrt(x*x+y*y);
+//    const double r0 = .3;
+//  const double f = atan(20*(x));
+//    return f;
+//  }
+//};
+
+
 void OptHOM::evalObjGrad(const alglib::real_1d_array &x, double &Obj,
                          alglib::real_1d_array &gradObj)
 {
+  NEVAL++;
   mesh.updateMesh(x.getcontent());
 
   Obj = 0.;
   for (int i = 0; i < gradObj.length(); i++) gradObj[i] = 0.;
 
+  //  printf("Computing Obj : ");
+  /// control Jacobians
   addJacObjGrad(Obj, gradObj);
-  addDistObjGrad(lambda, lambda2, Obj, gradObj);
+  /// Control distance to the straight sided mesh
+  addDistObjGrad(lambda, Obj, gradObj);
+
   if(_optimizeMetricMin)
     addMetricMinObjGrad(Obj, gradObj);
   if(_optimizeCAD)
     addBndObjGrad(lambda3, Obj, gradObj);
-  //  printf("maxDistCAD = %12.5E distMax = %12.5E Obj %12.5E\n",maxDistCAD,distance_max,Obj);
+
+  //  printf("Obj = %12.5E\n",Obj);
+
   if ((minJac > barrier_min) && (maxJac < barrier_max || !_optimizeBarrierMax) && (maxDistCAD < distance_max|| !_optimizeCAD) ) {
     Msg::Info("Reached %s (%g %g) requirements, setting null gradient",
               _optimizeMetricMin ? "svd" : "jacobian", minJac, maxJac);
@@ -209,6 +460,7 @@ void evalObjGradFunc(const alglib::real_1d_array &x, double &Obj,
   (static_cast<OptHOM*>(HOInst))->evalObjGrad(x, Obj, gradObj);
 }
 
+
 void OptHOM::recalcJacDist()
 {
   maxDist = 0;
@@ -269,37 +521,17 @@ void OptHOM::calcScale(alglib::real_1d_array &scale)
     for (int iPC = 0; iPC < mesh.nPCFV(iFV); iPC++)
       scale[mesh.indPCFV(iFV,iPC)] = scaleFV[iPC];
   }
-
-//  std::vector<double> inSize(mesh.nEl());
-//  mesh.elInSize(inSize);
-//  for (int iEl = 0; iEl < mesh.nEl(); iEl++) {
-////    std::cout << "DBGTT: inSize[" << iEl << "] = " << inSize[iEl] << std::endl;
-//    for (int iPCEl = 0; iPCEl < mesh.nPCEl(iEl); iPCEl++)
-//      scale[mesh.indPCEl(iEl,iPCEl)] *= inSize[iEl];
-//  }
-
-//  for (int iEl = 0; iEl < mesh.nEl(); iEl++) {
-//    std::vector<double> sJ(mesh.nBezEl(iEl)), gSJ(mesh.nBezEl(iEl)*mesh.nPCEl(iEl));
-//    mesh.scaledJacAndGradients(iEl,sJ,gSJ);
-//    for (int iPC = 0; iPC < mesh.nPCEl(iEl); iPC++) {
-//      double grad = 0.;
-//      for (int l = 0; l < mesh.nBezEl(iEl); l++) grad = std::max(grad,fabs(gSJ[mesh.indGSJ(iEl,l,iPC)]));
-//      scale[mesh.indPCEl(iEl,iPC)] *= mesh.nBezEl(iEl)/grad;
-////      std::cout << "DBGTT: scale[" << mesh.indPCEl(iEl,iPC) << "] = " << scale[mesh.indPCEl(iEl,iPC)] << std::endl;
-//    }
-//  }
-
 }
 
-void OptHOM::OptimPass(alglib::real_1d_array &x,
-                       const alglib::real_1d_array &initGradObj, int itMax)
+
+void OptHOM::OptimPass(alglib::real_1d_array &x, int itMax)
 {
 
   static const double EPSG = 0.;
   static const double EPSF = 0.;
   static const double EPSX = 0.;
   static int OPTMETHOD = 1;
-  
+
   Msg::Info("--- Optimization pass with initial jac. range (%g, %g), jacBar = %g",
             minJac, maxJac, jacBar);
 
@@ -359,7 +591,8 @@ void OptHOM::OptimPass(alglib::real_1d_array &x,
   }
 }
 
-int OptHOM::optimize(double weightFixed, double weightFree, double weightCAD, double b_min,
+
+int OptHOM::optimize(double weight, double weightCAD, double b_min,
                      double b_max, bool optimizeMetricMin, int pInt,
                      int itMax, int optPassMax, int optCAD, double distanceMax, double tolerance)
 {
@@ -373,8 +606,7 @@ int OptHOM::optimize(double weightFixed, double weightFree, double weightCAD, do
   _optimizeMetricMin = optimizeMetricMin;
   _optimizeCAD = optCAD;
   // Set weights & length scale for non-dimensionalization
-  lambda = weightFixed;
-  lambda2 = weightFree;
+  lambda = weight;
   lambda3 = weightCAD;
   geomTol = tolerance;
   std::vector<double> dSq(mesh.nEl());
@@ -415,12 +647,15 @@ int OptHOM::optimize(double weightFixed, double weightFree, double weightCAD, do
 
   int ITER = 0;
   bool minJacOK = true;
+
   while (minJac < barrier_min || (maxDistCAD > distance_max && _optimizeCAD)) {
     const double startMinJac = minJac;
-    OptimPass(x, gradObj, itMax);
+    NEVAL = 0;
+    OptimPass(x, itMax);
+    printf("######  NEVAL = %d\n",NEVAL);
     recalcJacDist();
     jacBar = (minJac > 0.) ? 0.9*minJac : 1.1*minJac;
-    if (_optimizeCAD)   jacBar = std::min(jacBar,barrier_min); 
+    if (_optimizeCAD)   jacBar = std::min(jacBar,barrier_min);
     if (ITER ++ > optPassMax) {
       minJacOK = (minJac > barrier_min && (maxDistCAD < distance_max || !_optimizeCAD));
       break;
@@ -438,7 +673,7 @@ int OptHOM::optimize(double weightFixed, double weightFree, double weightCAD, do
     jacBar =  1.1 * maxJac;
     while (maxJac > barrier_max ) {
       const double startMaxJac = maxJac;
-      OptimPass(x, gradObj, itMax);
+      OptimPass(x, itMax);
       recalcJacDist();
       jacBar =  1.1 * maxJac;
       if (ITER ++ > optPassMax) break;
diff --git a/contrib/HighOrderMeshOptimizer/OptHOM.h b/contrib/HighOrderMeshOptimizer/OptHOM.h
index 7ca9db1..7e1c614 100644
--- a/contrib/HighOrderMeshOptimizer/OptHOM.h
+++ b/contrib/HighOrderMeshOptimizer/OptHOM.h
@@ -34,6 +34,7 @@
 #include <math.h>
 #include "GmshConfig.h"
 #include "OptHomMesh.h"
+#include "simpleFunction.h"
 
 #if defined(HAVE_BFGS)
 
@@ -50,8 +51,9 @@ public:
   // are in the range; returns 0 if the mesh is valid (all jacobians positive,
   // JMIN > 0) but JMIN < barrier_min || JMAX > barrier_max; returns -1 if the
   // mesh is invalid : some jacobians cannot be made positive
-  int optimize(double lambda, double lambda2, double lambda3, double barrier_min, double barrier_max,
-               bool optimizeMetricMin, int pInt, int itMax, int optPassMax, int optimizeCAD, double optCADDistMax, double tolerance);
+  int optimize(double lambda, double lambda3, double barrier_min, double barrier_max,
+               bool optimizeMetricMin, int pInt, int itMax, int optPassMax,
+               int optimizeCAD, double optCADDistMax, double tolerance);
   void recalcJacDist();
   inline void getJacDist(double &minJ, double &maxJ, double &maxD, double &avgD);
   void updateMesh(const alglib::real_1d_array &x);
@@ -60,9 +62,8 @@ public:
   void printProgress(const alglib::real_1d_array &x, double Obj);
 
   double barrier_min, barrier_max, distance_max, geomTol;
-
  private:
-  double lambda, lambda2, lambda3, jacBar, invLengthScaleSq;
+  double lambda, lambda3, jacBar, invLengthScaleSq;
   int iter, progressInterv; // Current iteration, interval of iterations for reporting
   bool _optimizeMetricMin;
   double initObj, initMaxDist, initAvgDist; // Values for reporting
@@ -71,14 +72,13 @@ public:
                             // true : fixed barrier min + moving barrier max
   bool _optimizeCAD; // false : do not minimize the distance between mesh and CAD
                      // true : minimize the distance between mesh and CAD
+  bool addApproximationErrorObjGrad(double Fact, double &Obj, alglib::real_1d_array &gradObj, simpleFunction<double>& fct);
   bool addJacObjGrad(double &Obj, alglib::real_1d_array &gradObj);
-  bool addBndObjGrad(double Fact, double &Obj, alglib::real_1d_array &gradObj);
+  bool addBndObjGrad (double Fact, double &Obj, alglib::real_1d_array &gradObj);
   bool addMetricMinObjGrad(double &Obj, alglib::real_1d_array &gradObj);
-  bool addDistObjGrad(double Fact, double Fact2, double &Obj,
-                      alglib::real_1d_array &gradObj);
+  bool addDistObjGrad(double Fact, double &Obj, alglib::real_1d_array &gradObj);
   void calcScale(alglib::real_1d_array &scale);
-  void OptimPass(alglib::real_1d_array &x, const alglib::real_1d_array &initGradObj,
-                 int itMax);
+  void OptimPass(alglib::real_1d_array &x, int itMax);
 };
 
 void OptHOM::getJacDist(double &minJ, double &maxJ, double &maxD, double &avgD)
@@ -86,6 +86,10 @@ void OptHOM::getJacDist(double &minJ, double &maxJ, double &maxD, double &avgD)
   minJ = minJac; maxJ = maxJac; maxD = maxDist; avgD = avgDist;
 }
 
+double distanceToGeometry(GModel *gm);
+void distanceFromElementsToGeometry(GModel *gm, int dim, std::map<MElement*,double> &distances);
+
+
 #endif
 
 #endif
diff --git a/contrib/HighOrderMeshOptimizer/OptHomCADDist.cpp b/contrib/HighOrderMeshOptimizer/OptHomCADDist.cpp
new file mode 100644
index 0000000..9cd6685
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomCADDist.cpp
@@ -0,0 +1,246 @@
+// TODO: Header
+
+#include "MLine.h"
+#include "MTriangle.h"
+#include "GModel.h"
+
+#include "GEdge.h"
+#include "JacobianBasis.h"
+#include "BasisFactory.h"
+#include "OptHomCADDist.h"
+
+
+double MFaceGFaceDistanceOld(MTriangle *t, GFace *gf,
+                             std::vector<std::vector<SVector3> > *gsfT,
+                             std::map<MVertex*,SVector3> *normalsToCAD) {
+  const double h = t->maxEdge();
+  double jac[3][3];
+  double distFace = 0.0;
+  //  for (int j=0;j<3;j++){
+  for (int j=0;j<t->getNumVertices();j++){
+    // get parametric coordinates of jth vertex
+    // the last line of the jacobian is the normal
+    // to the element @ (u_mesh,v_mesh)
+
+    if (gsfT){
+      double detJ = t->getJacobian((*gsfT)[j],jac);
+    }
+    else{
+      const nodalBasis &elbasis = *t->getFunctionSpace();
+      double u_mesh = elbasis.points(j,0);
+      double v_mesh = elbasis.points(j,1);
+      double detJ = t->getJacobian(u_mesh,v_mesh,0,jac);
+    }
+
+    SVector3 tg_mesh (jac[2][0],jac[2][1],jac[2][2]);
+    tg_mesh.normalize();
+
+    SVector3 tg_cad ;
+    if (normalsToCAD)tg_cad = (*normalsToCAD)[t->getVertex(j)];
+    else {
+      SPoint2 p_cad;
+      reparamMeshVertexOnFace(t->getVertex (j), gf, p_cad);
+      tg_cad = gf->normal(p_cad);
+      tg_cad.normalize();
+    }
+    SVector3 diff1 = (dot(tg_cad, tg_mesh) > 0) ?
+      tg_cad - tg_mesh : tg_cad + tg_mesh;
+    //    printf("%g %g %g vs %g %g %g\n",tg_cad.x(),tg_cad.y(),tg_cad.z(),tg_mesh.x(),tg_mesh.y(),tg_mesh.z());
+    distFace += diff1.norm();
+  }
+  return distFace;
+}
+
+
+double MLineGEdgeDistanceOld(MLine *l, GEdge *ge, FILE *f) {
+  const nodalBasis &elbasis = *l->getFunctionSpace();
+  const double h = .25*0.5*distance (l->getVertex (0), l->getVertex (1) ) / (l->getNumVertices()-1);
+  double jac[3][3];
+  double distEdge = 0.0;
+
+  //  if(f)printf("%d\n",l->getNumVertices());
+
+  for (int j=0;j<l->getNumVertices();j++){
+    double t_mesh = elbasis.points(j,0);
+    //    if (f) printf("%g ",t_mesh);
+    double detJ = l->getJacobian(t_mesh,0,0,jac);
+    SVector3 tg_mesh (jac[0][0],jac[0][1],jac[0][2]);
+    tg_mesh.normalize();
+    double t_cad;
+    reparamMeshVertexOnEdge(l->getVertex (j), ge, t_cad);
+    SVector3 tg_cad = ge->firstDer(t_cad);
+    tg_cad.normalize();
+
+    SVector3 diff1 = (dot(tg_cad, tg_mesh) > 0) ?
+      tg_cad - tg_mesh : tg_cad + tg_mesh;
+
+    if (f){
+      fprintf (f,"SP(%g,%g,%g){%g};\n",l->getVertex (j)->x(),
+         l->getVertex (j)->y(),l->getVertex (j)->z(),h*diff1.norm());
+    }
+
+    //    SVector3 n = crossprod(tg_cad,tg_mesh);
+    //    printf("%g %g vs %g %g\n",tg_cad.x(),tg_cad.y(),tg_mesh.x(),tg_mesh.y());
+    distEdge += diff1.norm();
+  }
+  //  if(f)printf("\n");
+  return h*distEdge;
+}
+
+
+double distToCAD1D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                   const std::vector<SVector3> &tanCAD, double edLength)
+{
+  const int nV = nodesXYZ.size1();
+  const double h = .25*0.5*edLength/(nV-1);
+  fullMatrix<double> dxyzdX(nV, 3);
+  gb->getGradientsFromNodes(nodesXYZ, &dxyzdX, 0, 0);
+  double dist = 0.;
+  for (int i=0; i<nV; i++) {
+    SVector3 tanMesh(dxyzdX(i, 0), dxyzdX(i, 1), dxyzdX(i, 2));
+    tanMesh.normalize();
+    SVector3 diff = (dot(tanCAD[i], tanMesh) > 0) ?
+                    tanCAD[i] - tanMesh : tanCAD[i] + tanMesh;
+    dist += diff.norm();
+  }
+  return h*dist;
+}
+
+
+double distToCAD2D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                   const std::vector<SVector3> &normCAD)
+{
+  const int nV = nodesXYZ.size1();
+  fullMatrix<double> dxyzdX(nV, 3),dxyzdY(nV, 3);
+  gb->getGradientsFromNodes(nodesXYZ, &dxyzdX, &dxyzdY, 0);
+  double dist = 0.;
+  for (int i=0; i<nV; i++) {
+    const double nz = dxyzdX(i, 0) * dxyzdY(i, 1) - dxyzdX(i, 1) * dxyzdY(i, 0);
+    const double ny = -dxyzdX(i, 0) * dxyzdY(i, 2) + dxyzdX(i, 2) * dxyzdY(i, 0);
+    const double nx = dxyzdX(i, 1) * dxyzdY(i, 2) - dxyzdX(i, 2) * dxyzdY(i, 1);
+    SVector3 normMesh(nx, ny, nz);
+    normMesh.normalize();
+    SVector3 diff = (dot(normCAD[i], normMesh) > 0) ?
+                    normCAD[i] - normMesh : normCAD[i] + normMesh;
+    dist += diff.norm();
+  }
+  return dist;
+}
+
+
+double MLineGEdgeDistance(MLine *l, GEdge *ge)
+{
+  const int nV = l->getNumVertices();
+  const GradientBasis *gb = BasisFactory::getGradientBasis(FuncSpaceData(l));
+  const double edLength = l->getLength();
+
+  // Coordinates of vertices
+  fullMatrix<double> nodesXYZ(nV, 3);
+  l->getNodesCoord(nodesXYZ);
+
+  // Tangent to CAD at vertices
+  std::vector<SVector3> tanCAD(nV);
+  for (int i=0; i<nV; i++) {
+    double tCAD;
+    reparamMeshVertexOnEdge(l->getVertex(i), ge, tCAD);
+    tanCAD[i] = ge->firstDer(tCAD);
+    tanCAD[i].normalize();
+  }
+
+  // Compute distance
+  return distToCAD1D(gb, nodesXYZ, tanCAD, edLength);
+}
+
+
+double MFaceGFaceDistance(MElement *el, GFace *gf)
+{
+  const int nV = el->getNumVertices();
+  const GradientBasis *gb = BasisFactory::getGradientBasis(FuncSpaceData(el));
+
+  // Coordinates of vertices
+  fullMatrix<double> nodesXYZ(nV, 3);
+  el->getNodesCoord(nodesXYZ);
+
+  // Normal to CAD at vertices
+  std::vector<SVector3> normCAD(nV);
+  for (int i=0; i<nV; i++) {
+    SPoint2 pCAD;
+    reparamMeshVertexOnFace(el->getVertex(i), gf, pCAD);
+    normCAD[i] = gf->normal(pCAD);
+    normCAD[i].normalize();
+  }
+
+  // Compute distance
+  return distToCAD2D(gb, nodesXYZ, normCAD);
+}
+
+
+//void distanceFromElementsToGeometry(GModel *gm, int dim, std::map<MElement*,double> &distances){
+//
+//  std::map<MEdge,double,Less_Edge> dist2Edge;
+//  for (GModel::eiter it = gm->firstEdge(); it != gm->lastEdge(); ++it){
+//    if ((*it)->geomType() == GEntity::Line)continue;
+//    for (unsigned int i=0;i<(*it)->lines.size(); i++){
+//      double d = MLineGEdgeDistance ( (*it)->lines[i] , *it );
+//      MEdge e =  (*it)->lines[i]->getEdge(0);
+//      dist2Edge[e] = d;
+//    }
+//  }
+//
+//  //  printf("DISTANCE TO GEOMETRY : 1D PART %22.15E\n",Obj);
+//
+//  std::map<MFace,double,Less_Face> dist2Face;
+//  for(GModel::fiter it = gm->firstFace(); it != gm->lastFace(); ++it){
+//    if ((*it)->geomType() == GEntity::Plane)continue;
+//    for (unsigned int i=0;i<(*it)->triangles.size(); i++){
+//      double d = MFaceGFaceDistance ( (*it)->triangles[i] , *it );
+//      MFace f =  (*it)->triangles[i]->getFace(0);
+//      dist2Face[f] = d;
+//    }
+//  }
+//
+//  std::vector<GEntity*> entities;
+//  gm->getEntities(entities);
+//  for (int iEnt = 0; iEnt < entities.size(); ++iEnt) {
+//    GEntity* &entity = entities[iEnt];
+//    if (entity->dim() != dim) continue;
+//    for (int iEl = 0; iEl < entity->getNumMeshElements();iEl++) {       // Detect bad elements
+//      MElement *element = entity->getMeshElement(iEl);
+//      double d = 0.0;
+//      for (int iEdge = 0; iEdge < element->getNumEdges(); ++iEdge) {
+//  MEdge e =  element->getEdge(iEdge);
+//  std::map<MEdge,double,Less_Edge>::iterator it = dist2Edge.find(e);
+//  if(it != dist2Edge.end())d+=it->second;
+//      }
+//      for (int iFace = 0; iFace < element->getNumFaces(); ++iFace) {
+//  MFace f =  element->getFace(iFace);
+//  std::map<MFace,double,Less_Face>::iterator it = dist2Face.find(f);
+//  if(it != dist2Face.end())d+=it->second;
+//      }
+//      distances[element] = d;
+//    }
+//  }
+//}
+//
+//
+//double distanceToGeometry(GModel *gm)
+//{
+//  double Obj = 0.0;
+//
+//  for (GModel::eiter it = gm->firstEdge(); it != gm->lastEdge(); ++it) {
+//    if ((*it)->geomType() == GEntity::Line) continue;
+//    for (unsigned int i=0;i<(*it)->lines.size(); i++)
+//      Obj = std::max(MLineGEdgeDistance((*it)->lines[i], *it), Obj);
+//  }
+//  printf("DISTANCE TO GEOMETRY : 1D PART %22.15E\n",Obj);
+//
+//  for(GModel::fiter it = gm->firstFace(); it != gm->lastFace(); ++it) {
+//    if ((*it)->geomType() == GEntity::Plane) continue;
+//    for (unsigned int i=0;i<(*it)->triangles.size(); i++) {
+//      Obj = std::max(Obj,MFaceGFaceDistance( (*it)->triangles[i] , *it ));
+//    }
+//  }
+//  printf("DISTANCE TO GEOMETRY : 1D AND 2D PART %22.15E\n",Obj);
+//
+//  return Obj;
+//}
diff --git a/contrib/HighOrderMeshOptimizer/OptHomCADDist.h b/contrib/HighOrderMeshOptimizer/OptHomCADDist.h
new file mode 100644
index 0000000..2354ffa
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomCADDist.h
@@ -0,0 +1,31 @@
+// TODO: Header
+
+#ifndef OPTHOMCADDIST_H_
+#define OPTHOMCADDIST_H_
+
+
+class GradientBasis;
+class GModel;
+class MElement;
+class MLine;
+class MTriangle;
+class GEdge;
+class GFace;
+
+double MFaceGFaceDistanceOld(MTriangle *t, GFace *gf,
+                            std::vector<std::vector<SVector3> > *gsfT=0,
+                            std::map<MVertex*,SVector3> *normalsToCAD=0);
+double MLineGEdgeDistanceOld(MLine *l, GEdge *ge, FILE *f = 0);
+
+double distToCAD1D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                   const std::vector<SVector3> &tanCAD, double edLength);
+double distToCAD2D(const GradientBasis *gb, const fullMatrix<double> &nodesXYZ,
+                   const std::vector<SVector3> &normCAD);
+double MLineGEdgeDistance (MLine *l, GEdge *ge);
+double MFaceGFaceDistance(MElement *el, GFace *gf);
+
+//void distanceFromElementsToGeometry(GModel *gm, int dim, std::map<MElement*, double> &distances);
+//double distanceToGeometry(GModel *gm);
+
+
+#endif /* OPTHOMCADDIST_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/OptHomElastic.cpp b/contrib/HighOrderMeshOptimizer/OptHomElastic.cpp
index 5c48492..de791fe 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomElastic.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomElastic.cpp
@@ -817,7 +817,7 @@ void highOrderTools::makePosViewWithJacobians (const char *fn)
 
 #else
 
-void ElasticAnalogy(GModel *m, double threshold, bool onlyVisible)
+void ElasticAnalogy(GModel *m, bool onlyVisible)
 {
   Msg::Error("Elastic analogy high-order optimzer requires the solver module");
 }
diff --git a/contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp b/contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
index 15474d5..2a56ba6 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
@@ -563,9 +563,10 @@ void HighOrderMeshFastCurving(GModel *gm, FastCurvingParameters &p)
   }
   else {                                                                                        // No BL field
     for (int iEnt = 0; iEnt < allEntities.size(); ++iEnt) {
+      GEntity *dummy = 0;
       GEntity* &entity = allEntities[iEnt];
       if (entity->dim() == p.dim-1 && (!p.onlyVisible || entity->getVisibility()))              // Consider boundary entities
-        entities.insert(std::pair<GEntity*,GEntity*>(0, entity));
+        entities.insert(std::pair<GEntity*,GEntity*>(dummy, entity));
     }
   }
 
diff --git a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp
index a19f492..3f3f27f 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp
@@ -9,11 +9,13 @@
 
 parametricLineNodalBasis::parametricLineNodalBasis(const nodalBasis &basis,
                                                    const std::vector<SPoint3> &xyz):
-  _basis(basis), _xyz(xyz) {};
+  _basis(basis), _xyz(xyz) , psi(_xyz.size())
+{
+}
+
 
 SPoint3 parametricLineNodalBasis::operator()(double xi) const
 {
-  std::vector<double> psi(_xyz.size());
   SPoint3 p(0, 0, 0);
   _basis.f(-1 + 2 * xi, 0, 0, &psi[0]);
   for (size_t j = 0; j < psi.size(); ++j) {
@@ -245,7 +247,7 @@ double computeBndDistG_(GEdge *edge, std::vector<double> & p, // the model edge
 		       const nodalBasis &basis, const std::vector<SPoint3> &xyz,
 		       const unsigned int NN) // the mesh edge
 {
-  const unsigned int N = 256;
+  const unsigned int N = 200;
   std::vector<int> o;
   o.push_back(0);
   for (unsigned int i=2; i < p.size();i++)o.push_back(i);
@@ -298,15 +300,15 @@ double computeBndDistG(GEdge *edge, std::vector<double> & p, // the model edge
 		       const nodalBasis &basis, const std::vector<SPoint3> &xyz,
 		       double tolerance) // the mesh edge
 {
-  int N = 4;
+  int N = 5;
   double d = computeBndDistG_(edge, p, basis, xyz, N);
 
-  //    printf("GO !!\n");
+  //  printf("GO !!\n");
   while (1){
     N *= 2;
     double dp = computeBndDistG_(edge, p, basis, xyz, N);
-    //        printf("%12.5E %12.5E %12.5E %12.5E\n",d,dp,fabs(d - dp),tolerance);
-    if (fabs(d - dp) < tolerance) // Richardson with assumed linear convergence ...
+    //    printf("N %d %12.5E %12.5E %12.5E %12.5E\n",N,d,dp,fabs(d - dp),tolerance);
+    if (fabs(d - dp) < tolerance*(d+dp)) // Richardson with assumed linear convergence ...
       return dp;
     d = dp;
   }
@@ -362,7 +364,7 @@ double computeDeviationOfTangents(GEdge *edge,
   //  parametricLineGEdge l1 = parametricLineGEdge(edge,p[0],p[p.size()-1]);
   parametricLineNodalBasis l2 = parametricLineNodalBasis(basis, xyz);
   double  deviation = 0;
-  double ddeviation = 0;
+  //  double ddeviation = 0;
   std::vector<int> o;
   o.push_back(0);
   for (unsigned int i=2; i < p.size();i++)o.push_back(i);
@@ -373,27 +375,27 @@ double computeDeviationOfTangents(GEdge *edge,
   for (unsigned int i=0; i<p.size();i++){
     const double u = basis.points(o[i],0);
     SVector3 xp = edge->firstDer (p[o[i]]);
-    SVector3 xpp = edge->secondDer (p[o[i]]);
-    const double nxp = xp.norm();
-    const double onxp = 1./nxp;
-    SVector3 c = (onxp*onxp*onxp)*(xpp*nxp-xp*dot(xp,xpp)*onxp);
+    //    SVector3 xpp = edge->secondDer (p[o[i]]);
+    //    const double nxp = xp.norm();
+    //    const double onxp = 1./nxp;
+    //    SVector3 c = (onxp*onxp*onxp)*(xpp*nxp-xp*dot(xp,xpp)*onxp);
 
     SVector3 t_mesh_edge  = l2.derivative(0.5*(1+u));
-    SVector3 c2  = l2.curvature(0.5*(1+u));
+    //    SVector3 c2  = l2.curvature(0.5*(1+u));
     //    GPoint p0 = edge->point(p[o[i]]);
     //    SPoint3 p1 = l2 (0.5*(1+u));
     //    printf("%g = %g %g vs %g %g\n",u,p0.x(),p0.y(),p1.x(),p1.y());
     xp.normalize();
     t_mesh_edge.normalize();
     SVector3 diff1 = (dot(xp, t_mesh_edge) > 0) ? xp -  t_mesh_edge : xp +  t_mesh_edge;
-    SVector3 diff2 = (dot(c, c2) > 0) ? c -  c2 : c +  c2;
+    //    SVector3 diff2 = (dot(c, c2) > 0) ? c -  c2 : c +  c2;
     //printf("%g %g %g vs %g %g %g diff %g %g %g\n",c.x(),c.y(),c.z(),c2.x(),c2.y(),c2.z(),diff2.x(),diff2.y(),diff2.z());
     //    printf("%g %g %g vs %g %g %g val %g\n",t_model_edge.x(),t_model_edge.y(),t_model_edge.z(),
     //	   t_mesh_edge.x(),t_mesh_edge.y(),t_mesh_edge.z(),c.norm());
     //     deviation = std::max(diff1.norm(),deviation);
     //    ddeviation = std::max(diff2.norm(),ddeviation);
      deviation += diff1.norm();
-    ddeviation += diff2.norm();
+     //    ddeviation += diff2.norm();
   }
   const double h =  dx.norm();
   //  printf ("%g %g\n",deviation * h,ddeviation * h * h * 0.5);
diff --git a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.h b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.h
index 3a9e5db..a904663 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.h
+++ b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.h
@@ -34,6 +34,7 @@ class parametricLineNodalBasis : public parametricLine
 {
   const nodalBasis &_basis;
   const std::vector<SPoint3> &_xyz;
+  mutable std::vector<double> psi;
  public :
   parametricLineNodalBasis(const nodalBasis &basis, const std::vector<SPoint3> &xyz);
   virtual SPoint3 operator()(double xi) const;
diff --git a/contrib/HighOrderMeshOptimizer/OptHomMesh.cpp b/contrib/HighOrderMeshOptimizer/OptHomMesh.cpp
index 5c7614c..dbea55e 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomMesh.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomMesh.cpp
@@ -153,6 +153,17 @@ void Mesh::calcScaledNormalEl2D(const std::map<MElement*,GEntity*> &element2enti
 
 }
 
+int Mesh::getFreeVertexStartIndex(MVertex* vert)
+{
+  std::map<MVertex*,int>::iterator itVert = _startPC4FV.find(vert);
+  if (itVert == _startPC4FV.end()) {
+    //    Msg::Fatal("OptHOM Error : cannot find free vertex %d class %d %d (%d free vertices)",vert->getNum(),vert->onWhat()->tag(),vert->onWhat()->dim(),_freeVert.size());
+    return -1;
+  }  
+  return itVert->second;    
+}
+
+
 int Mesh::addVert(MVertex* vert)
 {
   std::vector<MVertex*>::iterator itVert = find(_vert.begin(),_vert.end(),vert);
@@ -172,6 +183,7 @@ int Mesh::addFreeVert(MVertex* vert, const int iV, const int nPCV,
   if (itVert == _freeVert.end()) {
     const int iStart = (_startPCFV.size() == 0)? 0 : _startPCFV.back()+_nPCFV.back();
     const bool forcedV = (vert->onWhat()->dim() < 2) || (toFix.find(vert) != toFix.end());
+    _startPC4FV[vert] = iStart;
     _freeVert.push_back(vert);
     _paramFV.push_back(param);
     _fv2V.push_back(iV);
@@ -230,12 +242,41 @@ void Mesh::elInSize(std::vector<double> &s)
     s[iEl] = fabs(_el[iEl]->getInnerRadius());
 }
 
-void Mesh::updateGEntityPositions()
+void Mesh::getGEntityPositions(std::vector<SPoint3> &xyz,
+			       std::vector<SPoint3> &uvw) 
 {
+  xyz.resize(nVert());
+  uvw.resize(nFV());
   for (int iV = 0; iV < nVert(); iV++)
-    _vert[iV]->setXYZ(_xyz[iV].x(),_xyz[iV].y(),_xyz[iV].z());
+    xyz[iV] = SPoint3(_vert[iV]->x(),_vert[iV]->y(),_vert[iV]->z());
+  for (int iFV = 0; iFV < nFV(); iFV++){
+    MVertex *v = _freeVert[iFV];
+    if (v->onWhat()->dim() == 1){
+      double t;
+      v->getParameter(0,t);
+      uvw[iFV] = SPoint3(t,0,0);
+    }
+    if (v->onWhat()->dim() == 2){
+      double uu,vv;
+      v->getParameter(0,uu);
+      v->getParameter(1,vv);
+      uvw[iFV] = SPoint3(uu,vv,0);
+    }
+  }
+}
+
+void Mesh::updateGEntityPositions(const std::vector<SPoint3> &xyz,
+				  const std::vector<SPoint3> &uvw)
+{
+  for (int iV = 0; iV < nVert(); iV++)
+    _vert[iV]->setXYZ(xyz[iV].x(),xyz[iV].y(),xyz[iV].z());
   for (int iFV = 0; iFV < nFV(); iFV++)
-    _paramFV[iFV]->exportParamCoord(_uvw[iFV]);
+      _paramFV[iFV]->exportParamCoord(uvw[iFV]);
+}
+
+void Mesh::updateGEntityPositions()
+{
+  updateGEntityPositions(_xyz,_uvw);
 }
 
 void Mesh::metricMinAndGradients(int iEl, std::vector<double> &lambda,
@@ -294,6 +335,70 @@ void Mesh::metricMinAndGradients(int iEl, std::vector<double> &lambda,
   }
 }
 
+void Mesh::approximationErrorAndGradients(int iEl, double &f, std::vector<double> &gradF, double eps,
+					  simpleFunction<double> &fct)
+{
+  std::vector<SPoint3> _xyz_temp;
+  for (int iV = 0; iV < nVert(); iV++){
+    _xyz_temp.push_back(SPoint3( _vert[iV]->x(), _vert[iV]->y(), _vert[iV]->z()));
+    _vert[iV]->setXYZ(_xyz[iV].x(),_xyz[iV].y(),_xyz[iV].z());
+  }
+
+  MElement *element = _el[iEl];
+
+  f = approximationError (fct, element);
+  // FIME
+  //  if (iEl < 1)printf("approx error elem %d = %g\n",iEl,f);
+  int currentId = 0;
+  // compute the size of the gradient
+  // depends on how many dofs exist per vertex (0,1,2 or 3)
+  for (size_t i = 0; i < element->getNumVertices(); ++i) {
+    if (_el2FV[iEl][i] >= 0) {// some free coordinates
+      currentId += _nPCFV[_el2FV[iEl][i]];
+    }
+  }
+  gradF.clear();
+  gradF.resize(currentId, 0.);
+  currentId = 0;
+  for (size_t i = 0; i < element->getNumVertices(); ++i) {
+    if (_el2FV[iEl][i] >= 0) {// some free coordinates
+      MVertex *v =  element->getVertex(i);
+      // vertex classified on a model edge
+      if (_nPCFV[_el2FV[iEl][i]] == 1){
+	double t = _uvw[_el2FV[iEl][i]].x();
+	GEdge *ge = (GEdge*)v->onWhat();
+	SPoint3 p (v->x(),v->y(),v->z());
+	GPoint d = ge->point(t+eps);
+	v->setXYZ(d.x(),d.y(),d.z());
+	double f_d = approximationError (fct, element);
+	gradF[currentId++] = (f_d-f)/eps;
+	if (iEl < 1)printf("df = %g\n",(f_d-f)/eps);
+	v->setXYZ(p.x(),p.y(),p.z());
+      }
+      else if (_nPCFV[_el2FV[iEl][i]] == 2){
+	double uu = _uvw[_el2FV[iEl][i]].x();
+	double vv = _uvw[_el2FV[iEl][i]].y();
+	GFace *gf = (GFace*)v->onWhat();
+	SPoint3 p (v->x(),v->y(),v->z());
+	GPoint  d = gf->point(uu+eps,vv);
+	v->setXYZ(d.x(),d.y(),d.z());
+	double f_u = approximationError (fct, element);
+	gradF[currentId++] = (f_u-f)/eps;
+	d = gf->point(uu,vv+eps);
+	v->setXYZ(d.x(),d.y(),d.z());
+	double f_v = approximationError (fct, element);
+	gradF[currentId++] = (f_v-f)/eps;
+	v->setXYZ(p.x(),p.y(),p.z());
+	//	if (iEl < 1)printf("df = %g %g\n",(f_u-f)/eps,(f_v-f)/eps);
+      }
+    }
+  }
+  for (int iV = 0; iV < nVert(); iV++)
+    _vert[iV]->setXYZ(_xyz_temp[iV].x(),_xyz_temp[iV].y(),_xyz_temp[iV].z());
+
+}
+
+
 bool Mesh::bndDistAndGradients(int iEl, double &f , std::vector<double> &gradF, double eps)
 {
   MElement *element = _el[iEl];
@@ -303,9 +408,11 @@ bool Mesh::bndDistAndGradients(int iEl, double &f , std::vector<double> &gradF,
     return false;
 
   int currentId = 0;
+  bool touches_boundary = false;
   std::vector<int> vertex2param(element->getNumVertices());
   for (size_t i = 0; i < element->getNumVertices(); ++i) {
     if (_el2FV[iEl][i] >= 0) {
+      if ( _nPCFV[_el2FV[iEl][i]] == 1) touches_boundary = true;
       vertex2param[i] = currentId;
       currentId += _nPCFV[_el2FV[iEl][i]];
     }
@@ -315,6 +422,7 @@ bool Mesh::bndDistAndGradients(int iEl, double &f , std::vector<double> &gradF,
   gradF.clear();
   gradF.resize(currentId, 0.);
 
+  if (!touches_boundary){/*printf("ele %d\n",iEl);*/return true;}
   const nodalBasis &elbasis = *element->getFunctionSpace();
   bool edgeFound = false;
   for (int iEdge = 0; iEdge < element->getNumEdges(); ++iEdge) {
diff --git a/contrib/HighOrderMeshOptimizer/OptHomMesh.h b/contrib/HighOrderMeshOptimizer/OptHomMesh.h
index f1f48c9..696a19b 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomMesh.h
+++ b/contrib/HighOrderMeshOptimizer/OptHomMesh.h
@@ -37,6 +37,8 @@
 #include "MVertex.h"
 #include "ParamCoord.h"
 #include "polynomialBasis.h"
+#include "simpleFunction.h"
+#include "approximationError.h"
 
 class Mesh
 {
@@ -54,7 +56,9 @@ public:
   inline int nPCEl(int iEl) { return _indPCEl[iEl].size(); }
   inline const int &indPCEl(int iEl, int iPC) { return _indPCEl[iEl][iPC]; }
   inline const int &nBezEl(int iEl) { return _nBezEl[iEl]; }
+  int getFreeVertexStartIndex(MVertex* vert);
 
+  void approximationErrorAndGradients(int iEl, double &f, std::vector<double> &gradF, double eps, simpleFunction<double> &fct);
   void metricMinAndGradients(int iEl, std::vector<double> &sJ, std::vector<double> &gSJ);
   void scaledJacAndGradients(int iEl, std::vector<double> &sJ, std::vector<double> &gSJ);
   bool bndDistAndGradients(int iEl, double &f , std::vector<double> &gradF, double eps);
@@ -73,6 +77,11 @@ public:
   void elInSize(std::vector<double> &s);
 
   void updateGEntityPositions();
+  void updateGEntityPositions(const std::vector<SPoint3> &xyz,
+			      const std::vector<SPoint3> &uvw);
+
+  void getGEntityPositions(std::vector<SPoint3> &xyz,
+			   std::vector<SPoint3> &uvw) ;
   void writeMSH(const char *filename);
 
 private:
@@ -81,6 +90,8 @@ private:
   int _nPC;
   // Use fast Jacobian estimation?
   bool _fastJacEval;
+  // Free vertex id numbers
+  std::map<MVertex*,int> _startPC4FV;
   // List of elements
   std::vector<MElement*> _el;
   // Normals to 2D elements for Jacobian regularization and scaling
@@ -130,8 +141,14 @@ private:
   {
     return indJB3DBase(_nNodEl[iEl],l,i,j,m);
   }
+public: 
+  double approximationErr(int iEl, simpleFunction<double> &f)
+  {
+    return approximationError (f, _el[iEl]);
+  }
 };
 
+
 double Mesh::distSq(int iFV)
 {
   SPoint3 d = _xyz[_fv2V[iFV]]-_ixyz[_fv2V[iFV]];
diff --git a/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDist.h b/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDist.h
new file mode 100644
index 0000000..23a9f7b
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDist.h
@@ -0,0 +1,108 @@
+// TODO: Copyright
+
+#ifndef _OPTHOMOBJCONTRIBCADDIST_H_
+#define _OPTHOMOBJCONTRIBCADDIST_H_
+
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribCADDistSq : public ObjContrib, public FuncType
+{
+public:
+  ObjContribCADDistSq(double weight, double refDist);
+  virtual ~ObjContribCADDistSq() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return false; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+  double _refDist;
+};
+
+
+template<class FuncType>
+ObjContribCADDistSq<FuncType>::ObjContribCADDistSq(double weight, double refDist) :
+  ObjContrib("ScaledCADDistSq", FuncType::getNamePrefix()+"ScaledCADDistSq"),
+  _mesh(0), _weight(weight), _refDist(refDist)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribCADDistSq<FuncType>::copy() const
+{
+  return new ObjContribCADDistSq<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribCADDistSq<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initScaledCADDistSq(_refDist);
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribCADDistSq<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  const int bndDim = _mesh->dim()-1;
+
+  for (int iBndEl = 0; iBndEl < _mesh->nBndEl(); iBndEl++) {
+    const int nVEl = _mesh->nNodBndEl(iBndEl);
+    double f;
+    std::vector<double> gradF(nVEl*bndDim);
+    _mesh->scaledCADDistSqAndGradients(iBndEl, f, gradF);
+    _min = std::min(_min, f);
+    _max = std::max(_max, f);
+    Obj += FuncType::compute(f) * _weight;
+    const double dFact = _weight * FuncType::computeDiff(f);
+    for (int i=0; i<nVEl; i++) {
+      const int iFVi = _mesh->bndEl2FV(iBndEl, i);
+      if (iFVi >= 0) {                                                                            // Skip if not free vertex
+        if (bndDim == 1) gradObj[_mesh->indPCFV(iFVi, 0)] += gradF[i] * dFact;                    // 2D
+        else {                                                                                    // 3D
+          gradObj[_mesh->indPCFV(iFVi, 0)] += gradF[2*i] * dFact;                                 // Deriv. w.r.t. 1st param.coord (edge or face vertex)
+          if (_mesh->nPCFV(iFVi) > 1) gradObj[_mesh->indPCFV(iFVi, 1)] += gradF[2*i+1] * dFact;   // Deriv. w.r.t. 2nd param. coord. (only if face vertex)
+        }
+      }
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribCADDistSq<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  const int bndDim = _mesh->dim()-1;
+
+  for (int iBndEl = 0; iBndEl < _mesh->nBndEl(); iBndEl++) {
+    const int nVEl = _mesh->nNodBndEl(iBndEl);
+    double f;
+    std::vector<double> dumGradF(nVEl*bndDim);
+    _mesh->scaledCADDistSqAndGradients(iBndEl, f, dumGradF);
+    _min = std::min(_min, f);
+    _max = std::max(_max, f);
+  }
+}
+
+
+#endif /* _OPTHOMOBJCONTRIBCADDIST_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDistOld.h b/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDistOld.h
new file mode 100644
index 0000000..8031ba3
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomObjContribCADDistOld.h
@@ -0,0 +1,96 @@
+// TODO: Copyright
+
+#ifndef _OPTHOMOBJCONTRIBCADDISTOLD_H_
+#define _OPTHOMOBJCONTRIBCADDISTOLD_H_
+
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribCADDistOld : public ObjContrib, public FuncType
+{
+public:
+  ObjContribCADDistOld(double weight, double geomTol);
+  virtual ~ObjContribCADDistOld() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return false; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+  double _geomTol;
+};
+
+
+template<class FuncType>
+ObjContribCADDistOld<FuncType>::ObjContribCADDistOld(double weight, double geomTol) :
+  ObjContrib("CADDistOld", FuncType::getNamePrefix()+"CADDistOld"),
+  _mesh(0), _weight(weight), _geomTol(geomTol)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribCADDistOld<FuncType>::copy() const
+{
+  return new ObjContribCADDistOld<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribCADDistOld<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribCADDistOld<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  std::vector<double> gradF;
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    double f;
+    if (_mesh->bndDistAndGradients(iEl, f, gradF, _geomTol)) {
+      _min = std::min(_min, f);
+      _max = std::max(_max, f);
+      Obj += FuncType::compute(f) * _weight;
+      const double dFact = _weight * FuncType::computeDiff(f);
+      for (size_t i = 0; i < _mesh->nPCEl(iEl); ++i)
+        gradObj[_mesh->indPCEl(iEl, i)] += gradF[i] * dFact;
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribCADDistOld<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  std::vector<double> dumGradF;
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    double f;
+    if (_mesh->bndDistAndGradients(iEl, f, dumGradF, _geomTol)) {
+      _min = std::min(_min, f);
+      _max = std::max(_max, f);
+    }
+  }
+}
+
+
+#endif /* _OPTHOMOBJCONTRIBCADDISTOLD_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/OptHomObjContribMetricMin.h b/contrib/HighOrderMeshOptimizer/OptHomObjContribMetricMin.h
new file mode 100644
index 0000000..251fbe6
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomObjContribMetricMin.h
@@ -0,0 +1,98 @@
+// TODO: Copyright
+
+#ifndef _OPTHOMOBJCONTRIBMETRICMIN_H_
+#define _OPTHOMOBJCONTRIBMETRICMIN_H_
+
+#include "MeshOptPatch.h"
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribMetricMin : public ObjContrib, public FuncType
+{
+public:
+  ObjContribMetricMin(double weight);
+  virtual ~ObjContribMetricMin() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return false; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+};
+
+
+template<class FuncType>
+ObjContribMetricMin<FuncType>::ObjContribMetricMin(double weight) :
+  ObjContrib("MetricMin", FuncType::getNamePrefix()+"MetricMin"),
+  _mesh(0), _weight(weight)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribMetricMin<FuncType>::copy() const
+{
+  return new ObjContribMetricMin<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribMetricMin<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initScaledJac();
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribMetricMin<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> mM(_mesh->nBezEl(iEl));                                     // Min. of Metric
+    std::vector<double> gMM(_mesh->nBezEl(iEl)*_mesh->nPCEl(iEl));                  // Dummy gradients of metric min.
+    _mesh->metricMinAndGradients(iEl, mM, gMM);
+    for (int l = 0; l < _mesh->nBezEl(iEl); l++) {                                  // Add contribution for each Bezier coeff.
+      Obj += _weight * FuncType::compute(mM[l]);
+      const double dfact = _weight * FuncType::computeDiff(mM[l]);
+      for (int iPC = 0; iPC < _mesh->nPCEl(iEl); iPC++)
+        gradObj[_mesh->indPCEl(iEl,iPC)] += dfact *  gMM[_mesh->indGSJ(iEl, l, iPC)];
+      _min = std::min(_min, mM[l]);
+      _max = std::max(_max, mM[l]);
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribMetricMin<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> mM(_mesh->nBezEl(iEl));                         // Min. of Metric
+    std::vector<double> dumGMM(_mesh->nBezEl(iEl)*_mesh->nPCEl(iEl));   // Dummy gradients of metric min.
+    _mesh->metricMinAndGradients(iEl, mM, dumGMM);
+    for (int l = 0; l < _mesh->nBezEl(iEl); l++) {                      // Check each Bezier coeff.
+      _min = std::min(_min, mM[l]);
+      _max = std::max(_max, mM[l]);
+    }
+  }
+}
+
+
+#endif /* _OPTHOMOBJCONTRIBMETRICMIN_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/OptHomObjContribScaledJac.h b/contrib/HighOrderMeshOptimizer/OptHomObjContribScaledJac.h
new file mode 100644
index 0000000..ee5a557
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/OptHomObjContribScaledJac.h
@@ -0,0 +1,98 @@
+// TODO: Copyright
+
+#ifndef _OPTHOMOBJCONTRIBSCALEDJAC_H_
+#define _OPTHOMOBJCONTRIBSCALEDJAC_H_
+
+#include "MeshOptPatch.h"
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribScaledJac : public ObjContrib, public FuncType
+{
+public:
+  ObjContribScaledJac(double weight);
+  virtual ~ObjContribScaledJac() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return _min <= 0.; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+};
+
+
+template<class FuncType>
+ObjContribScaledJac<FuncType>::ObjContribScaledJac(double weight) :
+  ObjContrib("ScaledJac", FuncType::getNamePrefix()+"ScaledJac"),
+  _mesh(0), _weight(weight)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribScaledJac<FuncType>::copy() const
+{
+  return new ObjContribScaledJac<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribScaledJac<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initScaledJac();
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribScaledJac<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> sJ(_mesh->nBezEl(iEl));                                       // Scaled Jacobians
+    std::vector<double> gSJ(_mesh->nBezEl(iEl)*_mesh->nPCEl(iEl));                    // Gradients of scaled Jacobians
+    _mesh->scaledJacAndGradients(iEl, sJ, gSJ);
+    for (int l = 0; l < _mesh->nBezEl(iEl); l++) {                                    // Add contribution for each Bezier coeff.
+      Obj += _weight * FuncType::compute(sJ[l]);
+      const double dfact = _weight * FuncType::computeDiff(sJ[l]);
+      for (int iPC = 0; iPC < _mesh->nPCEl(iEl); iPC++)
+        gradObj[_mesh->indPCEl(iEl, iPC)] += dfact * gSJ[_mesh->indGSJ(iEl, l, iPC)];
+      _min = std::min(_min, sJ[l]);
+      _max = std::max(_max, sJ[l]);
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribScaledJac<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> sJ(_mesh->nBezEl(iEl));                         // Scaled Jacobians
+    std::vector<double> dumGSJ(_mesh->nBezEl(iEl)*_mesh->nPCEl(iEl));   // Gradients of scaled Jacobians
+    _mesh->scaledJacAndGradients(iEl, sJ, dumGSJ);
+    for (int l = 0; l < _mesh->nBezEl(iEl); l++) {                      // Check each Bezier coeff.
+      _min = std::min(_min, sJ[l]);
+      _max = std::max(_max, sJ[l]);
+    }
+  }
+}
+
+
+#endif /* _OPTHOMOBJCONTRIBSCALEDJAC_H_ */
diff --git a/contrib/HighOrderMeshOptimizer/OptHomRun.cpp b/contrib/HighOrderMeshOptimizer/OptHomRun.cpp
index f99522a..51a0548 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomRun.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomRun.cpp
@@ -42,11 +42,22 @@
 #include "MHexahedron.h"
 #include "MPrism.h"
 #include "MLine.h"
+#include "CADDistances.h"
 #include "OS.h"
 #include <stack>
 
 #if defined(HAVE_BFGS)
 
+typedef std::vector<MElement*> elVec;
+typedef elVec::const_iterator elVecConstIter;
+typedef std::set<MElement*> elSet;
+typedef elSet::iterator elSetIter;
+typedef std::set<MVertex*> vertSet;
+
+typedef std::map<MVertex*, elVec> vertElVecMap;
+typedef std::map<MElement*, elSet> elElSetMap;
+typedef std::pair<elSet, vertSet> elSetVertSetPair;
+
 double distMaxStraight(MElement *el)
 {
   const polynomialBasis *lagrange = (polynomialBasis*)el->getFunctionSpace();
@@ -137,14 +148,12 @@ void exportMeshToDassault(GModel *gm, const std::string &fn, int dim)
   fclose(f);
 }
 
-static std::set<MVertex *> getAllBndVertices
-  (std::set<MElement*> &elements,
-   const std::map<MVertex*, std::vector<MElement*> > &vertex2elements)
+static vertSet getAllBndVertices(elSet &elements, const vertElVecMap &vertex2elements)
 {
-  std::set<MVertex*> bnd;
-  for (std::set<MElement*>::iterator itE = elements.begin(); itE != elements.end(); ++itE) {
+  vertSet bnd;
+  for (elSetIter itE = elements.begin(); itE != elements.end(); ++itE) {
     for (int i = 0; i < (*itE)->getNumPrimaryVertices(); ++i) {
-      const std::vector<MElement*> &neighbours = vertex2elements.find
+      const elVec &neighbours = vertex2elements.find
         ((*itE)->getVertex(i))->second;
       for (size_t k = 0; k < neighbours.size(); ++k) {
         if (elements.find(neighbours[k]) == elements.end()) {
@@ -158,36 +167,96 @@ static std::set<MVertex *> getAllBndVertices
   return bnd;
 }
 
+
+// Test intersection between sphere and segment
+static bool testSegSphereIntersect(SPoint3 A, SPoint3 B, const SPoint3& P, const double rr)
+{
+  // Test if separating plane between sphere and segment vertices
+  // For each vertex, separation if vertex is outside sphere and P on opposite side
+  // to other seg. vertex w.r.t plane of normal (vertex-P) through vertex
+  const SVector3 PA(P, A), PB(P, B);
+  const double aa = dot(PA, PA), ab = dot(PA, PB);
+  if ((aa > rr) & (ab > aa)) return false;
+  const double  bb = dot(PB, PB);
+  if ((bb > rr) & (ab > bb)) return false;
+
+  // Test if separating plane between sphere and line
+  // For A, separation if projection Q of P on (AB) lies outside the sphere
+  const SVector3 AB(A, B);
+  const double d = ab - aa, e = dot(AB, AB);
+  const  SVector3 PQ = PA * e - d * AB;
+  if (dot(PQ, PQ) > rr * e * e) return false;
+
+  // Return true (intersection) if no separation at all
+  return true;
+}
+
+
+// Test intersection between sphere and triangle
+// Inspired by Christer Ericson, http://realtimecollisiondetection.net/blog/?p=103
+static bool testTriSphereIntersect(SPoint3 A, SPoint3 B, SPoint3 C,
+                                   const SPoint3& P, const double rr)
+{
+  // Test if separating plane between sphere and triangle plane
+  const SVector3 PA(P, A), AB(A, B), AC(A, C);
+  const SVector3 V = crossprod(AB, AC);                                   // Normal to triangle plane
+  const double d = dot(PA, V);                                            // Dist. from P to triangle plane times norm of V
+  const double e = dot(V, V);                                             // Norm of V
+  if (d * d > rr * e) return false;                                       // Test if separating plane between sphere and triangle plane
+
+  // Test if separating plane between sphere and triangle vertices
+  const SVector3 PB(P, B), PC(P, B);
+  const double aa = dot(PA, PA), ab = dot(PA, PB), ac = dot(PA, PC);
+  const double bb = dot(PB, PB), bc = dot(PB, PC), cc = dot(PC, PC);
+  if ((aa > rr) & (ab > aa) & (ac > aa)) return false;                    // For each triangle vertex, separation if vertex is outside sphere
+  if ((bb > rr) & (ab > bb) & (bc > bb)) return false;                    // and P on opposite side to other two triangle vertices w.r.t
+  if ((cc > rr) & (ac > cc) & (bc > cc)) return false;                    // plane of normal (vertex-P) through vertex
+
+  // Test if separating plane between sphere and triangle edges
+  const SVector3 BC(B, C);
+  const double d1 = ab - aa, d2 = bc - bb, d3 = ac - cc;
+  const double e1 = dot(AB, AB), e2 = dot(BC, BC), e3 = dot(AC, AC);
+  const SVector3 PQ1 = PA * e1 - d1 * AB;                                 // Q1 projection of P on line (AB)
+  const SVector3 PQ2 = PB * e2 - d2 * BC;                                 // Q2 projection of P on line (BC)
+  const SVector3 PQ3 = PC * e3 + d3 * AC;                                 // Q3 projection of P on line (AC)
+  const SVector3 PQC = PC * e1 - PQ1;
+  const SVector3 PQA = PA * e2 - PQ2;
+  const SVector3 PQB = PB * e3 - PQ3;
+  if ((dot(PQ1, PQ1) > rr * e1 * e1) & (dot(PQ1, PQC) > 0)) return false; // For A, separation if Q lies outside the sphere and if P and C
+  if ((dot(PQ2, PQ2) > rr * e2 * e2) & (dot(PQ2, PQA) > 0)) return false; // are on opposite sides of plane through AB with normal PQ
+  if ((dot(PQ3, PQ3) > rr * e3 * e3) & (dot(PQ3, PQB) > 0)) return false; // Same for other two vertices
+
+  // Return true (intersection) if no separation at all
+  return true;
+}
+
 // Approximate test of intersection element with circle/sphere by sampling
 static bool testElInDist(const SPoint3 p, double limDist, MElement *el)
 {
-  const double sampleLen = 0.5*limDist;                                   // Distance between sample points
+  const double limDistSq = limDist*limDist;
 
   if (el->getDim() == 2) {                                                // 2D?
     for (int iEd = 0; iEd < el->getNumEdges(); iEd++) {                   // Loop over edges of element
-      MEdge ed = el->getEdge(iEd);
-      const int nPts = int(ed.length()/sampleLen)+2;                      // Nb of sample points based on edge length
-      for (int iPt = 0; iPt < nPts; iPt++) {                              // Loop over sample points
-        const SPoint3 pt = ed.interpolate(iPt/float(nPts-1));
-        if (p.distance(pt) < limDist) return true;
-      }
+      std::vector<MVertex*> edgeVert;
+      el->getEdgeVertices(iEd, edgeVert);
+      const SPoint3 A = edgeVert[0]->point();
+      const SPoint3 B = edgeVert[1]->point();
+      if (testSegSphereIntersect(A, B, p, limDistSq)) return true;
     }
   }
   else {                                                                  // 3D
     for (int iFace = 0; iFace < el->getNumFaces(); iFace++) {             // Loop over faces of element
-      MFace face = el->getFace(iFace);
-      double lMax = 0.;                                                   // Max. edge length in face
-      const int nVert = face.getNumVertices();
-      for (int iEd = 0; iEd < nVert; iEd++)
-        lMax = std::max(lMax, face.getEdge(iEd).length());
-      const int nPts = int(lMax/sampleLen)+2;                             // Nb of sample points based on max. edge length in face
-      for (int iPt0 = 0; iPt0 < nPts; iPt0++) {
-        const double u = iPt0/float(nPts-1);
-        for (int iPt1 = 0; iPt1 < nPts; iPt1++) {                         // Loop over sample points
-          const double vMax = (nVert == 3) ? 1.-u : 1.;
-          const SPoint3 pt = face.interpolate(u, vMax*iPt1/float(nPts-1));
-          if (p.distance(pt) < limDist) return true;
-        }
+      std::vector<MVertex*> faceVert;
+      el->getFaceVertices(iFace, faceVert);
+      const SPoint3 A = faceVert[0]->point();
+      const SPoint3 B = faceVert[1]->point();
+      const SPoint3 C = faceVert[2]->point();
+      if (faceVert.size() == 3)
+        if (testTriSphereIntersect(A, B, C, p, limDistSq)) return true;
+      else {
+        const SPoint3 D = faceVert[3]->point();
+        if (testTriSphereIntersect(A, B, C, p, limDistSq) ||
+            testTriSphereIntersect(A, C, D, p, limDistSq)) return true;
       }
     }
   }
@@ -195,35 +264,53 @@ static bool testElInDist(const SPoint3 p, double limDist, MElement *el)
   return false;
 }
 
-static std::set<MElement*> getSurroundingBlob
-   (MElement *el, int depth,
-    const std::map<MVertex*, std::vector<MElement*> > &vertex2elements,
-    const double distFactor, int forceDepth, bool optPrimSurfMesh)
+// Get neighbours of element (computes and store them only if needed)
+static void getElementNeighbours(MElement *el, const vertElVecMap &v2e,
+                                 elElSetMap &e2e, elSet &neighbours)
 {
+  elElSetMap::iterator it = e2e.find(el);
+  if (it == e2e.end()) {                                                          // If not in e2e, compute and store
+    neighbours.clear();
+    for (int i = 0; i < el->getNumPrimaryVertices(); ++i) {
+      const elVec &adjEl = v2e.find(el->getVertex(i))->second;
+      for(elVecConstIter itA = adjEl.begin(); itA != adjEl.end(); itA++)
+        if (*itA != el) neighbours.insert(*itA);
+    }
+    e2e.insert(std::pair<MElement*, elSet>(el, neighbours));
+  }
+  else neighbours = it->second;
+}
 
+static elSet getSurroundingBlob(MElement *el, int maxLayers,
+                                const vertElVecMap &vertex2elements,
+                                elElSetMap &element2elements, const double distFactor,
+                                int minLayers, bool optPrimSurfMesh)
+{
   const SPoint3 p = el->barycenter(true);
   const double dist = el->maxDistToStraight();
   const double limDist = ((optPrimSurfMesh && (dist < 1.e-10)) ?
                           el->getOuterRadius() : dist) * distFactor;
 
-  std::set<MElement*> blob;
-  std::list<MElement*> currentLayer, lastLayer;
+  elSet blob, currentLayer, lastLayer, outOfDist;
 
   blob.insert(el);
-  lastLayer.push_back(el);
-  for (int d = 0; d < depth; ++d) {
+  lastLayer.insert(el);
+  for (int d = 0; d < maxLayers; ++d) {
     currentLayer.clear();
-    for (std::list<MElement*>::iterator it = lastLayer.begin();
-         it != lastLayer.end(); ++it) {
-      for (int i = 0; i < (*it)->getNumPrimaryVertices(); ++i) {
-        const std::vector<MElement*> &neighbours = vertex2elements.find
-          ((*it)->getVertex(i))->second;
-        for (std::vector<MElement*>::const_iterator itN = neighbours.begin();
-             itN != neighbours.end(); ++itN){
-          if ((d < forceDepth) || testElInDist(p, limDist, *itN)){
-            // Assume that if an el is too far, its neighbours are too far as well
-            if (blob.insert(*itN).second) currentLayer.push_back(*itN);
+    for (elSetIter it = lastLayer.begin(); it != lastLayer.end(); ++it) {             // Loop over elements in last layer
+      elSet neighbours;
+      getElementNeighbours(*it, vertex2elements, element2elements, neighbours);
+      for (elSetIter itN = neighbours.begin(); itN != neighbours.end(); ++itN) {      // Loop over neighbours
+        if (lastLayer.find(*itN) == lastLayer.end()) {                                // If neighbour already in last layer, skip
+          bool isInserted = false;
+          if (d < minLayers) isInserted = blob.insert(*itN).second;                   // Below minLayers: insert neighbour in blob
+          else if (outOfDist.find(*itN) == outOfDist.end()) {                         // Above minLayers: check distance criterion
+            if (testElInDist(p, limDist, *itN))
+              isInserted = blob.insert(*itN).second;
+            else
+              outOfDist.insert(*itN);
           }
+          if (isInserted) currentLayer.insert(*itN);                                  // If inserted in blob, insert in current layer
         }
       }
     }
@@ -246,8 +333,7 @@ static void addBlobChaintoGroup(std::set<int> &group,
   }
 }
 
-static void calcVertex2Elements(int dim, GEntity *entity,
-                                std::map<MVertex*, std::vector<MElement *> > &vertex2elements)
+static void calcVertex2Elements(int dim, GEntity *entity, vertElVecMap &vertex2elements)
 {
   for (size_t i = 0; i < entity->getNumMeshElements(); ++i) {
     MElement *element = entity->getMeshElement(i);
@@ -261,26 +347,27 @@ static void calcElement2Entity(GEntity *entity, std::map<MElement*,GEntity*> &el
 {
   for (size_t i = 0; i < entity->getNumMeshElements(); ++i) {
     MElement *element = entity->getMeshElement(i);
-    element2entity.insert(std::pair<MElement*,GEntity*>(element,entity));
+    element2entity.insert(std::pair<MElement*, GEntity*>(element, entity));
   }
 }
 
-static std::vector<std::pair<std::set<MElement*>, std::set<MVertex*> > > getConnectedBlobs
-  (const std::map<MVertex*, std::vector<MElement *> > &vertex2elements,
-   const std::set<MElement*> &badElements, int depth, const double distFactor,
+static std::vector<elSetVertSetPair> getConnectedBlobs
+  (const vertElVecMap &vertex2elements,
+   const elSet &badElements, int depth, const double distFactor,
    bool weakMerge, bool optPrimSurfMesh)
 {
 
   Msg::Info("Starting blob generation from %i bad elements...", badElements.size());
 
+  elElSetMap element2elements;                                                            // Element to element connectivity, built progressively
+
   // Contruct primary blobs
   Msg::Info("Constructing %i primary blobs", badElements.size());
-  std::vector<std::set<MElement*> > primBlobs;
+  std::vector<elSet> primBlobs;
   primBlobs.reserve(badElements.size());
-  for (std::set<MElement*>::const_iterator it = badElements.begin(); it != badElements.end(); ++it) {
-    //const int minLayers = ((*it)->getDim() == 3) ? 1 : 0;
-    const int minLayers = 3;
-    primBlobs.push_back(getSurroundingBlob(*it, depth, vertex2elements,
+  for (elSet::const_iterator it = badElements.begin(); it != badElements.end(); ++it) {
+    const int minLayers = ((*it)->getDim() == 3) ? 1 : 0;
+    primBlobs.push_back(getSurroundingBlob(*it, depth, vertex2elements, element2elements,
                                 distFactor, minLayers, optPrimSurfMesh));
   }
 
@@ -289,8 +376,8 @@ static std::vector<std::pair<std::set<MElement*>, std::set<MVertex*> > > getConn
   std::map<MElement*, std::set<int> > tags;
   std::vector<std::set<int> > blobConnect(primBlobs.size());
   for (int iB = 0; iB < primBlobs.size(); ++iB) {
-    std::set<MElement*> &blob = primBlobs[iB];
-    for(std::set<MElement*>::iterator itEl = blob.begin(); itEl != blob.end(); ++itEl) {
+    elSet &blob = primBlobs[iB];
+    for(elSetIter itEl = blob.begin(); itEl != blob.end(); ++itEl) {
       std::set<int> &blobInd = tags[*itEl];
       if (!blobInd.empty() && (badElements.find(*itEl) != badElements.end() ||
                                !weakMerge)) {
@@ -315,22 +402,22 @@ static std::vector<std::pair<std::set<MElement*>, std::set<MVertex*> > > getConn
 
   // Merge primary blobs according to groups
   Msg::Info("Merging primary blobs into %i blobs...", groups.size());
-  std::list<std::set<MElement*> > blobs;
+  std::list<elSet> blobs;
   for (std::list<std::set<int> >::iterator itG = groups.begin();
        itG != groups.end(); ++itG) {
-    blobs.push_back(std::set<MElement*>());
+    blobs.push_back(elSet());
     for (std::set<int>::iterator itB = itG->begin(); itB != itG->end(); ++itB) {
-      std::set<MElement*> primBlob = primBlobs[*itB];
+      elSet primBlob = primBlobs[*itB];
       blobs.back().insert(primBlob.begin(), primBlob.end());
     }
   }
 
   // Store and compute blob boundaries
   Msg::Info("Computing boundaries for %i blobs...", blobs.size());
-  std::vector<std::pair<std::set<MElement *>, std::set<MVertex*> > > result;
-  for (std::list<std::set<MElement*> >::iterator itB = blobs.begin();
+  std::vector<elSetVertSetPair> result;
+  for (std::list<elSet>::iterator itB = blobs.begin();
        itB != blobs.end(); ++itB)
-    result.push_back(std::pair<std::set<MElement*>, std::set<MVertex*> >
+    result.push_back(elSetVertSetPair
                      (*itB, getAllBndVertices(*itB, vertex2elements)));
 
   Msg::Info("Generated %i blobs", blobs.size());
@@ -338,17 +425,16 @@ static std::vector<std::pair<std::set<MElement*>, std::set<MVertex*> > > getConn
   return result;
 }
 
-static void optimizeConnectedBlobs
-  (const std::map<MVertex*, std::vector<MElement *> > &vertex2elements,
-   const std::map<MElement*,GEntity*> &element2entity,
-   std::set<MElement*> &badasses,
-   OptHomParameters &p, int samples, bool weakMerge = false)
+static void optimizeConnectedBlobs(const vertElVecMap &vertex2elements,
+                                   const std::map<MElement*,GEntity*> &element2entity,
+                                   elSet &badasses, OptHomParameters &p,
+                                   int samples, bool weakMerge = false)
 {
   p.SUCCESS = 1;
   p.minJac = 1.e100;
   p.maxJac = -1.e100;
 
-  std::vector<std::pair<std::set<MElement*>, std::set<MVertex*> > > toOptimize =
+  std::vector<elSetVertSetPair> toOptimize =
                           getConnectedBlobs(vertex2elements, badasses, p.nbLayers,
                                     p.distanceFactor, weakMerge, p.optPrimSurfMesh);
 
@@ -366,12 +452,14 @@ static void optimizeConnectedBlobs
     if (temp.mesh.nPC() == 0)
       Msg::Info("Blob %i has no degree of freedom, skipping", i+1);
     else
-      success = temp.optimize(p.weightFixed, p.weightFree, p.optCADWeight, p.BARRIER_MIN,
-                              p.BARRIER_MAX, false, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax, p.discrTolerance);
+      success = temp.optimize(p.weight, p.optCADWeight, p.BARRIER_MIN, p.BARRIER_MAX,
+                              false, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,
+                              p.discrTolerance);
     if (success >= 0 && p.BARRIER_MIN_METRIC > 0) {
       Msg::Info("Jacobian optimization succeed, starting svd optimization");
-      success = temp.optimize(p.weightFixed, p.weightFree, p.optCADWeight, p.BARRIER_MIN_METRIC, p.BARRIER_MAX,
-                              true, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,p.discrTolerance);
+      success = temp.optimize(p.weight, p.optCADWeight, p.BARRIER_MIN_METRIC, p.BARRIER_MAX,
+                              true, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,
+                              p.discrTolerance);
     }
     double minJac, maxJac, distMaxBND, distAvgBND;
     temp.recalcJacDist();
@@ -390,12 +478,12 @@ static void optimizeConnectedBlobs
 
 }
 
-static MElement *getWorstElement(std::set<MElement*> &badasses, OptHomParameters &p)
+static MElement *getWorstElement(elSet &badasses, OptHomParameters &p)
 {
   double worst = 1.e300;
   MElement *worstEl = 0;
 
-  for (std::set<MElement*>::iterator it=badasses.begin(); it!=badasses.end(); it++) {
+  for (elSetIter it=badasses.begin(); it!=badasses.end(); it++) {
     double jmin, jmax, val;
     (*it)->scaledJacRange(jmin,jmax);
     val = jmin-p.BARRIER_MIN + p.BARRIER_MAX-jmax;
@@ -408,111 +496,10 @@ static MElement *getWorstElement(std::set<MElement*> &badasses, OptHomParameters
   return worstEl;
 }
 
-static std::set<MVertex *> getPrimBndVertices
-  (std::set<MElement*> &elements,
-   const std::map<MVertex*, std::vector<MElement*> > &vertex2elements)
-{
-  std::set<MVertex*> bnd;
-  for (std::set<MElement*>::iterator itE = elements.begin(); itE != elements.end(); ++itE) {
-    for (int i = 0; i < (*itE)->getNumPrimaryVertices(); ++i) {
-      const std::vector<MElement*> &neighbours = vertex2elements.find
-        ((*itE)->getVertex(i))->second;
-      for (size_t k = 0; k < neighbours.size(); ++k) {
-        if (elements.find(neighbours[k]) == elements.end()) {
-            bnd.insert((*itE)->getVertex(i));
-        }
-      }
-    }
-  }
-  return bnd;
-}
-
-static std::set<MElement*> getSurroundingBlob3D
-  (MElement *el, int depth,
-   const std::map<MVertex*, std::vector<MElement*> > &vertex2elements,
-   const double distFactor)
-{
-  const double limDist = el->maxDistToStraight() * distFactor;
-
-  std::set<MElement*> blob;
-  std::list<MElement*> currentLayer, lastLayer;
-
-  std::list<SPoint3> seedPts;
-
-  blob.insert(el);
-  lastLayer.push_back(el);
-  for (int d = 0; d < depth; ++d) {
-    currentLayer.clear();
-    for (std::list<MElement*>::iterator it = lastLayer.begin();
-         it != lastLayer.end(); ++it) {
-      for (int i = 0; i < (*it)->getNumPrimaryVertices(); ++i) {
-        const std::vector<MElement*> &neighbours = vertex2elements.find
-          ((*it)->getVertex(i))->second;
-        for (std::vector<MElement*>::const_iterator itN = neighbours.begin();
-             itN != neighbours.end(); ++itN) {
-          // Check distance from all seed points
-          SPoint3 pt = (*itN)->barycenter();
-          bool nearSeed = false;
-          for (std::list<SPoint3>::const_iterator itS = seedPts.begin();
-               itS != seedPts.end(); ++itS)
-            if (itS->distance(pt) < limDist) {
-              nearSeed = true;
-              break;
-            }
-          if ((d == 0) || nearSeed){
-            // Assume that if an el is too far, its neighbours are too far as well
-            if (blob.insert(*itN).second) currentLayer.push_back(*itN);
-          }
-        }
-      }
-    }
-    if (d == 0) // Elts of 1st layer are seed points
-      for (std::list<MElement*>::iterator itL = currentLayer.begin();
-           itL != currentLayer.end(); ++itL)
-        seedPts.push_back((*itL)->barycenter_infty());
-    lastLayer = currentLayer;
-  }
-
-  return blob;
-
-}
-
-static std::set<MElement*> addBlobLayer
-  (std::set<MElement*> &blob,
-   const std::map<MVertex*, std::vector<MElement*> > &vertex2elements)
-{
-  std::set<MElement*> layer;
-  const std::set<MElement*> initBlob = blob;
-
-  for (std::set<MElement*>::const_iterator it = initBlob.begin();
-       it != initBlob.end(); ++it)
-    for (int i = 0; i < (*it)->getNumPrimaryVertices(); ++i) {
-      const std::vector<MElement*> &neighbours = vertex2elements.find
-        ((*it)->getVertex(i))->second;
-      for (std::vector<MElement*>::const_iterator itN = neighbours.begin();
-           itN != neighbours.end(); ++itN)
-        if (blob.insert(*itN).second) layer.insert(*itN);
-    }
-  return layer;
-}
-
-static bool detectNewBrokenElement(std::set<MElement*> &layer,
-                                   std::set<MElement*> &badasses,
-                                   OptHomParameters &p)
-{
-  for (std::set<MElement*>::iterator it=layer.begin(); it!=layer.end(); it++)
-    if (badasses.find(*it) == badasses.end()) {
-      double jmin, jmax, val;
-      (*it)->scaledJacRange(jmin,jmax);
-      if ((jmin < p.BARRIER_MIN) || (jmax > p.BARRIER_MAX)) return true;
-    }
-  return false;
-}
-
 static void optimizeOneByOne
   (const std::map<MVertex*, std::vector<MElement *> > &vertex2elements,
    const std::map<MElement*,GEntity*> &element2entity,
-   std::set<MElement*> badElts, OptHomParameters &p, int samples)
+   elSet badElts, OptHomParameters &p, int samples)
 {
   p.SUCCESS = 1;
   p.minJac = 1.e100;
@@ -521,6 +508,8 @@ static void optimizeOneByOne
   const int initNumBadElts = badElts.size();
   Msg::Info("%d badasses, starting to iterate...", initNumBadElts);
 
+  elElSetMap element2elements;                                          // Element to element connectivity, built progressively
+
   for (int iBadEl=0; iBadEl<initNumBadElts; iBadEl++) {
 
     if (badElts.empty()) break;
@@ -535,68 +524,11 @@ static void optimizeOneByOne
     int success;
 
     for (int iterBlob=0; iterBlob<p.maxAdaptBlob; iterBlob++) {
-
-//      OptHOM *opt;
-//
-//      // First step: small blob with unsafe optimization (only 1st-order
-//      // bnd. vertices fixed)
-//      std::set<MElement*> toOptimizePrim = getSurroundingBlob
-//        (worstEl, nbLayers, vertex2elements, distanceFactor, 0, p.optPrimSurfMesh);
-//      std::set<MVertex*> toFix1 = getPrimBndVertices(toOptimizePrim, vertex2elements);
-//      std::set<MElement*> toOptimize1;
-//      std::set_difference(toOptimizePrim.begin(),toOptimizePrim.end(),
-//                          badElts.begin(),badElts.end(), // Do not optimize badElts
-//                          std::inserter(toOptimize1, toOptimize1.end()));
-//      Msg::Info("Optimizing primary blob %i (max. %i remaining) composed of"
-//                " %4d elements", iBadEl, badElts.size(), toOptimize1.size());
-//      fflush(stdout);
-//      opt = new OptHOM(element2entity, toOptimize1, toFix1, p.fixBndNodes);
-//      //std::ostringstream ossI1;
-//      //ossI1 << "initial_primary_" << iter << ".msh";
-//      //opt->mesh.writeMSH(ossI1.str().c_str());
-//      success = opt->optimize(p.weightFixed, p.weightFree, p.BARRIER_MIN, p.BARRIER_MAX,
-//                              false, samples, p.itMax, p.optPassMax);
-//
-//      // Second step: add external layer, check it and optimize it safely (all
-//      // bnd. vertices fixed) if new broken element
-//      if (success > 0) {
-//        opt->mesh.updateGEntityPositions();
-//        std::set<MElement*> layer = addBlobLayer(toOptimizePrim, vertex2elements);
-//        if (detectNewBrokenElement(layer, badElts, p)) {
-//          delete opt;
-//          std::set<MVertex*> toFix2 = getAllBndVertices(toOptimizePrim, vertex2elements);
-//          std::set<MElement*> toOptimize2;
-//          std::set_difference(toOptimizePrim.begin(),toOptimizePrim.end(),
-//                              badElts.begin(),badElts.end(),
-//                              std::inserter(toOptimize2, toOptimize2.end()));
-//          Msg::Info("Optimizing corrective blob %i (max. %i remaining) "
-//                    "composed of %4d elements", iBadEl, badElts.size(),
-//                    toOptimize2.size());
-//          fflush(stdout);
-//          opt = new OptHOM(element2entity, toOptimize2, toFix2, p.fixBndNodes);
-//          //std::ostringstream ossI1;
-//          //ossI1 << "initial_corrective_" << iter << ".msh";
-//          //opt->mesh.writeMSH(ossI1.str().c_str());
-//          success = opt->optimize(p.weightFixed, p.weightFree, p.BARRIER_MIN,
-//                                  p.BARRIER_MAX, false, samples, p.itMax, p.optPassMax);
-//          if (success >= 0 && p.BARRIER_MIN_METRIC > 0) {
-//            Msg::Info("Jacobian optimization succeed, starting svd optimization");
-//            success = opt->optimize(p.weightFixed, p.weightFree, p.BARRIER_MIN_METRIC,
-//                                    p.BARRIER_MAX, true, samples, p.itMax, p.optPassMax);
-//          }
-//        }
-//        else {
-//          Msg::Info("Primary blob %i did not break new elements, "
-//                    "no correction needed", iBadEl);
-//          fflush(stdout);
-//        }
-//      }
-
-      std::set<MElement*> toOptimizePrim = getSurroundingBlob
-        (worstEl, nbLayers, vertex2elements, distanceFactor, 1, p.optPrimSurfMesh);
-//    std::set<MElement*> layer = addBlobLayer(toOptimizePrim, vertex2elements);
-      std::set<MVertex*> toFix = getAllBndVertices(toOptimizePrim, vertex2elements);
-      std::set<MElement*> toOptimize;
+      elSet toOptimizePrim = getSurroundingBlob(worstEl, nbLayers,
+                                                vertex2elements, element2elements,
+                                                distanceFactor, 1, p.optPrimSurfMesh);
+      vertSet toFix = getAllBndVertices(toOptimizePrim, vertex2elements);
+      elSet toOptimize;
       std::set_difference(toOptimizePrim.begin(),toOptimizePrim.end(),
                           badElts.begin(),badElts.end(),
                           std::inserter(toOptimize, toOptimize.end()));
@@ -608,12 +540,14 @@ static void optimizeOneByOne
       std::ostringstream ossI1;
       ossI1 << "initial_blob-" << iBadEl << ".msh";
       opt->mesh.writeMSH(ossI1.str().c_str());
-      success = opt->optimize(p.weightFixed, p.weightFree, p.optCADWeight, p.BARRIER_MIN,
-                              p.BARRIER_MAX, false, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,p.discrTolerance);
+      success = opt->optimize(p.weight, p.optCADWeight, p.BARRIER_MIN, p.BARRIER_MAX,
+                              false, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,
+                              p.discrTolerance);
       if (success >= 0 && p.BARRIER_MIN_METRIC > 0) {
         Msg::Info("Jacobian optimization succeed, starting svd optimization");
-        success = opt->optimize(p.weightFixed, p.weightFree, p.optCADWeight, p.BARRIER_MIN_METRIC,
-                                p.BARRIER_MAX, true, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,p.discrTolerance);
+        success = opt->optimize(p.weight, p.optCADWeight, p.BARRIER_MIN_METRIC, p.BARRIER_MAX,
+                                true, samples, p.itMax, p.optPassMax, p.optCAD, p.optCADDistMax,
+                                p.discrTolerance);
       }
 
       // Measure min and max Jac., update mesh
@@ -641,7 +575,6 @@ static void optimizeOneByOne
 //        }
       }
       else break;
-
     }
 
     //#pragma omp critical
@@ -653,6 +586,13 @@ static void optimizeOneByOne
 #endif
 
 #include "OptHomIntegralBoundaryDist.h"
+
+//double ComputeDistanceToGeometry (GModel* gm)
+//{
+//  return distanceToGeometry(gm);
+//}
+
+
 double ComputeDistanceToGeometry (GEntity *ge , int distanceDefinition, double tolerance)
 {
   double maxd = 0.0;
@@ -670,7 +610,8 @@ double ComputeDistanceToGeometry (GEntity *ge , int distanceDefinition, double t
       }
     }
   }
-  if (distanceDefinition == 2 && NUM) return sum / (double)NUM;
+  if (distanceDefinition == 2) return sum;
+  if (distanceDefinition == 6) return sum;
   return maxd;
 }
 
@@ -689,8 +630,12 @@ void HighOrderMeshOptimizer(GModel *gm, OptHomParameters &p)
 
   std::map<MVertex*, std::vector<MElement *> > vertex2elements;
   std::map<MElement*,GEntity*> element2entity;
-  std::set<MElement*> badasses;
-  double maxdist = 0;
+  elSet badasses;
+  double maxdist = 0.;                                                  // TODO: To be cleaned?
+
+  std::map<MElement*,double> distances;
+  distanceFromElementsToGeometry(gm, p.dim,distances);
+
   for (int iEnt = 0; iEnt < entities.size(); ++iEnt) {
     GEntity* &entity = entities[iEnt];
     if (entity->dim() != p.dim || (p.onlyVisible && !entity->getVisibility())) continue;
@@ -698,21 +643,22 @@ void HighOrderMeshOptimizer(GModel *gm, OptHomParameters &p)
               entity->tag());
     calcVertex2Elements(p.dim,entity,vertex2elements);
     if (p.optPrimSurfMesh) calcElement2Entity(entity,element2entity);
-    for (int iEl = 0; iEl < entity->getNumMeshElements();iEl++) { // Detect bad elements
+    for (int iEl = 0; iEl < entity->getNumMeshElements();iEl++) {       // Detect bad elements
       double jmin, jmax;
       MElement *el = entity->getMeshElement(iEl);
-      const double DISTE =computeBndDist(el,2,fabs(p.discrTolerance));
-      //      printf("Element %d Distance %12.5E\n",iEl,DISTE);
-      maxdist = std::max(DISTE, maxdist);
       if (el->getDim() == p.dim) {
-	if (p.optCAD && DISTE > p.optCADDistMax)
-	  badasses.insert(el);
-
-	el->scaledJacRange(jmin, jmax, p.optPrimSurfMesh ? entity : 0);
-	if (p.BARRIER_MIN_METRIC > 0) jmax = jmin;
-	if (jmin < p.BARRIER_MIN || jmax > p.BARRIER_MAX){
-	  badasses.insert(el);
+	// FIXME TEST
+	//        badasses.insert(el);
+        if (p.optCAD) {
+	  //          const double DISTE =computeBndDist(el,2,fabs(p.discrTolerance));
+	  const double DISTE =distances[el];
+	  //	  if (DISTE > 0)printf("El %d dist %12.5E vs %12.5E\n",iEl,DISTE,p.optCADDistMax);
+          maxdist = std::max(DISTE, maxdist);
+          if (DISTE > p.optCADDistMax) badasses.insert(el);
         }
+        el->scaledJacRange(jmin, jmax, p.optPrimSurfMesh ? entity : 0);
+        if (p.BARRIER_MIN_METRIC > 0) jmax = jmin;
+        if (jmin < p.BARRIER_MIN || jmax > p.BARRIER_MAX) badasses.insert(el);
       }
     }
   }
@@ -740,3 +686,166 @@ void HighOrderMeshOptimizer(GModel *gm, OptHomParameters &p)
   Msg::Error("High-order mesh optimizer requires BFGS");
 #endif
 }
+
+
+//#include "GModel.h"
+#include "GEntity.h"
+//#include "MElement.h"
+//#include "OptHomRun.h"
+#include "CADDistances.h"
+#include "MeshOptCommon.h"
+#include "MeshOptObjContribFunc.h"
+#include "MeshOptObjContrib.h"
+#include "MeshOptObjContribScaledNodeDispSq.h"
+#include "OptHomObjContribScaledJac.h"
+#include "OptHomObjContribMetricMin.h"
+#include "OptHomObjContribCADDist.h"
+#include "MeshOptimizer.h"
+
+
+struct HOPatchDefParameters : public MeshOptPatchDef
+{
+  HOPatchDefParameters(const OptHomParameters &p);
+  virtual ~HOPatchDefParameters() {}
+  virtual double elBadness(MElement *el, GEntity* gEnt) const;
+  virtual double bndElBadness(MElement *el, GEntity* gEnt) const;
+  virtual double maxDistance(MElement *el) const;
+  virtual int inPatch(const SPoint3 &badBary,
+                      double limDist, MElement *el,
+                      GEntity* gEnt) const;
+private:
+  double jacMin, jacMax;
+  double distanceFactor;
+  bool optCAD;
+  double optCADDistMax, optCADWeight;
+};
+
+
+HOPatchDefParameters::HOPatchDefParameters(const OptHomParameters &p)
+{
+  jacMin = p.BARRIER_MIN;
+  jacMax = (p.BARRIER_MAX > 0.) ? p.BARRIER_MAX : 1.e300;
+  strategy = (p.strategy == 1) ? MeshOptPatchDef::STRAT_ONEBYONE :
+                                 MeshOptPatchDef::STRAT_DISJOINT;
+  minLayers = (p.dim == 3) ? 1 : 0;
+  maxLayers = p.nbLayers;
+  distanceFactor = p.distanceFactor;
+  if (strategy == MeshOptPatchDef::STRAT_DISJOINT)
+    weakMerge = (p.strategy == 2);
+  else {
+    maxPatchAdapt = p.maxAdaptBlob;
+    maxLayersAdaptFact = p.adaptBlobLayerFact;
+    distanceAdaptFact = p.adaptBlobDistFact;
+  }
+  optCAD = p.optCAD;
+  optCADDistMax = p.optCADDistMax;
+  optCADWeight = p.optCADWeight;
+}
+
+
+double HOPatchDefParameters::elBadness(MElement *el, GEntity* gEnt) const
+{
+  double jmin, jmax;
+  el->scaledJacRange(jmin, jmax);
+  double badness = std::min(jmin-jacMin, 0.) + std::min(jacMax-jmax, 0.);
+  return badness;
+}
+
+
+double HOPatchDefParameters::bndElBadness(MElement *el, GEntity* gEnt) const
+{
+  if (optCAD) {
+    if (el->getType() == TYPE_LIN) {                                              // 2D
+      if (gEnt->geomType() != GEntity::Line)                                      // Straight geometric line -> no distance
+        return optCADDistMax -
+               taylorDistanceEdge(static_cast<MLine*>(el), gEnt->cast2Edge());
+    }
+    else {                                                                        // 3D
+      if (gEnt->geomType() != GEntity::Plane)                                     // Straight geometric plance -> no distance
+        return optCADDistMax -
+               taylorDistanceFace(el, gEnt->cast2Face());
+    }
+  }
+  return 1.;
+}
+
+
+double HOPatchDefParameters::maxDistance(MElement *el) const
+{
+  return distanceFactor * el->maxDistToStraight();
+}
+
+
+int HOPatchDefParameters::inPatch(const SPoint3 &badBary,
+                                  double limDist, MElement *el,
+                                  GEntity* gEnt) const
+{
+  return testElInDist(badBary, limDist, el) ? 1 : 0;
+}
+
+
+void HighOrderMeshOptimizerNew(GModel *gm, OptHomParameters &p)
+{
+  Msg::StatusBar(true, "Optimizing high order mesh...");
+
+  MeshOptParameters par;
+  par.dim = p.dim;
+  par.onlyVisible = p.onlyVisible;
+  par.fixBndNodes = p.fixBndNodes;
+  par.useGeomForPatches = false;
+  par.useGeomForOpt = false;
+  par.useBoundaries = p.optCAD;
+  HOPatchDefParameters patchDef(p);
+  par.patchDef = &patchDef;
+  par.displayInterv = 30;
+  par.verbose = 4;
+
+  ObjContribScaledNodeDispSq<ObjContribFuncSimple> nodeDistFunc(p.weight,
+                                                                Patch::LS_MAXNODEDIST);
+  ObjContribScaledJac<ObjContribFuncBarrierMovMin> minJacBarFunc(1.);
+  minJacBarFunc.setTarget(p.BARRIER_MIN, 1.);
+  ObjContribScaledJac<ObjContribFuncBarrierFixMinMovMax> minMaxJacBarFunc(1.);
+  minMaxJacBarFunc.setTarget(p.BARRIER_MAX, 1.);
+//  ObjContribCADDistSq<ObjContribFuncSimpleTargetMax> CADDistFunc(p.optCADWeight, p.optCADDistMax);
+//  CADDistFunc.setTarget(0.);
+  ObjContribCADDistSq<ObjContribFuncBarrierMovMax> CADDistFunc(p.optCADWeight, p.optCADDistMax);
+  CADDistFunc.setTarget(1., 0.);
+  ObjContribScaledJac<ObjContribFuncBarrierFixMin> minJacFixBarFunc(1.);
+  minJacFixBarFunc.setTarget(p.BARRIER_MIN, 1.);
+
+  MeshOptPass minJacPass;
+  minJacPass.maxParamUpdates = p.optPassMax;
+  minJacPass.maxOptIter = p.itMax;
+  minJacPass.contrib.push_back(&nodeDistFunc);
+  minJacPass.contrib.push_back(&minJacBarFunc);
+//  if (p.optCAD) minJacPass.contrib.push_back(&CADDistFunc);
+  par.pass.push_back(minJacPass);
+
+  if (p.BARRIER_MAX > 0.) {
+    MeshOptPass minMaxJacPass;
+    minMaxJacPass.maxParamUpdates = p.optPassMax;
+    minMaxJacPass.maxOptIter = p.itMax;
+    minMaxJacPass.contrib.push_back(&nodeDistFunc);
+    minMaxJacPass.contrib.push_back(&minMaxJacBarFunc);
+//    if (p.optCAD) minMaxJacPass.contrib.push_back(&CADDistFunc);
+    par.pass.push_back(minMaxJacPass);
+  }
+
+  if (p.optCAD) {
+    MeshOptPass maxCADDistPass;
+    maxCADDistPass.maxParamUpdates = p.optPassMax;
+    maxCADDistPass.maxOptIter = p.itMax;
+    maxCADDistPass.contrib.push_back(&nodeDistFunc);
+    maxCADDistPass.contrib.push_back(&minJacFixBarFunc);
+    maxCADDistPass.contrib.push_back(&CADDistFunc);
+    par.pass.push_back(maxCADDistPass);
+  }
+
+  meshOptimizer(gm, par);
+
+  p.CPU = par.CPU;
+  p.minJac = minMaxJacBarFunc.getMin();
+  p.maxJac = minMaxJacBarFunc.getMax();
+
+  Msg::StatusBar(true, "Done optimizing high order mesh (%g s)", p.CPU);
+}
diff --git a/contrib/HighOrderMeshOptimizer/OptHomRun.h b/contrib/HighOrderMeshOptimizer/OptHomRun.h
index f1d172f..df3e460 100644
--- a/contrib/HighOrderMeshOptimizer/OptHomRun.h
+++ b/contrib/HighOrderMeshOptimizer/OptHomRun.h
@@ -37,8 +37,7 @@ struct OptHomParameters {
   double BARRIER_MIN_METRIC ; // minimum scaled jcaobian
   double BARRIER_MIN ; // minimum scaled jcaobian
   double BARRIER_MAX ; // maximum scaled jcaobian
-  double weightFixed ; // weight of the energy for fixed nodes
-  double weightFree ; // weight of the energy for free nodes
+  double weight ; // weight of the energy for nodes
   int nbLayers ; // number of layers taken around a bad element
   int dim ; // which dimension to optimize
   int itMax ; // max number of iterations in the optimization process
@@ -65,17 +64,19 @@ struct OptHomParameters {
   double CPU; // Time for optimization
 
   OptHomParameters ()
-    : BARRIER_MIN_METRIC(-1.), BARRIER_MIN(0.1), BARRIER_MAX(2.0), weightFixed(1000.),
-      weightFree (1.), nbLayers (6) , dim(3) , itMax(300), onlyVisible(true),
+    : BARRIER_MIN_METRIC(-1.), BARRIER_MIN(0.1), BARRIER_MAX(2.0), weight(1.),
+      nbLayers (6) , dim(3) , itMax(300), onlyVisible(true),
       distanceFactor(12), fixBndNodes(false), strategy(0), maxAdaptBlob(3),
-      adaptBlobLayerFact(2.), adaptBlobDistFact(2.), optPrimSurfMesh(false),optCAD(false),
-      optCADWeight(1000.),optCADDistMax(1.e22),discrTolerance(1.e-4)
+      adaptBlobLayerFact(2.), adaptBlobDistFact(2.), optPrimSurfMesh(false), optCAD(false),
+      optCADWeight(1000.), optCADDistMax(1.e22), discrTolerance(1.e-4)
   {
   }
 };
 
 void HighOrderMeshOptimizer(GModel *gm, OptHomParameters &p);
+void HighOrderMeshOptimizerNew(GModel *gm, OptHomParameters &p);
 // distanceDefinition 1) Hausdorff 2) Area/Length 3) Frechet (not done)
 double ComputeDistanceToGeometry (GEntity *ge , int distanceDefinition,double tolerance) ;
+//double ComputeDistanceToGeometry (GModel*gm);
 
 #endif
diff --git a/contrib/HighOrderMeshOptimizer/README.txt b/contrib/HighOrderMeshOptimizer/README.txt
new file mode 100644
index 0000000..96124ba
--- /dev/null
+++ b/contrib/HighOrderMeshOptimizer/README.txt
@@ -0,0 +1,23 @@
+// HighOrderMeshOptimizer - Copyright (C) 2015 UCL-ULg
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
diff --git a/contrib/MathEx/CMakeLists.txt b/contrib/MathEx/CMakeLists.txt
index 3554036..e5bcfb4 100644
--- a/contrib/MathEx/CMakeLists.txt
+++ b/contrib/MathEx/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/MeshOptimizer/CMakeLists.txt b/contrib/MeshOptimizer/CMakeLists.txt
new file mode 100644
index 0000000..f96d3f6
--- /dev/null
+++ b/contrib/MeshOptimizer/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+#
+# See the LICENSE.txt file for license information. Please report all
+# bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+set(SRC
+  MeshOpt.cpp
+  MeshOptCommon.cpp
+  MeshOptimizer.cpp
+  MeshOptPatch.cpp
+  MeshOptObjectiveFunction.cpp
+  MeshOptObjContrib.cpp
+  MeshOptObjContribFunc.cpp
+  MeshOptVertexCoord.cpp
+)
+
+file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.hpp)
+append_gmsh_src(contrib/MeshOptimizer "${SRC};${HDR}")
diff --git a/contrib/MeshOptimizer/MeshOpt.cpp b/contrib/MeshOptimizer/MeshOpt.cpp
new file mode 100644
index 0000000..a35c312
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOpt.cpp
@@ -0,0 +1,254 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#include <iostream>
+#include <algorithm>
+#include "GmshMessage.h"
+#include "GmshConfig.h"
+#include "MeshOptObjContrib.h"
+#include "MeshOptObjectiveFunction.h"
+#include "MeshOptCommon.h"
+#include "MeshOpt.h"
+
+#if defined(HAVE_BFGS)
+
+#include "ap.h"
+#include "alglibinternal.h"
+#include "alglibmisc.h"
+#include "linalg.h"
+#include "optimization.h"
+
+
+namespace {
+
+
+void evalObjGradFunc(const alglib::real_1d_array &x, double &Obj,
+                     alglib::real_1d_array &gradObj, void *MOInst)
+{
+  (static_cast<MeshOpt*>(MOInst))->evalObjGrad(x, Obj, gradObj);
+}
+
+
+void printProgressFunc(const alglib::real_1d_array &x, double Obj, void *MOInst)
+{
+  (static_cast<MeshOpt*>(MOInst))->printProgress(x,Obj);
+}
+
+
+}
+
+
+MeshOpt::MeshOpt(const std::map<MElement*,GEntity*> &element2entity,
+                 const std::map<MElement*, GEntity*> &bndEl2Ent,
+                 const std::set<MElement*> &els, std::set<MVertex*> &toFix,
+                 const std::set<MElement*> &bndEls, const MeshOptParameters &par) :
+  patch(element2entity, bndEl2Ent, els, toFix, bndEls, par.fixBndNodes), _verbose(0),
+  _iPass(0), _iter(0), _intervDisplay(0), _initObj(0)
+{
+  _allObjFunc.resize(par.pass.size());
+  for (int iPass=0; iPass<par.pass.size(); iPass++) {
+    _allObjFunc[iPass].resize(par.pass[iPass].contrib.size());
+    for (int iC=0; iC<par.pass[iPass].contrib.size(); iC++)
+      _allObjFunc[iPass][iC] = par.pass[iPass].contrib[iC]->copy();
+  }
+  _objFunc = &_allObjFunc[0];
+}
+
+
+MeshOpt::~MeshOpt()
+{
+  for (int iPass=0; iPass<_allObjFunc.size(); iPass++)
+    for (int iC=0; iC<_allObjFunc[iPass].size(); iC++) delete _allObjFunc[iPass][iC];
+}
+
+
+void MeshOpt::evalObjGrad(const alglib::real_1d_array &x, double &obj,
+                                         alglib::real_1d_array &gradObj)
+{
+  patch.updateMesh(x.getcontent());
+  _objFunc->compute(obj, gradObj);
+  if (_objFunc->targetReached()) {
+    if (_verbose > 2) Msg::Info("Reached target values, setting null gradient");
+    obj = 0.;
+    for (int i = 0; i < gradObj.length(); i++) gradObj[i] = 0.;
+  }
+}
+
+
+void MeshOpt::printProgress(const alglib::real_1d_array &x, double Obj)
+{
+  _iter++;
+
+  if ((_verbose > 2) && (_iter % _intervDisplay == 0))
+    Msg::Info(("--> Iteration %3d --- OBJ %12.5E (relative decrease = %12.5E)" +
+              _objFunc->minMaxStr()).c_str(), _iter, Obj, Obj/_initObj);
+}
+
+
+void MeshOpt::calcScale(alglib::real_1d_array &scale)
+{
+  scale.setlength(patch.nPC());
+
+  // Calculate scale
+  for (int iFV = 0; iFV < patch.nFV(); iFV++) {
+    std::vector<double> scaleFV(patch.nPCFV(iFV),1.);
+    patch.pcScale(iFV,scaleFV);
+    for (int iPC = 0; iPC < patch.nPCFV(iFV); iPC++)
+      scale[patch.indPCFV(iFV,iPC)] = scaleFV[iPC];
+  }
+}
+
+
+void MeshOpt::updateResults()
+{
+  _objFunc->updateResults();
+}
+
+
+void MeshOpt::runOptim(alglib::real_1d_array &x,
+                        const alglib::real_1d_array &initGradObj, int itMax)
+{
+  static const double EPSG = 0.;
+  static const double EPSF = 0.;
+  static const double EPSX = 0.;
+
+  _iter = 0;
+
+  alglib::real_1d_array scale;
+  calcScale(scale);
+
+  int iterationscount = 0, nfev = 0, terminationtype = -1;
+  alglib::mincgstate state;
+  alglib::mincgreport rep;
+  try {
+    mincgcreate(x, state);
+    mincgsetscale(state,scale);
+    mincgsetprecscale(state);
+    mincgsetcond(state, EPSG, EPSF, EPSX, itMax);
+    mincgsetxrep(state, true);
+    alglib::mincgoptimize(state, evalObjGradFunc, printProgressFunc, this);
+    mincgresults(state, x, rep);
+  }
+  catch(alglib::ap_error &e) {
+    Msg::Error("%s", e.msg.c_str());
+  }
+  iterationscount = rep.iterationscount;
+  nfev = rep.nfev;
+  terminationtype = rep.terminationtype;
+
+  if (_verbose > 2) {
+    Msg::Info("Optimization finalized after %d iterations (%d function evaluations),",
+              iterationscount, nfev);
+    switch(int(terminationtype)) {
+    case 1: Msg::Info("because relative function improvement is no more than EpsF"); break;
+    case 2: Msg::Info("because relative step is no more than EpsX"); break;
+    case 4: Msg::Info("because gradient norm is no more than EpsG"); break;
+    case 5: Msg::Info("because the maximum number of steps was taken"); break;
+    default: Msg::Info("with code %d", int(terminationtype)); break;
+    }
+  }
+}
+
+
+int MeshOpt::optimize(const MeshOptParameters &par)
+{
+  _intervDisplay = par.displayInterv;
+  _verbose = par.verbose;
+
+  // Set initial guess & result
+  int result = 1;
+  alglib::real_1d_array x;
+  x.setlength(patch.nPC());
+  patch.getUvw(x.getcontent());
+
+  if (_verbose > 2)
+    Msg::Info("Patch composed of %i elements, %i vertices, %i free vertices, %i variables",
+                                          patch.nEl(), patch.nVert(), patch.nFV(), patch.nPC());
+
+  // Loop on passes
+  for (_iPass=0; _iPass<par.pass.size(); _iPass++) {
+
+    // Set objective function Output if required
+    _objFunc = &_allObjFunc[_iPass];
+    if (_verbose > 2) {
+      std::string msgStr = "* Pass %d with contributions: " + _objFunc->contribNames();
+      Msg::Info(msgStr.c_str(), _iPass);
+    }
+
+    // Initialize contributions
+    _objFunc->initialize(&patch);
+    _objFunc->updateParameters();
+
+    // Calculate initial objective function value and gradient
+   _initObj = 0.;
+    alglib::real_1d_array gradObj;
+    gradObj.setlength(patch.nPC());
+    for (int i = 0; i < patch.nPC(); i++) gradObj[i] = 0.;
+    evalObjGrad(x, _initObj, gradObj);
+
+    // Loop for update of objective function parameters (barrier movement)
+    bool targetReached = _objFunc->targetReached();
+    for (int iBar=0; (iBar<par.pass[_iPass].maxParamUpdates) && (!targetReached); iBar++) {
+      if (_verbose > 2) Msg::Info("--- Optimization run %d", iBar);
+      _objFunc->updateParameters();
+      runOptim(x, gradObj, par.pass[_iPass].maxOptIter);
+      _objFunc->updateMinMax();
+      targetReached = _objFunc->targetReached();
+      if (_objFunc->stagnated()) {
+        if (_verbose > 2) Msg::Info("Stagnation detected, stopping optimization");
+        break;
+      }
+    }
+
+    // Check results of pass and output if required
+    if (!targetReached) result = 0;
+    std::string failMeasures = _objFunc->failMeasures();
+    if (!failMeasures.empty()) {
+      result = -1;
+      if (_verbose > 2)
+        Msg::Error("Failed to reach critical value in pass %d "
+                    "for measure(s): %s", _iPass, failMeasures.c_str());
+    }
+    if (_verbose > 2) {
+      if (targetReached)
+        Msg::Info("Target reached for pass %d", _iPass);
+      else {
+        std::string failedTargets = _objFunc->targetsNotReached();
+        Msg::Warning("Failed to reach target in pass %d for "
+                      "contributions %s", _iPass, failedTargets.c_str());
+      }
+    }
+    if (result == -1) break;
+  }                                                                       // Pass loop
+
+  return result;
+}
+
+
+#endif
diff --git a/contrib/MeshOptimizer/MeshOpt.h b/contrib/MeshOptimizer/MeshOpt.h
new file mode 100644
index 0000000..9c7a21c
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOpt.h
@@ -0,0 +1,77 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _MESHOPT_H_
+#define _MESHOPT_H_
+
+#include <string>
+#include <math.h>
+#include "MeshOptObjectiveFunction.h"
+#include "MeshOptPatch.h"
+
+#if defined(HAVE_BFGS)
+
+#include "ap.h"
+
+
+class MeshOptParameters;
+
+
+class MeshOpt
+{
+public:
+  Patch patch;
+  MeshOpt(const std::map<MElement*, GEntity*> &element2entity,
+          const std::map<MElement*, GEntity*> &bndEl2Ent,
+          const std::set<MElement*> &els, std::set<MVertex*> &toFix,
+          const std::set<MElement*> &bndEls, const MeshOptParameters &par);
+  ~MeshOpt();
+  int optimize(const MeshOptParameters &par);
+  void updateMesh(const alglib::real_1d_array &x);
+  void updateResults();
+  void evalObjGrad(const alglib::real_1d_array &x,
+                    double &Obj, alglib::real_1d_array &gradObj);
+  void printProgress(const alglib::real_1d_array &x, double Obj);
+
+ private:
+  int _verbose;
+  int _iPass;
+  std::vector<ObjectiveFunction> _allObjFunc;                                        // Contributions to objective function for current pass
+  ObjectiveFunction *_objFunc;                                                       // Contributions to objective function for current pass
+  int _iter, _intervDisplay;                                                         // Current iteration, interval of iterations for reporting
+  double _initObj;                                                                   // Values for reporting
+  void calcScale(alglib::real_1d_array &scale);
+  void runOptim(alglib::real_1d_array &x,
+                const alglib::real_1d_array &initGradObj, int itMax);
+};
+
+
+#endif
+
+#endif
diff --git a/contrib/MeshOptimizer/MeshOptCommon.cpp b/contrib/MeshOptimizer/MeshOptCommon.cpp
new file mode 100644
index 0000000..4f82cba
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptCommon.cpp
@@ -0,0 +1,136 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#include "MElement.h"
+#include "MeshOptCommon.h"
+
+
+namespace {
+
+
+// Test intersection between sphere and segment
+bool testSegSphereIntersect(SPoint3 A, SPoint3 B, const SPoint3& P, const double rr)
+{
+  // Test if separating plane between sphere and segment vertices
+  // For each vertex, separation if vertex is outside sphere and P on opposite side
+  // to other seg. vertex w.r.t plane of normal (vertex-P) through vertex
+  const SVector3 PA(P, A), PB(P, B);
+  const double aa = dot(PA, PA), ab = dot(PA, PB);
+  if ((aa > rr) & (ab > aa)) return false;
+  const double  bb = dot(PB, PB);
+  if ((bb > rr) & (ab > bb)) return false;
+
+  // Test if separating plane between sphere and line
+  // For A, separation if projection Q of P on (AB) lies outside the sphere
+  const SVector3 AB(A, B);
+  const double d = ab - aa, e = dot(AB, AB);
+  const SVector3 PQ = PA * e - d * AB;
+  if (dot(PQ, PQ) > rr * e * e) return false;
+
+  // Return true (intersection) if no separation at all
+  return true;
+}
+
+
+// Test intersection between sphere and triangle
+// Inspired by Christer Ericson, http://realtimecollisiondetection.net/blog/?p=103
+bool testTriSphereIntersect(SPoint3 A, SPoint3 B, SPoint3 C, const SPoint3& P, const double rr)
+{
+  // Test if separating plane between sphere and triangle plane
+  const SVector3 PA(P, A), AB(A, B), AC(A, C);
+  const SVector3 V = crossprod(AB, AC);                               // Normal to triangle plane
+  const double d = dot(PA, V);                                         // Dist. from P to triangle plane times norm of V
+  const double e = dot(V, V);                                         // Norm of V
+  if (d * d > rr * e) return false;                                   // Test if separating plane between sphere and triangle plane
+
+  // Test if separating plane between sphere and triangle vertices
+  const SVector3 PB(P, B), PC(P, B);
+  const double aa = dot(PA, PA), ab = dot(PA, PB), ac = dot(PA, PC);
+  const double bb = dot(PB, PB), bc = dot(PB, PC), cc = dot(PC, PC);
+  if ((aa > rr) & (ab > aa) & (ac > aa)) return false;                    // For each triangle vertex, separation if vertex is outside sphere
+  if ((bb > rr) & (ab > bb) & (bc > bb)) return false;                    // and P on opposite side to other two triangle vertices w.r.t
+  if ((cc > rr) & (ac > cc) & (bc > cc)) return false;                    // plane of normal (vertex-P) through vertex
+
+  // Test if separating plane between sphere and triangle edges
+  const SVector3 BC(B, C);
+  const double d1 = ab - aa, d2 = bc - bb, d3 = ac - cc;
+  const double e1 = dot(AB, AB), e2 = dot(BC, BC), e3 = dot(AC, AC);
+  const SVector3 PQ1 = PA * e1 - d1 * AB;                                 // Q1 projection of P on line (AB)
+  const SVector3 PQ2 = PB * e2 - d2 * BC;                                 // Q2 projection of P on line (BC)
+  const SVector3 PQ3 = PC * e3 + d3 * AC;                                 // Q3 projection of P on line (AC)
+  const SVector3 PQC = PC * e1 - PQ1;
+  const SVector3 PQA = PA * e2 - PQ2;
+  const SVector3 PQB = PB * e3 - PQ3;
+  if ((dot(PQ1, PQ1) > rr * e1 * e1) & (dot(PQ1, PQC) > 0)) return false; // For A, separation if Q lies outside the sphere and if P and C
+  if ((dot(PQ2, PQ2) > rr * e2 * e2) & (dot(PQ2, PQA) > 0)) return false; // are on opposite sides of plane through AB with normal PQ
+  if ((dot(PQ3, PQ3) > rr * e3 * e3) & (dot(PQ3, PQB) > 0)) return false; // Same for other two vertices
+
+  // Return true (intersection) if no separation at all
+  return true;
+}
+
+
+}
+
+
+// Test of intersection element with circle/sphere
+bool MeshOptPatchDef::testElInDist(const SPoint3 &P, double limDist,
+                                   MElement *el) const
+{
+  const double limDistSq = limDist*limDist;
+
+  if (el->getDim() == 2) {                                                // 2D?
+    for (int iEd = 0; iEd < el->getNumEdges(); iEd++) {                   // Loop over edges of element
+      std::vector<MVertex*> edgeVert;
+      el->getEdgeVertices(iEd, edgeVert);
+      const SPoint3 A = edgeVert[0]->point();
+      const SPoint3 B = edgeVert[1]->point();
+      if (testSegSphereIntersect(A, B, P, limDistSq)) return true;
+    }
+  }
+  else {                                                                  // 3D
+    for (int iFace = 0; iFace < el->getNumFaces(); iFace++) {             // Loop over faces of element
+      std::vector<MVertex*> faceVert;
+      el->getFaceVertices(iFace, faceVert);
+      const SPoint3 A = faceVert[0]->point();
+      const SPoint3 B = faceVert[1]->point();
+      const SPoint3 C = faceVert[2]->point();
+      if (faceVert.size() == 3) {
+        if (testTriSphereIntersect(A, B, C, P, limDistSq)) return true;
+      }
+      else {
+        const SPoint3 D = faceVert[3]->point();
+        if (testTriSphereIntersect(A, B, C, P, limDistSq) ||
+            testTriSphereIntersect(A, C, D, P, limDistSq)) return true;
+      }
+    }
+  }
+
+  return false;
+}
diff --git a/contrib/MeshOptimizer/MeshOptCommon.h b/contrib/MeshOptimizer/MeshOptCommon.h
new file mode 100644
index 0000000..eddbcc0
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptCommon.h
@@ -0,0 +1,93 @@
+// Copyright (C) 2014 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _MESHOPTCOMMON_H_
+#define _MESHOPTCOMMON_H_
+
+#include <vector>
+
+
+class MElement;
+class GEntity;
+class SPoint3;
+class ObjContrib;
+
+
+class MeshOptPatchDef {
+public:
+  enum { STRAT_DISJOINT, STRAT_ONEBYONE };
+  int strategy;                                         // Strategy: disjoint patches or adaptive one-by-one
+  int minLayers, maxLayers;                             // Min. and max. nb. of layers around a bad element in patch
+  union {
+    struct {                                            // If adaptive strategy:
+      int maxPatchAdapt;                                // Max. nb. of adaptation iterations
+      int maxLayersAdaptFact;                           // Growth rate in number of layers around a bad element
+      double distanceAdaptFact;                         // Growth rate in max. distance from bad element
+    };
+    bool weakMerge;                                     // If disjoint strategy: weak or strong merging of patches
+  };
+  virtual ~MeshOptPatchDef() {}
+  virtual double elBadness(MElement *el,                // Determine "badness" of a given element (for patch creation)
+                           GEntity* gEnt) const = 0;
+  virtual double bndElBadness(MElement *el,             // Determine "badness" of a given boundary element (for patch creation)
+                              GEntity* gEnt) const = 0;
+  virtual double maxDistance(MElement *el) const = 0;   // Compute max. distance to a given bad element for elements in patch
+  virtual int inPatch(const SPoint3 &badBary,           // Determine whether a given element should be included in the patch around a...
+                      double limDist,                   // ... given bad element barycenter, with a limit distance if needed. Output: ...
+                      MElement *el,                     // ... -1 = excluded, 0 = included only up to minLayers, 1 = included up to maxLayers
+                      GEntity* gEnt) const = 0;
+protected:
+  bool testElInDist(const SPoint3 &P, double limDist,   // Test whether an element is within a certain distance from a point
+                    MElement *el) const;
+};
+
+
+struct MeshOptPass {                                    // Parameters controlling the optimization procedure in each pass
+  std::vector<ObjContrib*> contrib;                     // Indices of contributions to objective function
+  int maxOptIter;                                       // Max. number of opt. iterations each time the barrier is moved
+  int maxParamUpdates;                                  // Max. number of times the obj. func. parameters are updated (i.e. the barrier is moved)
+};
+
+
+struct MeshOptParameters {                              // Parameters controlling the strategy
+  int dim ;                                             // Which dimension to optimize
+  bool onlyVisible ;                                    // Apply optimization to visible entities ONLY
+  bool fixBndNodes;                                     // If points can move on boundaries
+  bool useGeomForPatches, useGeomForOpt;                // Whether to use info from CAD for creation of patches and for optimization
+  bool useBoundaries;                                   // Whether to use boundary elements
+  MeshOptPatchDef *patchDef;
+  std::vector<MeshOptPass> pass;
+  int displayInterv;                                    // Sampling rate in opt. iterations for display
+  int verbose;                                          // Level of information displayed and written to disk
+  int success;                                          // Success flag: -1 = fail, 0 = partial fail (target not reached), 1 = success
+  double CPU;                                           // Time for optimization
+};
+
+
+#endif
diff --git a/contrib/MeshOptimizer/MeshOptObjContrib.cpp b/contrib/MeshOptimizer/MeshOptObjContrib.cpp
new file mode 100644
index 0000000..48f1dc0
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjContrib.cpp
@@ -0,0 +1,19 @@
+// TODO: Copyright
+
+#include "MeshOptObjContrib.h"
+#include <algorithm>
+
+const double ObjContrib::BIGVAL = 1.e300;
+
+
+ObjContrib::ObjContrib(std::string mesName, std::string name) :
+ _parent(this), _min(BIGVAL), _max(-BIGVAL), _measureName(mesName), _name(name)
+{
+}
+
+
+void ObjContrib::updateResults()
+{
+  _parent->_min = std::min(_parent->_min, _min);
+  _parent->_max = std::max(_parent->_max, _max);
+}
diff --git a/contrib/MeshOptimizer/MeshOptObjContrib.h b/contrib/MeshOptimizer/MeshOptObjContrib.h
new file mode 100644
index 0000000..698c565
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjContrib.h
@@ -0,0 +1,41 @@
+// TODO: Copyright
+
+#ifndef _MESHOPTOBJCONTRIB_H_
+#define _MESHOPTOBJCONTRIB_H_
+
+#include <string>
+#include "ap.h"
+#include "MeshOptCommon.h"
+
+
+class Patch;
+
+
+class ObjContrib
+{
+public:
+  ObjContrib(std::string mesName, std::string name);
+  virtual ~ObjContrib() {}
+  virtual ObjContrib *copy() const = 0;
+  const double getMin() { return _min; }
+  const double getMax() { return _max; }
+  const std::string &getName() const { return _name; }
+  const std::string &getMeasureName() const { return _measureName; }
+  virtual void initialize(Patch *mesh) = 0;
+  virtual bool fail() = 0;
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj) = 0;
+  virtual void updateParameters() = 0;
+  virtual bool targetReached() = 0;
+  virtual bool stagnated() = 0;
+  virtual void updateMinMax() = 0;
+  void updateResults();
+
+protected:
+  static const double BIGVAL;
+  ObjContrib *_parent;
+  std::string _measureName, _name;
+  double _min, _max;
+};
+
+
+#endif /* _MESHOPTOBJCONTRIB_H_ */
diff --git a/contrib/MeshOptimizer/MeshOptObjContribFunc.cpp b/contrib/MeshOptimizer/MeshOptObjContribFunc.cpp
new file mode 100644
index 0000000..ca67b96
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjContribFunc.cpp
@@ -0,0 +1,101 @@
+// TODO: Copyright
+
+#include <cmath>
+#include "GmshMessage.h"
+#include "MeshOptObjContribFunc.h"
+
+
+const double ObjContribFuncSimpleTargetMax::STAGTHRESHOLD = 0.01;
+
+
+ObjContribFuncSimpleTargetMax::ObjContribFuncSimpleTargetMax() :
+    _target(0.), _init(0.)
+{
+}
+
+
+void ObjContribFuncSimpleTargetMax::setTarget(double target)
+{
+  _target = target;
+}
+
+
+void ObjContribFuncSimpleTargetMax::updateParameters(double vMin, double vMax)
+{
+  _init = vMax;
+}
+
+
+bool ObjContribFuncSimpleTargetMax::stagnated(double vMin, double vMax)
+{
+  return (fabs((vMax-_init)/_init) < STAGTHRESHOLD);
+}
+
+
+const double ObjContribFuncBarrier::MARGINCOEFF = 0.1;
+const double ObjContribFuncBarrier::STAGTHRESHOLD = 0.01;
+
+
+ObjContribFuncBarrier::ObjContribFuncBarrier() :
+    _target(0.), _barrier(0.), _init(0.), _opt(0.), _defaultMargin(0.)
+{
+}
+
+
+void ObjContribFuncBarrier::setTarget(double target, double opt, double defaultMargin)
+{
+  _target = target;
+  _opt = opt;
+  _defaultMargin = defaultMargin;
+  if (_defaultMargin == 0.) {
+    if (opt != 0.)
+      _defaultMargin = MARGINCOEFF*fabs(opt);
+    else if (target != 0.)
+      _defaultMargin = MARGINCOEFF*fabs(target);
+    else
+      Msg::Warning("Could not find value to define a scale for default barrier margin");
+  }
+}
+
+
+void ObjContribFuncBarrierMovMin::updateParameters(double vMin, double vMax)
+{
+  _init = vMin;
+  const double margin = (vMin == 0.) ? _defaultMargin : MARGINCOEFF*fabs(vMin);
+  _barrier = vMin - margin;
+}
+
+
+bool ObjContribFuncBarrierMovMin::stagnated(double vMin, double vMax)
+{
+  return (fabs((vMin-_init)/_init) < STAGTHRESHOLD);
+}
+
+
+void ObjContribFuncBarrierMovMax::updateParameters(double vMin, double vMax)
+{
+  _init = vMax;
+  const double margin = (vMax == 0.) ? _defaultMargin : MARGINCOEFF*fabs(vMax);
+  _barrier = vMax + margin;
+}
+
+
+bool ObjContribFuncBarrierMovMax::stagnated(double vMin, double vMax)
+{
+  return (fabs((vMax-_init)/_init) < STAGTHRESHOLD);
+}
+
+
+void ObjContribFuncBarrierFixMin::initialize(double vMin, double vMax)
+{
+  const double margin = (vMin == 0.) ? _defaultMargin : MARGINCOEFF*fabs(vMin);
+  _barrier = vMin - margin;
+}
+
+
+void ObjContribFuncBarrierFixMinMovMax::initialize(double vMin, double vMax)
+{
+  ObjContribFuncBarrierMovMax::initialize(vMin, vMax);
+  const double margin = (vMin == 0.) ? _defaultMargin : MARGINCOEFF*fabs(vMin);
+  _fixedMinBarrier = vMin - margin;
+}
diff --git a/contrib/MeshOptimizer/MeshOptObjContribFunc.h b/contrib/MeshOptimizer/MeshOptObjContribFunc.h
new file mode 100644
index 0000000..3f31118
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjContribFunc.h
@@ -0,0 +1,190 @@
+// TODO: Copyright
+
+#ifndef _MESHOPTOBJCONTRIBFUNC_H_
+#define _MESHOPTOBJCONTRIBFUNC_H_
+
+#include <string>
+
+
+class ObjContribFuncSimple
+{
+protected:
+  std::string getNamePrefix() { return ""; }
+  void initialize(double vMin, double vMax) {}
+  void updateParameters(double vMin, double vMax) {}
+  bool targetReached(double vMin, double vMax) { return true; }
+  bool stagnated(double vMin, double vMax) { return false; }
+  double compute(double v) { return v; }
+  double computeDiff(double v) { return 1.; }
+};
+
+
+class ObjContribFuncSimpleTargetMax : public ObjContribFuncSimple
+{
+public:
+  ObjContribFuncSimpleTargetMax();
+  void setTarget(double target);
+
+protected:
+  static const double STAGTHRESHOLD;                                              // Threshold to consider that measures stagnates
+  double _target, _init;
+  void updateParameters(double vMin, double vMax);
+  bool targetReached(double vMin, double vMax) { return (vMax <= _target); }
+  bool stagnated(double vMin, double vMax);
+};
+
+
+class ObjContribFuncBarrier
+{
+public:
+  ObjContribFuncBarrier();
+  void setTarget(double target, double opt=1.,
+                 double defaultMargin=0.);
+
+protected:
+  static const double MARGINCOEFF;                                                // Margin coefficient w.r.t. min. & max. to set barrier
+  static const double STAGTHRESHOLD;                                              // Threshold to consider that measures stagnates
+  double _opt;                                                                    // Optimal value of measure in barrier function
+  double _defaultMargin;                                                          // Default margin value to set barrier w.r.t. of min./max. of measure
+  double _barrier, _target;                                                       // Current barrier and target of min./max. of measure
+  double _init;                                                                   // Initial value of min./max. of measure
+  static double logBarrier(double v, double barrier, double opt);
+  static double diffLogBarrier(double v, double barrier, double opt);
+};
+
+
+class ObjContribFuncBarrierMovMin : public ObjContribFuncBarrier
+{
+protected:
+  std::string getNamePrefix() { return "BarrierMovMin"; }
+  void initialize(double vMin, double vMax) {}
+  void updateParameters(double vMin, double vMax);
+  bool targetReached(double vMin, double vMax) { return (vMin >= _target); }
+  bool stagnated(double vMin, double vMax);
+  double compute(double v);
+  double computeDiff(double v);
+};
+
+
+class ObjContribFuncBarrierMovMax : public ObjContribFuncBarrier
+{
+protected:
+  std::string getNamePrefix() { return "BarrierMovMax"; }
+  void initialize(double vMin, double vMax) {}
+  void updateParameters(double vMin, double vMax);
+  bool targetReached(double vMin, double vMax) { return (vMax <= _target); }
+  bool stagnated(double vMin, double vMax);
+  double compute(double v);
+  double computeDiff(double v);
+};
+
+
+class ObjContribFuncBarrierFixMin : public ObjContribFuncBarrier
+{
+protected:
+  std::string getNamePrefix() { return "BarrierFixMin"; }
+  void initialize(double vMin, double vMax);
+  void updateParameters(double vMin, double vMax) {}
+  bool targetReached(double vMin, double vMax) { return (vMin >= _barrier); }
+  bool stagnated(double vMin, double vMax) { return false; }
+  inline double compute(double v);
+  inline double computeDiff(double v);
+};
+
+
+class ObjContribFuncBarrierFixMinMovMax : public ObjContribFuncBarrierMovMax
+{
+protected:
+  std::string getNamePrefix() { return "BarrierFixMinMovMax"; }
+  void initialize(double vMin, double vMax);
+  inline double compute(double v);
+  inline double computeDiff(double v);
+
+protected:
+  double _fixedMinBarrier;
+};
+
+
+inline double ObjContribFuncBarrier::logBarrier(double v, double barrier, double opt)
+{
+  const double l = log((v-barrier) / (opt-barrier));
+  const double m = (v - opt);
+  return l*l + m*m;
+}
+
+
+inline double ObjContribFuncBarrier::diffLogBarrier(double v, double barrier, double opt)
+{
+  return 2. * ((v-opt) + log((v-barrier)/(opt-barrier))/(v-barrier));
+}
+
+
+inline double ObjContribFuncBarrierMovMin::compute(double v)
+{
+  if (v > _barrier) return logBarrier(v, _barrier, _opt);
+  else return 1e300;
+}
+
+
+inline double ObjContribFuncBarrierMovMin::computeDiff(double v)
+{
+  if (v > _barrier) return diffLogBarrier(v, _barrier, _opt);
+  else return -1e300;
+}
+
+
+inline double ObjContribFuncBarrierMovMax::compute(double v)
+{
+  if (v < _barrier) return logBarrier(v, _barrier, _opt);
+  else return 1e300;
+}
+
+
+inline double ObjContribFuncBarrierMovMax::computeDiff(double v)
+{
+  if (v < _barrier) return diffLogBarrier(v, _barrier, _opt);
+  else return 1e300;
+}
+
+
+inline double ObjContribFuncBarrierFixMin::compute(double v)
+{
+  if (v > _barrier) return logBarrier(v, _barrier, _opt);
+  else return 1e300;
+}
+
+
+inline double ObjContribFuncBarrierFixMin::computeDiff(double v)
+{
+  if (v > _barrier) return diffLogBarrier(v, _barrier, _opt);
+  else return -1e300;
+}
+
+
+inline double ObjContribFuncBarrierFixMinMovMax::compute(double v)
+{
+  double obj;
+  if (v < _barrier) obj = logBarrier(v, _barrier, _opt);
+  else return 1e300;
+  if (v > _fixedMinBarrier) {
+    obj += logBarrier(v, _fixedMinBarrier, _opt);
+    return obj;
+  }
+  else return 1e300;
+}
+
+
+inline double ObjContribFuncBarrierFixMinMovMax::computeDiff(double v)
+{
+  double dobj;
+  if (v < _barrier) dobj = diffLogBarrier(v, _barrier, _opt);
+  else return 1e300;
+  if (v > _fixedMinBarrier) {
+    dobj += diffLogBarrier(v, _fixedMinBarrier, _opt);
+    return dobj;
+  }
+  else return -1e300;
+}
+
+
+#endif /* _MESHOPTOBJCONTRIBFUNC_H_ */
diff --git a/contrib/MeshOptimizer/MeshOptObjContribScaledNodeDispSq.h b/contrib/MeshOptimizer/MeshOptObjContribScaledNodeDispSq.h
new file mode 100644
index 0000000..ae42119
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjContribScaledNodeDispSq.h
@@ -0,0 +1,95 @@
+// TODO: Copyright
+
+#ifndef _MESHOPTOBJCONTRIBSCALEDNODEDISPSQ_H_
+#define _MESHOPTOBJCONTRIBSCALEDNODEDISPSQ_H_
+
+#include "MeshOptPatch.h"
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribScaledNodeDispSq : public ObjContrib, public FuncType
+{
+public:
+  ObjContribScaledNodeDispSq(double weight, Patch::LengthScaling scaling);
+  virtual ~ObjContribScaledNodeDispSq() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return false; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+  Patch::LengthScaling _scaling;
+};
+
+
+template<class FuncType>
+ObjContribScaledNodeDispSq<FuncType>::ObjContribScaledNodeDispSq(double weight,
+                                                                 Patch::LengthScaling scaling) :
+  ObjContrib("ScaledNodeDispSq", FuncType::getNamePrefix()+"ScaledNodeDispSq"),
+  _mesh(0), _weight(weight), _scaling(scaling)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribScaledNodeDispSq<FuncType>::copy() const
+{
+  return new ObjContribScaledNodeDispSq<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribScaledNodeDispSq<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initScaledNodeDispSq(_scaling);
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribScaledNodeDispSq<FuncType>::addContrib(double &Obj,
+                                                      alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iFV = 0; iFV < _mesh->nFV(); iFV++) {
+    const double dSq = _mesh->scaledNodeDispSq(iFV);
+    Obj += _weight * FuncType::compute(dSq);
+    std::vector<double> gDSq(_mesh->nPCFV(iFV));
+    _mesh->gradScaledNodeDispSq(iFV, gDSq);
+    const double dfact = _weight * FuncType::computeDiff(dSq);
+    for (int iPC = 0; iPC < _mesh->nPCFV(iFV); iPC++)
+      gradObj[_mesh->indPCFV(iFV, iPC)] += dfact * gDSq[iPC];
+    _min = std::min(_min, dSq);
+    _max = std::max(_max, dSq);
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribScaledNodeDispSq<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iFV = 0; iFV < _mesh->nFV(); iFV++) {
+    const double dSq = _mesh->scaledNodeDispSq(iFV);
+    _min = std::min(_min, dSq);
+    _max = std::max(_max, dSq);
+  }
+}
+
+
+#endif /* _MESHOPTOBJCONTRIBSCALEDNODEDISPSQ_H_ */
diff --git a/contrib/MeshOptimizer/MeshOptObjectiveFunction.cpp b/contrib/MeshOptimizer/MeshOptObjectiveFunction.cpp
new file mode 100644
index 0000000..45e3399
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjectiveFunction.cpp
@@ -0,0 +1,108 @@
+// TODO: Copyright
+
+#include <sstream>
+#include "MeshOptObjContrib.h"
+#include "MeshOptObjectiveFunction.h"
+
+
+void ObjectiveFunction::initialize(Patch *mesh)
+{
+   for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+     (*it)->initialize(mesh);
+}
+
+
+std::string ObjectiveFunction::contribNames()
+{
+  std::vector<ObjContrib*>::iterator it=begin();
+  std::string str = (*it)->getName();
+  for (it++; it!=end(); it++) str += " " + (*it)->getName();
+  return str;
+}
+
+
+std::string ObjectiveFunction::minMaxStr()
+{
+  std::string str;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++) {
+    std::ostringstream oss;
+    oss << " -- Min. " + (*it)->getMeasureName() + " = " << (*it)->getMin();
+    oss << " -- Max. " + (*it)->getMeasureName() + " = " << (*it)->getMax();
+    str += oss.str();
+  }
+  return str;
+}
+
+
+void ObjectiveFunction::updateMinMax()
+{
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    (*it)->updateMinMax();
+}
+
+
+void ObjectiveFunction::updateParameters()
+{
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    (*it)->updateParameters();
+}
+
+
+void ObjectiveFunction::updateResults()
+{
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    (*it)->updateResults();
+}
+
+
+bool ObjectiveFunction::stagnated()
+{
+  bool stagnated = true;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    stagnated &= (*it)->stagnated();
+  return stagnated;
+}
+
+
+bool ObjectiveFunction::targetReached()
+{
+  bool targetReached = true;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    targetReached &= (*it)->targetReached();
+  return targetReached;
+}
+
+
+std::string ObjectiveFunction::failMeasures()
+{
+  std::string fail;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    if ((*it)->fail()) {
+      if (fail.empty()) fail = (*it)->getMeasureName();
+      else fail += " " + (*it)->getMeasureName();
+    }
+  return fail;
+}
+
+
+std::string ObjectiveFunction::targetsNotReached()
+{
+  std::string fail;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    if ((*it)->fail()) {
+      if (fail.empty()) fail = (*it)->getName();
+      else fail += " " + (*it)->getName();
+    }
+  return fail;
+}
+
+
+bool ObjectiveFunction::compute(double &obj, alglib::real_1d_array &gradObj)
+{
+  obj = 0.;
+  for (int i = 0; i < gradObj.length(); i++) gradObj[i] = 0.;
+  bool ok = true;
+  for (std::vector<ObjContrib*>::iterator it=begin(); it!=end(); it++)
+    ok &= (*it)->addContrib(obj, gradObj);
+  return ok;
+}
diff --git a/contrib/MeshOptimizer/MeshOptObjectiveFunction.h b/contrib/MeshOptimizer/MeshOptObjectiveFunction.h
new file mode 100644
index 0000000..29d87ec
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptObjectiveFunction.h
@@ -0,0 +1,31 @@
+// TODO: Copyright
+
+#ifndef _MESHOPTOBJECTIVEFUNCTION_H_
+#define _MESHOPTOBJECTIVEFUNCTION_H_
+
+#include <string>
+#include <vector>
+#include "ap.h"
+
+class ObjContrib;
+class Patch;
+
+
+class ObjectiveFunction : public std::vector<ObjContrib*>    // Contributions to objective function in each pass
+{
+public:
+  void initialize(Patch *mesh);
+  std::string contribNames();
+  std::string minMaxStr();
+  void updateMinMax();
+  void updateParameters();
+  void updateResults();
+  bool stagnated();
+  bool targetReached();
+  std::string failMeasures();
+  std::string targetsNotReached();
+  bool compute(double &obj, alglib::real_1d_array &gradObj);
+};
+
+
+#endif /* _MESHOPTOBJECTIVEFUNCTION_H_ */
diff --git a/contrib/MeshOptimizer/MeshOptPatch.cpp b/contrib/MeshOptimizer/MeshOptPatch.cpp
new file mode 100644
index 0000000..1aff778
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptPatch.cpp
@@ -0,0 +1,837 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#include "GmshMessage.h"
+#include "GRegion.h"
+#include "GFace.h"
+#include "MTriangle.h"
+#include "MQuadrangle.h"
+#include "MTetrahedron.h"
+#include "BasisFactory.h"
+#include "CondNumBasis.h"
+#include "OptHomIntegralBoundaryDist.h"
+//#include "OptHomCADDist.h"
+#include "CADDistances.h"
+#include "qualityMeasures.h"
+#include "MeshOptPatch.h"
+
+
+Patch::Patch(const std::map<MElement*, GEntity*> &element2entity,
+             const std::map<MElement*, GEntity*> &bndEl2Ent,
+             const std::set<MElement*> &els, std::set<MVertex*> &toFix,
+             const std::set<MElement*> &bndEls, bool fixBndNodes) :
+  _typeLengthScale(LS_NONE), _invLengthScaleSq(0.)
+{
+
+  _dim = (*els.begin())->getDim();
+
+  // Initialize elements, vertices, free vertices and element->vertices
+  // connectivity
+  const int nElements = els.size();
+  _nPC = 0;
+  _el.resize(nElements);
+  _el2FV.resize(nElements);
+  _el2V.resize(nElements);
+  _nNodEl.resize(nElements);
+  _indPCEl.resize(nElements);
+  if (!element2entity.empty()) _gEnt.resize(nElements);
+  int iEl = 0;
+  bool nonGeoMove = false;
+  for(std::set<MElement*>::const_iterator it = els.begin();
+      it != els.end(); ++it, ++iEl) {
+    _el[iEl] = *it;
+    if (!element2entity.empty()) {
+      std::map<MElement*,GEntity*>::const_iterator itEl2Ent = element2entity.find(*it);
+      _gEnt[iEl] = (itEl2Ent == element2entity.end()) ? 0 : itEl2Ent->second;
+    }
+    _nNodEl[iEl] = _el[iEl]->getNumVertices();
+    for (int iVEl = 0; iVEl < _nNodEl[iEl]; iVEl++) {
+      MVertex *vert = _el[iEl]->getVertex(iVEl);
+      GEntity *ge = vert->onWhat();
+      const int vDim = ge->dim();
+      const bool hasParam = ge->haveParametrization();
+      int iV = addVert(vert);
+      _el2V[iEl].push_back(iV);
+      if ((vDim > 0) && (toFix.find(vert) == toFix.end()) && (!fixBndNodes || vDim == _dim)) {   // Free vertex?
+        VertexCoord *coord;
+        if (vDim == 3) coord = new VertexCoordPhys3D();
+        else if (hasParam) coord = new VertexCoordParent(vert);
+        else {
+          if (vDim == 2) coord = new VertexCoordLocalSurf(vert);
+          else coord = new VertexCoordLocalLine(vert);
+          nonGeoMove = true;
+        }
+        int iFV = addFreeVert(vert, iV, vDim, coord, toFix);
+        _el2FV[iEl].push_back(iFV);
+        for (int i=_startPCFV[iFV]; i<_startPCFV[iFV]+vDim; i++) _indPCEl[iEl].push_back(i);
+      }
+      else _el2FV[iEl].push_back(-1);
+    }
+  }
+
+  if (nonGeoMove) Msg::Warning("Some vertices will be moved along local lines "
+                               "or planes, they may not remain on the exact geometry");
+
+  // Initialize boundary elements and related connectivity if required
+  if (!bndEls.empty()) {
+    int nBndElts = bndEls.size();
+    _bndEl.resize(nBndElts);
+    _bndEl2Ent.resize(nBndElts);
+    _bndEl2V.resize(nBndElts);
+    _bndEl2FV.resize(nBndElts);
+    int iBndEl = 0;
+    bool unknownVert = false;
+    for(std::set<MElement*>::iterator it = bndEls.begin();
+        it != bndEls.end(); ++it, ++iBndEl) {
+      MElement* bndEl = *it;
+      _bndEl[iBndEl] = bndEl;
+      std::map<MElement*,GEntity*>::const_iterator itBndEl2Ent = bndEl2Ent.find(bndEl);
+      _bndEl2Ent[iBndEl] = (itBndEl2Ent == bndEl2Ent.end()) ? 0 : itBndEl2Ent->second;
+      int nBndElVerts = bndEl->getNumVertices();
+      _bndEl2V[iBndEl].resize(nBndElVerts);
+      _bndEl2FV[iBndEl].resize(nBndElVerts);
+      for (int iVBndEl=0; iVBndEl<nBndElVerts; iVBndEl++) {
+        MVertex *vert = bndEl->getVertex(iVBndEl);
+        std::vector<MVertex*>::iterator itV = std::find(_vert.begin(), _vert.end(), vert);
+        if (itV == _vert.end()) unknownVert = true;
+        else _bndEl2V[iBndEl][iVBndEl] = std::distance(_vert.begin(), itV);
+        std::vector<MVertex*>::iterator itFV = std::find(_freeVert.begin(),
+                                                         _freeVert.end(), vert);
+        if (itFV == _freeVert.end()) _bndEl2FV[iBndEl][iVBndEl] = -1;
+        else _bndEl2FV[iBndEl][iVBndEl] = std::distance(_freeVert.begin(), itFV);
+      }
+    }
+    if (unknownVert) Msg::Error("Unknown vertices in boundary element "
+                                "at patch initialization");
+  }
+
+  // Initial coordinates
+  _ixyz.resize(nVert());
+  for (int iV = 0; iV < nVert(); iV++) _ixyz[iV] = _vert[iV]->point();
+  _iuvw.resize(nFV());
+  for (int iFV = 0; iFV < nFV(); iFV++) _iuvw[iFV] = _coordFV[iFV]->getUvw(_freeVert[iFV]);
+
+  // Set current coordinates
+  _xyz = _ixyz;
+  _uvw = _iuvw;
+}
+
+
+int Patch::addVert(MVertex* vert)
+{
+  std::vector<MVertex*>::iterator itVert = find(_vert.begin(),_vert.end(),vert);
+  if (itVert == _vert.end()) {
+    _vert.push_back(vert);
+    return _vert.size()-1;
+  }
+  else return std::distance(_vert.begin(),itVert);
+
+}
+
+
+int Patch::addFreeVert(MVertex* vert, const int iV, const int nPCV,
+                      VertexCoord *param, std::set<MVertex*> &toFix)
+{
+  std::vector<MVertex*>::iterator itVert = find(_freeVert.begin(),
+                                                _freeVert.end(),vert);
+  if (itVert == _freeVert.end()) {
+    const int iStart = (_startPCFV.size() == 0)? 0 : _startPCFV.back()+_nPCFV.back();
+    const bool forcedV = (vert->onWhat()->dim() < 2) || (toFix.find(vert) != toFix.end());
+    _freeVert.push_back(vert);
+    _coordFV.push_back(param);
+    _fv2V.push_back(iV);
+    _startPCFV.push_back(iStart);
+    _nPCFV.push_back(nPCV);
+    _nPC += nPCV;
+    return _freeVert.size()-1;
+  }
+  else return std::distance(_freeVert.begin(),itVert);
+
+}
+
+
+void Patch::getUvw(double *it)
+{
+  for (int iFV = 0; iFV < nFV(); iFV++) {
+    SPoint3 &uvwV = _uvw[iFV];
+    *it = uvwV[0]; it++;
+    if (_nPCFV[iFV] >= 2) { *it = uvwV[1]; it++; }
+    if (_nPCFV[iFV] == 3) { *it = uvwV[2]; it++; }
+  }
+
+}
+
+
+void Patch::updateMesh(const double *it)
+{
+  for (int iFV = 0; iFV < nFV(); iFV++) {
+    int iV = _fv2V[iFV];
+    SPoint3 &uvwV = _uvw[iFV];
+    uvwV[0] = *it; it++;
+    if (_nPCFV[iFV] >= 2) { uvwV[1] = *it; it++; }
+    if (_nPCFV[iFV] == 3) { uvwV[2] = *it; it++; }
+    _xyz[iV] = _coordFV[iFV]->uvw2Xyz(uvwV);
+  }
+
+}
+
+
+void Patch::updateGEntityPositions()
+{
+  for (int iV = 0; iV < nVert(); iV++)
+    _vert[iV]->setXYZ(_xyz[iV].x(),_xyz[iV].y(),_xyz[iV].z());
+  for (int iFV = 0; iFV < nFV(); iFV++)
+    _coordFV[iFV]->exportVertexCoord(_uvw[iFV]);
+}
+
+
+void Patch::pcScale(int iFV, std::vector<double> &scale)
+{
+  // Calc. derivative of x, y & z w.r.t. parametric coordinates
+  const SPoint3 dX(1.,0.,0.), dY(0.,1.,0.), dZ(0.,0.,1.);
+  SPoint3 gX, gY, gZ;
+  _coordFV[iFV]->gXyz2gUvw(_uvw[iFV],dX,gX);
+  _coordFV[iFV]->gXyz2gUvw(_uvw[iFV],dY,gY);
+  _coordFV[iFV]->gXyz2gUvw(_uvw[iFV],dZ,gZ);
+
+  // Scale = inverse norm. of vector (dx/du, dy/du, dz/du)
+  scale[0] = 1./sqrt(gX[0]*gX[0]+gY[0]*gY[0]+gZ[0]*gZ[0]);
+  if (_nPCFV[iFV] >= 2) scale[1] = 1./sqrt(gX[1]*gX[1]+gY[1]*gY[1]+gZ[1]*gZ[1]);
+  if (_nPCFV[iFV] == 3) scale[2] = 1./sqrt(gX[2]*gX[2]+gY[2]*gY[2]+gZ[2]*gZ[2]);
+}
+
+
+void Patch::writeMSH(const char *filename)
+{
+  FILE *f = fopen(filename, "w");
+
+  fprintf(f, "$MeshFormat\n");
+  fprintf(f, "2.2 0 8\n");
+  fprintf(f, "$EndMeshFormat\n");
+
+  fprintf(f, "$Nodes\n");
+  fprintf(f, "%d\n", nVert());
+  for (int i = 0; i < nVert(); i++)
+    fprintf(f, "%d %22.15E %22.15E %22.15E\n", i + 1, _xyz[i].x(), _xyz[i].y(), _xyz[i].z());
+  fprintf(f, "$EndNodes\n");
+
+  fprintf(f, "$Elements\n");
+  fprintf(f, "%d\n", nEl());
+  for (int iEl = 0; iEl < nEl(); iEl++) {
+    fprintf(f, "%d %d 2 0 0", _el[iEl]->getNum(), _el[iEl]->getTypeForMSH());
+    for (size_t iVEl = 0; iVEl < _el2V[iEl].size(); iVEl++)
+      fprintf(f, " %d", _el2V[iEl][iVEl] + 1);
+    fprintf(f, "\n");
+  }
+  fprintf(f, "$EndElements\n");
+
+  fclose(f);
+}
+
+
+void Patch::initScaledNodeDispSq(LengthScaling scaling)
+{
+  if ((_invLengthScaleSq == 0.) || _typeLengthScale != scaling) {
+    _typeLengthScale = scaling;
+    double maxDSq = 0.;
+    switch(scaling) {
+      case LS_MAXNODEDIST : {
+        for (int iEl = 0; iEl < nEl(); iEl++) {
+          const double d = _el[iEl]->maxDistToStraight(), dd = d*d;
+          if (dd > maxDSq) maxDSq = dd;
+        }
+        break;
+      }
+      case LS_MAXOUTERRADIUS : {
+        for (int iEl = 0; iEl < nEl(); iEl++) {
+          const double d = _el[iEl]->getOuterRadius(), dd = d*d;
+          if (dd > maxDSq) maxDSq = dd;
+        }
+        break;
+      }
+      case LS_MINEDGELENGTH : {
+        for (int iEl = 0; iEl < nEl(); iEl++) {
+          const double d = _el[iEl]->minEdge(), dd = d*d;
+          if (dd > maxDSq) maxDSq = dd;
+        }
+        break;
+      }
+    }
+    _invLengthScaleSq = 1./maxDSq;
+  }
+}
+
+
+double Patch::scaledNodeDispSq(int iFV)
+{
+  const int &iV = _fv2V[iFV];
+  const SPoint3 d = _xyz[iV]-_ixyz[iV];
+  return (d[0]*d[0]+d[1]*d[1]+d[2]*d[2])*_invLengthScaleSq;
+}
+
+
+void Patch::gradScaledNodeDispSq(int iFV, std::vector<double> &gDSq)
+{
+  const int &iV = _fv2V[iFV];
+  const SPoint3 gXyz = (_xyz[iV]-_ixyz[iV])*2.*_invLengthScaleSq;
+  SPoint3 gUvw;
+  gXyz2gUvw(iFV, gXyz, gUvw);
+
+  gDSq[0] = gUvw[0];
+  if (_nPCFV[iFV] >= 2) gDSq[1] = gUvw[1];
+  if (_nPCFV[iFV] == 3) gDSq[2] = gUvw[2];
+}
+
+
+void Patch::initScaledJac()
+{
+  // Initialize _nBezEl
+  if (_nBezEl.empty()) {
+    _nBezEl.resize(nEl());
+    for (int iEl=0; iEl<nEl(); iEl++)
+     _nBezEl[iEl] = _el[iEl]->getJacobianFuncSpace()->getNumJacNodes();
+  }
+
+  // Set normals to 2D elements (with magnitude of inverse Jacobian) or initial
+  // Jacobians of 3D elements
+  if ((_dim == 2) && _JacNormEl.empty()) {
+    _JacNormEl.resize(nEl());
+    for (int iEl = 0; iEl < nEl(); iEl++)
+      calcNormalEl2D(iEl, NS_INVNORM, _JacNormEl[iEl], false);
+  }
+  else if (_invStraightJac.empty()) {
+    _invStraightJac.resize(nEl(), 1.);
+    double dumJac[3][3];
+    for (int iEl = 0; iEl < nEl(); iEl++)
+      _invStraightJac[iEl] = 1. / fabs(_el[iEl]->getPrimaryJacobian(0.,0.,0.,dumJac));
+  }
+}
+
+
+void Patch::initMetricMin()
+{
+  // Initialize _nBezEl
+  if (_nBezEl.empty()) {
+    _nBezEl.resize(nEl());
+    for (int iEl=0; iEl<nEl(); iEl++)
+     _nBezEl[iEl] = _el[iEl]->getJacobianFuncSpace()->getNumJacNodes();
+  }
+}
+
+
+void Patch::initScaledCADDistSq(double refCADDist)
+{
+  _invRefCADDistSq = 1./(refCADDist*refCADDist);
+}
+
+
+void Patch::calcNormalEl2D(int iEl, NormalScaling scaling,
+                           fullMatrix<double> &elNorm, bool ideal)
+{
+  const JacobianBasis *jac = _el[iEl]->getJacobianFuncSpace();
+
+  fullMatrix<double> primNodesXYZ(jac->getNumPrimMapNodes(),3);
+  SVector3 geoNorm(0.,0.,0.);
+  GEntity *ge = (_gEnt.empty()) ? 0 : _gEnt[iEl];
+  const bool hasGeoNorm = ge && (ge->dim() == 2) && ge->haveParametrization();
+  for (int i=0; i<jac->getNumPrimMapNodes(); i++) {
+    const int &iV = _el2V[iEl][i];
+    primNodesXYZ(i, 0) = _xyz[iV].x();
+    primNodesXYZ(i, 1) = _xyz[iV].y();
+    primNodesXYZ(i, 2) = _xyz[iV].z();
+    if (hasGeoNorm && (_vert[iV]->onWhat() == ge)) {
+      double u, v;
+      _vert[iV]->getParameter(0,u);
+      _vert[iV]->getParameter(1,v);
+      geoNorm += ((GFace*)ge)->normal(SPoint2(u,v));
+    }
+  }
+  if (hasGeoNorm && (geoNorm.normSq() == 0.)) {
+    SPoint2 param = ((GFace*)ge)->parFromPoint(_el[iEl]->barycenter(true),false);
+    geoNorm = ((GFace*)ge)->normal(param);
+  }
+
+  elNorm.resize(1, 3);
+  const double norm = jac->getPrimNormal2D(primNodesXYZ, elNorm, ideal);
+  double factor;
+  switch (scaling) {
+    case NS_UNIT:
+      factor = 1.;
+      break;
+    case NS_INVNORM:
+      factor = 1./norm;
+      break;
+    case NS_SQRTNORM:
+      factor = sqrt(norm);
+      break;
+  }
+  if (hasGeoNorm) {
+    const double scal = geoNorm(0)*elNorm(0,0)+geoNorm(1)*elNorm(0,1)+geoNorm(2)*elNorm(0,2);
+    if (scal < 0.) factor = -factor;
+  }
+  elNorm.scale(factor);   // Re-scaling normal here is faster than an extra scaling operation on the Jacobian
+}
+
+
+void Patch::scaledJacAndGradients(int iEl, std::vector<double> &sJ,
+                                  std::vector<double> &gSJ)
+{
+  const JacobianBasis *jacBasis = _el[iEl]->getJacobianFuncSpace();
+  const int &numJacNodes = _nBezEl[iEl];
+  const int &numMapNodes = _nNodEl[iEl];
+  fullMatrix<double> JDJ(numJacNodes,3*numMapNodes+1), BDB(numJacNodes,3*numMapNodes+1);
+
+  // Coordinates of nodes
+  fullMatrix<double> nodesXYZ(numMapNodes,3), normals(_dim,3);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iVi = _el2V[iEl][i];
+    nodesXYZ(i,0) = _xyz[iVi].x();
+    nodesXYZ(i,1) = _xyz[iVi].y();
+    nodesXYZ(i,2) = _xyz[iVi].z();
+  }
+
+  // Calculate Jacobian and gradients, scale if 3D (already scaled by
+  // regularization normals in 2D)
+  jacBasis->getSignedJacAndGradients(nodesXYZ,_JacNormEl[iEl],JDJ);
+  if (_dim == 3) JDJ.scale(_invStraightJac[iEl]);
+
+  // Transform Jacobian and gradients from Lagrangian to Bezier basis
+  jacBasis->lag2Bez(JDJ,BDB);
+
+  // Scaled jacobian
+  for (int l = 0; l < numJacNodes; l++) sJ [l] = BDB (l,3*numMapNodes);
+
+  // Gradients of the scaled jacobian
+  int iPC = 0;
+  std::vector<SPoint3> gXyzV(numJacNodes);
+  std::vector<SPoint3> gUvwV(numJacNodes);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iFVi = _el2FV[iEl][i];
+    if (iFVi >= 0) {
+      for (int l = 0; l < numJacNodes; l++)
+        gXyzV [l] = SPoint3(BDB(l,i+0*numMapNodes), BDB(l,i+1*numMapNodes),
+                            BDB(l,i+2*numMapNodes));
+      _coordFV[iFVi]->gXyz2gUvw(_uvw[iFVi],gXyzV,gUvwV);
+      for (int l = 0; l < numJacNodes; l++) {
+        gSJ[indGSJ(iEl,l,iPC)] = gUvwV[l][0];
+        if (_nPCFV[iFVi] >= 2) gSJ[indGSJ(iEl,l,iPC+1)] = gUvwV[l][1];
+        if (_nPCFV[iFVi] == 3) gSJ[indGSJ(iEl,l,iPC+2)] = gUvwV[l][2];
+      }
+      iPC += _nPCFV[iFVi];
+    }
+  }
+}
+
+
+void Patch::metricMinAndGradients(int iEl, std::vector<double> &lambda,
+                                  std::vector<double> &gradLambda)
+{
+  const JacobianBasis *jacBasis = _el[iEl]->getJacobianFuncSpace();
+  const int &numJacNodes = jacBasis->getNumJacNodes();
+  const int &numMapNodes = jacBasis->getNumMapNodes();
+  const int &numPrimMapNodes = jacBasis->getNumPrimMapNodes();
+  fullVector<double> lambdaJ(numJacNodes), lambdaB(numJacNodes);
+  fullMatrix<double> gradLambdaJ(numJacNodes, 2 * numMapNodes);
+  fullMatrix<double> gradLambdaB(numJacNodes, 2 * numMapNodes);
+
+  // Coordinates of nodes
+  fullMatrix<double> nodesXYZ(numMapNodes,3), nodesXYZStraight(numPrimMapNodes,3);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iVi = _el2V[iEl][i];
+    nodesXYZ(i,0) = _xyz[iVi].x();
+    nodesXYZ(i,1) = _xyz[iVi].y();
+    nodesXYZ(i,2) = _xyz[iVi].z();
+    if (i < numPrimMapNodes) {
+      nodesXYZStraight(i,0) = _ixyz[iVi].x();
+      nodesXYZStraight(i,1) = _ixyz[iVi].y();
+      nodesXYZStraight(i,2) = _ixyz[iVi].z();
+    }
+  }
+
+  jacBasis->getMetricMinAndGradients(nodesXYZ,nodesXYZStraight,lambdaJ,gradLambdaJ);
+
+  //l2b.mult(lambdaJ, lambdaB);
+  //l2b.mult(gradLambdaJ, gradLambdaB);
+  lambdaB = lambdaJ;
+  gradLambdaB = gradLambdaJ;
+
+  int iPC = 0;
+  std::vector<SPoint3> gXyzV(numJacNodes);
+  std::vector<SPoint3> gUvwV(numJacNodes);
+  for (int l = 0; l < numJacNodes; l++) {
+    lambda[l] = lambdaB(l);
+  }
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iFVi = _el2FV[iEl][i];
+    if (iFVi >= 0) {
+      for (int l = 0; l < numJacNodes; l++) {
+        gXyzV [l] = SPoint3(gradLambdaB(l,i+0*numMapNodes),
+                            gradLambdaB(l,i+1*numMapNodes),/*BDB(l,i+2*nbNod)*/ 0.);
+      }
+      _coordFV[iFVi]->gXyz2gUvw(_uvw[iFVi],gXyzV,gUvwV);
+      for (int l = 0; l < numJacNodes; l++) {
+        gradLambda[indGSJ(iEl,l,iPC)] = gUvwV[l][0];
+        if (_nPCFV[iFVi] >= 2) gradLambda[indGSJ(iEl,l,iPC+1)] = gUvwV[l][1];
+        if (_nPCFV[iFVi] == 3) gradLambda[indGSJ(iEl,l,iPC+2)] = gUvwV[l][2];
+      }
+      iPC += _nPCFV[iFVi];
+    }
+  }
+}
+
+
+bool Patch::bndDistAndGradients(int iEl, double &f, std::vector<double> &gradF, double eps)
+{
+  MElement *element = _el[iEl];
+  f = 0.;
+  // dommage ;-)
+  if (element->getDim() != 2)
+    return false;
+
+  int currentId = 0;
+  std::vector<int> vertex2param(element->getNumVertices());
+  for (size_t i = 0; i < element->getNumVertices(); ++i) {
+    if (_el2FV[iEl][i] >= 0) {
+      vertex2param[i] = currentId;
+      currentId += _nPCFV[_el2FV[iEl][i]];
+    }
+    else
+      vertex2param[i] = -1;
+  }
+  gradF.clear();
+  gradF.resize(currentId, 0.);
+
+  const nodalBasis &elbasis = *element->getFunctionSpace();
+  bool edgeFound = false;
+  for (int iEdge = 0; iEdge < element->getNumEdges(); ++iEdge) {
+    int clId = elbasis.getClosureId(iEdge, 1);
+    const std::vector<int> &closure = elbasis.closures[clId];
+    std::vector<MVertex *> vertices;
+    GEdge *edge = NULL;
+    for (size_t i = 0; i < closure.size(); ++i) {
+      MVertex *v = element->getVertex(closure[i]);
+      vertices.push_back(v);
+      // only valid in 2D
+      if ((int)i >= 2 && v->onWhat() && v->onWhat()->dim() == 1) {
+        edge = v->onWhat()->cast2Edge();
+      }
+    }
+    if (edge) {
+      edgeFound = true;
+      std::vector<double> localgrad;
+      std::vector<SPoint3> nodes(closure.size());
+      std::vector<double> params(closure.size());
+      std::vector<bool> onedge(closure.size());
+      for (size_t i = 0; i < closure.size(); ++i) {
+        nodes[i] = _xyz[_el2V[iEl][closure[i]]];
+        onedge[i] = element->getVertex(closure[i])->onWhat() == edge && _el2FV[iEl][closure[i]] >= 0;
+        if (onedge[i]) {
+          params[i] = _uvw[_el2FV[iEl][closure[i]]].x();
+        }else
+          reparamMeshVertexOnEdge(element->getVertex(closure[i]), edge, params[i]);
+      }
+      f += computeBndDistAndGradient(edge, params, vertices,
+            *BasisFactory::getNodalBasis(elbasis.getClosureType(clId)), nodes, onedge, localgrad, eps);
+      for (size_t i = 0; i < closure.size(); ++i)
+        if (onedge[i]) gradF[vertex2param[closure[i]]] += localgrad[i];
+    }
+  }
+  return edgeFound;
+}
+
+
+void Patch::scaledCADDistSqAndGradients(int iBndEl, double &scaledDist,
+                                        std::vector<double> &gradScaledDist)
+{
+  const std::vector<int> &iV = _bndEl2V[iBndEl], &iFV = _bndEl2FV[iBndEl];
+  const int nV = iV.size();
+  const GradientBasis *gb = BasisFactory::getGradientBasis(FuncSpaceData(_bndEl[iBndEl]));
+
+  // Coordinates of nodes
+  fullMatrix<double> nodesXYZ(nV, 3);
+  for (int i = 0; i < nV; i++) {
+    const int &iVi = iV[i];
+    nodesXYZ(i,0) = _xyz[iVi].x();
+    nodesXYZ(i,1) = _xyz[iVi].y();
+    nodesXYZ(i,2) = _xyz[iVi].z();
+  }
+
+  // Compute distance and gradients (CAUTION: returns gradients w.r.t. vertices, not free vertices)
+  if (_dim == 2) {                                                                        // 2D
+    const GEdge *ge = _bndEl2Ent[iBndEl]->cast2Edge();
+    const Range<double> parBounds = ge->parBounds(0);
+    const double eps = 1.e-6 * (parBounds.high()-parBounds.low());
+    std::vector<SVector3> tanCAD(nV);
+    for (int i=0; i<nV; i++) {
+      const int &iVi = iV[i], &iFVi = iFV[i];
+      MVertex* &vert = _vert[iVi];
+      double tCAD;
+      if (iFVi >= 0)                                                                       // If free vertex, ...
+        tCAD = _uvw[iFVi].x();                                                             // ... get stored param. coord. (can be only line).
+      else {                                                                               // Otherwise, get param. coord. from CAD.
+        if(ge->getBeginVertex() && ge->getBeginVertex()->mesh_vertices[0] == vert)
+          tCAD = parBounds.low();
+        else if(ge->getEndVertex() && ge->getEndVertex()->mesh_vertices[0] == vert)
+          tCAD = parBounds.high();
+        else
+          tCAD = ge->parFromPoint(_xyz[iVi]);
+      }
+      tanCAD[i] = ge->firstDer(tCAD);                                                     // Compute tangent at vertex
+      tanCAD[i].normalize();                                                              // Normalize tangent
+    }
+    scaledDist = _invRefCADDistSq * taylorDistanceSq1D(gb, nodesXYZ, tanCAD);
+    for (int i=0; i<nV; i++) {
+      const int &iFVi = iFV[i];
+      if (iFVi < 0) continue;                                                             // Skip if not free vertex
+      const double xS = nodesXYZ(i, 0), yS = nodesXYZ(i, 1), zS = nodesXYZ(i, 2);         // Save coord. of perturbed node for FD
+      const SVector3 tanCADS = tanCAD[i];                                                 // Save tangent to CAD at perturbed node
+      const double tCAD = _uvw[iFVi].x() + eps;                                           // New param. coord. of perturbed node
+      GPoint gp = ge->point(tCAD);                                                        // New coord. of perturbed node
+      nodesXYZ(i, 0) = gp.x(); nodesXYZ(i, 1) = gp.y(); nodesXYZ(i, 2) = gp.z();
+      tanCAD[i] = ge->firstDer(tCAD);                                                     // New tangent to CAD at perturbed node
+      tanCAD[i].normalize();                                                              // Normalize new tangent
+      const double sDistDiff = _invRefCADDistSq *
+                               taylorDistanceSq1D(gb, nodesXYZ, tanCAD);                  // Compute distance with perturbed node
+      gradScaledDist[i] = (sDistDiff-scaledDist) / eps;                                   // Compute gradient
+      nodesXYZ(i, 0) = xS; nodesXYZ(i, 1) = yS; nodesXYZ(i, 2) = zS;                      // Restore coord. of perturbed node
+      tanCAD[i] = tanCADS;                                                                // Restore tan. to CAD at perturbed node
+    }
+  }
+  else {                                                                                  // 3D
+    const GFace *gf = _bndEl2Ent[iBndEl]->cast2Face();
+    const Range<double> parBounds0 = gf->parBounds(0), parBounds1 = gf->parBounds(1);
+    const double eps0 = 1.e-6 * (parBounds0.high()-parBounds0.low());
+    const double eps1 = 1.e-6 * (parBounds1.high()-parBounds1.low());
+    std::vector<SVector3> normCAD(nV);
+    for (int i=0; i<nV; i++) {
+      const int &iVi = iV[i], &iFVi = iFV[i];
+      MVertex* &vert = _vert[iVi];
+      SPoint2 pCAD;
+      if (iFVi >= 0) {                                                                      // If free vertex...
+        if (vert->onWhat() == gf)                                                           // If on surface, ...
+          pCAD = SPoint2(_uvw[iFVi].x(), _uvw[iFVi].y());                                   // ... get stored param. coord.
+        else {                                                                              // Otherwise, reparametrize on surface
+          const GEdge *ge = vert->onWhat()->cast2Edge();
+          pCAD = ge->reparamOnFace(gf, _uvw[iFVi].x(), 1);
+        }
+      }
+      else
+        reparamMeshVertexOnFace(vert, gf, pCAD);                                          // If not free vertex, reparametrize on surface
+      normCAD[i] = gf->normal(pCAD);                                                      // Compute normal at vertex
+      normCAD[i].normalize();                                                             // Normalize normal
+    }
+    scaledDist = _invRefCADDistSq * taylorDistanceSq2D(gb, nodesXYZ, normCAD);
+//    std::cout << "DBGTT: bnd el. " << _bndEl[iBndEl]->getNum() << ": scaledDist = " << scaledDist << "\n";
+    for (int i=0; i<nV; i++) {
+      const int &iVi = iV[i], &iFVi = iFV[i];
+      if (iFVi < 0) continue;                                                             // Skip if not free vertex
+      const double xS = nodesXYZ(i, 0), yS = nodesXYZ(i, 1), zS = nodesXYZ(i, 2);         // Save coord. of perturbed node for FD
+      const SVector3 normCADS = normCAD[i];                                               // Save normal to CAD at perturbed node
+      if (_nPCFV[iFVi] == 2) {                                                            // Vertex classified on surface, 2D gradient
+        const SPoint2 pCAD0 = SPoint2(_uvw[iFVi].x()+eps0, _uvw[iFVi].y());               // New param. coord. of perturbed node in 1st dir.
+        GPoint gp0 = gf->point(pCAD0);                                                    // New coord. of perturbed node in 1st dir.
+        nodesXYZ(i, 0) = gp0.x(); nodesXYZ(i, 1) = gp0.y(); nodesXYZ(i, 2) = gp0.z();
+        normCAD[i] = gf->normal(pCAD0);                                                   // New normal to CAD at perturbed node in 1st dir.
+        normCAD[i].normalize();                                                           // Normalize new normal
+        const double sDistDiff0 = _invRefCADDistSq *
+                                  taylorDistanceSq2D(gb, nodesXYZ, normCAD);              // Compute distance with perturbed node in 1st dir.
+        gradScaledDist[2*i] = (sDistDiff0-scaledDist) / eps0;                             // Compute gradient in 1st dir.
+        const SPoint2 pCAD1 = SPoint2(_uvw[iFVi].x(), _uvw[iFVi].y()+eps1);               // New param. coord. of perturbed node in 2nd dir.
+        GPoint gp1 = gf->point(pCAD1);                                                    // New coord. of perturbed node in 2nd dir.
+        nodesXYZ(i, 0) = gp1.x(); nodesXYZ(i, 1) = gp1.y(); nodesXYZ(i, 2) = gp1.z();
+        normCAD[i] = gf->normal(pCAD1);                                                   // New normal to CAD at perturbed node in 2nd dir.
+        normCAD[i].normalize();                                                           // Normalize new normal
+        double sDistDiff1 = _invRefCADDistSq *
+                            taylorDistanceSq2D(gb, nodesXYZ, normCAD);                    // Compute distance with perturbed node in 2nd dir.
+        gradScaledDist[2*i+1] = (sDistDiff1-scaledDist) / eps1;                           // Compute gradient in 2nd dir.
+      }
+      else if (_nPCFV[iFVi] == 1) {                                                       // Vertex classified on edge, 1D gradient
+        MVertex* &vert = _vert[iVi];
+        const GEdge *ge = vert->onWhat()->cast2Edge();
+        const Range<double> parBounds = ge->parBounds(0);
+        const double eps = 1.e-6 * (parBounds.high()-parBounds.low());
+        const double tCAD = _uvw[iFVi].x() + eps;                                         // New param. coord. of perturbed node
+        GPoint gp = ge->point(tCAD);                                                      // New coord. of perturbed node
+        nodesXYZ(i, 0) = gp.x(); nodesXYZ(i, 1) = gp.y(); nodesXYZ(i, 2) = gp.z();
+        SPoint2 pCAD = gf->parFromPoint(SPoint3(gp.x(), gp.y(), gp.z()), true);           // Get param. coord. of perturbed node in face from CAD
+        normCAD[i] = gf->normal(pCAD);                                                    // New normal to CAD at perturbed node
+        normCAD[i].normalize();                                                           // Normalize new normal
+        const double sDistDiff = _invRefCADDistSq *
+                                 taylorDistanceSq2D(gb, nodesXYZ, normCAD);               // Compute distance with perturbed node
+        gradScaledDist[2*i] = (sDistDiff-scaledDist) / eps;                               // Compute gradient
+      }
+      else std::cout << "DBGTT: Inconsistent _nPCFV(iFVi), vert. " << _vert[iVi]->getNum() << "\n";
+      nodesXYZ(i, 0) = xS; nodesXYZ(i, 1) = yS; nodesXYZ(i, 2) = zS;                      // Restore coord. of perturbed node
+      normCAD[i] = normCADS;                                                              // Restore tan. to CAD at perturbed node
+    }
+  }
+}
+
+
+void Patch::initIdealJac()
+{
+  // Initialize _nBezEl
+  if (_nIJacEl.empty()) {
+    _nIJacEl.resize(nEl());
+    for (int iEl=0; iEl<nEl(); iEl++)
+      _nIJacEl[iEl] = _el[iEl]->getJacobianFuncSpace()->getNumJacNodes();
+  }
+
+  // Set normals to 2D elements (with magnitude of inverse Jacobian) or initial
+  // Jacobians of 3D elements
+  if ((_dim == 2) && _IJacNormEl.empty()) {
+    _IJacNormEl.resize(nEl());
+    for (int iEl = 0; iEl < nEl(); iEl++)
+      calcNormalEl2D(iEl, NS_INVNORM, _IJacNormEl[iEl], true);
+  }
+  else if (_invStraightJac.empty()) {
+    _invIJac.resize(nEl(), 1.);
+    for (int iEl = 0; iEl < nEl(); iEl++) {
+      int nEd = _el[iEl]->getNumEdges();
+      double sumEdLength = 0.;
+      for(int iEd = 0; iEd < nEd; iEd++)
+        sumEdLength += _el[iEl]->getEdge(iEd).length();
+      const double invMeanEdLength = double(nEd)/sumEdLength;
+      _invIJac[iEl] = invMeanEdLength*invMeanEdLength*invMeanEdLength;
+    }
+  }
+}
+
+
+void Patch::idealJacAndGradients(int iEl, std::vector<double> &iJ, std::vector<double> &gIJ)
+{
+  const JacobianBasis *jacBasis = _el[iEl]->getJacobianFuncSpace();
+  const int &numJacNodes = _nIJacEl[iEl];
+  const int &numMapNodes = _nNodEl[iEl];
+  fullMatrix<double> JDJ(numJacNodes,3*numMapNodes+1), BDB(numJacNodes,3*numMapNodes+1);
+
+  // Coordinates of nodes
+  fullMatrix<double> nodesXYZ(numMapNodes,3), normals(_dim,3);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iVi = _el2V[iEl][i];
+    nodesXYZ(i,0) = _xyz[iVi].x();
+    nodesXYZ(i,1) = _xyz[iVi].y();
+    nodesXYZ(i,2) = _xyz[iVi].z();
+  }
+
+  // Calculate Jacobian and gradients, scale if 3D (already scaled by
+  // regularization normals in 2D)
+  jacBasis->getSignedIdealJacAndGradients(nodesXYZ,_IJacNormEl[iEl],JDJ);
+  if (_dim == 3) JDJ.scale(_invIJac[iEl]);
+
+  // Transform Jacobian and gradients from Lagrangian to Bezier basis
+  jacBasis->lag2Bez(JDJ,BDB);
+
+  // Scaled jacobian
+  for (int l = 0; l < numJacNodes; l++) iJ [l] = BDB (l,3*numMapNodes);
+
+  // Gradients of the scaled jacobian
+  int iPC = 0;
+  std::vector<SPoint3> gXyzV(numJacNodes);
+  std::vector<SPoint3> gUvwV(numJacNodes);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iFVi = _el2FV[iEl][i];
+    if (iFVi >= 0) {
+      for (int l = 0; l < numJacNodes; l++)
+        gXyzV [l] = SPoint3(BDB(l,i), BDB(l,i+numMapNodes), BDB(l,i+2*numMapNodes));
+      _coordFV[iFVi]->gXyz2gUvw(_uvw[iFVi],gXyzV,gUvwV);
+      for (int l = 0; l < numJacNodes; l++) {
+        gIJ[indGIJac(iEl,l,iPC)] = gUvwV[l][0];
+        if (_nPCFV[iFVi] >= 2) gIJ[indGIJac(iEl,l,iPC+1)] = gUvwV[l][1];
+        if (_nPCFV[iFVi] == 3) gIJ[indGIJac(iEl,l,iPC+2)] = gUvwV[l][2];
+      }
+      iPC += _nPCFV[iFVi];
+    }
+  }
+}
+
+
+void Patch::initInvCondNum()
+{
+  // Initialize _nBezEl
+  if (_nICNEl.empty()) {
+    _nICNEl.resize(nEl());
+    for (int iEl=0; iEl<nEl(); iEl++) {
+      const CondNumBasis *cnBasis = BasisFactory::getCondNumBasis(_el[iEl]->getTypeForMSH());
+      _nICNEl[iEl] = cnBasis->getNumCondNumNodes();
+    }
+  }
+
+  // Set normals to 2D elements
+  if ((_dim == 2) && _condNormEl.empty()) {
+    _condNormEl.resize(nEl());
+    for (int iEl = 0; iEl < nEl(); iEl++)
+      calcNormalEl2D(iEl, NS_UNIT, _condNormEl[iEl], true);
+  }
+}
+
+
+void Patch::invCondNumAndGradients(int iEl, std::vector<double> &condNum,
+                                std::vector<double> &gCondNum)
+{
+  const CondNumBasis *cnBasis = BasisFactory::getCondNumBasis(_el[iEl]->getTypeForMSH());
+  const int &numICN = _nICNEl[iEl];
+  const int &numMapNodes = _nNodEl[iEl];
+  fullMatrix<double> IDI(numICN, 3*numMapNodes+1);
+
+  // Coordinates of nodes
+  fullMatrix<double> nodesXYZ(numMapNodes,3), normals;
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iVi = _el2V[iEl][i];
+    nodesXYZ(i,0) = _xyz[iVi].x();
+    nodesXYZ(i,1) = _xyz[iVi].y();
+    nodesXYZ(i,2) = _xyz[iVi].z();
+  }
+
+  // Calculate ICN and gradients
+  cnBasis->getSignedInvCondNumAndGradients(nodesXYZ, _condNormEl[iEl], IDI);
+
+  // Inverse condition number
+  for (int l = 0; l < numICN; l++) condNum[l] = IDI(l, 3*numMapNodes);
+
+  // Gradients of the inverse condition number
+  int iPC = 0;
+  std::vector<SPoint3> gXyzV(numICN);
+  std::vector<SPoint3> gUvwV(numICN);
+  for (int i = 0; i < numMapNodes; i++) {
+    int &iFVi = _el2FV[iEl][i];
+    if (iFVi >= 0) {
+      for (int l = 0; l < numICN; l++)
+        gXyzV[l] = SPoint3(IDI(l, i), IDI(l, i+numMapNodes),
+                            IDI(l, i+2*numMapNodes));
+      _coordFV[iFVi]->gXyz2gUvw(_uvw[iFVi], gXyzV, gUvwV);
+      for (int l = 0; l < numICN; l++) {
+        gCondNum[indGICN(iEl, l, iPC)] = gUvwV[l][0];
+        if (_nPCFV[iFVi] >= 2) gCondNum[indGICN(iEl, l, iPC+1)] = gUvwV[l][1];
+        if (_nPCFV[iFVi] == 3) gCondNum[indGICN(iEl, l, iPC+2)] = gUvwV[l][2];
+      }
+      iPC += _nPCFV[iFVi];
+    }
+  }
+}
diff --git a/contrib/MeshOptimizer/MeshOptPatch.h b/contrib/MeshOptimizer/MeshOptPatch.h
new file mode 100644
index 0000000..baa3b0b
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptPatch.h
@@ -0,0 +1,187 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _MESHOPTPATCH_H_
+#define _MESHOPTPATCH_H_
+
+#include <vector>
+#include <map>
+#include <set>
+#include "fullMatrix.h"
+#include "SPoint3.h"
+#include "MeshOptVertexCoord.h"
+
+
+class GEntity;
+class MVertex;
+class MElement;
+
+
+class Patch
+{
+public:
+  Patch(const std::map<MElement*,GEntity*> &element2entity,
+        const std::map<MElement*, GEntity*> &bndEl2Ent,
+        const std::set<MElement*> &els, std::set<MVertex*> &toFix,
+        const std::set<MElement*> &bndEls, bool fixBndNodes);
+
+  // Mesh entities and variables
+  inline const int &dim() { return _dim; }
+  inline const int &nPC() { return _nPC; }
+  inline int nVert() { return _vert.size(); }
+  inline int nFV() { return _freeVert.size(); }
+  inline int nEl() { return _el.size(); }
+  inline const int &nPCFV(int iFV) { return _nPCFV[iFV]; }
+  inline int indPCFV(int iFV, int iPC) { return _startPCFV[iFV]+iPC; }
+  inline int nPCEl(int iEl) { return _indPCEl[iEl].size(); }
+  inline const int &nNodEl(int iEl) { return _nNodEl[iEl]; }
+  inline const int &indPCEl(int iEl, int iPC) { return _indPCEl[iEl][iPC]; }
+  inline const int &el2V(int iEl, int i) { return _el2V[iEl][i]; }
+  inline const int &el2FV(int iEl, int i) { return _el2FV[iEl][i]; }
+  inline const int &fv2V(int iFV) { return _fv2V[iFV]; }
+  inline const SPoint3 &xyz(int iV) { return _xyz[iV]; }
+  inline const SPoint3 &ixyz(int iV) { return _ixyz[iV]; }
+  inline const SPoint3 &uvwFV(int iFV) { return _uvw[iFV]; }
+  inline void gXyz2gUvw(int iFV, const SPoint3 &gXyz, SPoint3 &gUvw);
+  inline void gXyz2gUvw(int iFV, const std::vector<SPoint3> &gXyz,
+                                        std::vector<SPoint3> &gUvw);
+  void pcScale(int iFV, std::vector<double> &scale);                                      // Calc. scale of param. coord. for precond.
+  void getUvw(double *it);
+  void updateMesh(const double *it);
+  void updateGEntityPositions();
+  void writeMSH(const char *filename);
+
+  // Node distance measure
+  enum LengthScaling { LS_NONE, LS_MAXNODEDIST, LS_MAXOUTERRADIUS, LS_MINEDGELENGTH };
+  void initScaledNodeDispSq(LengthScaling scaling);
+  inline double invLengthScaleSq() { return _invLengthScaleSq; }
+  double scaledNodeDispSq(int iFV);
+  void gradScaledNodeDispSq(int iFV, std::vector<double> &gDSq);
+
+  // High-order: scaled Jacobian and metric measures, distance to CAD
+  inline const int &nBezEl(int iEl) { return _nBezEl[iEl]; }
+  inline int indGSJ(int iEl, int l, int iPC) { return iPC*_nBezEl[iEl]+l; }
+  inline int nBndEl() { return _bndEl.size(); }
+  inline int nNodBndEl(int iBndEl) { return _bndEl2V[iBndEl].size(); }
+  inline const int &bndEl2FV(int iBndEl, int i) { return _bndEl2FV[iBndEl][i]; }
+  void initScaledJac();
+  void scaledJacAndGradients(int iEl, std::vector<double> &sJ, std::vector<double> &gSJ);
+  void initMetricMin();
+  void metricMinAndGradients(int iEl, std::vector<double> &sJ, std::vector<double> &gSJ);
+  bool bndDistAndGradients(int iEl, double &f, std::vector<double> &gradF, double eps);
+  void initScaledCADDistSq(double refCADDist);
+  void scaledCADDistSqAndGradients(int iBndEl, double &scaledDist,
+                                   std::vector<double> &gradScaledDist);
+
+  // Mesh quality
+  inline const int &nIJacEl(int iEl) { return _nIJacEl[iEl]; }
+  inline const int &nICNEl(int iEl) { return _nICNEl[iEl]; }
+  inline int indGIJac(int iEl, int l, int iPC) { return iPC*_nIJacEl[iEl]+l; }
+  inline int indGICN(int iEl, int l, int iPC) { return iPC*_nICNEl[iEl]+l; }
+  void initIdealJac();
+  void idealJacAndGradients(int iEl, std::vector<double> &NCJ, std::vector<double> &gNCJ);
+  void initInvCondNum();
+  void invCondNumAndGradients(int iEl, std::vector<double> &condNum, std::vector<double> &gCondNum);
+
+private:
+
+  // Mesh entities and variables
+  int _dim;
+  int _nPC;                                         // Total nb. of parametric coordinates
+  std::vector<MElement*> _el;                       // List of elements
+  std::vector<GEntity*> _gEnt;                      // Geometric entity corresponding to each element
+  std::vector<MVertex*> _vert, _freeVert;           // List of vert., free vert.
+  std::vector<int> _fv2V;                           // Index of free vert. -> index of vert.
+  std::vector<SPoint3> _xyz, _ixyz;                 // Physical coord. of ALL vertices (current, straight, init.)
+  std::vector<SPoint3> _uvw, _iuvw;                 // Parametric coord. of FREE vertices (current, straight, init.)
+  std::vector<int> _startPCFV;                      // Start index of parametric coordinates for a free vertex
+  std::vector<int> _nPCFV;                          // Number of parametric coordinates for a free vertex
+  std::vector<std::vector<int> > _el2FV, _el2V;     // Free vertices, vertices in element
+  std::vector<int> _nNodEl;                         // Number of Bezier poly. and nodes for an el.
+  std::vector<std::vector<int> > _indPCEl;          // Index of parametric coord. for an el.
+  std::vector<VertexCoord*> _coordFV;               // Parametrization for a free vertex
+  int addVert(MVertex* vert);
+  int addFreeVert(MVertex* vert, const int iV, const int nPCV,
+                  VertexCoord *param, std::set<MVertex*> &toFix);
+  static inline int indJB2DBase(int nNod, int l, int i, int j)
+  {
+    return (l*nNod+i)*nNod+j;
+  }
+  inline int indJB2D(int iEl, int l, int i, int j)
+  {
+    return indJB2DBase(_nNodEl[iEl],l,i,j);
+  }
+  static inline int indJB3DBase(int nNod, int l, int i, int j, int m)
+  {
+    return ((l*nNod+i)*nNod+j)*nNod+m;
+  }
+  inline int indJB3D(int iEl, int l, int i, int j, int m)
+  {
+    return indJB3DBase(_nNodEl[iEl],l,i,j,m);
+  }
+
+  // Node displacement
+  LengthScaling _typeLengthScale;
+  double _invLengthScaleSq;                                     // Square inverse of a length for node displacement scaling
+
+  // High-order: scaled Jacobian and metric measures
+  enum NormalScaling { NS_UNIT, NS_INVNORM, NS_SQRTNORM };
+  std::vector<int> _nBezEl;                                     // Number of Bezier poly. for an el.
+  std::vector<fullMatrix<double> > _JacNormEl;                  // Normals to 2D elements for Jacobian regularization and scaling
+  std::vector<double> _invStraightJac;                          // Initial Jacobians for 3D elements
+  std::vector<MElement*> _bndEl;                                // Boundary elements
+  std::vector<std::vector<int> > _bndEl2V, _bndEl2FV;           // Vertices & corresponding free vertices on the boundary elements
+  std::vector<GEntity*> _bndEl2Ent;                             // Geometric entities corresponding to the boundary elements
+  double _invRefCADDistSq;
+  void calcNormalEl2D(int iEl, NormalScaling scaling,
+                      fullMatrix<double> &elNorm, bool ideal);
+
+  // Mesh quality
+  std::vector<int> _nIJacEl;                                    // Number of NCJ values for an el
+  std::vector<fullMatrix<double> > _IJacNormEl;                 // Normals to 2D elements for Jacobian regularization and scaling
+  std::vector<double> _invIJac;                                 // Initial Jacobians for 3D elements
+  std::vector<int> _nICNEl;                                     // Number of inv. cond. number values for an el.
+  std::vector<fullMatrix<double> > _condNormEl;                 // Normals to 2D elements for inverse conditioning computation
+};
+
+
+inline void Patch::gXyz2gUvw(int iFV, const SPoint3 &gXyz, SPoint3 &gUvw)
+{
+  _coordFV[iFV]->gXyz2gUvw(_uvw[iFV], gXyz, gUvw);
+}
+
+
+inline void Patch::gXyz2gUvw(int iFV, const std::vector<SPoint3> &gXyz,
+                                            std::vector<SPoint3> &gUvw)
+{
+  _coordFV[iFV]->gXyz2gUvw(_uvw[iFV], gXyz, gUvw);
+}
+
+
+#endif
diff --git a/contrib/MeshOptimizer/MeshOptVertexCoord.cpp b/contrib/MeshOptimizer/MeshOptVertexCoord.cpp
new file mode 100644
index 0000000..073e97c
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptVertexCoord.cpp
@@ -0,0 +1,223 @@
+// Copyright (C) 2013 UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributor(s): Thomas Toulorge, Jonathan Lambrechts
+
+#include <iostream>
+#include <algorithm>
+#include "GmshMessage.h"
+#include "GFace.h"
+#include "GEdge.h"
+#include "MVertex.h"
+#include "MLine.h"
+#include "MeshOptVertexCoord.h"
+
+SPoint3 VertexCoordParent::getUvw(MVertex* vert) const
+{
+  GEntity *ge = vert->onWhat();
+  if ((ge->geomType() == GEntity::DiscreteCurve) ||
+      (ge->geomType() == GEntity::DiscreteSurface))
+    Msg::Error("Using parent coordinates on discrete curve or surface");
+
+  switch (ge->dim()) {
+  case 1: {
+    SPoint3 p(0.,0.,0.);
+    reparamMeshVertexOnEdge(vert,static_cast<GEdge*>(ge),p[0]);     // Overkill if vert. well classified and parametrized
+    return p;
+    break;
+  }
+  case 2: {
+    SPoint2 p;
+    reparamMeshVertexOnFace(vert,static_cast<GFace*>(ge),p);      // Overkill if vert. well classified and parametrized
+    return SPoint3(p[0],p[1],0.);
+    break;
+  }
+  }
+  return SPoint3(0.,0.,0.);
+}
+
+SPoint3 VertexCoordParent::uvw2Xyz(const SPoint3 &uvw) const
+{
+  GEntity *ge = _vert->onWhat();
+  GPoint gp = (ge->dim() == 1) ? static_cast<GEdge*>(ge)->point(uvw[0]) :
+                                 static_cast<GFace*>(ge)->point(uvw[0],uvw[1]);
+  return SPoint3(gp.x(),gp.y(),gp.z());
+}
+
+void VertexCoordParent::gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz, SPoint3 &gUvw) const
+{
+
+  GEntity *ge = _vert->onWhat();
+
+  if (ge->dim() == 1) {
+    SVector3 der = static_cast<GEdge*>(ge)->firstDer(uvw[0]);
+    gUvw[0] = gXyz.x() * der.x() + gXyz.y() * der.y() + gXyz.z() * der.z();
+  }
+  else {
+    Pair<SVector3,SVector3> der = static_cast<GFace*>(ge)->firstDer(SPoint2(uvw[0],uvw[1]));
+    gUvw[0] = gXyz.x() * der.first().x() + gXyz.y() * der.first().y() +
+      gXyz.z() * der.first().z();
+    gUvw[1] = gXyz.x() * der.second().x() + gXyz.y() * der.second().y() +
+      gXyz.z() * der.second().z();
+  }
+
+}
+
+void VertexCoordParent::gXyz2gUvw(const SPoint3 &uvw,
+                                 const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const
+{
+
+  GEntity *ge = _vert->onWhat();
+
+  if (ge->dim() == 1) {
+    SVector3 der = static_cast<GEdge*>(ge)->firstDer(uvw[0]);
+    std::vector<SPoint3>::iterator itUvw = gUvw.begin();
+    for (std::vector<SPoint3>::const_iterator itXyz=gXyz.begin();
+         itXyz != gXyz.end(); itXyz++) {
+      (*itUvw)[0] = itXyz->x() * der.x() + itXyz->y() * der.y() + itXyz->z() * der.z();
+      itUvw++;
+    }
+  }
+  else {
+    Pair<SVector3,SVector3> der = static_cast<GFace*>(ge)->firstDer
+      (SPoint2(uvw[0],uvw[1]));
+    std::vector<SPoint3>::iterator itUvw=gUvw.begin();
+    for (std::vector<SPoint3>::const_iterator itXyz=gXyz.begin();
+         itXyz != gXyz.end(); itXyz++) {
+      (*itUvw)[0] = itXyz->x() * der.first().x() + itXyz->y() * der.first().y() +
+        itXyz->z() * der.first().z();
+      (*itUvw)[1] = itXyz->x() * der.second().x() + itXyz->y() * der.second().y() +
+        itXyz->z() * der.second().z();
+      itUvw++;
+    }
+  }
+
+}
+
+namespace {
+
+SVector3 getLineElTangent(MElement *el, int iNode) {
+
+  double gsf[1256][3], u, v, w;
+  el->getNode(iNode,u,v,w);
+//  el->getGradShapeFunctions(u,v,w,gsf);
+  el->getGradShapeFunctions(u,v,w,gsf,1);
+
+  SVector3 dxyzdu(0.);
+//  int nSF = el->getNumShapeFunctions()();
+  int nSF = el->getNumPrimaryVertices();
+  for (int j=0; j<nSF; j++) {
+    const SPoint3 p = el->getVertex(j)->point();
+    dxyzdu(0) += gsf[j][0]*p.x();
+    dxyzdu(1) += gsf[j][0]*p.y();
+    dxyzdu(2) += gsf[j][0]*p.z();
+  }
+  dxyzdu.normalize();
+
+  return dxyzdu;
+
+}
+
+SVector3 getSurfElNormal(MElement *el, int iNode) {
+
+  double gsf[1256][3], u, v, w;
+  el->getNode(iNode,u,v,w);
+//  el->getGradShapeFunctions(u,v,w,gsf);
+  el->getGradShapeFunctions(u,v,w,gsf,1);
+
+  SVector3 dxyzdu(0.), dxyzdv(0.);
+//  int nSF = el->getNumShapeFunctions()();
+  int nSF = el->getNumPrimaryVertices();
+  for (int j=0; j<nSF; j++) {
+    const SPoint3 p = el->getVertex(j)->point();
+    dxyzdu(0) += gsf[j][0]*p.x();
+    dxyzdu(1) += gsf[j][0]*p.y();
+    dxyzdu(2) += gsf[j][0]*p.z();
+    dxyzdv(0) += gsf[j][1]*p.x();
+    dxyzdv(1) += gsf[j][1]*p.y();
+    dxyzdv(2) += gsf[j][1]*p.z();
+  }
+
+  SVector3 normal = crossprod(dxyzdu,dxyzdv);
+  normal.normalize();
+  return normal;
+
+}
+
+}
+
+VertexCoordLocalLine::VertexCoordLocalLine(MVertex* v) :
+    dir(0.), x0(v->x()), y0(v->y()), z0(v->z())
+{
+
+  GEntity *ge = v->onWhat();
+  const unsigned nEl = ge->getNumMeshElements();
+
+  for (unsigned iEl = 0; iEl < nEl; iEl++) {
+    MElement *el = ge->getMeshElement(iEl);
+    std::vector<MVertex*> lVerts;
+    el->getVertices(lVerts);
+    std::vector<MVertex*>::iterator itV = std::find(lVerts.begin(),lVerts.end(),v);
+    if (itV != lVerts.end()) {
+      const int iNode = std::distance(lVerts.begin(),itV);
+      dir += getLineElTangent(el,iNode);
+    }
+  }
+  dir.normalize();
+
+}
+
+VertexCoordLocalSurf::VertexCoordLocalSurf(MVertex* v) : x0(v->x()), y0(v->y()), z0(v->z())
+{
+
+  GEntity *ge = v->onWhat();
+  const unsigned nEl = ge->getNumMeshElements();
+
+  SVector3 n(0.);
+  for (unsigned iEl = 0; iEl < nEl; iEl++) {
+    MElement *el = ge->getMeshElement(iEl);
+    std::vector<MVertex*> lVerts;
+    el->getVertices(lVerts);
+    std::vector<MVertex*>::iterator itV = std::find(lVerts.begin(),lVerts.end(),v);
+    if (itV != lVerts.end()) {
+      const int iNode = std::distance(lVerts.begin(),itV);
+      n += getSurfElNormal(el,iNode);
+    }
+  }
+  n.normalize();
+
+  if (fabs(fabs(dot(n,SVector3(1.,0.,0.)))-1.) < 1.e-10) {    // If normal is x-axis, take y- and z- axis as dir.
+    dir0 = SVector3(0.,1.,0.);
+    dir1 = SVector3(0.,0.,1.);
+  }
+  else {
+    dir0 = SVector3(1.-n.x()*n.x(),-n.x()*n.y(),-n.x()*n.z());  // 1st dir. = (normalized) proj. of e_x in plane
+    dir0.normalize();
+    dir1 = crossprod(dir0,n);
+  }
+
+}
diff --git a/contrib/MeshOptimizer/MeshOptVertexCoord.h b/contrib/MeshOptimizer/MeshOptVertexCoord.h
new file mode 100644
index 0000000..3a1c00d
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptVertexCoord.h
@@ -0,0 +1,144 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _VERTEXCOORD_H_
+#define _VERTEXCOORD_H_
+
+#include "SPoint3.h"
+#include "GEntity.h"
+#include "MVertex.h"
+
+
+class VertexCoord
+{
+public:
+  // Set param. coord. of MVertex if applicable
+  virtual void exportVertexCoord(const SPoint3 &uvw) {}
+  // Get parametric coordinates of vertex
+  virtual SPoint3 getUvw(MVertex* v) const = 0;
+  // Calculate physical coordinates from parametric coordinates of vertex
+  virtual SPoint3 uvw2Xyz(const SPoint3 &uvw) const = 0;
+  // Calculate derivatives w.r.t parametric coordinates
+  virtual void gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz, SPoint3 &gUvw) const = 0;
+  // Calculate derivatives w.r.t parametric coordinates
+  virtual void gXyz2gUvw(const SPoint3 &uvw,
+                         const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const = 0;
+  virtual ~VertexCoord() {}
+};
+
+class VertexCoordPhys3D : public VertexCoord
+{
+public:
+  SPoint3 getUvw(MVertex* v) const { return v->point(); }
+  SPoint3 uvw2Xyz(const SPoint3 &uvw) const { return uvw; }
+  void gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz,
+                         SPoint3 &gUvw) const { gUvw = gXyz; }
+  void gXyz2gUvw(const SPoint3 &uvw, const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const
+  {
+    std::vector<SPoint3>::iterator itUvw=gUvw.begin();
+    for (std::vector<SPoint3>::const_iterator itXyz=gXyz.begin(); itXyz != gXyz.end();
+         itXyz++) {
+      *itUvw = *itXyz;
+      itUvw++;
+    }
+  }
+};
+
+
+class VertexCoordParent : public VertexCoord
+{
+public:
+  VertexCoordParent(MVertex* v) : _vert(v) {}
+  void exportVertexCoord(const SPoint3 &uvw) {
+    for (int d = 0; d < _vert->onWhat()->dim(); ++d) _vert->setParameter(d, uvw[d]);
+  }
+  SPoint3 getUvw(MVertex* v) const;
+  SPoint3 uvw2Xyz(const SPoint3 &uvw) const;
+  void gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz, SPoint3 &gUvw) const;
+  void gXyz2gUvw(const SPoint3 &uvw, const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const;
+protected:
+  MVertex *_vert;
+};
+
+
+class VertexCoordLocalLine : public VertexCoord
+{
+public:
+  VertexCoordLocalLine(MVertex* v);
+  SPoint3 getUvw(MVertex* v) const { return SPoint3(0.,0.,0.); }
+  SPoint3 uvw2Xyz(const SPoint3 &uvw) const {
+    return SPoint3(x0+uvw[0]*dir[0],y0+uvw[0]*dir[1],z0+uvw[0]*dir[2]);
+  }
+  void gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz, SPoint3 &gUvw) const {
+    gUvw[0] = gXyz.x()*dir[0] + gXyz.y()*dir[1] + gXyz.z()*dir[2];
+  }
+  void gXyz2gUvw(const SPoint3 &uvw, const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const {
+    std::vector<SPoint3>::iterator itUvw = gUvw.begin();
+    for (std::vector<SPoint3>::const_iterator itXyz=gXyz.begin();
+         itXyz != gXyz.end(); itXyz++) {
+      (*itUvw)[0] = itXyz->x()*dir[0] + itXyz->y()*dir[1] + itXyz->z()*dir[2];
+      itUvw++;
+    }
+  }
+protected:
+  double x0, y0, z0;
+  SVector3 dir;
+};
+
+
+class VertexCoordLocalSurf : public VertexCoord
+{
+public:
+  VertexCoordLocalSurf(MVertex* v);
+  SPoint3 getUvw(MVertex* v) const { return SPoint3(0.,0.,0.); }
+  SPoint3 uvw2Xyz(const SPoint3 &uvw) const {
+    return SPoint3(x0+uvw[0]*dir0[0]+uvw[1]*dir1[0],
+                   y0+uvw[0]*dir0[1]+uvw[1]*dir1[1],
+                   z0+uvw[0]*dir0[2]+uvw[1]*dir1[2]);
+  }
+  void gXyz2gUvw(const SPoint3 &uvw, const SPoint3 &gXyz, SPoint3 &gUvw) const {
+    gUvw[0] = gXyz.x()*dir0[0] + gXyz.y()*dir0[1] + gXyz.z()*dir0[2];
+    gUvw[1] = gXyz.x()*dir1[0] + gXyz.y()*dir1[1] + gXyz.z()*dir1[2];
+  }
+  void gXyz2gUvw(const SPoint3 &uvw, const std::vector<SPoint3> &gXyz, std::vector<SPoint3> &gUvw) const {
+    std::vector<SPoint3>::iterator itUvw = gUvw.begin();
+    for (std::vector<SPoint3>::const_iterator itXyz=gXyz.begin();
+         itXyz != gXyz.end(); itXyz++) {
+      (*itUvw)[0] = itXyz->x()*dir0[0] + itXyz->y()*dir0[1] + itXyz->z()*dir0[2];
+      (*itUvw)[1] = itXyz->x()*dir1[0] + itXyz->y()*dir1[1] + itXyz->z()*dir1[2];
+      itUvw++;
+    }
+  }
+protected:
+  double x0, y0, z0;
+  SVector3 dir0, dir1;
+};
+
+
+#endif
diff --git a/contrib/MeshOptimizer/MeshOptimizer.cpp b/contrib/MeshOptimizer/MeshOptimizer.cpp
new file mode 100644
index 0000000..b8445e9
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptimizer.cpp
@@ -0,0 +1,624 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#include <stdio.h>
+#include <sstream>
+#include <iterator>
+#include <string.h>
+#include <stack>
+#include "GmshConfig.h"
+#include "Gmsh.h"
+#include "GModel.h"
+#include "MTriangle.h"
+#include "MQuadrangle.h"
+#include "MTetrahedron.h"
+#include "MHexahedron.h"
+#include "MPrism.h"
+#include "MLine.h"
+#include "OS.h"
+#include "MeshOpt.h"
+#include "MeshOptCommon.h"
+#include "MeshOptimizer.h"
+
+#if defined(HAVE_BFGS)
+
+
+typedef std::vector<MElement*> elVec;
+typedef elVec::const_iterator elVecConstIter;
+typedef std::set<MElement*> elSet;
+typedef elSet::iterator elSetIter;
+typedef std::set<MVertex*> vertSet;
+typedef std::map<MElement*, GEntity*> elEntMap;
+typedef std::map<MElement*, MElement*> elElMap;
+
+typedef std::map<MVertex*, elVec> vertElVecMap;
+typedef std::map<MElement*, elSet> elElSetMap;
+typedef std::pair<elSet, vertSet> elSetVertSetPair;
+
+
+namespace {
+
+
+vertSet getAllBndVertices(elSet &elements, const vertElVecMap &vertex2elements)
+{
+  vertSet bnd;
+  for (elSetIter itE = elements.begin(); itE != elements.end(); ++itE) {
+    for (int i = 0; i < (*itE)->getNumPrimaryVertices(); ++i) {
+      const elVec &neighbours = vertex2elements.find
+        ((*itE)->getVertex(i))->second;
+      for (size_t k = 0; k < neighbours.size(); ++k) {
+        if (elements.find(neighbours[k]) == elements.end()) {
+          for (int j = 0; j < neighbours[k]->getNumVertices(); ++j) {
+            bnd.insert(neighbours[k]->getVertex(j));
+          }
+        }
+      }
+    }
+  }
+  return bnd;
+}
+
+
+// Get neighbours of element (computes and store them only if needed)
+void getElementNeighbours(MElement *el, const vertElVecMap &v2e,
+                          elElSetMap &e2e, elSet &neighbours)
+{
+  elElSetMap::iterator it = e2e.find(el);
+  if (it == e2e.end()) {                                                          // If not in e2e, compute and store
+    neighbours.clear();
+    for (int i = 0; i < el->getNumPrimaryVertices(); ++i) {
+      const elVec &adjEl = v2e.find(el->getVertex(i))->second;
+      for(elVecConstIter itA = adjEl.begin(); itA != adjEl.end(); itA++)
+        if (*itA != el) neighbours.insert(*itA);
+    }
+    e2e.insert(std::pair<MElement*, elSet>(el, neighbours));
+  }
+  else neighbours = it->second;
+}
+
+
+elSet getSurroundingPatch(MElement *el, const MeshOptPatchDef *patchDef,
+                          double limDist, int maxLayers,
+                          const vertElVecMap &vertex2elements,
+                          elElSetMap &element2elements,
+                          const elEntMap &element2entity)
+{
+  const SPoint3 pnt = el->barycenter(true);
+
+  elSet patch, currentLayer, lastLayer, excluded;
+
+  patch.insert(el);
+  lastLayer.insert(el);
+  for (int d = 0; d < maxLayers; ++d) {
+    currentLayer.clear();
+    for (elSetIter it = lastLayer.begin(); it != lastLayer.end(); ++it) {             // Loop over elements in last layer
+      elSet neighbours;
+      getElementNeighbours(*it, vertex2elements, element2elements, neighbours);
+      for (elSetIter itN = neighbours.begin(); itN != neighbours.end(); ++itN) {      // Loop over neighbours
+        if ((lastLayer.find(*itN) == lastLayer.end()) &&                              // If neighbour already in last layer...
+            (excluded.find(*itN) == excluded.end())) {                                // ... or marked as excluded, skip
+          GEntity *gEnt = 0;
+          if (!element2entity.empty()) {
+            elEntMap::const_iterator itEl2Ent = element2entity.find(el);
+            if (itEl2Ent != element2entity.end()) gEnt = itEl2Ent->second;
+          }
+          const int elIn = patchDef->inPatch(pnt, limDist, *itN, gEnt);               // Test if element in patch according to user-defined criteria
+          if ((elIn > 0) || ((d < patchDef->minLayers) && (elIn == 0))) {
+            if (patch.insert(*itN).second) currentLayer.insert(*itN);                 // If element in, insert in patch and in current layer...
+          }
+          else excluded.insert(*itN);                                                 // ... otherwise, mark as excluded
+        }
+      }
+    }
+    lastLayer = currentLayer;
+  }
+
+  return patch;
+}
+
+
+void addPatchChaintoGroup(std::set<int> &group,
+                          const std::vector<std::set<int> > &groupConnect,
+                          std::vector<bool> &todoPB, int iB)
+{
+  if (todoPB[iB]) {
+    todoPB[iB] = false;
+    group.insert(iB);
+    const std::set<int> &connect = groupConnect[iB];
+    for (std::set<int>::const_iterator itBC = connect.begin();
+         itBC != connect.end(); ++itBC)
+      addPatchChaintoGroup(group, groupConnect, todoPB, *itBC);
+  }
+}
+
+
+void calcVertex2Elements(int dim, GEntity *entity,
+                         vertElVecMap &vertex2elements)
+{
+  for (size_t i = 0; i < entity->getNumMeshElements(); ++i) {
+    MElement *element = entity->getMeshElement(i);
+    if (element->getDim() == dim)
+      for (int j = 0; j < element->getNumPrimaryVertices(); ++j)
+        vertex2elements[element->getVertex(j)].push_back(element);
+  }
+}
+
+
+void calcElement2Entity(GEntity *entity, elEntMap &element2entity)
+{
+  for (size_t i = 0; i < entity->getNumMeshElements(); ++i) {
+    MElement *element = entity->getMeshElement(i);
+    element2entity.insert(std::pair<MElement*,GEntity*>(element,entity));
+  }
+}
+
+
+MElement *getFaceInBndElements(const MFace &f, std::list<GFace*> gFaces)
+{
+  for (std::list<GFace*>::iterator itGF = gFaces.begin(); itGF != gFaces.end(); itGF++) {
+    if (f.getNumVertices() == 3) {
+      std::vector<MTriangle*> &tris = (*itGF)->triangles;
+      for (int iEl=0; iEl<tris.size(); iEl++)
+        if (tris[iEl]->getFace(0) == f) return tris[iEl];
+    }
+    else {
+      std::vector<MQuadrangle*> &quads = (*itGF)->quadrangles;
+      for (int iEl=0; iEl<quads.size(); iEl++)
+        if (quads[iEl]->getFace(0) == f) return quads[iEl];
+    }
+  }
+  return 0;
+}
+
+
+MElement *getEdgeInBndElements(const MEdge &e, std::list<GEdge*> gEdges)
+{
+  for (std::list<GEdge*>::iterator itGE = gEdges.begin(); itGE != gEdges.end(); itGE++) {
+    std::vector<MLine*> &lines = (*itGE)->lines;
+    for (int iEl=0; iEl<lines.size(); iEl++)
+      if (lines[iEl]->getEdge(0) == e) return lines[iEl];
+  }
+  return 0;
+}
+
+
+void calcBndInfo(GEntity *entity, elElMap &el2BndEl, elEntMap &bndEl2Ent)
+{
+  typedef std::list<GFace*> GFaceList;
+  typedef std::list<GEdge*> GEdgeList;
+
+  if (entity->dim() == 3) {                                                               // 3D
+
+    // Fill boundary element -> GEntity connectivity
+    GFaceList gFaces = entity->faces();
+    for (GFaceList::iterator itGF = gFaces.begin(); itGF != gFaces.end(); itGF++) {
+      std::vector<MTriangle*> &tris = (*itGF)->triangles;
+      for (int i=0; i<tris.size(); i++)
+        bndEl2Ent.insert(std::pair<MElement*, GEntity*>(tris[i], *itGF));
+      std::vector<MQuadrangle*> &quads = (*itGF)->quadrangles;
+      for (int i=0; i<quads.size(); i++)
+        bndEl2Ent.insert(std::pair<MElement*, GEntity*>(quads[i], *itGF));
+    }
+
+    // Fill element -> boundary element connectivity
+    for (int iEl = 0; iEl < entity->getNumMeshElements(); iEl++) {
+      MElement *el = entity->getMeshElement(iEl);
+      int nBndVert = 0;                                                                   // Compute nb. of bnd. vertices in element
+      for (int iV=0; iV<el->getNumPrimaryVertices(); iV++)
+        if (el->getVertex(iV)->onWhat() != entity) nBndVert++;
+      if (nBndVert >= 3)                                                                  // If more than 3 primary vert. on bnd., look for bnd. face(s)
+        for (int iF=0; iF<el->getNumFaces(); iF++) {
+          MElement *bndEl = getFaceInBndElements(el->getFace(iF), gFaces);
+          if (bndEl != 0)
+            el2BndEl.insert(std::pair<MElement*, MElement*>(el, bndEl));
+        }
+    }
+
+  }
+  else {                                                                                  // 2D
+
+    // Fill boundary element -> GEntity connectivity
+    GEdgeList gEdges = entity->edges();
+    for (GEdgeList::iterator itGE = gEdges.begin(); itGE != gEdges.end(); itGE++) {
+      std::vector<MLine*> &lines = (*itGE)->lines;
+      for (int i=0; i<lines.size(); i++)
+        bndEl2Ent.insert(std::pair<MElement*, GEntity*>(lines[i], *itGE));
+    }
+
+    // Fill element -> boundary element connectivity
+    for (int iEl = 0; iEl < entity->getNumMeshElements(); iEl++) {
+      MElement *el = entity->getMeshElement(iEl);
+      int nBndVert = 0;                                                                   // Compute nb. of bnd. vertices in element
+      for (int iV=0; iV<el->getNumPrimaryVertices(); iV++)
+        if (el->getVertex(iV)->onWhat() != entity) nBndVert++;
+      if (nBndVert >= 2)                                                                  // If more than 2 primary vert. on bnd., look for bnd. edge(s)
+        for (int iE=0; iE<el->getNumEdges(); iE++) {
+          MElement *bndEl = getEdgeInBndElements(el->getEdge(iE), gEdges);
+          if (bndEl != 0)
+            el2BndEl.insert(std::pair<MElement*, MElement*>(el, bndEl));
+        }
+    }
+
+  }
+}
+
+
+std::vector<elSetVertSetPair> getDisjointPatches(const vertElVecMap &vertex2elements,
+                                                 const elEntMap &element2entity,
+                                                 const elSet &badElements,
+                                                 const MeshOptParameters &par)
+{
+  Msg::Info("Starting patch generation from %i bad elements...", badElements.size());
+
+  elElSetMap element2elements;                                                            // Element to element connectivity, built progressively
+
+  // Contruct primary patches
+  Msg::Info("Constructing %i primary patches", badElements.size());
+  std::vector<elSet > primPatches;
+  primPatches.reserve(badElements.size());
+  for (elSet::const_iterator it = badElements.begin(); it != badElements.end(); ++it) {
+    const double limDist = par.patchDef->maxDistance(*it);
+    primPatches.push_back(getSurroundingPatch(*it, par.patchDef, limDist,
+                                              par.patchDef->maxLayers,
+                                              vertex2elements, element2elements,
+                                              element2entity));
+  }
+
+  // Compute patch connectivity
+  Msg::Info("Computing patch connectivity...");
+  std::map<MElement*, std::set<int> > tags;
+  std::vector<std::set<int> > patchConnect(primPatches.size());
+  for (int iB = 0; iB < primPatches.size(); ++iB) {
+    elSet &patch = primPatches[iB];
+    for(elSetIter itEl = patch.begin(); itEl != patch.end(); ++itEl) {
+      std::set<int> &patchInd = tags[*itEl];
+      if (!patchInd.empty() && (badElements.find(*itEl) != badElements.end() ||
+                               !par.patchDef->weakMerge)) {
+        for (std::set<int>::iterator itBS = patchInd.begin();
+             itBS != patchInd.end(); ++itBS) patchConnect[*itBS].insert(iB);
+        patchConnect[iB].insert(patchInd.begin(), patchInd.end());
+      }
+      patchInd.insert(iB);
+    }
+  }
+
+  // Identify groups of connected patches
+  Msg::Info("Identifying groups of primary patches...");
+  std::list<std::set<int> > groups;
+  std::vector<bool> todoPB(primPatches.size(), true);
+  for (int iB = 0; iB < primPatches.size(); ++iB)
+    if (todoPB[iB]) {
+      std::set<int> group;
+      addPatchChaintoGroup(group, patchConnect, todoPB, iB);
+      groups.push_back(group);
+    }
+
+  // Merge primary patches according to groups
+  Msg::Info("Merging primary patches into %i patches...", groups.size());
+  std::list<elSet > patches;
+  for (std::list<std::set<int> >::iterator itG = groups.begin();
+       itG != groups.end(); ++itG) {
+    patches.push_back(elSet());
+    for (std::set<int>::iterator itB = itG->begin(); itB != itG->end(); ++itB) {
+      elSet primPatch = primPatches[*itB];
+      patches.back().insert(primPatch.begin(), primPatch.end());
+    }
+  }
+
+  // Store and compute patch boundaries
+  Msg::Info("Computing boundaries for %i patches...", patches.size());
+  std::vector<elSetVertSetPair > result;
+  for (std::list<elSet >::iterator itB = patches.begin();
+       itB != patches.end(); ++itB)
+    result.push_back(elSetVertSetPair(*itB, getAllBndVertices(*itB, vertex2elements)));
+
+  Msg::Info("Generated %i patches", patches.size());
+
+  return result;
+}
+
+
+// Get (bad) boundary elements adjacent to patch
+void getAdjacentBndElts(const elElMap &el2BndEl, const elEntMap &bndEl2Ent,
+                        const elSet &elts, elSet &bndElts, MeshOptParameters &par)
+{
+  for (elSetIter itEl=elts.begin(); itEl!=elts.end(); itEl++) {
+    elElMap::const_iterator itBndEl = el2BndEl.find(*itEl);
+    if (itBndEl != el2BndEl.end()) {
+      MElement* bndEl = itBndEl->second;
+      elEntMap::const_iterator itEnt = bndEl2Ent.find(bndEl);
+      if (par.patchDef->bndElBadness(bndEl, itEnt->second) < 0.) bndElts.insert(bndEl);
+    }
+  }
+}
+
+
+void optimizeDisjointPatches(const vertElVecMap &vertex2elements,
+                             const elEntMap &element2entity,
+                             const elElMap &el2BndEl,
+                             const elEntMap &bndEl2Ent,
+                             elSet &badasses, MeshOptParameters &par)
+{
+  par.success = 1;
+
+  const elEntMap &e2ePatch = par.useGeomForPatches ? element2entity : elEntMap();
+  const elEntMap &e2eOpt = par.useGeomForOpt ? element2entity : elEntMap();
+
+  // Get patches
+  std::vector<elSetVertSetPair> toOptimize = getDisjointPatches(vertex2elements,
+                                                                 e2ePatch, badasses, par);
+
+  // Get boundary elements adjacent to patch if required
+  std::vector<elSet> bndElts;
+  bndElts.resize(toOptimize.size());
+  if (!el2BndEl.empty()) {
+    for (int iPatch = 0; iPatch < toOptimize.size(); ++iPatch)
+      getAdjacentBndElts(el2BndEl, bndEl2Ent, toOptimize[iPatch].first, bndElts[iPatch], par);
+  }
+
+  for (int iPatch = 0; iPatch < toOptimize.size(); ++iPatch) {
+
+    // Initialize optimization and output if asked
+    if (par.verbose > 1)
+      Msg::Info("Optimizing patch %i/%i composed of %i elements, "
+                "%i boundary elements", iPatch, toOptimize.size()-1,
+                toOptimize[iPatch].first.size(), bndElts[iPatch].size());
+    MeshOpt opt(e2eOpt, bndEl2Ent, toOptimize[iPatch].first,
+                toOptimize[iPatch].second, bndElts[iPatch], par);
+    if (par.verbose > 3) {
+      std::ostringstream ossI1;
+      ossI1 << "initial_patch-" << iPatch << ".msh";
+      opt.patch.writeMSH(ossI1.str().c_str());
+    }
+
+    // Optimize patch
+    int success = -1;
+    if (opt.patch.nPC() > 0)
+      success = opt.optimize(par);
+    else
+      if (par.verbose > 1) Msg::Info("Patch %i has no degree of freedom, skipping", iPatch);
+
+    if (par.verbose > 3) {
+      std::ostringstream ossI2;
+      ossI2 << "final_patch-" << iPatch << ".msh";
+      opt.patch.writeMSH(ossI2.str().c_str());
+    }
+
+    // Evaluate mesh and update it if (partial) success
+    opt.updateResults();
+    if (success >= 0) opt.patch.updateGEntityPositions();
+
+    //#pragma omp critical
+    par.success = std::min(par.success, success);
+  }
+}
+
+
+MElement *getWorstElement(elSet &badElts,
+                          const elEntMap &element2entity,
+                          const MeshOptParameters &par)
+{
+  double worst = 1.e300;
+  MElement *worstEl = 0;
+
+  for (elSetIter it=badElts.begin(); it!=badElts.end(); it++) {
+    GEntity *gEnt = 0;
+    if (!element2entity.empty()) {
+      elEntMap::const_iterator itEl2Ent = element2entity.find(*it);
+      if (itEl2Ent != element2entity.end()) gEnt = itEl2Ent->second;
+    }
+    const double val = par.patchDef->elBadness(*it, gEnt);
+    if (val < worst) {
+      worst = val;
+      worstEl = *it;
+    }
+  }
+
+  return worstEl;
+}
+
+
+void optimizeOneByOne(const vertElVecMap &vertex2elements,
+                      const elEntMap &element2entity,
+                      const elElMap &el2BndEl,
+                      const elEntMap &bndEl2Ent,
+                      elSet badElts, MeshOptParameters &par)
+{
+  par.success = 1;
+
+  const elEntMap &e2ePatch = par.useGeomForPatches ? element2entity : elEntMap();
+  const elEntMap &e2eOpt = par.useGeomForOpt ? element2entity : elEntMap();
+
+  const int initNumBadElts = badElts.size();
+  if (par.verbose > 0) Msg::Info("%d bad elements, starting to iterate...", initNumBadElts);
+
+  elElSetMap element2elements;                                                                // Element to element connectivity, built progressively
+
+  // Loop over bad elements
+  for (int iBadEl=0; iBadEl<initNumBadElts; iBadEl++) {
+
+    if (badElts.empty()) break;
+
+    // Create patch around worst element and remove it from badElts
+    MElement *worstEl = getWorstElement(badElts, e2ePatch, par);
+    badElts.erase(worstEl);
+
+    // Initialize patch size to be adapted
+    int maxLayers = par.patchDef->maxLayers;
+    double distanceFactor = 1.;
+    int success;
+
+    // Patch adaptation loop
+    for (int iAdapt=0; iAdapt<par.patchDef->maxPatchAdapt; iAdapt++) {
+
+      // Set up patch
+      const double limDist = par.patchDef->maxDistance(worstEl);
+      elSet toOptimizePrim = getSurroundingPatch(worstEl, par.patchDef, limDist,
+                                                 maxLayers, vertex2elements,
+                                                 element2elements, e2ePatch);
+      vertSet toFix = getAllBndVertices(toOptimizePrim, vertex2elements);
+      elSet toOptimize;
+      std::set_difference(toOptimizePrim.begin(),toOptimizePrim.end(),
+                          badElts.begin(),badElts.end(),
+                          std::inserter(toOptimize, toOptimize.end()));
+
+      // Get boundary elements adjacent to patch if required
+      elSet bndElts;
+      if (!el2BndEl.empty()) {
+        getAdjacentBndElts(el2BndEl, bndEl2Ent, toOptimize, bndElts, par);
+      }
+
+      // Initialize optimization and output if asked
+      if (par.verbose > 1)
+        Msg::Info("Optimizing patch %i (max. %i remaining) composed of %4d elements",
+                                            iBadEl, badElts.size(), toOptimize.size());
+      MeshOpt opt(e2eOpt, bndEl2Ent, toOptimize, toFix, bndElts, par);
+      if (par.verbose > 3) {
+        std::ostringstream ossI1;
+        ossI1 << "initial_patch-" << iBadEl << ".msh";
+        opt.patch.writeMSH(ossI1.str().c_str());
+      }
+
+      // Optimize patch
+      if (opt.patch.nPC() == 0) {
+        success = -1;
+        Msg::Info("Patch %i (adapt #%i) has no degree of freedom, skipping", iBadEl, iAdapt);
+      }
+      else
+        success = opt.optimize(par);
+
+      // Output if asked
+      if (par.verbose > 3) {
+        std::ostringstream ossI2;
+        ossI2 << "final_patch-" << iBadEl << "_adapt-" << iAdapt <<".msh";
+        opt.patch.writeMSH(ossI2.str().c_str());
+      }
+
+      // If (partial) success, update mesh and break adaptation loop, otherwise adapt
+      if ((success > 0) || (iAdapt == par.patchDef->maxPatchAdapt-1)) {
+        opt.updateResults();
+        if (success >= 0) {
+          opt.patch.updateGEntityPositions();
+          break;
+        }
+        else {
+          distanceFactor *= par.patchDef->distanceAdaptFact;
+          maxLayers *= par.patchDef->maxLayersAdaptFact;
+          if (par.verbose > 1)
+            Msg::Info("Patch %i failed (adapt #%i), adapting with increased size", iBadEl, iAdapt);
+        }
+      }
+
+    }                                                                       // End of adaptation loop
+
+    if (par.verbose > 1)
+      switch (success) {
+        case 1: Msg::Info("Patch %i succeeded", iBadEl); break;
+        case 0:
+          Msg::Info("Patch %i partially failed (measure "
+                    "above critical value but below target)", iBadEl);
+          break;
+        case -1: Msg::Info("Patch %i failed", iBadEl); break;
+      }
+
+    par.success = std::min(par.success, success);
+  }
+}
+
+
+}
+
+
+#endif
+
+
+void meshOptimizer(GModel *gm, MeshOptParameters &par)
+{
+#if defined(HAVE_BFGS)
+
+  double startTime = Cpu();
+  if (par.verbose > 0) Msg::StatusBar(true, "Optimizing mesh...");
+
+  std::vector<GEntity*> entities;
+  gm->getEntities(entities);
+
+  vertElVecMap vertex2elements;
+  elEntMap element2entity, bndEl2Ent;
+  elElMap el2BndEl;
+  elSet badElts;
+  for (int iEnt = 0; iEnt < entities.size(); ++iEnt) {
+    GEntity* &entity = entities[iEnt];
+    if (entity->dim() != par.dim ||
+        (par.onlyVisible && !entity->getVisibility())) continue;
+    Msg::Info("Computing connectivity and bad elements for entity %d...",
+              entity->tag());
+    calcVertex2Elements(par.dim, entity, vertex2elements);
+    if ((par.useGeomForPatches) || (par.useGeomForOpt))
+      calcElement2Entity(entity, element2entity);
+    if (par.useBoundaries) calcBndInfo(entity, el2BndEl, bndEl2Ent);
+    for (int iEl = 0; iEl < entity->getNumMeshElements(); iEl++) {                               // Detect bad elements
+      MElement *el = entity->getMeshElement(iEl);
+      if (el->getDim() == par.dim) {
+        if (par.patchDef->elBadness(el, entity) < 0.) badElts.insert(el);
+        else if (par.useBoundaries) {
+          elElMap::iterator bndElIt = el2BndEl.find(el);
+          if (bndElIt != el2BndEl.end()) {
+            MElement* &bndEl = bndElIt->second;
+            if (par.patchDef->bndElBadness(bndEl, bndEl2Ent[bndEl]) < 0.) badElts.insert(el);
+          }
+        }
+      }
+    }
+  }
+
+  if (par.patchDef->strategy == MeshOptPatchDef::STRAT_DISJOINT)
+    optimizeDisjointPatches(vertex2elements, element2entity,
+                            el2BndEl, bndEl2Ent, badElts, par);
+  else if (par.patchDef->strategy == MeshOptPatchDef::STRAT_ONEBYONE)
+    optimizeOneByOne(vertex2elements, element2entity,
+                     el2BndEl, bndEl2Ent, badElts, par);
+  else
+    Msg::Error("Unknown strategy %d for mesh optimization", par.patchDef->strategy);
+
+  if (par.verbose > 0) {
+    if (par.success == 1)
+      Msg::Info("Optimization succeeded");
+    else if (par.success == 0)
+      Msg::Warning("Optimization partially failed (all measures above critical "
+                    "value, but some below target)");
+    else if (par.success == -1)
+      Msg::Error("Optimization failed (some measures below critical value)");
+    par.CPU = Cpu()-startTime;
+    Msg::StatusBar(true, "Done optimizing mesh (%g s)", par.CPU);
+  }
+
+#else
+  Msg::Error("Mesh optimizer requires BFGS");
+#endif
+}
diff --git a/contrib/MeshOptimizer/MeshOptimizer.h b/contrib/MeshOptimizer/MeshOptimizer.h
new file mode 100644
index 0000000..b3ed894
--- /dev/null
+++ b/contrib/MeshOptimizer/MeshOptimizer.h
@@ -0,0 +1,41 @@
+// Copyright (C) 2014 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _MESHOPTIMIZER_H_
+#define _MESHOPTIMIZER_H_
+
+
+class GModel;
+class MeshOptParameters;
+
+
+void meshOptimizer(GModel *gm, MeshOptParameters &par);
+
+
+#endif
diff --git a/contrib/MeshOptimizer/doc/figures/log_barrier/Makefile b/contrib/MeshOptimizer/doc/figures/log_barrier/Makefile
new file mode 100644
index 0000000..515b395
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/log_barrier/Makefile
@@ -0,0 +1,4 @@
+%.pdf : %.tex
+	pdflatex --shell-escape $<
+clean :
+	${RM} *.gnuplot *.table *.aux *.log
diff --git a/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.pdf b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.pdf
new file mode 100644
index 0000000..c288af6
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.pdf differ
diff --git a/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.tex b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.tex
new file mode 100644
index 0000000..5cfc664
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier.tex
@@ -0,0 +1,16 @@
+\documentclass{standalone}
+\usepackage{tikz}
+\begin{document}
+\begin{tikzpicture}[yscale = 0.25, xscale = 2]
+  \draw[thick, ->] (0,0) -- (3.2,0) node[right] {$m$};
+  \draw[thick, ->] (0,0) -- (0,17) node[left] {$F_{\epsilon,\omega}$};
+%  \node at (2, 12) {$F_{\epsilon,\omega}(m) = (m - \omega)^2 + \log\Big(\frac{m - \epsilon} {\omega - \epsilon}\Big)^2$};
+  \foreach \y in {0, 5, 10, 15}
+    \draw[thick, shift={(0, \y)}] node[left] {$\y$}(-1pt, 0pt) -- (0pt,0pt) ;
+  \foreach \x in {0, 1, 2, 3}
+    \draw[thick, shift={(\x, 0)}] node[below] {$\x$}(0pt, -8pt) -- (0pt,0pt) ;
+  \clip(-1,-2) rectangle(3.5, 17);
+  \draw[very thick, dashed](0.2, 0) node[below]{$\epsilon$}-- (0.2, 20);
+  \draw[thick, domain = 0.2:3, samples=300] plot[id=opti] function{(log((x - 0.2)/ 0.8))**2 + (x - 1)**2}; 
+\end{tikzpicture}
+\end{document}
diff --git a/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.pdf b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.pdf
new file mode 100644
index 0000000..7140741
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.pdf differ
diff --git a/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.tex b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.tex
new file mode 100644
index 0000000..5aa30df
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/log_barrier/log_barrier_max.tex
@@ -0,0 +1,17 @@
+\documentclass{standalone}
+% Paper size: 3.58in,2.03in
+\usepackage{tikz}
+\begin{document}
+\begin{tikzpicture}[yscale = 0.25, xscale = 2]
+  \draw[thick, ->] (0,0) -- (3.2,0) node[right] {$m$};
+  \draw[thick, ->] (0,0) -- (0,17) node[left] {$F_{\epsilon,\omega}$};
+%  \node at (1.4, 12) {$F_{\epsilon,\omega}(m) = (m - \omega)^2 + \log\Big(\frac{m - \epsilon} {\omega - \epsilon}\Big)^2$};
+  \foreach \y in {0, 5, 10, 15}
+    \draw[thick, shift={(0, \y)}] node[left] {$\y$}(-1pt, 0pt) -- (0pt,0pt) ;
+  \foreach \x in {0, 1, 2, 3}
+    \draw[thick, shift={(\x, 0)}] node[below] {$\x$}(0pt, -8pt) -- (0pt,0pt) ;
+  \clip(-1,-2) rectangle(3.5, 17);
+  \draw[very thick, dashed](2.75, 0) node[below]{$\epsilon$}-- (2.75, 20);
+  \draw[thick, domain = 0:2.75, samples=300] plot[id=opti] function{(log((x - 2.75)/ -1.75))**2 + (x - 1)**2}; 
+\end{tikzpicture}
+\end{document}
diff --git a/contrib/MeshOptimizer/doc/figures/opti_process/Makefile b/contrib/MeshOptimizer/doc/figures/opti_process/Makefile
new file mode 100644
index 0000000..c57c1e8
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/opti_process/Makefile
@@ -0,0 +1,4 @@
+opti_process.pdf : opti_process.tex
+	pdflatex --shell-escape $<
+clean :
+	${RM} *.gnuplot *.table *.aux *.log
diff --git a/contrib/MeshOptimizer/doc/figures/opti_process/opti2.dat b/contrib/MeshOptimizer/doc/figures/opti_process/opti2.dat
new file mode 100644
index 0000000..c009375
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/opti_process/opti2.dat
@@ -0,0 +1,71 @@
+-2.64148E+00 0  
+-2.43013E+00 1  
+-1.70784E+00 2  
+-1.48840E+00 3  
+-1.24431E+00 4  
+-1.22296E+00 5  
+-1.46493E+00 6  
+-1.37456E+00 7  
+-1.06042E+00 8  
+-1.08719E+00 9  
+-7.98080E-01 10 
+-6.91630E-01 11 
+-5.29097E-01 12 
+-7.59110E-01 13 
+-7.96486E-01 14 
+-5.83650E-01 15 
+-5.67035E-01 16 
+-5.54370E-01 17 
+-5.58354E-01 18 
+-4.42153E-01 19 
+-5.31631E-01 20 
+-3.67621E-01 21 
+-2.35836E-01 22 
+-3.03352E-01 23 
+-1.23011E-01 24 
+-3.10858E-01 25 
+-2.79462E-01 26 
+-3.07822E-01 27 
+-3.90367E-01 28 
+-2.83299E-01 29 
+-3.25716E-01 30 
+-2.32968E-01 31 
+-6.45337E-02 32 
+-7.54033E-02 33 
+ 1.03627E-01 34 
+ 1.10993E-01 35 
+ 1.57424E-01 36 
+ 1.12755E-01 37 
+ 1.15172E-01 38 
+ 1.96417E-01 39 
+ 1.59601E-01 40 
+ 2.11292E-01 41 
+ 1.83952E-01 42 
+ 2.25986E-01 43 
+ 2.67051E-01 44 
+ 1.72728E-01 45 
+ 2.87346E-01 46 
+ 2.34241E-01 47 
+ 2.50449E-01 48 
+ 1.53213E-01 49 
+ 2.73509E-01 50 
+ 2.20303E-01 51 
+ 1.71445E-01 52 
+ 2.94302E-01 53 
+ 2.40149E-01 54 
+ 1.62477E-01 55 
+ 2.70177E-01 56 
+ 1.97067E-01 57 
+ 1.49844E-01 58 
+ 3.15566E-01 59 
+ 2.14724E-01 60 
+ 2.78222E-01 61 
+ 3.41295E-01 62 
+ 3.99265E-01 63 
+ 4.07313E-01 64 
+ 4.55684E-01 65 
+ 4.37392E-01 66 
+ 4.56385E-01 67 
+ 4.88812E-01 68 
+ 4.47293E-01 69 
+ 5.02562E-01 70 
diff --git a/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.pdf b/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.pdf
new file mode 100644
index 0000000..6d99b6d
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.pdf differ
diff --git a/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.tex b/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.tex
new file mode 100644
index 0000000..b6a59c1
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/figures/opti_process/opti_process.tex
@@ -0,0 +1,40 @@
+\documentclass{standalone}
+\usepackage{tikz}
+\begin{document}
+\begin{tikzpicture}[yscale = 0.06, xscale = 1.8, thick]
+  %\node at (-1.4, 40) {\Large $\displaystyle J^{\min} = \min_{e,j} \frac{J_{ej}}{J_e^0}$};
+  \draw[dashed, green!70!black](0.5, 0) node[below]{$\bar{\epsilon}$}-- (0.5, 75);
+  \begin{scope}[black]
+    \draw(-3,0) -- (2,0) node[right] {};
+    \foreach \x in {-2, -1, 0, 1, 2}
+      \draw[shift={(\x, 0)}] node[below] {$\x$}(0pt, -20pt) -- (0pt,0pt) ;
+  \end{scope}
+  \begin{scope}[red, yscale = 3]
+    \draw[dashed](-2.9, 0) node[below]{$\epsilon_0$}-- (-2.9, 25) ;
+    \draw[dashed](-0.358, 0) node[below]{$\epsilon_1$}-- (-0.358, 25);
+    \draw[dashed](0.193, 0) node[below]{$\epsilon_2$}-- (0.193, 25);
+    \begin{scope}
+      \clip(-3.5, 0) rectangle(2.4, 25);
+      \draw[domain = -3:2, samples=500] plot[id=opti1] function{(log((x + 2.9)/ 3.9))**2 + (x - 1)**2}; 
+      \draw[domain = -3:2, samples=500] plot[id=opti2] function{(log((x + 0.358)/ 1.358))**2 + (x - 1)**2}; 
+      \draw[domain = -3:2, samples=500] plot[id=opti3] function{(log((x - 0.193)/ 0.807))**2 + (x - 1)**2}; 
+    \end{scope}
+    \node at (-2.50, 25) {$f_{\epsilon_0,\omega}$};
+    \node at (-0.10, 25) {$f_{\epsilon_1,\omega}$};
+    \node at (0.45, 25) {$f_{\epsilon_2,\omega}$};
+    \foreach \y in {0, 5, 10, 15, 20}
+      \draw[shift={(2, \y)}] node[right] {$\y$}(0pt, 0pt) -- (1pt,0pt) ;
+    \draw[->] (2,0) -- (2,25) node[right] {$f_{\epsilon,\omega}$};
+  \end{scope}
+  \begin{scope}[blue]
+    \draw plot file {opti2.dat} node[right]{$m$};
+    \node at (-2.641, 0) {$\bullet$};
+    \node at (-0.3257, 30) {$\bullet$};
+    \node at (0.214, 60) {$\bullet$};
+    \node at (0.5025, 70) {$\bullet$};
+    \draw[->] (-3,0) -- (-3,75) node[left] {Iterations};
+    \foreach \y in {0, 30, 60}
+      \draw[shift={(-3, \y)}] node[left] {$\y$}(-1pt, 0pt) -- (0pt,0pt) ;
+  \end{scope}
+\end{tikzpicture}
+\end{document}
diff --git a/contrib/MeshOptimizer/doc/figures/patches/patch_def.png b/contrib/MeshOptimizer/doc/figures/patches/patch_def.png
new file mode 100644
index 0000000..ab24bab
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/patches/patch_def.png differ
diff --git a/contrib/MeshOptimizer/doc/figures/patches/patch_tangled.png b/contrib/MeshOptimizer/doc/figures/patches/patch_tangled.png
new file mode 100644
index 0000000..343bb76
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/patches/patch_tangled.png differ
diff --git a/contrib/MeshOptimizer/doc/figures/patches/patch_untangled.png b/contrib/MeshOptimizer/doc/figures/patches/patch_untangled.png
new file mode 100644
index 0000000..f9cc542
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/patches/patch_untangled.png differ
diff --git a/contrib/MeshOptimizer/doc/figures/patches/patchdef.xcf b/contrib/MeshOptimizer/doc/figures/patches/patchdef.xcf
new file mode 100644
index 0000000..6a50712
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/patches/patchdef.xcf differ
diff --git a/contrib/MeshOptimizer/doc/figures/untangling/linear.pdf b/contrib/MeshOptimizer/doc/figures/untangling/linear.pdf
new file mode 100644
index 0000000..54300e6
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/untangling/linear.pdf differ
diff --git a/contrib/MeshOptimizer/doc/figures/untangling/p2.pdf b/contrib/MeshOptimizer/doc/figures/untangling/p2.pdf
new file mode 100644
index 0000000..bc47412
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/untangling/p2.pdf differ
diff --git a/contrib/MeshOptimizer/doc/figures/untangling/p2_bad.pdf b/contrib/MeshOptimizer/doc/figures/untangling/p2_bad.pdf
new file mode 100644
index 0000000..895b9f3
Binary files /dev/null and b/contrib/MeshOptimizer/doc/figures/untangling/p2_bad.pdf differ
diff --git a/contrib/MeshOptimizer/doc/mesh_optimization.tex b/contrib/MeshOptimizer/doc/mesh_optimization.tex
new file mode 100644
index 0000000..87b6038
--- /dev/null
+++ b/contrib/MeshOptimizer/doc/mesh_optimization.tex
@@ -0,0 +1,831 @@
+%
+% Template for IDIHOM technical reports
+%
+%  to be processed with pdflatex
+%
+% based on initial design by K. Hillewaert
+
+\documentclass[12pt,a4paper,a4wide]{article}
+
+% ------------------------------------------------------------------------------
+% packages
+% ------------------------------------------------------------------------------
+
+% inclusion of non ps-graphics
+\usepackage{graphicx,psfrag}
+\usepackage{subfig}
+\usepackage{epstopdf}
+\usepackage{amsfonts,amsmath,amssymb,amscd}
+% typesetting headers and footers 
+\usepackage{fancyhdr}
+%\usepackage{lastpage}
+
+% fancy links
+\usepackage{color}
+\usepackage[citecolor=blue,linkcolor=blue,colorlinks=true]{hyperref}
+
+\usepackage{parskip}
+%\usepackage{alltt}
+\usepackage{verbatim}
+\usepackage[latin1]{inputenc}
+\usepackage{float}
+\usepackage{url}
+%\usepackage[francais]{babel}
+%\def\baselinestretch{2}
+
+%\floatstyle{ruled}
+%\newfloat{algorithm}{tbp}{loa}
+%\floatname{algorithm}{Algorithm}
+
+\graphicspath{{figures/}}
+
+\renewcommand{\vec}[1]{\ensuremath{\text{\boldmath $#1$\unboldmath}}}
+\newcommand{\mvx}{\vec{x}}
+
+% ------------------------------------------------------------------------------
+% modify here the properties of the document
+% ------------------------------------------------------------------------------
+
+%\newcommand{\reference}{D4.1-30b}
+%\newcommand{\shorttitle}{Curvilinear Mesh Generation Capability in Gmsh}
+%\newcommand{\theauthor}{T. Toulorge, J.F. Remacle}
+ 
+\title{Mesh Optimization in Gmsh}
+\author{Thomas Toulorge}
+\date{November 2014}
+
+% ------------------------------------------------------------------------------
+% page title and table of contents
+% ------------------------------------------------------------------------------
+
+\begin{document}
+
+% ------------------------------------------------------------------------------
+% define headers and footers
+% ------------------------------------------------------------------------------
+
+%\pagestyle{fancy}
+
+% header from left to right
+%\lhead{\includegraphics[width=0.1\textwidth]{figures/idihom_105px}}
+%\chead{}
+%\rhead{\small{\textit{\reference~-~\shorttitle}}}
+%\renewcommand{\headrulewidth}{0.4pt}
+
+% footer from left to right
+%\renewcommand{\footrulewidth}{0.4pt}
+%\lfoot{\nouppercase{\leftmark}}
+%\cfoot{}
+%\rfoot{\thepage/\pageref{LastPage}}
+%\newcommand{\chaptermark}[1]{\markboth{#1}{}}
+
+% ------------------------------------------------------------------------------
+% main text 
+% ------------------------------------------------------------------------------
+
+%\newpage
+\maketitle
+
+
+\section{Introduction}
+
+The quality of the meshes generated by Gmsh in a first step is
+sometimes not satisfying. The mesh optimization tool aims to
+improve the meshes with respect to a given set of quality measures
+without performing any topological operation. The tool is designed
+to improve locally bad (or even invalid) meshes by using an
+optimization algorithm that moves the mesh vertices.
+
+
+\section{Method}
+
+
+\subsection{Problem Definition}\label{sec:problem-def}
+
+In order to improve the mesh, an optimization problem is defined:
+\[
+\min_{\mvx_i} F(\mvx_i)
+\]
+where the variables $\mvx_i$ are the vertex positions, and the objective
+function $F$ takes into account the quality measures of interest. The
+position of a vertex in the interior of the computational domain
+is normally expressed in terms of its spatial coordinates ($x$, $y$ and
+$z$). Vertices classified on a boundary are allowed to move along the
+corresponding geometric entity, in case a CAD model is available:
+the variables associated to such a vertex are then its parametric
+coordinates, as provided by the CAD modeler. Thus, vertices
+classified on model edges will have as only degree of freedom the
+parametric coordinate $u$, while vertices classified on model faces
+will have two degrees of freedom $u$ and $v$. Vertices classified on
+a model vertex will not be allowed to move.
+
+The objective function $F$ is the function of all variables $\mvx_i$
+to be minimized by moving the nodes. It is the sum of several
+\emph{contributions}:
+\[
+F(\mvx_i) = \sum_{j} F_j(\mvx_i),
+\]
+where each contribution $F_j(\mvx_i)$ is actually a function of
+a \emph{measure} $m_j(\mvx_i)$:
+\[
+F_j(\mvx_i) = f_j[m_j(\mvx_i)].
+\]
+A measure is usually a quantity of interest
+characterizing the quality or the validity of the mesh (for
+instance the scaled Jacobian in high-order meshes). Nevertheless,
+a contribution proportional to the square of the node displacement
+is often included in the objective function, so that the mesh
+remains as similar as possible to the original one, while complying
+with other quality constraints.
+
+
+\subsection{Moving Barriers}
+
+Most often, the mesh optimizer is used to change the mesh so that a
+quality or a validity measure lies within a given range of values.
+For this purpose, a \emph{log barrier} is used:
+\[
+f_{\epsilon,\omega}(m) = (m - \omega)^2 +
+\log\left(\frac{m-\epsilon}{\omega-\epsilon}\right)^2,
+\]
+where $\omega$ is the optimal value of the measure $m$, and $\epsilon$
+is a value for which the function blows up (cf.
+figure~\ref{fig:barrier}). Thus, setting $\epsilon<\omega$ ensures that
+the measure $m$ will never drop below the value of $\epsilon$ during the
+optimization procedure. Likewise, setting $\epsilon>\omega$ ensures that
+$m$ will never exceed $\epsilon$.
+
+\begin{figure}
+%\begin{center}
+\centering
+\includegraphics[width=0.45\textwidth]{log_barrier/log_barrier}
+\includegraphics[width=0.45\textwidth]{log_barrier/log_barrier_max}
+%\end{center}
+\caption{Barrier function for $\omega=1$ and
+$\epsilon<\omega$ (left) or $\epsilon>\omega$
+(right)\label{fig:barrier}} 
+\end{figure}
+
+In order for the measure $m$ to remain in the domain of definition of
+the barrier function $f_{\epsilon,\omega}$, the value of $\epsilon$ must
+be lower than the minimum of $m$ in the domain or subdomain of interest.
+Thus, a constraint forcing the measure $m$ to increase to reach a target
+minimum value $\bar{\epsilon}$ is introduced through a \emph{moving
+barrier}: a sequence of optimization problems is solved. A conjugate
+gradient optimization algorithm is applied to each problem, so that $m$
+progressively increases. Each run is stopped after a fixed number of
+iterations, when stagnation in $m$ is detected, or when the target
+criterion $m\geq\bar{\epsilon}$ is reached. Between two runs, $\epsilon$
+is reset to a value just below the current minimum value of $m$, so that
+the variables remain in the domain of realizability.
+Fig.~\ref{fig:opti_process} illustrates this process. The same method
+is applied for a maximum constrain.
+
+
+\subsection{Passes}
+
+It is difficult to handle several moving barriers at the same
+time. This is why the optimization procedure can be
+used in successive \emph{passes}, between which the objective function
+changes. For instance, a moving barrier can be used in a first pass to
+bring $m$ to a threshold $m_{\min}$. In a second pass, the objective
+function is composed of a fixed barrier set to $m_{\min}$, plus a moving
+barrier that forces $m$ to drop below a value $m_{\max}$. This technique
+can also prove useful when one wants to impose a constraint on a crucial
+measure $m_1$ in a first pass, and then improve another less important
+one $m_2$ in a second pass. 
+
+\begin{figure}
+%\begin{center}
+\centering
+\includegraphics[width=0.95\textwidth]{opti_process/opti_process}
+%\end{center}
+\caption{Optimization process: three successive series of
+(maximum) 30 conjugate gradient iterations\label{fig:opti_process}} 
+\end{figure}
+
+
+\subsection{Strategy and Mesh Patches}\label{sec:strategy}
+
+A common use case for the mesh optimization tool is when only a few
+small portions of the mesh do not comply with the required quality
+criteria. Involving the whole mesh in the optimization process is then
+unnecessary, or even prohibitively costly. Therefore, the tool makes it
+possible to select \emph{patches} of the mesh (or ``blobs'') in which
+the optimization is performed, while the rest of the domain is left
+untouched.
+
+The first step in the definition of patches consists in identifying
+the mesh elements that do not satisfy the user-defined criteria. A
+primary patch containing a user-defined number $N$ of layers of elements
+surrounding each ``bad'' element is then built. A geometrical criterion
+can also be added: among the elements forming the $N$ layers around the
+bad element, only those located within a user-defined distance are
+retained. This additional criterion is particularly useful when dealing
+with anisotropic meshes, as the boundary layer mesh illustrated in
+Fig.~\ref{fig:patches}.
+%The optimal values for the number of layers $N$
+%and the distance factor are case-dependant: they should involve the lowest
+%number of elements while still leaving the optimization procedure enough
+%freedom to reach a node configuration that complies with the target mesh
+%quality. In complex cases, a unique value of these parameters for the whole
+%mesh may lead to patches that are too large at some locations, but too small
+%at others. It is then beneficial to use the untangling procedure in an
+%adaptive loop where the patch size is progressively increased in case
+%the optimization procedure fails to reach the quality criteria.
+
+A potential problem with the patches created as described above is
+that they may overlap. Let us consider the case of a subdomain built
+around an bad element, that contains another bad element close to its
+boundary: this patch may not provide the necessary degrees of freedom
+to fix the second bad element, thus the optimization procedure can
+fail to reach the mesh quality target in this patch.
+In order to avoid such problems, the user can choose between two
+strategies:
+\begin{description}
+\item[Disjoint patches] Overlapping patches are detected and
+merged. This strategy ensures that each invalid element in a patch
+has enough surrounding elements for the untangling procedure to
+be successful, provided the primary patches are large enough, but
+it may lead to large patches, which can be computationally expensive.
+\item[``One-by-one'' strategy] The untangling procedure is applied
+sequentially to each patch, with the objective of fixing only
+the invalid element around which it is built, while allowing other
+invalid elements in the same patch to remain broken. This strategy
+lets the untangling procedure work on small-size patches.
+\end{description}
+
+\begin{figure}
+\begin{center}
+\begin{tabular}{ccc}
+\includegraphics[width=0.33\textwidth]{patches/patch_tangled}&
+\includegraphics[width=0.33\textwidth]{patches/patch_def}&
+\includegraphics[width=0.33\textwidth]{patches/patch_untangled}
+\end{tabular}
+\end{center}
+\caption{Detail of a boundary-layer mesh on a curved geometry:
+tangled quadratic mesh (left), patch definition with $N=5$ layers
+in red and geometrical criterion represented by a green circle
+(center), untangled mesh (right).
+\label{fig:patches}}
+\end{figure}
+
+
+\section{Implementation}
+
+
+\subsection{General organization}\label{sec:gen-org}
+
+The code of the optimization tool itself is divided into three main
+parts:
+
+\begin{itemize}
+\item The class \texttt{Patch} handles the information needed from
+and provided to the mesh patch, such as the node coordinates and the
+value of the quality measures and their gradients. It allows to work
+indifferently with physical and parametric node coordinates, and to
+avoid modifying the actual mesh data in Gmsh until the optimization
+has completed successfully.
+\item The class \texttt{MeshOpt} is in charge of setting up and
+running the optimization procedure in a given patch. The computation
+of the objective function, as well as the assessment of the success
+or the failure of the optimization procedure, are handled by classes
+that represent each contribution. These classes derived from
+\texttt{ObjContrib} are called from \texttt{MeshOpt} through the
+class \texttt{ObjectiveFunction}.
+\item The function \texttt{meshOptimizer} and the related functions
+perform the patch selection and execute the overall optimization
+process.
+\end{itemize}
+
+In order to tailor the mesh optimization tool to a new application, it
+is necessary to carry out the following developments:
+\begin{itemize}
+\item Implement the main function setting the input parameters (see
+Section~\ref{sec:input-param}) and calling the function
+\texttt{meshOptimizer}.
+\item Implement the class derived from \texttt{MeshOptPatchDef}
+that drives the patch selection process (see
+Section~\ref{sec:patch-selec}).
+\item Implement the classes derived from \texttt{ObjContrib} that
+compute the different contributions to the objective function and
+check the corresponding criteria (see Section~\ref{sec:obj-func}).
+\item Implement the appropriate measure(s) in the class
+\texttt{Patch}.
+\end{itemize}
+
+These steps are detailed in the following sections.
+
+\subsection{Input Parameters}\label{sec:input-param}
+
+The input parameters that control the optimization process are
+provided to \texttt{meshOptimizer} through the structure
+\texttt{MeshOptParameters}:
+
+\begin{verbatim}
+struct MeshOptParameters {
+  int dim ;
+  bool onlyVisible ;
+  bool fixBndNodes;
+  bool useGeomForPatches, useGeomForOpt;
+  MeshOptPatchDef *patchDef;
+  std::vector<MeshOptPass> pass;
+  int displayInterv;
+  int verbose;
+  int success;
+  double CPU;
+};
+\end{verbatim}
+
+This structure carries the following information:
+\begin{itemize}
+\item The fields \texttt{dim} and \texttt{onlyVisible} specify the
+geometric entities (2D or 3D, all of them or only the visible ones)
+in which the mesh will be optimized.
+\item The field \texttt{fixBndNodes} determines whether the nodes
+located on the boundaries (i.e. the nodes classified on model
+entities of dimension \texttt{dim-1}) should be fixed or allowed to
+move along their respective model entity.
+\item The fields \texttt{useGeomForPatches} and \texttt{useGeomForOpt}
+determine whether the geometrical information (i.e. on which model
+entity each element is classified) should be passed respectively:
+\begin{itemize}
+\item to \texttt{patchDef} (see Section~\ref{sec:patch-selec}), in
+order to take it into account in the selection of mesh patches,
+\item to the classes \texttt{MeshOpt} and \texttt{Patch}, in order
+to take it into account in the evaluation of quality measures.   
+\end{itemize}
+If both fields are set to \texttt{false}, the geometrical information
+is not computed, which may result in an improved performance.
+\item The field \texttt{patchDef} is a pointer on an instance of a
+class derived from \texttt{MeshOptPatchDef}, that implements the
+methods needed to select the mesh patches (see
+Section~\ref{sec:patch-selec}).
+\item The vector \texttt{pass} contains instances of the structure
+\texttt{MeshOptPass}, which determines the optimization procedure
+for each pass, as described hereafter.
+\item The fields \texttt{displayInterv} and \texttt{verbose} control
+the output (respectively the iteration interval at which the progress
+of the Conjugate Gradient procedure is printed to screen and the
+overall level of verbosity).
+\item The fields \texttt{success} and \texttt{CPU} indicate whether
+the overall procedure has been successful (i.e. whether the target
+values for the quality measures have been reached) and how much CPU
+time it used.
+\end{itemize}
+
+The structure \texttt{MeshOptPass}, that specifies the optimization
+procedure for each pass, is as follows:
+
+\begin{verbatim}
+struct MeshOptPass {
+  std::vector<ObjContrib*> contrib;
+  int maxOptIter;
+  int maxParamUpdates;
+};
+\end{verbatim}
+
+where:
+
+\begin{itemize}
+\item The vector \texttt{contrib} contains pointers on instances
+of classes derived from \texttt{ObjContrib}, each instance
+describing a contribution to the objective function (see
+Section~\ref{sec:obj-func}).
+\item The field \texttt{maxOptIter} gives the maximum number of
+Conjugate Gradient iterations to be performed for a given objective
+function (i.e. before a potential log barrier is moved).
+\item The field \texttt{maxParamUpdates} determines the maximum
+number of times the objective function is changed, i.e. the number
+of times a potential log barrier is moved.
+\end{itemize}
+
+
+\subsection{Patch Selection}\label{sec:patch-selec}
+
+The patch selection process is controlled by an application-specific
+class that is derived from \texttt{MeshOptPatchDef}:
+
+\begin{verbatim}
+class MeshOptPatchDef {
+public:
+  enum { STRAT_CONNECTED, STRAT_ONEBYONE };
+  int strategy;
+  int minLayers, maxLayers;
+  union {
+    struct {
+      int maxPatchAdapt;
+      int maxLayersAdaptFact;
+      double distanceAdaptFact;
+    };
+    bool weakMerge;
+  };
+  virtual ~MeshOptPatchDef() {}
+  virtual double elBadness(MElement *el,
+                           GEntity* gEnt) const = 0;
+  virtual double maxDistance(MElement *el) const = 0;
+  virtual int inPatch(const SPoint3 &badBary,
+                      double limDist,
+                      MElement *el,
+                      GEntity* gEnt) const = 0;
+protected:
+  bool testElInDist(const SPoint3 &P, double limDist,
+                    MElement *el) const;
+};
+\end{verbatim}
+
+The fields of this class contain information about the strategy
+and the number of layers in the patch:
+
+\begin{itemize}
+\item The field \texttt{strategy} specifies the overall strategy
+with (\texttt{STRAT\_DISJOINT} for merging overlapping patches
+or \texttt{STRAT\_ONEBYONE} for a sequential treatment, see
+Section~\ref{sec:strategy}).
+\item The fields \texttt{minLayers} and \texttt{maxLayers} give
+respectively the minimum and maximum amount of layers of elements
+surrounding the bad element to be included in the patch.
+\item Depending on the strategy chosen, additional information
+must be provided:
+\begin{itemize}
+\item If the strategy is \texttt{STRAT\_DISJOINT}, the field
+\texttt{weakMerge} specifies whether two patches are merged if
+they overlap (value \texttt{false}), or only if a bad element
+of one patch is included in the other one (value \texttt{true}).
+\item If the strategy is \texttt{STRAT\_ONEBYONE}, an adaptive
+process loop is used: the patch size is progressively increased
+in case the optimization procedure fails. The maximum number of
+adaptations is then controlled by the field \texttt{maxPatchAdapt}.
+The growth factor in maximum number of layers and in the maximum
+distance criterion at each adaptation is specified by the fields
+\texttt{maxLayersAdaptFact} and \texttt{distanceAdaptFact}
+respectively.
+\end{itemize}
+\end{itemize}
+
+Application-specific control of the patch selection is achieved
+through the pure virtual methods \texttt{elBadness},
+\texttt{maxDistance} and \texttt{inPatch}, that have to be
+implemented in a derived class:
+\begin{itemize}
+\item \texttt{elBadness} determines the ``badness'' of an element:
+it returns a negative value for a bad element and a positive value
+for a good element. The return value is a floating point instead of
+a boolean because the tool always deals with the patches in
+decreasing order of badness in the \texttt{STRAT\_ONEBYONE} strategy.
+\item \texttt{maxDistance} returns the value the maximum distance
+criterion for a given bad element. This value matters only if the
+criterion is used in the method \texttt{inPatch}.
+\item \texttt{inPatch} determines whether a given element should be
+included in a patch. It returns an integer value:
+\begin{itemize}
+\item $-1$ means that the element should not be included in the patch,
+\item $0$ means that the element should be included in the patch only if
+it belongs to a layer below \texttt{minLayers},
+\item $1$ means that the element should be included in the patch if
+it belongs to a layer below \texttt{maxLayers}.
+\end{itemize}
+This system makes the patch selection very flexible. For instance, it is
+possible to exclude unconditionally certain type of elements, or to take
+into account certain criteria only in layers between \texttt{minLayers}
+and \texttt{maxLayers}. Moreover, the protected method
+\texttt{testElInDist} can be called from \texttt{inPatch} for an
+efficient test of the distance criterion, if desired.
+\end{itemize}
+
+
+
+\subsection{Objective Function}\label{sec:obj-func}
+
+As explained in Section~\ref{sec:problem-def}, the objective
+function is defined as a sum of contributions, each
+contribution being a function of a single measure. In practice,
+it is important to follow the progress of the measure to determine
+whether the optimization procedure is successful. To this end, the
+extrema (minimum and maximum) of the measure over the patch under
+consideration are evaluated during the computation of the contribution.
+Three criteria are associated to each contribution:
+\begin{itemize}
+\item A success criterion tests whether the minimum (or maximum)
+of the measure is greater (respectively lower) than the target value,
+\item A failure criterion tests whether the minimum (or maximum)
+of the measure is lower (respectively greater) than a critical value
+(for instance the value 0 for the scaled Jacobian in high-order meshes,
+below which the mesh is invalid),
+\item A stagnation criterion tests whether the minimum (or maximum)
+of the measure stagnates compared to the start of the conjugate
+gradient algorithm.
+\end{itemize}
+Thus, a mesh that does not fulfill the failure criterion anywhere can
+be considered as acceptable, even if the target has not been reached
+in some patches. The stagnation criterion avoids wasting
+computation time in problematic cases by stopping an optimization
+procedure that does not improve the measure.
+
+As mentioned in Section~\ref{sec:gen-org}, the contributions
+are defined by specifying in \texttt{MeshOptPass} a vector of
+pointers on instances of classes derived from \texttt{ObjContrib}.
+The class \texttt{ObjContrib} is as follows:
+
+\begin{verbatim}
+class ObjContrib
+{
+public:
+  ObjContrib(std::string mesName, std::string name);
+  virtual ~ObjContrib() {}
+  virtual ObjContrib *copy() const = 0;
+  const double getMin() { return _min; }
+  const double getMax() { return _max; }
+  const std::string &getName() const { return _name; }
+  const std::string &getMeasureName() const {
+    return _measureName;
+  }
+  virtual void initialize(Patch *mesh) = 0;
+  virtual bool fail() = 0;
+  virtual bool addContrib(double &Obj,
+                          alglib::real_1d_array &gradObj) = 0;
+  virtual void updateParameters() = 0;
+  virtual bool targetReached() = 0;
+  virtual bool stagnated() = 0;
+  virtual void updateMinMax() = 0;
+  void updateResults();
+
+protected:
+  static const double BIGVAL;
+  ObjContrib *_parent;
+  std::string _measureName, _name;
+  double _min, _max;
+};
+\end{verbatim}
+
+A class defining a contribution should derive from \texttt{ObjContrib}.
+One instance should be defined through the constructor in the function
+calling the optimization tool, and passed through \texttt{MeshOptPass}.
+Then, a new copy of this ``parent'' instance is used for each patch.
+\texttt{ObjContrib} stores the pointer to the parent instance
+(\texttt{\_parent}), the name of the contribution and the corresponding
+measure (\texttt{\_name}, \texttt{\_measureName}) for output purposes, and
+the extrema of the measure (\texttt{\_min}, \texttt{\_max}) for the
+evaluation of target criteria. The method \texttt{updateResults} updates
+the extrema of the measure in the parent instance for reporting purposes.
+A derivative class should implement the following methods:
+
+\begin{itemize}
+\item The constructor \texttt{ObjContrib} may be needed if fixed
+user-defined parameters shall be provided to the contribution (for
+instance, a weight factor in the objective function).
+\item The method \texttt{copy} returns a new copy of the instance.
+\item The method \texttt{initialize} is in charge of initializing
+the contribution for each patch, i.e. setting up the fields and
+calling the initialization methods of the measure in the class
+\texttt{Patch}.
+\item The method \texttt{fail} returns whether the measure fails
+to fulfill a critical criterion. The whole process is considered
+as failed if this method returns \texttt{true} for at least one
+of the patches at the end of the optimization procedure.
+\item The method \texttt{addContrib} computes the contribution
+and its gradients and evaluates the extrema of the measure at
+the same time.
+\item The method \texttt{updateParameters} recalculates the
+parameters of the contribution (e.g. the blow-up value $\epsilon$
+for a log barrier). It is called before each run of the
+conjugate gradient algorithm.
+\item The method \texttt{targetReached} checks whether the target
+value has been reached for the corresponding measure. The
+optimization procedure for a patch is considered successful
+and stops when this method returns \texttt{true} for all the
+contributions.
+\item The method \texttt{stagnated} checks whether the corresponding
+measure stagnates compared to its value at the beginning of the
+conjugate gradient run. In case it returns \texttt{true} for at least
+one contribution, the run is stopped.
+\item The method \texttt{updateMinMax} recomputes the extrema of
+the corresponding measure.
+\end{itemize}
+
+The derivative class is thus in charge of evaluating the measures
+by calling the appropriate methods of the class \texttt{Patch},
+applying the function to it and defining the success, failure and
+stagnation criteria. In order to make the implementation easier
+and flexible, several functions along with the corresponding
+criteria are already implemented:
+
+\begin{itemize}
+\item The class \texttt{ObjContribFuncSimple} simply gives
+the value of the measure, with no particular criterion (it is always
+successful, never fails and never stagnates).
+\item The class \texttt{ObjContribFuncBarrierMovMin} implements
+a moving log barrier against the minimum of the measure, with a
+user-defined critical value.
+\item The class \texttt{ObjContribFuncBarrierMovMax} performs
+the same role for the  maximum of the measure.
+\item The class \texttt{ObjContribFuncBarrierFixMinMovMax} sets
+two log barriers: a fixed one against the minimum of the measure
+and a moving one against the maximum of the measure.
+\end{itemize}
+
+It is then possible to implement a contribution as a class deriving
+from \texttt{ObjContrib} and a template parameter that is
+instantiated with one of the function classes described above.
+
+
+\section{Applications}
+
+\subsection{High-Order Mesh Optimizer}
+
+The generation of a high-order mesh with Gmsh starts with creating a
+straight sided mesh. Then, each mesh entity corresponding to a curved
+boundary of the domain is curved by adding high-order mesh points on
+the model entity on which it is classified. This naive procedure does
+not ensure that all the elements of the final curved mesh are valid,
+as illustrated in Figure \ref{fig:untangling}. The high-order mesh
+optimizer aims to fix the invalid elements created by this process
+by ensuring that their scaled Jacobian, whose bounds are evaluated in
+a robust manner~\cite{bounds-jcp}, is positive and lies within a
+user-defined range $[J_{\min}, J_{\max}]$. More details are available
+in Ref.~\cite{untangling-jcp}.
+
+\begin{figure}
+  \begin{center}
+  \begin{tabular}{ccc}
+  \includegraphics[width=0.3\textwidth]{untangling/linear} &
+  \includegraphics[width=0.3\textwidth]{untangling/p2_bad} &
+  \includegraphics[width=0.3\textwidth]{untangling/p2}\\
+  First-order mesh & High-order vertices &\textbf{Untangling}
+  \end{tabular}
+\end{center}
+\caption{Straight sided mesh (left) basic curvilinear (quadratic)
+mesh with tangled elements (center) and untangled mesh (right).
+\label{fig:untangling}}
+\end{figure}
+
+To this end, elements whose scaled Jacobian lies outside the
+range $[J_{\min}, J_{\max}]$ are considered as bad elements. Two
+optimization passes are defined. In the first pass, two
+contributions are included: the square of the node displacement
+(see Section~\ref{sec:problem-def}) and a moving log barrier against
+the minimum of the scaled Jacobian, with $J_{\min}$ as target value
+and $0$ as critical value. In the second pass, the moving barrier
+against the minimum scaled Jacobian is replaced by a fixed barrier
+on the minimum scaled Jacobian plus a moving barrier on the maximum
+scaled Jacobian with $J_{\max}$ as target value.
+
+
+The high-order mesh optimizer is accessible from the ``High order
+tools'' window in Gmsh's graphical interface. The parameters are
+as follows:
+
+\begin{itemize}
+\item \texttt{Target Jacobian range} corresponds to $J_{\min}$ and
+$J_{\max}$.
+\item \texttt{Number of layers} is the maximum number of layers
+around a bad element to be included in a patch (see \texttt{minLayers}
+in Section~\ref{sec:patch-selec}).
+\item \texttt{Distance factor} controls the distance criterion
+for the creation of patches (see Section~\ref{sec:patch-selec}). The
+factor is multiplied by the maximum distance, among all high-order
+nodes in a bad element, between the node and the corresponding location
+in a straight-sided version of the bad element.
+\item \texttt{Boundary nodes} determines whether the boundary nodes
+are fixed or are allowed to move along the corresponding boundary
+in case a CAD model is available.
+\item \texttt{Weight on node displacement} is the relative weight
+of the node displacement contribution compared to the Jacobian
+contributions.
+\item \texttt{Maximum number of iterations} is the maximum number
+of iterations in the Conjugate Gradient algorithm (see
+\texttt{maxOptIter} in Section~\ref{sec:input-param}).
+\item \texttt{Max. number of barrier updates} is the maximum number
+of times the log barriers are moved (see \texttt{maxParamUpdates} in
+Section~\ref{sec:input-param}).
+\item \texttt{Strategy} determines the strategy for the treatment of
+patches (see Sections~\ref{sec:strategy} and~\ref{sec:patch-selec}).
+\item \texttt{Max. number of blob adaptation iter.},
+\texttt{Num. layer adaptation factor} and
+\texttt{Distance adaptation factor} control the adaptation of the
+patch size in the ``adaptive one-by-one'' strategy (see
+\texttt{maxPatchAdapt}, \texttt{maxLayersAdaptFact} and
+\texttt{distanceAdaptFact} in Section~\ref{sec:patch-selec}).
+\end{itemize}
+
+These options are likely to change as the high-order mesh
+optimizer is being further developed.
+
+
+\subsection{Mesh Quality Optimizer}
+
+The mesh quality optimizer aims to improve the quality of meshes,
+as measured by the ``inverse condition number'' quality metric.
+The elements below a quality threshold are marked as bad, and a
+unique optimization pass includes two contributions: the square
+of the node displacement (see Section~\ref{sec:problem-def}) and
+a moving log barrier against the minimum of the quality measure.
+
+The mesh quality optimizer is only accessible through Gmsh's API
+in C++ or Python. It is launched by the function
+\texttt{MeshQualityOptimizer}, that take as arguments a pointer to
+an instance of GModel and a structure \texttt{MeshQualOptParameters}
+as follows:
+\begin{verbatim}
+struct MeshQualOptParameters {
+  bool onlyValidity;
+  bool excludeQuad, excludeHex, excludePrism, excludeBL;
+  double minTargetIdealJac;
+  double minTargetInvCondNum;
+  double weight;
+  int nbLayers;
+  int dim;
+  int maxOptIter;
+  int maxBarrierUpdates;
+  bool onlyVisible;
+  double distanceFactor;
+  bool fixBndNodes;
+  int strategy;
+  int maxPatchAdapt;
+  int maxLayersAdaptFact;
+  double distanceAdaptFact;
+  int SUCCESS;
+  double minIdealJac, maxIdealJac;
+  double minInvCondNum, maxInvCondNum;
+  double CPU;
+
+  MeshQualOptParameters ()
+    : onlyValidity(false), excludeQuad(false),
+      excludeHex(false), excludePrism(false), excludeBL(false),
+      minTargetIdealJac(0.1), minTargetInvCondNum(0.1),
+      weight(1.), nbLayers(6), dim(3), maxOptIter(300),
+      maxBarrierUpdates(50), onlyVisible(true),
+      distanceFactor(12), fixBndNodes(false), strategy(0),
+      maxPatchAdapt(3), maxLayersAdaptFact(2),
+      distanceAdaptFact(2.), CPU(0.), minIdealJac(0.),
+      maxIdealJac(0.), minInvCondNum(0.), maxInvCondNum(0.),
+      SUCCESS(-1)
+  {
+  }
+};
+\end{verbatim}
+
+Many parameters correspond directly to those of
+\texttt{MeshOptParameters} and \texttt{PatchDef} described in
+Sections~\ref{sec:input-param} and~\ref{sec:patch-selec}. The
+differences are:
+\begin{itemize}
+\item The boolean \texttt{onlyValidity} forces the optimizer to
+use the ``ideal Jacobian'' of the element instead of the inverse
+condition number when set to \texttt{true}.
+\item The booleans \texttt{excludeQuad}, \texttt{excludeHex} and
+\texttt{excludePrism} make it possible to exclude from the
+optimization the quadrangular, prismatic and hexahedral elements
+respectively.
+\item The boolean \texttt{excludeBL}, when set to \texttt{true},
+excludes the boundary layer elements from the optimisation.
+\item The field \texttt{minTargetIdealJac} sets the target value
+for the minimum ideal Jacobian (if \texttt{onlyValidity} is
+\texttt{true}).
+\item The field \texttt{minTargetInvCondNum} sets the target
+value for the inverse condition number (if \texttt{onlyValidity}
+is \texttt{false}).
+\item The field \texttt{weight} is the relative weight of the node
+displacement contribution compared to the inverse condition number
+or Jacobian contribution.
+\item The field \texttt{strategy} determines the strategy in the
+manner of the patch selection options in
+Section~\ref{sec:patch-selec}: $0$ corresponds to
+\texttt{STRAT\_DISJOINT} with \texttt{weakMerge} set to
+\texttt{false}, $1$ corresponds to \texttt{STRAT\_ONEBYONE}
+and $2$corresponds to \texttt{STRAT\_DISJOINT} with
+\texttt{weakMerge} set to \texttt{true}.
+\item The fields \texttt{minIdealJac} and \texttt{maxIdealJac}
+return the extrema of the ideal Jacobian in the output mesh
+(if \texttt{onlyValidity} is \texttt{true}).
+\item The fields \texttt{minInvCondNum} and
+\texttt{maxInvCondNum} return the extrema of the inverse condition
+number in the output mesh (if \texttt{onlyValidity} is
+\texttt{false}).
+\end{itemize}
+
+These options are likely to change as the mesh quality optimizer
+is being further developed.
+
+%-----------------------------------------
+%\clearpage
+%\bibliographystyle{abbrv}
+%\bibliography{D41-30b}
+
+
+\begin{thebibliography}{2}
+
+\bibitem{bounds-jcp}
+A.~Johnen, J.-F.~Remacle, and C.~Geuzaine.
+\newblock Geometrical validity of curvilinear finite elements.
+\newblock {\em J. Comput. Phys.}, 233:359--372, 2013.
+
+\bibitem{untangling-jcp}
+T.~Toulorge, C.~Geuzaine, J.-F. Remacle, and J.~Lambrechts.
+\newblock Robust untangling of curvilinear meshes.
+\newblock {\em J. Comput. Phys.}, 254:8--26, 2013.
+
+\end{thebibliography}
+
+
+\end{document}
diff --git a/contrib/MeshQualityOptimizer/CMakeLists.txt b/contrib/MeshQualityOptimizer/CMakeLists.txt
new file mode 100644
index 0000000..af7c61f
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
+#
+# See the LICENSE.txt file for license information. Please report all
+# bugs and problems to the public mailing list <gmsh at geuz.org>.
+
+set(SRC
+  MeshQualityOptimizer.cpp
+)
+
+file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.hpp)
+append_gmsh_src(contrib/MeshQualityOptimizer "${SRC};${HDR}")
diff --git a/contrib/MeshQualityOptimizer/MeshQualityObjContribIdealJac.h b/contrib/MeshQualityOptimizer/MeshQualityObjContribIdealJac.h
new file mode 100644
index 0000000..3f2245f
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/MeshQualityObjContribIdealJac.h
@@ -0,0 +1,98 @@
+// TODO: Copyright
+
+#ifndef _MESHQUALITYOBJCONTRIBIDEALJAC_H_
+#define _MESHQUALITYOBJCONTRIBIDEALJAC_H_
+
+#include "MeshOptPatch.h"
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribIdealJac : public ObjContrib, public FuncType
+{
+public:
+  ObjContribIdealJac(double weight);
+  virtual ~ObjContribIdealJac() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return _min <= 0.; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+};
+
+
+template<class FuncType>
+ObjContribIdealJac<FuncType>::ObjContribIdealJac(double weight) :
+  ObjContrib("IdealJac", FuncType::getNamePrefix()+"IdealJac"),
+  _mesh(0), _weight(weight)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribIdealJac<FuncType>::copy() const
+{
+  return new ObjContribIdealJac<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribIdealJac<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initIdealJac();
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribIdealJac<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> iJ(_mesh->nIJacEl(iEl));                                       // Scaled Jacobians
+    std::vector<double> gIJ(_mesh->nIJacEl(iEl)*_mesh->nPCEl(iEl));                    // Gradients of scaled Jacobians
+    _mesh->idealJacAndGradients(iEl, iJ, gIJ);
+    for (int l = 0; l < _mesh->nIJacEl(iEl); l++) {                                    // Add contribution for each Bezier coeff.
+      Obj += _weight * FuncType::compute(iJ[l]);
+      const double dfact = _weight * FuncType::computeDiff(iJ[l]);
+      for (int iPC = 0; iPC < _mesh->nPCEl(iEl); iPC++)
+        gradObj[_mesh->indPCEl(iEl, iPC)] += dfact * gIJ[_mesh->indGIJac(iEl, l, iPC)];
+      _min = std::min(_min, iJ[l]);
+      _max = std::max(_max, iJ[l]);
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribIdealJac<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> iJ(_mesh->nIJacEl(iEl));                         // Scaled Jacobians
+    std::vector<double> dumGIJ(_mesh->nIJacEl(iEl)*_mesh->nPCEl(iEl));   // Gradients of scaled Jacobians
+    _mesh->idealJacAndGradients(iEl, iJ, dumGIJ);
+    for (int l = 0; l < _mesh->nIJacEl(iEl); l++) {                      // Check each Bezier coeff.
+      _min = std::min(_min, iJ[l]);
+      _max = std::max(_max, iJ[l]);
+    }
+  }
+}
+
+
+#endif /* _MESHQUALITYOBJCONTRIBIDEALJAC_H_ */
diff --git a/contrib/MeshQualityOptimizer/MeshQualityObjContribInvCond.h b/contrib/MeshQualityOptimizer/MeshQualityObjContribInvCond.h
new file mode 100644
index 0000000..3ef5bde
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/MeshQualityObjContribInvCond.h
@@ -0,0 +1,98 @@
+// TODO: Copyright
+
+#ifndef _MESHQUALITYOBJCONTRIBINVCOND_H_
+#define _MESHQUALITYOBJCONTRIBINVCOND_H_
+
+#include "MeshOptPatch.h"
+#include "MeshOptObjContrib.h"
+
+
+template<class FuncType>
+class ObjContribInvCondNum : public ObjContrib, public FuncType
+{
+public:
+  ObjContribInvCondNum(double weight);
+  virtual ~ObjContribInvCondNum() {}
+  virtual ObjContrib *copy() const;
+  virtual void initialize(Patch *mesh);
+  virtual bool fail() { return false; }
+  virtual bool addContrib(double &Obj, alglib::real_1d_array &gradObj);
+  virtual void updateParameters() { FuncType::updateParameters(_min, _max); }
+  virtual bool targetReached() { return FuncType::targetReached(_min, _max); }
+  virtual bool stagnated() { return FuncType::stagnated(_min, _max); }
+  virtual void updateMinMax();
+
+protected:
+  Patch *_mesh;
+  double _weight;
+};
+
+
+template<class FuncType>
+ObjContribInvCondNum<FuncType>::ObjContribInvCondNum(double weight) :
+  ObjContrib("InvCondNum", FuncType::getNamePrefix()+"InvCondNum"),
+  _mesh(0), _weight(weight)
+{
+}
+
+
+template<class FuncType>
+ObjContrib *ObjContribInvCondNum<FuncType>::copy() const
+{
+  return new ObjContribInvCondNum<FuncType>(*this);
+}
+
+
+template<class FuncType>
+void ObjContribInvCondNum<FuncType>::initialize(Patch *mesh)
+{
+  _mesh = mesh;
+  _mesh->initInvCondNum();
+  updateMinMax();
+  FuncType::initialize(_min, _max);
+}
+
+
+template<class FuncType>
+bool ObjContribInvCondNum<FuncType>::addContrib(double &Obj, alglib::real_1d_array &gradObj)
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> invCond(_mesh->nICNEl(iEl));                                  // Min. of Metric
+    std::vector<double> gInvCond(_mesh->nICNEl(iEl)*_mesh->nPCEl(iEl));               // Dummy gradients of metric min.
+    _mesh->invCondNumAndGradients(iEl, invCond, gInvCond);
+    for (int l = 0; l < _mesh->nICNEl(iEl); l++) {                                    // Add contribution for each Bezier coeff.
+      Obj += _weight * FuncType::compute(invCond[l]);
+      const double dfact = _weight * FuncType::computeDiff(invCond[l]);
+      for (int iPC = 0; iPC < _mesh->nPCEl(iEl); iPC++)
+        gradObj[_mesh->indPCEl(iEl,iPC)] += dfact *  gInvCond[_mesh->indGICN(iEl, l, iPC)];
+      _min = std::min(_min, invCond[l]);
+      _max = std::max(_max, invCond[l]);
+    }
+  }
+
+  return true;
+}
+
+
+template<class FuncType>
+void ObjContribInvCondNum<FuncType>::updateMinMax()
+{
+  _min = BIGVAL;
+  _max = -BIGVAL;
+
+  for (int iEl = 0; iEl < _mesh->nEl(); iEl++) {
+    std::vector<double> invCond(_mesh->nICNEl(iEl));                            // Min. of Metric
+    std::vector<double> dumGInvCond(_mesh->nICNEl(iEl)*_mesh->nPCEl(iEl));      // Dummy gradients of metric min.
+    _mesh->invCondNumAndGradients(iEl, invCond, dumGInvCond);
+    for (int l = 0; l < _mesh->nICNEl(iEl); l++) {                              // Add contribution for each Bezier coeff.
+      _min = std::min(_min, invCond[l]);
+      _max = std::max(_max, invCond[l]);
+    }
+  }
+}
+
+
+#endif /* _MESHQUALITYOBJCONTRIBINVCOND_H_ */
diff --git a/contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp b/contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp
new file mode 100644
index 0000000..faf6a84
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp
@@ -0,0 +1,171 @@
+// TODO: Copyright
+
+//#include "GModel.h"
+#include "GEntity.h"
+#include "GFace.h"
+#include "GRegion.h"
+#include "MElement.h"
+#include "MTriangle.h"
+#include "MQuadrangle.h"
+#include "qualityMeasures.h"
+#include "MeshOptCommon.h"
+#include "MeshOptObjContribFunc.h"
+#include "MeshOptObjContrib.h"
+#include "MeshOptObjContribScaledNodeDispSq.h"
+#include "MeshQualityObjContribIdealJac.h"
+#include "MeshQualityObjContribInvCond.h"
+#include "MeshOptimizer.h"
+#include "MeshQualityOptimizer.h"
+
+
+struct QualPatchDefParameters : public MeshOptPatchDef
+{
+  QualPatchDefParameters(const MeshQualOptParameters &p);
+  virtual ~QualPatchDefParameters() {}
+  virtual double elBadness(MElement *el, GEntity* gEnt) const;
+  virtual double bndElBadness(MElement *el, GEntity* gEnt) const { return 1.; }
+  virtual double maxDistance(MElement *el) const;
+  virtual int inPatch(const SPoint3 &badBary, double limDist,
+                      MElement *el, GEntity* gEnt) const;
+private:
+  bool _onlyValidity;
+  bool _excludeQuad, _excludeHex, _excludePrism, _excludeBL;
+  double _idealJacMin, _invCondNumMin;
+  double _distanceFactor;
+};
+
+
+QualPatchDefParameters::QualPatchDefParameters(const MeshQualOptParameters &p)
+{
+  _onlyValidity = p.onlyValidity;
+  _excludeQuad = p.excludeQuad;
+  _excludeHex = p.excludeHex;
+  _excludePrism = p.excludePrism;
+  _excludeBL = p.excludeBL;
+  _idealJacMin = p.minTargetIdealJac;
+  _invCondNumMin = p.minTargetInvCondNum;
+  strategy = (p.strategy == 1) ? MeshOptPatchDef::STRAT_ONEBYONE :
+                                 MeshOptPatchDef::STRAT_DISJOINT;
+  minLayers = (p.dim == 3) ? 1 : 0;
+  maxLayers = p.nbLayers;
+  _distanceFactor = p.distanceFactor;
+  if (strategy == MeshOptPatchDef::STRAT_DISJOINT)
+    weakMerge = (p.strategy == 2);
+  else {
+    maxPatchAdapt = p.maxPatchAdapt;
+    maxLayersAdaptFact = p.maxLayersAdaptFact;
+    distanceAdaptFact = p.distanceAdaptFact;
+  }
+}
+
+
+double QualPatchDefParameters::elBadness(MElement *el, GEntity* gEnt) const
+{
+  const int typ = el->getType();
+  if (_excludeQuad && (typ == TYPE_QUA)) return 1.;
+  if (_excludeHex && (typ == TYPE_HEX)) return 1.;
+  if (_excludePrism && (typ == TYPE_PRI)) return 1.;
+  if (_excludeBL) {
+    BoundaryLayerColumns *blc = 0;
+    if (gEnt->dim() == 2)
+      blc = static_cast<GFace*>(gEnt)->getColumns();
+    else if (gEnt->dim() == 3)
+      blc = static_cast<GRegion*>(gEnt)->getColumns();
+    if (blc) {
+      std::map<MElement*, MElement*>::iterator itBLEl = blc->_toFirst.find(el);
+      if (itBLEl != blc->_toFirst.end()) return 1.;
+    }
+  }
+  if (_onlyValidity) {
+    double jMin, jMax;
+    el->idealJacRange(jMin, jMax);
+    return jMin-_idealJacMin;
+  }
+  else {
+    double iCNMin, iCNMax;
+    el->signedInvCondNumRange(iCNMin, iCNMax);
+    return iCNMin-_invCondNumMin;
+  }
+}
+
+
+double QualPatchDefParameters::maxDistance(MElement *el) const
+{
+  return _distanceFactor * el->maxEdge();
+}
+
+
+int QualPatchDefParameters::inPatch(const SPoint3 &badBary, double limDist,
+                                    MElement *el, GEntity* gEnt) const
+{
+  const int typ = el->getType();
+  if (_excludeQuad && (typ == TYPE_QUA)) return -1;
+  if (_excludeHex && (typ == TYPE_HEX)) return -1;
+  if (_excludePrism && (typ == TYPE_PRI)) return -1;
+  if (_excludeBL) {
+    BoundaryLayerColumns *blc = 0;
+    if (gEnt->dim() == 2)
+      blc = static_cast<GFace*>(gEnt)->getColumns();
+    else if (gEnt->dim() == 3)
+      blc = static_cast<GRegion*>(gEnt)->getColumns();
+    if (blc) {
+      std::map<MElement*, MElement*>::iterator itBLEl = blc->_toFirst.find(el);
+      if (itBLEl != blc->_toFirst.end()) return -1;
+    }
+  }
+  return testElInDist(badBary, limDist, el) ? 1 : 0;
+}
+
+
+void MeshQualityOptimizer(GModel *gm, MeshQualOptParameters &p)
+{
+  Msg::StatusBar(true, "Optimizing mesh quality...");
+
+  MeshOptParameters par;
+  par.dim = p.dim;
+  par.onlyVisible = p.onlyVisible;
+  par.fixBndNodes = p.fixBndNodes;
+  par.useGeomForPatches = p.excludeBL;
+  par.useGeomForOpt = false;
+  par.useBoundaries = false;
+  QualPatchDefParameters patchDef(p);
+  par.patchDef = &patchDef;
+  par.displayInterv = 20;
+  par.verbose = 4;
+
+  ObjContribScaledNodeDispSq<ObjContribFuncSimple> nodeDistFunc(p.weight,
+                                                                Patch::LS_MINEDGELENGTH);
+  ObjContribIdealJac<ObjContribFuncBarrierMovMin> minIdealJacBarFunc(1.);
+  minIdealJacBarFunc.setTarget(p.minTargetIdealJac, 1.);
+  ObjContribInvCondNum<ObjContribFuncBarrierMovMin> minInvCondNumBarFunc(1.);
+  minInvCondNumBarFunc.setTarget(p.minTargetInvCondNum, 1.);
+
+  MeshOptPass minJacPass;
+  MeshOptPass minInvCondNumPass;
+  if (p.onlyValidity) {
+    minJacPass.maxParamUpdates = p.maxBarrierUpdates;
+    minJacPass.maxOptIter = p.maxOptIter;
+    minJacPass.contrib.push_back(&nodeDistFunc);
+    minJacPass.contrib.push_back(&minIdealJacBarFunc);
+    par.pass.push_back(minJacPass);
+  }
+  else {
+    minInvCondNumPass.maxParamUpdates = p.maxBarrierUpdates;
+    minInvCondNumPass.maxOptIter = p.maxOptIter;
+    minInvCondNumPass.contrib.push_back(&nodeDistFunc);
+    minInvCondNumPass.contrib.push_back(&minInvCondNumBarFunc);
+    par.pass.push_back(minInvCondNumPass);
+  }
+
+  meshOptimizer(gm, par);
+
+  p.CPU = par.CPU;
+  if (p.onlyValidity) {
+    p.minIdealJac = minIdealJacBarFunc.getMin();
+    p.maxIdealJac = minIdealJacBarFunc.getMax();
+  }
+  else {
+    p.minInvCondNum = minInvCondNumBarFunc.getMin();
+    p.maxInvCondNum = minInvCondNumBarFunc.getMax();
+  }
+}
diff --git a/contrib/MeshQualityOptimizer/MeshQualityOptimizer.h b/contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
new file mode 100644
index 0000000..006159c
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
@@ -0,0 +1,73 @@
+// Copyright (C) 2013 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
+//
+// Please report all bugs and problems to the public mailing list
+// <gmsh at geuz.org>.
+//
+// Contributors: Thomas Toulorge, Jonathan Lambrechts
+
+#ifndef _MESHQUALITYOPTIMIZER_H_
+#define _MESHQUALITYOPTIMIZER_H_
+
+class GModel;
+
+struct MeshQualOptParameters {
+  bool onlyValidity;
+  bool excludeQuad, excludeHex, excludePrism, excludeBL;
+  double minTargetIdealJac;
+  double minTargetInvCondNum;
+  double weight;                                                      // Weight of the node displacement contribution
+  int nbLayers;                                                       // Number of layers taken around a bad element
+  int dim;                                                            // Which dimension to optimize
+  int maxOptIter;                                                     // Max. number of iterations in the optimization process
+  int maxBarrierUpdates;                                              // Max. number of barrier moves ("runs")
+  bool onlyVisible;                                                   // If optimization applied to visible entities ONLY
+  double distanceFactor;                                              // Distance criterion for patch creation
+  bool fixBndNodes;                                                   // If points can move on boundaries
+  int strategy;                                                       // 0 = connected blobs, 1 = adaptive one-by-one
+  int maxPatchAdapt;                                                  // Max. nb. of patch adaptation iterations (if adaptive)
+  int maxLayersAdaptFact;                                             // Growth factor in number of layers for patch adaptation (if adaptive)
+  double distanceAdaptFact;                                           // Growth factor in distance factor for patch adaptation (if adaptive)
+
+  int SUCCESS ; // 0 --> success , 1 --> Not converged
+  double minIdealJac, maxIdealJac; // after optimization, range of jacobians
+  double minInvCondNum, maxInvCondNum; // after optimization, range of jacobians
+  double CPU; // Time for optimization
+
+  MeshQualOptParameters ()
+    : onlyValidity(false), excludeQuad(false),
+      excludeHex(false), excludePrism(false), excludeBL(false),
+      minTargetIdealJac(0.1), minTargetInvCondNum(0.1), weight(1.),
+      nbLayers (6) , dim(3) , maxOptIter(300), maxBarrierUpdates(50),
+      onlyVisible(true), distanceFactor(12), fixBndNodes(false), strategy(0),
+      maxPatchAdapt(3), maxLayersAdaptFact(2), distanceAdaptFact(2.), CPU(0.),
+      minIdealJac(0.), maxIdealJac(0.), minInvCondNum(0.), maxInvCondNum(0.),
+      SUCCESS(-1)
+  {
+  }
+};
+
+void MeshQualityOptimizer(GModel *gm, MeshQualOptParameters &p);
+
+#endif
diff --git a/contrib/MeshQualityOptimizer/README.txt b/contrib/MeshQualityOptimizer/README.txt
new file mode 100644
index 0000000..05528c9
--- /dev/null
+++ b/contrib/MeshQualityOptimizer/README.txt
@@ -0,0 +1,23 @@
+// MeshQualityOptimizer - Copyright (C) 2015 UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
diff --git a/contrib/Netgen/CMakeLists.txt b/contrib/Netgen/CMakeLists.txt
index 170a5b7..ab835bc 100644
--- a/contrib/Netgen/CMakeLists.txt
+++ b/contrib/Netgen/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/Parasolid/CMakeLists.txt b/contrib/Parasolid/CMakeLists.txt
new file mode 100644
index 0000000..0c37543
--- /dev/null
+++ b/contrib/Parasolid/CMakeLists.txt
@@ -0,0 +1,6 @@
+set(SRC
+  parasolid.cpp
+)
+
+file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
+append_gmsh_src(contrib/Parasolid "${SRC};${HDR}")
diff --git a/contrib/Parasolid/interface_parasolid/Makefile b/contrib/Parasolid/interface_parasolid/Makefile
new file mode 100644
index 0000000..db1537c
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/Makefile
@@ -0,0 +1,50 @@
+SHELL := /bin/bash
+
+OUTNAME=pkinterface
+
+CXX=g++
+
+INCLUDE = -I./ -I/usr/include/ -I/usr/local/include/gmsh/ -I./include/
+
+PKLIB = /home/bernard/parasolid/base/shared_object/
+GMSHLIB = /home/bernard/devel/gmsh/build/
+
+CXXFLAGS  ?=  -g 
+
+#Reconnaitre les extensions de fichier comme suffixes...
+SUFFIXES ?= .cpp .o .h
+.SUFFIXES: $(SUFFIXES) .
+
+X64_CCOPTIONS=-m64 -w -fPIC
+
+#Liste des fichiers objets nécessaires pour le programme 
+OBJS = main.c libfrustrum.a libfg.a libfrustrum_delta.a ParasolidDataBase.o ParasolidGModelBuilder.o callbacks.o
+
+$(OUTNAME): $(OBJS)
+	$(CXX) $(X64_CCOPTIONS) $(INCLUDE) main.c callbacks.o ParasolidDataBase.o ParasolidGModelBuilder.o -L. -lfrustrum -lfrustrum_delta -lfg -L$(PKLIB) -lpskernel -Wl,-rpath=$(PKLIB) -L$(PKLIB) -lkid_support -Wl,-rpath=$(PKLIB)  -L$(GMSHLIB) -lGmsh -Wl,-rpath=$(GMSHLIB) -lm -lpthread  $(CXXFLAGS) -o $(OUTNAME)
+	chmod a+rx $(OUTNAME)
+libfrustrum.a: frustrum.c
+	$(CXX) $(X64_CCOPTIONS) -c frustrum.c $(INCLUDE) $(CXXFLAGS) -o frustrum.o
+	ar rcv ./libfrustrum.a ./frustrum.o
+	rm frustrum.o
+libfrustrum_delta.a: frustrum_delta.c
+	$(CXX) $(X64_CCOPTIONS) -c frustrum_delta.c $(INCLUDE) $(CXXFLAGS) -o frustrum_delta.o
+	ar rcv ./libfrustrum_delta.a ./frustrum_delta.o
+	rm frustrum_delta.o
+libfg.a: fg.c
+	$(CXX) $(X64_CCOPTIONS) -c fg.c $(INCLUDE) $(CXXFLAGS) -o fg.o
+	ar rcv ./libfg.a ./fg.o
+	rm fg.o
+ParasolidDataBase.o: ParasolidDataBase.cpp
+	$(CXX) $(X64_CCOPTIONS) -c ParasolidDataBase.cpp $(INCLUDE) $(CXXFLAGS) -o ParasolidDataBase.o
+ParasolidGModelBuilder.o: ParasolidGModelBuilder.cpp 
+	$(CXX) $(X64_CCOPTIONS) -c ParasolidGModelBuilder.cpp $(INCLUDE) $(CXXFLAGS) -o ParasolidGModelBuilder.o
+callbacks.o: callbacks.cpp
+	$(CXX) $(X64_CCOPTIONS) -c callbacks.cpp $(INCLUDE) $(CXXFLAGS) -o callbacks.o
+
+
+clean:
+	rm -f *.o
+	rm -f libfrustrum.a libfrustrum_delta.a libfg.a
+	rm -f $(OUTNAME)
+
diff --git a/contrib/Parasolid/interface_parasolid/ParasolidDataBase.cpp b/contrib/Parasolid/interface_parasolid/ParasolidDataBase.cpp
new file mode 100644
index 0000000..93a4d19
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/ParasolidDataBase.cpp
@@ -0,0 +1,731 @@
+
+#include "ParasolidDataBase.h"
+#include <algorithm>
+#include <math.h>
+#include <list>
+
+
+using namespace std;
+
+//------------------------------------------------------------------------
+
+ParasolidDataBase::ParasolidDataBase(string _schema_path):fi(NULL){
+  schema_path.assign(_schema_path);
+  registerFrustrum();
+  registerFrustrumDeltas();
+  startParasolidSession();
+} 
+
+//------------------------------------------------------------------------
+
+ParasolidDataBase::~ParasolidDataBase(){
+  delete fi;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::registerFrustrum(){
+
+  // PEB interface
+  if (!fi){
+    fi = new frustrumInterface();
+    set_frustrum_interface_ptr(fi);
+  }
+  fi->set_schema_path(schema_path);
+  // end PEB interface
+
+
+
+  extern void FSTART( int *);
+  extern void FABORT( int *);
+  extern void FSTOP( int *);
+  extern void FMALLO( int *, char **, int *);
+  extern void FMFREE( int *, char **, int *);
+  extern void GOSGMT( const int *, const int *, const int *, const int *,
+      const double *, const int *, const int *, int *);
+  extern void GOOPSG( const int *, const int *, const int *, const int *,
+      const double *, const int *, const int *, int *);
+  extern void GOCLSG( const int *, const int *, const int *, const int *,
+      const double *, const int *, const int *, int *);
+  extern void GOPIXL( const int *, const double *, const int *, const int *,
+      int *);
+  extern void GOOPPX( const int *, const double *, const int *, const int *,
+      int *);
+  extern void GOCLPX( const int *, const double *, const int *, const int *,
+      int *);
+  extern void FFOPRD( const int *, const int *, const char *, const int *,
+      const int *, int *, int *);
+  extern void FFOPWR( const int *, const int *, const char *, const int *,
+      const char *, const int *, int *, int *);
+  extern void FFCLOS( const int *, const int *, const int *, int *);
+  extern void FFREAD( const int *, const int *, const int *, char *, int *,
+      int *);
+  extern void FFWRIT( const int *, const int *, const int *, const char *,
+      int *);
+  extern void FFOPRB( const int *, const int *, const int *, int *, int *,
+      int *);
+  extern void FFSEEK( const int *, const int *, const int *, int *);
+  extern void FFTELL( const int *, const int *, int *, int *);
+  extern void FGCRCU( const char *, int *, int *, int *, int *, double *,
+      int *, double *, int *);
+  extern void FGCRSU( const char *, int *, int *, int *, int *, double *,
+      int *, double *, int *);
+  extern void FGEVCU( int *, double *, double *, double *, int *,
+      double *, int *);
+  extern void FGEVSU( int *, double *, double *, double *, double *,
+      int *, int *, int *, double *, int *);
+  extern void FGPRCU( int *, double *, double *, double *, int *, int *);
+  extern void FGPRSU( int *, double *, double *, double *, int *, int *);
+  printf("Registering Example Frustrum ...\n");
+  PK_SESSION_frustrum_o_m( fru );
+  fru.fstart = FSTART;
+  fru.fabort = FABORT;
+  fru.fstop  = FSTOP;
+  fru.fmallo = FMALLO;
+  fru.fmfree = FMFREE;
+  fru.gosgmt = GOSGMT;
+  fru.goopsg = GOOPSG;
+  fru.goclsg = GOCLSG;
+  fru.gopixl = GOPIXL;
+  fru.gooppx = GOOPPX;
+  fru.goclpx = GOCLPX;
+  fru.ffoprd = FFOPRD;
+  fru.ffopwr = FFOPWR;
+  fru.ffclos = FFCLOS;
+  fru.ffread = FFREAD;
+  fru.ffwrit = FFWRIT;
+  fru.ffoprb = FFOPRB;
+  fru.ffseek = FFSEEK;
+  fru.fftell = FFTELL;
+  fru.fgcrcu = FGCRCU;
+  fru.fgcrsu = FGCRSU;
+  fru.fgevcu = FGEVCU;
+  fru.fgevsu = FGEVSU;
+  fru.fgprcu = FGPRCU;
+  fru.fgprsu = FGPRSU;
+  PK_SESSION_register_frustrum( &fru );
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::registerFrustrumDeltas(){
+  extern PK_ERROR_code_t FRU_delta_open_for_write( PK_PMARK_t pmark, PK_DELTA_t *key );
+  extern PK_ERROR_code_t FRU_delta_open_for_read( PK_DELTA_t key );
+  extern PK_ERROR_code_t FRU_delta_close( PK_DELTA_t key );
+  extern PK_ERROR_code_t FRU_delta_write( PK_DELTA_t key, unsigned n_bytes, const char *bytes);
+  extern PK_ERROR_code_t FRU_delta_read( PK_DELTA_t key, unsigned n_bytes, char *bytes);
+  extern PK_ERROR_code_t FRU_delta_delete( PK_DELTA_t key );
+
+  delta_fru.open_for_write_fn = FRU_delta_open_for_write;
+  delta_fru.open_for_read_fn = FRU_delta_open_for_read;
+  delta_fru.close_fn = FRU_delta_close; 
+  delta_fru.write_fn = FRU_delta_write;
+  delta_fru.read_fn = FRU_delta_read;
+  delta_fru.delete_fn = FRU_delta_delete;
+  //VERIFY(PK_DELTA_register_callbacks(delta_fru) == PK_ERROR_no_errors);
+  PK_DELTA_register_callbacks(delta_fru);
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::displayErrorMessage(const string &s,const PK_ERROR_code_t &e)const{
+  if (e!=PK_ERROR_no_errors)
+    cout << "ERROR from " << s << " : " << e << endl;
+  else
+    cout << s << "   OK :)" << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::startParasolidSession(){  
+
+  err = PK_ERROR_no_errors;
+
+  // Starts the modeller
+
+  PK_SESSION_start_o_m( start_options );
+
+  // PK_SESSION_start also initialises the following interface parameters:
+  //		PK_SESSION_set_check_arguments    PK_LOGICAL_true
+  //		PK_SESSION_set_check_self_int     PK_LOGICAL_true
+  //		PK_SESSION_set_check_continuity   PK_LOGICAL_true
+  //		PK_SESSION_set_general_topology   PK_LOGICAL_false
+  //		PK_SESSION_set_swept_spun_surfs   PK_LOGICAL_false
+  //		PK_SESSION_set_tag_limit          0 (ie: no limit)
+  //		PK_SESSION_set_angle_precision    0.00000000001
+  //		PK_SESSION_set_precision          0.00000001
+
+  cout << "starting session" << endl;
+  err=PK_SESSION_start( &start_options );
+
+  displayErrorMessage("ParasolidDataBase::startParasolidSession::PK_SESSION_start",err);
+  cout << "...done starting session" << endl;
+
+  // Check to see if it all started up OK
+  PK_LOGICAL_t was_error = PK_LOGICAL_true;
+  PK_ERROR_sf_t error_sf;
+  PK_ERROR_ask_last( &was_error, &error_sf );
+  if ( was_error ){
+    cout << "startParasolidSession : there are errors !!!" << endl;
+  }
+  else
+    cout << "startParasolidSession : no error :) " << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::displayBodyConfig()const{
+  PK_BODY_config_t body_config;
+  err = PK_BODY_ask_config(body, &body_config);
+  displayErrorMessage("ParasolidDataBase::readFile::PK_BODY_ask_config",err);
+  cout << " BODY config: ";
+  switch (body_config){
+    case PK_BODY_config_standard_c:
+      cout << "PK_BODY_config_standard_c" << endl;
+      break;
+    case PK_BODY_config_compound_c:
+      cout << "PK_BODY_config_compound_c" << endl;
+      break;
+    case PK_BODY_config_child_c:
+      cout << "PK_BODY_config_child_c" << endl;
+      break;
+    default:
+      cout << "Unknown body type: " << body_config << endl;
+  }
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::readFile(const string &path, const string &s){
+
+  cout << "PSDB readfile path=" << path << endl;
+  fi->set_filename_path(path);
+
+  num_parts = 0;
+  cout << "reading Parasolid file..." << endl;
+
+  // TODO: about difference between key and filename ... how to specify the file path /name ??? See frustrum functions.
+  // and how to give the right key... i guess the user will have to do so... unless automatic reading in the file... ?
+
+  PK_PART_receive_o_m(receive_options);
+  receive_options.transmit_format = PK_transmit_format_text_c;
+
+  err = PK_PART_receive(s.c_str(), &receive_options , &num_parts , &parts);
+  displayErrorMessage("ParasolidDataBase::readFile::PK_PART_receive",err);
+  cout << " num_parts=" << num_parts << endl;
+
+  if (num_parts<=0){
+    cout << "no parts, aborting ! :( " << endl;
+    return;
+  }
+  //---------------------------
+  // reading every body...
+  //---------------------------
+  for (int ipart=0;ipart<num_parts;ipart++){
+    body = parts[ipart];
+    //PK_MEMORY_free (parts);
+
+    displayBodyConfig();
+
+    err = PK_ENTITY_ask_class( body, &tClass );
+    displayErrorMessage("ParasolidDataBase::readFile::PK_ENTITY_ask_class",err);
+    if ( tClass == PK_CLASS_body ){
+      cout << " found a body ! :) " << endl;
+    }
+    else if ( tClass == PK_CLASS_assembly){
+      cout << " found an assembly ! :) " << endl;
+    }
+    else{
+      cout << " not a body :(   PK_CLASS_t=" << tClass << endl;
+    }
+
+
+
+    int npartslocal = 1;
+    PK_PART_t *localparts;
+    if (tClass == PK_CLASS_assembly){
+      // recover parts
+      err = PK_ASSEMBLY_ask_parts(body,&npartslocal,&localparts);
+      displayErrorMessage("ParasolidDataBase::readFile::PK_ASSEMBLY_ask_parts",err);
+      cout << "Assembly has " << npartslocal << " parts" << endl;
+    }
+
+    /* "In addition, every face, edge and vertex in a body requires an attached geometric entity – a
+       surface, curve or point – for a fully defined, valid model." */
+
+    // A part is a body or an assembly   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+    /* And "An assembly can also have construction geometry,..." */
+
+    // I guess we dont want construction stuff, so...   PK_BODY_ask_topology seems the best.
+    // Also, PK_BODY_ask_components returns weird stuff as acorn, wire, etc... i guess we don't need that...
+
+    /*NOTE: possible d'avoir les fins, avec ça:
+      (pour connaitre orientation des edges dans une loop...
+      struct PK_BODY_ask_topology_o_s
+      {
+      int          o_t_version;     --- version number
+      PK_LOGICAL_t want_fins;       --- whether fins required in output
+      --- ( PK_LOGICAL_false )
+      };
+      typedef struct PK_BODY_ask_topology_o_s PK_BODY_ask_topology_o_t;*/
+
+    // Note: il existe:
+    /*
+       PK_ERROR_code_t     PK_BODY_ask_vertices
+       (
+       --- received arguments ---
+       PK_BODY_t           body,           --- a body
+
+       --- returned arguments ---
+       int          *const n_vertices,     --- number of vertices (>= 0)
+       PK_VERTEX_t **const vertices        --- vertices (optional)
+       )*/
+
+    for (int ilocal=0;ilocal<npartslocal;ilocal++){
+      if (tClass == PK_CLASS_assembly){
+        cout << "Treating assembly number " << ilocal+1 << "." << endl;
+        body = localparts[ilocal];
+      }
+
+      PK_BODY_ask_topology_o_m(topo_ask_options);
+      int n_topols_temp;
+      PK_TOPOL_t *topols_temp;
+      PK_CLASS_t *classes_temp;
+      int  n_relations;
+      int *parents;
+      int *children;
+      PK_TOPOL_sense_t *senses;
+      err=PK_BODY_ask_topology(body, &topo_ask_options,
+          &n_topols_temp,    
+          &topols_temp,      
+          &classes_temp,     
+          &n_relations, 
+          &parents,     
+          &children,    
+          &senses       
+          );
+      displayErrorMessage("ParasolidDataBase::readFile::PK_BODY_ask_topology",err);
+      cout << " reading body " << ipart << " number of topological entities=" << n_topols_temp << endl;
+
+      for (int itop=0;itop<n_topols_temp;itop++){
+
+        //check
+        vector<PK_TOPOL_t>::iterator itfind = find(topols.begin(),topols.end(),topols_temp[itop]);
+        if (itfind!=topols.end()){
+          cout << " *** WARNING ***  topological entity " << topols_temp[itop] << " already exists ! Shouldn't happen ! " << endl;
+        }
+        if (find(topols.begin(),topols.end(),topols_temp[itop]) == topols.end()){
+          topols.push_back(topols_temp[itop]);
+          classes.push_back(classes_temp[itop]);
+        }
+        else
+          cout << "entity " << topols_temp[itop] << " already exists, not adding entity" << endl;
+
+        //      cout << "-----------------------" << endl;
+        //      cout << "itop=" << itop << ":" << endl;
+        //      cout << "topols_temp[itop]= " << topols_temp[itop] << endl;
+
+        int id;
+        PK_ENTITY_ask_identifier(topols_temp[itop],&id);
+
+        //      cout << "id=" << id << endl;
+
+
+      }// end reading every topol entity
+
+
+
+
+
+
+      // also creating list of vertices, edges, faces and regions... maybe redundant... anyway...
+      int num;
+      PK_VERTEX_t *v;
+      err = PK_BODY_ask_vertices(body,&num,&v);
+      fillVector(vertices,num,v,err,"ParasolidDataBase::readFile::PK_BODY_ask_vertices");
+      PK_EDGE_t *e;
+      err = PK_BODY_ask_edges(body,&num,&e);
+      fillVector(edges,num,e,err,"ParasolidDataBase::readFile::PK_BODY_ask_edges");
+      PK_FACE_t *f;
+      err = PK_BODY_ask_faces(body,&num,&f);
+      fillVector(faces,num,f,err,"ParasolidDataBase::readFile::PK_BODY_ask_faces");
+      PK_REGION_t *r;
+      err = PK_BODY_ask_regions(body,&num,&r);
+      fillVector(regions,num,r,err,"ParasolidDataBase::readFile::PK_BODY_ask_regions");
+
+    }
+  }// end reading every body
+  cout << "reading done " << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::getEdgesAndSigns(const PK_LOOP_t &loop, list<PK_EDGE_t> &edges, list<int> &signs)const{
+  int nfins;
+  PK_FIN_t *fins;
+  PK_ERROR_code_t err = PK_LOOP_ask_fins(loop,&nfins,&fins);// returns ORDERED fins !
+  for (int ifin=0;ifin<nfins;ifin++){
+    PK_EDGE_t e;
+    err = PK_FIN_ask_edge(fins[ifin],&e);
+    edges.push_back(e);
+    PK_LOGICAL_t res;
+    err = PK_FIN_is_positive(fins[ifin],&res);
+    signs.push_back(((res==PK_LOGICAL_true) ? 1 : -1));
+  }
+  return;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::fillVector(vector<PK_ENTITY_t> &e, int num, const PK_ENTITY_t *original, const PK_ERROR_code_t &err, const string &s){
+
+  displayErrorMessage(s.c_str(),err);
+  cout << " number of entities=" << num << endl;
+  for (int inum=0;inum<num;inum++){
+    // check if already exists...
+    if (find(e.begin(),e.end(),original[inum]) == e.end()){
+      PK_CLASS_t classe;
+      PK_ENTITY_ask_class(original[inum],&classe);
+      if (classe==PK_CLASS_region){
+        PK_LOGICAL_t is_solid;
+        PK_REGION_is_solid(original[inum],&is_solid);
+        if (is_solid==PK_LOGICAL_false) continue;// this region is void... outside the body of interest...
+      }
+      e.push_back(original[inum]);
+    }
+    else
+      cout << "entity " << original[inum] << " already exists, not adding" << endl;
+  }
+}
+
+//------------------------------------------------------------------------
+
+pair<PK_VERTEX_t,PK_VERTEX_t> ParasolidDataBase::getVertices(const PK_EDGE_t &edge)const{
+  PK_VERTEX_t vertices[2];
+  PK_EDGE_ask_vertices(edge,vertices);
+
+  return make_pair(vertices[0],vertices[1]);
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createTwoBlocks(){
+  cout << "creating 2 blocks... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  PK_BODY_t primitive2;
+
+  PK_VECTOR_t location = {0.,0.,1.};
+  PK_AXIS2_sf_t second_set;
+  PK_VECTOR1_t unit1 = {0.,0.,1.};
+  PK_VECTOR1_t unit2 = {1.,0.,0.};
+
+  cout << "basis_set.location:" << endl;
+  cout << basis_set.location.coord[0] << " " << basis_set.location.coord[1] << " "   << basis_set.location.coord[2] << " "    << endl;
+
+
+  second_set.location = location;
+  second_set.axis = unit1;
+  second_set.ref_direction = unit2;
+
+  double x=1.;
+  double y=2.;
+  double z=1.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_block(x,y,z, NULL, &primitive );
+  err=PK_BODY_create_solid_block(x,y,z, &second_set, &primitive2 );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+
+void ParasolidDataBase::createCutBlock(){
+
+  PK_LINE_sf_t form1,form2,form3,form4,form5,form6,form7;
+  PK_VECTOR1_t v1 = {1.,0.,0.};
+  PK_VECTOR1_t v2 = {0.,1.,0.};
+  PK_VECTOR1_t v3 = {-1.,0.,0.};
+  PK_VECTOR1_t v4 = {0.,-1.,0.};
+  PK_VECTOR_t p1 = {-1.,-1,0.};
+  PK_VECTOR_t p2 = {1,-1.,0.};
+  PK_VECTOR_t p3 = {1.,1.,0.};
+  PK_VECTOR_t p4 = {-1.,1.,0.};
+  PK_VECTOR_t p5 = {-2.,1.,0.};
+  PK_VECTOR_t p6 = {-2.,-1.,0.};
+  form1.basis_set.location = p1;
+  form1.basis_set.axis = v1;
+  form2.basis_set.location = p2;
+  form2.basis_set.axis = v2;
+  form3.basis_set.location = p3;
+  form3.basis_set.axis = v3;
+  form4.basis_set.location = p4;
+  form4.basis_set.axis = v4;
+
+  form5.basis_set.location = p1;
+  form5.basis_set.axis = v3;
+  form6.basis_set.location = p6;
+  form6.basis_set.axis = v2;
+  form7.basis_set.location = p5;
+  form7.basis_set.axis = v1;
+
+
+  PK_LINE_t lines[4];
+  PK_LINE_t lines2[4];
+  //PK_LINE_t lines2[3];
+  PK_LINE_create(&form1,&lines[0]);
+  PK_LINE_create(&form2,&lines[1]);
+  PK_LINE_create(&form3,&lines[2]);
+  PK_LINE_create(&form4,&lines[3]);
+
+  PK_LINE_create(&form5,&lines2[0]);
+  PK_LINE_create(&form6,&lines2[1]);
+  PK_LINE_create(&form7,&lines2[2]);
+  lines2[3] = lines[3];
+
+
+  PK_EDGE_t *edges,*edges2;
+  PK_EDGE_t edges3[4];
+  int *indices,*indices2;
+  int N,N2;
+  //  PK_ENTITY_track_r_t track;
+
+  PK_INTERVAL_t intervals[4];
+  PK_INTERVAL_t intervals2[4];
+  //  PK_INTERVAL_t intervals2[3];
+  intervals[0].value[0] = 0.;
+  intervals[0].value[1] = 2.;
+  intervals[1].value[0] = 0.;
+  intervals[1].value[1] = 2.;
+  intervals[2].value[0] = 0.;
+  intervals[2].value[1] = 2.;
+  intervals[3].value[0] = 0.;
+  intervals[3].value[1] = 2.;
+
+  intervals2[0].value[0] = 0.;
+  intervals2[0].value[1] = 1.;
+  intervals2[1].value[0] = 0.;
+  intervals2[1].value[1] = 2.;
+  intervals2[2].value[0] = 0.;
+  intervals2[2].value[1] = 1.;
+  intervals2[3].value[0] = 0.;
+  intervals2[3].value[1] = 2.;
+
+  PK_CURVE_make_wire_body_o_t opt;
+  PK_CURVE_make_wire_body_o_m(opt);
+  opt.want_edges = PK_LOGICAL_true;
+
+  PK_BODY_t bod;
+
+  err=PK_CURVE_make_wire_body_2(4,lines,intervals,&opt,&bod,&N,&edges,&indices);
+  if (err!=PK_ERROR_no_errors)
+    cout << "err PK_CURVE_make_wire_body_2 =" << err << endl;
+
+  err=PK_CURVE_make_wire_body_2(4,lines2,intervals2,&opt,&bod,&N2,&edges2,&indices2);
+  //err=PK_CURVE_make_wire_body_2(3,lines2,intervals2,&opt,&bod,&N2,&edges2,&indices2);
+  if (err!=PK_ERROR_no_errors)
+    cout << "err PK_CURVE_make_wire_body_2 =" << err << endl;
+  cout << "N2=" << N2 << endl;
+
+
+
+
+
+
+  //  PK_INTERVAL_t intervalsbis[7];
+  //  int *indicesbis;
+  //  PK_LINE_t linesbis[7];
+  //  for (int i=0;i<4;i++){
+  //    intervalsbis[i] = intervals[i];
+  //    linesbis[i] = lines[i];
+  //  }
+  //  for (int i=0;i<3;i++){
+  //    intervalsbis[4+i] = intervals2[i];
+  //    linesbis[4+i] = lines2[i];
+  //  }
+  //  PK_EDGE_t *edgesbis;
+  //  int Nbis;
+  //  err=PK_CURVE_make_wire_body_2(7,linesbis,intervalsbis,&opt,&bod,&Nbis,&edgesbis,&indicesbis);
+  //  if (err!=PK_ERROR_no_errors)
+  //    cout << "err PK_CURVE_make_wire_body_2 BIS =" << err << endl;
+  //  cout << "Nbis=" << Nbis << endl;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  // creating orientations... :(
+  PK_LOGICAL_t orientations[1];
+  for (int i=0;i<1;i++)
+    orientations[i] = PK_LOGICAL_true;
+  int shared_loop[1];
+  for (int i=0;i<1;i++)
+    shared_loop[i] = -1;
+
+
+  edges3[0] = edges2[0];
+  edges3[1] = edges2[1];
+  edges3[2] = edges2[2];
+  edges3[3] = edges[3];
+
+
+  PK_FACE_t face1 = PK_ENTITY_null;
+  PK_FACE_t face2 = PK_ENTITY_null;
+
+  err = PK_EDGE_make_faces_from_wire(1,&edges[0],orientations,shared_loop,&face1);
+  if (err!=PK_ERROR_no_errors)
+    cout << "err PK_EDGE_make_faces_from_wire=" << err << endl;
+
+
+  //err = PK_EDGE_make_faces_from_wire(1,&edges2[0],orientations,shared_loop,&face2);
+  err = PK_EDGE_make_faces_from_wire(1,&edges3[0],orientations,shared_loop,&face2);
+  if (err!=PK_ERROR_no_errors)
+    cout << "err PK_EDGE_make_faces_from_wire=" << err << endl;
+
+  // Create a surface to fit and attach to the face.
+  PK_local_check_t result_local_check;
+  PK_FACE_attach_surf_fitting(face1, PK_LOGICAL_true, &result_local_check);
+  PK_FACE_attach_surf_fitting(face2, PK_LOGICAL_true, &result_local_check);
+
+
+
+
+
+
+
+  cout << "creating block : DONE !  " << endl;
+
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createBlock(){
+  cout << "creating block... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  double x=1.;
+  double y=2.;
+  double z=1.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_block(x,y,z, NULL, &primitive );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createSphere(){
+  cout << "creating sphere... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  double r=1.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_sphere(r, NULL, &primitive );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createCone(){
+  cout << "creating cone... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  double r=1.;
+  double h=2.;
+  double semiangle = M_PI/6.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_cone(r,h,semiangle, NULL, &primitive );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createTorus(){
+  cout << "creating torus... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  double rmin=1.;
+  double rmax=2.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_torus(rmax,rmin, NULL, &primitive );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::createCylinder(){
+  cout << "creating cylinder... ";
+  PK_AXIS2_sf_t basis_set;
+  PK_BODY_t primitive;
+  basis_set.location.coord[0] = 0;
+  basis_set.location.coord[1] = 0;
+  basis_set.location.coord[2] = 0;
+  basis_set.axis.coord[0] = 0;
+  basis_set.axis.coord[1] = 1;
+  basis_set.axis.coord[2] = 0;
+  basis_set.ref_direction.coord[0] = 1;
+  basis_set.ref_direction.coord[1] = 0;
+  basis_set.ref_direction.coord[2] = 0;
+  double radius = 1.;
+  double L=1.;
+  PK_ERROR_code_t err=PK_BODY_create_solid_cyl( radius, L, &basis_set, &primitive );
+  if (err==PK_ERROR_no_errors) cout << " done." << endl;
+  else cout << "err=" << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::transmit(const string &key){
+  int n_parts = 0;
+  //  PK_PART_t *parts = NULL;		
+  PK_SESSION_ask_parts( &n_parts, &parts );
+  cout << "TRANSMIT: n_parts= " << n_parts << endl;
+
+  PK_PART_transmit_o_t transmit_opts;
+  PK_PART_transmit_o_m( transmit_opts );
+  transmit_opts.transmit_format = PK_transmit_format_text_c;
+
+  err = PK_PART_transmit( n_parts, parts, key.c_str(), &transmit_opts );
+  if (err==PK_ERROR_no_errors) cout << "transmitted :)" << endl;
+  else
+    cout << "transmit errors :(   " << err << endl;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidDataBase::erase_all_parts(){
+  int n_parts = 0;
+  //PK_PART_t *parts = NULL;		
+  PK_SESSION_ask_parts( &n_parts, &parts );
+  //  cout << "There are " << n_parts << " parts loaded" << endl;
+  //  cout << "deleting..." << endl;
+  PK_ENTITY_delete(n_parts, parts);  
+  if(n_parts > 0)
+    PK_MEMORY_free(parts);
+  PK_SESSION_ask_parts( &n_parts, &parts );
+  //  cout << "After deletion, there are " << n_parts << " parts loaded" << endl;
+}
+
+//------------------------------------------------------------------------
+
+double ParasolidDataBase::get_parasolid_session_precision()const{
+  double tol;
+  PK_SESSION_ask_precision(&tol);
+  return tol;
+}
+
+//------------------------------------------------------------------------
+
diff --git a/contrib/Parasolid/interface_parasolid/ParasolidDataBase.h b/contrib/Parasolid/interface_parasolid/ParasolidDataBase.h
new file mode 100644
index 0000000..7909b23
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/ParasolidDataBase.h
@@ -0,0 +1,100 @@
+
+#ifndef _PARASOLID_DB_H_
+#define _PARASOLID_DB_H_
+
+#include <stdio.h>
+#include "parasolid_kernel.h"
+#include "kernel_interface.h"
+#include "string.h"
+
+#include <iostream>
+
+#include <vector>
+#include <list>
+#include <string>
+
+#include "frustrum_interface.h"
+
+using namespace std;
+
+extern void set_frustrum_interface_ptr(frustrumInterface *ptr);
+
+class ParasolidDataBase{
+  public:
+    typedef vector<PK_TOPOL_t>::const_iterator topo_iter;
+    typedef vector<PK_CLASS_t>::const_iterator class_iter;
+    typedef vector<PK_VERTEX_t>::const_iterator vertex_iter;
+    typedef vector<PK_EDGE_t>::const_iterator edge_iter;
+    typedef vector<PK_FACE_t>::const_iterator face_iter;
+    typedef vector<PK_REGION_t>::const_iterator region_iter;
+
+    ParasolidDataBase(string _schema_path);
+    ~ParasolidDataBase();
+    void readFile(const string &path, const string &s);
+
+    topo_iter topobegin()const{return topols.begin();};
+    topo_iter topoend()const{return topols.end();};
+    class_iter classbegin()const{return classes.begin();};
+    class_iter classend()const{return classes.end();};
+    vertex_iter vertexbegin()const{return vertices.begin();};
+    vertex_iter vertexend()const{return vertices.end();};
+    edge_iter edgebegin()const{return edges.begin();};
+    edge_iter edgeend()const{return edges.end();};
+    face_iter facebegin()const{return faces.begin();};
+    face_iter faceend()const{return faces.end();};
+    region_iter regionbegin()const{return regions.begin();};
+    region_iter regionend()const{return regions.end();};
+
+
+    pair<PK_VERTEX_t,PK_VERTEX_t> getVertices(const PK_EDGE_t &edge)const;
+    void getEdgesAndSigns(const PK_LOOP_t &loop, list<PK_EDGE_t> &edges, list<int> &signs)const;
+
+    void createCylinder();
+    void createBlock();
+    void createTwoBlocks();
+    void createCutBlock();
+    void createSphere();
+    void createCone();
+    void createTorus();
+    
+    void transmit(const string &key);
+    void erase_all_parts();
+
+    double get_parasolid_session_precision()const;
+
+  private:
+    void registerFrustrum();
+    void registerFrustrumDeltas();
+    void startParasolidSession();
+    
+    void displayErrorMessage(const string &s,const PK_ERROR_code_t &e)const;
+    void displayBodyConfig()const;
+    void fillVector(vector<PK_ENTITY_t> &e, int num, const PK_ENTITY_t *original, const PK_ERROR_code_t &err, const string &s);
+
+
+    PK_BODY_t body;
+    PK_ENTITY_t *parts;
+    int num_parts,num_bodies;
+
+    PK_SESSION_frustrum_t fru;
+    PK_DELTA_frustrum_t delta_fru;
+    PK_PART_receive_o_t receive_options;
+    PK_SESSION_start_o_t start_options;
+    PK_BODY_ask_topology_o_t topo_ask_options;
+    mutable PK_ERROR_code_t err;
+    PK_CLASS_t tClass;
+  
+    frustrumInterface *fi;
+    string schema_path;
+    
+    vector<PK_TOPOL_t> topols;
+    vector<PK_CLASS_t> classes;
+    
+    vector<PK_VERTEX_t> vertices;
+    vector<PK_EDGE_t> edges;
+    vector<PK_FACE_t> faces;
+    vector<PK_REGION_t> regions;
+};
+
+
+#endif
diff --git a/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.cpp b/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.cpp
new file mode 100644
index 0000000..1e6b748
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.cpp
@@ -0,0 +1,818 @@
+#include "ParasolidGModelBuilder.h"
+#include "callbacks.h"
+
+#include <iostream>
+#include <exception>
+#include <algorithm>
+#include <list>
+
+
+// gmsh includes
+#include "GModel.h"
+#include "GEntity.h"
+#include "GenericVertex.h"
+#include "GenericFace.h"
+#include "GenericEdge.h"
+#include "GenericRegion.h"
+#include "GEdge.h"
+#include "GFaceCompound.h"
+#include "Field.h"
+
+#include "Range.h"
+#include "GPoint.h"
+#include "Context.h"
+#include "OpenFile.h"
+#include "Gmsh.h"
+
+
+
+//------------------------------------------------------------------------
+
+ParasolidGModelBuilder::ParasolidGModelBuilder(ParasolidDataBase *_db):db(_db),fields(NULL),cd(NULL),cd2(NULL){
+  model = new GModel();
+  GmshInitialize(0,NULL);
+  CTX::instance()->terminal = 1;
+  CTX::instance()->noPopup = 1;
+  CTX::instance()->geom.tolerance  = db->get_parasolid_session_precision()*0.7;
+  CTX::instance()->mesh.lcIntegrationPrecision  = CTX::instance()->geom.tolerance * 1.e-3;
+  
+}
+
+//------------------------------------------------------------------------
+
+ParasolidGModelBuilder::~ParasolidGModelBuilder(){
+  delete cd;
+  delete cd2;
+  delete model;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::set_alternative_tag(PK_TOPOL_t original, int alternative)const{
+  alternative2original_tags[alternative].insert(original);
+  original2alternative_tags[original] = alternative;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::buildGModel() const{
+
+  // - ---------------------- treating vertices -----------------------
+  // set callbacks
+  GenericVertex::setVertexXYZ(vertex_xyz);
+  GenericVertex::setVertexMeshSize(vertex_mesh_size);
+
+  int numv = model->getMaxElementaryNumber(0) + 1;
+  for (ParasolidDataBase::vertex_iter it = db->vertexbegin();it!=db->vertexend();it++){
+    cout << "Vertex :) " << endl;
+    // create new vertex
+    GenericVertex *v = new GenericVertex(model, numv, *it);
+    //    v->setPrescribedMeshSizeAtVertex(0.1);// now overloaded by setVertexMeshSize callback
+    numv++;
+    // add to GModel
+    model->add(v);
+    // databade PK -> ptr
+    int2ptr[(*it)] = v;
+  }
+
+  //  ----------------------- treating edges -----------------------
+  // set callbacks
+  GenericEdge::setEdgeEvalXYZFromT(edge_xyz_from_t);
+  GenericEdge::setEdgeEvalParBounds(edge_parBounds);
+  GenericEdge::setEdgeGeomType(edge_geomType);
+  GenericEdge::setEdgeDegenerated(edge_degenerate);
+  GenericEdge::setEdgeEvalFirstDer(edge_firstder_from_par);
+  GenericEdge::setEdgeEvalCurvature(edge_curvature_from_par);
+  GenericEdge::setEdgeClosestPoint(edge_closestPointOrthogonal);
+  GenericEdge::setEdgeIs3D(edge_is3D);
+  GenericEdge::setEdgeReparamOnFace(edge_reparamOnFace);
+
+  int nume = model->getMaxElementaryNumber(0) + 1;
+  for (ParasolidDataBase::edge_iter it = db->edgebegin();it!=db->edgeend();it++){
+    cout << "Edge :) " << endl;
+    // recovering vertices id's
+    bool ringtest=false;
+    pair<PK_VERTEX_t,PK_VERTEX_t> verts = db->getVertices((*it));
+    if (verts.first==PK_ENTITY_null){
+      cout << "WARNING !!!!!!  Ring Edge ! -> no vertices ! " << endl;
+      cout << "need to set v0=v1" << endl;
+      ringtest=true;
+    }
+    GenericVertex *v0=NULL;
+    GenericVertex *v1=NULL;
+    map<PK_TOPOL_t,void*>::iterator itfind = int2ptr.find(verts.first);
+    if (itfind!=int2ptr.end())
+      v0 = (GenericVertex*)(itfind->second);
+    itfind = int2ptr.find(verts.second);
+    if (itfind!=int2ptr.end())
+      v1 = (GenericVertex*)(itfind->second);
+    if ((!v0)||(!v1))
+      cout << " Missing vertex !!!!!!!" << endl;
+
+    // create new edge 
+    GenericEdge *e = new GenericEdge(model, nume, *it,v0,v1);
+    nume++;
+    // add to GModel
+    model->add(e);
+    // databade PK -> ptr
+    int2ptr[*it] = e;
+    if (ringtest) ring_edges[*it] = e;
+  }
+
+  // ---------------------- treating faces -----------------------
+  // set callbacks
+  GenericFace::setFaceGeomType(face_geomType);
+  GenericFace::setFacePeriodicInfo(face_periodic_info);
+  GenericFace::setFaceUVFromXYZ(face_UVFromXYZ);
+  GenericFace::setFaceClosestPoint(face_closestPointOnFaceOrthogonal);
+  GenericFace::setFaceContainsPointFromXYZ(face_containsPointFromXYZ);
+  GenericFace::setFaceContainsPointFromUV(face_containsPointFromUV);
+  GenericFace::setFaceXYZFromUV(face_XYZFromUV);
+  GenericFace::setFaceParBounds(face_parBounds);
+  GenericFace::setFaceCurvatures(face_curvatures);
+  GenericFace::setFaceEvalNormal(face_normal);
+  GenericFace::setFaceFirstDer(face_firstDer);
+  GenericFace::setFaceSecondDer(face_secondDer);
+
+  vector<int> doneentity;
+  map<int,void*> found_ring_edges;
+  int numf = model->getMaxElementaryNumber(0) + 1;
+  for (ParasolidDataBase::face_iter it = db->facebegin();it!=db->faceend();it++){
+    cout << "Face :) " << endl;
+    // create new face 
+    GenericFace *current_face = new GenericFace(model,numf,*it);
+    numf++;
+    model->add(current_face);
+    // databade PK -> ptr
+    int2ptr[*it] = current_face;
+
+
+
+    // recover loops
+    // this replaces the "OCCFace->setup"
+    int nloops;
+    PK_LOOP_t *loops;
+    doneentity.clear();
+    PK_ERROR_code_t err = PK_FACE_ask_loops(*it,&nloops,&loops);
+
+    cout << "face " << current_face->getNativeInt() << " - " << current_face->tag() << endl;
+    cout << "# loops:" << nloops << endl;
+
+    list<PK_EDGE_t> edges;
+    list<int> signs;
+
+    // check for ring edges
+    found_ring_edges.clear();
+    GEdge *cylindre_edge=NULL;
+    for(int i=0;i<nloops;i++){// Cube face: find 1 loop with 4 edges. Cylindre central face: find 2 loops with 1 edge each
+      edges.clear();
+      signs.clear();
+      db->getEdgesAndSigns(loops[i],edges, signs);
+      checkForRingEdges(edges, found_ring_edges);
+    }
+    if (found_ring_edges.size()){
+      treat_ring_edges(current_face,found_ring_edges,numv,nume,cylindre_edge);
+    }
+
+    if (cylindre_edge==NULL){
+      for(int i=0;i<nloops;i++){
+        cout << "loop " << i << endl;
+        edges.clear();
+        signs.clear();
+        db->getEdgesAndSigns(loops[i],edges, signs);
+        cout << "edges.size()=" << edges.size() << endl;
+
+        list<int>::iterator its=signs.begin();
+        list<int>::iterator ite=edges.begin();
+        for (;ite!=edges.end();ite++,its++){
+          if (doneentity.end()!=std::find(doneentity.begin(),doneentity.end(),*ite)) continue;// entity already added
+          map<PK_TOPOL_t,void*>::iterator itfind = int2ptr.find(*ite);
+          if (itfind==int2ptr.end()){
+            cout << "int2ptr: edge not found !!!" << endl;
+            throw;
+          }
+          current_face->addBndInfo(i,(GenericEdge*)(itfind->second),*its);
+          doneentity.push_back(*ite);
+
+          /////////////////////////
+          GenericEdge *e = (GenericEdge*)(itfind->second);
+          if ((*its) > 0 ){
+            cout << "edge " << e->getNativeInt() << " v " <<  e->getBeginVertex()->getNativeInt() << " -> " << e->getEndVertex()->getNativeInt() << endl;
+          }
+          else{
+            cout << "edge " << e->getNativeInt() << " v " <<  e->getEndVertex()->getNativeInt() << " -> " << e->getBeginVertex()->getNativeInt() << endl;
+          }
+          /////////////////////////
+        }
+      }
+    }
+    else{// HACK pour cylindre
+      map<int,void*>::iterator ite = found_ring_edges.begin();
+      GenericEdge *firstedge = (GenericEdge*)ite->second;
+      current_face->addBndInfo(0,firstedge,1);
+
+      int signe = 1;
+      if (firstedge->getEndVertex() == cylindre_edge->getEndVertex()) signe = -1;
+      current_face->addBndInfo(0,cylindre_edge,signe);
+
+      ite++;
+      GenericEdge *secondedge = (GenericEdge*)ite->second;
+      int signe2=1;
+      if (secondedge->getEndVertex() == cylindre_edge->getEndVertex()) signe2 = -1;
+      current_face->addBndInfo(0,secondedge,signe2);
+      
+      current_face->addBndInfo(0,cylindre_edge,-signe);
+    }
+    current_face->createLoops();
+  }
+
+  // ----------------------- treating regions -----------------------
+  int numr = model->getMaxElementaryNumber(0) + 1;
+  for (ParasolidDataBase::region_iter it = db->regionbegin();it!=db->regionend();it++){
+    cout << "Region :) " << endl;
+    // create new region 
+    GenericRegion *r = new GenericRegion(model,numr,*it);
+    numr++;
+    model->add(r);
+    // databade PK -> ptr
+    int2ptr[*it] = r;
+
+    // this replaces the "OCCRegion->setup"
+    int nshells;
+    PK_SHELL_t *shells;
+    PK_REGION_ask_shells(*it,&nshells,&shells);
+    doneentity.clear();
+    for(int i=0;i<nshells;i++){
+      PK_FACE_t *fset ;
+      PK_LOGICAL_t *orients;
+      int nfaces;
+      PK_SHELL_ask_oriented_faces(shells[i],&nfaces,&fset,&orients);
+      for (int iface=0;iface<nfaces;iface++){
+        if (doneentity.end()!=std::find(doneentity.begin(),doneentity.end(),fset[iface])) continue;// entity already added
+        map<PK_TOPOL_t,void*>::iterator itfind = int2ptr.find(fset[iface]);
+        if (itfind==int2ptr.end()){
+          cout << "int2ptr: face not found !!!" << endl;
+          throw;
+        }
+        r->addFace((GenericFace*)(itfind->second), ((orients[iface]==PK_LOGICAL_true) ? 1 : -1));
+        doneentity.push_back(fset[iface]);
+      }
+    }
+  }
+
+  //  ParasolidDataBase::topo_iter it = db->topobegin();
+  //  ParasolidDataBase::class_iter itclass = db->classbegin();
+  //  for (;it!=db->topoend();it++,itclass++){
+  //
+  //    switch((*itclass)){
+  //      case PK_CLASS_body:
+  //        break;
+  //      case PK_CLASS_region:
+  //        break;
+  //      case PK_CLASS_shell:
+  //        break;
+  //      case PK_CLASS_face:
+  //        break;
+  //      case PK_CLASS_loop:
+  //        break;
+  //      case PK_CLASS_fin:
+  //        break;
+  //      case PK_CLASS_edge:
+  //        break;
+  //      case PK_CLASS_vertex:
+  //        break;
+  //      default:
+  //        break;
+  //    }
+  //
+  //  }
+
+
+
+
+}
+
+//------------------------------------------------------------------------
+
+bool ParasolidGModelBuilder::checkForRingEdges(const list<int> &edges, map<int,void*> &found_ring_edges)const{
+  bool found=false;
+  list<int>::const_iterator ite=edges.begin();
+  for (;ite!=edges.end();ite++){
+    map<PK_TOPOL_t,void*>::const_iterator itfind = ring_edges.find(*ite);
+    if (itfind!=ring_edges.end()){// edge found
+      found_ring_edges[itfind->first] = itfind->second;
+      found=true;
+    }
+  }
+  return found;
+};
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::treat_ring_edges(GenericFace *current_face,map<int,void*> &found_ring_edges,int &numv,int &nume, GEdge *&cylindre_edge)const{
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  // HACK pour cylindre
+//  vector<GenericVertex*>temp;
+
+  // for now, simply creating vertices at the end of the ring edges !  
+  for (map<int,void*>::iterator it=found_ring_edges.begin();it!=found_ring_edges.end();it++){
+    // recover edge bounds
+    PK_EDGE_t edge = it->first;
+    double s0,s1;
+    bool e = edge_parBounds(edge, s0, s1);
+    if (!e){
+      cout << "treat_ring_edges: can't recover edge bounds ! " << endl;
+      throw;
+    }
+    // get point at minimum bound
+    vector<double> coord(3,0.);
+    e = edge_xyz_from_t(edge, s0, coord);
+    // create new point, add it to edge
+    // TODO: quel native ID passer ? Si on passe -1 on peut identifier après, dans les call back ??? -> Parasoli ne donne jamais -1 comme numéro ??? Sinon, créer objet GenericRingVertex ? pfff...
+    // ou juste créer GVertex ?!?
+    GenericVertex *v = new GenericVertex(model, numv, 0, coord);
+    numv++;
+    model->add(v);
+    static_cast<GenericEdge*>(it->second)->replaceEndingPoints(v,v);
+
+    // HACK pour cylindre
+//    temp.push_back(v);
+  }
+
+  // HACK pour cylindre
+//  if (found_ring_edges.size()==2){
+//    cylindre_edge = new LinearSeamEdge(model, nume,temp[0],temp[1]);
+//    //current_face->computePeriodicity();
+//    nume++;
+//    // add to GModel
+//    model->add(cylindre_edge);
+//    //    GenericEdge *e2 = new GenericEdge(model, nume, 0,temp[1],temp[0]);
+//    //    nume++;
+//    //    // add to GModel
+//    //    model->add(e2);
+//  }
+
+
+  //  if (found_ring_edges.size()==1){// if only one ring edge -> planar face, add one vertex
+  //  }
+  //  else if (found_ring_edges.size()==2){// if two ring edges -> add two vertices, compute "seam curve"
+  //    // recover PK_FACE
+  //    PK_FACE_t face = current_face->getNativeInt();
+  //    // recover face's surf
+  //    PK_SURF_t surf;
+  //    err=PK_FACE_ask_surf(face,&surf);
+  //    if (err!=PK_ERROR_no_errors){
+  //      cout << "treat_ring_edges: can't recover pk_surf !" << endl;
+  //      throw;
+  //    }
+  //    // get face bounds
+  //    // get isoparam curve
+  //
+  //    err = PK_SURF_make_curve_isoparam(surf,);
+  //    (
+  //     --- received arguments ---
+  //     PK_SURF_t                              surf,    --- surface
+  //     double                                 param,   --- parameter
+  //     PK_PARAM_direction_t                   u_or_v,  --- which direction
+  //     --- is constant
+  //     const PK_SURF_make_curve_isoparam_o_t *options, --- option structure
+  //
+  //     --- returned arguments ---
+  //     PK_CURVE_t                      *const curve,   --- curve
+  //     PK_INTERVAL_t                   *const interval --- portion of curve
+  //     --- on surface
+  //    )
+  //
+  //  }
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::createCompounds()const{
+  map<int,set<PK_TOPOL_t> >::iterator it = alternative2original_tags.begin();
+  int alt;
+  for (;it!=alternative2original_tags.end();it++){// for all compounds
+    alt = it->first;
+    set<PK_TOPOL_t>::iterator  ito = it->second.begin();
+    list<GEdge*> temp;
+    list<GFace*> faces;
+    PK_TOPOL_t num;
+    cout << "composants: ";
+    for (;ito!=it->second.end();ito++){// for all entities in the compound
+      num = *ito;
+      GenericFace *genf = (GenericFace*)(int2ptr[num]);
+      cout << "(gen*:" << genf << " ";
+      faces.push_back(genf);
+      // ito->second->addCompound(f)
+      cout << num << " ";
+    }
+    cout << " -> new GFaceCompound " << alt << " ... " << endl;
+
+    int algo = CTX::instance()->mesh.remeshAlgo;
+
+    // TODO: quel type de param ??? choix auto ???
+    GFaceCompound *f = new GFaceCompound(model, alt, faces,temp, GFaceCompound::CONFORMAL_SPECTRAL,algo);
+    // typedef enum {HARMONIC_CIRCLE=0, CONFORMAL_SPECTRAL=1, RADIAL_BASIS=2, HARMONIC_PLANE=3, CONVEX_CIRCLE=4,CONVEX_PLANE=5, HARMONIC_SQUARE=6, CONFORMAL_FE=7} typeOfCompound;
+
+    cout << "... done" << endl;
+
+    f->meshAttributes.recombine = faces.back()->meshAttributes.recombine;
+
+    model->add(f);
+  }
+
+}
+
+//------------------------------------------------------------------------
+
+///////////////////////////////////////////////////////////////////
+//
+// THIS FUNCTION COULD BE IN GMSH: NO REFERENCE TO PARASOLID !!!!
+//
+///////////////////////////////////////////////////////////////////
+
+void ParasolidGModelBuilder::test() const{
+
+  // tests on edges and vertices
+  Range<double> bounds;
+  GPoint gp;
+  SPoint2 uv;
+  double curv;
+  double epsil=0.;//1.e-2;
+  SVector3 firstder;
+  double param;
+  for (GModel::eiter it = model->firstEdge();it!=model->lastEdge();it++){
+    GEdge *e = *it;
+    cout << "------------------ edge " << e->getNativeInt() << endl;
+    GEntity::GeomType type = e->geomType();
+    cout << "------------- edge type=";
+    switch (type){
+      case GEntity::Line:
+        cout << "Line";
+        break;
+      case GEntity::Circle:
+        cout << "Circle";
+        break;
+      case GEntity::Ellipse:
+        cout << "Ellipse";
+        break;
+      case GEntity::Parabola:
+        cout << "Parabola";
+        break;
+      case GEntity::Hyperbola:
+        cout << "Hyperbola";
+        break;
+      case GEntity::Bezier:
+        cout << "Bezier";
+        break;
+      case GEntity::BSpline:
+        cout << "BSpline";
+        break;
+      case GEntity::TrimmedCurve:
+        cout << "TrimmedCurve";
+        break;
+      case GEntity::Unknown:
+        cout << "Unknown";
+        break;
+    }
+    cout << endl;
+    GVertex *v0=e->getBeginVertex();
+    GVertex *v1=e->getEndVertex();
+
+    if (v0 && v1)
+      cout << "made of vertices (" << v0->x() << "," <<  v0->y() << "," <<  v0->z() << ")  (" <<  v1->x() << "," <<  v1->y() << "," <<  v1->z() << ")" << endl; 
+    else cout << "ring edge" << endl;
+
+    bounds = e->parBounds(0);
+    cout << "parbounds=[" << bounds.low() << "," << bounds.high() << "]" << endl;
+    double midpar=(bounds.low()+bounds.high())/2.;
+    gp = e->point(midpar);
+    cout << "midpoint=[" << gp.x() << "," << gp.y() << "," << gp.z() << "]" << endl;
+    cout << "is degenerated:" << ((e->degenerate(42))==true ? "yes" : "no") << endl;
+    firstder = e->firstDer(midpar);
+    cout << "mid firstder=[" << firstder[0] << "," << firstder[1] << "," << firstder[2] << "]" << endl;
+    curv = e->curvature(midpar);
+    cout << "mid curvature=" << curv << endl;
+    SPoint3 point(gp.x(),gp.y(),gp.z());
+    point[1] += epsil;
+    point[2] += epsil;
+    GPoint closestPoint;
+    GenericEdge *gene;
+    LinearSeamEdge *line;
+    if (gene = dynamic_cast<GenericEdge*>(e)){
+      closestPoint = gene->closestPoint(point,param);
+    }
+    else if (line = dynamic_cast<LinearSeamEdge*>(e)){
+      closestPoint = line->closestPoint(point,param);
+    }
+    else
+      throw;
+    cout << "closest point (mid+epsilon) query point=[" << point[0] << "," << point[1] << "," << point[2] << "]" << endl;
+    cout << "closest point=[" << closestPoint.x() << "," << closestPoint.y() << "," << closestPoint.z() << "]" << endl;
+    cout << "closest point param=" << param << endl; 
+    cout << "is3D:" << ((e->is3D()==true) ?  "yes" : "no") << endl;
+  }
+
+
+  // tests on faces
+  Pair<SVector3,SVector3> fder;
+  double curvmax,curvmin;
+  SVector3 normale, dirmin,dirmax,dudu, dvdv, dudv;
+  Range<double> ubounds,vbounds;
+  SPoint3 random;
+  double initialguess[2] = {0.,0.};
+  random[0] = 1.;
+  random[1] = 2.;
+  random[2] = 3.4;
+  for (GModel::fiter it = model->firstFace();it!=model->lastFace();it++){
+    GFace *f = *it;
+    cout << "------------------ face " << f->getNativeInt() << endl;
+    std::list<GEdge*> edges = f->edges();
+    cout << "#subentities: " << edges.size() << endl;
+    GEntity::GeomType type = f->geomType();
+    cout << "--------------face type=";
+    switch(type){
+      case GEntity::Plane:
+        cout << "Plane";
+        break;
+      case GEntity::Cylinder:
+        cout << "Cylinder";
+        break;
+      case GEntity::Cone:
+        cout << "Cone";
+        break;
+      case GEntity::Sphere:
+        cout << "Sphere";
+        break;
+      case GEntity::Torus:
+        cout << "Torus";
+        break;
+      case GEntity::BezierSurface:
+        cout << "BezierSurface";
+        break;
+      case GEntity::BSplineSurface:
+        cout << "BSplineSurface";
+        break;
+      case GEntity::SurfaceOfRevolution:
+        cout << "SurfaceOfRevolution";
+        break;
+      case GEntity::Unknown:
+        cout << "Unknown";
+        break;
+    }
+    cout << endl;
+    ubounds = f->parBounds(0);
+    vbounds = f->parBounds(1);
+    cout << "face bounds: [" << ubounds.low() << "," << ubounds.high() << "],[" << vbounds.low() << "," << vbounds.high() << "]" << endl;
+
+    double umid = (ubounds.low()+ubounds.high())/2.;
+    double vmid = (vbounds.low()+vbounds.high())/2.;
+    cout << "uvmid = " <<  "(" << umid << "," << vmid << ")" << endl;
+
+
+    //    //------------------------------------------------
+    //    //   HACK
+    //    //------------------------------------------------
+    //    vector<double> brol;
+    //    brol.push_back(umid);
+    //    brol.push_back(vmid);
+    //    bool resu;
+    //    bool ok = face_containsPointFromUV(f->getNativeInt(), brol,resu);
+    //    cout << "resultat: face_containsPointFromUV: " << resu << endl;
+    //    if (!resu) throw;
+    //    //------------------------------------------------
+    //    //------------------------------------------------
+
+
+
+
+
+    gp = f->point(umid,vmid);
+    SPoint3 point(gp.x(),gp.y(),gp.z());
+    cout << "midpt = [" << gp.x() << "," << gp.y() << "," << gp.z() << "]" << endl;
+    uv = f->parFromPoint(point,true);
+    cout << "parFromPoint uv=" << "(" << uv[0] << "," << uv[1] << ")" << endl;
+
+    cout << "contains random pt: " << ((f->containsPoint(random)==true) ? ("yes") : ("no")) << endl;
+    cout << "contains    mid pt: " << ((f->containsPoint(point)==true) ? ("yes") : ("no")) << endl;
+    point[1] += epsil;
+    point[2] += epsil;
+    GPoint closestPoint = f->closestPoint(point,initialguess);
+    cout << "closest point (mid+epsilon) query point=[" << point[0] << "," << point[1] << "," << point[2] << "]" << endl;
+    cout << "closest point=[" << closestPoint.x() << "," << closestPoint.y() << "," << closestPoint.z() << "]" << endl;
+
+    f->curvatures(uv,&dirmax,&dirmin,&curvmax,&curvmin);
+    cout << "curvmax=" << curvmax << "   dirmax=[" << dirmax[0] << "," << dirmax[1] << "," << dirmax[2] << "]" << endl;
+    cout << "curvmin=" << curvmin << "   dirmin=[" << dirmin[0] << "," << dirmin[1] << "," << dirmin[2] << "]" << endl;
+    curvmax = f->curvatureMax(uv);
+    cout << "curvmax=" << curvmax << endl;
+    normale = f->normal(uv);
+    cout << "normal=[" << normale[0] << "," << normale[1] << "," << normale[2] << "]" << endl;
+    fder = f->firstDer(uv);
+    cout << "fder.first()=[" << fder.first()[0] << "," << fder.first()[1] << "," << fder.first()[2] << "]" << endl;
+    cout << "fder.second()=[" << fder.second()[0] << "," << fder.second()[1] << "," << fder.second()[2] << "]" << endl;
+    f->secondDer(uv,&dudu,&dvdv,&dudv);
+    cout << "dudu=[" << dudu[0] << "," << dudu[1] << "," << dudu[2] << "]" << endl;
+    cout << "dvdv=[" << dvdv[0] << "," << dvdv[1] << "," << dvdv[2] << "]" << endl;
+    cout << "dudv=[" << dudv[0] << "," << dudv[1] << "," << dudv[2] << "]" << endl;
+
+
+    // test exhaustif de GVertex->reparamOnFace
+    for (list<GEdge*>::iterator it=edges.begin();it!=edges.end();it++){
+      for (int i=0;i<2;i++){
+        GVertex *v = (i==0) ? (*it)->getBeginVertex() : (*it)->getEndVertex();
+        if (!v){
+          cout << "vertex->reparamOnFace: aborting, ring edge ! " << endl;
+          continue;
+        }
+        uv = v->reparamOnFace(f,0);
+        cout << "vertex->reparamOnFace uv=" << "(" << uv[0] << "," << uv[1] << ")" << endl;
+      }
+    }
+  }
+
+  // test regions
+  if (0){
+    for (GModel::riter it = model->firstRegion();it!=model->lastRegion();it++){
+      GRegion *region = *it;
+      cout << "------------------ region " << region->getNativeInt() << endl;
+      std::list<GFace*> fset = region->faces();
+      cout << "#subentities: " << fset.size() << endl;
+      for (std::list<GFace*>::iterator itf =fset.begin();itf!=fset.end();itf++){
+        GFace *f = *itf;
+        cout << "--- made of face " << f->getNativeInt() << endl;
+        std::list<GEdge*> eset = f->edges();
+        cout << "#subentities: " << eset.size() << endl;
+        std::list<int> dirs = f->orientations();
+        std::list<int>::iterator itdir =dirs.begin();
+
+        for (std::list<GEdge*>::iterator ite =eset.begin();ite!=eset.end();ite++,itdir++){
+          GEdge *e = *ite;
+          cout << "       made of edge " << e->getNativeInt() << endl;
+          for (int ie=0;ie<2;ie++){
+            int num = ie;
+            if ((*itdir)<0) num = (ie==0) ? 1 : 0;
+            GVertex *v = (num==0) ? e->getBeginVertex() : e->getEndVertex();
+            if (v)
+              cout << "             made of vertex " << v->getNativeInt() << endl;
+          }
+        }
+      }
+    }
+  }
+
+
+
+
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::setMeshSizeFields(){
+
+  if (fields) delete fields;
+  if (cd) delete cd;
+  if (cd2) delete cd2;
+  fields = new GenericField(); 
+
+
+  // cylinder 1
+  cd = new cyl_data();
+  cd->x = -0.5; 
+  cd->y = -1.0; 
+  cd->z =  1.0; 
+  cd->u =  0.0; 
+  cd->v =  1.0; 
+  cd->w =  0.0; 
+  cd->radius =  0.5; 
+  cd->meshsize =  0.08; 
+  fields->setCallbackWithData(cylinder_field_callback,cd);
+
+  // cylinder 2
+  cd2 = new cyl_data();
+  cd2->x = -0.5; 
+  cd2->y = -1.0; 
+  cd2->z =  1.0; 
+  cd2->u =  1.0; 
+  cd2->v =  0.0; 
+  cd2->w =  0.0; 
+  cd2->radius =  0.1; 
+  cd2->meshsize =  0.01; 
+  fields->setCallbackWithData(cylinder_field_callback,cd2);
+
+  FieldManager *gmshfields = model->getFields();
+  gmshfields->reset();
+  gmshfields->setBackgroundField(fields);
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::readandwriteGEO() const{
+
+  ///////////////////////////////////////
+  // just a test of read and write geo //
+  ///////////////////////////////////////
+  GModel *modele = new GModel();
+  cout << "readGEO: reading geo" << endl;
+  modele->readGEO("hello.geo");
+
+  //  typedef std::set<GVertex*, GEntityLessThan>::iterator viter;
+  //  for(viter it = modele->firstVertex(); it != modele->lastVertex(); it++){
+  //    double val = (*it)->prescribedMeshSizeAtVertex();
+  //    cout << "val=" << val << "  xyz=" << (*it)->x() << "," <<  (*it)->y() << "," <<  (*it)->z() <<  endl;
+  //  }
+
+
+  cout << "readGEO: writting geo" << endl;
+  modele->writeGEO("geometry.geo");
+
+  cout << "readGEO: meshing" << endl;
+  modele->mesh(2);
+
+
+  modele->writeMSH("geometrymesh.msh");
+
+  delete modele;
+}
+
+//------------------------------------------------------------------------
+
+void ParasolidGModelBuilder::mesh(int dim) const{
+  cout << "readGEO: writting geo" << endl;
+  model->writeGEO("geometry.geo");
+
+
+  //  return;
+
+  //  cout << "writting geo" << endl;
+  //  model->writeGEO("hellobeforemeshing.geo");
+
+
+  // setting GMSH meshing options
+  //  GmshSetOption("Mesh","Algorithm",9.0);// for quad points insertion 
+  //  GmshSetOption("Mesh","Algorithm3D",9.0);// for hex points insertion 
+
+  //  GmshSetOption("Mesh","Smoothing",0.0);
+  //  GmshSetOption("Mesh","Optimize",0.0);
+  //  GmshSetOption("Mesh","OptimizeNetgen",0.0);
+
+  //  GmshSetOption("Mesh","Recombine3DAll",1.0);// for 3D recombination
+
+  //#GmshSetOption("Mesh","RecombineAll",1.0)
+  //#GmshSetOption("Mesh","RecombineAll",1.0)
+  //#GmshSetOption("Mesh","RecombinationAlgorithm",0.0)# 1 is default=Blossom, 0 is based on better quad quality (greedy, not blossom->less quads)
+
+
+
+
+
+
+  // if compounds exist...
+  if (alternative2original_tags.size()){
+    // sets params for compounds
+    GmshSetOption("Mesh","RemeshParametrization",1.); //(0) harmonic (1) conformal 
+    GmshSetOption("Mesh","RemeshAlgorithm",0.);  //(0) nosplit (1) automatic (2) split metis
+    // create compounds
+    createCompounds();
+  }
+
+
+  //  CTX::instance()->mesh.lcMin  = 0.05;
+  //  CTX::instance()->mesh.lcMax  = 0.1;
+
+
+  cout << "***********************************************" << endl;
+  cout << "lcIntegrationPrecision = " << CTX::instance()->mesh.lcIntegrationPrecision << endl;
+  cout << "toleranceEdgeLength = " << CTX::instance()->mesh.toleranceEdgeLength << endl;
+  cout << "tolerance = " << CTX::instance()->geom.tolerance << endl;
+  cout << "PK session tolerance : " << db->get_parasolid_session_precision() << endl;
+  cout << "***********************************************" << endl;
+
+  CTX::instance()->mesh.lcFromPoints  = 1;
+  CTX::instance()->mesh.lcFromCurvature = 0;
+  CTX::instance()->mesh.lcExtendFromBoundary = 1;
+
+  if (CTX::instance()->mesh.lcFromCurvature) 
+    CTX::instance()->mesh.lcFromPoints  = 1;// Sinon, semble planter ...
+
+
+  CTX::instance()->mesh.algo2d  = 9.;
+  CTX::instance()->mesh.algo3d  = 9.;
+  CTX::instance()->mesh.nbSmoothing  = 0.;
+  CTX::instance()->mesh.optimize  = 0.;
+  CTX::instance()->mesh.optimizeNetgen  = 0.;
+  GmshSetOption("Mesh","Recombine3DAll",1.0);// for 3D recombination
+
+
+
+  model->mesh(dim);
+
+
+
+
+
+
+  model->writeMSH("mesh_from_PKInterface.msh");
+
+}
+
diff --git a/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.h b/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.h
new file mode 100644
index 0000000..b515e1b
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/ParasolidGModelBuilder.h
@@ -0,0 +1,52 @@
+
+#ifndef _PARASOLID_GMODELBUILDER_H_
+#define _PARASOLID_GMODELBUILDER_H_
+
+#include "ParasolidDataBase.h"
+#include<map>
+#include<set>
+
+
+
+class GModel;
+class GenericField;
+class GenericFace;
+class GEdge;
+class cyl_data;
+
+class ParasolidGModelBuilder{
+  public:
+    ParasolidGModelBuilder(ParasolidDataBase *_db);
+    ~ParasolidGModelBuilder();
+    void buildGModel() const;
+    void createCompounds()const;
+    void mesh(int dim) const;
+    void readandwriteGEO() const;
+    void test() const;
+
+    void set_alternative_tag(PK_TOPOL_t original, int alternative)const;
+    void setMeshSizeFields();
+
+  private:
+    const ParasolidDataBase *db;
+
+    // correspondence GenericEntity* <-> PK_ENTITY_t
+    mutable map<PK_TOPOL_t,void*> int2ptr;
+    mutable map<PK_TOPOL_t,void*> ring_edges;
+    // used to re-tag. For instance, use same tag for 2 faces.
+    mutable map<int,set<PK_TOPOL_t> > alternative2original_tags;
+    mutable map<PK_TOPOL_t,int> original2alternative_tags;
+
+
+    
+    bool checkForRingEdges(const list<int> &edges, map<int,void*> &found_ring_edges)const;
+    void treat_ring_edges(GenericFace *current_face,map<int,void*> &found_ring_edges, int &numv, int &nume, GEdge *&cylindre_edge)const;
+
+
+    GModel *model;
+    GenericField *fields;
+    cyl_data *cd,*cd2;
+};
+
+
+#endif
diff --git a/contrib/Parasolid/interface_parasolid/callbacks.cpp b/contrib/Parasolid/interface_parasolid/callbacks.cpp
new file mode 100644
index 0000000..cf7f44c
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/callbacks.cpp
@@ -0,0 +1,1037 @@
+
+
+#include "callbacks.h"
+#include<iostream>
+#include<math.h>
+#include "GmshMessage.h"
+
+using namespace std;
+
+
+//------------------------------------------------------------------------
+
+double constant_meshsize_data::meshsize = 0.05;
+
+//------------------------------------------------------------------------
+
+// for periodic surfs, ensures that th returned parameters are in the range of the Face (not just the curve)
+void check_validity_for_periodic(const PK_FACE_t &face, PK_UV_t &uv){
+  double umin,umax,vmin,vmax;
+  face_parBounds(face, 0, umin,umax);
+  face_parBounds(face, 1, vmin,vmax);
+  double tol;
+  PK_SESSION_ask_precision(&tol);
+  bool ok_u = ((uv.param[0]<=(umax+3.*tol)) && (uv.param[0]>=(umin-3.*tol)));
+  bool ok_v = ((uv.param[1]<=(vmax+3.*tol)) && (uv.param[1]>=(vmin-3.*tol)));
+  if ((!ok_u)||(!ok_v)){
+    PK_SURF_t surf;
+    PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+    PK_PARAM_sf_t params[2];
+    PK_SURF_ask_params(surf,params);
+    double period;
+
+    //if (!ok_u && ok_v)
+    if (!ok_u){
+      period = fabs(params[0].range.value[1] - params[0].range.value[0]);
+      uv.param[0] += period;
+//      cout << "fixing u periodic issue " << endl;
+    }
+    //else if (!ok_v && ok_u){
+    if (!ok_v){
+      period = fabs(params[1].range.value[1] - params[1].range.value[0]);
+      uv.param[1] += period;
+//      cout << "fixing v periodic issue " << endl;
+    }
+  }
+}
+
+//------------------------------------------------------------------------
+
+void print_face_info(const PK_FACE_t &face){
+  double u0,u1,v1,v0;
+  cout << "-----------------------------------------" << endl;
+  cout << "------------  Face Infos ----------------" << endl;
+  cout << "-----------------------------------------" << endl;
+  cout << "Native ID: " << face << endl;
+  string s;
+  face_geomType(face,s);
+  cout << "Geom Type: " << s << endl;
+  if ((face_parBounds(face, 0, u0,u1)) && (face_parBounds(face, 1, v0,v1))){
+    cout << "Param Bounds: [" << u0 << "," << u1 << "] [" << v0 << ',' << v1 << "]" << endl;
+  }
+  else{
+    cout << "face_parBounds crash !!!" << endl;
+  }
+  int nedges;
+  PK_EDGE_t *edges;
+  PK_FACE_ask_edges(face,&nedges,&edges);
+  cout << "# edges: " << nedges << endl;
+  for (int i=0;i<nedges;i++){
+    cout << "   edge id: " << edges[i];
+    edge_geomType(edges[i],s);
+    cout << "  type: " << s  << endl;
+  }
+  cout << "-----------------------------------------" << endl;
+  cout << "-----------------------------------------" << endl;
+}
+
+//------------------------------------------------------------------------
+
+PK_ERROR_code_t get_curve(const PK_EDGE_t &edge, PK_CURVE_t &curve, PK_LOGICAL_t &sense){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  //err = PK_EDGE_ask_curve(e,&curve);
+  //if (err!=PK_ERROR_no_errors) return false;
+
+  PK_LOGICAL_t want_interval = PK_LOGICAL_false;
+  PK_CLASS_t class_edge;
+  PK_VECTOR_t ends[2];
+  PK_INTERVAL_t t_int;
+
+  err = PK_EDGE_ask_geometry(edge, want_interval, &curve, &class_edge, ends, &t_int, &sense);
+  if (curve==PK_ENTITY_null){
+    cout << "get_curve : curve is NULL" << endl;
+    throw;
+  }
+  return err;
+}
+
+//------------------------------------------------------------------------
+
+PK_ERROR_code_t get_edge_interval(const PK_EDGE_t &edge, PK_INTERVAL_t &inter, PK_LOGICAL_t &sense){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t want_interval = PK_LOGICAL_true;
+  PK_CLASS_t class_edge;
+  PK_VECTOR_t ends[2];
+
+  err = PK_EDGE_ask_geometry(edge, want_interval, &curve, &class_edge, ends, &inter, &sense);
+  // d'après la doc, "always increasing parameter along the CURVE " !!! for ends and inter.
+  if (curve==PK_ENTITY_null){
+    cout << "get_edge_interval : curve is NULL" << endl;
+    throw;
+  }
+  return err;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_xyz_from_t(const PK_EDGE_t edge, double t, vector<double> &res){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  // recover the curve from the edge
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  err = get_curve(edge,curve,sense);
+  if (err!=PK_ERROR_no_errors){
+    cout << "edge_xyz_from_t : get_curve error=" << err << endl;
+    return false;
+  }
+  if (curve==PK_ENTITY_null) return false;
+
+  // ask the curve
+  PK_VECTOR_t vec[1];
+  // WARNING: NEED TO REVERSE COORDINATE TO CALL PK_FUNCTIONS, NOT TO CALL CALLBACK FUNCTIONS !!! 
+  if (sense==PK_LOGICAL_false){// reverse param coordinate
+    double s0,s1;
+    edge_parBounds(edge,s0,s1);
+    t = s0 + s1 - t;
+  }
+  err = PK_CURVE_eval(curve, t, 0, vec);
+  if (err!=PK_ERROR_no_errors){
+    cout << "edge_xyz_from_t : PK_CURVE_eval error=" << err << endl;
+    return false;
+  }
+
+  for (int i=0;i<3;i++)
+    res[i] = vec[0].coord[i];
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool vertex_mesh_size(const PK_VERTEX_t vertex, double *size, void *user_data){
+  // HERE: insert fcts from VirfacLib.MeshGemsInterface... :
+  // size_on_point(vertex, size, user_data)
+  // for now, overloading:
+
+  *size = constant_meshsize_data::get_mesh_size();//125;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool vertex_xyz(const PK_VERTEX_t vertex, vector<double> &res){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_POINT_sf_t point_sf;
+  PK_POINT_t point;
+  err=PK_VERTEX_ask_point(vertex,&point);
+  if (err!=PK_ERROR_no_errors) return false;
+  if (point==PK_ENTITY_null) return false;
+  err=PK_POINT_ask(point,&point_sf);
+  if (err!=PK_ERROR_no_errors) return false;
+  for (int i=0;i<3;i++)
+    res[i] = point_sf.position.coord[i];
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_parBounds(const PK_EDGE_t edge, double &s0,double &s1, PK_LOGICAL_t &sense){
+  PK_INTERVAL_t inter;
+  //  PK_ERROR_code_t err = PK_EDGE_find_interval(edge,&inter);
+  PK_ERROR_code_t err = get_edge_interval(edge, inter,sense);
+
+  if ((err==PK_ERROR_missing_geom)||(err!=PK_ERROR_no_errors)){
+    cout << "edge_parBounds::get_edge_interval error = " << err << endl;
+    return false;
+  }
+  // d'après la doc, "always increasing parameter along the CURVE " !!! for ends and inter.
+  // --> s0 < s1, toujours !
+  s0 = inter.value[0];
+  s1 = inter.value[1];
+
+//  if (inter.value[0]>inter.value[1]){
+//    Msg::Error("throw min max !!!");
+//  }
+//  s0 = std::min(inter.value[0],inter.value[1]);
+//  s1 = std::max(inter.value[0],inter.value[1]);
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_parBounds(const PK_EDGE_t edge, double &s0,double &s1){
+  PK_LOGICAL_t sense;
+  return (edge_parBounds(edge, s0, s1, sense));
+}
+
+//------------------------------------------------------------------------
+
+bool edge_geomType(const PK_EDGE_t e,string &s){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  err = get_curve(e,curve,sense);
+  if (err!=PK_ERROR_no_errors){
+    cout << "callback edge_geomType:: PK_ERROR_t get_curve " << err << endl;
+    return false;
+  }
+
+  PK_CLASS_t classe;
+  err=PK_ENTITY_ask_class(curve,&classe);// marche pour une curve, mais pas pour une edge !!!! WTF ??? !!!
+  if (err!=PK_ERROR_no_errors){
+    cout << "callback edge_geomType:: PK_ERROR_t ask_class " << err << endl;
+    return false;
+  }
+
+
+  bool result = true;
+
+  switch (classe){
+    case PK_CLASS_line:
+      s.assign("Line");
+      break;
+    case PK_CLASS_circle:
+      s.assign("Circle");
+      break;
+    case PK_CLASS_ellipse:
+      s.assign("Ellipse");
+      break;
+    case PK_CLASS_bcurve:// BSpline-type curve ...
+      {
+        PK_BCURVE_sf_t bcurve_sf;
+        PK_BCURVE_ask(curve,&bcurve_sf);
+
+        switch(bcurve_sf.form){
+          case PK_BCURVE_form_parabolic_c:
+            s.assign("Parabola");
+            break;
+          case PK_BCURVE_form_hyperbolic_c:
+            s.assign("Hyperbola");
+            break;
+        }
+        if (bcurve_sf.knot_type == PK_knot_piecewise_bezier_c){
+          s.assign("Bezier");
+          break;
+        }
+        else{
+          s.assign("BSpline");
+          break;
+        }
+        break;
+      }
+    case PK_CLASS_trcurve:
+      s.assign("TrimmedCurve");
+      break;
+    case PK_CLASS_spcurve:
+      s.assign("SP_curve (something weird in parasolid, helping defining tolerance and precision on curves ??? Not required in Gmsh ??? ");
+      PK_SPCURVE_sf_t spcurve_sf;
+      PK_SPCURVE_ask(curve,&spcurve_sf);
+      err=PK_ENTITY_ask_class(spcurve_sf.curve,&classe);
+      switch (classe){
+        case PK_CLASS_line:
+          s.assign("Line");
+          break;
+        case PK_CLASS_circle:
+          s.assign("Circle");
+          break;
+        case PK_CLASS_ellipse:
+          s.assign("Ellipse");
+          break;
+        case PK_CLASS_bcurve:// BSpline-type curve ...
+          {
+            PK_BCURVE_sf_t bcurve_sf;
+            PK_BCURVE_ask(spcurve_sf.curve,&bcurve_sf);
+
+            switch(bcurve_sf.form){
+              case PK_BCURVE_form_parabolic_c:
+                s.assign("Parabola");
+                break;
+              case PK_BCURVE_form_hyperbolic_c:
+                s.assign("Hyperbola");
+                break;
+            }
+            if (bcurve_sf.knot_type == PK_knot_piecewise_bezier_c){
+              s.assign("Bezier");
+              break;
+            }
+            else{
+              s.assign("BSpline");
+              break;
+            }
+            break;
+          }
+        default:
+          s.assign("Unknown");
+          result=false;
+          break;
+      }
+      break;
+    case PK_CLASS_cpcurve:
+      s.assign("No info on what is cpcurve ???? Can't find anything in the doc...");
+      break;
+    case PK_CLASS_fcurve:
+      s.assign("Foreign geometry curve");
+      break;
+    case PK_CLASS_icurve:
+      s.assign("Intersection curve");
+      break;
+    default:
+      s.assign("Unknown");
+      result = false;
+      break;
+  }
+
+  if (!result){
+    cout << "callback edge_geomType:: Class not referenced in the switch" << endl;
+    cout << "returning:\"" << s << "\"" << endl;
+  }
+  if (s.empty()) throw;
+  return result;
+
+  // TODO: question:
+  // pourquoi on peut avoir un type "Cylindre", et un type "BSurf -> de type cylindre"... ???
+
+  //TODO: what are these in gmsh ????????
+  //  return OffsetCurve;
+  //  return Conic;// il y a deja hyperbole, ellipse, cercle et parabole pourtant...
+
+
+
+
+}
+
+//------------------------------------------------------------------------
+
+bool face_periodic_info(const PK_FACE_t face, bool &per_u, bool &per_v, double &period_u, double &period_v){
+  PK_PARAM_periodic_t periodic_u,periodic_v;
+  PK_ERROR_code_t err = PK_FACE_is_periodic(face,&periodic_u,&periodic_v);
+  if (err!=PK_ERROR_no_errors){
+    cout << "face_periodic_info : PK_FACE_is_periodic error=" << err << endl;
+    return false;
+  }
+  per_u=false;
+  per_v=false;
+  if (periodic_u==PK_PARAM_periodic_yes_c) per_u = true;
+  if (periodic_v==PK_PARAM_periodic_yes_c) per_v = true;
+  
+  period_u=0;
+  period_v=0;
+  if (per_u||per_v){
+    double u0,u1,v0,v1;
+    if (!face_parBounds(face, 0, u0,u1)) return false;
+    if (!face_parBounds(face, 1, v0,v1)) return false;
+    period_u = u1-u0;
+    period_v = v1-v0;
+  }
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_geomType(const PK_FACE_t face, string &s){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_SURF_t surf;
+  err=PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_CLASS_t classe;
+  err=PK_ENTITY_ask_class(surf,&classe);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  switch (classe){
+    case PK_CLASS_plane:
+      s.assign("Plane");
+      return true;
+    case PK_CLASS_cyl:
+      s.assign("Cylinder");
+      return true;
+    case PK_CLASS_cone:
+      s.assign("Cone");
+      return true;
+    case PK_CLASS_sphere:
+      s.assign("Sphere");
+      return true;
+    case PK_CLASS_torus:
+      s.assign("Torus");
+      return true;
+    case PK_CLASS_bsurf:
+      {
+        PK_BSURF_sf_t bsurf_sf;
+        PK_BSURF_ask(surf,&bsurf_sf);
+        if ((bsurf_sf.u_knot_type == PK_knot_piecewise_bezier_c)&&(bsurf_sf.v_knot_type == PK_knot_piecewise_bezier_c)){
+          s.assign("BezierSurface");
+          return true;
+        }
+        else{
+          s.assign("BSplineSurface");
+          return true;
+        }
+      }
+    case PK_CLASS_spun:
+      s.assign("SurfaceOfRevolution");
+      return true;
+    case PK_CLASS_offset:
+      s.assign("Offset ??? not in gmsh ?");
+      return true;
+    case PK_CLASS_fsurf:
+      s.assign("Foreign Surface");
+      return true;
+    case PK_CLASS_swept:
+      s.assign("Swept surface ??? not in gmsh ?");
+      return true;
+    case PK_CLASS_blendsf:
+      s.assign("Blendsf ??? not in gmsh ?");
+      return true;
+    default:
+      s.assign("Unknown");
+  }
+  return false;
+
+  // TODO: difference, exactly ??? uknots and vknots, ...???
+  //  return BezierSurface;
+  //  return BSplineSurface;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_degenerate(const PK_EDGE_t e, bool &res){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense;
+  err = get_curve(e,curve,sense);
+  if (err!=PK_ERROR_no_errors){
+    cout << "edge_degenerate : get_curve error=" << err << endl;
+    return false;
+  }
+
+  PK_CURVE_find_degens_o_t options;
+  PK_CURVE_find_degens_o_m(options);
+  PK_CURVE_degens_t results;
+  err=PK_CURVE_find_degens(curve,&options,&results);
+  if (err!=PK_ERROR_no_errors){
+    cout << "edge_degenerate : PK_CURVE_find_degens error=" << err << endl;
+    return false;
+  }
+
+  res = (results.n_degen!=0);
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_firstder_from_par(const PK_EDGE_t e, double par, vector<double> &res){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  err = get_curve(e,curve,sense);
+  // WARNING: NEED TO REVERSE COORDINATE TO CALL PK_FUNCTIONS, NOT TO CALL CALLBACK FUNCTIONS !!! 
+  if (sense==PK_LOGICAL_false){// reverse param coordinate
+    double s0,s1;
+    edge_parBounds(e,s0,s1);
+    par = s0 + s1 - par;
+  }
+
+  //PK_EDGE_ask_geometry ???
+  PK_VECTOR_t vec[2];
+  err=PK_CURVE_eval(curve, par, 1, vec);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  //  cout << "callback: edge first der:";
+  for (int i=0;i<3;i++){
+    res[i] = vec[1].coord[i];
+    //    cout << res[i] << "  ";
+  }
+  //  cout << endl;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_curvature_from_par(const PK_EDGE_t e, double par, double &curvature){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  err = get_curve(e,curve,sense);
+  if (err!=PK_ERROR_no_errors) return false;
+  // WARNING: NEED TO REVERSE COORDINATE TO CALL PK_FUNCTIONS, NOT TO CALL CALLBACK FUNCTIONS !!! 
+  if (sense==PK_LOGICAL_false){// reverse param coordinate
+    double s0,s1;
+    edge_parBounds(e,s0,s1);
+    par = s0 + s1 - par;
+  }
+
+  PK_VECTOR1_t tangent;
+  PK_VECTOR1_t principal_normal;
+  PK_VECTOR1_t binormal;
+  err=PK_CURVE_eval_curvature(curve, par, &tangent, &principal_normal, &binormal, &curvature);
+  if (err!=PK_ERROR_no_errors) return false;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_containsPointFromT(const PK_EDGE_t edge, const double param, bool &res){
+  // check if point corresponding to param lies on edge
+  double s0,s1;
+  res=true;
+  bool ok = edge_parBounds(edge,s0,s1);
+  if ((param<s0)||(param>s1)){
+    res = false;
+    //cout << "    ---> Parameter (" << end.parameters[0] << ") is OUTSIDE edge bounds !!!" << endl;
+  }
+  //  else{
+  //    cout << "    ---> Parameter (" << end.parameters[0] << ") is INSIDE edge bounds !!!" << endl;
+  //    cout << "         end_pos = ("<<pos.coord[0] << "," << pos.coord[1] << "," << pos.coord[2] << ")"<<endl;
+  //  }
+  return ok;
+
+}
+
+//------------------------------------------------------------------------
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// using orthogonal projection to the CURVE !!!!!
+// if using PK_TOPOL_range_vector, it projects on the EDGE, not the curve -> not orthogonal, not what we want !!!!!!!!
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+bool edge_closestPointOrthogonal(const PK_EDGE_t e, const vector<double> &coord, double &param, vector<double> &res, bool &is_on_edge){
+  // recover the curve
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_CURVE_t curve;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  err = get_curve(e,curve,sense);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  // compute projection
+  PK_GEOM_range_vector_o_t    options;
+  PK_GEOM_range_vector_o_m(options);
+  PK_VECTOR_t vec;
+  for (int i=0;i<3;i++)
+    vec.coord[i] = coord[i];
+
+  PK_range_result_t rangeres;
+  PK_range_1_r_t range;
+
+  err = PK_GEOM_range_vector(curve,vec,&options, &rangeres, &range);
+  if (err!=PK_ERROR_no_errors) return false;
+  if (rangeres != PK_range_result_found_c) return false;
+
+  //cout << "         distance=" << range.distance << endl;
+  PK_range_end_t  end = range.end;
+  PK_VECTOR_t  pos = end.vector;
+
+  param=end.parameters[0];
+
+  edge_containsPointFromT(e,param,is_on_edge);
+
+  for (int i=0;i<3;i++)
+    res[i] = pos.coord[i];
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool edge_is3D(const PK_EDGE_t edge, bool &res){
+  PK_LOGICAL_t planar;
+  PK_PLANE_t brol;
+  PK_ERROR_code_t err = PK_EDGE_is_planar(edge, PK_LOGICAL_false, &planar, &brol);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  res=true;
+  if (planar==PK_LOGICAL_true) res=false;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_UVFromXYZ(const PK_FACE_t face, const vector<double> &coord, vector<double> &res){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UV_t uv;
+  PK_VECTOR_t pos = {coord[0],coord[1],coord[2]};
+  err = PK_SURF_parameterise_vector(surf,pos,&uv);
+  if (err==PK_ERROR_not_on_surface) cout << "PK_ERROR_not_on_surface" << endl;
+  if (err!=PK_ERROR_no_errors) return false;
+
+
+  // WARNING: there must be an easier way... but in the meanwhile, need to solve the periodic issue:
+  // a surf goes from 0 to 2 pi, a face from pi to 2pi : this returns 0 instead of 2pi !!!
+//  cout << "before check_validity_for_periodic: uv = [" << uv.param[0] << "," << uv.param[1] << "]" << endl;
+  check_validity_for_periodic(face,uv);
+
+
+//  cout << "face_UVFromXYZ: uv = [" << uv.param[0] << "," << uv.param[1] << "]" << endl;
+
+
+  for (int i=0;i<2;i++)
+    res[i] = uv.param[i];
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_closestPointOnFaceOrthogonal(const PK_FACE_t f, const vector<double> &coord, vector<double> &xyzres, vector<double> &uvres){
+  PK_ERROR_code_t err = PK_ERROR_no_errors;
+  PK_SURF_t surf;
+  err=PK_FACE_ask_surf(f,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_GEOM_range_vector_o_t    options;
+  PK_GEOM_range_vector_o_m(options);
+  PK_VECTOR_t vec;
+  for (int i=0;i<3;i++)
+    vec.coord[i] = coord[i];
+  PK_range_result_t rangeres;
+  PK_range_1_r_t range;
+  err = PK_GEOM_range_vector(surf,vec,&options, &rangeres, &range);
+  if (err!=PK_ERROR_no_errors) return false;
+  if (rangeres!=PK_range_result_found_c) return false;
+
+  PK_range_end_t  end = range.end;
+  PK_VECTOR_t  pos = end.vector;
+
+  for (int i=0;i<2;i++)
+    uvres[i] = end.parameters[i];
+  for (int i=0;i<3;i++)
+    xyzres[i] = pos.coord[i];
+
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_containsPointFromXYZ(const PK_FACE_t face, const vector<double> &xyz, bool &res){
+  PK_FACE_contains_vectors_o_t options;
+  PK_FACE_contains_vectors_o_m(options);
+  PK_TOPOL_t topols[1];
+  options.n_vectors = 1;
+  PK_VECTOR_t pos = {xyz[0],xyz[1],xyz[2]};
+  options.vectors = &pos;
+  PK_ERROR_code_t err=PK_FACE_contains_vectors(face,&options,topols);
+  if (err!=PK_ERROR_no_errors){
+    // try again, assuming the vector is not on the face
+    options.is_on_surf = PK_LOGICAL_false;
+    PK_ERROR_code_t err2=PK_FACE_contains_vectors(face,&options,topols);
+    if (err2!=PK_ERROR_no_errors){
+      cout << "face_containsPointFromXYZ : error1 = " << err << " error2=" << err2 << endl;
+      return false;
+    }
+  }
+
+  //    cout << "topols[0]=" << topols[0] << endl;
+  //    //////////////////////////////////////////////////////
+  //    // just a debug output... 
+  //    //////////////////////////////////////////////////////
+  //    PK_UVBOX_t uvbox;//umin vmin umax vmax
+  //    PK_LOGICAL_t isrect;
+  //    PK_FACE_is_uvbox(face,&isrect,&uvbox);
+  //    if (isrect==PK_LOGICAL_true){
+  //      cout << "RECTANGLE !  BOX=" << uvbox.param[0] << "," <<  uvbox.param[2] << " ... " <<  uvbox.param[1] << "," <<  uvbox.param[3] << endl;
+  //    }
+  //    //////////////////////////////////////////////////////
+  //    //////////////////////////////////////////////////////
+  //    //////////////////////////////////////////////////////
+
+  res=true;
+  if (topols[0]==PK_ENTITY_null){
+    res=false;
+    return true;
+  }
+
+  //  // type de topols[0] ?
+  //  PK_CLASS_t classe;
+  //  err=PK_ENTITY_ask_class(topols[0],&classe);
+  //  if (err!=PK_ERROR_no_errors) return false;
+  //  switch(classe){
+  //    case PK_CLASS_edge:
+  //      cout << "edge ! " << endl;
+  //      break;
+  //    case PK_CLASS_vertex:
+  //      cout << "vertex !"  << endl;
+  //      break;
+  //    case PK_CLASS_face:
+  //      cout << "face ! " << endl;
+  //      break;
+  //  }
+
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_containsPointFromUV(const PK_FACE_t face, const vector<double> &uv, bool &res){
+
+  //------------------------------------------------------------
+  // CE QUI SUIT A L'AIR DE MERDER, JE SAIS PAS POURQUOI !!!!!!!!!!!!!!!!
+  // un plan ne contient pas son midpt parametrique ???
+  //------------------------------------------------------------
+
+  PK_FACE_contains_vectors_o_t options;
+  PK_FACE_contains_vectors_o_m(options);
+  PK_TOPOL_t topols[1];
+  options.n_uvs = 1;
+  PK_UV_t pos = {uv[0],uv[1]};
+  options.uvs = &pos;
+  PK_ERROR_code_t err=PK_FACE_contains_vectors(face,&options,topols);
+  if ((err!=PK_ERROR_no_errors)||(topols[0]==PK_ENTITY_null)){
+    cout << "first output null : " << ((topols[0]==PK_ENTITY_null) ? "yes" : "no") << endl;
+    // try again, assuming the vector is not on the face
+    options.is_on_surf = PK_LOGICAL_false;
+    PK_ERROR_code_t err2=PK_FACE_contains_vectors(face,&options,topols);
+    if (err2!=PK_ERROR_no_errors){
+      cout << "face_containsPointFromUV : error1 = " << err << " error2=" << err2 << endl;
+      return false;
+    }
+    cout << "second output null : " << ((topols[0]==PK_ENTITY_null) ? "yes" : "no") << endl;
+    cout << "asking for uv: [" << uv[0] << "," << uv[1] << "]" << endl;
+    print_face_info(face);
+  }
+
+  //  cout << "topols[0]=" << topols[0] << endl;
+
+  res=true;
+  if (topols[0]==PK_ENTITY_null){
+    res=false;
+    return true;
+  }
+
+  return true;
+
+
+}
+
+//------------------------------------------------------------------------
+
+bool face_XYZFromUV(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &xyzres){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors){
+    cout << "face_XYZFromUV::PK_FACE_ask_surf error = " << err << endl;
+    return false;
+  }
+
+  PK_UV_t uv = {uvcoord[0],uvcoord[1]};
+  PK_VECTOR_t vec;
+  err=PK_SURF_eval(surf,uv,0,0,PK_LOGICAL_false,&vec);
+  if (err!=PK_ERROR_no_errors){
+    if (err == PK_ERROR_bad_parameter){
+      double s0,s1;
+      bool test = face_parBounds(face, 0, s0,s1);
+      cout << "face bounds u:" << s0 << " " << s1 << endl;
+      test = face_parBounds(face, 1, s0,s1);
+      cout << "face bounds v:" << s0 << " " << s1 << endl;
+      cout << "uv = " << uvcoord[0] << " " << uvcoord[1] << endl;
+      cout << "face_XYZFromUV::PK_SURF_eval error = " << err << " , given uv coords are out of range  " << endl;
+    }
+    else
+      cout << "face_XYZFromUV::PK_SURF_eval error = " << err << endl;
+    return false;
+  }
+
+  for (int i=0;i<3;i++)
+    xyzres[i] = vec.coord[i];
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_parBounds(const PK_FACE_t face, const int dir, double &s0, double &s1){
+  // surf bounds != face bounds !!!!!!!!!!!
+  //  PK_SURF_t surf;
+  //  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  //  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UVBOX_t uvbox;//umin vmin umax vmax
+  PK_ERROR_code_t err=PK_FACE_find_uvbox(face,&uvbox);
+  if (err!=PK_ERROR_no_errors){
+    cout << "callbacks:: face_parBounds : error: " << err << endl;
+    return false;
+  }
+  //  else cout << "callbacks:: face_parBounds OK" << endl;
+
+  if(dir == 0){
+    s0 = uvbox.param[0];
+    s1 = uvbox.param[2];
+  }
+  else{
+    s0 = uvbox.param[1];
+    s1 = uvbox.param[3];
+  }
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_curvatures(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &dirmax, vector<double> &dirmin, double &maxcurv, double &mincurv){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UV_t uv = {uvcoord[0],uvcoord[1]};
+  PK_VECTOR_t normal, principal_dir_1, principal_dir_2;
+  err = PK_SURF_eval_curvature(surf,uv,&normal,&principal_dir_1, &principal_dir_2, &mincurv,&maxcurv);
+  for (int i=0;i<3;i++){
+    dirmax[i] = principal_dir_2.coord[i];
+    dirmin[i] = principal_dir_1.coord[i];
+  }
+  if (err!=PK_ERROR_no_errors) return false;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_normal(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &normale){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UV_t uv = {uvcoord[0],uvcoord[1]};
+  PK_VECTOR_t normal, principal_dir_1, principal_dir_2;
+  double mincurv,maxcurv;
+  err = PK_SURF_eval_curvature(surf,uv,&normal,&principal_dir_1, &principal_dir_2, &mincurv,&maxcurv);
+  for (int i=0;i<3;i++)
+    normale[i] = normal.coord[i];
+  if (err!=PK_ERROR_no_errors) return false;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_firstDer(const PK_FACE_t face,const vector<double> &uv,vector<double> &deru,vector<double> &derv){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UV_t uvs;
+  uvs.param[0] = uv[0];
+  uvs.param[1] = uv[1];
+  PK_VECTOR_t p[3];
+  err=PK_SURF_eval(surf,uvs,1,1,PK_LOGICAL_true,p);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  for (int i=0;i<3;i++){
+    deru[i] = p[1].coord[i];
+    derv[i] = p[2].coord[i];
+  }
+  //  cout << "callback: face first der:" << endl;
+  //  for (int i=0;i<3;i++)
+  //    cout << deru[i] << "  ";
+  //  cout << endl;
+  //  for (int i=0;i<3;i++)
+  //    cout << derv[i] << "  ";
+  //  cout << endl;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool face_secondDer(const PK_FACE_t face, const vector<double> &uv, vector<double> &deruu,vector<double> &dervv,vector<double> &deruv){
+  PK_SURF_t surf;
+  PK_ERROR_code_t err = PK_FACE_ask_surf(face,&surf);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  PK_UV_t uvs = {uv[0],uv[1]};
+  PK_VECTOR_t p[6];
+  err=PK_SURF_eval(surf,uvs,2,2,PK_LOGICAL_true,p);
+  if (err!=PK_ERROR_no_errors) return false;
+
+  for (int i=0;i<3;i++){
+    deruu[i] = p[2].coord[i];
+    dervv[i] = p[5].coord[i];
+    deruv[i] = p[4].coord[i];
+  }
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+// dir is 1 or -1 !!! edge normal direction or reverse direction, respectively
+bool edge_reparamOnFace(const PK_EDGE_t edge, const PK_FACE_t f, const double par, const int dir, vector<double> &res){
+
+  // CHECK if par is in range !
+  double s0,s1,tol;
+  PK_LOGICAL_t sense = PK_LOGICAL_true;
+  if (!edge_parBounds(edge, s0,s1,sense)) return false;
+  PK_SESSION_ask_precision(&tol);
+  if ((par < (s0-3.*tol)) || (par > (s1+3.*tol))){
+    cout << "edge_reparamOnFace error: given parameter " << par << " is out of edge range " << s0 << " " << s1 << endl;
+    return false;
+  }
+
+  // An edge between two faces has two fins. Each fin is attached to a face. 
+  // Need to find the fin corresponding to const PK_FACE_t f ...
+  PK_FIN_t fin;
+  bool ok = get_fin_from_edge_and_face(edge,f,fin);
+  if (!ok){
+    cout << "edge_reparamOnFace:: get_fin_from_edge_and_face error" << endl;
+    return false;
+  }
+
+  // WARNING: the FIN does not always have a curve !!!!
+  // if it has no curve... j'en ai marre, j'appelle face_UVFromXYZ !!!
+  PK_CURVE_t fin_curve;
+  PK_ERROR_t err = PK_FIN_ask_curve(fin,&fin_curve);
+  if (fin_curve == PK_ENTITY_null){
+//    cout << "edge_reparamOnFace:: Debug : THE FIN HAS NO CURVE ! Using face_UVFromXYZ" << endl;
+    double param_to_use = par;
+    // WARNING: NEED TO REVERSE COORDINATE TO CALL PK_FUNCTIONS, NOT TO CALL CALLBACK FUNCTIONS !!! ---> non need here !!!
+    if (dir==-1){// need to reverse
+      param_to_use = s0 + s1 - par;
+    }
+//    cout << "dir=" << dir << "  par=" << par << "  param_to_use=" << param_to_use << endl;
+    vector<double> xyz(3,0.);
+    if(!edge_xyz_from_t(edge, param_to_use, xyz)) return false;
+//    cout << "-> found xyz = " << xyz[0] << "," <<  xyz[1] << "," <<  xyz[2] << endl; 
+    return face_UVFromXYZ(f, xyz, res);
+  }
+
+  // ELSE, working from fin...
+  // need to know if we need to reverse parameters...
+  PK_LOGICAL_t fin_is_positive;
+  PK_FIN_is_positive(fin,&fin_is_positive);
+  double param_to_use = par;
+  if (((dir==-1)&&(fin_is_positive==PK_LOGICAL_true)) || ((dir==1)&&(fin_is_positive==PK_LOGICAL_false))){// need to reverse
+//    cout << "edge_reparamOnFace:: Debug : reversing parameter, fin_is_positive=" << ((fin_is_positive==PK_LOGICAL_true) ? "yes" : "no") << " dir=" << dir << endl;
+    PK_INTERVAL_t inter;
+    PK_FIN_find_interval(fin,&inter);
+    param_to_use = inter.value[0] + inter.value[1] - par;
+  }
+  // in fct PK_FIN_find_surf_parameters, it is said that param is the parameter of the curve !!!, not the fin. 
+  // I guess, it already take into account the fact that the fin might be reversed, we don't have to.
+  // Except for the "dir" int...
+  // UPDATE: guess what ??!!??  NOOOOOOOOOOO !!!! need to reverse if the fin is reversed !!!!!!
+  // TWO FUCKING DAYS TRACKING THIS BUG !!!!
+
+
+  PK_UV_t none;
+  PK_UV_t uv;
+  err = PK_FIN_find_surf_parameters(fin, param_to_use,PK_LOGICAL_false,none,&uv);
+  if (err!=PK_ERROR_no_errors){
+    cout << "error from PK_FIN_find_surf_parameters : " << err << endl;
+    if (err==PK_ERROR_bad_parameter){
+      double s0,s1;
+      bool test = edge_parBounds(edge, s0,s1,sense);
+      cout << "edge bounds :" << s0 << " " << s1;
+      PK_INTERVAL_t inter;
+      PK_ERROR_t err2 = PK_FIN_find_interval(fin,&inter);
+      if (err2!=PK_ERROR_no_errors)
+        cout << "PK_FIN_find_interval error = " << err2 << endl;
+      cout << "   fin bounds = " << inter.value[0] << "  " <<  inter.value[1];
+      cout << "     param = " << par << " param_to_use " << param_to_use << endl;
+      cout << "edge_reparamOnFace::PK_FIN_find_surf_parameters error = " << err << " , given parameter coord is out of range  " << endl;
+
+      //      PK_CURVE_t c;
+      //      PK_FIN_ask_curve(fin,&c);
+      //      cout << "   fin curve = " << c << endl;
+    }
+    else
+      cout << "edge_reparamOnFace::PK_FIN_find_surf_parameters error = " << err << endl;
+    return false;
+  }
+
+
+  // same periodic issue as in face_UVFromXYZ  !!!!!
+  // a surf goes from 0 to 2 pi, a face from pi to 2pi : this returns 0 instead of 2pi !!!
+  check_validity_for_periodic(f,uv);
+
+
+  for (int i=0;i<2;i++)
+    res[i] = uv.param[i];
+  cout << "par=" << par << " param_used = " << param_to_use << endl << "-> found xyz = " << res[0] << "," <<  res[1] << "," <<  res[2] << endl; 
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+bool get_fin_from_edge_and_face(const PK_EDGE_t &edge, const PK_FACE_t &f, PK_FIN_t &res){
+  // An edge between two faces has two fins. Each fin is attached to a face. 
+  // Need to find the fin corresponding to const PK_FACE_t f ...
+
+  PK_FIN_t *fins;
+  int n_fins;
+  PK_ERROR_code_t err = PK_EDGE_ask_fins(edge, &n_fins, &fins);
+  if (err!=PK_ERROR_no_errors){
+    cout << "get_fin_from_edge_and_face::PK_EDGE_ask_fins error = " << err << endl;
+    return false;
+  }
+  if (n_fins<1){
+    cout << "get_fin_from_edge_and_face:: n_fins < 1 !" << err << endl;
+    return false;
+  }
+
+  int ifin=0;
+  bool found_fin=false;
+  for (int i=0;i<n_fins;i++){
+    PK_FACE_t temp;
+    err = PK_FIN_ask_face(fins[i],&temp);
+    if (temp==f){
+      ifin=i;
+      found_fin = true;
+      break;
+    }
+  }// fins[ifin] is now the fin related to the face f
+  res = fins[ifin];
+  if (!found_fin) cout << "get_fin_from_edge_and_face : ******** fin NOT  FOUND !" << endl;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
+// creates given density around given cylinder 
+// cylinder parameters are inclosed in user_data
+bool cylinder_field_callback(double x,double y,double z, void *user_data, double &size){
+  cyl_data *cd = static_cast<cyl_data*>(user_data);
+  const double u_norme = cd->u*cd->u + cd->v*cd->v + cd->w*cd->w;
+  const double vecx = cd->x-x ;
+  const double vecy = cd->y-y ;
+  const double vecz = cd->z-z ;
+  const double distance_points_square = vecx*vecx + vecy*vecy + vecz*vecz;
+  const double distance1 = vecx*cd->u/u_norme + vecy*cd->v/u_norme + vecz*cd->w/u_norme;
+  const double d = sqrt(distance_points_square - distance1*distance1);
+  size = (d<=cd->radius) ? cd->meshsize : 1.e22;
+  return true;
+}
+
+//------------------------------------------------------------------------
+
diff --git a/contrib/Parasolid/interface_parasolid/callbacks.h b/contrib/Parasolid/interface_parasolid/callbacks.h
new file mode 100644
index 0000000..09402bb
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/callbacks.h
@@ -0,0 +1,55 @@
+
+
+#ifndef _CALLBACKS_H
+#define _CALLBACKS_H
+
+#include <vector>
+#include <string>
+#include "parasolid_kernel.h"
+#include "kernel_interface.h"
+
+using namespace std;
+
+
+class constant_meshsize_data{
+  public:
+    static void set_mesh_size(double d){meshsize=d;};
+    static double get_mesh_size(){return meshsize;};
+  private:
+    static double meshsize;
+};
+
+class cyl_data{
+  public:
+    double radius, x,y,z, u,v,w, meshsize;// xyz=one point on the axis, uvw=axis direction
+};
+
+bool edge_xyz_from_t(const PK_EDGE_t edge, double t, vector<double> &res);
+bool vertex_mesh_size(const PK_VERTEX_t vertex, double *size, void *user_data);
+bool vertex_xyz(const PK_VERTEX_t vertex, vector<double> &res);
+bool edge_parBounds(const PK_EDGE_t edge, double &s0,double &s1);
+bool face_periodic_info(const PK_FACE_t face, bool &per_u, bool &per_v, double &period_u, double &period_v);
+bool face_geomType(const PK_FACE_t face, string &s);
+bool edge_geomType(const PK_FACE_t face, string &s);
+bool edge_degenerate(const PK_EDGE_t e, bool &res);
+bool edge_firstder_from_par(const PK_EDGE_t e, double par, vector<double> &res);
+bool edge_curvature_from_par(const PK_EDGE_t e, double par, double &curvature);
+bool edge_closestPointOrthogonal(const PK_EDGE_t e, const vector<double> &coord, double &param, vector<double> &res, bool &is_on_edge);
+bool edge_containsPointFromT(const PK_EDGE_t edge, const double param, bool &res);
+bool edge_is3D(const PK_EDGE_t edge, bool &res);
+bool face_UVFromXYZ(const PK_FACE_t face, const vector<double> &coord, vector<double> &res);
+bool face_closestPointOnFaceOrthogonal(const PK_FACE_t f, const vector<double> &coord, vector<double> &xyzres, vector<double> &uvres);
+bool face_containsPointFromXYZ(const PK_FACE_t face, const vector<double> &xyz, bool &res);
+bool face_containsPointFromUV(const PK_FACE_t face, const vector<double> &uv, bool &res);
+bool face_XYZFromUV(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &xyzres);
+bool face_parBounds(const PK_FACE_t face, const int dir, double &s0, double &s1);
+bool face_curvatures(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &dirmax, vector<double> &dirmin, double &maxcurv, double &mincurv);
+bool face_normal(const PK_FACE_t face, const vector<double> &uvcoord, vector<double> &normale);
+bool face_firstDer(const PK_FACE_t face,const vector<double> &uv,vector<double> &deru,vector<double> &derv);
+bool face_secondDer(const PK_FACE_t face, const vector<double> &uv, vector<double> &deruu,vector<double> &dervv,vector<double> &deruv);
+bool edge_reparamOnFace(const PK_EDGE_t edge, const PK_FACE_t f, const double par, const int dir, vector<double> &res);
+bool get_fin_from_edge_and_face(const PK_EDGE_t &edge, const PK_FACE_t &f, PK_FIN_t &res);
+bool cylinder_field_callback(double x,double y,double z, void *user_data, double &size);
+
+
+#endif
diff --git a/contrib/Parasolid/interface_parasolid/fg.c b/contrib/Parasolid/interface_parasolid/fg.c
new file mode 100644
index 0000000..9e5f575
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/fg.c
@@ -0,0 +1,827 @@
+/* ============================================================================
+
+  Copyright 2009 Siemens Product Lifecycle Management Software Inc.
+  All rights reserved.
+  This software and related documentation are proprietary to
+  Siemens Product Lifecycle Management Software Inc.
+
+  Example Foreign Geometry support routines
+
+  Code last modified : 25 April 1997
+
+  Siemens Product Lifecycle Management Software assumes no responsibility for
+  the use or reliability of this software. It is provided in order to give
+  application writers access to an example of a how to build Foreign
+  Geometry support into a working Frustrum.
+
+  NOTE: a Frustrum will be inherently machine-specific; however for this
+  example much of this type of code has been omitted.
+
+============================================================================ */
+
+/* Imports */
+
+#include <math.h>
+#include <ctype.h>
+
+/*
+    VMS:    CC/INCLUDE=(PARASOLID:)
+    Unix:   cc -I$PARASOLID
+*/
+
+#include "frustrum_ifails.h"
+#include "frustrum_tokens.h"
+
+/* ============================================================================
+   Summary of Codes & Tokens
+
+The following frustrum ifail values & tokens are used in this file:
+
+ FGOPOK      Foreign geometry operation successful
+ FGOPFA      Foreign geometry operation failed
+ FGEVIN      Foreign geometry evaluation incomplete
+ FGPROP      Use default properties for foreign geometry
+ FGGEOM      Foreign geometry not found
+ FGDATA      Foreign geometry data retrieve error
+ FGFILE      Foreign geometry data file error
+ FGIERR      Foreign geometry integer data error
+ FGRERR      Foreign geometry real data error
+
+ FGEVTR      Triangular evaluation matrix required
+ FGEVSQ      Square evaluation matrix required
+ FGPRBD      Geometry parameterisation is bounded
+ FGPRPE      Geometry parameterisation is periodic
+
+============================================================================ */
+
+
+/* Useful #defines */
+
+#define  square(value) ( (value)*(value) )
+#define  pi            ( 3.1415926535897932384626434 )
+#define  two_pi        ( 2.0 * pi )
+#define  four_pi       ( 4.0 * pi )
+#define  TRUE     1
+#define  FALSE    0
+#define  NULL_PTR 0
+
+
+/* Exported functions */
+
+extern void FGCRCU(const char *, int *, int *, int *, int *,
+double *, int *, double *, int *);
+extern void FGCRSU(const char *, int *, int *, int *, int *,
+double *, int *, double *, int *);
+extern void FGEVCU(int *, double *, double *, double *, int *,
+double *, int *);
+extern void FGEVSU(int *, double *, double *, double *, double *
+, int *, int *, int *, double *, int *);
+extern void FGPRCU(int *, double *, double *, double *, int *,
+int *);
+extern void FGPRSU(int *, double *, double *, double *, int *,
+int *);
+
+/* Typedefs */
+
+typedef void (*curve_evaluator)( int [], double [], double [],
+                                   double*, int*, double [], int*);
+typedef void (*surface_evaluator)( int [], double [], double*, double*,
+                                   double*, int*, int*, int*, double [],
+                                   int*);
+
+
+/* ============================================================================
+   UTILITIES for surface evaluation array indices
+
+The following functions are designed to assist (surface evaluator functions
+called by) FGEVSU which returns surface evaluations. They assess if a
+derivative is required based upon the numbers of u & v derivatives requested,
+nu & nv, and the triangular flag tri.
+
+The value TRUE is returned if an evaluation is required, otherwise FALSE
+is returned.
+
+If TRUE is returned then the value of n is also modified to point to the
+correct place in the results array to place the actual evaluations.
+============================================================================ */
+
+
+static int su_P( int* n, int nu, int nv, int tri) /* Index for surface positon P */
+{ *n = 0; return TRUE; }
+
+static int su_dP_du(int* n, int nu, int nv, int tri)   /* Index for surface u derivative dP/du */
+{
+ int do_eval = FALSE;
+ if (nu > 0) { *n = 3; do_eval = TRUE; }
+ return do_eval;
+}
+
+
+static int su_dP2_du2( int* n, int nu, int nv, int tri) /* Index surface 2nd u derivative d2P/du2 */
+{
+ int do_eval;
+ do_eval = FALSE;
+ if (nu > 1) { *n = 6; do_eval = TRUE; }
+ return do_eval;
+}
+
+
+static int su_dP_dv( int* n, int nu, int nv, int tri)  /* Index for surface v derivative dP/dv */
+{
+ int do_eval;
+ do_eval = FALSE;
+ if (nv > 0) {*n = 3 * (nu + 1); do_eval = TRUE; }
+ return do_eval;
+}
+
+
+static int su_dP2_dv2( int* n, int nu, int nv, int tri) /* Index surface 2nd v derivative d2P/dv2 */
+{
+ int triang, do_eval;
+
+ do_eval = FALSE; triang = (tri == FGEVSQ) ? 0 : 1;
+ if (nv > 1) { *n = ( 6*nu + 3*(2-triang) ); do_eval = TRUE; }
+
+ return do_eval;
+}
+
+
+static int su_dP2_dudv( int* n, int nu, int nv, int tri) /* Index for mixed derivative d2P/duduv */
+{
+ int triang, do_eval;
+
+ do_eval = FALSE; triang = (tri == FGEVSQ) ? 0 : 1;
+
+ if ((nu > 0 && nv > 0 && triang == 0) ||(nu > 1 && triang == 1 ))
+    { *n = (3 * (nu + 2)); do_eval = TRUE;}
+
+ return do_eval;
+}
+
+
+
+/* ============================================================================
+   UTILITIES for curve evaluation array indices
+
+The following functions are designed to assist the function FGEVCU which
+returns curve evaluations. They modify the value of n, which is an index into
+the results array, based upon the numbers of t derivatives requested, nt.
+
+The value TRUE is returned if an evaluation is required, otherwise FALSE
+is returned.
+
+If TRUE is returned then the value of n is modified to point to the correct
+place in the results array to begin filling in data.
+============================================================================ */
+
+
+static int cu_P( int* n, int nt)        /* Array index for curve position P */
+{ *n = 0; return TRUE; }
+
+static int cu_dP_dt( int* n, int nt)    /* Array index for curve 1st derivative dP/dt */
+{
+ int do_eval; do_eval = FALSE;
+ if (nt > 0) { *n = 3; do_eval = TRUE; }
+ return do_eval;
+}
+
+
+static int cu_dP2_dt2( int* n, int nt) /* Array index for curve 2nd derivative d2P/dt2 */
+{
+ int do_eval; do_eval = FALSE;
+ if (nt > 1){ *n = 6; do_eval = TRUE; }
+ return do_eval;
+}
+
+
+
+/* ============================================================================
+   UTILITIES for checking parameters of call to FGEVCU, FGEVSU
+
+The following two functions, su_check_params & cu_check_params are called by
+FGEVSU, FGEVCU respectively to check on the status of the evaluations
+requested by Parasolid. The ifail status is modified accordingly.
+
+Return ifail codes:
+    FGOPOK     Operation successful
+    FGOPFA     Operation fails
+    FGEVIN     Evaluation incomplete
+
+============================================================================ */
+
+
+static int su_check_params( int ifail, int nu, int nv, int triang)
+{
+ return
+    (ifail == FGOPOK)
+    ? ( ( (triang != FGEVSQ && (nu > 2 || nv > 2)) ||
+          (triang == FGEVSQ && ((nu + nv) >= 3)
+      ) )
+        ? FGEVIN
+        : FGOPOK
+      )
+    : FGOPFA;
+}
+
+
+static int cu_check_params( int ifail, int nt)
+{
+ return( (ifail == FGOPOK)
+         ? ((nt > 2)
+             ? FGEVIN
+             : FGOPOK )
+         : FGOPFA );
+}
+
+
+
+/* ============================================================================
+   UTILITY for key handling
+
+This function compares the first n characters of s1 and s2
+and returns TRUE if they are all equal. The function is not sensitive to the
+case of the characters in s1, s2
+============================================================================ */
+
+
+static int keycmpu( char* s1, const char* s2, int n)
+{
+ int i, result;
+ result = TRUE;
+ i = n;
+ while (i-- > 0 && result)
+  {
+  char c1 = s1[i], c2 = s2[i];
+  /* Note: some versions of toupper always add 64 regardless */
+  if (islower( c1 )) c1 = toupper( c1 );
+  if (islower( c2 )) c2 = toupper( c2 );
+  if (c1 != c2)
+   result = FALSE;
+  }
+ return result;
+}
+
+
+
+/* ============================================================================
+   EXAMPLE CURVE EVALUATORS
+
+The following section contains example curve evaluators.
+============================================================================ */
+
+
+static void sine( int ki_ints[], double ki_reals[], double pe_data[],
+                  double* t, int* nderivs, double results[], int* ifail)
+/* description: Example evaluator sine
+
+This is the curve  t -> ( t, A * sin(2 * pi * t), 0 )
+*/
+{
+ int n;                        /*   Array index        */
+ double A = ki_reals[0];       /*   Amplitude of curve */
+
+ /*   compute P(t) and derivs as requested  */
+
+ if (cu_P( &n, *nderivs ))
+  {
+   /*   compute position  */
+   results[n++] = *t;
+   results[n++] = A * sin(two_pi * (*t));
+   results[n]   = 0.0;
+  }
+
+ if (cu_dP_dt( &n, *nderivs ))
+  {
+   /*   compute 1st derivs  */
+   results[n++] = 1.0;
+   results[n++] = A * two_pi * cos(two_pi * (*t));
+   results[n]   = 0.0;
+  }
+
+ if (cu_dP2_dt2( &n, *nderivs ))
+  {
+   /*   compute 2nd derivs  */
+   results[n++] = 0.0;
+   results[n++] = - A * square(two_pi) * sin(two_pi * (*t));
+   results[n]   = 0.0;
+  }
+
+ *ifail = cu_check_params( *ifail, *nderivs );
+ return;
+}
+
+
+static void helix( int ki_ints[], double ki_reals[], double pe_data[],
+                   double* t, int* nderivs, double results[], int* ifail)
+/* description: Example evaluator helix
+
+This is the curve t ->( cos(4*pi*t), sin(4*pi*t), t )
+*/
+{
+ int n; /*   Array index */
+
+ if (cu_P( &n, *nderivs ))
+  {
+   /*   compute p(t)  */
+   results[n++] = (cos( *t * four_pi ));
+   results[n++] = (sin( *t * four_pi ));
+   results[n]   = *t;
+  }
+ if (cu_dP_dt( &n, *nderivs ))
+  {
+   /*   compute : 1st derivs  */
+   results[n++] = - four_pi * sin( *t * four_pi );
+   results[n++] =   four_pi * cos( *t * four_pi );
+   results[n]   = 1.0;
+  }
+
+ if (cu_dP2_dt2( &n, *nderivs ))
+  {
+   /*   compute : 2nd derivs  */
+   results[n++] = - square( four_pi ) * cos( *t * four_pi );
+   results[n++] = - square( four_pi ) * sin( *t * four_pi );
+   results[n]   = 0.0;
+  }
+
+ *ifail = cu_check_params( *ifail, *nderivs );
+ return;
+}
+
+
+
+/* ============================================================================
+   EXAMPLE SURFACE EVALUATORS
+
+The following section contains examples of surface evaluators. They are called
+directly by FGEVSU and return position and derivatives as requested.
+============================================================================ */
+
+
+static void corrugated( int ki_ints[], double ki_reals[], double* pe_data,
+                        double* u, double* v, int* nu, int* nv, int* triang,
+                        double results[], int* ifail)
+/* description: Example corrugated evaluator
+
+This is the function (u, v) -> (u, v, A * sin( 2.0 * pi * u))
+The amplitude A is stored in ki_reals[0]
+*/
+{
+ int    n; /*   Position in results array */
+ double A; /*   Amplitude of wave */
+
+ n = 0;
+ A = ki_reals[0];  /* Initialise amplitude */
+
+ if (su_P( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : P  */
+   results[n++] = *u;
+   results[n++] = *v;
+   results[n]   =  A * sin(*u * two_pi);
+  }
+
+ if (su_dP_du( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pu  */
+   results[n++] = 1.0;
+   results[n++] = 0.0;
+   results[n]   = two_pi * A * cos(*u * two_pi);
+  }
+
+ if (su_dP2_du2( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Puu  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n]   = - square(two_pi) * sin(*u * two_pi);
+  }
+
+ if (su_dP_dv( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pv  */
+   results[n++] = 0.0;
+   results[n++] = 1.0;
+   results[n]   = 0.0;
+  }
+
+ if (su_dP2_dv2( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pvv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n]   = 0.0;
+  }
+
+ if (su_dP2_dudv( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Puv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n] = 0.0;
+  }
+ *ifail = su_check_params(*ifail, *nu, *nv, *triang);
+
+ return;
+}
+
+
+static void incline( int ki_ints[], double ki_reals[], double* pe_data,
+                     double* u, double* v, int* nu, int* nv, int* triang,
+                     double results[], int* ifail)
+/* description: Example planar evaluator
+
+This is the evaluator (u, v) -> (u, v, u)
+*/
+{
+ int    n; /*   Position in results array */
+
+ n = 0;
+
+ if (su_P( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : P  */
+   results[n++] = *u;
+   results[n++] = *v;
+   results[n]   = *u;
+  }
+
+ if (su_dP_du( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pu  */
+   results[n++] = 1.0;
+   results[n++] = 0.0;
+   results[n]   = 1.0;
+  }
+
+ if (su_dP2_du2( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Puu  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n]   = 0.0;
+  }
+
+ if (su_dP_dv( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pv  */
+   results[n++] = 0.0;
+   results[n++] = 1.0;
+   results[n]   = 0.0;
+  }
+
+ if (su_dP2_dv2( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Pvv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n]   = 0.0;
+  }
+
+ if (su_dP2_dudv( &n, *nu, *nv, *triang ))
+  {
+   /*   compute : Puv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n] = 0.0;
+  }
+ *ifail = su_check_params(*ifail, *nu, *nv, *triang);
+
+ return;
+}
+
+
+static void franke( int* ki_ints, double* ki_reals, double* pe_data, double* u,
+                    double* v, int* nu, int* nv, int* triang, double results[],
+                    int* ifail)
+/* description: Example evaluator franke
+
+This is a complex analytical surface defined using the exponential function.
+
+*/
+{
+ int n;         /*   Position in results array                */
+ double e[4];   /*   Useful variables for future calculations */
+ n = 0;
+
+
+ e[0] = exp( -( square(9.0*(*u) - 2.0)      + square(9.0*(*v) - 2.0))/4.0);
+ e[1] = exp( -( square(9.0*(*u) + 1.0)/49.0 + (9.0*(*v) + 1.0)/10.0)     );
+ e[2] = exp( -( square(9.0*(*u) - 7.0)      + square(9.0*(*v) - 3.0))/4.0);
+ e[3] = exp( -( square(9.0*(*u) - 4.0)      + square(9.0*(*v) - 7.0))    );
+
+ if (su_P( &n, *nu, *nv, *triang ))
+  {
+   /*  compute P  */
+   results[n++] = *u;
+   results[n++] = *v;
+   results[n] = 0.75 * e[0] + 0.75 * e[1] + 0.5 * e[2] - 0.2 * e[3];
+  }
+ if (su_dP_du( &n, *nu, *nv, *triang ))
+  {
+   /*  compute Pu  */
+   results[n++] = 1.0;
+   results[n++] = 0.0;
+   results[n] =  -3.37500 * (9.0 * (*u) - 2.0) * e[0]
+                - 0.27551 * (9.0 * (*u) + 1.0) * e[1]
+                - 2.25000 * (9.0 * (*u) - 7.0) * e[2]
+                + 3.60000 * (9.0 * (*u) - 4.0) * e[3];
+  }
+
+ if (su_dP2_du2( &n, *nu, *nv, *triang ))
+  {
+   /*  compute Puu  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n] =  -30.375    * e[0]
+                + 15.1875   * square(9.0 * (*u) - 2.0) * e[0]
+                - 2.47959   * e[1]
+                +  0.101208 * square(9.0 * (*u) + 1.0) * e[1]
+                - 20.25     * e[2]
+                + 10.125    * square(9.0 * (*u) - 7.0) * e[2]
+                + 32.4      * e[3]
+                - 64.8      * square(9.0 * (*u) - 4.0) * e[3];
+  }
+
+ if (su_dP_dv( &n, *nu, *nv, *triang ))
+  {
+   /*  compute Pv  */
+   results[n++] = 0.0;
+   results[n++] = 1.0;
+   results[n] =  -3.375 * (9.0 * (*v) - 2.0) * e[0]
+                - 0.675 * e[1]
+                - 2.250 * (9.0 * (*v) - 3.0) * e[2]
+                + 3.600 * (9.0 * (*v) - 7.0) * e[3];
+  }
+
+ if (su_dP2_dv2( &n, *nu, *nv, *triang ))
+  {
+   /*   compute Pvv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n] =  -30.75   * e[0]
+                + 15.1875 * square(9.0 * (*v) - 2.0) * e[0]
+                + 0.6075  * e[1]
+                - 20.25   * e[2]
+                + 10.125  * square(9.0 * (*v) - 3.0) * e[2]
+                + 32.4    * e[3]
+                - 64.8    * square(9.0 * (*v) - 7.0) * e[3];
+  }
+ if (su_dP2_dudv( &n, *nu, *nv, *triang ))
+  {
+   /*   compute Puv  */
+   results[n++] = 0.0;
+   results[n++] = 0.0;
+   results[n] =   15.87500 * (9.0 * (*u) - 2.0) * (9.0 * (*v) - 2.0) * e[0]
+                +  0.24796 * (9.0 * (*u) + 1.0) * e[1]
+                + 10.125   * (9.0 * (*u) - 7.0) * (9.0 * (*v) - 3.0) * e[2]
+                - 64.8     * (9.0 * (*u) - 4.0) * (9.0 * (*v) - 7.0) * e[3];
+  }
+
+ *ifail = su_check_params( *ifail, *nu, *nv, *triang );
+ return;
+}
+
+
+
+/* ============================================================================
+   EXPORTED FUNCTIONS
+
+This final section contains exported functions. These are:
+
+   FGCRCU, FGCRSU for creating foreign geometry curves and surfaces,
+   FGEVCU, FGEVSU for creating foreign geometry curves and surfaces,
+   FGPRCU, FGPRSU for properties of foreign geometry curves and surfaces.
+
+============================================================================ */
+
+
+void FGCRCU(const char* key, int* keylen, int* n_kii, int* ki_ints, int* n_kir,
+            double* ki_reals, int* n_data, double* fg_data, int* ifail )
+/* description: FGCRCU
+
+This function is called when an FG curve is created by the KI function CRFGCU.
+The function initialises any data required by the evaluator. A successful call
+to this function indicates to Parasolid that evaluations of this curve may be
+requested.
+
+ifail return values:
+
+   FGOPOK       Operation successful
+   FGOPFA       Operation failed
+   FGGEOM       Evaluator not available
+   FGDATA       Evaluator data not found
+   FGIERR       Error in supplied integer data
+   FGRERR       Error in supplied real data
+   FGFILE       Evaluator data allocation fault
+
+*/
+{
+ const char *key_ptr;                       /* define locals & initialise */
+ key_ptr = key;
+ *(int *) fg_data = NULL_PTR;
+
+ *ifail = FGOPOK;
+
+ /*  select curve evaluator  */
+
+ if (keycmpu( "SDL/sine", key, *keylen ))
+   {
+   if( *n_kir == 2               /* sine evaluator requires two reals    */
+       && ki_reals[1] > 0.0 )    /* of which second needs to be positive */
+      *(curve_evaluator *) fg_data = sine;
+   else *ifail = FGRERR;
+   }
+ else
+ if (keycmpu( "SDL/helix", key, *keylen ))
+   *(curve_evaluator *) fg_data = helix;
+ else
+  *ifail = FGGEOM;
+
+ if (*ifail == FGOPOK && (*(int *) fg_data) == NULL_PTR )
+     *ifail = FGOPFA;
+
+ return;
+}
+
+
+void FGCRSU( const char* key, int* keylen, int* n_kii, int* ki_ints, int* n_kir,
+             double* ki_reals, int* n_data, double* fg_data, int* ifail )
+/* description: FGCRSU
+
+This function is called when an FG surface is created by the KI function
+CRFGSU. The function initialises any data required by the evaluator. A
+successful call to this function indicates to Parasolid that evaluations of
+this surface may be requested.
+
+ifail return values:
+
+   FGOPOK       Operation successful
+   FGOPFA       Operation failed
+   FGGEOM       Evaluator not available
+   FGDATA       Evaluator data not found
+   FGIERR       Error in supplied integer data
+   FGRERR       Error in supplied real data
+   FGFILE       Evaluator data allocation fault
+
+*/
+{
+ const char *key_ptr;
+ key_ptr = key;
+ *(int *) fg_data = NULL_PTR;
+
+ *ifail = FGOPOK;
+
+ if (keycmpu( "SDL/franke", key, *keylen ))       /* select evaluator  */
+  *(surface_evaluator *) fg_data = franke;
+ else if (keycmpu( "SDL/incline", key, *keylen ))
+  *(surface_evaluator *) fg_data = incline;
+ else if (keycmpu( "SDL/corrugated", key, *keylen ))
+   {
+   if ((*n_kir == 3) &&            /* corrugated evaluator requires 3 reals */
+       (ki_reals[1] > 0.0) &&      /* of which last two are positive        */
+       (ki_reals[2] > 0.0))
+
+          *(surface_evaluator *) fg_data = corrugated;
+
+   else *ifail = FGRERR;
+   }
+ else
+  *ifail = FGGEOM;
+
+ if (*ifail == FGOPOK && (*(int *)fg_data == NULL_PTR))
+     *ifail = FGOPFA;
+
+ return;
+}
+
+
+void FGEVCU( int* ki_ints, double* ki_reals, double* fg_data, double* t,
+             int* nderiv, double* results, int* ifail)
+/* description: FGEVCU
+
+This function evaluates a foreign geometry curve. In this example
+implementation this is done by calling the function whose address is stored
+in the first element of the fg_data array.
+
+This function is called when an evaluation of an FG curve is required by
+Parasolid. The function should be capable of supplying position and up to
+second derivatives for an FG curve which has previously been initialised by a
+call to FGCRCU.
+
+Specific ifail return values:
+  FGEVIN                    Evaluation incomplete
+  FGOPFA                    Evaluation failed
+  FGOPOK                    Operation successful
+
+*/
+{
+ curve_evaluator eval;
+ eval = *(curve_evaluator *) fg_data; /*   compute : call evaluator  */
+ *ifail = FGOPOK;
+ (*eval)( ki_ints, ki_reals, fg_data, t, nderiv, results, ifail );
+ return;
+}
+
+
+void FGEVSU( int* ki_ints, double* ki_reals, double* fg_data, double* u,
+             double* v, int* nu, int* nv, int* triang, double* results,
+             int* ifail)
+/* description: FGEVSU
+
+This function is called when an evaluation of an FG surface is required by
+Parasolid. The function should be capable of supplying position and up to
+second derivatives for an FG surface which has previously been initialised by
+a call to FGCRSU.
+
+Specific ifail returns:
+  FGOPOK                    Operation successful
+  FGEVIN                    Evaluation incomplete
+  FGOPFA                    Evaluation failed
+
+*/
+
+{
+ surface_evaluator eval;
+
+
+ eval = *(surface_evaluator *) fg_data;     /* initialise evaluator function */
+ *ifail = FGOPOK;                           /* initialise ifail */
+ (*eval)( ki_ints, ki_reals, fg_data, u, v, /* & call evaluator */
+          nu, nv, triang, results, ifail );
+
+ return;
+}
+
+
+void FGPRCU( int* ki_ints, double* ki_reals, double* fg_data, double* range,
+             int* period, int* ifail)
+/* description: FGPRCU
+
+This function is called, after FGCRCU has initialised the curve, to indicate
+to Parasolid some of the parametric properties of the curve. The function can
+specify the parameter range of the curve and indicate whether it is to be
+treated as periodic.
+
+Note that at Parasolid Version 4.0 release foreign curves may not be closed or
+periodic: the periodic argument is included for upwards compatability with
+future planned enhancements.
+
+ifail return values:
+    FGPROP     Use default properties: i.e. t range = [0, 1]
+               Periodicity flag set to FGPRBD (parameterisation bounded)
+    FGOPOK     Operation successful
+    FGOPFA     Operation failed
+
+*/
+{
+ curve_evaluator eval;
+ eval = *(curve_evaluator *) fg_data;
+ *ifail = FGPROP;      /* Use default properties */
+
+ if( eval == sine )    /* unless using sine evaluator */
+    {
+    range[0] = 0.0;
+    range[1] = ki_reals[1];
+    *period = FGPRBD;
+    *ifail = FGOPOK;
+    }
+
+ return;
+}
+
+
+void FGPRSU( int* ki_ints, double* ki_reals, double* fg_data, double* range,
+             int* period, int* ifail)
+/* description: FGPRSU
+
+This function is called after FGCRSU has initialised the surface and allows
+modification of the surface parametric properties. Note that at Parasolid
+Version 4.0 the periodicity flags must assume default value FGPRBD since
+foreign surfaces may be neither closed nor periodically parameterised at that
+version.
+
+ifail return values:
+    FGPROP     Use default properties: ie u range = v range = [0, 1]
+               Both periodicity flags set to FGPRBD (parameterisation bounded)
+    FGOPOK     Operation successful
+    FGOPFA     Operation failed
+
+*/
+{
+ surface_evaluator eval;
+ eval = *(surface_evaluator *)fg_data;
+ *ifail = FGPROP;                     /* Use default properties */
+
+ if (eval == corrugated)              /* unless using corrugated evaluator */
+  {
+   range[0] = 0.0;                    /* which has parameter range details */
+   range[1] = ki_reals[1];            /* passed in ki_reals array */
+   range[2] = 0.0;
+   range[3] = ki_reals[2];
+   period[0]   = FGPRBD;
+   period[1]   = FGPRBD;
+   *ifail      = FGOPOK;
+  }
+ return;
+}
+
diff --git a/contrib/Parasolid/interface_parasolid/frustrum.c b/contrib/Parasolid/interface_parasolid/frustrum.c
new file mode 100644
index 0000000..a706769
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/frustrum.c
@@ -0,0 +1,2720 @@
+/*=============================================================================
+
+  Copyright 2009 Siemens Product Lifecycle Management Software Inc.
+  All rights reserved.
+  This software and related documentation are proprietary to
+  Siemens Product Lifecycle Management Software Inc.
+
+  Code last modified : 12 October  1994 (integrated Vax/Unix example frustrum)
+  9 June     1995 (add NT code for filesystem detection)
+  7 April    1997 (change function prototypes)
+  10 April    1997 (add code for Partition xmt/rcv )
+  11 April    1997 (first attempt to support the Mac)
+  12 August   1999 (allow spaces in P_SCHEMA)
+  25 October  2001 (Use %p for printing a FILE*)
+  20 November 2001 (Add support for debug report
+  functionality)
+  12 March    2004 Remove old Macintosh support.
+  22 October  2009 no plat-specific newline in g_preamble
+
+  Siemens Product Lifecycle Management Software assumes no responsibility for
+  the use or reliability of this software; the example frustrum is provided in
+  order to run the Parasolid Acceptance Tests and to give application writers
+  access to a simple example of a working Frustrum which will run on all
+  Parasolid platforms.
+
+  The example code has been written to contain a minimal amount of machine
+  specific code. Where necessary, such code is delimited by  #if <macro>  #endif
+  statements, where the macro name is one recognised by the appropriate compiler:
+
+#ifdef VMS
+#endif
+
+#ifdef _WIN32           [this is used to enclose Windows NT specific code]
+#endif                  [and is recognised by the Visual C / C++ compiler]
+
+or the name is defined explicitly on the command line when the file is compiled:
+
+i.e. the rs6000 (AIX) version of frustrum_link.com compiles the example as
+cc -c -w  $PARASOLID/frustrum.c   -DPS_AIX  -I$PARASOLID    ... etc ...
+
+The example code includes comments (marked with the words "machine specific")
+which suggest where the application writer may wish to alter the example code
+to extend the functionality or to improve performance.
+
+Notes:
+
+As an example, this example frustrum writes the value "unknown" into
+the date and username fields of the file header (a fully functional
+version would write correct keyword/value pairs to the file headers)
+
+Platforms where size_t is larger than int (for example, WIN64) will
+produce a number of compile warnings for truncations of size_t to
+int. This isn't a problem for this simple frustrum.
+
+=============================================================================*/
+
+/*=============================================================================
+#INCLUDES
+=============================================================================*/
+
+#include "frustrum_ifails.h"
+#include "frustrum_tokens.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+
+
+// PEB MODIF
+#include "frustrum_interface.h"
+#include <iostream>
+#include <string>
+using namespace std;
+// END PEB MODIF
+
+#ifdef PS_AIX
+#include <signal.h>
+#include <sys/param.h>
+#endif
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+/*=============================================================================
+#DEFINES
+=============================================================================*/
+
+
+/* determines whether information messages are printed */
+
+#define trace_flag 0
+
+#define PS_LONG_NAME  0
+#define PS_SHORT_NAME 1
+
+/* extra useful ifails */
+
+#define  FR_not_started       FR_unspecified
+#define  FR_internal_error    FR_unspecified
+
+
+/* other useful definitions */
+
+#define null_strid          (-1)
+#define max_namelen         255         /* maximum length of a full pathname */
+#define max_header_line (max_namelen+32) /* for long FILE=name in the header */
+#define max_open_files      32
+
+#define read_access         1
+#define write_access        2
+#define read_write_access   3
+
+#define end_of_string_c     '\0'
+#define end_of_string_s     "\0"
+
+#define new_line_c          '\n'
+#define new_line_s          "\n"
+
+#define semi_colon_c        ';'
+#define semi_colon_s        ";"
+
+#ifdef _WIN32
+#define dir_separator_c     '\\'
+#define dir_separator_s     "\\"
+#else
+#define dir_separator_c     '/'
+#define dir_separator_s     "/"
+#endif
+
+/*=============================================================================
+  MACROS
+  =============================================================================*/
+
+#define trace_print \
+  if (!trace_flag) /* skip */; else printf
+
+
+/*=============================================================================
+  STRUCTS
+  =============================================================================*/
+
+
+/* one structure per open file containing info such as filename and
+   the C stream id. the structures are chained together, accessed via
+   the "open_files" variable
+ */
+
+typedef struct file_s *file_p;
+
+typedef struct file_s
+{
+  file_p next;
+  file_p prev;
+  int    strid;
+  int    guise;
+  int    format;
+  int    access;
+  char   name[max_namelen+1];
+  char   key[max_namelen+1];
+  FILE  *stream;
+} file_t;
+
+static file_p open_files = NULL;
+
+/* file stream identifiers and count of open files */
+static int stream_id[max_open_files];
+static int file_count = 0;
+
+/* frustrum start count (0 not started) */
+static int frustrum_started = 0;
+
+// PEB MODIF
+static frustrumInterface *finter=NULL;
+
+extern void set_frustrum_interface_ptr(frustrumInterface *ptr){
+  finter=ptr;
+}
+// END PEB MODIF
+
+
+
+/*=============================================================================
+  GLOBAL VARIABLES
+  =============================================================================*/
+
+/* the following are for writing and checking file headers */
+
+static char g_preamble_1[ max_header_line ] = end_of_string_s;
+static char g_preamble_2[ max_header_line ] = end_of_string_s;
+static char g_prefix_1[ max_header_line ] = "**PART1;\n";
+static char g_prefix_2[ max_header_line ] = "**PART2;\n";
+static char g_prefix_3[ max_header_line ] = "**PART3;\n";
+static char g_trailer_start[ max_header_line ] = "**END_OF_HEADER";
+static char g_trailer[ max_header_line ] = end_of_string_s;
+static char g_unknown_value[] = "unknown";
+
+/* machine specific: fopen file open modes. On NT platforms use binary */
+/* mode to suppress the writing of carriage returns before line feeds  */
+
+#ifdef _WIN32
+static char g_fopen_mode_read_text[]   = "r";
+static char g_fopen_mode_read_binary[] = "rb";
+static char g_fopen_mode_write[]       = "wb";
+static char g_fopen_mode_append[]      = "wb+";
+#else
+static char g_fopen_mode_read[]        = "r";
+static char g_fopen_mode_write[]       = "w";
+static char g_fopen_mode_append[]      = "w+";
+#endif
+
+/* this buffer used for input-output of file headers and text files */
+static char *input_output_buffer = NULL;
+static int   input_output_buflen = 0;
+
+#ifdef PS_AIX
+/* machine specific: the following variable is used on the AIX (RS6000) */
+static int short_of_memory = 0;         /* set the global flag as false */
+#endif
+
+
+/*=============================================================================
+  UTILITY FUNCTIONS
+  =============================================================================*/
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: lowercase
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Convert the string to lower case.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char *lowercase( char* str )
+{
+  char ch, *ptr = str;
+  while ((ch = *ptr) != end_of_string_c)
+  {
+    if (isupper( ch )) *ptr = tolower( ch );
+    ++ptr;
+  }
+  return str;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: format_string
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Returns a pointer to a lowercase string which declares the file format
+(binary or text). This is for writing into file headers.
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char* format_string( int format )
+{
+  static char ffbnry[] = "binary";
+  static char fftext[] = "text";
+  switch( format )
+  {
+    case FFBNRY:
+      return ffbnry;
+    case FFTEXT:
+      return fftext;
+  }
+  return g_unknown_value;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: guise_string
+
+History:
+
+May 1990      - reformatted for example frustrum code
+November 2001 - add support for new fileguise (FFCDBG)
+
+Description:
+
+Returns a pointer to a lowercase string which declares the file guise
+(that is rollback, snapshot, journal, transmit, schema, licence).
+Romulus files do not have headers; guise FFCXMO is  not valid.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char* guise_string( int guise )
+{
+  static char ffcrol[] = "rollback";
+  static char ffcsnp[] = "snapshot";
+  static char ffcjnl[] = "journal";
+  static char ffcxmt[] = "transmit";
+  static char ffcxmo[] = "old_transmit";
+  static char ffcsch[] = "schema";
+  static char ffclnc[] = "licence";
+  static char ffcxmp[] = "transmit_partition";
+  static char ffcxmd[] = "transmit_deltas";
+  static char ffcdbg[] = "debug_report";
+
+  switch ( guise )
+  {
+    case FFCROL: return ffcrol;
+    case FFCSNP: return ffcsnp;
+    case FFCJNL: return ffcjnl;
+    case FFCXMT: return ffcxmt;
+    case FFCSCH: return ffcsch;
+    case FFCLNC: return ffclnc;
+    case FFCXMP: return ffcxmp;
+    case FFCXMD: return ffcxmd;
+    case FFCDBG: return ffcdbg;
+  }
+  return g_unknown_value;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: nt_short_filesystem
+
+History:
+
+June  1995 - written
+
+Description:
+
+machine specific (NT) function to check whether the device implied
+by the root portion of a path  E:\users\me\xx  or \\mc123\share\yy
+or the "currently selected device" implies a short name filesystem.
+
+( i.e. should the frustrum use 3 or 7 character file extensions )
+
+In this implementation, we assume that a FAT (FileAllocationTable)
+filesystem will only support short 8.3 type names. This assumption
+is true for Win32S applications (IX86 only) and pre NT version 3.5
+and where the NT registry option  "Win32FileSystem"
+HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
+has been set explicitly to 1.
+
+The 'short_filesystem' feature is only relevant if your application
+is ported to IX86 and is required to run under Windows 3.1 / Win32S
+otherwise your application can just use 7 character file extensions
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+#ifdef _WIN32
+static int nt_filesystem_type(char* pathname)
+  /* this can be a fully specified file or directory name */
+  /*    (only the first part of the pathname is examined) */
+  /* or it can be blank or null implying "current device" */
+{
+  int default_return;
+  int res;
+  char *root_of_filesystem;
+  char root_of_file_system_name[256] = "";
+  char filesystemtype[256] = "";
+  DWORD maxnamelength;
+  DWORD filesystemtypelen;
+#ifdef _M_IX86
+  /* running on an I386 machine where FAT filesystems are more common */
+  default_return = PS_SHORT_NAME;
+#else
+  /* running on AlphaNT/MipsNT where NTFS filesystems are more common */
+  default_return = PS_LONG_NAME;
+#endif
+  res = default_return;
+  root_of_filesystem = 0L;
+  maxnamelength = (DWORD) -1;
+  filesystemtypelen = (DWORD) 256;
+  if (pathname != 0L && strlen( pathname ) > 0)
+  {
+    /* examine first few characters in pathname  */
+    strcpy( root_of_file_system_name, pathname );
+    if ( root_of_file_system_name[0] == dir_separator_c &&
+        root_of_file_system_name[1] == dir_separator_c )
+    {
+      /* look for a UNC name of the form \\<node>\<share>\...         */
+      /* constructed filesystem name must must include the trailing   */
+      /* backslash after sharename see KnowledgeBase PSS ID Q119219   */
+      int i;
+      int len;
+      int share_found = 0;
+      len = (int) (strlen( root_of_file_system_name ));
+      for ( i = 2 ; i < len && root_of_filesystem == 0L; i++ )
+      {
+        if ( root_of_file_system_name[i] == dir_separator_c )
+        {
+          if ( share_found )
+            /* second single backslash marks end of share name  */
+          {
+            root_of_file_system_name[i + 1] = '\0';
+            root_of_filesystem = root_of_file_system_name;
+          }
+          else
+            share_found = 1;
+        }
+      }
+    }
+    else
+      /* look for a name of form Z:\... or Z:...                      */
+    {
+      if (root_of_file_system_name[1] == ':')
+      {
+        /* assume root_of_file_system_name[0] contains drive letter */
+        /* (trailing slash makes this a 'root' directory specifier) */
+        root_of_file_system_name[2] = dir_separator_c;
+        root_of_file_system_name[3] = '\0';
+        root_of_filesystem = root_of_file_system_name;
+      }
+    }
+  }
+
+  if (GetVolumeInformation(root_of_filesystem,/* receive: system name     */
+        0L,                /* return : volume name     */
+        (DWORD) 0,         /*                          */
+        0L,                /* return : no serial num   */
+        &maxnamelength,    /* return : name length     */
+        0L,                /* return : no system flags */
+        filesystemtype,    /* return : file system     */
+        filesystemtypelen) == 1 )
+    /* GetVolumeInformation function is implemented in WIN32 and Win32S */
+    /* so this function is always available. If the pathname is null or */
+    /* it doesn't include any device information, GetVolumeInformation  */
+    /* returns whether or not the current device is a FAT file system.  */
+    /* (GetVolumeInformation returns zero if the device does not exist) */
+  {
+    if (strcmp( filesystemtype, "FAT" ) == 0)
+      res = PS_SHORT_NAME;
+    else if (maxnamelength <= 0)
+      /* not sure (return default value)  */
+      res = default_return;
+    else
+    {
+      /* use maxnamelength to decide  (12 chars in name "abcdefgh.ijk") */
+      if ( maxnamelength <= 12 )
+        res = PS_SHORT_NAME;
+      else
+        res = PS_LONG_NAME;
+    }
+  }
+  return res;
+}
+#endif
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: filetype_guise_string
+
+History:
+
+April 1995    - written
+June  1995    - added nt
+November 2001 - added support for FFCDBG guise
+
+Description:
+
+Returns a pointer to a filetype string for the specified guise.
+Used in the construction of filenames in FFOPRD, FFOPWR etc.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char* filetype_guise_string( int guise, int filesystem  )
+  /* filesystem should be set to PS_LONG_NAME  (most platforms) */
+  /* or                          PS_SHORT_NAME  ( _WIN32 only ) */
+{
+  /* machine specific: parts of file types for various guises */
+
+  /* the following are only applicable to NT */
+  static char nt_short_ffcsnp[] = ".N";
+  static char nt_short_ffcjnl[] = ".J";
+  static char nt_short_ffcxmt[] = ".X";
+  static char nt_short_ffcsch[] = ".S";
+  static char nt_short_ffclnc[] = ".L";
+  static char nt_short_ffcxmo[] = ".XMT";
+  static char nt_short_ffcxmp[] = ".P";
+  static char nt_short_ffcxmd[] = ".D";
+  static char nt_short_ffcdbg[] = ".XML";
+
+  static char ffcsnp[] = ".snp";
+  static char ffcjnl[] = ".jnl";
+  static char ffcxmt[] = ".xmt";
+  static char ffcsch[] = ".sch";
+  static char ffclnc[] = ".lnc";
+  static char ffcxmo[] = ".xmt";
+  static char ffcxmp[] = ".xmp";
+  static char ffcxmd[] = ".xmd";
+  static char ffcdbg[] = ".xml";
+
+  switch( guise )
+  {
+    case FFCSNP:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcsnp;
+      return ffcsnp;
+    case FFCJNL:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcjnl;
+      return ffcjnl;
+    case FFCXMT:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcxmt;
+      return ffcxmt;
+    case FFCSCH:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcsch;
+      return ffcsch;
+    case FFCLNC:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffclnc;
+      return ffclnc;
+    case FFCXMO:
+      return ffcxmo;
+    case FFCXMP:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcxmp;
+      return ffcxmp;
+    case FFCXMD:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcxmd;
+      return ffcxmd;
+    case FFCDBG:
+      if ( filesystem == PS_SHORT_NAME ) return nt_short_ffcdbg;
+      return ffcdbg;
+  }
+
+  return end_of_string_s;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: filetype_format_string
+
+History:
+
+April 1995 - written
+June  1995 - added nt
+
+Description:
+
+Returns a pointer to a file format (text or binary) filetype string
+for the specified format.
+Used in the construction of filenames in FFOPRD, FFOPWR etc.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char* filetype_format_string( int format, int filesystem )
+  /* filesystem set to PS_LONG_NAME  (most platforms) */
+  /* or                PS_SHORT_NAME  ( _WIN32 only ) */
+{
+  /* machine specific: parts of file types for various formats */
+
+  /* the following are only applicable to NT */
+  static char nt_short_ffbnry[] = "_B";
+  static char nt_short_fftext[] = "_T";
+
+  static char ffbnry[] = "_bin";
+  static char fftext[] = "_txt";
+
+  switch ( format )
+  {
+    case FFBNRY:
+      if ( filesystem == PS_SHORT_NAME )return nt_short_ffbnry;
+      return ffbnry;
+    case FFTEXT:
+      if ( filesystem == PS_SHORT_NAME )return nt_short_fftext;
+      return fftext;
+  }
+
+  return end_of_string_s;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: filekey_string
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - safer string copy
+
+Description:
+
+Returns a pointer to a string which is a copy of the filename
+which was passed to FFOPRD/FFOPWR (before having any directory
+prefix or file extension added to it). This consists of appending
+a null character to the string.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static char* filekey_string( char* keynam, int keylen )
+{
+  static char keyword_value[max_namelen+1] = "";
+
+  strncpy(keyword_value, keynam, keylen);
+  keyword_value[keylen] = end_of_string_c;
+
+  return keyword_value;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: delete_file
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - use remove() function on all platforms
+
+Description:
+
+Deletes the named file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void delete_file( char* name, int* ifail )
+{
+  trace_print(">>> delete_file : \"%s\"\n", name );
+
+  if(remove( name ) != 0)
+  {
+    *ifail = FR_close_fail;
+    trace_print(">>> returning from 'delete_file' with ifail %d\n",
+        *ifail );
+  }
+  else
+    *ifail = FR_no_errors;
+}
+
+#ifdef PS_AIX
+
+/* machine specific: the following function is used on the AIX (RS6000) */
+/* >> we recommend you include a similar check in your AIX frustrum. << */
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: danger_catcher
+
+History:
+
+May 1992 - added for m/c aix
+
+Description:
+
+Called by the operating system when the condition SIGDANGER occurs
+(implying that a system crash is imminent and which is interpreted
+as meaning that the system is about to run out of virtual memory).
+Resets itself & sets a flag so that FMALLO knows of this condition.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void danger_catcher( int sig )
+{
+  signal(SIGDANGER, danger_catcher); /* reminder of action required */
+  short_of_memory = 1;               /* set the global flag as true */
+}
+
+#endif
+
+
+/*=============================================================================
+  FILE HANDLING FUNCTIONS
+  =============================================================================*/
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: new_open_file
+
+History:
+
+May 1990 - reformatted for example frustrum code
+October 2001 - changed %d to %p in trace_print of a FILE*
+
+Description:
+
+Allocates new structure, adds the file information and
+adds it to the list of open-file structures.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void new_open_file( FILE* stream, int guise, int format, int access,
+    char* filename, char* keyname, file_p* file_ptr,
+    int* ifail )
+{
+  file_p ptr;
+  file_p temp;
+  int i;
+
+  /* allocate and add file structure into list of open files */
+  ptr = (file_p) malloc( sizeof( file_t ));
+  if (ptr == NULL)
+  {
+    fclose( stream );
+    {
+      *ifail = FR_open_fail;
+      trace_print(">>> returning from 'new_open_file' with ifail %d\n",
+          *ifail);
+      return;
+    }
+  }
+
+  if (open_files == NULL)
+    open_files = ptr;
+  else
+  {
+    for ( temp = open_files; temp->next != NULL; temp = temp->next )
+      /* skip */;
+    temp->next = ptr;
+  }
+
+  /* initialise file structure */
+  ptr->next = NULL;
+  if (open_files == ptr)
+    ptr->prev = NULL;
+  else
+    ptr->prev = temp;
+  for ( i = 0; stream_id[i] != 0; i++ )
+    /* skip */;
+
+  stream_id[i] = i + 1;
+  ptr->strid = i + 1;
+  ptr->guise = guise;
+  ptr->format = format;
+  ptr->access = access;
+  ptr->stream = stream;
+
+  strcpy( ptr->name, filename );
+  strcpy( ptr->key, keyname );
+
+  file_count++;
+
+  trace_print(">>> new_open_file - filename: \"%s\"\n",
+      ptr->name );
+  trace_print(">>> new_open_file - file count : %d; stream %p\n",
+      file_count, stream );
+
+  *file_ptr = ptr;
+  *ifail = FR_no_errors;
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: write_to_file
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1992 - minimise freeing of transfer buffer
+
+Description:
+
+Writes given buffer to open file as either ascii or binary.
+Uses 'fputs' for ascii and 'fwrite' for binary.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void write_to_file( file_p file_ptr, const char* buffer, int header,
+    int buffer_len, int* ifail)
+{
+  /* in this example frustrum, the headers of binary and text files are */
+  /* output with fputs() and other binary data are output with fwrite() */
+
+  if (header || file_ptr->format == FFTEXT)
+  {
+    if ( buffer_len == 1 )
+    {
+      if (fputc( buffer[0], file_ptr->stream ) == EOF)
+      {
+        *ifail = FR_write_fail;
+        trace_print(">>> returning from 'write_to_file' with ifail %d\n",
+            *ifail );
+      }
+      else
+      {
+        *ifail = FR_no_errors;
+      }
+    }
+    else
+    {
+      int required;
+      int count;
+      /* check whether the global input-output buffer is long enough */
+      required = (buffer_len + 1) * sizeof( char );
+
+      if ( input_output_buflen < required )
+      {
+        if ( input_output_buffer != NULL )
+          free(input_output_buffer);
+
+        input_output_buflen = 0;
+        input_output_buffer = (char *) malloc( required );
+
+        if ( input_output_buffer == NULL )
+        {
+          *ifail = FR_unspecified;
+          trace_print( ">>> failed to allocate memory" );
+          trace_print( ">>> returning from 'write_to_file' ifail %d\n",
+              *ifail );
+          return;
+        }
+        else
+          input_output_buflen = required;
+      }
+
+
+      /* copy the buffer and add a null-terminating character */
+
+      for( count = 0; count < buffer_len; count ++ )
+      {
+        input_output_buffer[ count ] = buffer[ count ];
+      }
+      input_output_buffer[buffer_len] = end_of_string_c;
+
+      /* the string will already contain any necessary formatting characters
+         (added by the header routines or Parasolid); fputs does not add any
+       */
+
+      if (fputs( input_output_buffer, file_ptr->stream ) == EOF)
+      {
+        *ifail = FR_write_fail;
+        trace_print(">>> returning from 'write_to_file' with ifail %d\n",
+            *ifail );
+      }
+      else
+      {
+        *ifail = FR_no_errors;
+      }
+    }
+  }
+  else
+  {
+    /* write to binary file */
+    int written;
+    written = fwrite( buffer, (unsigned) (sizeof(char)),
+        buffer_len, file_ptr->stream );
+    if ( written != buffer_len)
+    {
+      *ifail = FR_write_fail;
+      trace_print(">>> returning from 'write_to_file' with ifail %d\n",
+          *ifail );
+    }
+    else
+    {
+      *ifail = FR_no_errors;
+    }
+  }
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: read_from_file
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1992 - minimise freeing of transfer buffer
+
+Description:
+
+Read the required amount of data from open file.
+Uses 'fgets' for ascii and 'fread' for binary.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void read_from_file( file_p file_ptr, char* buffer, int header,
+    int max_buffer_len, int* buffer_len, int* ifail)
+{
+  /* in this example frustrum, the headers of binary and text files are */
+  /* input with fgets()  and  other binary data are input with fread()  */
+
+  if (header || file_ptr->format == FFTEXT)
+  {
+    if ( max_buffer_len == 1 )
+    {
+      int value = fgetc(file_ptr->stream);
+      if ( value == EOF )
+      {
+        *ifail = (feof(file_ptr->stream)?FR_end_of_file:FR_read_fail);
+        trace_print(
+            ">>> returning from 'read_from_file' with ifail %d\n",
+            *ifail );
+        return;
+      }
+      else
+      {
+        buffer[0] = value;
+        *buffer_len = 1;
+      }
+    }
+    else
+    {
+      int required;
+
+      /* check whether current global input-output buffer long enough */
+      required = (max_buffer_len + 1) * sizeof( char );
+
+      if ( input_output_buflen < required )
+      {
+        if ( input_output_buffer != NULL )
+          free(input_output_buffer);
+
+        input_output_buflen = 0;
+        input_output_buffer = (char *) malloc( required );
+
+        if ( input_output_buffer == NULL )
+        {
+          *ifail = FR_unspecified;
+          trace_print(">>> failed to allocate memory" );
+          trace_print(
+              ">>> returning from 'read_from_file' ifail %d\n",
+              *ifail);
+          return;
+        }
+        else
+          input_output_buflen = required;
+      }
+
+      /* note that the second argument to fgets is the maximum number */
+      /* of characters which can ever be written (including the null) */
+      /* which is why the second argument to fgets = max_buffer_len+1 */
+      if (fgets(input_output_buffer, max_buffer_len+1,
+            file_ptr->stream) == NULL)
+      {
+        *ifail = (feof(file_ptr->stream)?FR_end_of_file:FR_read_fail);
+
+        trace_print(
+            ">>> returning from 'read_from_file' with ifail %d\n",
+            *ifail );
+        return;
+      }
+
+      /* copy input buffer back to calling function without terminator */
+      *buffer_len = strlen(input_output_buffer);
+      strncpy(buffer, input_output_buffer, *buffer_len);
+    }
+  }
+  else
+  {
+    int chars = fread( buffer, (unsigned) (sizeof( char )),
+        max_buffer_len, file_ptr->stream );
+    if (chars == 0)
+    {
+      *ifail = ( feof(file_ptr->stream) ? FR_end_of_file : FR_read_fail );
+
+      trace_print(">>> returning from 'read_from_file' with ifail %d\n",
+          *ifail );
+      return;
+    }
+
+    *buffer_len = chars;
+  }
+
+  /***
+    trace_print(">>> %d bytes read\n", *buffer_len );
+   ***/
+
+  *ifail = FR_no_errors;
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: check_valid_filename
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Aug 1999 - make an initial space be an invalid filename otherwise
+spaces are ok.
+
+Description:
+
+Checks that filename is valid, that no spurious characters are there
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void check_valid_filename( char* filename, int* ifail )
+{
+  int len, i;
+
+  /* check that the string is not too long */
+  len = strlen( filename );
+  if ( len > max_namelen )
+  {
+    *ifail = FR_bad_name;
+    trace_print(">>> returning from 'check_valid_filename' ifail %d\n",
+        *ifail );
+    return;
+  }
+
+  /* machine specific:
+     The checks made here must be able to trap 'bad' filename
+     strings generated by FTMKEY i.e. FTMKEY deliberately puts
+     in an initial space in filenames to make them 'bad'.
+     Note that spaces are actually valid in some pathnames
+     such as in Vax logical names and NT UNC Folder names;
+     the frustrum implementor is free to decide what does
+     and does not constitute a valid partname or file key.
+
+     By our convention a filename with an initial space is
+     considered to be invalid. */
+  if ( filename[0] == ' ' )
+  {
+    *ifail = FR_bad_name;
+    trace_print(">>> returning from 'check_valid_filename' ifail %d\n",
+        *ifail );
+    return;
+  }
+  /* check that all the characters are ok */
+  for ( i = 0; i < len; i++ )
+  {
+    /* This code used to ban spaces, however, frustrum tests
+       3, 5 and 10 fail if the schema directory is in a pathname
+       that contains spaces. Hence this code has been changed
+       to allow for this, enabling the frustrum tests to pass.
+     */
+    char c = filename[i];
+    if ( !isprint(c) )  /* Spaces are valid in filenames */
+    {
+      *ifail = FR_bad_name;
+      trace_print(">>> returning from 'check_valid_filename' ifail %d\n",
+          *ifail );
+      return;
+    }
+  }
+
+  *ifail = FR_no_errors;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: extend_schema_filename
+
+History:
+
+Jan 1991 - added
+Mar 1992 - allow schema files to be in P_SCHEMA directory
+Aug 1999 - allow P_SCHEMA to have spaces
+
+Description:
+
+machine specific:
+
+On VMS, prepend the logical symbol "P_SCHEMA:" to the named directory.
+
+On other platforms, evaluate the environment variable "P_SCHEMA" and
+(where set), prepend its value (and a directory separator) to the
+supplied pathname.
+If the resulting pathname would exceed max_namelen characters, the
+supplied pathname is not modified.
+check_valid_filename() is also called to check that the given filename
+is valid before proceeding.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+static void extend_schema_filename( char* filename, int* ifail )
+{
+  char extended_filename[max_namelen + 1] = "";
+  trace_print( "extend_schema_filename receives %s\n", filename);
+  check_valid_filename( filename, ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+#ifdef VMS
+  {
+    char *p_schema_prefix = "P_SCHEMA:";
+    if ( strlen(p_schema_prefix) + strlen(filename) < max_namelen )
+      /* VMS fopen accepts logical names in paths, */
+      /* so we do not need to decode P_SCHEMA here */
+    {
+      strcpy( extended_filename, p_schema_prefix );
+      strcat( extended_filename, filename );
+      strcpy( filename, extended_filename );
+    }
+  }
+#else
+  {
+    /* machine specific: */
+    /* "P_SCHEMA" is allowed to contain spaces due to the change in */
+    /* check_valid_filename(). */
+    char *p_schema_prefix = getenv( "P_SCHEMA" );
+    if ( p_schema_prefix != NULL
+        &&  strlen(p_schema_prefix) + 1 + strlen(filename) < max_namelen )
+    {
+      strcpy( extended_filename, p_schema_prefix );
+      strcat( extended_filename, dir_separator_s );
+      strcat( extended_filename, filename );
+      strcpy( filename, extended_filename );
+    }
+  }
+#endif
+  trace_print( "extend_schema_filename returns %s\n", filename);
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: write_header
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Jan 1995 - max_header_line increased to allow for very long lines when
+writing   FILE=expanded_P_SCHEMA/name   into the header
+
+Description:
+
+Writes standard header to file. Most keyword values are written as
+"unknown". This must be changed straight away to produce meaningful
+text - in particular the frustrum name, application name, date and
+type of machine.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void write_header( file_p file_ptr, const char* pd2hdr, int pd2len,
+    int* ifail)
+{
+  char buffer[max_header_line] = "";
+  trace_print(">>> write_header\n" );
+  /* preamble strings do not include final newline, append on write */
+  write_to_file( file_ptr, g_preamble_1, 1, strlen(g_preamble_1), ifail );
+  if ( *ifail != FR_no_errors ) return;
+  write_to_file( file_ptr, new_line_s, 1, strlen(new_line_s), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  write_to_file( file_ptr, g_preamble_2, 1, strlen(g_preamble_2), ifail );
+  if ( *ifail != FR_no_errors ) return;
+  write_to_file( file_ptr, new_line_s, 1, strlen(new_line_s), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  write_to_file( file_ptr, g_prefix_1, 1, strlen(g_prefix_1), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - the frustrum should write the machine name */
+  strcpy( buffer, "MC=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - the frustrum should write the machine model number */
+  strcpy( buffer, "MC_MODEL=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - the frustrum should write the machine identifier */
+  strcpy( buffer, "MC_ID=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - the frustrum should write the operating system name */
+  strcpy( buffer, "OS=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - the frustrum should write the operating system version */
+  strcpy( buffer, "OS_RELEASE=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - this should be replaced by your company name */
+  strcpy( buffer, "FRU=sdl_parasolid_customer_support;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - this should be replaced by your product's name */
+  strcpy( buffer, "APPL=parasolid_acceptance_tests;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - this should be replaced by your company's location */
+  strcpy( buffer, "SITE=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - this should be replaced by runtime user's login id */
+  strcpy( buffer, "USER=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  strcpy( buffer, "FORMAT=" );
+  strcat( buffer, format_string( file_ptr->format ) );
+  strcat( buffer, ";\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  strcpy( buffer, "GUISE=" );
+  strcat( buffer, guise_string( file_ptr->guise ) );
+  strcat( buffer, ";\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  strcpy( buffer, "KEY=" );
+  strcat( buffer, file_ptr->key );
+  strcat( buffer, ";\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  strcpy( buffer, "FILE=" );
+  strcat( buffer, file_ptr->name );
+  strcat( buffer, ";\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* machine specific - this should be replaced by the runtime date */
+  strcpy( buffer, "DATE=unknown;\n" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  write_to_file( file_ptr, g_prefix_2, 1, strlen(g_prefix_2), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  {
+    int pd2_count, buffer_count;
+    trace_print(">>> part2: \"%s\" len: %d\n", pd2hdr, pd2len );
+
+    buffer_count = 0;
+    for (pd2_count = 0; pd2_count < pd2len; pd2_count++ )
+    {
+      char c = buffer[buffer_count] = pd2hdr[pd2_count];
+      if ( c == ';' )
+      {
+        buffer[ buffer_count +1 ] = new_line_c;
+        buffer[ buffer_count +2 ] = end_of_string_c;
+        write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+        if ( *ifail != FR_no_errors ) return;
+        buffer_count = 0;
+      }
+      else
+      {
+        buffer_count++;
+      }
+    }
+  }
+  write_to_file( file_ptr, g_prefix_3, 1, strlen(g_prefix_3), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  /* trailer string does not include final newline, append on write */
+  write_to_file( file_ptr, g_trailer, 1, strlen(g_trailer), ifail );
+  if ( *ifail != FR_no_errors ) return;
+  write_to_file( file_ptr, new_line_s, 1, strlen(new_line_s), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  *ifail = FR_no_errors;
+}
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: write_xml_header
+
+History:
+
+November 2001 - New
+
+Description:
+
+Writes XML compliant header to file. This is used by the debug report
+functionality.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void write_xml_header( file_p file_ptr, const char* pd2hdr, int pd2len,
+    int* ifail)
+{
+  char buffer[max_header_line] = "";
+  /* <?xml version */
+  strcpy( buffer, "<?xml version=\"1.0\" ?>" );
+  write_to_file( file_ptr, buffer, 1, strlen( buffer ), ifail );
+  if ( *ifail != FR_no_errors ) return;
+
+  *ifail = FR_no_errors;
+}
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: setup_header
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Initialise the global variables storing the text for the standard
+headers written to files.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void setup_header( void )
+{
+
+  strcpy( g_preamble_1,
+      "**" );                           /* two asterisks */
+  strcat( g_preamble_1,
+      "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );   /* upper case letters */
+  strcat( g_preamble_1,
+      "abcdefghijklmnopqrstuvwxyz" );   /* lower case letters */
+  strcat( g_preamble_1,
+      "**************************" );   /* twenty six asterisks */
+
+
+  strcpy( g_preamble_2,
+      "**" );                           /* two asterisks */
+  strcat( g_preamble_2,
+      "PARASOLID" );                    /* PARASOLID (upper case) */
+  strcat( g_preamble_2,
+      " !" );                           /* space and exclamation */
+  strcat( g_preamble_2,
+      "\"" );                           /* a double quote char */
+  strcat( g_preamble_2,
+      "#$%&'()*+,-./:;<=>?@[" );        /* some special chars */
+  strcat( g_preamble_2,
+      "\\" );                           /* a backslash char */
+  strcat( g_preamble_2,
+      "]^_`{|}~" );                     /* more special chars */
+  strcat( g_preamble_2,
+      "0123456789" );                   /* digits */
+  strcat( g_preamble_2,
+      "**************************" );   /* twenty six asterisks */
+
+
+  strcpy( g_trailer, g_trailer_start );
+  strcat( g_trailer,
+      "*****************************************************************" );
+
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: skip_header
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Skip header information when opening a file for read.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+static void skip_header( file_p file_ptr, int* ifail )
+{
+  char buffer[max_header_line] = "";
+  int chars_read = 0;
+  int end_header = 0;
+  int first_line = 1;
+  trace_print(">>> skip_header " );
+  while (!end_header)
+  {
+    /* read from the file */
+    read_from_file( file_ptr, buffer, 1, max_header_line, &chars_read, ifail );
+    if ( *ifail != FR_no_errors ) return;
+    /***
+      trace_print(">>> buffer:   %s", buffer );
+     ***/
+
+    if (strncmp( buffer, g_trailer_start, strlen( g_trailer_start )) == 0)
+    {
+      /*** this is the end of the header */
+      end_header = 1;
+    }
+    else
+      if (first_line
+          &&  strncmp( buffer, g_preamble_1, strlen( g_preamble_1 ) ) != 0)
+      {
+        /*
+           rewind the file to the beginning as the header is not there
+           (this must be a Parasolid version 1 or Romulus version 6 file
+         */
+        trace_print(">>> rewinding the file");
+        rewind( file_ptr->stream );
+        end_header = 1;
+      }
+      else
+      {
+        /*  line skipped  */
+      }
+
+    first_line = 0;
+  }
+  *ifail = FR_no_errors;
+}
+
+
+
+/*=============================================================================
+  EXTERNAL ROUTINES
+  =============================================================================*/
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FSTART
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Start frustrum; set up file structures if not already done
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FSTART( int* ifail )
+{
+  int i;
+  *ifail = FR_unspecified;
+  trace_print(">>> FSTART\n");
+
+  if (frustrum_started == 0)
+  {
+    for ( i = 0; i < max_open_files; i++ )
+      stream_id[i] = 0;
+
+    /* set up the global variables required for writing
+       frustrum file headers */
+    setup_header();
+
+#ifdef PS_AIX
+    /* associate function "danger_catcher" with the condition SIGDANGER */
+    signal(SIGDANGER, danger_catcher);
+    short_of_memory = 0; /* set the global flag as false */
+#endif
+  }
+
+  frustrum_started++;
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FSTART with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FSTOP
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Nov 1992 - reset input_output_buffer to 0 on free
+
+Description:
+
+Stop frustrum. Does nothing much.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FSTOP( int* ifail )
+{
+  *ifail = FR_unspecified;
+  trace_print(">>> FSTOP\n");
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FSTOP with ifail %d\n", *ifail );
+    return;
+  }
+
+  frustrum_started--;
+
+  if ( input_output_buffer != NULL )
+  {
+    input_output_buflen = 0;
+    free(input_output_buffer);
+    input_output_buffer = NULL;
+  }
+
+  if ( frustrum_started == 0 )
+  {
+    file_p file_ptr = open_files;
+
+    /* while there are still files open - close them down */
+    while (file_ptr != NULL)
+    {
+      fclose( file_ptr->stream );
+      if (file_ptr->next == NULL)
+      {
+        /* free the space used in the file pointer */
+        free( file_ptr );
+        file_ptr = NULL;
+      }
+      else
+      {
+        file_ptr = file_ptr->next;
+        free( file_ptr->prev );
+      }
+    }
+
+    /* reset variables and return values */
+    file_count = 0;
+    open_files = NULL;
+  }
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FSTOP with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FMALLO
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Attempts to allocate memory as requested
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FMALLO( int* nbytes, char** memory, int* ifail)
+{
+  *ifail = FR_unspecified;
+  trace_print(">>> FMALLO %d\n", *nbytes);
+  if (frustrum_started <= 0)
+  {
+    *memory = 0;
+
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FMALLO with ifail %d\n", *ifail );
+    return;
+
+  }
+
+#ifdef PS_AIX
+  if (short_of_memory) /* operating system has warned danger_catcher of it */
+  {
+    /* when the Frustrum tells Parasolid it has run out of virtual memory,
+       Parasolid will perform some housekeeping tasks which will free up
+       some space, hence it is appropriate to reset the global flag here */
+    *memory = NULL;
+    short_of_memory = 0;
+  }
+  else if (psdanger(SIGKILL)*PAGESIZE <= *nbytes)
+  {
+    /* psdanger(SIGKILL) returns the current number of free paging
+       space blocks minus the op system paging space kill threshold */
+    *memory = NULL;
+  }
+#endif
+
+  *memory = (char *) malloc( *nbytes );
+
+  if (*memory == NULL)
+  {
+    *ifail = FR_memory_full;
+    trace_print(">>> returning from FMALLO with ifail %d\n", *ifail );
+    return;
+  }
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FMALLO with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FMFREE
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Frees memory
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FMFREE( int* nbytes, char** memory, int* ifail )
+{
+  *ifail = FR_unspecified;
+  trace_print(">>> FMFREE\n");
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FMFREE with ifail %d\n", *ifail );
+    return;
+  }
+
+  free( *memory );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FMFREE with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFOPRD
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Opens a file for read. A file extension is added to show the guise
+and format of the file. If requested, all the line containing the file
+header will be skipped.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFOPRD( const int* guise, const int* format, const char* name,
+    const int* namlen, const int* skiphd, int* strid,
+    int* ifail )
+{
+  char   keyname[max_namelen+1] = "";  /* holds key + null char     */
+  char  filename[max_namelen+1] = "";  /* holds key + extension     */
+  FILE *stream;
+  file_p file_ptr;
+  int filesystem = PS_LONG_NAME;
+
+  *ifail = FR_unspecified;
+  *strid = null_strid;
+
+  trace_print(">>> FFOPRD %d %d %d\n", *guise, *format, *skiphd);
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* check that limit has not been reached */
+  if (file_count == max_open_files)
+  {
+    *ifail = FR_open_fail;
+    trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+    return;
+  }
+
+  strncpy(  keyname, name, *namlen );
+  keyname[*namlen]  = end_of_string_c;
+
+  strncpy( filename, name, *namlen );
+  filename[*namlen] = end_of_string_c;
+
+  if ( *guise == FFCSCH )
+  {
+#ifndef _WIN32
+    /* force schema basename to lowercase for consistency */
+    /* (the case of all NT filenames are converted later) */
+    int i;
+    for ( i = 0 ; i < *namlen ; i++ )
+      filename[i] = tolower(filename[i]);
+#endif
+    /* add (and decode) a P_SCHEMA prefix to the filename */
+    extend_schema_filename(filename, ifail);
+    if ( *ifail != FR_no_errors )
+    {
+      trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+      return;
+    }
+  }
+
+#ifdef _WIN32
+  /* check whether file will be read from short filename system  */
+  filesystem = nt_filesystem_type(filename);
+  {
+    int i = 0;
+    int start = 0;
+    /* locate the filename portion in the pathname */
+    do
+    {
+      if ( filename[i] == dir_separator_c )
+        start = i+1;
+      i++;
+    }
+    while ( filename[i] != '\0' );
+
+    /* force the filename part of short (DOS) filenames to be uppercase */
+    /*                         and that of other filenames to lowercase */
+    /* the case is not significant on NT filenames but it is preserved. */
+    for ( i = start ; filename[i] != '\0' ; i++ )
+    {
+      if ( filesystem == PS_SHORT_NAME )
+        filename[i] = toupper(filename[i]);
+      else
+        filename[i] = tolower(filename[i]);
+    }
+  }
+#endif
+
+  {
+    /* add the file extension */
+    char *gui  = filetype_guise_string( *guise, filesystem );
+    strcat( filename, gui );
+    if( *guise != FFCXMO )
+    {
+      char *fmt = filetype_format_string( *format, filesystem );
+      strcat( filename, fmt );
+    }
+  }
+
+
+  // PEB MODIF
+  if (finter==NULL){
+    cout << "frustrum interface ptr is NULL ! Aborting." << endl;
+    throw;
+  }
+  cout << "filename = " << filename << endl;
+  bool is_schema = finter->is_schema_file(filename);
+  cout << "is sch:" << is_schema << endl;
+
+  string res;
+  if (!is_schema)
+    res.assign(finter->get_filename_path());
+  else
+    res.assign(finter->get_schema_path());
+  res.append(filename);
+
+  // overwrite filename
+  strncpy(filename, res.c_str(), res.size() );
+  filename[res.size()]  = end_of_string_c;
+  cout << "new filename=" << filename << ";" << endl;
+  // END PEB MODIF
+
+
+  trace_print(">>> filename \"%s\"\n", filename );
+
+  check_valid_filename( filename, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* open file for reading */
+#ifdef _WIN32
+  if (*format == FFBNRY)
+    /* if binary file is opened with "r" instead of "rb" reading will fail */
+    /* with end-of-file error, if it reads byte with value equal to CTRL-Z */
+    stream = fopen( filename, g_fopen_mode_read_binary );
+  else
+    stream = fopen( filename, g_fopen_mode_read_text );
+#else
+  stream = fopen( filename, g_fopen_mode_read );
+#endif
+
+  if (stream == 0)
+  {
+    *ifail = FR_not_found;
+    trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+    return;
+  }
+
+  new_open_file( stream, *guise, *format, read_access,
+      filename, keyname, &file_ptr, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  if (*skiphd == FFSKHD)
+  {
+    skip_header( file_ptr, ifail );
+    if ( *ifail != FR_no_errors )
+    {
+      trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+      return;
+    }
+  }
+
+  *strid = file_ptr->strid;
+  trace_print(">>> strid %d\n", *strid );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFOPRD with ifail %d\n", *ifail );
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFOPWR
+
+History:
+
+May 1990      - reformatted for example frustrum code
+November 2001 - added support for debug report files
+
+Description:
+
+Opens file to be written and writes to it the standard file header.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFOPWR( const int* guise, const int* format, const char* name,
+    const int* namlen, const char* pd2hdr, const int *pd2len,
+    int *strid, int *ifail )
+{
+  char   keyname[max_namelen+1] = "";  /* holds key + null char    */
+  char  filename[max_namelen+1] = "";  /* holds key + extension    */
+  FILE *stream;
+  file_p file_ptr;
+  int filesystem = PS_LONG_NAME;
+
+  *ifail = FR_unspecified;
+  *strid = null_strid;
+  trace_print(">>> FFOPWR %d %d\n", *guise, *format );
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  if (file_count == max_open_files)
+  {
+    *ifail = FR_open_fail;
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+  strncpy(  keyname, name, *namlen );
+  keyname[*namlen]  = end_of_string_c;
+
+  strncpy( filename, name, *namlen );
+  filename[*namlen] = end_of_string_c;
+
+  if ( *guise == FFCSCH )
+  {
+#ifndef _WIN32
+    /* force schema basename to lowercase for consistency  */
+    /* (the case of NT all filenames are converted later) */
+    int i;
+    for ( i = 0 ; i < *namlen ; i++ )
+      filename[i] = tolower(filename[i]);
+#endif
+    /* add (and decode) a P_SCHEMA prefix to the filename  */
+    extend_schema_filename(filename, ifail);
+    if ( *ifail != FR_no_errors )
+    {
+      trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+      return;
+    }
+  }
+
+#ifdef _WIN32
+  /* check whether file will be read from a short filename system  */
+  filesystem = nt_filesystem_type(filename);
+  {
+    int i = 0;
+    int start = 0;
+    /* locate the filename portion in the pathname */
+    do
+    {
+      if ( filename[i] == dir_separator_c )
+        start = i+1;
+      i++;
+    }
+    while ( filename[i] != '\0' );
+
+    /* force the filename part of short (DOS) filenames to be uppercase */
+    /*                         and that of other filenames to lowercase */
+    /*  the case is not significant on NT filenames but it is preserved */
+    for ( i = start ; filename[i] != '\0' ; i++ )
+    {
+      if ( filesystem == PS_SHORT_NAME )
+        filename[i] = toupper(filename[i]);
+      else
+        filename[i] = tolower(filename[i]);
+    }
+  }
+#endif
+
+  {
+    /* add the file extension */
+    char *gui  = filetype_guise_string( *guise, filesystem );
+    strcat( filename, gui );
+    if( *guise != FFCXMO && *guise != FFCDBG )
+    {
+      char *fmt = filetype_format_string( *format, filesystem );
+      strcat( filename, fmt );
+    }
+  }
+
+  trace_print(">>> filename \"%s\"\n", filename );
+
+  check_valid_filename( filename, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* open file for writing */
+  stream = fopen( filename, g_fopen_mode_write );
+  if (stream == 0)
+  {
+    *ifail = FR_already_exists;
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+  new_open_file( stream, *guise, *format, write_access,
+      filename, keyname, &file_ptr, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+  if ( *guise == FFCDBG )
+    write_xml_header( file_ptr, pd2hdr, *pd2len, ifail );
+  else
+    write_header( file_ptr, pd2hdr, *pd2len, ifail );
+
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+    return;
+  }
+
+  *strid = file_ptr->strid;
+  trace_print(">>> strid %d\n", *strid );
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFOPWR with ifail %d\n", *ifail );
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFOPRB
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Opens temporary rollback file for read/write.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFOPRB( const int* guise, const int* minsiz, const int* maxsiz,
+    int* actsiz, int* strid, int* ifail )
+{
+  char filename[max_namelen+1] = "";
+  char  keyname[max_namelen+1] = "";
+  FILE *stream;
+  file_p file_ptr;
+  *ifail = FR_unspecified;
+  *strid = null_strid;
+  trace_print(">>> FFOPRB\n");
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+    return;
+  }
+
+  if (file_count == max_open_files)
+  {
+    *ifail = FR_open_fail;
+    trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+    return;
+  }
+
+  if (*guise != FFCROL)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  strcpy( filename, "rollback.001" );
+  strcpy( keyname , "rollback"     );
+
+
+  /* open file */
+  stream = fopen( filename, g_fopen_mode_append );
+  if (stream == 0)
+  {
+    *ifail = FR_open_fail;
+    trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+    return;
+  }
+
+  new_open_file( stream, *guise, FFBNRY, read_write_access,
+      filename, keyname, &file_ptr, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+    return;
+  }
+
+  *actsiz = *maxsiz;
+  *strid = file_ptr->strid;
+  trace_print(">>> strid %d\n", *strid );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFOPRB with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFWRIT
+
+History:
+
+May 1990      - reformatted for example frustrum code
+November 2001 - flush debug report and journal files after write
+
+Description:
+
+Write buffer to open file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFWRIT( const int* guise, const int* strid, const int* nchars,
+    const char* buffer, int* ifail)
+{
+  file_p file_ptr;
+  *ifail = FR_unspecified;
+  trace_print(">>> FFWRIT %d %d %d\n", *guise, *strid, *nchars);
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* find the file info for this stream-id  */
+  for ( file_ptr = open_files; file_ptr != NULL; file_ptr = file_ptr->next )
+  {
+    if (file_ptr->strid == *strid) break;
+  }
+
+  if (file_ptr == NULL)
+  {
+    *ifail = FR_internal_error;
+    trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* check file guise */
+  if (*guise != file_ptr->guise)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* check access */
+  if (file_ptr->access != write_access &&
+      file_ptr->access != read_write_access)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  write_to_file( file_ptr, buffer, 0, *nchars, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* If we are writing a journal or debug report file then flush the */
+  /* buffer - this to ensure that in the event of crash as much data */
+  /* is preserved as possible */
+  if (*guise == FFCJNL || *guise == FFCDBG)
+    fflush( file_ptr->stream );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFWRIT with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFREAD
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Read buffer from open file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFREAD( const int* guise, const int* strid, const int* nmax,
+    char* buffer, int* nactual, int* ifail)
+{
+  file_p file_ptr;
+  int chars_read = 0;
+  *ifail = FR_unspecified;
+  *nactual = 0;
+  trace_print(">>> FFREAD: %d %d %d\n", *guise, *strid, *nmax);
+
+  /* check that the frustrum has been started */
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* find the correct file pointer */
+  for ( file_ptr = open_files; file_ptr != NULL; file_ptr = file_ptr->next )
+  {
+    if (file_ptr->strid == *strid) break;
+  }
+  if (file_ptr == NULL)
+  {
+    *ifail = FR_internal_error;
+    trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* check file guise */
+  if (*guise != file_ptr->guise)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* check access */
+  if (file_ptr->access != read_access &&
+      file_ptr->access != read_write_access)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* read the information from the file */
+  read_from_file( file_ptr, buffer, 0, *nmax, &chars_read, ifail );
+  if ( *ifail != FR_no_errors )
+  {
+    trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+    return;
+  }
+
+  /***
+    {
+    int count;
+    for( count = 0; count < chars_read; count ++ )
+    {
+    trace_print(">>> FFREAD - buffer[%d]: %d  \"%c\"\n",
+    count, buffer[count], buffer[count] );
+    }
+    }
+   ***/
+
+
+  *nactual = chars_read;
+  trace_print(">>> FFREAD: %d bytes read\n", *nactual );
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFREAD with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFTELL
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Indicate position in rollback file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFTELL( const int* guise, const int* strid, int* pos, int* ifail )
+{
+  file_p file_ptr;
+  *ifail = FR_unspecified;
+  trace_print(">>> FFTELL %d %d\n", *guise, *strid);
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFTELL with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  if (*guise != FFCROL)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFTELL with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* check file is open */
+  for ( file_ptr = open_files; file_ptr != NULL; file_ptr = file_ptr->next )
+  {
+    if (file_ptr->strid == *strid) break;
+  }
+
+  if (file_ptr == NULL)
+  {
+    *ifail = FR_internal_error;
+    trace_print(">>> returning from FFTELL with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* check file guise */
+  if (*guise != file_ptr->guise)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFTELL with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* note file pointer */
+  *pos = ftell( file_ptr->stream );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFTELL with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFSEEK
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Change position in rollback file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFSEEK( const int* guise, const int* strid, const int* pos,
+    int* ifail )
+{
+  file_p file_ptr;
+  *ifail = FR_unspecified;
+  trace_print(">>> FFSEEK %d %d\n", *guise, *strid);
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+    return;
+  }
+
+  if (*guise != FFCROL)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* check file is open */
+  for ( file_ptr = open_files; file_ptr != NULL; file_ptr = file_ptr->next )
+  {
+    if (file_ptr->strid == *strid) break;
+  }
+
+  if (file_ptr == NULL)
+  {
+    *ifail = FR_internal_error;
+    trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* check file guise */
+  if (*guise != file_ptr->guise)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+    return;
+  }
+
+  /* reset file pointer */
+  if (fseek( file_ptr->stream, (long) (*pos), 0 ) != 0)
+  {
+    *ifail = FR_unspecified;
+    trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFSEEK with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FFCLOS
+
+History:
+
+May 1990 - reformatted for example frustrum code
+
+Description:
+
+Close specified file. If a rollback file or the action is abort then
+delete the file.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FFCLOS( const int* guise, const int* strid, const int* action,
+    int* ifail )
+{
+  file_p file_ptr;
+  char filename[max_namelen+1] = "";
+  int delete_it = 0;
+  *ifail = FR_unspecified;
+  trace_print(">>> FFCLOS %d %d\n", *guise, *strid);
+
+  if (frustrum_started <= 0)
+  {
+    *ifail = FR_not_started;
+    trace_print(">>> returning from FFCLOS with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  /* find the file info for this stream-id  */
+  for ( file_ptr = open_files; file_ptr != NULL; file_ptr = file_ptr->next )
+  {
+    if (file_ptr->strid == *strid) break;
+  }
+
+  if (file_ptr == NULL)
+  {
+    *ifail = FR_close_fail;
+    trace_print(">>> returning from FFCLOS with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  if ( file_ptr->access == read_write_access ||
+      (file_ptr->access == write_access && *action == FFABOR) )
+  {
+    delete_it = 1;
+    strcpy( filename, file_ptr->name );
+  }
+
+
+  /* close file */
+  stream_id[file_ptr->strid - 1] = 0;
+  if (fclose( file_ptr->stream ) == EOF)
+  {
+    *ifail = FR_close_fail;
+    trace_print(">>> returning from FFCLOS with ifail %d\n", *ifail );
+    return;
+  }
+
+  if (file_ptr == open_files)
+    open_files = open_files->next;
+  else
+    file_ptr->prev->next = file_ptr->next;
+
+  if (file_ptr->next != NULL)
+    file_ptr->next->prev = file_ptr->prev;
+
+  free( file_ptr );
+  file_count--;
+
+  if (delete_it)
+  {
+    delete_file( filename, ifail );
+    if ( *ifail != FR_no_errors )
+    {
+      trace_print(">>> returning from FFCLOS with ifail %d\n", *ifail );
+      return;
+    }
+  }
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FFCLOS with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FABORT
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1992 - activity moved to FSTOP
+
+Description:
+
+Aborting a kernel operation. In this implementation, it does nothing
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FABORT( int* ifail )
+{
+  *ifail = FR_no_errors;
+  trace_print(">>> FABORT\n");
+  trace_print(">>> returning from FABORT with ifail %d\n", *ifail );
+}
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: FTMKEY
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Aug 1999 - Make invalid filenames start with a space.
+- Also initialise filename variable here (and all chars
+elsewhere) to cure compile problems on NT VC6.
+
+Description:
+
+Returns sample valid or invalid file key depending on whether
+the given index is positive/zero(valid) or negative (invalid).
+
+The name generated on NT is only 8 characters long
+because this function can't tell whether this will
+eventually be used to name a short DOS or NTFS file.
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void FTMKEY( int* guise, int* format, int* index, char name[],
+    int* namlen, int* ifail )
+{
+  char filename[max_namelen+1] = "";
+  char *temp;
+  *ifail = FR_unspecified;
+  trace_print(">>> FTMKEY %d %d %d\n",*guise,*format,*index);
+
+  /* The TESTFR frustrum tests ask FTMKEY to generate valid and invalid */
+  /* sample filenames, so it can simulate the effect of an application  */
+  /* passing an invalid key to GETMOD, GETSNP etc. which is then handed */
+  /* down to the application frustrum.                                  */
+  /* If TESTFR calls FTMKEY with a negative valued index it wants it to */
+  /* construct a test filename which FFOPRD/FFOPWR will later reject    */
+
+  /* machine specific: if index < 0, generate an invalid filename */
+  /*                     which check_valid_filename() will detect */
+  /*                     else generate a filename which is valid  */
+
+  /* By our convention an initial space indicates an invalid filename */
+  if (*index < 0)
+    strcpy( filename, " " );
+  else
+    /* skip */;
+
+#ifdef _WIN32
+  /* generate short names suitable for use on FAT file systems */
+  strcat( filename, "D" );
+  temp = filetype_guise_string( *guise, PS_SHORT_NAME );
+  strcat( filename, &temp[1] );  /* skip . at start of filetype */
+  /* add string to indicate the format used */
+  if (*guise == FFCXMO)
+    strcat( filename, "_o" );
+  else
+  {
+    char *fmt = filetype_format_string( *format, PS_SHORT_NAME );
+    strcat( filename, fmt );
+  }
+#else
+  /* generate self explanatory filenames */
+  strcat( filename, "dummy_" );
+  temp = filetype_guise_string( *guise, PS_LONG_NAME );
+  strcat( filename, &temp[1] );  /* skip . at start of filetype */
+  /* add string to indicate the format used */
+  if (*guise == FFCXMO)
+    strcat( filename, "_o" );
+  else
+  {
+    char *fmt = filetype_format_string( *format, PS_LONG_NAME );
+    strcat( filename, fmt );
+  }
+#endif
+
+  /* add an identifying value */
+  if ( abs(*index) <= 20 )
+  {
+    int i = 0;
+    int idx = abs(*index);
+    char num[4] = "";
+    num[i++] = '_';
+    num[i++] = '0' + idx / 10;
+    num[i++] = '0' + idx % 10;
+    num[i++] = '\0';
+    strcat( filename, num );
+  }
+  else
+    strcat( filename, "___" );
+
+  /* for a valid filename add character(s) to the filename indicating */
+  /* filename is supposed to be valid                                 */
+
+#ifdef _WIN32
+  if (*index >= 0)
+    strcat( filename, "V" );
+  else
+    /* skip */;
+#else
+  if (*index >= 0)
+    strcat( filename, "_valid" );
+  else
+    /* skip */;
+#endif
+
+  /* ensure that the length of filename is acceptable */
+  *namlen = strlen( filename );
+  if (*namlen > max_namelen)
+  {
+    *ifail = FR_internal_error;
+    trace_print(">>> returning from FTMKEY with ifail %d\n", *ifail );
+    return;
+  }
+
+
+  strcpy( name, filename );
+  trace_print(">>> filename \"%s\" %d\n", name, *namlen );
+
+  *ifail = FR_no_errors;
+  trace_print(">>> returning from FTMKEY with ifail %d\n", *ifail );
+}
+
+
+
+/*=============================================================================
+  GO ROUTINES
+  =============================================================================*/
+
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOOPPX
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOOPPX( const int* nreals, const double* rvals, const int* nints,
+    const int* ivals, int* ifail)
+{
+  trace_print(">>> GOOPPX\n" );
+  *ifail = CONTIN;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOCLPX
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOCLPX( const int* nreals, const double* rvals, const int* nints,
+    const int* ivals, int* ifail)
+{
+  trace_print(">>> GOCLPX\n" );
+  *ifail = CONTIN;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOPIXL
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOPIXL( const int* nreals, const double* rvals, const int* nints,
+    const int* ivals, int* ifail)
+{
+  trace_print(">>> GOPIXL\n" );
+  *ifail = CONTIN;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOOPSG
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOOPSG( const int* segtyp, const int* ntags, const int* tags,
+    const int* ngeom, const double* geom, const int* nlntp,
+    const int* lntp, int* ifail)
+{
+  trace_print(">>> GOOPSG\n" );
+  *ifail = CONTIN;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOCLSG
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOCLSG( const int* segtyp, const int* ntags, const int* tags,
+    const int* ngeom, const double* geom, const int* nlntp,
+    const int* lntp, int* ifail)
+{
+  trace_print(">>> GOCLSG\n" );
+  *ifail = CONTIN;
+}
+
+
+/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+Function: GOSGMT
+
+History:
+
+May 1990 - reformatted for example frustrum code
+Oct 1994 - return CONTIN
+
+Description:
+
+Open Pixel Data - dummy routine - return code for 'continue, no errors'.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
+
+extern void GOSGMT( const int* segtyp, const int* ntags, const int* tags,
+    const int* ngeom, const double* geom, const int* nlntp,
+    const int* lntp, int* ifail)
+{
+  trace_print(">>> GOSGMT\n" );
+  *ifail = CONTIN;
+}
+
diff --git a/contrib/Parasolid/interface_parasolid/frustrum_delta.c b/contrib/Parasolid/interface_parasolid/frustrum_delta.c
new file mode 100644
index 0000000..2f0b75d
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/frustrum_delta.c
@@ -0,0 +1,415 @@
+/*
+  Copyright 2009 Siemens Product Lifecycle Management Software Inc.
+  All rights reserved.
+  This software and related documentation are proprietary to
+  Siemens Product Lifecycle Management Software Inc.
+
+  Siemens Product Lifecycle Management Software assumes no responsibility
+  for the use or reliability of this software; the example frustrum is provided
+  in order to run the Parasolid Acceptance Tests and to give application
+  writers access to a simple example of a working Frustrum which will
+  run on all Parasolid platforms.
+
+  This file defines the frustrum functions which are used by Parasolid for
+  PK interface partitioned rollback.
+*/
+
+/*
+ * ANSI standard files
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stddef.h>
+
+/*
+ * There exists a directory containing headers for Parasolid tokens and error
+ * codes. Examples:
+ * VMS:
+ *    CC/INCLUDE=(PARASOLID:[V9.BASE])
+ * Unix
+ *    cc -I/Parasolid/v9/base
+ */
+
+#include "parasolid_kernel.h"
+
+/*
+ * Functions to interface to Parasolid
+ */
+
+extern PK_ERROR_code_t FRU_delta_open_for_write(PK_PMARK_t, PK_DELTA_t *);
+extern PK_ERROR_code_t FRU_delta_open_for_read(PK_DELTA_t);
+extern PK_ERROR_code_t FRU_delta_write(PK_DELTA_t, unsigned, const char *);
+extern PK_ERROR_code_t FRU_delta_read(PK_DELTA_t, unsigned, char *);
+extern PK_ERROR_code_t FRU_delta_delete(PK_DELTA_t);
+extern PK_ERROR_code_t FRU_delta_close(PK_DELTA_t);
+
+/*
+ * Application's personal initialization
+ */
+
+extern int FRU__delta_init( int action );
+
+#define block_size 1024
+
+typedef struct block_s *block_p_t;
+struct block_s {
+    size_t used;
+    block_p_t next;
+    char data[block_size];
+};
+typedef struct block_s block_t;
+
+typedef struct delta_s {
+    PK_PMARK_t pmark;
+    int open;
+    int read;
+    block_p_t first_block;
+    block_p_t current_block;
+    unsigned int offset;
+} delta_t, *delta_p_t;
+
+static unsigned int n_deltas_g = 0;
+static delta_p_t *deltas_g;
+static int active_g = 0;
+
+static void free_delta( int key )
+{
+    block_p_t block;
+    block_p_t next_block;
+
+    if (deltas_g[key] == NULL)
+    {
+        printf( "*** free_delta(): Delta %d isn't there!\n", key );
+    }
+
+    block = deltas_g[key]->first_block;
+    while (block != NULL)
+    {
+        next_block = block->next;
+        free( (void *) block );
+        block = next_block;
+    }
+    free( (void *) (deltas_g[key]) );
+    deltas_g[key] = NULL;
+    return;
+}
+
+int FRU__delta_init( int action )
+{
+    int res = 0;
+    unsigned int i;
+
+    switch (action)
+    {
+    case 1:
+        if (active_g)
+        {
+            printf( "*** FRU__delta_init(): " );
+            printf( "Attempt to start when running!\n" );
+            res = 0;
+        }
+        else
+        {
+            n_deltas_g = 10;
+            deltas_g =
+            (delta_p_t *) malloc( (size_t) (n_deltas_g * sizeof( delta_p_t )));
+            if (deltas_g == NULL)
+            {
+                res = 0;
+                break;
+            }
+            i = 0;
+            for ( ; i < n_deltas_g; i++ ) deltas_g[i] = NULL;
+            active_g = 1;
+            res = 1;
+        }
+        break;
+    case 2:
+        if (!active_g)
+        {
+            printf( "*** FRU__delta_init(): " );
+            printf( "Attempt to stop when not running!\n" );
+            res = 0;
+        }
+        else
+        {
+            i = 0;
+            for ( ; i < n_deltas_g; i++ )
+            {
+                if (deltas_g[i] != NULL)
+                free_delta( i );
+            }
+            free( (void *) deltas_g );
+            deltas_g = NULL;
+            active_g = 0;
+            res = 1;
+        }
+        break;
+    default:
+        printf( "*** FRU__delta_init(): Invalid argument: %d.\n", action );
+        res = 0;
+        break;
+    }
+    return res;
+}
+
+PK_ERROR_code_t FRU_delta_open_for_write( PK_PMARK_t pmark, PK_DELTA_t *key )
+{
+    delta_p_t delta;
+    PK_DELTA_t i;
+
+    *key = 0;
+
+    i = (PK_DELTA_t) 0;
+    for ( ; i < n_deltas_g; i++ )
+    {
+        if (deltas_g[i] == NULL)
+        {
+             *key = i + 1;
+             break;
+        }
+    }
+    if (*key == 0)
+    {
+        deltas_g = (delta_p_t *) (realloc( (void *) deltas_g, (size_t) (
+            n_deltas_g * 2 * sizeof( delta_p_t )) ));
+        if (deltas_g == NULL)
+        {
+            printf( "*** FRU_delta_open_for_write(): " );
+            printf( "Failed to enlarge delta array!\n" );
+            return PK_ERROR_memory_full;
+        }
+        i = n_deltas_g;
+        for ( ; i < 2 * n_deltas_g; i++ ) deltas_g[i] = NULL;
+        *key = n_deltas_g + 1;
+        n_deltas_g *= 2;
+    }
+    deltas_g[*key - 1] =
+        (delta_p_t) (malloc( (size_t) (sizeof( struct delta_s ))));
+    delta = deltas_g[*key - 1];
+    if (delta == NULL)
+    {
+     printf( "*** FRU_delta_open_for_write(): Failed to allocate delta!\n" );
+     *key = 0;
+     return PK_ERROR_memory_full;
+    }
+    delta->pmark = pmark;
+    delta->open = 1;
+    delta->read = 0;
+    delta->first_block = NULL;
+    delta->current_block = NULL;
+    delta->offset = 0;
+    return PK_ERROR_no_errors;
+}
+
+PK_ERROR_code_t FRU_delta_open_for_read( PK_DELTA_t key )
+{
+    delta_p_t delta;
+
+    if (key > n_deltas_g || key <= 0)
+    {
+     printf( "*** FRU_delta_open_for_read(): Key value %d out of range!\n",
+             key);
+     return PK_ERROR_bad_key;
+    }
+
+    delta = deltas_g[key - 1];
+    if (delta == NULL)
+    {
+        printf( "*** FRU_delta_open_for_read(): Delta %d does not exist\n",
+                key );
+        return PK_ERROR_bad_key;
+    }
+    if (delta->open)
+    {
+        printf( "*** FRU_delta_open_for_read(): Delta %d is already open\n",
+                key );
+        return PK_ERROR_bad_key;
+    }
+    delta->open = 1;
+    delta->read = 1;
+    delta->current_block = delta->first_block;
+    delta->offset = 0;
+    return PK_ERROR_no_errors;
+}
+
+PK_ERROR_code_t FRU_delta_write( PK_DELTA_t key, unsigned n_bytes, const char *bytes)
+{
+    int n_copy;
+    delta_p_t delta;
+    unsigned int offset;
+
+    if (key > n_deltas_g || key <= 0)
+    {
+        printf( "*** FRU_delta_write(): Key value %d out of range!\n", key );
+        printf( "*** FRU_delta_write(): n_deltas_g = %d \n", n_deltas_g);
+        return PK_ERROR_bad_key;
+    }
+
+    delta = deltas_g[key - 1];
+    if (delta == NULL)
+    {
+        printf( "*** FRU_delta_write(): Delta %d does not exist.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (!delta->open)
+    {
+        printf( "*** FRU_delta_write(): Delta %d is not open.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (delta->read)
+    {
+        printf( "*** FRU_delta_write(): Delta %d is open for reading\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (delta->current_block == NULL)
+    {
+        delta->first_block =
+            (block_p_t) malloc( (size_t) (sizeof( struct block_s)) );
+        if (delta->first_block == NULL)
+        {
+            printf( "*** FRU_delta_write(): Can't allocate block\n" );
+            return PK_ERROR_memory_full;
+        }
+        delta->first_block->used = 0;
+        delta->first_block->next = NULL;
+        delta->current_block = delta->first_block;
+        delta->offset = 0;
+    }
+    offset = 0;
+    for ( ; n_bytes > offset; offset += n_copy )
+    {
+     if (delta->current_block->used == block_size)
+     {
+         delta->current_block->next = (block_p_t) malloc( (size_t) (sizeof(
+                                      struct block_s )) );
+         if (delta->current_block->next == NULL)
+         {
+             printf( "*** FRU_delta_write(): " );
+             printf( "Couldn't allocate following block.\n" );
+             return PK_ERROR_memory_full;
+         }
+         delta->current_block = delta->current_block->next;
+         delta->current_block->used = 0;
+         delta->current_block->next = NULL;
+     }
+     n_copy = ((block_size - delta->current_block->used) < (n_bytes - offset)
+     ? (block_size - delta->current_block->used) : (n_bytes - offset));
+     memcpy( (void *) (delta->current_block->data + delta->current_block->
+     used), (void *) (bytes + offset), (size_t) n_copy );
+     delta->current_block->used += n_copy;
+    }
+    return PK_ERROR_no_errors;
+}
+
+PK_ERROR_code_t FRU_delta_read( PK_DELTA_t key, unsigned n_bytes, char *bytes)
+{
+    int n_copy;
+    delta_p_t delta;
+    unsigned int offset;
+
+    if (key > n_deltas_g || key <= 0)
+    {
+        printf( "*** FRU_delta_read(): Key value %d out of range!\n", key );
+        return PK_ERROR_bad_key;
+    }
+    delta = deltas_g[key - 1];
+    if (delta == NULL)
+    {
+        printf( "*** FRU_delta_read(): Delta %d does not exist.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (!delta->open)
+    {
+        printf( "*** FRU_delta_read(): Delta %d is not open.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (!delta->read)
+    {
+        printf( "*** FRU_delta_read(): Delta %d is open for writing\n", key );
+        return PK_ERROR_bad_key;
+    }
+
+    offset = 0;
+    for ( ; n_bytes > offset; offset += n_copy )
+    {
+        if (delta->offset == block_size)
+        {
+            delta->current_block = delta->current_block->next;
+            delta->offset = 0;
+            if (delta->current_block == NULL)
+            {
+                printf( "*** FRU_delta_read(): ");
+                printf( "Attempt to read beyond end of delta.\n" );
+                return PK_ERROR_file_read_corruption;
+            }
+        }
+        n_copy = ((n_bytes - offset) > (block_size - delta->offset)
+                     ? (block_size - delta->offset)
+                     : (n_bytes - offset));
+        if (bytes != NULL)
+            memcpy( (void *) (bytes + offset), (void *) (delta->
+            current_block->data + delta->offset), (size_t) n_copy );
+        delta->offset += n_copy;
+    }
+    return PK_ERROR_no_errors;
+}
+
+PK_ERROR_code_t FRU_delta_delete( PK_DELTA_t key )
+{
+    delta_p_t delta;
+
+    if (key > n_deltas_g || key <= 0)
+    {
+        printf( "*** FRU_delta_delete(): Key value %d out of range!\n", key );
+        return PK_ERROR_bad_key;
+    }
+
+    delta = deltas_g[key - 1];
+    if (delta == NULL)
+    {
+        printf( "*** FRU_delta_delete(): Delta %d does not exist.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (delta->open)
+    {
+        printf( "*** FRU_delta_delete(): Delta %d is open.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    free_delta( (int) (key - 1) );
+    return 0;
+}
+
+PK_ERROR_code_t FRU_delta_close( PK_DELTA_t key )
+{
+    delta_p_t delta;
+
+    if (key > n_deltas_g || key <= 0)
+    {
+        printf( "*** FRU_delta_close(): Key value %d out of range!\n", key );
+        return PK_ERROR_bad_key;
+    }
+
+    delta = deltas_g[key - 1];
+    if (delta == NULL)
+    {
+        printf( "*** FRU_delta_close(): Delta %d does not exist.\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (!delta->open)
+    {
+        printf( "*** FRU_delta_close(): Delta %d is not open\n", key );
+        return PK_ERROR_bad_key;
+    }
+    if (delta->read && delta->first_block != NULL
+        && (delta->current_block->next != NULL
+        || delta->current_block->used != delta->offset))
+    {
+        printf( "*** FRU_delta_close(): Delta %d closed with data unread\n",
+                key );
+    }
+    delta->open = 0;
+    return 0;
+}
diff --git a/contrib/Parasolid/interface_parasolid/include/frustrum_ifails.h b/contrib/Parasolid/interface_parasolid/include/frustrum_ifails.h
new file mode 100644
index 0000000..66a3b8e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/frustrum_ifails.h
@@ -0,0 +1,47 @@
+/*
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+*/
+#ifndef FRUSTRUM_IFAILS_H
+#define FRUSTRUM_IFAILS_H
+
+/* Frustrum Ifails */
+
+#define FR_no_errors         (    0) /* operation was successful */
+#define FR_bad_name          (    1) /* bad filename */
+#define FR_not_found         (    2) /* file of given name does not exist */
+#define FR_already_exists    (    3) /* file of given name already exists */
+#define FR_end_of_file       (    4) /* file pointer is at end of file */
+#define FR_open_fail         (   10) /* unspecified open error, eg, already open, wrong format, protection */
+#define FR_disc_full         (   11) /* no space available to extend the file */
+#define FR_write_fail        (   12) /* unspecified write error */
+#define FR_read_fail         (   13) /* unspecified read error */
+#define FR_close_fail        (   14) /* unspecified close error */
+#define FR_memory_full       (   15) /* insufficient contiguous virtual memory */
+#define FR_bad_header        (   16) /* bad header found opening file for read */
+#define FR_write_memory_full (   17) /* insufficient virtual memory for write */
+#define FR_rollmark_op_pass  (   20) /* Rollmark operation within frustrum passed */
+#define FR_rollmark_op_fail  (   21) /* Rollmark operation within frustrum failed */
+#define FR_unspecified       (   99) /* unspecified error, eg, bad function arguments or call sequence */
+
+/* Graphics Ifails */
+
+#define CONTIN (    0) /* Continue: no errors */
+#define ABORT  (-1011) /* Abort: return control to caller */
+
+/* Foreign Geometry Ifails */
+
+#define FGOPOK (    0) /* Foreign geometry operation successful */
+#define FGOPFA (    1) /* Foreign geometry operation failed */
+#define FGEVIN (    2) /* Foreign geometry evaluation incomplete */
+#define FGPROP (    3) /* use default properties for foreign geometry */
+#define FGGEOM (    4) /* Foreign geometry not found */
+#define FGDATA (    5) /* Foreign geometry data retrieve error */
+#define FGFILE (    6) /* Foreign geometry data file error */
+#define FGRERR (    7) /* Foreign geometry real data error */
+#define FGIERR (    8) /* Foreign geometry integer data error */
+#endif /* FRUSTRUM_IFAILS_H */
+
+/* End Ifails */
+
diff --git a/contrib/Parasolid/interface_parasolid/include/frustrum_interface.h b/contrib/Parasolid/interface_parasolid/include/frustrum_interface.h
new file mode 100644
index 0000000..9023d35
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/frustrum_interface.h
@@ -0,0 +1,43 @@
+#ifndef _FRUSTRUM_INTERFACE_H_
+#define _FRUSTRUM_INTERFACE_H_
+
+#include <stdio.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <string>
+
+using namespace std;
+
+class frustrumInterface{
+  public:
+    frustrumInterface(){
+      filename_path.assign("");
+      schema_path.assign("");
+    };
+    ~frustrumInterface(){};
+
+    void set_filename_path(string s){
+//      cout << "s=" << s << endl;
+//      cout << "filename_path=" << filename_path << endl;
+      filename_path.assign(s);
+    };
+    void set_schema_path(string s){
+//      cout << "s=" << s << endl;
+//      cout << "schema_path=" << schema_path << endl;
+      schema_path.assign(s);
+    };
+    string get_filename_path()const{return filename_path;};
+    string get_schema_path()const{return schema_path;};
+
+    bool is_schema_file(string name)const{
+      size_t s = name.find(".sch_txt");// check schema
+      return (s<name.size());
+    }
+
+  private:
+    string filename_path,schema_path;
+
+};
+#endif
diff --git a/contrib/Parasolid/interface_parasolid/include/frustrum_tokens.h b/contrib/Parasolid/interface_parasolid/include/frustrum_tokens.h
new file mode 100644
index 0000000..13d5fab
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/frustrum_tokens.h
@@ -0,0 +1,153 @@
+/*
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+*/
+#ifndef FRUSTRUM_TOKENS_H
+#define FRUSTRUM_TOKENS_H
+
+/* File Guise Tokens */
+
+#define FFCROL (    1) /* rollback file */
+#define FFCSNP (    2) /* snapshot file */
+#define FFCJNL (    3) /* journal file */
+#define FFCXMT (    4) /* transmit file (generated by the C-kernel) */
+#define FFCXMO (    5) /* transmit file (generated by the old Fortran kernel) */
+#define FFCSCH (    6) /* schema file */
+#define FFCLNC (    7) /* licence file */
+#define FFCXMP (    8) /* transmit file (partition) */
+#define FFCXMD (    9) /* transmit file (deltas) */
+#define FFCDBG (   10) /* debug report file */
+
+/* File Format Tokens */
+
+#define FFBNRY (    1) /* binary */
+#define FFTEXT (    2) /* text */
+#define FFAPPL (    3) /* applio */
+#define FFXML  (    4) /* xml */
+
+/* File Open Mode Tokens */
+
+#define FFSKHD (    1) /* skip header after opening file for read (usual) */
+#define FFLVHD (    2) /* leave header after opening file for read (fru tests) */
+
+/* File Close Mode Tokens */
+
+#define FFNORM (    1) /* normal: default action on file close */
+#define FFABOR (    2) /* abort: delete the newly created file */
+
+/* GO Codes */
+
+#define CODCOM ( 1001) /* Segment complete */
+#define CODINC ( 1002) /* Segment incomplete */
+#define CODUNC ( 1003) /* Segment may or may not be complete */
+#define CODOVP ( 1004) /* Segment is outside all viewports */
+#define CODCVP ( 1005) /* Segment is coincident with a viewport boundary */
+#define CODVIS ( 1006) /* Line segment is visible */
+#define CODINV ( 1007) /* Line segment is invisible */
+#define CODUNV ( 1008) /* Visibility of line segment is unknown */
+#define CODDRV ( 1009) /* Line segment is drafting line */
+#define CODSMO ( 1014) /* Edge is "smooth" */
+#define CODNSM ( 1015) /* Edge is not "smooth" */
+#define CODUNS ( 1016) /* Edge "smoothness" is unknown */
+#define CODSMS ( 1017) /* Edge "smooth" but coincident with silhouette */
+#define CODINE ( 1018) /* Edge is internal */
+#define CODNIN ( 1019) /* Edge is not internal */
+#define CODINU ( 1020) /* Not known whether edge is internal */
+#define CODINS ( 1021) /* Edge is internal, coincides with silhouette */
+#define CODISH ( 1022) /* Line segment is invisible (hidden by its own body occ) */
+#define CODIGN ( 1023) /* Edge lies on the boundary of an ignorable feature */
+
+/* GO Segment Types */
+
+#define SGTPBY ( 2003) /* Body (hierarchical segment) */
+#define SGTPED ( 2006) /* Edge */
+#define SGTPSI ( 2007) /* Silhouette line */
+#define SGTPPH ( 2008) /* Planar hatch-line */
+#define SGTPRH ( 2009) /* Radial hatch-line */
+#define SGTPRU ( 2010) /* Rib line (unfixed blend) */
+#define SGTPBB ( 2011) /* Blend-boundary line */
+#define SGTPPL ( 2012) /* Parametric hatch line */
+#define SGTPHU ( 2013) /* Hull line *** OBSOLETE *** */
+#define SGTPFT ( 2016) /* Facet */
+#define SGTPFA ( 2017) /* Face (hierarchical segment) */
+#define SGTPER ( 2018) /* Error segment */
+#define SGTPGC ( 2019) /* Curve (geometry) segment */
+#define SGTPGS ( 2020) /* Surface (geometry) segment */
+#define SGTPGB ( 2021) /* Surface boundary (geometry) segment */
+#define SGTPMF ( 2022) /* Mangled facet */
+#define SGTPVT ( 2023) /* Visibility transitions */
+#define SGTPTS ( 2024) /* Facet strip */
+#define SGTPVP ( 2025) /* Visibility transitions (parameterised) */
+#define SGTPIC ( 2026) /* Interference line */
+#define SGTPCL ( 2027) /* Clip line */
+
+/* GO Line Types */
+
+#define L3TPSL ( 3001) /* Straight line */
+#define L3TPCI ( 3002) /* Partial circle */
+#define L3TPCC ( 3003) /* Complete circle */
+#define L3TPEL ( 3004) /* Partial ellipse */
+#define L3TPCE ( 3005) /* Complete ellipse */
+#define L3TPPY ( 3006) /* Poly-line */
+#define L3TPFV ( 3007) /* Facet vertices */
+#define L3TPFN ( 3008) /* Facet vertices plus surface normals */
+#define L3TPPC ( 3009) /* Non-rational parametric curve */
+#define L3TPRC ( 3010) /* Rational parametric curve */
+#define L3TPTS ( 3011) /* Facet strip vertices */
+#define L3TPTN ( 3012) /* Facet strip vertices plus surface normals */
+#define L3TPNC ( 3013) /* Non-rational nurbs curve */
+#define L3TPRN ( 3014) /* Rational nurbs curve */
+#define L3TPFP ( 3015) /* Facet vertices plus parameters */
+#define L3TPFI ( 3016) /* Facet vertices plus normals plus parameters */
+#define L3TPTP ( 3017) /* Facet strip vertices plus parameters */
+#define L3TPTI ( 3018) /* Facet strip vertices plus normals plus parameters */
+#define L3TPF1 ( 3019) /* Facet vertices + normals + parameters + 1st derivs */
+#define L3TPF2 ( 3020) /* Facet vertices + normals + parameters + all derivs */
+#define L3TPT1 ( 3021) /* Facet strip vxs + normals + parameters + 1st derivs */
+#define L3TPT2 ( 3022) /* Facet strip vxs + normals + parameters + all derivs */
+
+/* GO Error Codes */
+
+#define ERNOGO ( 4001) /* unspecified error */
+#define ERRUBB ( 4002) /* Rubber entity (no geometry attached) */
+#define ERSANG ( 4003) /* Surface angular tolerance too small */
+#define ERSDIS ( 4004) /* Surface distance tolerance too small */
+#define ERCANG ( 4005) /* Curve angular tolerance too small */
+#define ERCDIS ( 4006) /* Curve distance tolerance too small */
+#define ERCLEN ( 4007) /* Curve chord length tolerance too small */
+#define ERFWID ( 4008) /* Facet width tolerance too small */
+#define ERIFMF ( 4009) /* Incremental Facetting: missing face */
+#define ERIFRE ( 4010) /* Incremental Facetting: refinement required */
+#define ERIFER ( 4011) /* Incremental Facetting: unspecified error */
+
+/* FG Node Operation Codes */
+
+#define FGRECU (    1) /* Retrieve foreign curve geometry */
+#define FGRESU (    2) /* Retrieve foreign surface geometry */
+#define FGCOCU (   11) /* Copy foreign curve geometry */
+#define FGCOSU (   12) /* Copy foreign surface geometry */
+#define FGFRCU (   21) /* Free foreign curve geometry */
+#define FGFRSU (   22) /* Free foreign surface geometry */
+#define FGTXCU (   31) /* Transmitting foreign curve geometry */
+#define FGTXSU (   32) /* Transmitting foreign surface geometry */
+
+/* FG Evaluation Operation Codes */
+
+#define FGEVTR (    1) /* Triangular evaluation matrix required */
+#define FGEVSQ (    2) /* Square evaluation matrix required */
+#define FGPRBD (    1) /* Geometry parameterisation is bounded */
+#define FGPRPE (    2) /* Geometry parameterisation is periodic */
+
+/* Rollmark Operation Codes */
+
+#define FRROST (    1) /* Rollback status */
+#define FRROSE (    2) /* Set a roll mark */
+#define FRROMA (    3) /* Roll to a mark */
+#define FRRODT (    4) /* Rollmark is out of date */
+#define FRROON (    1) /* Rollback status is on */
+#define FRROFF (    0) /* Rollback status is off */
+#endif /* FRUSTRUM_TOKENS_H */
+
+/* End Tokens */
+
diff --git a/contrib/Parasolid/interface_parasolid/include/kernel_interface.h b/contrib/Parasolid/interface_parasolid/include/kernel_interface.h
new file mode 100644
index 0000000..4bb82db
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/kernel_interface.h
@@ -0,0 +1,3259 @@
+/*
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+*/
+
+#ifndef KERNEL_INTERFACE_H_INCLUDED
+#define KERNEL_INTERFACE_H_INCLUDED
+
+#include "parasolid_typedefs.h"
+#include "parasolid_tokens.h"
+#include "parasolid_ifails.h"
+
+/****************************************************/
+/*                   FUNCTIONS                      */
+/****************************************************/
+
+#ifdef __cplusplus
+#define KI_linkage_m extern "C"
+#else
+#define KI_linkage_m extern
+#endif
+
+
+KI_linkage_m void ADPAPE
+(
+/* received */                            
+KI_tag_geometry            * /*pg*/,       /* B-curve or B-surface */
+KI_dbl_parameter           * /*t*/,        /* split parameter */
+KI_cod_papr                * /*uorv*/,     /* parameter in which to split */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ADVXED
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge to which vertex is added */
+KI_vec_position              /*point*/,    /* position vector for new vertex */
+/* returned */                            
+KI_tag_vertex              * /*newvrx*/,   /* new vertex added */
+KI_tag_edge                * /*newedg*/,   /* new edge added */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void APPTRA
+(
+/* received */                            
+KI_tag_list_entity         * /*entity*/,   /* entity or list of entities */
+KI_tag_transform           * /*transf*/,   /* transformation to apply */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ATGETO
+(
+/* received */                            
+int                        * /*ntopol*/,   /* number of topological entities */
+KI_tag_topology              /*topol*/[],  /* topological entities */
+KI_cod_logical               /*sense*/[],  /* face senses */
+int                        * /*ngeom*/,    /* number of topological entities */
+KI_tag_geometry              /*geom*/[],   /* geometric entities */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ATTGEO
+(
+/* received */                            
+KI_tag_topology            * /*topol*/,    /* topological entity */
+KI_tag_geometry            * /*geom*/,     /* geometric entity */
+KI_cod_logical             * /*sense*/,    /* face sense */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLECHK
+(
+/* received */                            
+KI_tag_list_edge           * /*edges*/,    /* edges to check */
+int                        * /*full*/,     /* level of checking */
+/* returned */                            
+KI_int_nitems              * /*nerror*/,   /* number of invalid blends */
+KI_tag_list_int            * /*errors*/,   /* list of failure codes, the */
+                                           /* codes are given below */
+KI_tag_list_edge           * /*erreds*/,   /* list of invalid edges */
+KI_tag_list_entity         * /*topols*/,   /* list of tags associated with */
+                                           /* the failure codes */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLECRB
+(
+/* received */                            
+KI_tag_list_edge           * /*edges*/,    /* edges to be blended */
+int                        * /*type*/,     /* blend type */
+KI_dbl                     * /*range1*/,   /* blend range 1 */
+KI_dbl                     * /*range2*/,   /* blend range 2 */
+KI_int_nitems              * /*nprops*/,   /* number of blend properties */
+KI_cod_blec                  /*props*/[],  /* array of blend properties */
+KI_tag_list                  /*pvals*/[],  /* array of tags of data lists */
+/* returned */                            
+KI_tag_list_edge           * /*blends*/,   /* list of edges to which blends */
+                                           /* have been attached */
+int                        * /*nblend*/,   /* number of edges to which blends */
+                                           /* have been attached */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLECVR
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge to be blended */
+KI_int_nitems              * /*npts*/,     /* number of data points */
+KI_vec_position              /*points*/[], /* data points */
+double                       /*values*/[], /* data values */
+KI_int_nitems              * /*nprops*/,   /* number of blend properties */
+KI_cod_blec                  /*props*/[],  /* array of blend properties */
+KI_tag_list                  /*pvals*/[],  /* array of tags of data lists */
+/* returned */                            
+KI_tag_list_edge           * /*blends*/,   /* list of edges to which blends */
+                                           /* have been attached */
+int                        * /*nblend*/,   /* number of edges to which blends */
+                                           /* have been attached */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLEENQ
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge whose blend is required */
+/* returned */                            
+KI_tag_face                * /*face1*/,    /* face to left of edge */
+KI_tag_face                * /*face2*/,    /* face to right of edge */
+int                        * /*type*/,     /* type of blend */
+double                     * /*range1*/,   /* range of blend on face1 */
+double                     * /*range2*/,   /* range of blend on face2 */
+KI_int_nitems              * /*nprops*/,   /* number of blend properties */
+KI_tag_list_int            * /*props*/,    /* blend properties */
+KI_tag_list_list           * /*pvals*/,    /* blend property values */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLEFIX
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body to fix blends in */
+/* returned */                            
+KI_int_nitems              * /*nblend*/,   /* number of blend faces */
+KI_tag_list_face           * /*blends*/,   /* list of created blend faces */
+KI_tag_list_list           * /*faces*/,    /* list of underlying faces */
+KI_tag_list_int            * /*edges*/,    /* list of (dead) tags of edges */
+KI_cod_blcc                * /*error*/,    /* first error from blending body */
+KI_tag_edge                * /*err_ed*/,   /* edge associated with error */
+KI_tag_topology            * /*topol*/,    /* topology associated with error */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLEFXF
+(
+/* received */                            
+KI_tag_list_face           * /*l_wall*/,   /* list of faces in left wall */
+KI_tag_list_face           * /*r_wall*/,   /* list of faces in right wall */
+KI_cod_logical             * /*l_rev*/,    /* blend direction from left wall */
+KI_cod_logical             * /*r_rev*/,    /* blend direction from right wall */
+KI_int_nitems              * /*ntokens*/,  /* number of blending tokens */
+KI_cod_fxft                  /*tokens*/[], /* blending tokens */
+KI_tag_list                  /*bdata*/[],  /* data associated with tokens */
+/* returned */                            
+KI_cod_fxfe                * /*status*/,   /* blend success status flag */
+KI_tag_list_entity         * /*s_data*/,   /* data associated with status flag */
+KI_tag_list_body           * /*sheets*/,   /* the blend sheets created */
+KI_int_nitems              * /*nblend*/,   /* number of blend faces created */
+KI_tag_list_face           * /*blends*/,   /* the blend faces */
+KI_tag_list_list           * /*unders*/,   /* list of lists of underlying data */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLEREM
+(
+/* received */                            
+KI_tag_list_edge           * /*edges*/,    /* list of edges to remove blends from */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLNAFF
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge */
+/* returned */                            
+KI_tag_list_edge           * /*iedge*/,    /* list of affected edges */
+KI_int_nitems              * /*nedge*/,    /* number of edges in 'iedge' */
+KI_tag_list_face           * /*iface*/,    /* list of affected faces */
+KI_int_nitems              * /*nface*/,    /* number of faces in 'iface' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BLNDVX
+(
+/* received */                            
+KI_tag_list_vertex         * /*vertex*/,   /* vertex or vertices to blend */
+KI_dbl_distance            * /*radius*/,   /* blend radius */
+/* returned */                            
+KI_tag_list_edge           * /*neweds*/,   /* list of new edges */
+KI_tag_list_vertex         * /*newvxs*/,   /* list of new vertices */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BOPBYS
+(
+/* received */                            
+KI_tag_list_entity         * /*target*/,   /* target body or list of faces */
+KI_tag_list_entity         * /*tools*/,    /* tool bodies or faces of tool body */
+KI_int_nitems              * /*nopts*/,    /* number of boolean options */
+KI_cod_boop                  /*opts*/[],   /* boolean option codes */
+KI_tag_list_entity           /*optdta*/[], /* boolean option data lists */
+/* returned */                            
+KI_tag_list_body           * /*bodys*/,    /* resulting bodies */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void BOPOLD
+(
+/* received */                            
+KI_tag_list_entity         * /*target*/,   /* target body or list of faces */
+KI_tag_list_entity         * /*tools*/,    /* tool bodies or faces of tool body */
+KI_int_nitems              * /*nopts*/,    /* number of boolean options */
+KI_cod_boop                  /*opts*/[],   /* boolean option codes */
+KI_tag_list_entity           /*optdta*/[], /* boolean option data lists */
+/* returned */                            
+KI_tag_list_body           * /*bodys*/,    /* resulting bodies */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CCLIST
+(
+/* received */                            
+KI_tag_list                * /*head*/,     /* list to be extended */
+KI_tag_list                * /*tail*/,     /* list to be appended */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CHCKEN
+(
+/* received */                            
+KI_tag_list_entity         * /*entity*/,   /* entity (or pair of entities) to check */
+KI_int_nitems              * /*mxflts*/,   /* maximum number of faults to return */
+KI_int_nitems              * /*nopts*/,    /* number of option codes */
+KI_cod_chop                  /*option*/[], /* array of option codes */
+/* returned */                            
+KI_tag_list_int            * /*faults*/,   /* tokens describing faults in body */
+KI_tag_list_entity         * /*tags*/,     /* faulty components */
+KI_tag_list_list           * /*pdata*/,    /* list of data lists */
+KI_int_nitems              * /*nfault*/,   /* number of faults returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLABYS
+(
+/* received */                            
+KI_tag_body                * /*body1*/,    /* first body */
+KI_tag_transform           * /*trans1*/,   /* transformation for 'body1' */
+KI_tag_body                * /*body2*/,    /* second body */
+KI_tag_transform           * /*trans2*/,   /* transformation for 'body2' */
+KI_cod_logical             * /*lfull*/,    /* true if exhaustive test required */
+/* returned */                            
+KI_tag_list_face           * /*fclst1*/,   /* list of faces in 'body1' which */
+                                           /* clash with 'body2' */
+KI_tag_list_face           * /*fclst2*/,   /* list of faces in 'body2' which */
+                                           /* clash with 'body1' */
+KI_int_nitems              * /*nclash*/,   /* length of face lists */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLENEN
+(
+/* received */                            
+KI_tag_list_entity         * /*ents1*/,    /* 1st entity/list of entities */
+KI_tag_list_entity         * /*ents2*/,    /* 2nd entity/list of entities */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_clop                  /*iopts*/[],  /* options */
+KI_tag_list_dbl              /*optdta*/[], /* option data */
+/* returned */                            
+KI_dbl_distance            * /*mdist*/,    /* minimum distance */
+KI_tag_list_entity         * /*elist1*/,   /* entity list */
+KI_tag_list_entity         * /*elist2*/,   /* entity list */
+KI_vec_position              /*entpt1*/,   /* point on 1st entity */
+KI_vec_position              /*entpt2*/,   /* point on 2nd entity */
+KI_dbl                       /*parms1*/[], /* parameter/s related to entpt1 */
+KI_dbl                       /*parms2*/[], /* parameter/s related to entpt2 */
+KI_tag_list_int            * /*props1*/,   /* properties ( 1st entity) */
+KI_int_nitems              * /*nprop1*/,   /* no of properties in props1 */
+KI_tag_list_int            * /*props2*/,   /* properties (2nd entity) */
+KI_int_nitems              * /*nprop2*/,   /* no of properties in props2 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLENEX
+(
+/* received */                            
+KI_tag_list_entity         * /*ents1*/,    /* 1st entity/list of entities */
+KI_tag_list_entity         * /*ents2*/,    /* 2nd entity/list of entities */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_clop                  /*iopts*/[],  /* options */
+KI_tag_list_dbl              /*optdta*/[], /* option data */
+/* returned */                            
+KI_int_nitems              * /*nmins*/,    /* number of minima returned */
+KI_tag_list_dbl            * /*min_dists*/, /* distances */
+KI_tag_list_list           * /*elists1*/,  /* lists of entities */
+KI_tag_list_list           * /*elists2*/,  /* lists of entities */
+KI_tag_list_list           * /*entpts1*/,  /* point on 1st entity */
+KI_tag_list_list           * /*entpts2*/,  /* point on 2nd entity */
+KI_tag_list_list           * /*parms1*/,   /* parameter/s related to entpt1 */
+KI_tag_list_list           * /*parms2*/,   /* parameter/s related to entpt2 */
+KI_tag_list_list           * /*props1*/,   /* properties ( 1st entity) */
+KI_tag_list_int            * /*nprops1*/,  /* no of properties in props1 */
+KI_tag_list_list           * /*props2*/,   /* properties (2nd entity) */
+KI_tag_list_int            * /*nprops2*/,  /* no of properties in props2 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLPTEN
+(
+/* received */                            
+KI_vec_position              /*point*/,    /* point */
+KI_tag_list_entity         * /*ents*/,     /* entities */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_clop                  /*iopts*/[],  /* options */
+KI_tag_list_dbl              /*optdta*/[], /* option data */
+/* returned */                            
+KI_dbl_distance            * /*mdist*/,    /* minimum distance */
+KI_tag_list_entity         * /*elist*/,    /* entity list */
+KI_vec_position              /*epoint*/,   /* point on entity */
+KI_dbl                       /*csparm*/[], /* curve or surface parameters */
+KI_tag_list_int            * /*props*/,    /* properties */
+KI_int_nitems              * /*nprops*/,   /* no. of properties */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLPTEX
+(
+/* received */                            
+KI_vec_position              /*point*/,    /* point */
+KI_tag_list_entity         * /*ents*/,     /* entity/list of entities */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_clop                  /*iopts*/[],  /* options */
+KI_tag_list_dbl              /*optdta*/[], /* option data */
+/* returned */                            
+KI_int_nitems              * /*nmins*/,    /* number of minima returned */
+KI_tag_list_dbl            * /*min_dists*/, /* distances */
+KI_tag_list_list           * /*elists*/,   /* lists of entities */
+KI_tag_list_list           * /*entpts*/,   /* point on entity */
+KI_tag_list_list           * /*parms*/,    /* parameter/s related to entity */
+KI_tag_list_list           * /*props*/,    /* properties ( 1st entity) */
+KI_tag_list_int            * /*nprops*/,   /* no of properties in props */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CLPTFA
+(
+/* received */                            
+KI_vec_position              /*point*/,    /* point */
+KI_tag_face                * /*face*/,     /* face */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_clop                  /*iopts*/[],  /* estimation options */
+KI_tag_list                  /*optdta*/[], /* option data */
+/* returned */                            
+KI_vec_position              /*fpoint*/,   /* Point on face */
+KI_dbl_parameter             /*params*/[], /* surface parameters at 'point' */
+KI_tag_entity              * /*topol*/,    /* topology at closest point */
+KI_cod_logical             * /*ortho*/,    /* indicates whether soln orthogonal */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void COFEAT
+(
+/* received */                            
+KI_tag_feature             * /*featre*/,   /* feature */
+/* returned */                            
+KI_int_nitems              * /*nitems*/,   /* number of items in feature */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void COLIST
+(
+/* received */                            
+KI_tag_list                * /*list*/,     /* list in which to count items */
+/* returned */                            
+KI_int_nitems              * /*nitems*/,   /* number of items in list */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void COMENT
+(
+/* received */                            
+KI_int_nitems              * /*nchars*/,   /* number of chars in 'coment' */
+KI_chr_string                /*coment*/[], /* comment string */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void COPYEN
+(
+/* received */                            
+KI_tag_entity              * /*oldent*/,   /* entity to be copied */
+/* returned */                            
+KI_tag_entity              * /*newent*/,   /* copy of entity */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRATDF
+(
+/* received */                            
+KI_int_nitems              * /*namlen*/,   /* length of 'name' */
+KI_chr_string                /*name*/[],   /* name of attribute type */
+KI_int_nitems              * /*nopts*/,    /* number of option codes */
+KI_cod_atop                  /*option*/[], /* array of option codes */
+KI_tag_list                  /*opdata*/[], /* corresponding lists of data */
+/* returned */                            
+KI_tag_attrib_def          * /*type*/,     /* attribute type */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void CRBSPC
+(
+/* received */                            
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_dbl_coefficients          /*ctrl*/[],   /* control points */
+KI_dbl_knots                 /*knots*/[],  /* knot vector */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_papr                  /*props*/[],  /* array of curve properties */
+/* returned */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRBSPS
+(
+/* received */                            
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*uorder*/,   /* order of surface in u */
+KI_int_order               * /*vorder*/,   /* order of surface in v */
+KI_int_nitems              * /*ncol*/,     /* number of cols of control points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of control points */
+KI_dbl_coefficients          /*ctrl*/[],   /* control points */
+KI_dbl_knots                 /*uknots*/[], /* knot vector for the rows */
+KI_dbl_knots                 /*vknots*/[], /* knot vector for the columns */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_papr                  /*props*/[],  /* array of surface properties */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRBXSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of base of box */
+KI_vec_axis                  /*axis*/,     /* axis of box */
+KI_dbl_distance            * /*width*/,    /* width of box */
+KI_dbl_distance            * /*length*/,   /* length of box */
+KI_dbl_distance            * /*height*/,   /* height of box */
+/* returned */                            
+KI_tag_body                * /*box1*/,     /* box */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRBYGE
+(
+/* received */                            
+KI_tag_geometry            * /*geom*/,     /* curve or surface */
+KI_int_nitems              * /*nopts*/,    /* number of options supplied */
+KI_cod_cbop                  /*popts*/[],  /* array of options */
+KI_tag_list                  /*pdata*/[],  /* array of option data */
+/* returned */                            
+KI_tag_body                * /*by*/,       /* wire or sheet body */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRCAPO
+(
+/* received */                            
+double                     * /*x*/,        /* X coordinate value */
+double                     * /*y*/,        /* Y coordinate value */
+double                     * /*z*/,        /* Z coordinate value */
+/* returned */                            
+KI_tag_point               * /*point*/,    /* cartesian point */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRCICU
+(
+/* received */                            
+KI_vec_centre                /*centre*/,   /* centre of circle */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+KI_dbl_radius              * /*radius*/,   /* radius of circle */
+/* returned */                            
+KI_tag_curve               * /*circle*/,   /* circular curve */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRCMPC
+(
+/* received */                            
+KI_int_nitems              * /*nbcs*/,     /* number of B-curves */
+KI_tag_b_curve               /*bcs*/[],    /* array of B-curves */
+/* returned */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRCOSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of base of cone */
+KI_vec_axis                  /*axis*/,     /* axis of cone */
+KI_dbl_radius              * /*basrad*/,   /* radius of base of cone */
+KI_dbl_radius              * /*toprad*/,   /* radius of top of cone */
+KI_dbl_distance            * /*height*/,   /* height of cone */
+/* returned */                            
+KI_tag_body                * /*cone*/,     /* cone */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRCOSU
+(
+/* received */                            
+KI_vec_centre                /*posn*/,     /* position on cone axis */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+KI_dbl_radius              * /*radpsn*/,   /* radius of cone at 'posn' */
+KI_dbl_angle               * /*angle*/,    /* half-angle of cone ( radians ) */
+/* returned */                            
+KI_tag_surface             * /*cone*/,     /* conical surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRCPCU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /*  Underlying surface. */
+KI_cod_papr                * /*uorv*/,     /*  Constant parameter. */
+KI_dbl                     * /*param*/,    /*  Constant parameter value. */
+/* returned */                            
+KI_tag_curve               * /*curve*/,    /*  Constant parameter line curve. */
+KI_cod_error               * /*ifail*/     /*  failure indicator. */
+);
+
+KI_linkage_m void CRCUPC
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* general curve */
+KI_vec_position              /*bounds*/[], /* start and end of curve */
+/* returned */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_int_nitems              * /*nseg*/,     /* number of segments used */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRCYSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of base of cylinder */
+KI_vec_axis                  /*axis*/,     /* axis of cylinder */
+KI_dbl_radius              * /*radius*/,   /* radius of cylinder */
+KI_dbl_distance            * /*height*/,   /* height of cylinder */
+/* returned */                            
+KI_tag_body                * /*cylind*/,   /* cylinder */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRCYSU
+(
+/* received */                            
+KI_vec_position              /*posn*/,     /* position on axis */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+KI_dbl_radius              * /*radius*/,   /* cylinder radius */
+/* returned */                            
+KI_tag_surface             * /*cylind*/,   /* cylindrical surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREASS
+(
+/* received */                            
+KI_cod_tyas                * /*type*/,     /* type of assembly to create */
+/* returned */                            
+KI_tag_assembly            * /*assemb*/,   /* new assembly */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CREATT
+(
+/* received */                            
+KI_tag_list_entity         * /*owners*/,   /* entity or list of entities to */
+                                           /* which the attribute is to be */
+                                           /* attached */
+KI_tag_attrib_def          * /*type*/,     /* type of attribute */
+KI_int_nitems              * /*nints*/,    /* number of integer values */
+int                          /*ivals*/[],  /* array of integer values */
+KI_int_nitems              * /*nreals*/,   /* number of real values */
+double                       /*rvals*/[],  /* array of real values */
+KI_int_nitems              * /*nstrng*/,   /* number of strings */
+KI_int_nitems                /*slens*/[],  /* array of string lengths */
+KI_int_nitems              * /*nchars*/,   /* number of characters */
+KI_chr_string                /*chars*/[],  /* array of data for string fields */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void CREFEA
+(
+/* received */                            
+KI_cod_tyfe                * /*type*/,     /* type of feature */
+KI_tag_part                * /*part*/,     /* part which will own feature */
+/* returned */                            
+KI_tag_feature             * /*featre*/,   /* newly created feature */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREINS
+(
+/* received */                            
+KI_tag_assembly            * /*owner*/,    /* owning assembly of new instance */
+KI_tag_part                * /*part*/,     /* part to be instanced */
+KI_tag_transform           * /*transf*/,   /* transform of instance */
+KI_cod_tyin                * /*type*/,     /* type of instance */
+/* returned */                            
+KI_tag_instance            * /*instnc*/,   /* new instance */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRELCU
+(
+/* received */                            
+KI_vec_centre                /*centre*/,   /* centre of ellipse */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+KI_dbl_radius              * /*majrad*/,   /* major radius */
+KI_vec_axis                  /*majaxi*/,   /* major axis */
+KI_dbl_radius              * /*minrad*/,   /* minor radius */
+/* returned */                            
+KI_tag_curve               * /*elipse*/,   /* elliptical curve */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREQSC
+(
+/* received */                            
+KI_dbl_sc_fact             * /*scale*/,    /* scaling factor */
+KI_vec_position              /*centre*/,   /* centre of scaling */
+/* returned */                            
+KI_tag_transform           * /*transf*/,   /* equal scaling transformation */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREREF
+(
+/* received */                            
+KI_vec_position              /*posn*/,     /* position on plane */
+KI_vec_normal                /*normal*/,   /* normal direction */
+/* returned */                            
+KI_tag_transform           * /*transf*/,   /* reflection transformation */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREROT
+(
+/* received */                            
+KI_vec_position              /*posn*/,     /* position on axis */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+KI_dbl_angle               * /*angle*/,    /* rotation angle (radians) */
+/* returned */                            
+KI_tag_transform           * /*transf*/,   /* rotation transformation */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRETFM
+(
+/* received */                            
+double                       /*matrix*/[], /* transformation components */
+/* returned */                            
+KI_tag_transform           * /*transf*/,   /* the transformation */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRETRA
+(
+/* received */                            
+KI_vec_direction             /*direct*/,   /* direction */
+KI_dbl                     * /*dist*/,     /* distance */
+/* returned */                            
+KI_tag_transform           * /*transf*/,   /* translation transformation */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CREXSU
+(
+/* received */                            
+KI_tag_curve               * /*profil*/,   /* curve to be extruded */
+KI_vec_direction             /*direct*/,   /* extrusion direction vector */
+KI_cod_logical             * /*smplfy*/,   /* simplification flag */
+/* returned */                            
+KI_tag_surface             * /*extsur*/,   /* resulting extruded surface */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void CRFASU
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face to be fixed */
+/* returned */                            
+KI_cod_tysu                * /*sutype*/,   /* type of surface fixed to face */
+KI_tag_surface             * /*surfac*/,   /* new surface fixed to face */
+KI_cod_rtlo                * /*state*/,    /* state of the body */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRFGCU
+(
+/* received */                            
+KI_int_nchars              * /*keylen*/,   /* Length of curve key */
+KI_chr_key                   /*key*/[],    /* curve key */
+KI_int_nitems              * /*nspace*/,   /* Space required by foreign curve */
+                                           /* (specified in doubles) */
+KI_int_nitems              * /*nints*/,    /* Number of integer values */
+int                          /*ivals*/[],  /* Array of integer values */
+KI_int_nitems              * /*nreals*/,   /* Number of real values */
+double                       /*rvals*/[],  /* Array of real values */
+/* returned */                            
+KI_tag_curve               * /*curve*/,    /* curve. */
+KI_cod_error               * /*ifail*/     /* Failure indicator */
+);
+
+KI_linkage_m void CRFGSU
+(
+/* received */                            
+KI_int_nchars              * /*keylen*/,   /* Length of surface key */
+KI_chr_key                   /*key*/[],    /* Surface key */
+KI_int_nitems              * /*nspace*/,   /* Space required by foreign surface */
+                                           /* (specified in doubles) */
+KI_int_nitems              * /*nints*/,    /* Number of integer values */
+int                          /*ivals*/[],  /* Array of integer values */
+KI_int_nitems              * /*nreals*/,   /* Number of real values */
+double                       /*rvals*/[],  /* Array of real values */
+/* returned */                            
+KI_tag_surface             * /*surf*/,     /* surface. */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRINCU
+(
+/* received */                            
+KI_tag_surface             * /*surf1*/,    /* surfaces to be */
+KI_tag_surface             * /*surf2*/,    /* intersected */
+KI_dbl_box                   /*intbox*/[], /* box of interest */
+/* returned */                            
+KI_tag_list_curve          * /*curves*/,   /* list of curves */
+KI_int_nitems              * /*ncurve*/,   /* number of curves returned */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRKNPA
+(
+/* received */                            
+KI_tag_list_body           * /*bods*/,     /* list of bodies */
+/* returned */                            
+KI_tag_list_edge           * /*eds1*/,     /* list of edges forming pattern */
+KI_tag_list_edge           * /*eds2*/,     /* list of edges forming pattern */
+KI_int_nitems              * /*neds*/,     /* number of edge pairs in pattern */
+KI_tag_list_body           * /*negs*/,     /* list of bodies to be negated */
+KI_int_nitems              * /*nnegs*/,    /* number of bodies in 'negs' */
+KI_tag_list_body           * /*over*/,     /* list of bodies with no edges */
+                                           /* in the pattern */
+KI_int_nitems              * /*nover*/,    /* number of bodies in 'over' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRLFPS
+(
+/* received */                            
+KI_int_nitems              * /*nbcs*/,     /* number of curves supplied */
+KI_tag_b_curve               /*bcs*/[],    /* array of B-curves */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_papr                  /*props*/[],  /* array of surface properties */
+KI_tag_list                  /*pdata*/[],  /* array of tags of data lists */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRLICU
+(
+/* received */                            
+KI_vec_position              /*posn*/,     /* position on line */
+KI_vec_direction             /*direct*/,   /* line direction */
+/* returned */                            
+KI_tag_curve               * /*line*/,     /* linear curve */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRLIST
+(
+/* received */                            
+KI_cod_tyli                * /*lstype*/,   /* type of list to be created, */
+                                           /* from range TYLI00 */
+/* returned */                            
+KI_tag_list                * /*list*/,     /* new list */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRMINO
+(
+/* returned */                            
+KI_tag_body                * /*minob*/,    /* new minimum object */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CROFSU
+(
+/* received */                            
+KI_tag_surface             * /*undrly*/,   /* underlying surface */
+double                     * /*dstnce*/,   /* offset distance */
+/* returned */                            
+KI_tag_surface             * /*offsur*/,   /* offset surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRPLSU
+(
+/* received */                            
+KI_vec_position              /*posn*/,     /* position on plane */
+KI_vec_normal                /*normal*/,   /* normal direction */
+/* returned */                            
+KI_tag_surface             * /*plane*/,    /* planar surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRPRSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of prism */
+KI_vec_axis                  /*axis*/,     /* axis of prism */
+KI_dbl_radius              * /*radius*/,   /* radius of enclosing cylinder */
+int                        * /*nsides*/,   /* number of sides */
+KI_dbl_distance            * /*height*/,   /* height of prism */
+/* returned */                            
+KI_tag_body                * /*prism*/,    /* prism */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRPWPC
+(
+/* received */                            
+KI_int_dimension           * /*dim*/,      /* dimension of defining vectors */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nsegs*/,    /* number of segments in curve */
+KI_dbl_coefficients          /*coeffs*/[],
+                                           /* vectors defining the curve */
+KI_cod_slba                * /*basis*/,    /* representation method */
+/* returned */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRPWPS
+(
+/* received */                            
+KI_int_dimension           * /*dim*/,      /* dimension of defining vectors */
+KI_int_order               * /*uorder*/,   /* order of surface in u */
+KI_int_order               * /*vorder*/,   /* order of surface in v */
+KI_int_nitems              * /*ncol*/,     /* number of columns of patches */
+KI_int_nitems              * /*nrow*/,     /* number of rows of patches */
+KI_dbl_coefficients          /*coeffs*/[],
+                                           /* vectors defining the surface */
+KI_cod_slba                * /*basis*/,    /* representation method */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRRVSU
+(
+/* received */                            
+KI_tag_curve               * /*profil*/,   /* curve to revolve */
+KI_vec_position              /*point*/,    /* point on revolution axis */
+KI_vec_axis                  /*direct*/,   /* direction of revolution axis */
+KI_int_nitems              * /*nopts*/,    /* number of options supplied */
+KI_cod_crop                  /*opts*/[],   /* array of options */
+KI_tag_list                  /*optdta*/[], /* array of option data */
+/* returned */                            
+KI_tag_surface             * /*revsur*/,   /* resulting surface of revolution */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void CRSEPS
+(
+/* received */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve to sweep */
+KI_vec_displacement          /*path*/,     /* translation vector */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* result of sweep */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRSHFA
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* faces to use in sheet */
+/* returned */                            
+KI_tag_body                * /*sheet*/,    /* new body */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRSIPS
+(
+/* received */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve to swing */
+KI_vec_position              /*point*/,    /* point on axis of rotation */
+KI_vec_axis                  /*direct*/,   /* direction of axis of rotation */
+KI_dbl_angle               * /*angle*/,    /* angle of swing (in radians) */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* result of swing */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRSOFA
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* face(s) to copy into new body(s) */
+KI_cod_sllo                * /*action*/,   /* type of action to mend wounds */
+                                           /*   SLLOCP => cap */
+                                           /*   SLLOGR => grow */
+                                           /*   SLLOGP => grow from parent */
+                                           /*   SLLORB => leave rubber */
+/* returned */                            
+KI_tag_list_body           * /*bodys*/,    /* new body(s) */
+KI_int_nitems              * /*nbodys*/,   /* number of new bodies */
+KI_tag_list_int            * /*sbodys*/,   /* state(s) of the body(s) */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRSPCU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* basis surface for SP-curve */
+int                        * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_dbl_coefficients          /*ctrl*/[],   /* control points */
+KI_dbl_knots                 /*knots*/[],  /* knot vector */
+KI_cod_logical             * /*period*/,   /* periodic flag */
+KI_cod_logical             * /*split*/,    /* split flag */
+/* returned */                            
+KI_int_nitems              * /*nspc*/,     /* number of SP-curves returned */
+KI_tag_list_curve          * /*spc*/,      /* SP-curves */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRSPPC
+(
+/* received */                            
+KI_int_nitems              * /*npts*/,     /* number of points supplied */
+KI_vec_position              /*pts*/[],    /* array of points to spline */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_papr                  /*props*/[],  /* array of curve properties */
+KI_tag_list                  /*pdata*/[],  /* array of tags of data lists */
+/* returned */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRSPPS
+(
+/* received */                            
+KI_int_nitems              * /*ncol*/,     /* number of columns of points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of points */
+KI_vec_position              /*pts*/[],    /* mesh of points to spline */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_papr                  /*props*/[],  /* array of surface properties */
+KI_tag_list                  /*pdata*/[],  /* array of tags of data lists */
+/* returned */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRSPSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of sphere */
+KI_dbl_radius              * /*radius*/,   /* radius of sphere */
+/* returned */                            
+KI_tag_body                * /*sphere*/,   /* sphere */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRSPSU
+(
+/* received */                            
+KI_vec_centre                /*centre*/,   /* centre position */
+KI_dbl_radius              * /*radius*/,   /* radius of sphere */
+/* returned */                            
+KI_tag_surface             * /*sphere*/,   /* new spherical surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRSPTC
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* surface upon which 't_cu' lies */
+KI_tag_curve               * /*t_cu*/,     /* trimmed curve to approximate */
+double                     * /*tol*/,      /* required tolerance */
+KI_cod_logical             * /*degens*/,   /* create degenerate SP-Curves */
+KI_cod_logical             * /*sense*/,    /* SP_Curve sense */
+/* returned */                            
+KI_int_nitems              * /*nspc*/,     /* number of SP-curves returned */
+KI_tag_list_curve          * /*spc*/,      /* SP-curves */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRTOBY
+(
+/* received */                            
+KI_cod_byty                * /*b_type*/,   /* body type */
+KI_tag_list_int            * /*types*/,    /* topology types */
+KI_tag_list_int            * /*ids*/,      /* integer id's of entities */
+KI_tag_list_list           * /*childs*/,   /* children of entities */
+/* returned */                            
+KI_tag_list_topology       * /*topols*/,   /* tags of created entities */
+KI_cod_rtto                * /*retcod*/,   /* fault found */
+KI_int_id                  * /*failid*/,   /* id of faulty  entity */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRTOSO
+(
+/* received */                            
+KI_vec_position              /*centre*/,   /* centre of torus */
+KI_vec_axis                  /*axis*/,     /* axis of torus */
+KI_dbl_radius              * /*majrad*/,   /* major radius */
+KI_dbl_radius              * /*minrad*/,   /* minor radius */
+/* returned */                            
+KI_tag_body                * /*torus*/,    /* torus */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void CRTOSU
+(
+/* received */                            
+KI_vec_centre                /*centre*/,   /* centre position */
+KI_vec_axis                  /*axis*/,     /* axis direction */
+double                     * /*majrad*/,   /* annular radius */
+KI_dbl_radius              * /*minrad*/,   /* radius of generating circle */
+/* returned */                            
+KI_tag_surface             * /*torus*/,    /* toroidal surface */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRTRCU
+(
+/* received */                            
+KI_tag_curve               * /*basis_curve*/, /* underlying basis curve */
+KI_dbl_parameter           * /*parm_1*/,   /* start parameter */
+KI_dbl_parameter           * /*parm_2*/,   /* end parameter */
+/* returned */                            
+KI_tag_curve               * /*trimmed_curve*/, /* trimmed basis curve */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void CRTSFA
+(
+/* received */                            
+KI_tag_surface             * /*sf*/,       /* surface of face */
+KI_cod_logical             * /*sense*/,    /* sense of face */
+KI_tag_list_list           * /*curves*/,   /* curves, one list for each */
+                                           /* loop of face */
+double                     * /*etol*/,     /* 3-space distance tolerance, */
+                                           /* stored on each edge */
+double                     * /*ftol*/,     /* 3-space distance tolerance */
+                                           /* stored on the face */
+KI_int_nitems              * /*nopts*/,    /* number of checking options */
+KI_cod_tsop                  /*chopts*/[], /* checking options */
+/* returned */                            
+KI_tag_body                * /*body*/,     /* sheet body created */
+KI_tag_face                * /*face*/,     /* face of 'by' */
+KI_cod_rtts                * /*state*/,    /* state code */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void DEFCON
+(
+/* received */                            
+KI_tag_topology            * /*parent*/,   /* parent entity */
+KI_tag_entity              * /*child*/,    /* dependent entity */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DEHOSH
+(
+/* received */                            
+KI_tag_body                * /*sheet*/,    /* Sheet body */
+KI_tag_list_loop           * /*loops*/,    /* loops to be deleted */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DELCON
+(
+/* received */                            
+KI_tag_topology            * /*parent*/,   /* parent entity */
+KI_tag_entity              * /*child*/,    /* dependent entity */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DELENT
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity to delete */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DELFAS
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* face(s) to be deleted */
+KI_int_nitems              * /*nopts*/,    /* number of actions in 'optdta' */
+KI_cod_sllo                  /*optdta*/[], /* type of action to mend wounds */
+                                           /*   SLLOCP => cap */
+                                           /*   SLLOGR => grow only */
+                                           /*   SLLOGS => allow shrinkage */
+                                           /*   SLLORB => leave rubber */
+                                           /*   SLLOLT => loops together */
+                                           /*   SLLOLI => loops independent */
+/* returned */                            
+KI_tag_list_body           * /*bodys*/,    /* remaining body(s) */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies */
+KI_tag_list_int            * /*sbodys*/,   /* state(s) of the body(s) */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DELIST
+(
+/* received */                            
+KI_tag_list                * /*list*/,     /* list to delete */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DELIVL
+(
+/* received */                            
+KI_tag_list                * /*list*/,     /* list from which to delete items */
+KI_int_index               * /*startx*/,   /* position in list at which to */
+                                           /* start deleting items */
+KI_int_nitems              * /*nvals*/,    /* number of items to delete */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void DELSEN
+(
+/* received */                            
+KI_tag_geometry            * /*gm*/,       /* geometry to delete */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DETGEO
+(
+/* received */                            
+KI_tag_topology            * /*topol*/,    /* topology to detach from */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void DLENFE
+(
+/* received */                            
+KI_tag_feature             * /*featre*/,   /* feature */
+KI_tag_entity              * /*entity*/,   /* entity to be removed */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void DLORPH
+(
+/* received */                            
+KI_cod_ty                  * /*entype*/,   /* type of orphans to be deleted, */
+                                           /* TYENGE or TYADLI */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENBXEN
+(
+/* received */                            
+KI_tag_topology            * /*entity*/,   /* entity whose box is required */
+/* returned */                            
+KI_dbl_box                   /*entbox*/[], /* box containing entity */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENBYTY
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body */
+/* returned */                            
+KI_cod_enby                * /*bdytyp*/,   /* type-code of body, */
+                                           /* from range ENBY00 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENCONT
+(
+/* received */                            
+KI_tag_point               * /*point*/,    /* point */
+KI_tag_entity              * /*entity*/,   /* entity */
+/* returned */                            
+KI_cod_encl                * /*enclos*/,   /* enclosure code */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENCUPA
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* Curve for enquiry */
+/* returned */                            
+KI_dbl                       /*range*/[],  /* Parameter range */
+KI_cod_papr                  /*bounds*/[], /* Types of bound */
+KI_tag_list_int            * /*props*/,    /* Parametrisation properties */
+KI_int_nitems              * /*nprops*/,   /* Number of properties */
+KI_cod_error               * /*ifail*/     /* Failure code */
+);
+
+KI_linkage_m void ENDFAT
+(
+/* received */                            
+KI_tag_attribute           * /*attrib*/,   /* attribute */
+/* returned */                            
+KI_tag_attrib_def          * /*type*/,     /* attribute type */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void ENDFNM
+(
+/* received */                            
+KI_int_nitems              * /*namlen*/,   /* length of 'name' */
+KI_chr_string                /*name*/[],   /* name of attribute type */
+/* returned */                            
+KI_tag_attrib_def          * /*type*/,     /* attribute type */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void ENDIPE
+(
+/* received */                            
+KI_tag_geometry            * /*geom*/,     /* free form geometry */
+KI_cod_padi                * /*disc*/,     /* discontinuities to return */
+/* returned */                            
+KI_int_nitems              * /*ndisc*/,    /* number of discontinuities found */
+KI_tag_list_int            * /*uorv*/,     /* list of discontinuity types */
+KI_tag_list_dbl            * /*param*/,    /* list of parameters */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENEDTY
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge */
+/* returned */                            
+KI_cod_ened                * /*edtype*/,   /* type-code of edge, */
+                                           /* from range ENED00 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENENTY
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity */
+KI_int_nitems              * /*ltypes*/,   /* maximum length of types array */
+/* returned */                            
+KI_cod_ty                    /*types*/[],  /* type-codes of entity */
+KI_int_nitems              * /*ntypes*/,   /* number of type-codes returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENEQGE
+(
+/* received */                            
+KI_tag_geometry            * /*geom1*/,    /* first geometric item */
+KI_tag_geometry            * /*geom2*/,    /* second geometric item */
+/* returned */                            
+KI_cod_logical             * /*same*/,     /* result. KI_true if same */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENEXEN
+(
+/* received */                            
+KI_tag_topology            * /*entity*/,   /* face or edge */
+KI_vec_direction             /*dir1*/,     /* first direction */
+KI_vec_direction             /*dir2*/,     /* second direction */
+KI_vec_direction             /*dir3*/,     /* third direction */
+/* returned */                            
+KI_vec_position              /*posn*/,     /* position of extreme point */
+KI_tag_topology            * /*ext*/,      /* face, edge or vertex on */
+                                           /* which extreme lies */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENFAPR
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face */
+/* returned */                            
+KI_cod_logical             * /*rectan*/,   /* parametrically rectangular flag */
+KI_dbl                       /*urange*/[], /* Parameter range in u */
+KI_dbl                       /*vrange*/[], /* Parameter range in v */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENLOTY
+(
+/* received */                            
+KI_tag_loop                * /*loop*/,     /* loop */
+/* returned */                            
+KI_cod_enlo                * /*lptype*/,   /* type-code of loop, */
+                                           /* from range ENLO00 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENPAPC
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve */
+KI_vec_position              /*coords*/,   /* coordinates of point on curve */
+/* returned */                            
+KI_dbl                     * /*t*/,        /* parameter of 'coords' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENPAPS
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* surface */
+KI_vec_position              /*coords*/,   /* coordinates of point on surface */
+/* returned */                            
+KI_dbl                     * /*u*/,        /* u parameter of 'coords' */
+KI_dbl                     * /*v*/,        /* v parameter of 'coords' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENPBEN
+(
+/* received */                            
+KI_tag_topology            * /*entity*/,   /* entity whose parametric box */
+                                           /* is required */
+/* returned */                            
+KI_dbl                       /*ulimit*/[], /* u parametric limits */
+KI_dbl                       /*vlimit*/[], /* v parametric limits */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENPIFA
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face */
+KI_int_nitems              * /*nparms*/,   /* number of parameter pairs */
+double                       /*params*/[], /* u v parameter pairs */
+KI_int_nitems              * /*npvecs*/,   /* number of pvecs */
+double                       /*pvecs*/[],  /* pvecs */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_pfop                  /*opts*/[],   /* options */
+KI_tag_list_entity           /*optdata*/[], /* option data */
+/* returned */                            
+KI_cod_encl                  /*enclos*/[], /* enclosure */
+KI_tag_topology              /*topol*/[],  /* sub topology */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENPOGC
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve enquired of */
+KI_vec_position              /*coords*/,   /* position of interest on curve */
+/* returned */                            
+KI_vec_normal                /*tangnt*/,   /* tangent direction ratio */
+KI_vec_direction             /*prnorm*/,   /* normal direction ratio */
+KI_vec_normal                /*binorm*/,   /* binormal direction ratio */
+KI_dbl_curvature           * /*curvat*/,   /* curvature */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENPOGS
+(
+/* received */                            
+KI_tag_surface             * /*surfac*/,   /* surface being enquired of */
+KI_vec_position              /*coords*/,   /* position of interest on surface */
+/* returned */                            
+KI_vec_normal                /*normal*/,   /* surface normal */
+KI_vec_direction             /*prdir1*/,   /* principal direction1 */
+KI_vec_direction             /*prdir2*/,   /* principal direction2 */
+KI_dbl_curvature           * /*prcur1*/,   /* principal curvature1 */
+KI_dbl_curvature           * /*prcur2*/,   /* principal curvature2 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENPOPC
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve */
+KI_dbl                     * /*t*/,        /* parameter of required point */
+KI_int_nitems              * /*ndrvs*/,    /* number of derivatives required */
+/* returned */                            
+KI_vec_derivatives           /*p*/[],      /* point and derivatives */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENPOPS
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* surface */
+KI_dbl                     * /*u*/,        /* u parameter of required point */
+KI_dbl                     * /*v*/,        /* v parameter of required point */
+KI_int_nitems              * /*nudrvs*/,   /* number of derivs wrt u required */
+KI_int_nitems              * /*nvdrvs*/,   /* number of derivs wrt v required */
+KI_cod_logical             * /*nreq*/,     /* request for normal */
+/* returned */                            
+KI_vec_derivatives           /*p*/[],     
+                                           /* point and derivatives */
+KI_vec_normal                /*norm*/,     /* surface normal */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ENSHTY
+(
+/* received */                            
+KI_tag_shell               * /*shell*/,    /* shell */
+/* returned */                            
+KI_cod_ensh                * /*shtype*/,   /* type-code of shell, */
+                                           /* from range ENSH00 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void ENSUPA
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* Surface for enquiry */
+/* returned */                            
+KI_dbl                       /*urange*/[], /* Parameter range in u */
+KI_dbl                       /*vrange*/[], /* Parameter range in v */
+KI_cod_papr                  /*ubound*/[], /* Types of bound for u */
+KI_cod_papr                  /*vbound*/[], /* Types of bound for v */
+KI_tag_list_int            * /*uprops*/,   /* u parametrisation properties */
+KI_int_nitems              * /*nuprop*/,   /* Number of properties in u */
+KI_tag_list_int            * /*vprops*/,   /* v parametrisation properties */
+KI_int_nitems              * /*nvprop*/,   /* Number of properties in v */
+KI_cod_error               * /*ifail*/     /* Failure code */
+);
+
+KI_linkage_m void ENVETY
+(
+/* received */                            
+KI_tag_vertex              * /*vertex*/,   /*  vertex */
+/* returned */                            
+KI_cod_enve                * /*vetype*/,   /* type-code of vertex, */
+                                           /* from range ENVE00 */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void FIXIDS
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part in which to fix identifiers */
+/* returned */                            
+KI_int_nitems              * /*nfault*/,   /* number of entries in lists */
+KI_tag_list_entity         * /*entys*/,    /* entities with new identifiers */
+KI_tag_list_int            * /*oldids*/,   /* previous identifiers */
+KI_tag_list_int            * /*newids*/,   /* new identifiers */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void FNENFE
+(
+/* received */                            
+KI_tag_feature             * /*featre*/,   /* feature */
+KI_tag_entity              * /*entity*/,   /* entity to be looked for */
+/* returned */                            
+KI_cod_logical             * /*found*/,    /* true if entity is in feature */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void GETMND
+(
+/* received */                            
+KI_int_nchars              * /*keylen*/,   /* length of key */
+KI_chr_key                   /*key*/[],    /* key of part */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_mdop                  /*opts*/[],   /* option codes */
+/* returned */                            
+KI_tag_part                * /*part*/,     /* recovered part */
+KI_tag_list_int            * /*mend*/,     /* tokens describing mends */
+KI_tag_list_int            * /*fault*/,    /* tokens describing faults */
+KI_tag_list_entity         * /*mcomp*/,    /* mended components */
+KI_tag_list_entity         * /*fcomp*/,    /* faulty components */
+KI_int_nitems              * /*nmend*/,    /* number of mends returned */
+KI_int_nitems              * /*nfault*/,   /* number of faults returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void GETMOD
+(
+/* received */                            
+KI_int_nchars              * /*keylen*/,   /* length of key */
+KI_chr_key                   /*key*/[],    /* key of part */
+/* returned */                            
+KI_tag_part                * /*part*/,     /* received part */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void GETSNP
+(
+/* received */                            
+KI_int_nchars              * /*nchars*/,   /* number of characters in filename */
+KI_chr_filename              /*filnam*/[], /* filename for snapshot */
+int                        * /*histfl*/,   /* unused: should be zero */
+KI_cod_logical             * /*statfl*/,   /* true to restore interface params */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void GTINLI
+(
+/* received */                            
+KI_tag_list_int            * /*list*/,     /* list from which to extract items */
+KI_int_index               * /*startx*/,   /* position in list from which first */
+                                           /* value is to be extracted */
+KI_int_nitems              * /*nvals*/,    /* number of values to extract */
+                                           /* from list */
+/* returned */                            
+int                          /*ivals*/[],  /* values extracted from list */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void GTRLLI
+(
+/* received */                            
+KI_tag_list_dbl            * /*list*/,     /* list from which to extract items */
+KI_int_index               * /*startx*/,   /* position in list from which first */
+                                           /* value is to be extracted */
+KI_int_nitems              * /*nvals*/,    /* number of values to extract */
+                                           /* from list */
+/* returned */                            
+double                       /*rvals*/[],  /* values extracted from list */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void GTTGLI
+(
+/* received */                            
+KI_tag_list_tag            * /*list*/,     /* list from which to extract tags */
+KI_int_index               * /*startx*/,   /* position in list from which first */
+                                           /* tag is to be extracted */
+KI_int_nitems              * /*ntags*/,    /* number of tags to extract */
+                                           /* from list */
+/* returned */                            
+KI_tag                       /*tags*/[],   /* values extracted from list */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void HOLLBY
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body to be hollowed */
+KI_dbl                     * /*offset*/,   /* default offset */
+KI_cod_logical             * /*check*/,    /* level of checking required */
+KI_tag_list_face           * /*pierce*/,   /* faces not to be offset */
+KI_tag_list_face           * /*faces*/,    /* faces offset by other amounts */
+KI_tag_list_dbl            * /*dists*/,    /* list of other offset distances */
+KI_dbl_distance            * /*tol*/,      /* maximum applied tolerance */
+KI_int_nitems              * /*mxflts*/,   /* maximum number of entities in badtag */
+/* returned */                            
+KI_tag_list_entity         * /*oldfas*/,   /* list of original faces offset */
+KI_tag_list_entity         * /*newfas*/,   /* list of corresponding new faces */
+KI_tag_list_entity         * /*badtag*/,   /* entities which caused problems */
+KI_cod_rtof                * /*state*/,    /* state of body after hollow */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void IDATEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity in which to look */
+KI_tag_attrib_def          * /*type*/,     /* type of attribute to look for */
+/* returned */                            
+KI_tag_attribute           * /*attrib*/,   /* attribute */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void IDATLS
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity in which to look */
+KI_tag_attrib_def          * /*type*/,     /* type of attribute to look for */
+/* returned */                            
+KI_tag_list_attribute      * /*atlist*/,   /* list of attributes */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void IDATPA
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part in which to look */
+KI_tag_attrib_def          * /*type*/,     /* type of attribute to look for */
+/* returned */                            
+KI_tag_list_attribute      * /*atlist*/,   /* list of attributes */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void IDCCEN
+(
+/* received */                            
+KI_tag_entity              * /*enty1*/,    /* first entity to look in */
+KI_tag_entity              * /*enty2*/,    /* second entity to look in */
+KI_cod_idty                * /*idty*/,     /* type of connection */
+/* returned */                            
+KI_tag_list_entity         * /*entys*/,    /* Returned list of entities */
+KI_int_nitems              * /*nitems*/,   /* Number of returned entities */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDCOEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity to look in */
+KI_cod_ty                  * /*contyp*/,   /* type of desired entities */
+/* returned */                            
+KI_tag_list_entity         * /*entys*/,    /* connected entities found */
+KI_int_nitems              * /*nentys*/,   /* number found */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDCOFE
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge */
+/* returned */                            
+KI_tag_curve               * /*curve*/,    /* curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDENID
+(
+/* received */                            
+KI_tag_part                * /*contxt*/,   /* entity giving context for search */
+KI_int_id                  * /*id*/,       /* id of required entity */
+KI_cod_ty                  * /*srtype*/,   /* type of required entity */
+                                           /* ( one of TYTOIN, TYTORG, TYTOSH, */
+                                           /*  TYTOFA, TYTOLO, TYTOED, TYTOVX, */
+                                           /*  TYGESU, TYGECU, TYGEPT, TYGETF, */
+                                           /*  TYADAT, TYADLI, TYADFE ) */
+/* returned */                            
+KI_tag_entity              * /*entity*/,   /* required entity */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void IDFSEN
+(
+/* received */                            
+KI_tag_body                * /*target*/,   /* target body */
+KI_tag_body                * /*tool*/,     /* tool body */
+KI_tag_list_edge           * /*targed*/,   /* list of common edges on target */
+KI_tag_list_edge           * /*tooled*/,   /* list of common edges on tool */
+KI_tag_list_vertex         * /*targvx*/,   /* list of common points on target */
+KI_tag_list_vertex         * /*toolvx*/,   /* list of common points on tool */
+KI_int_nitems              * /*nopts*/,    /* number of options */
+KI_cod_idop                  /*opts*/[],   /* option codes */
+KI_tag_list_topology       * /*topol*/,    /* topology in selected facesets */
+/* returned */                            
+KI_tag_list_list           * /*targsu*/,   /* surviving facesets on target */
+KI_tag_list_list           * /*toolsu*/,   /* surviving facesets on tool */
+KI_tag_list_edge           * /*targbo*/,   /* bounds of facesets on target */
+KI_tag_list_edge           * /*toolbo*/,   /* bounds of facesets on tool */
+KI_tag_list_list           * /*targrj*/,   /* rejected facesets on target */
+KI_tag_list_list           * /*toolrj*/,   /* rejected facesets on tool */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void IDKYPA
+(
+/* received */                            
+KI_int_nchars              * /*keylen*/,   /* length of key */
+KI_chr_key                   /*key*/[],    /* key of part to find */
+/* returned */                            
+KI_tag_list_part           * /*parts*/,    /* parts found with given key */
+KI_tag_list_int            * /*states*/,   /* states of parts found */
+KI_int_nitems              * /*nparts*/,   /* number of parts found */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDLSID
+(
+/* received */                            
+KI_tag_part                * /*contxt*/,   /* entity giving context for search */
+KI_tag_list_int            * /*ids*/,      /* ids of required entities */
+KI_cod_ty                  * /*srtype*/,   /* type of required entities */
+                                           /* ( one of TYTOIN, TYTORG, TYTOSH, */
+                                           /*  TYTOFA, TYTOLO, TYTOED, TYTOVX, */
+                                           /*  TYGESU, TYGECU, TYGEPT, TYGETF, */
+                                           /*  TYADAT, TYADLI, TYADFE ) */
+/* returned */                            
+KI_tag_list_entity         * /*entys*/,    /* required entities */
+KI_int_nitems              * /*nitems*/,   /* number of entries in 'entys' */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void IDNCEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity to look in */
+KI_cod_ty                  * /*contyp*/,   /* type of desired entities */
+/* returned */                            
+KI_int_nitems              * /*nentys*/,   /* number of entities found */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDPOFV
+(
+/* received */                            
+KI_tag_vertex              * /*vertex*/,   /* vertex */
+/* returned */                            
+KI_tag_point               * /*point*/,    /* point */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDSCEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity to look in */
+KI_cod_ty                  * /*contyp*/,   /* type of desired entity */
+/* returned */                            
+KI_tag_entity              * /*conent*/,   /* entity found */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDSCLS
+(
+/* received */                            
+KI_tag_list_entity         * /*entys*/,    /* entities to look in */
+KI_cod_ty                  * /*contyp*/,   /* type of desired entity */
+/* returned */                            
+KI_tag_list_entity         * /*conent*/,   /* entities found */
+KI_int_nitems              * /*nitems*/,   /* Number of items returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IDSOFF
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /*  face */
+/* returned */                            
+KI_tag_surface             * /*surfac*/,   /* surface */
+KI_cod_logical             * /*revers*/,   /* true if face normal */
+                                           /* opposed to surface normal */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void IMPRNT
+(
+/* received */                            
+KI_tag_list_entity         * /*target*/,   /* target body or list of faces */
+KI_tag_list_entity         * /*tool*/,     /* tool body or list of faces */
+KI_int_nitems              * /*nopts*/,    /* number of imprinting options */
+KI_cod_imop                  /*opts*/[],   /* option codes */
+/* returned */                            
+KI_tag_list_edge           * /*targed*/,   /* corresponding edges on target */
+KI_tag_list_edge           * /*tooled*/,   /* corresponding edges on tool */
+KI_int_nitems              * /*nedges*/,   /* number of edges */
+KI_tag_list_vertex         * /*targvx*/,   /* corresponding vertices on target */
+KI_tag_list_vertex         * /*toolvx*/,   /* corresponding vertices on tool */
+KI_int_nitems              * /*nverts*/,   /* number of vertices */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void INCUCU
+(
+/* received */                            
+KI_tag_curve               * /*cu1*/,      /* curve 1 */
+KI_vec_position              /*bound1*/[], /* start and end of curve 1 */
+KI_tag_curve               * /*cu2*/,      /* curve 2 */
+KI_vec_position              /*bound2*/[], /* start and end of curve 2 */
+KI_tag_surface             * /*surf*/,     /* surface containing both curves */
+KI_dbl_box                   /*intbox*/[], /* box of interest */
+/* returned */                            
+KI_tag_list_dbl            * /*intpts*/,   /* points of intersection */
+KI_tag_list_dbl            * /*ipars1*/,   /* parameters of intersections */
+                                           /* on 'cu1' */
+KI_tag_list_dbl            * /*ipars2*/,   /* parameters of intersections */
+                                           /* on 'cu2' */
+KI_tag_list_int            * /*incods*/,   /* tokens describing intersections */
+KI_int_nitems              * /*nintpt*/,   /* number of points returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void INCUFA
+(
+/* received */                            
+KI_tag_curve               * /*cu*/,       /* curve */
+KI_vec_position              /*bound*/[],  /* start and end of curve */
+KI_tag_face                * /*face*/,     /* face */
+/* returned */                            
+KI_tag_list_dbl            * /*intpts*/,   /* points of intersection */
+KI_tag_list_dbl            * /*cuparm*/,   /* curve parameters at ints. */
+KI_tag_list_dbl            * /*suparm*/,   /* surface parameters at ints. */
+KI_tag_list_int            * /*incods*/,   /* tokens describing intersections */
+KI_tag_list_entity         * /*topol*/,    /* entity intersected */
+KI_int_nitems              * /*nintpt*/,   /* number of points returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void INCUSU
+(
+/* received */                            
+KI_tag_curve               * /*cu*/,       /* curve */
+KI_vec_position              /*bound*/[],  /* start and end of curve */
+KI_tag_surface             * /*surf*/,     /* surface */
+KI_dbl_box                   /*intbox*/[], /* box of interest */
+/* returned */                            
+KI_tag_list_dbl            * /*intpts*/,   /* points of intersection */
+KI_tag_list_dbl            * /*cuparm*/,   /* curve parameters at ints. */
+KI_tag_list_dbl            * /*suparm*/,   /* surface parameters at ints. */
+KI_tag_list_int            * /*incods*/,   /* tokens describing intersections */
+KI_int_nitems              * /*nintpt*/,   /* number of points returned */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void INFAFA
+(
+/* received */                            
+KI_tag_face                * /*face1*/,    /* face 1 */
+KI_tag_face                * /*face2*/,    /* face 2 */
+KI_int_nitems              * /*nopts*/,    /* number of options supplied */
+KI_cod_inop                  /*opts*/[],   /* array of options */
+KI_tag_list_dbl              /*optdat*/[], /* options data */
+/* returned */                            
+KI_int_nitems              * /*npts*/,     /* number of intersection points */
+KI_tag_list_dbl            * /*pts*/,      /* list of intersection pts */
+KI_int_nitems              * /*nintcu*/,   /* number of intersection curves */
+KI_tag_list_curve          * /*intcu*/,    /* list of intersection curves */
+KI_tag_list                * /*intty*/,    /* list of types of int curves */
+KI_cod_error               * /*ifail*/     /* returned - failure indicator */
+);
+
+KI_linkage_m void INSUFA
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* surface */
+KI_tag_face                * /*face*/,     /* face */
+KI_int_nitems              * /*nopts*/,    /* number of options supplied */
+KI_cod_inop                  /*opts*/[],   /* array of options */
+KI_tag_list_dbl              /*optdat*/[], /* options data */
+/* returned */                            
+KI_int_nitems              * /*npts*/,     /* number of intersection points */
+KI_tag_list_dbl            * /*pts*/,      /* list of intersection pts */
+KI_int_nitems              * /*nintcu*/,   /* number of intersection curves */
+KI_tag_list_curve          * /*intcu*/,    /* list of intersection curves */
+KI_tag_list                * /*intty*/,    /* list of types of int curves */
+KI_cod_error               * /*ifail*/     /* returned - failure indicator */
+);
+
+KI_linkage_m void INSUSU
+(
+/* received */                            
+KI_tag_surface             * /*surf1*/,    /* surface 1 */
+KI_tag_surface             * /*surf2*/,    /* surface 2 */
+KI_int_nitems              * /*nopts*/,    /* number of options supplied */
+KI_cod_inop                  /*opts*/[],   /* array of options */
+KI_tag_list_dbl              /*optdat*/[], /* options data */
+/* returned */                            
+KI_int_nitems              * /*npts*/,     /* number of intersection points */
+KI_tag_list_dbl            * /*pts*/,      /* list of intersection pts */
+KI_int_nitems              * /*nintcu*/,   /* number of intersection curves */
+KI_tag_list_curve          * /*intcu*/,    /* list of intersection curves */
+KI_tag_list                * /*intty*/,    /* list of types of int curves */
+KI_cod_error               * /*ifail*/     /* returned - failure indicator */
+);
+
+KI_linkage_m void INTBYS
+(
+/* received */                            
+KI_tag_body                * /*targby*/,   /* body to be modified */
+KI_tag_list_body           * /*tolbys*/,   /* body or list of bodies */
+                                           /* to modify 'targby' */
+/* returned */                            
+KI_tag_assembly            * /*assemb*/,   /* assembly of resulting bodies */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies in 'assemb' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void KABORT
+(
+/* received */                            
+KI_cod_slab                * /*reason*/,   /* specifies reason for abort : */
+                                           /*   SLABUI for user-interrupt */
+                                           /*   SLABRE for run-time error */
+                                           /*   SLABFE for Frustrum error */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void KNITEN
+(
+/* received */                            
+KI_cod_byty                * /*type*/,     /* type of result body (solid/sheet) */
+KI_tag_body                * /*target*/,   /* desired result body */
+KI_tag_list_edge           * /*eds1*/,     /* edges to be knitted which survive */
+KI_tag_list_edge           * /*eds2*/,     /* and those which are destroyed */
+KI_cod_logical             * /*shchk*/,    /* KI_true if a shell connectivity */
+                                           /* check required on result body */
+/* returned */                            
+KI_cod_rtkn                * /*state*/,    /* ok (RTKNOK) / incomplete (RTKNIN) */
+KI_tag_list_edge           * /*fldeds*/,   /* list of unknitted edges */
+KI_int_nitems              * /*nfld*/,     /* number in above list */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void LEVASS
+(
+/* received */                            
+KI_tag_assembly            * /*assemb*/,   /* assembly to level */
+/* returned */                            
+KI_tag_assembly            * /*result*/,   /* new levelled assembly */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void MASSPR
+(
+/* received */                            
+KI_tag_list_entity         * /*entity*/,   /* entity or list of entities */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_maop                  /*iopts*/[],  /* mass property request options */
+double                     * /*accrcy*/,   /* accuracy parameter, 0.0 - 1.0 */
+/* returned */                            
+KI_tag_list_dbl            * /*periph*/,   /* size of periphery of entity */
+KI_tag_list_dbl            * /*amount*/,   /* size of entity */
+KI_tag_list_dbl            * /*mass*/,     /* mass */
+KI_tag_list_dbl            * /*cofg*/,     /* centre of gravity */
+KI_tag_list_dbl            * /*inert*/,    /* inertia tensor at cofg */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void MENDEN
+(
+/* received */                            
+KI_tag_list_topology       * /*topol*/,    /* body or list of edges */
+KI_cod_logical             * /*repopt*/,   /* option to replace all geometry */
+/* returned */                            
+KI_tag_list_edge           * /*fixeds*/,   /* list of fixed edges */
+KI_tag_list_vertex         * /*fixvxs*/,   /* list of fixed vertices */
+KI_tag_list_edge           * /*ftyeds*/,   /* list of faulty edges */
+KI_tag_list_vertex         * /*ftyvxs*/,   /* list of faulty vertices */
+KI_tag_list_int            * /*edtoks*/,   /* token list for faulty edges */
+KI_tag_list_int            * /*vxtoks*/,   /* token list for faulty vertices */
+KI_tag_list_geometry       * /*oldgeo*/,   /* list of discarded geometry */
+KI_int_nitems              * /*nfixed*/,   /* number of fixed edges */
+KI_int_nitems              * /*nfixvx*/,   /* number of fixed vertices */
+KI_int_nitems              * /*nftyed*/,   /* number of faulty edges */
+KI_int_nitems              * /*nftyvx*/,   /* number of faulty vertices */
+KI_int_nitems              * /*nold*/,     /* number of discarded geometries */
+KI_cod_rtmd                * /*retcod*/,   /* final state of body */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void MERGEN
+(
+/* received */                            
+KI_tag_topology            * /*entity*/,   /* entity to merge */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void NEGENT
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity to be negated */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OFFABY
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body to be offset */
+KI_dbl                     * /*offset*/,   /* default offset */
+KI_cod_logical             * /*check*/,    /* level of checking required */
+KI_tag_list_face           * /*fixed*/,    /* faces not to be offset */
+KI_tag_list_face           * /*faces*/,    /* faces offset by other amounts */
+KI_tag_list_dbl            * /*dists*/,    /* list of other offset distances */
+KI_dbl_distance            * /*tol*/,      /* maximum applied tolerance */
+KI_int_nitems              * /*mxflts*/,   /* maximum number of entities in badtag */
+/* returned */                            
+KI_tag_list_entity         * /*badtag*/,   /* entities which caused problems */
+KI_cod_rtof                * /*state*/,    /* state of body after offset */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUATDF
+(
+/* received */                            
+KI_tag_attrib_def          * /*type*/,     /* attribute type */
+KI_int_nitems              * /*bufsiz*/,   /* amount of space available for */
+                                           /* name */
+/* returned */                            
+KI_chr_string                /*name*/[],   /* name of type */
+KI_int_nitems              * /*namlen*/,   /* length of type name */
+KI_tag_list_int            * /*option*/,   /* list of option codes */
+KI_tag_list_list           * /*opdata*/,   /* corresponding list of data-lists */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUBBCO
+(
+/* returned */                            
+KI_tag_list_int            * /*ents*/,     /* entity types being bulletined */
+KI_tag_list_list           * /*events*/,   /* their bulletinning events */
+KI_int_nitems              * /*nents*/,    /* length of the above lists */
+KI_tag_list_int            * /*opts*/,     /* current control options */
+KI_int_nitems              * /*nopts*/,    /* no of control options */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUBBEV
+(
+/* received */                            
+KI_cod_logical             * /*empty*/,    /* true if bulletin board is to */
+                                           /* be emptied after being output */
+/* returned */                            
+KI_int_nitems              * /*nevent*/,   /* no of recorded events */
+KI_tag_list_int            * /*events*/,   /* recorded event tokens */
+KI_tag_list_int            * /*nperev*/,   /* no of entities at each event */
+KI_int_nitems              * /*nents*/,    /* total no of entities recorded */
+KI_tag_list_tag            * /*ents*/,     /* entities recorded */
+KI_tag_list_int            * /*enttyp*/,   /* entity types */
+KI_tag_list_int            * /*usflds*/,   /* entity user fields */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUBLSS
+(
+/* received */                            
+KI_tag_surface             * /*surfac*/,   /* blending surface */
+/* returned */                            
+KI_cod_tybl                * /*bltype*/,   /* blend type */
+KI_tag_surface             * /*ssurf1*/,   /* first supporting surface */
+KI_tag_surface             * /*ssurf2*/,   /* second supporting surface */
+KI_tag_surface             * /*ssurf3*/,   /* third supporting surface */
+KI_tag_list_int            * /*iipa12*/,   /* integer parameters for ssurf1,2 */
+KI_tag_list_int            * /*iipa23*/,   /* integer parameters for ssurf2,3 */
+KI_tag_list_int            * /*iipa31*/,   /* integer parameters for ssurf3,1 */
+KI_int_nitems              * /*nipars*/,   /* length of int parameter lists */
+KI_tag_list_dbl            * /*irpa12*/,   /* double parameters for ssurf1,2 */
+KI_tag_list_dbl            * /*irpa23*/,   /* double parameters for ssurf2,3 */
+KI_tag_list_dbl            * /*irpa31*/,   /* double parameters for ssurf3,1 */
+KI_int_nitems              * /*nrpars*/,   /* length of real parameter lists */
+KI_cod_logical             * /*sense*/,    /* surface sense. explained below */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUBSCU
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve */
+KI_dbl_distance            * /*tol*/,      /* tolerance for approximation */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_srop                  /*iopts*/[],  /* conversion options */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*order*/,    /* order of bspline curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_tag_list_dbl            * /*knots*/,    /* knot vector */
+KI_tag_list_int            * /*props*/,    /* list of curve properties */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUBSED
+(
+/* received */                            
+KI_tag_edge                * /*edge*/,     /* edge of curve */
+KI_dbl_distance            * /*tol*/,      /* tolerance for approximation */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_srop                  /*iopts*/[],  /* conversion options */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*order*/,    /* order of bspline curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_tag_list_dbl            * /*knots*/,    /* knot vector */
+KI_tag_list_int            * /*props*/,    /* list of curve properties */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUBSFA
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face */
+KI_dbl_distance            * /*tol*/,      /* tolerance for approximations */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_srop                  /*iopts*/[],  /* conversion options */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*uorder*/,   /* order of surface patches in u */
+KI_int_order               * /*vorder*/,   /* order of surface patches in v */
+KI_int_nitems              * /*ncol*/,     /* number of cols of control points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of control points */
+KI_tag_list_dbl            * /*uknots*/,   /* knot vector in the u direction */
+KI_tag_list_dbl            * /*vknots*/,   /* knot vector in the v direction */
+KI_tag_list_int            * /*props*/,    /* list of surface properties */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUBSPC
+(
+/* received */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_tag_list_dbl            * /*knots*/,    /* knot values */
+KI_tag_list_int            * /*props*/,    /* list of curve properties */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUBSPS
+(
+/* received */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*uorder*/,   /* order of surface in u */
+KI_int_order               * /*vorder*/,   /* order of surface in v */
+KI_int_nitems              * /*ncol*/,     /* number of cols of control points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of control points */
+KI_tag_list_dbl            * /*uknots*/,   /* knot vector in the u direction */
+KI_tag_list_dbl            * /*vknots*/,   /* knot vector in the v direction */
+KI_tag_list_int            * /*props*/,    /* list of surface properties */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUBSSU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* surface */
+KI_dbl                       /*urange*/[], /* urange of surface */
+KI_dbl                       /*vrange*/[], /* vrange of surface */
+KI_dbl_distance            * /*tol*/,      /* tolerance for approximations */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_srop                  /*iopts*/[],  /* conversion options */
+/* returned */                            
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+KI_int_dimension           * /*dim*/,      /* dimension of control points */
+KI_int_order               * /*uorder*/,   /* order of surface patches in u */
+KI_int_order               * /*vorder*/,   /* order of surface patches in v */
+KI_int_nitems              * /*ncol*/,     /* number of cols of control points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of control points */
+KI_tag_list_dbl            * /*uknots*/,   /* knot vector in the u direction */
+KI_tag_list_dbl            * /*vknots*/,   /* knot vector in the v direction */
+KI_tag_list_int            * /*props*/,    /* list of surface properties */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUCOCU
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve to be output */
+KI_vec_position              /*start*/,    /* starts from here */
+KI_vec_position              /*end*/,      /* ends here */
+double                     * /*ctol*/,     /* max permitted chordal error */
+double                     * /*atol*/,     /* max permitted angular error */
+double                     * /*stol*/,     /* max permitted step length */
+/* returned */                            
+KI_tag_list_dbl            * /*posns*/,    /* list of vector components */
+KI_int_nitems              * /*npos*/,     /* number of items in list */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUCPCU
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* Tag of constant parameter curve */
+/* returned */                            
+KI_tag_surface             * /*surf*/,     /* Underlying surface */
+KI_cod_papr                * /*uorv*/,     /* Constant u or constant v */
+KI_dbl                     * /*param*/,    /* Parameter value */
+KI_cod_logical             * /*sense*/,    /* Curve sense */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUEXSU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* extruded surface to output */
+/* returned */                            
+KI_tag_curve               * /*profil*/,   /* curve extruded */
+KI_vec_direction             /*path*/,     /* direction of sweep */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUFEAT
+(
+/* received */                            
+KI_tag_feature             * /*featre*/,   /* feature */
+/* returned */                            
+KI_cod_tyfe                * /*fetype*/,   /* type-code of feature */
+KI_tag_list_entity         * /*entys*/,    /* list of entities in feature */
+KI_int_nitems              * /*nentys*/,   /* number of items in 'entys' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUFGCU
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* Foreign curve. */
+KI_int_nchars              * /*arrlen*/,   /* Length of input key array. */
+/* returned */                            
+KI_chr_key                   /*key*/[],    /* Curve key. */
+KI_int_nchars              * /*keylen*/,   /* Length of curve key. */
+KI_tag_list_int            * /*ivals*/,    /* List of integer values. */
+KI_tag_list_dbl            * /*rvals*/,    /* List of real values. */
+KI_cod_logical             * /*sense*/,    /* Curve sense. */
+KI_tag_transform           * /*tf*/,       /* Curve transformation. */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUFGSU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* Foreign surface. */
+KI_int_nchars              * /*arrlen*/,   /* Length of input key array. */
+/* returned */                            
+KI_chr_key                   /*key*/[],    /* Surface key. */
+                                           /* (truncated if necessary) */
+KI_int_nchars              * /*keylen*/,   /* True length of surface key. */
+KI_tag_list_int            * /*ivals*/,    /* List of integer values. */
+KI_tag_list_dbl            * /*rvals*/,    /* List of real values. */
+KI_cod_logical             * /*sense*/,    /* Surface sense. */
+KI_tag_transform           * /*tf*/,       /* Surface transformation. */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUFINF
+(
+/* received */                            
+KI_int_nchars              * /*nchars*/,   /* number of characters in filename */
+KI_chr_filename              /*filnam*/[], /* filename */
+int                        * /*guise*/,    /* what sort of file it is */
+int                        * /*format*/,   /* text or binary */
+KI_cod_slfi                * /*selcod*/,   /* selection code specifying what */
+                                           /* information is wanted */
+/* returned */                            
+int                        * /*ival*/,     /* returned information (integer) */
+double                     * /*rval*/,     /* not yet used */
+char                         /*string*/[], /* not yet used */
+KI_int_nchars              * /*nstrng*/,   /* not yet used */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUGEEF
+(
+/* received */                            
+KI_tag_topology            * /*ed_fn*/,    /* edge or fin being queried */
+KI_cod_logical             * /*parms*/,    /* request for parameters */
+/* returned */                            
+KI_tag_curve               * /*curve*/,    /* tag of curve */
+KI_cod_tycu                * /*cutype*/,   /* type of curve */
+KI_vec_position              /*start*/,    /* start position */
+KI_dbl                     * /*st_t*/,     /* parameter of 'start' */
+KI_vec_position              /*end*/,      /* end position */
+KI_dbl                     * /*end_t*/,    /* parameter of 'end' */
+KI_cod_logical             * /*sense*/,    /* true if 'curve' is in same */
+                                           /* direction as 'ed_fn' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUGESU
+(
+/* received */                            
+KI_tag_surface             * /*surfac*/,   /* surface to output */
+/* returned */                            
+KI_tag_list_int            * /*sftype*/,   /* type and subtypes of surface */
+KI_int_nitems              * /*ntypes*/,   /* number of entries in 'sftype' */
+KI_tag_list_int            * /*codes*/,    /* codes formatting return data */
+KI_int_nitems              * /*ncode*/,    /* number of format codes */
+KI_tag_list_int            * /*ints*/,     /* integer data */
+KI_tag_list_dbl            * /*reals*/,    /* real data */
+KI_tag_list_geometry       * /*geoms*/,    /* underlying geometries */
+KI_tag_list_curve          * /*singc*/,    /* list of singular curves */
+KI_int_nitems              * /*nsingc*/,   /* number of singular curves */
+KI_tag_list_dbl            * /*singp*/,    /* singularities */
+KI_tag_list_curve          * /*singo*/,    /* owners of singularities */
+KI_int_nitems              * /*nsingp*/,   /* number of singularities */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUIDEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* entity whose id is required */
+/* returned */                            
+KI_int_id                  * /*id*/,       /* id of specified entity */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUIDLS
+(
+/* received */                            
+KI_tag_list_entity         * /*entys*/,    /* entities whose ids are required */
+/* returned */                            
+KI_tag_list_int            * /*ids*/,      /* ids of specified entities */
+KI_int_nitems              * /*nids*/,     /* number of entries in 'ids' */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUINTP
+(
+/* received */                            
+KI_cod_slip                * /*pnum*/,     /* parameter code */
+/* returned */                            
+int                        * /*ival*/,     /* integer value of parameter */
+double                     * /*rval*/,     /* real value of parameter */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OULERR
+(
+/* received */                            
+KI_cod_sler                * /*selcod*/,   /* enquiry code */
+/* returned */                            
+int                        * /*ival*/,     /* integer value */
+char                         /*string*/[], /* null-terminated character string */
+KI_int_nchars              * /*nchars*/,   /* length of character string */
+                                           /* (excluding terminal null) */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUMODP
+(
+/* received */                            
+KI_cod_slmp                * /*pnum*/,     /* parameter code */
+/* returned */                            
+int                        * /*ival*/,     /* integer value of parameter */
+double                     * /*rval*/,     /* real value of parameter */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUOFSU
+(
+/* received */                            
+KI_tag_surface             * /*offset*/,   /* offset surface */
+/* returned */                            
+KI_tag_surface             * /*under*/,    /* underlying surface */
+KI_dbl                     * /*dist*/,     /* offset distance */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUPART
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part to output */
+KI_int_nchars              * /*buflen*/,   /* length of key array */
+/* returned */                            
+KI_int_nchars              * /*keylen*/,   /* length of key */
+KI_chr_key                   /*key*/[],    /* key of part */
+KI_cod_enst                * /*state*/,    /* state of part */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUPWPC
+(
+/* received */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+KI_cod_slba                * /*basis*/,    /* representation method */
+/* returned */                            
+KI_tag_list_dbl            * /*coeffs*/,   /* vectors defining the curve */
+KI_int_dimension           * /*dim*/,      /* dimension of defining vectors */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nseg*/,     /* number of segments in curve */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUPWPS
+(
+/* received */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+KI_cod_slba                * /*basis*/,    /* representation method */
+/* returned */                            
+KI_tag_list_dbl            * /*coeffs*/,   /* vectors defining the surface */
+KI_int_dimension           * /*dim*/,      /* dimension of defining vectors */
+KI_int_order               * /*uorder*/,   /* order of surface in u */
+KI_int_order               * /*vorder*/,   /* order of surface in v */
+KI_int_nitems              * /*ncol*/,     /* number of columns of patches */
+KI_int_nitems              * /*nrow*/,     /* number of rows of patches */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OURVSU
+(
+/* received */                            
+KI_tag_surface             * /*surf*/,     /* spun surface to output */
+/* returned */                            
+KI_tag_curve               * /*profil*/,   /* curve revolved */
+KI_vec_position              /*point*/,    /* point on revolution axis */
+KI_vec_axis                  /*direct*/,   /* direction of revolution axis */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_int_nitems              * /*nsings*/,   /* number of singularities */
+KI_tag_list_dbl            * /*parms*/,    /* parameter range on profile */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUSPCU
+(
+/* received */                            
+KI_tag_curve               * /*spc*/,      /* SP-curve */
+/* returned */                            
+KI_tag_surface             * /*surf*/,     /* basis surface of SP-curve */
+KI_tag_list_dbl            * /*ctrl*/,     /* control points */
+int                        * /*dim*/,      /* vertex dimension (2 or 3) */
+KI_int_order               * /*order*/,    /* order of curve */
+KI_int_nitems              * /*nctrl*/,    /* number of control points */
+KI_tag_list_dbl            * /*knots*/,    /* knot values */
+KI_cod_logical             * /*period*/,   /* periodic flag */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUSPPC
+(
+/* received */                            
+KI_tag_b_curve             * /*bc*/,       /* B-curve */
+/* returned */                            
+KI_tag_list_dbl            * /*pts*/,      /* spline points */
+KI_int_nitems              * /*npts*/,     /* number of spline points */
+KI_tag_list_int            * /*props*/,    /* curve properties */
+KI_tag_list_list           * /*pdata*/,    /* list of data lists */
+KI_int_nitems              * /*nprops*/,   /* number of curve properties */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUSPPS
+(
+/* received */                            
+KI_tag_b_surface           * /*bs*/,       /* B-surface */
+/* returned */                            
+KI_tag_list_dbl            * /*pts*/,      /* mesh of spline points */
+KI_int_nitems              * /*ncol*/,     /* number of columns of points */
+KI_int_nitems              * /*nrow*/,     /* number of rows of points */
+KI_tag_list_int            * /*props*/,    /* surface properties */
+KI_tag_list_list           * /*pdata*/,    /* list of data lists */
+KI_int_nitems              * /*nprops*/,   /* number of surface properties */
+KI_cod_logical             * /*sense*/,    /* surface sense */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUSTAT
+(
+/* received */                            
+KI_cod_slst                * /*selcod*/,   /* selection code specifying what */
+                                           /* information is wanted */
+/* returned */                            
+int                        * /*ival*/,     /* returned information (integer) */
+double                     * /*rval*/,     /* returned information (double) */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUTATT
+(
+/* received */                            
+KI_tag_attribute           * /*attrib*/,   /* attribute */
+KI_int_nitems              * /*bufsiz*/,   /* amount of space available in */
+                                           /* chars */
+/* returned */                            
+KI_tag_entity              * /*owner*/,    /* entity to which attribute is */
+                                           /* attached */
+KI_tag_list_int            * /*ivals*/,    /* list of integer values */
+KI_tag_list_dbl            * /*rvals*/,    /* list of real values */
+KI_tag_list_int            * /*slens*/,    /* list of string lengths */
+KI_chr_string                /*chars*/[],  /* array of data for string fields */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUTBUB
+(
+/* received */                            
+KI_cod_logical             * /*empty*/,    /* true if bulletin board is to */
+                                           /* be emptied after being output */
+/* returned */                            
+KI_tag_list_tag            * /*nwtags*/,   /* tags of new entities */
+KI_tag_list_tag            * /*chtags*/,   /* tags of changed entities */
+KI_tag_list_tag            * /*dltags*/,   /* tags of deleted entities */
+KI_tag_list_int            * /*nwtyps*/,   /* types of new entities */
+KI_tag_list_int            * /*chtyps*/,   /* types of changed entities */
+KI_tag_list_int            * /*dltyps*/,   /* types of deleted entities */
+KI_tag_list_int            * /*nwufds*/,   /* user fields of new entities */
+KI_tag_list_int            * /*chufds*/,   /* user fields of changed entities */
+KI_tag_list_int            * /*dlufds*/,   /* user fields of deleted entities */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void OUTCUR
+(
+/* received */                            
+KI_tag_curve               * /*curve*/,    /* curve to be output */
+/* returned */                            
+KI_cod_tycu                * /*cutype*/,   /* type of curve */
+KI_vec                       /*vec1*/,     /* first vector defining curve */
+KI_vec                       /*vec2*/,     /* second vector defining curve */
+KI_vec                       /*vec3*/,     /* third vector defining curve */
+double                     * /*d1*/,       /* first double defining curve */
+double                     * /*d2*/,       /* second double defining curve */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUTLEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* can be face, edge or vertex */
+/* returned */                            
+double                     * /*tol*/,      /* returned tolerance value */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUTPOI
+(
+/* received */                            
+KI_tag_point               * /*point*/,    /* point to be output */
+/* returned */                            
+KI_cod_typt                * /*pttype*/,   /* type of point */
+KI_vec_position              /*defn*/,     /* point coords */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUTRAN
+(
+/* received */                            
+KI_tag_transform           * /*transf*/,   /* transformation to be output */
+/* returned */                            
+double                       /*matrix*/[], /* transformation matrix array */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUTRCU
+(
+/* received */                            
+KI_tag_curve               * /*trimmed_curve*/, /* trimmed curve to be output */
+/* returned */                            
+KI_tag_curve               * /*basis_curve*/, /* underlying curve */
+KI_vec_position              /*point_1*/,  /* start point */
+KI_vec_position              /*point_2*/,  /* end point */
+KI_dbl_parameter           * /*parm_1*/,   /* start parameter */
+KI_dbl_parameter           * /*parm_2*/,   /* end parameter */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUTSFA
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face to be represented */
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_srop                  /*iopts*/[],  /* options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+/* returned */                            
+KI_tag_surface             * /*surface*/,  /* surface underlying SP-surves */
+KI_int_nitems              * /*ntrims*/,   /* number of non-empty trim loop sets */
+KI_tag_list_list           * /*spcus*/,    /* lists of trimmed SP-curves */
+KI_tag_list_list           * /*geoms*/,    /* lists of corresponding geometries */
+KI_tag_list_list           * /*topols*/,   /* lists of corresponding topologies */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void OUTSUR
+(
+/* received */                            
+KI_tag_surface             * /*surfac*/,   /* surface to be output */
+/* returned */                            
+KI_cod_tysu                * /*sftype*/,   /* surface type */
+KI_vec                       /*vec1*/,     /* first vector defining surface */
+KI_vec                       /*vec2*/,     /* second vector defining surface */
+double                     * /*d1*/,       /* first double defining surface */
+double                     * /*d2*/,       /* second double defining surface */
+KI_cod_logical             * /*sense*/,    /* surface sense. see below */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void OUUFEN
+(
+/* received */                            
+KI_tag                     * /*tag*/,      /* tag whose user field */
+                                           /* is required */
+/* returned */                            
+KI_int_ufdval                /*ufdval*/[], /* user-field value - */
+                                           /* array length is the user-field */
+                                           /* size set by STAMOD */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void PICKEN
+(
+/* received */                            
+KI_tag_list_part           * /*palist*/,   /* part or list of parts */
+KI_tag_list_transform      * /*transf*/,   /* transformation or */
+                                           /* list of transformations */
+KI_vec                       /*point*/,    /* point through which axis passes */
+KI_vec_direction             /*axis*/,     /* axis of cylindrical volume */
+KI_dbl_radius              * /*rad*/,      /* radius of cylindrical volume */
+KI_cod_slpk                * /*opt*/,      /* ray options */
+KI_cod_ty                  * /*entype*/,   /* type of entity to pick */
+/* returned */                            
+KI_int_nitems              * /*nhiten*/,   /* number of picked entities */
+KI_tag_list_entity         * /*hitlis*/,   /* list of picked entities */
+KI_tag_list_int            * /*indlis*/,   /* list of indices of the */
+                                           /* owning parts */
+KI_tag_list_dbl            * /*dislis*/,   /* list of minimum distances */
+                                           /* from picked entities to ray */
+KI_tag_list_dbl            * /*hitpts*/,   /* points on ray axis */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void PIERCE
+(
+/* received */                            
+KI_tag_face                * /*face*/,     /* face to remove */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void PTENFE
+(
+/* received */                            
+KI_tag_feature             * /*featre*/,   /* feature */
+KI_tag_list_entity         * /*entity*/,   /* entities to be added */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void PTINLI
+(
+/* received */                            
+KI_tag_list_int            * /*list*/,     /* list in which to put items */
+KI_int_index               * /*startx*/,   /* position in list where first */
+                                           /* value is to be put */
+KI_int_nitems              * /*nvals*/,    /* number of values to be put */
+                                           /* into list */
+int                          /*ivals*/[],  /* values to put into list */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void PTRLLI
+(
+/* received */                            
+KI_tag_list_dbl            * /*list*/,     /* list in which to put items */
+KI_int_index               * /*startx*/,   /* position in list where first */
+                                           /* value is to be put */
+KI_int_nitems              * /*nvals*/,    /* number of values to be put */
+                                           /* into list */
+double                       /*rvals*/[],  /* values to put into list */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void PTTGLI
+(
+/* received */                            
+KI_tag_list_tag            * /*list*/,     /* list in which to put tags */
+KI_int_index               * /*startx*/,   /* position in list where first */
+                                           /* value is to be put */
+KI_int_nitems              * /*ntags*/,    /* number of tags to be put */
+                                           /* into list */
+KI_tag                       /*tags*/[],   /* tags to put into list */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RAYFIR
+(
+/* received */                            
+KI_tag_list_part           * /*palist*/,   /* entities to fire ray through */
+KI_tag_list_transform      * /*transf*/,   /* part transformations */
+KI_int_nitems              * /*wchhit*/,   /* number of intersections wanted */
+KI_vec                       /*point*/,    /* point from which ray is fired */
+KI_vec_direction             /*direct*/,   /* direction of ray */
+/* returned */                            
+KI_int_nitems              * /*nhitpt*/,   /* number of points returned */
+KI_tag_list_dbl            * /*hitpts*/,   /* points where ray hit bodies */
+KI_tag_list_face           * /*hitfas*/,   /* faces hit by ray */
+KI_tag_list_int            * /*indces*/,   /* indices of bodies hit by ray */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void REDINS
+(
+/* received */                            
+KI_tag_instance            * /*instnc*/,   /* instance to redirect */
+KI_tag_part                * /*part*/,     /* part it should instance */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void REEDSH
+(
+/* received */                            
+KI_tag_body                * /*sheet*/,    /* Sheet body */
+KI_dbl                       /*urange*/[], /* urange of face */
+KI_dbl                       /*vrange*/[], /* vrange of face */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void RESUSH
+(
+/* received */                            
+KI_tag_body                * /*sheet*/,    /* Sheet body */
+KI_tag_surface             * /*surf*/,     /* new surface for sheet body */
+KI_dbl_distance            * /*tol*/,      /* tolerance of SP_curves */
+/* returned */                            
+KI_tag_list_edge           * /*edges*/,    /* edges converted to SP_curves */
+KI_int_nitems              * /*nedges*/,   /* number of converted edges */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void RETLEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* edge */
+/* returned */                            
+KI_cod_rttl                * /*retcod*/,   /* status of operation */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RMFASO
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* faces to be removed */
+KI_cod_sllo                * /*actpar*/,   /* action to mend holes on parents */
+                                           /*   SLLOCP => cap */
+                                           /*   SLLOGR => grow */
+                                           /*   SLLORB => leave rubber */
+KI_cod_sllo                * /*actoff*/,   /* action to mend holes on offspring */
+                                           /*   SLLOCP => cap */
+                                           /*   SLLOGR => grow */
+                                           /*   SLLOGP => grow from parent */
+                                           /*   SLLORB => leave rubber */
+/* returned */                            
+KI_tag_list_body           * /*parnts*/,   /* parent body fragments */
+KI_int_nitems              * /*nprnts*/,   /* number of parent fragments */
+KI_tag_list_int            * /*sprnts*/,   /* state of parent fragments */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_tag_list_body           * /*offspg*/,   /* offspring bodies */
+KI_int_nitems              * /*nofspg*/,   /* number of offspring */
+KI_tag_list_int            * /*sofspg*/,   /* state of offspring */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void ROLBFN
+(
+/* received */                            
+int                        * /*nsteps*/,   /* number of steps to be rolled */
+                                           /* forward (> 0) or back (< 0) */
+/* returned */                            
+int                        * /*asteps*/,   /* actual number of steps rolled */
+                                           /* forward (> 0) or back (< 0) */
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void ROLBLM
+(
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void ROLSMK
+(
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void RRFCET
+(
+/* received */                            
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_rrop                  /*iopts*/[],  /* rendering options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+KI_tag_list_entity         * /*entys*/,    /* entities to render */
+KI_tag_list_transform      * /*transf*/,   /* entity transforms */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RRHIDL
+(
+/* received */                            
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_rrop                  /*iopts*/[],  /* rendering options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+KI_tag_list_entity         * /*entys*/,    /* entities to render */
+KI_tag_list_transform      * /*transf*/,   /* entity transforms */
+KI_dbl_view_mx               /*vmatrx*/[], /* viewing transform matrix */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RRPIXL
+(
+/* received */                            
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_rrop                  /*iopts*/[],  /* rendering options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+KI_tag_list_entity         * /*entys*/,    /* entities to render */
+KI_tag_list_transform      * /*transf*/,   /* entity transforms */
+KI_dbl_view_mx               /*vmatrx*/[], /* viewing transform matrix */
+KI_tag_list_dbl            * /*pixdef*/,   /* image to pixel map */
+KI_tag_list_list           * /*litdef*/,   /* light source definitions */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RRVDEP
+(
+/* received */                            
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_rrop                  /*iopts*/[],  /* rendering options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+KI_tag_list_entity         * /*entys*/,    /* entities to render */
+KI_tag_list_transform      * /*transf*/,   /* entity transforms */
+KI_dbl_view_mx               /*vmatrx*/[], /* viewing transform matrix */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void RRVIND
+(
+/* received */                            
+KI_int_nitems              * /*nopts*/,    /* number of options in 'iopts' */
+KI_cod_rrop                  /*iopts*/[],  /* rendering options */
+KI_tag_list_dbl              /*optdta*/[], /* option data lists */
+KI_tag_list_entity         * /*entys*/,    /* entities to render */
+KI_tag_list_transform      * /*transf*/,   /* entity transforms */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SAVMOD
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part to transmit */
+KI_int_nchars              * /*keylen*/,   /* length of key */
+KI_chr_key                   /*key*/[],    /* key of part */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SAVSNP
+(
+/* received */                            
+KI_int_nchars              * /*nchars*/,   /* number of characters in filename */
+KI_chr_filename              /*filnam*/[], /* filename for snapshot */
+int                        * /*histfl*/,   /* unused: should be zero */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void SCRIBE
+(
+/* received */                            
+KI_tag_topology            * /*topol*/,    /* face, region or body to scribe curve on */
+KI_tag_curve               * /*curve*/,    /* curve to scribe */
+KI_vec_position              /*startp*/,   /* start position */
+KI_vec_position              /*endp*/,     /* end position */
+/* returned */                            
+KI_tag_list_edge           * /*newedg*/,   /* list of new edges */
+KI_int_nitems              * /*nedges*/,   /* number of new edges */
+KI_tag_list_face           * /*newfac*/,   /* list of new faces, if any */
+KI_int_nitems              * /*nfaces*/,   /* number of new faces */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SEBBCO
+(
+/* received */                            
+KI_int_nitems              * /*nents*/,    /* length of 'ents' array */
+KI_cod_ty                    /*ents*/[],   /* entity types to be bulletined */
+KI_tag_list_int              /*events*/[], /* corresponding events to record */
+KI_int_nitems              * /*nopts*/,    /* no of control options */
+KI_cod_bbop                  /*opts*/[],   /* control options */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void SECTBY
+(
+/* received */                            
+KI_tag_list_body           * /*bodies*/,   /* body or list of bodies */
+                                           /* to be sectioned */
+KI_tag_surface             * /*surfac*/,   /* sectioning surface */
+/* returned */                            
+KI_tag_list_body           * /*front*/,    /* bodies in front of surface */
+KI_tag_list_body           * /*back*/,     /* bodies behind surface */
+KI_tag_list_face           * /*newfas*/,   /* new faces */
+KI_int_nitems              * /*nfaces*/,   /* number of faces in 'newfas' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void SEINTP
+(
+/* received */                            
+KI_cod_slip                * /*pnum*/,     /* parameter code */
+int                        * /*ival*/,     /* integer value of parameter */
+double                     * /*rval*/,     /* real value of parameter */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SEMODP
+(
+/* received */                            
+KI_cod_slmp                * /*pnum*/,     /* parameter code */
+int                        * /*ival*/,     /* integer value of parameter */
+double                     * /*rval*/,     /* real value of parameter */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SESTPA
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part to change */
+KI_cod_enst                * /*state*/,    /* desired new state of the part */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SETLEN
+(
+/* received */                            
+KI_tag_entity              * /*entity*/,   /* can be face, edge or vertex */
+double                     * /*tol*/,      /* new tolerance value */
+/* returned */                            
+KI_tag_list_edge           * /*edges*/,    /* list of new edges */
+KI_int_nitems              * /*nedges*/,   /* number of edges */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SEUFEN
+(
+/* received */                            
+KI_tag                     * /*tag*/,      /* tag whose user field */
+                                           /* is to be set */
+KI_int_ufdval                /*ufdval*/[], /* user-field value: */
+                                           /* array length is the user-field */
+                                           /* size set by STAMOD */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* error code */
+);
+
+KI_linkage_m void SHAREN
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body on which to attempt sharing */
+KI_int_nitems              * /*nopts*/,    /* number of options in opts */
+KI_cod_shop                  /*opts*/[],   /* sharing control options */
+/* returned */                            
+KI_int_nitems              * /*ngeom*/,    /* number of geometries removed */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void SIMPEN
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body to simplify */
+KI_cod_slle                * /*level*/,    /* level of simplification */
+/* returned */                            
+KI_tag_list_entity         * /*geom*/,     /* list of new geometric entities */
+KI_int_nitems              * /*ngeom*/,    /* number of new entities */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SPLTEN
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body */
+/* returned */                            
+KI_int_nitems              * /*nfaces*/,   /* number of faces that have been split */
+KI_tag_list_face           * /*faces*/,    /* list of original faces that were split */
+KI_tag_list_list           * /*new_faces*/, /* list for each new set of faces, */
+                                           /* corresponding to each of the old faces */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SRCHIL
+(
+/* received */                            
+KI_tag_list_int            * /*list*/,     /* list which is to be searched */
+int                        * /*value*/,    /* value to be looked for */
+KI_int_index               * /*start*/,    /* starting position to look for */
+                                           /* integer */
+/* returned */                            
+KI_int_index               * /*index*/,    /* index of first item in list */
+                                           /* which matches given value */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SRCHRL
+(
+/* received */                            
+KI_tag_list_dbl            * /*list*/,     /* list which is to be searched */
+double                     * /*value*/,    /* value to be looked for */
+KI_int_index               * /*start*/,    /* starting position to look for */
+                                           /* real */
+/* returned */                            
+KI_int_index               * /*index*/,    /* index of first item in list */
+                                           /* which matches given value */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SRCHTG
+(
+/* received */                            
+KI_tag_list_tag            * /*list*/,     /* list which is to be searched */
+KI_tag                     * /*value*/,    /* entity to be looked for */
+KI_int_index               * /*start*/,    /* starting position to look for tag */
+/* returned */                            
+KI_int_index               * /*index*/,    /* index of item in list which */
+                                           /* matches given value */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void STAMOD
+(
+/* received */                            
+KI_cod_logical             * /*kijon*/,    /* flags whether to write journal */
+                                           /* file or not */
+KI_int_nchars              * /*nchars*/,   /* number of characters in journal */
+                                           /* file name (used only if kijon is */
+                                           /* set to true) */
+KI_chr_filename              /*jfilnm*/[], /* name of journal file */
+int                        * /*usrfld*/,   /* size of user fields (in integers) */
+/* returned */                            
+KI_tag_entity              * /*world*/,    /* world */
+int                        * /*kivrsn*/,   /* version number of interface being */
+                                           /* invoked */
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void STOMOD
+(
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+KI_linkage_m void SUBBYS
+(
+/* received */                            
+KI_tag_body                * /*targby*/,   /* body to be modified */
+KI_tag_list_body           * /*tolbys*/,   /* body or list of bodies */
+                                           /* used to modify 'targby' */
+/* returned */                            
+KI_tag_assembly            * /*assemb*/,   /* assembly of resulting bodies */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies in 'assemb' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void SWEENT
+(
+/* received */                            
+KI_tag_list_topology       * /*swept*/,    /* body, vertex, face or list of */
+                                           /* faces to sweep */
+KI_vec_displacement          /*path*/,     /* translation vector */
+/* returned */                            
+KI_tag_list_topology       * /*latrls*/,   /* lateral edge or face(s) */
+KI_tag_list_topology       * /*extent*/,   /* extruded vertex or edge(s) */
+KI_int_nitems              * /*nlatrl*/,   /* number of laterals */
+KI_cod_rtlo                * /*state*/,    /* state of body after sweep */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void SWIENT
+(
+/* received */                            
+KI_tag_list_topology       * /*swung*/,    /* body, vertex, face or list of */
+                                           /* faces to swing */
+KI_vec_position              /*point*/,    /* point on axis of rotation */
+KI_vec_axis                  /*direct*/,   /* direction of axis of rotation */
+KI_dbl_angle               * /*angle*/,    /* angle of swing (in radians) */
+/* returned */                            
+KI_tag_list_topology       * /*latrls*/,   /* lateral edge or face(s) */
+KI_tag_list_topology       * /*extent*/,   /* extruded vertex or edge(s) */
+KI_int_nitems              * /*nlatrl*/,   /* number of laterals */
+KI_cod_rtlo                * /*state*/,    /* state of the body after the swing */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void TAPFAS
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* face(s) to be tapered */
+KI_vec_position              /*point*/,    /* point on taper plane */
+KI_vec_direction             /*direct*/,   /* normal to taper plane */
+KI_dbl_angle               * /*angle*/,    /* taper angle (in radians) */
+/* returned */                            
+KI_tag_list_face           * /*flist*/,    /* tapered face(s) */
+KI_int_nitems              * /*nfaces*/,   /* number of tapered faces */
+KI_cod_rtlo                * /*state*/,    /* state of the body */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void THIKEN
+(
+/* received */                            
+KI_tag_body                * /*body*/,     /* body to be thickened */
+KI_dbl                     * /*front*/,    /* thickness on front of faces */
+KI_dbl                     * /*back*/,     /* thickness on back of faces */
+KI_cod_logical             * /*check*/,    /* level of checking required */
+KI_dbl_distance            * /*tol*/,      /* tol of SP curve conversions */
+KI_int_nitems              * /*mxflts*/,   /* maximum number of entities in badtag */
+/* returned */                            
+KI_tag_list_entity         * /*oldtop*/,   /* original topology */
+KI_tag_list_entity         * /*newtop*/,   /* new topology */
+KI_tag_list_entity         * /*badtag*/,   /* entities which caused problems */
+KI_cod_rtof                * /*state*/,    /* state of body after offset */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void TRIMSH
+(
+/* received */                            
+KI_tag_body                * /*sheet*/,    /* Sheet body to trim */
+KI_int_nitems              * /*ncurvs*/,   /* number of curves supplied */
+KI_tag_curve                 /*curvs*/[],  /* curves to trim sheet */
+KI_int_nitems              * /*nopts*/,    /* no of trimming options supplied */
+KI_cod_sltr                  /*opts*/[],   /* trimming options */
+KI_tag_list                  /*optdata*/[], /* trimming option data */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void TRSHCU
+(
+/* received */                            
+KI_tag_body                * /*sheet*/,    /* Sheet body to trim */
+KI_int_nitems              * /*ncurvs*/,   /* number of curves supplied */
+KI_tag_curve                 /*curvs*/[],  /* curves to trim sheet */
+KI_int_nitems              * /*nopts*/,    /* no of trimming options supplied */
+KI_cod_trsh                  /*opts*/[],   /* trimming options */
+KI_vec_direction             /*direct*/,   /* direction of projection */
+/* returned */                            
+KI_tag_list_edge           * /*edges*/,    /* edges imprinted */
+KI_int_nitems              * /*nedges*/,   /* number of edges */
+KI_tag_list_curve          * /*which*/,    /* which curve edge is derived from */
+KI_tag_list_int            * /*original*/, /* whether edge is original */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void TWEFAC
+(
+/* received */                            
+KI_tag_list_entity         * /*faces*/,    /* face(s) to be transformed */
+KI_tag_list_transform      * /*transf*/,   /* list of transforms */
+                                           /* (move and/or rotate only) */
+/* returned */                            
+KI_cod_rtlo                * /*state*/,    /* state of the body */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void TWSUFA
+(
+/* received */                            
+KI_tag_list_face           * /*faces*/,    /* face(s) to tweak */
+KI_tag_list_surface        * /*surfs*/,    /* new surface(s) for face(s) */
+KI_tag_list_int            * /*senses*/,   /* senses for surfaces */
+/* returned */                            
+KI_cod_rtlo                * /*state*/,    /* state of the body */
+                                           /*   RTLOOK => Valid */
+                                           /*   RTLONG => Negated */
+                                           /*   RTLOSX => Self-Intersecting */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void UNIBYS
+(
+/* received */                            
+KI_tag_body                * /*targby*/,   /* target body */
+KI_tag_list_body           * /*tolbys*/,   /* body or list of bodies used */
+                                           /* to modify 'targby' */
+/* returned */                            
+KI_tag_assembly            * /*assemb*/,   /* assembly of resulting bodies */
+KI_int_nitems              * /*nbodys*/,   /* number of bodies in 'assemb' */
+KI_cod_error               * /*ifail*/     /* failure code */
+);
+
+KI_linkage_m void UNLDPA
+(
+/* received */                            
+KI_tag_part                * /*part*/,     /* part to unload */
+/* returned */                            
+KI_cod_error               * /*ifail*/     /* failure indicator */
+);
+
+
+#undef  KI_linkage_m
+
+#endif /* KERNEL_INTERFACE_H_INCLUDED */
+
diff --git a/contrib/Parasolid/interface_parasolid/include/parasolid_debug.h b/contrib/Parasolid/interface_parasolid/include/parasolid_debug.h
new file mode 100644
index 0000000..5cd6ddf
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/parasolid_debug.h
@@ -0,0 +1,504 @@
+/*
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+*/
+
+#ifndef PARASOLID_DEBUG_H_INCLUDED
+#define PARASOLID_DEBUG_H_INCLUDED
+
+
+#include "parasolid_kernel.h"
+
+
+/*********************************************************************/
+/* TYPEDEFS */
+/*********************************************************************/
+
+
+/* PK_DEBUG_BODY_compare_o_t */
+
+
+struct PK_DEBUG_BODY_compare_o_s
+    {
+    int                         o_t_version;        /* version number */
+    int                         max_diffs;          /* maximum no. face pairs */
+    PK_LOGICAL_t                all_tests;          /* perform all local tests */
+    PK_LOGICAL_t                num_tests;          /* perform numerical tests */
+    PK_LOGICAL_t                acc_dev_tests;      /* perform accurate */
+    PK_LOGICAL_t                tol_dev_tests;      /* perform tolerant */
+    PK_LOGICAL_t                tol_tests;          /* perform tolerance tests */
+    PK_LOGICAL_t                class_tests;        /* perform class tests */
+    PK_LOGICAL_t                sense_tests;        /* perform sense tests */
+    PK_LOGICAL_t                missing_tests;      /* perform missing entity */
+    PK_LOGICAL_t                non_match_tests;    /* perform non-matched */
+    };
+
+typedef struct PK_DEBUG_BODY_compare_o_s PK_DEBUG_BODY_compare_o_t;
+
+
+
+/* PK_DEBUG_BODY_compare_o_m */
+
+#define PK_DEBUG_BODY_compare_o_m(options)                 \
+       ((options).o_t_version       = 1,                   \
+        (options).max_diffs         = 0,                   \
+        (options).all_tests         = PK_LOGICAL_true,     \
+        (options).num_tests         = PK_LOGICAL_true,     \
+        (options).acc_dev_tests     = PK_LOGICAL_true,     \
+        (options).tol_dev_tests     = PK_LOGICAL_false,    \
+        (options).tol_tests         = PK_LOGICAL_true,     \
+        (options).class_tests       = PK_LOGICAL_true,     \
+        (options).sense_tests       = PK_LOGICAL_true,     \
+        (options).missing_tests     = PK_LOGICAL_true,     \
+        (options).non_match_tests   = PK_LOGICAL_true      \
+       )
+
+
+/* PK_DEBUG_global_diffs_r_t */
+
+
+struct PK_DEBUG_global_diffs_r_s
+    {
+    PK_DEBUG_diff_t          diff;
+    int                      n_masters;
+    int                      n_similars;
+    };
+
+typedef struct PK_DEBUG_global_diffs_r_s PK_DEBUG_global_diffs_r_t;
+
+
+
+
+/* PK_DEBUG_local_diffs_r_t */
+
+
+struct PK_DEBUG_local_diffs_r_s
+    {
+    PK_DEBUG_diff_t                 diff;
+    PK_ENTITY_t                     master_entity;
+    int                             master_int;
+    double                          master_double;
+    PK_CLASS_t                      master_class;
+    PK_LOGICAL_t                    master_logical;
+    PK_ENTITY_t                     similar_entity;
+    int                             similar_int;
+    double                          similar_double;
+    PK_CLASS_t                      similar_class;
+    PK_LOGICAL_t                    similar_logical;
+    };
+
+typedef struct PK_DEBUG_local_diffs_r_s PK_DEBUG_local_diffs_r_t;
+
+
+
+
+/* PK_DEBUG_face_pair_r_t */
+
+
+struct PK_DEBUG_face_pair_r_s
+    {
+    PK_FACE_t                       master_face;
+    PK_FACE_t                       similar_face;
+    int                             n_local_diffs;
+    PK_DEBUG_local_diffs_r_t       *local_diffs;
+    };
+
+typedef struct PK_DEBUG_face_pair_r_s PK_DEBUG_face_pair_r_t;
+
+
+
+/* PK_DEBUG_BODY_compare_r_t */
+
+
+struct PK_DEBUG_BODY_compare_r_s
+    {
+    PK_DEBUG_global_res_t           global_result;
+    int                             n_global_diffs;
+    PK_DEBUG_global_diffs_r_t      *global_diffs;
+    PK_DEBUG_local_res_t            local_result;
+    int                             n_face_pairs;
+    PK_DEBUG_face_pair_r_t         *face_pairs;
+    };
+
+typedef struct PK_DEBUG_BODY_compare_r_s PK_DEBUG_BODY_compare_r_t;
+
+
+
+
+/* PK_DEBUG_data_t */
+
+struct PK_DEBUG_data_s
+    {
+    PK_LOGICAL_t             is_geom_array;    /* whether geom_array has data */
+    PK_GEOM_array_t          geom_array;       /* array of geoms */
+    PK_LOGICAL_t             is_trim_data;     /* whether trim_data has data */
+    PK_SURF_trim_data_t      trim_data;        /* trim data information */
+    };
+
+typedef struct PK_DEBUG_data_s PK_DEBUG_data_t;
+
+
+
+/* PK_DEBUG_data_m */
+
+#define PK_DEBUG_data_m(options)                                \
+    (                                                           \
+       (options).is_geom_array        = PK_LOGICAL_false,       \
+       (options).geom_array.length    = 0,                      \
+       (options).geom_array.array     = NULL,                   \
+       (options).is_trim_data         = PK_LOGICAL_false,       \
+       (options).trim_data.n_spcurves = 0,                      \
+       (options).trim_data.spcurves   = NULL,                   \
+       (options).trim_data.intervals  = NULL,                   \
+       (options).trim_data.trim_loop  = NULL,                   \
+       (options).trim_data.trim_set   = NULL                    \
+    )
+
+
+/* PK_DEBUG_report_start_o_t */
+
+struct PK_DEBUG_report_start_o_s
+    {
+    int             o_t_version;           /* options structure version number */
+    PK_LOGICAL_t    transmit_parts;        /* whether to transmit parts */
+    PK_LOGICAL_t    output_as_journal;     /* whether to output the report */
+    PK_LOGICAL_t    output_binary_parts;   /* whether to embed part files in */
+    PK_DEBUG_output_session_t
+                    output_session;        /* whether to include session data */
+    PK_DEBUG_report_cb_t
+                    report_cb;             /* whether to include debug */
+    };
+typedef struct PK_DEBUG_report_start_o_s PK_DEBUG_report_start_o_t;
+
+
+
+
+/* PK_DEBUG_report_start_o_m */
+
+#define PK_DEBUG_report_start_o_m(options)                                  \
+    (                                                                       \
+        (options).o_t_version              = 4,                             \
+        (options).transmit_parts           = PK_LOGICAL_true,               \
+        (options).output_as_journal        = PK_LOGICAL_false,              \
+        (options).output_binary_parts      = PK_LOGICAL_true,               \
+        (options).output_session           = PK_DEBUG_output_session_no_c,  \
+        (options).report_cb                = PK_DEBUG_report_cb_no_c        \
+    )
+
+
+/* PK_DEBUG_shuffle_start_o_t */
+
+struct PK_DEBUG_shuffle_start_o_s
+    {
+    int         o_t_version;     /* options structure version number */
+    int         value;           /* shuffle behaviour value (0) */
+    };
+typedef struct PK_DEBUG_shuffle_start_o_s PK_DEBUG_shuffle_start_o_t;
+
+
+/* PK_DEBUG_shuffle_start_o_m */
+
+#define PK_DEBUG_shuffle_start_o_m(options) \
+       ((options).o_t_version   = 1,        \
+        (options).value         = 0         \
+       )
+
+
+/* PK_DEBUG_try_error_handler_f_t */
+
+typedef void (*PK_DEBUG_try_error_handler_f_t)(PK_POINTER_t);
+
+
+/* PK_DEBUG_try_error_handler_o_t */
+
+struct PK_DEBUG_try_error_handler_o_s
+    {
+    int                         o_t_version;        /* version number */
+    PK_LOGICAL_t                use_protected;      /* Call from protected code */
+    PK_DEBUG_try_smp_t          smp;                /* SMP style */
+    PK_LOGICAL_t                call_from_one;      /* Call from just one SMP */
+    PK_LOGICAL_t                use_locks;          /* With SMP lock(s) on */
+    };
+
+typedef struct PK_DEBUG_try_error_handler_o_s PK_DEBUG_try_error_handler_o_t;
+
+
+
+/* PK_DEBUG_try_error_handler_o_m */
+
+#define PK_DEBUG_try_error_handler_o_m(options)                 \
+       ((options).o_t_version       = 1,                        \
+        (options).use_protected     = PK_LOGICAL_true,          \
+        (options).smp               = PK_DEBUG_try_smp_no_c,    \
+        (options).call_from_one     = PK_LOGICAL_true,          \
+        (options).use_locks         = PK_LOGICAL_false          \
+       )
+
+
+/* PK_DEBUG_SESSION_create_cb_t */
+
+typedef void (*PK_DEBUG_SESSION_create_cb_t)(PK_ITEM_t, PK_CLASS_t);
+
+
+
+/* PK_DEBUG_SESSION_destroy_cb_t */
+
+typedef void (*PK_DEBUG_SESSION_destroy_cb_t)(PK_ITEM_t, PK_CLASS_t);
+
+
+
+/* PK_DEBUG_check_fault_t */
+
+struct PK_DEBUG_check_fault_s
+    {
+    PK_check_state_t         state;        /* token indicating fault state */
+    PK_ITEM_array_t          item_array;   /* array of fault items */
+    };
+typedef struct PK_DEBUG_check_fault_s PK_DEBUG_check_fault_t;
+
+
+
+/* PK_DEBUG_SESSION_check_o_m */
+
+#define PK_DEBUG_SESSION_check_o_m(options)   \
+        ((options).o_t_version       = 1,     \
+        (options).max_faults         = 10,    \
+        (options).n_partitions       = 0,     \
+        (options).partitions         = NULL,  \
+        (options).roll_direction     = PK_DEBUG_roll_no_c \
+        )
+
+
+/* PK_DEBUG_SESSION_check_o_t */
+
+struct PK_DEBUG_SESSION_check_o_s
+{
+    int o_t_version;                           /* version number */
+    int max_faults;                            /* maximum number of faults (10) */
+    int n_partitions;                          /* number of partitions to check */
+    const PK_PARTITION_t *partitions;          /* list of partitions to check */
+    PK_DEBUG_roll_direction_t roll_direction;  /* whether and the direction to */
+
+};
+typedef struct PK_DEBUG_SESSION_check_o_s PK_DEBUG_SESSION_check_o_t;
+
+
+/* PK_DEBUG_SESSION_entry_cb_t */
+
+typedef void (*PK_DEBUG_SESSION_entry_cb_t)(const char *, PK_POINTER_t);
+
+
+
+/* PK_DEBUG_SESSION_exit_cb_t */
+
+typedef void (*PK_DEBUG_SESSION_exit_cb_t)(const char *, PK_POINTER_t);
+
+
+
+
+
+/*********************************************************************/
+/* FUNCTIONS */
+/*********************************************************************/
+
+
+#ifdef __cplusplus
+#define PK_linkage_m extern "C"
+#else
+#define PK_linkage_m extern
+#endif
+
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_BODY_compare_r_f
+(
+/* received */
+PK_DEBUG_BODY_compare_r_t *const  /*results*/     /* comparison results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_BODY_compare
+(
+/* received */
+PK_BODY_t                              /*master*/,          /* master body */
+PK_BODY_t                              /*similar*/,         /* similar body */
+const PK_DEBUG_BODY_compare_o_t      * /*options*/,         /* options structure */
+/* returned */
+PK_DEBUG_BODY_compare_r_t      *const  /*results*/          /* results structure */
+);
+/*
+This function outputs the differences between two similar bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_BODY_extract_data
+(
+/* received */
+PK_BODY_t                            /*body*/,        /* body */
+/* returned */
+PK_DEBUG_data_t              *const  /*data*/         /* saved data */
+);
+/*
+This function extracts any additional data which has been associated with
+the body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_receive
+(
+/* received */
+const char                        * /*key*/,                  /* key string */
+const PK_PART_receive_o_t         * /*options*/,              /* receive options */
+/* returned */
+PK_DEBUG_data_t             *const  /*data*/                  /* debug data */
+);
+/*
+This function receives a transmit file and extracts any additional data,
+if no data is associated, the function will return PK_ERROR_no_data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_transmit
+(
+/* received */
+const char                        * /*key*/,                 /* key string */
+const PK_DEBUG_data_t             * /*data*/,                /* debug data */
+const PK_PART_transmit_o_t        * /*options*/              /* transmit options */
+);
+/*
+This function saves additional data to a transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_data_f
+(
+/* received */
+PK_DEBUG_data_t *const  /*data*/     /* data to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_report_start
+(
+/* received */
+const char                         * /*key*/,         /* key string */
+const PK_DEBUG_report_start_o_t    * /*options*/      /* report options */
+);
+/*
+Initialises and starts the output of debug information. Any PK calls made
+between a call to this function and PK_DEBUG_report_stop will have debug
+information output to the file specified by 'key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_report_stop
+(
+void
+);
+/*
+Stops the output of debug information for PK functions. This function can only
+be called after a previous call to PK_DEBUG_report_start
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_report_comment
+(
+/* received */
+const char     * /*comment*/      /* null-terminated string to set */
+);
+/*
+Writes a comment to the debug report file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_shuffle_start
+(
+/* received */
+const PK_DEBUG_shuffle_start_o_t * /*options*/  /* options structure */
+);
+/*
+Initialises and starts the shuffling of return array arguments for some
+PK functions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_shuffle_stop
+(
+void
+);
+/*
+Stops the shuffling of return array arguments.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_try_error_handler
+(
+/* received */
+PK_DEBUG_try_error_handler_f_t         /*function*/,     /* function to be called */
+PK_POINTER_t                           /*context*/,      /* context for function */
+const PK_DEBUG_try_error_handler_o_t * /*options*/       /* options structure */
+);
+/*
+This function calls the supplied function with the supplied
+context from within executing Parasolid. The supplied function
+is called immediately, rather than being remembered for later
+use. The point of this is to allow testing of run-time error
+handlers, by calling functions that cause run-time errors, or
+call PK_SESSION_abort; it has no use in modelling.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_SESSION_watch_classes
+(
+/* received */
+PK_CLASS_array_t               /*create_classes*/,    /* classes to watch */
+PK_DEBUG_SESSION_create_cb_t   /*create_fn*/,         /* create callback */
+PK_CLASS_array_t               /*destroy_classes*/,   /* classes to watch */
+PK_DEBUG_SESSION_destroy_cb_t  /*destroy_fn*/         /* destroy callback */
+);
+/*
+This function registers arrays of item classes which are to be watched
+via two application callback functions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_SESSION_watch_items
+(
+/* received */
+PK_ITEM_array_t                /*create*/,            /* objects to watch */
+PK_DEBUG_SESSION_create_cb_t   /*create_fn*/,         /* create callback */
+PK_ITEM_array_t                /*destroy*/,           /* items to watch */
+PK_DEBUG_SESSION_destroy_cb_t  /*destroy_fn*/         /* destroy callback */
+);
+/*
+This function registers arrays of tagged items which are to be watched
+via two application callback functions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_SESSION_check
+(
+/* received */
+const PK_DEBUG_SESSION_check_o_t * /*options*/,    /* options structure */
+/* returned */
+int                        *const  /*n_faults*/,   /* number of faults */
+PK_DEBUG_check_fault_t    **const  /*faults*/      /* faults */
+);
+/*
+This function checks the session and a given list of partitions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DEBUG_SESSION_watch_fns
+(
+/* received */
+int                           /*n_fns*/,             /* number of functions */
+const char                  * /*fns*/[],             /* functions to watch */
+PK_POINTER_t                  /*entry_context*/,     /* entry context information */
+PK_POINTER_t                  /*exit_context*/,      /* exit context information */
+PK_DEBUG_SESSION_entry_cb_t   /*entry_fn*/,          /* entry callback */
+PK_DEBUG_SESSION_exit_cb_t    /*exit_fn*/            /* exit callback */
+);
+/*
+This function registers an array of PK functions that are to be watched
+via two application callback functions.
+*/
+
+
+
+#undef PK_linkage_m
+
+
+#endif /* PARASOLID_DEBUG_H_INCLUDED */
+
+
diff --git a/contrib/Parasolid/interface_parasolid/include/parasolid_ifails.h b/contrib/Parasolid/interface_parasolid/include/parasolid_ifails.h
new file mode 100644
index 0000000..c161cbf
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/parasolid_ifails.h
@@ -0,0 +1,657 @@
+/*
+  Parasolid Ifails
+
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+
+*/
+
+#ifndef PARASOLID_IFAILS_H_INCLUDED
+#define PARASOLID_IFAILS_H_INCLUDED
+
+#define KI_no_errors                        0
+#define PK_ERROR_no_errors               ((PK_ERROR_code_t)    0)
+#define KI_bad_angle                        1
+#define PK_ERROR_bad_angle               ((PK_ERROR_code_t)    1)
+#define KI_buffer_overflow                  2
+#define PK_ERROR_buffer_overflow         ((PK_ERROR_code_t)    2)
+#define KI_radii_both_0                     3
+#define PK_ERROR_radii_both_0            ((PK_ERROR_code_t)    3)
+#define KI_cone_too_sharp                   4
+#define PK_ERROR_cone_too_sharp          ((PK_ERROR_code_t)    4)
+#define KI_has_no_name                      7
+#define PK_ERROR_has_no_name             ((PK_ERROR_code_t)    7)
+#define KI_has_no_owner                     8
+#define PK_ERROR_has_no_owner            ((PK_ERROR_code_t)    8)
+#define KI_wrong_entity                    10
+#define PK_ERROR_wrong_entity            ((PK_ERROR_code_t)   10)
+#define KI_bad_name                        11
+#define PK_ERROR_bad_name                ((PK_ERROR_code_t)   11)
+#define KI_bad_type_combn                  12
+#define PK_ERROR_bad_type_combn          ((PK_ERROR_code_t)   12)
+#define KI_not_unique                      13
+#define PK_ERROR_not_unique              ((PK_ERROR_code_t)   13)
+#define KI_distance_lt_0                   14
+#define PK_ERROR_distance_lt_0           ((PK_ERROR_code_t)   14)
+#define KI_distance_le_0                   15
+#define PK_ERROR_distance_le_0           ((PK_ERROR_code_t)   15)
+#define KI_radius_le_0                     16
+#define PK_ERROR_radius_le_0             ((PK_ERROR_code_t)   16)
+#define KI_radius_lt_0                     18
+#define PK_ERROR_radius_lt_0             ((PK_ERROR_code_t)   18)
+#define KI_not_found                       19
+#define PK_ERROR_not_found               ((PK_ERROR_code_t)   19)
+#define KI_not_connected                   20
+#define PK_ERROR_not_connected           ((PK_ERROR_code_t)   20)
+#define KI_not_a_tag                       22
+#define PK_ERROR_not_a_tag               ((PK_ERROR_code_t)   22)
+#define KI_null_axis                       25
+#define PK_ERROR_null_axis               ((PK_ERROR_code_t)   25)
+#define KI_cant_open_jrnl                  27
+#define PK_ERROR_cant_open_jrnl          ((PK_ERROR_code_t)   27)
+#define KI_has_parent                      28
+#define PK_ERROR_has_parent              ((PK_ERROR_code_t)   28)
+#define KI_bad_index                       29
+#define PK_ERROR_bad_index               ((PK_ERROR_code_t)   29)
+#define KI_bad_type                        30
+#define PK_ERROR_bad_type                ((PK_ERROR_code_t)   30)
+#define KI_null_direction                  31
+#define PK_ERROR_null_direction          ((PK_ERROR_code_t)   31)
+#define KI_rot_angle_eq_0                  32
+#define PK_ERROR_rot_angle_eq_0          ((PK_ERROR_code_t)   32)
+#define KI_lt_3_sides                      33
+#define PK_ERROR_lt_3_sides              ((PK_ERROR_code_t)   33)
+#define KI_is_attached                     34
+#define PK_ERROR_is_attached             ((PK_ERROR_code_t)   34)
+#define KI_dont_intersect                  35
+#define PK_ERROR_dont_intersect          ((PK_ERROR_code_t)   35)
+#define KI_majaxi_not_perpn                36
+#define PK_ERROR_majaxi_not_perpn        ((PK_ERROR_code_t)   36)
+#define KI_wrong_transf                    37
+#define PK_ERROR_wrong_transf            ((PK_ERROR_code_t)   37)
+#define KI_bad_selection_code              38
+#define PK_ERROR_bad_selection_code      ((PK_ERROR_code_t)   38)
+#define KI_bad_value                       39
+#define PK_ERROR_bad_value               ((PK_ERROR_code_t)   39)
+#define KI_sc_factor_le_0                  40
+#define PK_ERROR_sc_factor_le_0          ((PK_ERROR_code_t)   40)
+#define KI_su_are_coincident               41
+#define PK_ERROR_su_are_coincident       ((PK_ERROR_code_t)   41)
+#define KI_bulletinb_is_off                42
+#define PK_ERROR_bulletinb_is_off        ((PK_ERROR_code_t)   42)
+#define KI_none_mergeable                  48
+#define PK_ERROR_none_mergeable          ((PK_ERROR_code_t)   48)
+#define KI_cant_do_tweak                   50
+#define PK_ERROR_cant_do_tweak           ((PK_ERROR_code_t)   50)
+#define KI_inconsistent_geom               51
+#define PK_ERROR_inconsistent_geom       ((PK_ERROR_code_t)   51)
+#define KI_not_on_face                     54
+#define PK_ERROR_not_on_face             ((PK_ERROR_code_t)   54)
+#define KI_impossible_swing                55
+#define PK_ERROR_impossible_swing        ((PK_ERROR_code_t)   55)
+#define KI_impossible_sweep                57
+#define PK_ERROR_impossible_sweep        ((PK_ERROR_code_t)   57)
+#define KI_key_not_found                   58
+#define PK_ERROR_key_not_found           ((PK_ERROR_code_t)   58)
+#define KI_not_in_same_part                59
+#define PK_ERROR_not_in_same_part        ((PK_ERROR_code_t)   59)
+#define KI_no_geometry                     61
+#define PK_ERROR_no_geometry             ((PK_ERROR_code_t)   61)
+#define KI_geom_topol_mismatch             62
+#define PK_ERROR_geom_topol_mismatch     ((PK_ERROR_code_t)   62)
+#define KI_receive_failed                  63
+#define PK_ERROR_receive_failed          ((PK_ERROR_code_t)   63)
+#define KI_geom_not_needed                 64
+#define PK_ERROR_geom_not_needed         ((PK_ERROR_code_t)   64)
+#define KI_not_on_curve                    67
+#define PK_ERROR_not_on_curve            ((PK_ERROR_code_t)   67)
+#define KI_still_referenced                68
+#define PK_ERROR_still_referenced        ((PK_ERROR_code_t)   68)
+#define KI_fragment                        73
+#define PK_ERROR_fragment                ((PK_ERROR_code_t)   73)
+#define KI_cant_find_su                    77
+#define PK_ERROR_cant_find_su            ((PK_ERROR_code_t)   77)
+#define KI_empty_list                      79
+#define PK_ERROR_empty_list              ((PK_ERROR_code_t)   79)
+#define KI_not_a_list                      80
+#define PK_ERROR_not_a_list              ((PK_ERROR_code_t)   80)
+#define KI_mass_eq_0                       82
+#define PK_ERROR_mass_eq_0               ((PK_ERROR_code_t)   82)
+#define KI_density_le_0                    85
+#define PK_ERROR_density_le_0            ((PK_ERROR_code_t)   85)
+#define KI_dont_make_solid                 87
+#define PK_ERROR_dont_make_solid         ((PK_ERROR_code_t)   87)
+#define KI_missing_geom                    96
+#define PK_ERROR_missing_geom            ((PK_ERROR_code_t)   96)
+#define KI_attr_not_found                  99
+#define PK_ERROR_attr_not_found          ((PK_ERROR_code_t)   99)
+#define KI_not_solid                      101
+#define PK_ERROR_not_solid               ((PK_ERROR_code_t)  101)
+#define KI_corrupt_body                   103
+#define PK_ERROR_corrupt_body            ((PK_ERROR_code_t)  103)
+#define KI_bad_geom_topol                 105
+#define PK_ERROR_bad_geom_topol          ((PK_ERROR_code_t)  105)
+#define KI_negative_body                  106
+#define PK_ERROR_negative_body           ((PK_ERROR_code_t)  106)
+#define KI_bad_char_string                109
+#define PK_ERROR_bad_char_string         ((PK_ERROR_code_t)  109)
+#define KI_bad_spec_code                  110
+#define PK_ERROR_bad_spec_code           ((PK_ERROR_code_t)  110)
+#define KI_weight_le_0                    111
+#define PK_ERROR_weight_le_0             ((PK_ERROR_code_t)  111)
+#define KI_illegal_degeneracy             116
+#define PK_ERROR_illegal_degeneracy      ((PK_ERROR_code_t)  116)
+#define KI_bad_parameter                  120
+#define PK_ERROR_bad_parameter           ((PK_ERROR_code_t)  120)
+#define KI_discontinuous_surface          129
+#define PK_ERROR_discontinuous_surface   ((PK_ERROR_code_t)  129)
+#define KI_discontinuous_curve            131
+#define PK_ERROR_discontinuous_curve     ((PK_ERROR_code_t)  131)
+#define KI_order_lt_2                     132
+#define PK_ERROR_order_lt_2              ((PK_ERROR_code_t)  132)
+#define KI_bad_dimension                  135
+#define PK_ERROR_bad_dimension           ((PK_ERROR_code_t)  135)
+#define KI_su_self_intersect              141
+#define PK_ERROR_su_self_intersect       ((PK_ERROR_code_t)  141)
+#define KI_cant_do_intersect              157
+#define PK_ERROR_cant_do_intersect       ((PK_ERROR_code_t)  157)
+#define KI_cant_fix_blends                330
+#define PK_ERROR_cant_fix_blends         ((PK_ERROR_code_t)  330)
+#define KI_bad_blend_bound                334
+#define PK_ERROR_bad_blend_bound         ((PK_ERROR_code_t)  334)
+#define KI_not_blended                    335
+#define PK_ERROR_not_blended             ((PK_ERROR_code_t)  335)
+#define KI_blend_didnt_check              336
+#define PK_ERROR_blend_didnt_check       ((PK_ERROR_code_t)  336)
+#define KI_bad_request_code               350
+#define PK_ERROR_bad_request_code        ((PK_ERROR_code_t)  350)
+#define KI_wrong_entity_in_list           357
+#define PK_ERROR_wrong_entity_in_list    ((PK_ERROR_code_t)  357)
+#define KI_not_same_length                359
+#define PK_ERROR_not_same_length         ((PK_ERROR_code_t)  359)
+#define KI_bad_view_mx                    360
+#define PK_ERROR_bad_view_mx             ((PK_ERROR_code_t)  360)
+#define KI_bad_pixel_map                  361
+#define PK_ERROR_bad_pixel_map           ((PK_ERROR_code_t)  361)
+#define KI_bad_light_source               364
+#define PK_ERROR_bad_light_source        ((PK_ERROR_code_t)  364)
+#define KI_eye_in_box                     367
+#define PK_ERROR_eye_in_box              ((PK_ERROR_code_t)  367)
+#define KI_cyclic_assy                    503
+#define PK_ERROR_cyclic_assy             ((PK_ERROR_code_t)  503)
+#define KI_anon_sub_part                  504
+#define PK_ERROR_anon_sub_part           ((PK_ERROR_code_t)  504)
+#define KI_different_types                505
+#define PK_ERROR_different_types         ((PK_ERROR_code_t)  505)
+#define KI_existing_attr_type             506
+#define PK_ERROR_existing_attr_type      ((PK_ERROR_code_t)  506)
+#define KI_majrad_minrad_mismatch         507
+#define PK_ERROR_majrad_minrad_mismatch  ((PK_ERROR_code_t)  507)
+#define KI_radius_sum_le_0                508
+#define PK_ERROR_radius_sum_le_0         ((PK_ERROR_code_t)  508)
+#define KI_wrong_list_type                509
+#define PK_ERROR_wrong_list_type         ((PK_ERROR_code_t)  509)
+#define KI_bad_tag_in_list                510
+#define PK_ERROR_bad_tag_in_list         ((PK_ERROR_code_t)  510)
+#define KI_duplicate_list_item            511
+#define PK_ERROR_duplicate_list_item     ((PK_ERROR_code_t)  511)
+#define KI_not_in_feat                    512
+#define PK_ERROR_not_in_feat             ((PK_ERROR_code_t)  512)
+#define KI_wrong_type_for_feat            513
+#define PK_ERROR_wrong_type_for_feat     ((PK_ERROR_code_t)  513)
+#define KI_list_too_short                 519
+#define PK_ERROR_list_too_short          ((PK_ERROR_code_t)  519)
+#define KI_already_in_feat                520
+#define PK_ERROR_already_in_feat         ((PK_ERROR_code_t)  520)
+#define KI_attr_mismatch                  522
+#define PK_ERROR_attr_mismatch           ((PK_ERROR_code_t)  522)
+#define KI_list_wrong_length              523
+#define PK_ERROR_list_wrong_length       ((PK_ERROR_code_t)  523)
+#define KI_part_not_keyed                 524
+#define PK_ERROR_part_not_keyed          ((PK_ERROR_code_t)  524)
+#define KI_cant_heal_wound                525
+#define PK_ERROR_cant_heal_wound         ((PK_ERROR_code_t)  525)
+#define KI_already_loaded                 528
+#define PK_ERROR_already_loaded          ((PK_ERROR_code_t)  528)
+#define KI_already_saved                  529
+#define PK_ERROR_already_saved           ((PK_ERROR_code_t)  529)
+#define KI_key_in_use                     530
+#define PK_ERROR_key_in_use              ((PK_ERROR_code_t)  530)
+#define KI_closed_faces                   531
+#define PK_ERROR_closed_faces            ((PK_ERROR_code_t)  531)
+#define KI_at_singularity                 532
+#define PK_ERROR_at_singularity          ((PK_ERROR_code_t)  532)
+#define KI_size_mismatch                  533
+#define PK_ERROR_size_mismatch           ((PK_ERROR_code_t)  533)
+#define KI_duplicate_tools                540
+#define PK_ERROR_duplicate_tools         ((PK_ERROR_code_t)  540)
+#define KI_instanced_tools                541
+#define PK_ERROR_instanced_tools         ((PK_ERROR_code_t)  541)
+#define KI_mixed_sheets_solids            542
+#define PK_ERROR_mixed_sheets_solids     ((PK_ERROR_code_t)  542)
+#define KI_cant_unite_solid_sheet         543
+#define PK_ERROR_cant_unite_solid_sheet  ((PK_ERROR_code_t)  543)
+#define KI_same_tool_and_target           545
+#define PK_ERROR_same_tool_and_target    ((PK_ERROR_code_t)  545)
+#define KI_invalid_bodies                 546
+#define PK_ERROR_invalid_bodies          ((PK_ERROR_code_t)  546)
+#define KI_non_manifold                   547
+#define PK_ERROR_non_manifold            ((PK_ERROR_code_t)  547)
+#define KI_t_sheet                        549
+#define PK_ERROR_t_sheet                 ((PK_ERROR_code_t)  549)
+#define KI_wrong_sub_type                 553
+#define PK_ERROR_wrong_sub_type          ((PK_ERROR_code_t)  553)
+#define KI_attr_defn_mismatch             555
+#define PK_ERROR_attr_defn_mismatch      ((PK_ERROR_code_t)  555)
+#define KI_cant_find_file                 557
+#define PK_ERROR_cant_find_file          ((PK_ERROR_code_t)  557)
+#define KI_get_snapshot_failed            558
+#define PK_ERROR_get_snapshot_failed     ((PK_ERROR_code_t)  558)
+#define KI_transmit_failed                560
+#define PK_ERROR_transmit_failed         ((PK_ERROR_code_t)  560)
+#define KI_bad_filename                   561
+#define PK_ERROR_bad_filename            ((PK_ERROR_code_t)  561)
+#define KI_save_snapshot_failed           562
+#define PK_ERROR_save_snapshot_failed    ((PK_ERROR_code_t)  562)
+#define KI_bad_key                        565
+#define PK_ERROR_bad_key                 ((PK_ERROR_code_t)  565)
+#define KI_journal_not_open               566
+#define PK_ERROR_journal_not_open        ((PK_ERROR_code_t)  566)
+#define KI_bad_state_combn                570
+#define PK_ERROR_bad_state_combn         ((PK_ERROR_code_t)  570)
+#define KI_rollmark_failed                850
+#define PK_ERROR_rollmark_failed         ((PK_ERROR_code_t)  850)
+#define KI_no_rollmark                    854
+#define PK_ERROR_no_rollmark             ((PK_ERROR_code_t)  854)
+#define KI_roll_is_off                    855
+#define PK_ERROR_roll_is_off             ((PK_ERROR_code_t)  855)
+#define KI_roll_forward_fail              856
+#define PK_ERROR_roll_forward_fail       ((PK_ERROR_code_t)  856)
+#define KI_impossible_taper               860
+#define PK_ERROR_impossible_taper        ((PK_ERROR_code_t)  860)
+#define KI_system_error                   900
+#define PK_ERROR_system_error            ((PK_ERROR_code_t)  900)
+#define KI_memory_full                    901
+#define PK_ERROR_memory_full             ((PK_ERROR_code_t)  901)
+#define KI_nitems_lt_0                    902
+#define PK_ERROR_nitems_lt_0             ((PK_ERROR_code_t)  902)
+#define KI_nitems_le_0                    903
+#define PK_ERROR_nitems_le_0             ((PK_ERROR_code_t)  903)
+#define KI_modified_sub_part              904
+#define PK_ERROR_modified_sub_part       ((PK_ERROR_code_t)  904)
+#define KI_part_not_isolated              905
+#define PK_ERROR_part_not_isolated       ((PK_ERROR_code_t)  905)
+#define KI_null_arg_address               906
+#define PK_ERROR_null_arg_address        ((PK_ERROR_code_t)  906)
+#define KI_bad_option_data                907
+#define PK_ERROR_bad_option_data         ((PK_ERROR_code_t)  907)
+#define KI_not_a_logical                  908
+#define PK_ERROR_not_a_logical           ((PK_ERROR_code_t)  908)
+#define KI_bad_box                        909
+#define PK_ERROR_bad_box                 ((PK_ERROR_code_t)  909)
+#define KI_bad_position                   911
+#define PK_ERROR_bad_position            ((PK_ERROR_code_t)  911)
+#define KI_empty_assy                     912
+#define PK_ERROR_empty_assy              ((PK_ERROR_code_t)  912)
+#define KI_keyed_part_mismatch            913
+#define PK_ERROR_keyed_part_mismatch     ((PK_ERROR_code_t)  913)
+#define KI_unsuitable_entity              914
+#define PK_ERROR_unsuitable_entity       ((PK_ERROR_code_t)  914)
+#define KI_not_on_surface                 915
+#define PK_ERROR_not_on_surface          ((PK_ERROR_code_t)  915)
+#define KI_bad_shared_entity              916
+#define PK_ERROR_bad_shared_entity       ((PK_ERROR_code_t)  916)
+#define KI_bad_shared_dep                 917
+#define PK_ERROR_bad_shared_dep          ((PK_ERROR_code_t)  917)
+#define KI_attr_type_not_defined          919
+#define PK_ERROR_attr_type_not_defined   ((PK_ERROR_code_t)  919)
+#define KI_bad_blend_param                920
+#define PK_ERROR_bad_blend_param         ((PK_ERROR_code_t)  920)
+#define KI_bad_sharing                    921
+#define PK_ERROR_bad_sharing             ((PK_ERROR_code_t)  921)
+#define KI_corrupt_file                   922
+#define PK_ERROR_corrupt_file            ((PK_ERROR_code_t)  922)
+#define KI_wrong_version                  923
+#define PK_ERROR_wrong_version           ((PK_ERROR_code_t)  923)
+#define KI_not_at_rollmark                924
+#define PK_ERROR_not_at_rollmark         ((PK_ERROR_code_t)  924)
+#define KI_radius_eq_0                    925
+#define PK_ERROR_radius_eq_0             ((PK_ERROR_code_t)  925)
+#define KI_radius_too_large               926
+#define PK_ERROR_radius_too_large        ((PK_ERROR_code_t)  926)
+#define KI_distance_too_large             927
+#define PK_ERROR_distance_too_large      ((PK_ERROR_code_t)  927)
+#define KI_cant_open_file                 928
+#define PK_ERROR_cant_open_file          ((PK_ERROR_code_t)  928)
+#define KI_at_terminator                  929
+#define PK_ERROR_at_terminator           ((PK_ERROR_code_t)  929)
+#define KI_bad_precision                  930
+#define PK_ERROR_bad_precision           ((PK_ERROR_code_t)  930)
+#define KI_modeller_not_started           931
+#define PK_ERROR_modeller_not_started    ((PK_ERROR_code_t)  931)
+#define KI_modeller_not_stopped           932
+#define PK_ERROR_modeller_not_stopped    ((PK_ERROR_code_t)  932)
+#define KI_bad_user_field_size            933
+#define PK_ERROR_bad_user_field_size     ((PK_ERROR_code_t)  933)
+#define KI_recursive_call                 934
+#define PK_ERROR_recursive_call          ((PK_ERROR_code_t)  934)
+#define KI_bad_hull                       935
+#define PK_ERROR_bad_hull                ((PK_ERROR_code_t)  935)
+#define KI_usfd_mismatch                  936
+#define PK_ERROR_usfd_mismatch           ((PK_ERROR_code_t)  936)
+#define KI_wrong_format                   937
+#define PK_ERROR_wrong_format            ((PK_ERROR_code_t)  937)
+#define KI_wire_body                      938
+#define PK_ERROR_wire_body               ((PK_ERROR_code_t)  938)
+#define KI_not_sheet                      939
+#define PK_ERROR_not_sheet               ((PK_ERROR_code_t)  939)
+#define KI_bad_wire                       940
+#define PK_ERROR_bad_wire                ((PK_ERROR_code_t)  940)
+#define KI_bad_end_points                 941
+#define PK_ERROR_bad_end_points          ((PK_ERROR_code_t)  941)
+#define KI_crossing_edge                  942
+#define PK_ERROR_crossing_edge           ((PK_ERROR_code_t)  942)
+#define KI_crossing_vertex                943
+#define PK_ERROR_crossing_vertex         ((PK_ERROR_code_t)  943)
+#define KI_bad_vertex                     944
+#define PK_ERROR_bad_vertex              ((PK_ERROR_code_t)  944)
+#define KI_aborted                        945
+#define PK_ERROR_aborted                 ((PK_ERROR_code_t)  945)
+#define KI_not_interrupted                946
+#define PK_ERROR_not_interrupted         ((PK_ERROR_code_t)  946)
+#define KI_run_time_error                 947
+#define PK_ERROR_run_time_error          ((PK_ERROR_code_t)  947)
+#define KI_fatal_error                    948
+#define PK_ERROR_fatal_error             ((PK_ERROR_code_t)  948)
+#define KI_no_user_fields                 949
+#define PK_ERROR_no_user_fields          ((PK_ERROR_code_t)  949)
+#define KI_wrong_surface                  950
+#define PK_ERROR_wrong_surface           ((PK_ERROR_code_t)  950)
+#define KI_opposed_sheets                 951
+#define PK_ERROR_opposed_sheets          ((PK_ERROR_code_t)  951)
+#define KI_coplanar                       952
+#define PK_ERROR_coplanar                ((PK_ERROR_code_t)  952)
+#define KI_bad_accuracy                   956
+#define PK_ERROR_bad_accuracy            ((PK_ERROR_code_t)  956)
+#define KI_coincident                     957
+#define PK_ERROR_coincident              ((PK_ERROR_code_t)  957)
+#define KI_atol_too_small                 958
+#define PK_ERROR_atol_too_small          ((PK_ERROR_code_t)  958)
+#define KI_ctol_too_small                 959
+#define PK_ERROR_ctol_too_small          ((PK_ERROR_code_t)  959)
+#define KI_stol_too_small                 960
+#define PK_ERROR_stol_too_small          ((PK_ERROR_code_t)  960)
+#define KI_wrong_direction                961
+#define PK_ERROR_wrong_direction         ((PK_ERROR_code_t)  961)
+#define KI_non_orth_matrix                962
+#define PK_ERROR_non_orth_matrix         ((PK_ERROR_code_t)  962)
+#define KI_bad_component                  963
+#define PK_ERROR_bad_component           ((PK_ERROR_code_t)  963)
+#define KI_bad_rollfile_size              964
+#define PK_ERROR_bad_rollfile_size       ((PK_ERROR_code_t)  964)
+#define KI_cant_be_aborted                965
+#define PK_ERROR_cant_be_aborted         ((PK_ERROR_code_t)  965)
+#define KI_hulls_intersect                966
+#define PK_ERROR_hulls_intersect         ((PK_ERROR_code_t)  966)
+#define KI_abort_from_go                  967
+#define PK_ERROR_abort_from_go           ((PK_ERROR_code_t)  967)
+#define KI_all_faces_in_body              969
+#define PK_ERROR_all_faces_in_body       ((PK_ERROR_code_t)  969)
+#define KI_schema_access_error            970
+#define PK_ERROR_schema_access_error     ((PK_ERROR_code_t)  970)
+#define KI_schema_corrupt                 971
+#define PK_ERROR_schema_corrupt          ((PK_ERROR_code_t)  971)
+#define KI_cant_intsc_solid_sheet         972
+#define PK_ERROR_cant_intsc_solid_sheet  ((PK_ERROR_code_t)  972)
+#define KI_file_access_error              973
+#define PK_ERROR_file_access_error       ((PK_ERROR_code_t)  973)
+#define KI_bad_file_format                974
+#define PK_ERROR_bad_file_format         ((PK_ERROR_code_t)  974)
+#define KI_bad_file_guise                 975
+#define PK_ERROR_bad_file_guise          ((PK_ERROR_code_t)  975)
+#define KI_bad_rolling_ball               976
+#define PK_ERROR_bad_rolling_ball        ((PK_ERROR_code_t)  976)
+#define KI_coincident_points              977
+#define PK_ERROR_coincident_points       ((PK_ERROR_code_t)  977)
+#define KI_bad_knots                      978
+#define PK_ERROR_bad_knots               ((PK_ERROR_code_t)  978)
+#define KI_bad_derivative                 979
+#define PK_ERROR_bad_derivative          ((PK_ERROR_code_t)  979)
+#define KI_wrong_number_knots             980
+#define PK_ERROR_wrong_number_knots      ((PK_ERROR_code_t)  980)
+#define KI_wrong_number_derivs            981
+#define PK_ERROR_wrong_number_derivs     ((PK_ERROR_code_t)  981)
+#define KI_incompatible_props             982
+#define PK_ERROR_incompatible_props      ((PK_ERROR_code_t)  982)
+#define KI_repeated_knots                 983
+#define PK_ERROR_repeated_knots          ((PK_ERROR_code_t)  983)
+#define KI_curves_dont_meet               984
+#define PK_ERROR_curves_dont_meet        ((PK_ERROR_code_t)  984)
+#define KI_insufficient_curves            985
+#define PK_ERROR_insufficient_curves     ((PK_ERROR_code_t)  985)
+#define KI_bad_curves                     986
+#define PK_ERROR_bad_curves              ((PK_ERROR_code_t)  986)
+#define KI_bad_order                      987
+#define PK_ERROR_bad_order               ((PK_ERROR_code_t)  987)
+#define KI_insufficient_points            988
+#define PK_ERROR_insufficient_points     ((PK_ERROR_code_t)  988)
+#define KI_bad_parametric_prop            989
+#define PK_ERROR_bad_parametric_prop     ((PK_ERROR_code_t)  989)
+#define KI_illegal_owner                  990
+#define PK_ERROR_illegal_owner           ((PK_ERROR_code_t)  990)
+#define KI_unchecked_entity               991
+#define PK_ERROR_unchecked_entity        ((PK_ERROR_code_t)  991)
+#define KI_incompatible_curves            992
+#define PK_ERROR_incompatible_curves     ((PK_ERROR_code_t)  992)
+#define KI_cant_make_bspline              993
+#define PK_ERROR_cant_make_bspline       ((PK_ERROR_code_t)  993)
+#define KI_cu_are_coincident              994
+#define PK_ERROR_cu_are_coincident       ((PK_ERROR_code_t)  994)
+#define KI_withdrawn_surface              995
+#define PK_ERROR_withdrawn_surface       ((PK_ERROR_code_t)  995)
+#define KI_face_not_planar                996
+#define PK_ERROR_face_not_planar         ((PK_ERROR_code_t)  996)
+#define KI_request_not_supported          997
+#define PK_ERROR_request_not_supported   ((PK_ERROR_code_t)  997)
+#define KI_contradictory_request          998
+#define PK_ERROR_contradictory_request   ((PK_ERROR_code_t)  998)
+#define KI_invalid_geometry               999
+#define PK_ERROR_invalid_geometry        ((PK_ERROR_code_t)  999)
+#define KI_file_already_exists           1000
+#define PK_ERROR_file_already_exists     ((PK_ERROR_code_t) 1000)
+#define KI_too_many_control_pts          1001
+#define PK_ERROR_too_many_control_pts    ((PK_ERROR_code_t) 1001)
+#define KI_bad_string                    1002
+#define PK_ERROR_bad_string              ((PK_ERROR_code_t) 1002)
+#define KI_mend_attempt_failure          1003
+#define PK_ERROR_mend_attempt_failure    ((PK_ERROR_code_t) 1003)
+#define KI_bad_tag_in_list_tree          1004
+#define PK_ERROR_bad_tag_in_list_tree    ((PK_ERROR_code_t) 1004)
+#define KI_bad_list_tree                 1005
+#define PK_ERROR_bad_list_tree           ((PK_ERROR_code_t) 1005)
+#define KI_cyclic_list_reference         1006
+#define PK_ERROR_cyclic_list_reference   ((PK_ERROR_code_t) 1006)
+#define KI_empty_list_in_tree            1007
+#define PK_ERROR_empty_list_in_tree      ((PK_ERROR_code_t) 1007)
+#define KI_cant_make_trimmed_sf          1008
+#define PK_ERROR_cant_make_trimmed_sf    ((PK_ERROR_code_t) 1008)
+#define KI_bad_entity_event_comb         1009
+#define PK_ERROR_bad_entity_event_comb   ((PK_ERROR_code_t) 1009)
+#define KI_too_many_derivatives          1010
+#define PK_ERROR_too_many_derivatives    ((PK_ERROR_code_t) 1010)
+#define KI_bad_deriv_vertices            1011
+#define PK_ERROR_bad_deriv_vertices      ((PK_ERROR_code_t) 1011)
+#define KI_bad_degen_vertices            1012
+#define PK_ERROR_bad_degen_vertices      ((PK_ERROR_code_t) 1012)
+#define KI_not_on_edge                   1013
+#define PK_ERROR_not_on_edge             ((PK_ERROR_code_t) 1013)
+#define KI_closest_approach_failed       1014
+#define KI_cant_do_clash                 1015
+#define PK_ERROR_cant_do_clash           ((PK_ERROR_code_t) 1015)
+#define KI_targ_faces_many_bodies        1016
+#define PK_ERROR_targ_faces_many_bodies  ((PK_ERROR_code_t) 1016)
+#define KI_tool_faces_many_bodies        1017
+#define PK_ERROR_tool_faces_many_bodies  ((PK_ERROR_code_t) 1017)
+#define KI_cant_do_imprint               1018
+#define PK_ERROR_cant_do_imprint         ((PK_ERROR_code_t) 1018)
+#define KI_topol_not_from_body           1019
+#define PK_ERROR_topol_not_from_body     ((PK_ERROR_code_t) 1019)
+#define KI_inconsistent_facesets         1020
+#define PK_ERROR_inconsistent_facesets   ((PK_ERROR_code_t) 1020)
+#define KI_FG_evaluator_not_found        1021
+#define PK_ERROR_FG_evaluator_not_found  ((PK_ERROR_code_t) 1021)
+#define KI_FG_data_alloc_error           1022
+#define PK_ERROR_FG_data_alloc_error     ((PK_ERROR_code_t) 1022)
+#define KI_FG_data_not_found             1023
+#define PK_ERROR_FG_data_not_found       ((PK_ERROR_code_t) 1023)
+#define KI_FG_evaluator_error            1024
+#define PK_ERROR_FG_evaluator_error      ((PK_ERROR_code_t) 1024)
+#define KI_FG_modelling_error            1025
+#define PK_ERROR_FG_modelling_error      ((PK_ERROR_code_t) 1025)
+#define KI_solid_body                    1026
+#define PK_ERROR_solid_body              ((PK_ERROR_code_t) 1026)
+#define KI_different_bodies              1027
+#define PK_ERROR_different_bodies        ((PK_ERROR_code_t) 1027)
+#define KI_wrong_number_edges            1028
+#define PK_ERROR_wrong_number_edges      ((PK_ERROR_code_t) 1028)
+#define KI_cant_blend_vertex             1029
+#define PK_ERROR_cant_blend_vertex       ((PK_ERROR_code_t) 1029)
+#define KI_blends_overlap                1030
+#define PK_ERROR_blends_overlap          ((PK_ERROR_code_t) 1030)
+#define KI_edges_intersect               1031
+#define PK_ERROR_edges_intersect         ((PK_ERROR_code_t) 1031)
+#define KI_not_in_same_body              1032
+#define PK_ERROR_not_in_same_body        ((PK_ERROR_code_t) 1032)
+#define KI_unsuitable_topology           1033
+#define PK_ERROR_unsuitable_topology     ((PK_ERROR_code_t) 1033)
+#define KI_cu_self_intersect             1034
+#define PK_ERROR_cu_self_intersect       ((PK_ERROR_code_t) 1034)
+#define KI_linear_multi_seg              1035
+#define PK_ERROR_linear_multi_seg        ((PK_ERROR_code_t) 1035)
+#define KI_no_eds_from_target            1036
+#define PK_ERROR_no_eds_from_target      ((PK_ERROR_code_t) 1036)
+#define KI_cant_offset                   1037
+#define PK_ERROR_cant_offset             ((PK_ERROR_code_t) 1037)
+#define KI_FG_real_data_error            1038
+#define PK_ERROR_FG_real_data_error      ((PK_ERROR_code_t) 1038)
+#define KI_FG_integer_data_error         1039
+#define PK_ERROR_FG_integer_data_error   ((PK_ERROR_code_t) 1039)
+#define KI_partial_coi_found             1040
+#define PK_ERROR_partial_coi_found       ((PK_ERROR_code_t) 1040)
+#define KI_bodies_dont_knit              1041
+#define PK_ERROR_bodies_dont_knit        ((PK_ERROR_code_t) 1041)
+#define KI_pattern_invalid               1042
+#define PK_ERROR_pattern_invalid         ((PK_ERROR_code_t) 1042)
+#define KI_bad_tolerance                 1043
+#define PK_ERROR_bad_tolerance           ((PK_ERROR_code_t) 1043)
+#define KI_cant_extract_geom             1044
+#define PK_ERROR_cant_extract_geom       ((PK_ERROR_code_t) 1044)
+#define KI_bad_basis_surf                1045
+#define PK_ERROR_bad_basis_surf          ((PK_ERROR_code_t) 1045)
+#define KI_FG_receive_failure            1046
+#define PK_ERROR_FG_receive_failure      ((PK_ERROR_code_t) 1046)
+#define KI_FG_snapshot_failure           1047
+#define PK_ERROR_FG_snapshot_failure     ((PK_ERROR_code_t) 1047)
+#define KI_cant_create_pattern           1048
+#define PK_ERROR_cant_create_pattern     ((PK_ERROR_code_t) 1048)
+#define KI_tag_limit_exceeded            1049
+#define PK_ERROR_tag_limit_exceeded      ((PK_ERROR_code_t) 1049)
+#define KI_tag_limit_out_of_range        1050
+#define PK_ERROR_tag_limit_out_of_range  ((PK_ERROR_code_t) 1050)
+#define KI_cant_find_extreme             1051
+#define PK_ERROR_cant_find_extreme       ((PK_ERROR_code_t) 1051)
+#define KI_disc_full                     1052
+#define PK_ERROR_disc_full               ((PK_ERROR_code_t) 1052)
+#define KI_cant_find_derivs              1053
+#define PK_ERROR_cant_find_derivs        ((PK_ERROR_code_t) 1053)
+#define KI_too_many_targets              1054
+#define PK_ERROR_too_many_targets        ((PK_ERROR_code_t) 1054)
+#define KI_duplicate_targets             1055
+#define PK_ERROR_duplicate_targets       ((PK_ERROR_code_t) 1055)
+#define KI_curve_already_trimmed         1056
+#define PK_ERROR_curve_already_trimmed   ((PK_ERROR_code_t) 1056)
+#define KI_curve_too_short               1057
+#define PK_ERROR_curve_too_short         ((PK_ERROR_code_t) 1057)
+#define KI_boolean_failure               1058
+#define PK_ERROR_boolean_failure         ((PK_ERROR_code_t) 1058)
+#define KI_duplicate_item                1059
+#define PK_ERROR_duplicate_item          ((PK_ERROR_code_t) 1059)
+#define KI_failed_to_trim                1060
+#define PK_ERROR_failed_to_trim          ((PK_ERROR_code_t) 1060)
+#define KI_unsuitable_loop               1061
+#define PK_ERROR_unsuitable_loop         ((PK_ERROR_code_t) 1061)
+#define KI_failed_to_replace             1062
+#define PK_ERROR_failed_to_replace       ((PK_ERROR_code_t) 1062)
+#define KI_failed_to_create_sp           1063
+#define PK_ERROR_failed_to_create_sp     ((PK_ERROR_code_t) 1063)
+#define KI_tolerances_too_tight          1064
+#define PK_ERROR_tolerances_too_tight    ((PK_ERROR_code_t) 1064)
+#define KI_fru_error                     1065
+#define PK_ERROR_fru_error               ((PK_ERROR_code_t) 1065)
+#define KI_incorrect_mc_conf             1066
+#define PK_ERROR_incorrect_mc_conf       ((PK_ERROR_code_t) 1066)
+#define KI_partial_no_intersect          1067
+#define PK_ERROR_partial_no_intersect    ((PK_ERROR_code_t) 1067)
+#define KI_none_shared                   1068
+#define PK_ERROR_none_shared             ((PK_ERROR_code_t) 1068)
+#define KI_cant_hollow                   1069
+#define PK_ERROR_cant_hollow             ((PK_ERROR_code_t) 1069)
+#define KI_not_in_same_shell             1070
+#define PK_ERROR_not_in_same_shell       ((PK_ERROR_code_t) 1070)
+#define KI_general_body                  1071
+#define PK_ERROR_general_body            ((PK_ERROR_code_t) 1071)
+#define KI_bad_thickness                 1072
+#define PK_ERROR_bad_thickness           ((PK_ERROR_code_t) 1072)
+#define KI_non_smooth_edge               1073
+#define PK_ERROR_non_smooth_edge         ((PK_ERROR_code_t) 1073)
+#define KI_degenerate_vertex             1074
+#define PK_ERROR_degenerate_vertex       ((PK_ERROR_code_t) 1074)
+#define KI_cant_thicken                  1075
+#define PK_ERROR_cant_thicken            ((PK_ERROR_code_t) 1075)
+#define KI_crossing_face                 1076
+#define PK_ERROR_crossing_face           ((PK_ERROR_code_t) 1076)
+#define KI_not_in_region                 1077
+#define PK_ERROR_not_in_region           ((PK_ERROR_code_t) 1077)
+#define KI_empty_body                    1078
+#define PK_ERROR_empty_body              ((PK_ERROR_code_t) 1078)
+#define KI_sheet_untrimmed               1079
+#define PK_ERROR_sheet_untrimmed         ((PK_ERROR_code_t) 1079)
+#define KI_fxf_blend_failed              1080
+#define PK_ERROR_fxf_blend_failed        ((PK_ERROR_code_t) 1080)
+#define KI_fxf_blend_bad_token           1081
+#define PK_ERROR_fxf_blend_bad_token     ((PK_ERROR_code_t) 1081)
+#define KI_file_read_corruption          1082
+#define PK_ERROR_file_read_corruption    ((PK_ERROR_code_t) 1082)
+#define KI_trim_loop_degenerate          1083
+#define PK_ERROR_trim_loop_degenerate    ((PK_ERROR_code_t) 1083)
+#define KI_solid_has_void                1084
+#define PK_ERROR_solid_has_void          ((PK_ERROR_code_t) 1084)
+#define KI_fru_missing                   1085
+#define PK_ERROR_fru_missing             ((PK_ERROR_code_t) 1085)
+#define KI_not_in_same_partition         1086
+#define PK_ERROR_not_in_same_partition   ((PK_ERROR_code_t) 1086)
+#define KI_instanced_body                1087
+#define PK_ERROR_instanced_body          ((PK_ERROR_code_t) 1087)
+#define KI_entity_not_new                1088
+#define PK_ERROR_entity_not_new          ((PK_ERROR_code_t) 1088)
+#define KI_applio_not_registered         1089
+#define PK_ERROR_applio_not_registered   ((PK_ERROR_code_t) 1089)
+#define KI_more_than_one_part            1090
+#define PK_ERROR_more_than_one_part      ((PK_ERROR_code_t) 1090)
+#define KI_bad_field_conversion          1091
+#define PK_ERROR_bad_field_conversion    ((PK_ERROR_code_t) 1091)
+#define KI_bad_text_conversion           1092
+#define PK_ERROR_bad_text_conversion     ((PK_ERROR_code_t) 1092)
+#define KI_not_licensed                  1093
+#define PK_ERROR_not_licensed            ((PK_ERROR_code_t) 1093)
+#define KI_schema_incompatible           1094
+#define PK_ERROR_schema_incompatible     ((PK_ERROR_code_t) 1094)
+#define KI_write_memory_full             1095
+#define PK_ERROR_write_memory_full       ((PK_ERROR_code_t) 1095)
+#define KI_compound_body                 1096
+#define PK_ERROR_compound_body           ((PK_ERROR_code_t) 1096)
+#define PK_ERROR_ok                      ((PK_ERROR_code_t)    0)
+
+#endif /* PARASOLID_IFAILS_H_INCLUDED */
+
diff --git a/contrib/Parasolid/interface_parasolid/include/parasolid_kernel.h b/contrib/Parasolid/interface_parasolid/include/parasolid_kernel.h
new file mode 100644
index 0000000..418c3fb
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/parasolid_kernel.h
@@ -0,0 +1,29735 @@
+/*
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+*/
+
+#ifndef PARASOLID_KERNEL_H_INCLUDED
+#define PARASOLID_KERNEL_H_INCLUDED
+
+
+#include <stddef.h>
+#include "parasolid_ifails.h"
+#include "parasolid_tokens.h"
+
+
+/*********************************************************************/
+/* TYPEDEFS */
+/*********************************************************************/
+
+typedef int PK_enclosure_t;
+typedef int PK_ATTDEF_class_t;
+typedef int PK_ATTRIB_field_t;
+typedef int PK_boolean_function_t;
+typedef int PK_boolean_region_t;
+typedef int PK_BODY_type_t;
+typedef int PK_VERTEX_type_t;
+typedef int PK_LOOP_type_t;
+typedef int PK_intersect_vector_t;
+typedef int PK_intersect_curve_t;
+typedef int PK_intersect_fc_t;
+typedef int PK_reset_prec_t;
+typedef int PK_mass_t;
+typedef int PK_mass_periphery_t;
+typedef int PK_mass_bound_t;
+typedef int PK_check_state_t;
+typedef int PK_FACE_trim_confine_t;
+typedef int PK_FACE_trim_degen_t;
+typedef int PK_BB_status_t;
+typedef int PK_BB_event_t;
+typedef int PK_blend_trim_t;
+typedef int PK_fxf_fault_t;
+typedef int PK_BODY_fault_t;
+typedef int PK_abort_reason_t;
+typedef int PK_BODY_knit_status_t;
+typedef int PK_SHELL_type_t;
+typedef int PK_SHELL_sign_t;
+typedef int PK_FIN_type_t;
+typedef int PK_EDGE_vertex_type_t;
+typedef int PK_EDGE_fins_type_t;
+typedef int PK_neutral_error_t;
+typedef int PK_knot_type_t;
+typedef int PK_self_intersect_t;
+typedef int PK_convexity_t;
+typedef int PK_BCURVE_form_t;
+typedef int PK_BSURF_form_t;
+typedef int PK_HAND_t;
+typedef int PK_PARAM_bound_t;
+typedef int PK_PARAM_periodic_t;
+typedef int PK_PARAM_form_t;
+typedef int PK_BODY_sewing_problem_t;
+typedef int PK_BODY_sewing_type_t;
+typedef int PK_BODY_sewing_removal_t;
+typedef int PK_FACE_heal_t;
+typedef int PK_local_check_t;
+typedef int PK_section_fence_t;
+typedef int PK_boolean_fence_t;
+typedef int PK_transmit_format_t;
+typedef int PK_PARTITION_xmt_deltas_t;
+typedef int PK_PARTITION_rcv_deltas_t;
+typedef int PK_boolean_match_t;
+typedef int PK_range_guess_type_t;
+typedef int PK_range_result_t;
+typedef int PK_check_geom_t;
+typedef int PK_check_bgeom_t;
+typedef int PK_check_top_geo_t;
+typedef int PK_check_size_box_t;
+typedef int PK_check_fa_X_t;
+typedef int PK_check_loops_t;
+typedef int PK_check_fa_fa_t;
+typedef int PK_check_sh_t;
+typedef int PK_check_corrupt_t;
+typedef int PK_FACE_trim_surf_t;
+typedef int PK_blend_check_t;
+typedef int PK_blend_fault_t;
+typedef int PK_blend_type_t;
+typedef int PK_blend_propagate_t;
+typedef int PK_blend_vary_t;
+typedef int PK_blend_render_rib_t;
+typedef int PK_blend_ov_smooth_t;
+typedef int PK_blend_ov_cliff_t;
+typedef int PK_blend_ov_cliff_end_t;
+typedef int PK_blend_ov_notch_t;
+typedef int PK_blend_walls_t;
+typedef int PK_blend_cs_t;
+typedef int PK_blend_xs_plane_t;
+typedef int PK_piecewise_rep_t;
+typedef int PK_PARAM_end_t;
+typedef int PK_PARAM_knot_t;
+typedef int PK_PARAM_twist_t;
+typedef int PK_TOPOL_sense_t;
+typedef int PK_PARAM_degen_t;
+typedef int PK_render_edge_t;
+typedef int PK_render_silhouette_t;
+typedef int PK_render_planar_t;
+typedef int PK_render_radial_t;
+typedef int PK_render_param_t;
+typedef int PK_render_unfix_t;
+typedef int PK_render_boundary_t;
+typedef int PK_render_transparent_t;
+typedef int PK_render_transp_hid_t;
+typedef int PK_render_vis_t;
+typedef int PK_render_smooth_t;
+typedef int PK_render_internal_t;
+typedef int PK_render_region_t;
+typedef int PK_render_hierarch_t;
+typedef int PK_render_bcurve_t;
+typedef int PK_render_viewport_t;
+typedef int PK_render_invisible_t;
+typedef int PK_render_drafting_t;
+typedef int PK_render_self_hidden_t;
+typedef int PK_render_viewport_clip_t;
+typedef int PK_render_viewport_type_t;
+typedef int PK_render_line_t;
+typedef int PK_facet_shape_t;
+typedef int PK_facet_match_t;
+typedef int PK_facet_density_t;
+typedef int PK_facet_cull_t;
+typedef int PK_facet_degen_t;
+typedef int PK_facet_go_normals_t;
+typedef int PK_facet_go_parameters_t;
+typedef int PK_facet_go_edges_t;
+typedef int PK_facet_go_strips_t;
+typedef int PK_facet_go_interleaved_t;
+typedef int PK_facet_fault_t;
+typedef int PK_BODY_pick_method_t;
+typedef int PK_boolean_select_t;
+typedef int PK_thread_t;
+typedef int PK_blend_output_rib_t;
+typedef int PK_blend_group_rib_t;
+typedef int PK_blend_check_su_X_t;
+typedef int PK_blend_check_fa_t;
+typedef int PK_blend_check_fa_fa_t;
+typedef int PK_blend_update_t;
+typedef int PK_BCURVE_fit_eval_type_t;
+typedef int PK_BCURVE_fit_err_method_t;
+typedef int PK_BCURVE_fit_t;
+typedef int PK_BODY_curve_nmnl_t;
+typedef int PK_LOOP_opl_gap_fill_t;
+typedef int PK_BODY_owb_gap_fill_t;
+typedef int PK_pattern_check_fa_fa_t;
+typedef int PK_pattern_check_loops_t;
+typedef int PK_pattern_status_t;
+typedef int PK_pattern_same_face_t;
+typedef int PK_pattern_coi_face_t;
+typedef int PK_pattern_result_t;
+typedef int PK_pattern_reblend_t;
+typedef int PK_pattern_collision_t;
+typedef int PK_local_check_su_X_t;
+typedef int PK_local_check_topol_t;
+typedef int PK_local_change_topol_t;
+typedef int PK_local_status_t;
+typedef int PK_TOPOL_track_t;
+typedef int PK_BODY_simplify_t;
+typedef int PK_BODY_loft_curvature_t;
+typedef int PK_BODY_loft_clamp_type_t;
+typedef int PK_BODY_loft_fault_t;
+typedef int PK_BODY_sweep_alignment_t;
+typedef int PK_BODY_sweep_law_type_t;
+typedef int PK_BODY_sweep_fault_t;
+typedef int PK_boolean_report_t;
+typedef int PK_boolean_result_t;
+typedef int PK_section_report_t;
+typedef int PK_section_result_t;
+typedef int PK_blend_transfer_topol_t;
+typedef int PK_local_check_fa_fa_t;
+typedef int PK_boolean_check_fa_t;
+typedef int PK_section_check_fa_t;
+typedef int PK_render_ignore_t;
+typedef int PK_BODY_topology_t;
+typedef int PK_step_surf_t;
+typedef int PK_taper_method_t;
+typedef int PK_bound_t;
+typedef int PK_render_overlap_t;
+typedef int PK_FACE_coi_t;
+typedef int PK_DEBUG_global_res_t;
+typedef int PK_DEBUG_local_res_t;
+typedef int PK_DEBUG_diff_t;
+typedef int PK_boolean_match_style_t;
+typedef int PK_SURF_extend_status_t;
+typedef int PK_SURF_extension_t;
+typedef int PK_thicken_method_t;
+typedef int PK_ATTDEF_callback_type_t;
+typedef int PK_FACE_change_type_t;
+typedef int PK_PARAM_direction_t;
+typedef int PK_fill_hole_fault_t;
+typedef int PK_fill_hole_method_t;
+typedef int PK_facet_ignore_t;
+typedef int PK_CURVE_approx_t;
+typedef int PK_facet_ignore_scope_t;
+typedef int PK_facet_wire_edges_t;
+typedef int PK_offset_method_t;
+typedef int PK_render_memory_target_t;
+typedef int PK_outline_project_t;
+typedef int PK_pick_approximate_t;
+typedef int PK_blend_edge_update_t;
+typedef int PK_blend_xs_shape_t;
+typedef int PK_BODY_sweep_fair_t;
+typedef int PK_comparison_t;
+typedef int PK_blend_identify_t;
+typedef int PK_detail_t;
+typedef int PK_replace_merge_t;
+typedef int PK_offset_step_t;
+typedef int PK_blend_orientation_t;
+typedef int PK_3_face_blend_t;
+typedef int PK_FACE_simplify_t;
+typedef int PK_blend_convexity_t;
+typedef int PK_fill_hole_preference_t;
+typedef int PK_blend_set_tol_t;
+typedef int PK_hole_blended_t;
+typedef int PK_taper_corner_type_t;
+typedef int PK_VERTEX_optimise_result_t;
+typedef int PK_VERTEX_max_dev_t;
+typedef int PK_taper_smooth_step_t;
+typedef int PK_hole_update_t;
+typedef int PK_TOPOL_fctab_t;
+typedef int PK_facet_split_strip_t;
+typedef int PK_facet_consistent_parms_t;
+typedef int PK_BODY_loft_update_t;
+typedef int PK_taper_miter_type_t;
+typedef int PK_BODY_sweep_scale_type_t;
+typedef int PK_facet_vx_data_type_t;
+typedef int PK_facet_incr_t;
+typedef int PK_facet_incr_refine_t;
+typedef int PK_facet_incr_report_t;
+typedef int PK_hole_const_rad_t;
+typedef int PK_hole_ortho_t;
+typedef int PK_fill_hole_update_t;
+typedef int PK_FACE_change_bend_type_t;
+typedef int PK_bend_merge_t;
+typedef int PK_EDGE_offset_blend_t;
+typedef int PK_replace_adjust_t;
+typedef int PK_replace_use_t;
+typedef int PK_hole_comp_t;
+typedef int PK_detail_type_t;
+typedef int PK_blend_repair_su_X_t;
+typedef int PK_blend_output_sheet_t;
+typedef int PK_local_ops_update_t;
+typedef PK_local_ops_update_t PK_replace_update_t;
+typedef int PK_fill_hole_topol_t;
+typedef int PK_extension_shape_t;
+typedef int PK_BODY_extension_t;
+typedef int PK_BODY_loft_deriv_mag_t;
+typedef int PK_imprint_complete_t;
+typedef int PK_imprint_extend_t;
+typedef int PK_facet_inflect_t;
+typedef int PK_imprint_connect_t;
+typedef int PK_range_type_t;
+typedef int PK_boolean_material_t;
+typedef int PK_DEBUG_roll_direction_t;
+typedef int PK_blend_rho_t;
+typedef int PK_taper_undercut_t;
+typedef int PK_EDGE_optimise_result_t;
+typedef int PK_EDGE_max_dev_t;
+typedef int PK_extension_smoothness_t;
+typedef int PK_boolean_prefer_t;
+typedef int PK_emboss_sidewall_t;
+typedef int PK_emboss_profile_on_t;
+typedef int PK_emboss_convexity_t;
+typedef int PK_bound_side_t;
+typedef int PK_blend_inside_tight_t;
+typedef int PK_imprint_face_hidden_t;
+typedef int PK_taper_concave_type_t;
+typedef int PK_BODY_smoothness_t;
+typedef int PK_ATTDEF_cb_on_t;
+typedef int PK_taper_step_face_t;
+typedef int PK_facet_quality_t;
+typedef int PK_emboss_overflow_t;
+typedef int PK_BCURVE_extend_status_t;
+typedef int PK_BCURVE_extension_t;
+typedef int PK_BCURVE_spline_t;
+typedef int PK_BCURVE_overdefined_t;
+typedef int PK_blend_order_t;
+typedef int PK_blend_setback_shape_t;
+typedef int PK_DEBUG_output_session_t;
+typedef int PK_continuity_t;
+typedef int PK_boolean_no_effect_t;
+typedef int PK_taper_laminar_edge_t;
+typedef int PK_offset_on_body_t;
+typedef int PK_CURVE_general_type_t;
+typedef int PK_BCURVE_fitted_t;
+typedef int PK_SURF_general_type_t;
+typedef int PK_BSURF_fitted_t;
+typedef int PK_sweep_guide_method_t;
+typedef int PK_sweep_guide_clamp_type_t;
+typedef int PK_replace_variation_t;
+typedef int PK_sweep_guide_scale_t;
+typedef int PK_sweep_clamp_type_t;
+typedef int PK_PARTITION_copy_deltas_t;
+typedef PK_local_ops_update_t PK_thicken_update_t;
+typedef int PK_imprint_tracking_t;
+typedef int PK_blend_repair_fa_X_t;
+typedef int PK_replace_patch_t;
+typedef int PK_facet_sing_topol_t;
+typedef int PK_detail_perforated_t;
+typedef int PK_detail_open_t;
+typedef int PK_boolean_match_update_t;
+typedef int PK_sweep_tool_fault_t;
+typedef int PK_imprint_proj_dist_t;
+typedef int PK_ATTDEF_mismatch_t;
+typedef int PK_extend_closed_t;
+typedef int PK_CURVE_sequential_t;
+typedef int PK_nm_edge_repair_t;
+typedef int PK_SESSION_binding_t;
+typedef int PK_blend_ov_exp_cliff_t;
+typedef int PK_PARTITION_type_t;
+typedef int PK_taper_keep_material_t;
+typedef int PK_emboss_unite_sidewall_t;
+typedef int PK_boolean_track_type_t;
+typedef int PK_set_precision_method_t;
+typedef int PK_PMARK_new_at_mark_t;
+typedef int PK_extend_track_type_t;
+typedef int PK_extend_track_internal_t;
+typedef int PK_EDGE_convexity_t;
+typedef int PK_sweep_lock_t;
+typedef int PK_force_continuity_t;
+typedef int PK_SURF_make_bsurf_t;
+typedef int PK_achieved_cont_t;
+typedef int PK_make_spcurves_method_t;
+typedef int PK_check_nmnl_geom_t;
+typedef int PK_check_returns_t;
+typedef int PK_make_spcurves_degen_t;
+typedef int PK_LOOP_3_space_gap_t;
+typedef int PK_LOOP_2_space_gap_t;
+typedef int PK_sweep_output_xsect_t;
+typedef int PK_sweep_group_xsect_t;
+typedef PK_local_ops_update_t PK_FACE_change_update_t;
+typedef int PK_set_precision_report_t;
+typedef int PK_FACE_overflow_t;
+typedef int PK_render_ske_missing_t;
+typedef int PK_range_opt_t;
+typedef int PK_general_t;
+typedef int PK_self_int_type_t;
+typedef int PK_blend_prevent_sharp_t;
+typedef int PK_extension_limit_t;
+typedef int PK_GEOM_transform_t;
+typedef int PK_hollow_local_t;
+typedef int PK_FACE_prefer_adj_t;
+typedef int PK_REPORT_record_type_t;
+typedef int PK_REPORT_1_t;
+typedef int PK_sweep_repair_t;
+typedef int PK_track_edges_t;
+typedef int PK_track_vertices_t;
+typedef int PK_BSURF_constrained_t;
+typedef int PK_BCURVE_clamp_t;
+typedef int PK_fix_method_t;
+typedef int PK_SURF_fix_fault_t;
+typedef int PK_CURVE_fix_fault_t;
+typedef int PK_SURF_split_t;
+typedef int PK_fix_status_t;
+typedef int PK_DEBUG_try_smp_t;
+typedef int PK_transform_step_t;
+typedef int PK_blend_track_edges_t;
+typedef int PK_blend_delete_cap_t;
+typedef int PK_facet_smp_t;
+typedef int PK_FACE_grow_t;
+typedef int PK_blend_tolerance_t;
+typedef int PK_offset_track_del_t;
+typedef int PK_extend_create_t;
+typedef int PK_blend_follow_branch_t;
+typedef int PK_BCURVE_spline_stat_t;
+typedef int PK_spline_method_t;
+typedef int PK_BODY_sewing_assy_t;
+typedef int PK_LOOP_trim_geom_t;
+typedef int PK_blend_track_type_t;
+typedef int PK_ENTITY_track_t;
+typedef int PK_BODY_sewing_gen_t;
+typedef int PK_blend_delete_keep_t;
+typedef int PK_REPORT_2_t;
+typedef int PK_extension_boundary_t;
+typedef int PK_VERTEX_limit_t;
+typedef int PK_FACE_grow_cb_t;
+typedef int PK_spline_update_t;
+typedef int PK_sweep_profile_law_t;
+typedef int PK_EDGE_limit_t;
+typedef int PK_TOPOL_dimension_t;
+typedef int PK_redundant_merge_t;
+typedef int PK_repair_fa_fa_t;
+typedef int PK_neutral_ignore_fa_t;
+typedef int PK_blend_trim_extent_t;
+typedef int PK_redundant_propagate_t;
+typedef int PK_REPORT_3_t;
+typedef int PK_FACE_trim_cb_t;
+typedef int PK_patch_mobility_t;
+typedef int PK_deform_uv_t;
+typedef int PK_BODY_sweep_update_t;
+typedef int PK_instance_repair_fa_fa_t;
+typedef int PK_instance_track_type_t;
+typedef int PK_instance_merge_t;
+typedef int PK_DEBUG_report_cb_t;
+typedef int PK_neutral_trim_method_t;
+typedef int PK_fill_hole_body_type_t;
+typedef int PK_instance_track_edges_t;
+typedef int PK_outline_update_t;
+typedef int PK_neutral_overlap_t;
+typedef int PK_isoparam_prefer_t;
+typedef int PK_THREAD_exclusion_t;
+typedef int PK_facet_pt_report_t;
+typedef int PK_imprint_intersect_t;
+typedef int PK_SHELL_repair_tracking_t;
+typedef int PK_SHELL_repair_stat_t;
+typedef int PK_SURF_degen_type_t;
+typedef int PK_check_extra_faults_t;
+typedef int PK_extend_side_t;
+typedef int PK_blend_laminar_trim_t;
+typedef int PK_blend_run_out_t;
+typedef int PK_check_vx_on_cu_t;
+typedef int PK_GEOM_copy_t;
+typedef int PK_GROUP_split_empty_t;
+typedef int PK_GROUP_merge_empty_t;
+typedef int PK_SURF_extend_update_t;
+typedef int PK_change_track_edges_t;
+typedef int PK_imprint_dir_t;
+typedef int PK_blend_suggest_limit_t;
+typedef int PK_fix_degens_t;
+typedef int PK_constrained_update_t;
+typedef int PK_constrained_opt_t;
+typedef int PK_measure_t;
+typedef int PK_CURVE_find_vectors_t;
+typedef int PK_CURVE_make_bcurve_t;
+typedef int PK_fill_hole_patch_eds_t;
+typedef int PK_THREAD_chain_type_t;
+typedef int PK_blend_limit_type_t;
+typedef int PK_boolean_update_t;
+typedef int PK_ERROR_on_fail_t;
+typedef int PK_fill_hole_opt_t;
+typedef int PK_make_bsurf_update_t;
+typedef int PK_fill_hole_imprint_t;
+typedef int PK_range_param_entity_t;
+typedef int PK_results_output_t;
+typedef int PK_CURVE_degen_type_t;
+typedef int PK_neutral_method_t;
+typedef int PK_blend_report_repaired_t;
+typedef int PK_blend_limit_patch_t;
+typedef int PK_EDGE_attach_update_t;
+typedef int PK_FACE_cover_output_t;
+typedef int PK_FACE_cover_smooth_t;
+typedef int PK_mass_local_density_t;
+typedef int PK_reset_prec_method_t;
+typedef int PK_receive_compound_t;
+typedef int PK_fill_hole_clamp_t;
+typedef int PK_selector_split_t;
+typedef int PK_proj_connect_t;
+typedef int PK_proj_face_hidden_t;
+typedef int PK_proj_max_dist_t;
+typedef int PK_proj_split_clash_t;
+typedef int PK_proj_to_points_t;
+typedef int PK_ref_alignment_t;
+typedef int PK_BODY_config_t;
+typedef int PK_selector_type_t;
+typedef int PK_compound_geom_attr_t;
+typedef int PK_check_attribs_t;
+typedef int PK_EDGE_curve_dir_t;
+typedef int PK_GEOM_soft_extended_t;
+typedef int PK_chain_optimise_t;
+typedef int PK_swept_tool_update_t;
+typedef int PK_matrix_type_t;
+typedef int PK_TRANSF_diagnostics_t;
+typedef int PK_blend_cap_type_t;
+typedef int PK_CURVE_is_isoparam_t;
+typedef int PK_isoparam_alignment_t;
+typedef int PK_proj_complete_t;
+typedef int PK_proj_nominal_t;
+typedef int PK_proj_function_t;
+typedef int PK_proj_update_t;
+typedef int PK_imprint_precision_t;
+typedef int PK_neutral_face_overlap_t;
+typedef int PK_facet_respect_t;
+typedef int PK_FUNCTION_run_t;
+typedef int PK_track_bodies_t;
+typedef int PK_outline_edge_on_t;
+typedef int PK_fill_hole_non_smooth_t;
+typedef int PK_blend_params_t;
+typedef int PK_blend_report_blends_t;
+typedef int PK_blend_distant_unders_t;
+typedef int PK_repair_fa_t;
+typedef int PK_LOOP_sew_up_t;
+typedef int PK_shadow_check_fa_t;
+typedef int PK_proj_tracking_t;
+typedef int PK_render_report_line_t;
+typedef int PK_blend_use_master_faces_t;
+typedef int PK_FACE_cover_update_t;
+typedef int PK_make_bcurve_update_t;
+
+
+struct PK_EDGE_types_s {
+ PK_EDGE_vertex_type_t vertex_type;
+ PK_enclosure_t enclosure;
+ PK_EDGE_fins_type_t fins_type;
+};
+typedef struct PK_EDGE_types_s PK_EDGE_ask_type_t;
+typedef int PK_CLASS_t;
+typedef int PK_MARK_t;
+typedef int PK_PMARK_t;
+typedef int PK_SESSION_t;
+typedef int PK_ERROR_t;
+typedef int PK_PRIMITIVE_t;
+typedef int PK_MEMORY_t;
+typedef int PK_PARTITION_t;
+typedef int PK_BB_t;
+typedef int PK_APPITEM_t;
+typedef int PK_ERROR_code_t;
+typedef int PK_ERROR_severity_t;
+typedef unsigned PK_DELTA_t;
+typedef int PK_ASSEMBLY_t;
+typedef int PK_ATTDEF_t;
+typedef int PK_ATTRIB_t;
+typedef int PK_BODY_t;
+typedef int PK_BCURVE_t;
+typedef int PK_BLENDSF_t;
+typedef int PK_BSURF_t;
+typedef int PK_CIRCLE_t;
+typedef int PK_CONE_t;
+typedef int PK_CPCURVE_t;
+typedef int PK_CYL_t;
+typedef int PK_EDGE_t;
+typedef int PK_ELLIPSE_t;
+typedef int PK_FACE_t;
+typedef int PK_FCURVE_t;
+typedef int PK_FIN_t;
+typedef int PK_FSURF_t;
+typedef int PK_GROUP_t;
+typedef int PK_ICURVE_t;
+typedef int PK_INSTANCE_t;
+typedef int PK_KI_LIST_t;
+typedef int PK_LINE_t;
+typedef int PK_LOOP_t;
+typedef int PK_OFFSET_t;
+typedef int PK_POINT_t;
+typedef int PK_PLANE_t;
+typedef int PK_REGION_t;
+typedef int PK_SHELL_t;
+typedef int PK_SPCURVE_t;
+typedef int PK_SPHERE_t;
+typedef int PK_SPUN_t;
+typedef int PK_SWEPT_t;
+typedef int PK_TORUS_t;
+typedef int PK_TRANSF_t;
+typedef int PK_TRCURVE_t;
+typedef int PK_VERTEX_t;
+typedef int PK_CURVE_t;
+typedef int PK_ENTITY_t;
+typedef int PK_GEOM_t;
+typedef int PK_PART_t;
+typedef int PK_SURF_t;
+typedef int PK_TOPOL_t;
+typedef struct PK_ASSEMBLY_array_s {
+ PK_ASSEMBLY_t *array;
+ int length;
+} PK_ASSEMBLY_array_t;
+typedef struct PK_ATTDEF_array_s {
+ PK_ATTDEF_t *array;
+ int length;
+} PK_ATTDEF_array_t;
+typedef struct PK_ATTRIB_array_s {
+ PK_ATTRIB_t *array;
+ int length;
+} PK_ATTRIB_array_t;
+typedef struct PK_BODY_array_s {
+ PK_BODY_t *array;
+ int length;
+} PK_BODY_array_t;
+typedef struct PK_BCURVE_array_s {
+ PK_BCURVE_t *array;
+ int length;
+} PK_BCURVE_array_t;
+typedef struct PK_BLENDSF_array_s {
+ PK_BLENDSF_t *array;
+ int length;
+} PK_BLENDSF_array_t;
+typedef struct PK_BSURF_array_s {
+ PK_BSURF_t *array;
+ int length;
+} PK_BSURF_array_t;
+typedef struct PK_CIRCLE_array_s {
+ PK_CIRCLE_t *array;
+ int length;
+} PK_CIRCLE_array_t;
+typedef struct PK_CONE_array_s {
+ PK_CONE_t *array;
+ int length;
+} PK_CONE_array_t;
+typedef struct PK_CPCURVE_array_s {
+ PK_CPCURVE_t *array;
+ int length;
+} PK_CPCURVE_array_t;
+typedef struct PK_CYL_array_s {
+ PK_CYL_t *array;
+ int length;
+} PK_CYL_array_t;
+typedef struct PK_EDGE_array_s {
+ PK_EDGE_t *array;
+ int length;
+} PK_EDGE_array_t;
+typedef struct PK_ELLIPSE_array_s {
+ PK_ELLIPSE_t *array;
+ int length;
+} PK_ELLIPSE_array_t;
+typedef struct PK_FACE_array_s {
+ PK_FACE_t *array;
+ int length;
+} PK_FACE_array_t;
+typedef struct PK_FCURVE_array_s {
+ PK_FCURVE_t *array;
+ int length;
+} PK_FCURVE_array_t;
+typedef struct PK_FIN_array_s {
+ PK_FIN_t *array;
+ int length;
+} PK_FIN_array_t;
+typedef struct PK_FSURF_array_s {
+ PK_FSURF_t *array;
+ int length;
+} PK_FSURF_array_t;
+typedef struct PK_GROUP_array_s {
+ PK_GROUP_t *array;
+ int length;
+} PK_GROUP_array_t;
+typedef struct PK_ICURVE_array_s {
+ PK_ICURVE_t *array;
+ int length;
+} PK_ICURVE_array_t;
+typedef struct PK_INSTANCE_array_s {
+ PK_INSTANCE_t *array;
+ int length;
+} PK_INSTANCE_array_t;
+typedef struct PK_KI_LIST_array_s {
+ PK_KI_LIST_t *array;
+ int length;
+} PK_KI_LIST_array_t;
+typedef struct PK_LINE_array_s {
+ PK_LINE_t *array;
+ int length;
+} PK_LINE_array_t;
+typedef struct PK_LOOP_array_s {
+ PK_LOOP_t *array;
+ int length;
+} PK_LOOP_array_t;
+typedef struct PK_OFFSET_array_s {
+ PK_OFFSET_t *array;
+ int length;
+} PK_OFFSET_array_t;
+typedef struct PK_POINT_array_s {
+ PK_POINT_t *array;
+ int length;
+} PK_POINT_array_t;
+typedef struct PK_PLANE_array_s {
+ PK_PLANE_t *array;
+ int length;
+} PK_PLANE_array_t;
+typedef struct PK_REGION_array_s {
+ PK_REGION_t *array;
+ int length;
+} PK_REGION_array_t;
+typedef struct PK_SHELL_array_s {
+ PK_SHELL_t *array;
+ int length;
+} PK_SHELL_array_t;
+typedef struct PK_SPCURVE_array_s {
+ PK_SPCURVE_t *array;
+ int length;
+} PK_SPCURVE_array_t;
+typedef struct PK_SPHERE_array_s {
+ PK_SPHERE_t *array;
+ int length;
+} PK_SPHERE_array_t;
+typedef struct PK_SPUN_array_s {
+ PK_SPUN_t *array;
+ int length;
+} PK_SPUN_array_t;
+typedef struct PK_SWEPT_array_s {
+ PK_SWEPT_t *array;
+ int length;
+} PK_SWEPT_array_t;
+typedef struct PK_TORUS_array_s {
+ PK_TORUS_t *array;
+ int length;
+} PK_TORUS_array_t;
+typedef struct PK_TRANSF_array_s {
+ PK_TRANSF_t *array;
+ int length;
+} PK_TRANSF_array_t;
+typedef struct PK_TRCURVE_array_s {
+ PK_TRCURVE_t *array;
+ int length;
+} PK_TRCURVE_array_t;
+typedef struct PK_VERTEX_array_s {
+ PK_VERTEX_t *array;
+ int length;
+} PK_VERTEX_array_t;
+typedef struct PK_CURVE_array_s {
+ PK_CURVE_t *array;
+ int length;
+} PK_CURVE_array_t;
+typedef struct PK_ENTITY_array_s {
+ PK_ENTITY_t *array;
+ int length;
+} PK_ENTITY_array_t;
+typedef struct PK_GEOM_array_s {
+ PK_GEOM_t *array;
+ int length;
+} PK_GEOM_array_t;
+typedef struct PK_PART_array_s {
+ PK_PART_t *array;
+ int length;
+} PK_PART_array_t;
+typedef struct PK_SURF_array_s {
+ PK_SURF_t *array;
+ int length;
+} PK_SURF_array_t;
+typedef struct PK_TOPOL_array_s {
+ PK_TOPOL_t *array;
+ int length;
+} PK_TOPOL_array_t;
+typedef struct PK_CLASS_array_s {
+ PK_CLASS_t *array;
+ int length;
+} PK_CLASS_array_t;
+typedef struct PK_PMARK_array_s {
+ PK_PMARK_t *array;
+ int length;
+} PK_PMARK_array_t;
+typedef int PK_ITEM_t;
+typedef struct PK_ITEM_array_s {
+ PK_ITEM_t *array;
+ int length;
+} PK_ITEM_array_t;
+typedef unsigned char PK_LOGICAL_t;
+
+
+struct PK_VECTOR_s {
+ double coord[3];
+};
+typedef struct PK_VECTOR_s PK_VECTOR_t;
+typedef struct PK_VECTOR_s PK_VECTOR1_t;
+
+
+struct PK_INTERVAL_s {
+ double value[2];
+};
+typedef struct PK_INTERVAL_s PK_INTERVAL_t;
+
+
+struct PK_BOX_s {
+ double coord[6];
+};
+typedef struct PK_BOX_s PK_BOX_t;
+
+
+struct PK_UVBOX_s {
+ double param[4];
+};
+typedef struct PK_UVBOX_s PK_UVBOX_t;
+
+
+struct PK_UV_s {
+ double param[2];
+};
+typedef struct PK_UV_s PK_UV_t;
+typedef void *PK_POINTER_t;
+typedef unsigned short PK_UCHAR_t;
+typedef struct PK_int_array_s {
+ int *array;
+ int length;
+} PK_int_array_t;
+
+
+struct PK_double_array_s {
+ double *array;
+ int length;
+};
+typedef struct PK_double_array_s PK_double_array_t;
+typedef int PK_REPORT_t;
+typedef int PK_FUNCTION_t;
+
+
+struct PK_AXIS1_sf_s {
+ PK_VECTOR_t location;
+ PK_VECTOR1_t axis;
+};
+typedef struct PK_AXIS1_sf_s PK_AXIS1_sf_t;
+
+
+struct PK_AXIS2_sf_s {
+ PK_VECTOR_t location;
+ PK_VECTOR1_t axis;
+ PK_VECTOR1_t ref_direction;
+};
+typedef struct PK_AXIS2_sf_s PK_AXIS2_sf_t;
+
+
+struct PK_NABOX_sf_s {
+ PK_AXIS2_sf_t basis_set;
+ PK_BOX_t box;
+};
+typedef struct PK_NABOX_sf_s PK_NABOX_sf_t;
+
+
+struct PK_ERROR_sf {
+ char function[32];
+ PK_ERROR_code_t code;
+ char code_token[32];
+ PK_ERROR_severity_t severity;
+ int argument_number;
+ char argument_name[32];
+ int argument_index;
+ PK_ENTITY_t entity;
+};
+typedef struct PK_ERROR_sf PK_ERROR_sf_t;
+
+
+struct PK_PARAM_sf_s {
+ PK_INTERVAL_t range;
+ PK_PARAM_bound_t bound[2];
+ PK_PARAM_periodic_t periodic;
+ PK_PARAM_form_t form;
+ PK_LOGICAL_t continuous;
+};
+typedef struct PK_PARAM_sf_s PK_PARAM_sf_t;
+
+
+struct PK_LAW_sf_s {
+ int degree;
+ int n_vertices;
+ int vertex_dim;
+ PK_LOGICAL_t is_rational;
+ double *vertex;
+ int n_knots;
+ int *knot_mult;
+ double *knot;
+ PK_knot_type_t knot_type;
+ PK_LOGICAL_t is_periodic;
+ PK_LOGICAL_t is_closed;
+};
+typedef struct PK_LAW_sf_s PK_LAW_sf_t;
+
+
+struct PK_TRANSF_sf_s {
+ double matrix[4][4];
+};
+typedef struct PK_TRANSF_sf_s PK_TRANSF_sf_t;
+
+
+struct PK_REPORT_record_1_s {
+ PK_REPORT_1_t status;
+ int n_old_items;
+ int *old_items;
+ PK_CLASS_t *old_classes;
+ int n_new_items;
+ PK_ITEM_t *new_items;
+};
+typedef struct PK_REPORT_record_1_s PK_REPORT_record_1_t;
+
+
+struct PK_REPORT_record_2_s {
+ PK_REPORT_2_t status;
+ int n_old_item_arrays;
+ PK_int_array_t *old_item_arrays;
+ PK_CLASS_array_t *old_class_arrays;
+ int n_new_item_arrays;
+ PK_ITEM_array_t *new_item_arrays;
+};
+typedef struct PK_REPORT_record_2_s PK_REPORT_record_2_t;
+
+
+struct PK_REPORT_record_3_s {
+ PK_REPORT_3_t status;
+ int n_int_arrays;
+ PK_int_array_t *int_arrays;
+ int n_double_arrays;
+ PK_double_array_t *double_arrays;
+ int n_strings;
+ char **strings;
+ int n_old_item_arrays;
+ PK_int_array_t *old_item_arrays;
+ PK_CLASS_array_t *old_class_arrays;
+ int n_item_arrays;
+ PK_ITEM_array_t *item_arrays;
+};
+typedef struct PK_REPORT_record_3_s PK_REPORT_record_3_t;
+
+
+struct PK_REPORT_record_s {
+ char function[32];
+ PK_REPORT_record_type_t type;
+ union {
+  PK_REPORT_record_1_t *type_1;
+  PK_REPORT_record_2_t *type_2;
+  PK_REPORT_record_3_t *type_3;
+ } record;
+};
+typedef struct PK_REPORT_record_s PK_REPORT_record_t;
+
+
+struct PK_REPORT_r_s {
+ char function[32];
+ int n_report_records;
+ PK_REPORT_record_t *report_records;
+};
+typedef struct PK_REPORT_r_s PK_REPORT_r_t;
+
+
+struct PK_MEMORY_block_s {
+ struct PK_MEMORY_block_s *next;
+ size_t n_bytes;
+ const char *bytes;
+};
+typedef struct PK_MEMORY_block_s PK_MEMORY_block_t;
+typedef PK_ERROR_code_t(*PK_ERROR_handler_f_t)(struct PK_ERROR_sf *);
+
+
+struct PK_ERROR_frustrum_s {
+ PK_ERROR_handler_f_t handler_fn;
+};
+typedef struct PK_ERROR_frustrum_s PK_ERROR_frustrum_t;
+typedef void(*PK_FSTART_f_t)(int *);
+typedef void(*PK_FABORT_f_t)(int *);
+typedef void(*PK_FSTOP_f_t)(int *);
+typedef void(*PK_FMALLO_f_t)(int *, char **, int *);
+typedef void(*PK_FMFREE_f_t)(int *, char **, int *);
+typedef void(*PK_GOSGMT_f_t)(const int *, const int *, const int *, const int *, 
+const double *, const int *, const int *, int *);
+typedef void(*PK_GOOPSG_f_t)(const int *, const int *, const int *, const int *, 
+const double *, const int *, const int *, int *);
+typedef void(*PK_GOCLSG_f_t)(const int *, const int *, const int *, const int *, 
+const double *, const int *, const int *, int *);
+typedef void(*PK_GOPIXL_f_t)(const int *, const double *, const int *, const int *, 
+int *);
+typedef void(*PK_GOOPPX_f_t)(const int *, const double *, const int *, const int *, 
+int *);
+typedef void(*PK_GOCLPX_f_t)(const int *, const double *, const int *, const int *, 
+int *);
+typedef void(*PK_FFOPRD_f_t)(const int *, const int *, const char *, const int *, 
+const int *, int *, int *);
+typedef void(*PK_FFOPWR_f_t)(const int *, const int *, const char *, const int *, 
+const char *, const int *, int *, int *);
+typedef int(*PK_UCOPRD_f_t)(const int, const int, const PK_UCHAR_t *, const PK_LOGICAL_t
+, int *);
+typedef int(*PK_UCOPWR_f_t)(const int, const int, const PK_UCHAR_t *, const char *, int 
+*);
+typedef void(*PK_FFCLOS_f_t)(const int *, const int *, const int *, int *);
+typedef void(*PK_FFREAD_f_t)(const int *, const int *, const int *, char *, int *, 
+int *);
+typedef void(*PK_FFWRIT_f_t)(const int *, const int *, const int *, const char *, 
+int *);
+typedef void(*PK_FFOPRB_f_t)(const int *, const int *, const int *, int *, int *, 
+int *);
+typedef void(*PK_FFSEEK_f_t)(const int *, const int *, const int *, int *);
+typedef void(*PK_FFTELL_f_t)(const int *, const int *, int *, int *);
+typedef void(*PK_FGCRCU_f_t)(const char *, int *, int *, int *, int *, double *, int
+*, double *, int *);
+typedef void(*PK_FGCRSU_f_t)(const char *, int *, int *, int *, int *, double *, int
+*, double *, int *);
+typedef void(*PK_FGEVCU_f_t)(int *, double *, double *, double *, int *, double *, 
+int *);
+typedef void(*PK_FGEVSU_f_t)(int *, double *, double *, double *, double *, int *, 
+int *, int *, double *, int *);
+typedef void(*PK_FGPRCU_f_t)(int *, double *, double *, double[2], int *, int *);
+typedef void(*PK_FGPRSU_f_t)(int *, double *, double *, double[4], int[2], int *);
+typedef struct PK_SESSION_frustrum_s {
+ PK_FSTART_f_t fstart;
+ PK_FABORT_f_t fabort;
+ PK_FSTOP_f_t fstop;
+ PK_FMALLO_f_t fmallo;
+ PK_FMFREE_f_t fmfree;
+ PK_GOSGMT_f_t gosgmt;
+ PK_GOOPSG_f_t goopsg;
+ PK_GOCLSG_f_t goclsg;
+ PK_GOPIXL_f_t gopixl;
+ PK_GOOPPX_f_t gooppx;
+ PK_GOCLPX_f_t goclpx;
+ PK_FFOPRD_f_t ffoprd;
+ PK_FFOPWR_f_t ffopwr;
+ PK_FFCLOS_f_t ffclos;
+ PK_FFREAD_f_t ffread;
+ PK_FFWRIT_f_t ffwrit;
+ PK_FFOPRB_f_t ffoprb;
+ PK_FFSEEK_f_t ffseek;
+ PK_FFTELL_f_t fftell;
+ PK_FGCRCU_f_t fgcrcu;
+ PK_FGCRSU_f_t fgcrsu;
+ PK_FGEVCU_f_t fgevcu;
+ PK_FGEVSU_f_t fgevsu;
+ PK_FGPRCU_f_t fgprcu;
+ PK_FGPRSU_f_t fgprsu;
+ PK_UCOPRD_f_t ucoprd;
+ PK_UCOPWR_f_t ucopwr;
+} PK_SESSION_frustrum_t;
+typedef unsigned char PK_imprint_face_list_t;
+typedef unsigned char PK_FACE_heal_loops_t;
+
+
+struct PK_TOPOL_fcstr_facet_fin_s {
+ int facet;
+ int fin;
+};
+typedef struct PK_TOPOL_fcstr_facet_fin_s PK_TOPOL_fcstr_facet_fin_t;
+
+
+struct PK_TOPOL_fctab_facet_fin_s {
+ PK_TOPOL_fcstr_facet_fin_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_facet_fin_s PK_TOPOL_fctab_facet_fin_t;
+
+
+struct PK_TOPOL_fcstr_strip_boundary_s {
+ int strip;
+ int fin;
+};
+typedef struct PK_TOPOL_fcstr_strip_boundary_s PK_TOPOL_fcstr_strip_boundary_t;
+
+
+struct PK_TOPOL_fctab_strip_boundary_s {
+ PK_TOPOL_fcstr_strip_boundary_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_strip_boundary_s PK_TOPOL_fctab_strip_boundary_t;
+
+
+struct PK_TOPOL_fcstr_strip_zigzag_s {
+ int strip;
+ int fin;
+};
+typedef struct PK_TOPOL_fcstr_strip_zigzag_s PK_TOPOL_fcstr_strip_zigzag_t;
+
+
+struct PK_TOPOL_fctab_strip_zigzag_s {
+ PK_TOPOL_fcstr_strip_zigzag_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_strip_zigzag_s PK_TOPOL_fctab_strip_zigzag_t;
+
+
+struct PK_TOPOL_fctab_fin_fin_s {
+ int *fin;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_fin_fin_s PK_TOPOL_fctab_fin_fin_t;
+
+
+struct PK_TOPOL_fctab_fin_vertex_s {
+ int *vertex;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_fin_vertex_s PK_TOPOL_fctab_fin_vertex_t;
+
+
+struct PK_TOPOL_fctab_fin_data_s {
+ int *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_fin_data_s PK_TOPOL_fctab_fin_data_t;
+
+
+struct PK_TOPOL_fctab_data_point_s {
+ int *point;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_data_point_s PK_TOPOL_fctab_data_point_t;
+
+
+struct PK_TOPOL_fctab_data_normal_s {
+ int *normal;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_data_normal_s PK_TOPOL_fctab_data_normal_t;
+
+
+struct PK_TOPOL_fctab_data_param_s {
+ int *param;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_data_param_s PK_TOPOL_fctab_data_param_t;
+
+
+struct PK_TOPOL_fctab_data_deriv_s {
+ int *deriv;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_data_deriv_s PK_TOPOL_fctab_data_deriv_t;
+
+
+struct PK_TOPOL_fctab_vertex_point_s {
+ int *point;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_vertex_point_s PK_TOPOL_fctab_vertex_point_t;
+
+
+struct PK_TOPOL_fctab_vertex_normal_s {
+ int *normal;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_vertex_normal_s PK_TOPOL_fctab_vertex_normal_t;
+
+
+struct PK_TOPOL_fctab_vertex_param_s {
+ int *param;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_vertex_param_s PK_TOPOL_fctab_vertex_param_t;
+
+
+struct PK_TOPOL_fctab_point_vec_s {
+ PK_VECTOR_t *vec;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_point_vec_s PK_TOPOL_fctab_point_vec_t;
+
+
+struct PK_TOPOL_fctab_normal_vec_s {
+ PK_VECTOR_t *vec;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_normal_vec_s PK_TOPOL_fctab_normal_vec_t;
+
+
+struct PK_TOPOL_fcstr_param_uv_s {
+ double u;
+ double v;
+};
+typedef struct PK_TOPOL_fcstr_param_uv_s PK_TOPOL_fcstr_param_uv_t;
+
+
+struct PK_TOPOL_fctab_param_uv_s {
+ PK_TOPOL_fcstr_param_uv_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_param_uv_s PK_TOPOL_fctab_param_uv_t;
+
+
+struct PK_TOPOL_fcstr_param_dp_s {
+ PK_VECTOR_t du;
+ PK_VECTOR_t dv;
+};
+typedef struct PK_TOPOL_fcstr_param_dp_s PK_TOPOL_fcstr_param_dp_t;
+
+
+struct PK_TOPOL_fctab_param_dp_s {
+ PK_TOPOL_fcstr_param_dp_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_param_dp_s PK_TOPOL_fctab_param_dp_t;
+
+
+struct PK_TOPOL_fcstr_deriv_dp_s {
+ PK_VECTOR_t du;
+ PK_VECTOR_t dv;
+};
+typedef struct PK_TOPOL_fcstr_deriv_dp_s PK_TOPOL_fcstr_deriv_dp_t;
+
+
+struct PK_TOPOL_fctab_deriv_dp_s {
+ PK_TOPOL_fcstr_deriv_dp_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_deriv_dp_s PK_TOPOL_fctab_deriv_dp_t;
+
+
+struct PK_TOPOL_fcstr_param_d2p_s {
+ PK_VECTOR_t du2;
+ PK_VECTOR_t dudv;
+ PK_VECTOR_t dv2;
+};
+typedef struct PK_TOPOL_fcstr_param_d2p_s PK_TOPOL_fcstr_param_d2p_t;
+
+
+struct PK_TOPOL_fctab_param_d2p_s {
+ PK_TOPOL_fcstr_param_d2p_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_param_d2p_s PK_TOPOL_fctab_param_d2p_t;
+
+
+struct PK_TOPOL_fcstr_deriv_d2p_s {
+ PK_VECTOR_t du2;
+ PK_VECTOR_t dudv;
+ PK_VECTOR_t dv2;
+};
+typedef struct PK_TOPOL_fcstr_deriv_d2p_s PK_TOPOL_fcstr_deriv_d2p_t;
+
+
+struct PK_TOPOL_fctab_deriv_d2p_s {
+ PK_TOPOL_fcstr_deriv_d2p_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_deriv_d2p_s PK_TOPOL_fctab_deriv_d2p_t;
+
+
+struct PK_TOPOL_fctab_facet_face_s {
+ PK_FACE_t *face;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_facet_face_s PK_TOPOL_fctab_facet_face_t;
+
+
+struct PK_TOPOL_fctab_strip_face_s {
+ PK_FACE_t *face;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_strip_face_s PK_TOPOL_fctab_strip_face_t;
+
+
+struct PK_TOPOL_fctab_facet_occ_s {
+ int *occ;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_facet_occ_s PK_TOPOL_fctab_facet_occ_t;
+
+
+struct PK_TOPOL_fcstr_edge_fin_s {
+ PK_EDGE_t edge;
+ int fin;
+};
+typedef struct PK_TOPOL_fcstr_edge_fin_s PK_TOPOL_fcstr_edge_fin_t;
+
+
+struct PK_TOPOL_fctab_edge_fin_s {
+ PK_TOPOL_fcstr_edge_fin_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_edge_fin_s PK_TOPOL_fctab_edge_fin_t;
+
+
+struct PK_TOPOL_fcstr_fin_edge_s {
+ int fin;
+ PK_EDGE_t edge;
+};
+typedef struct PK_TOPOL_fcstr_fin_edge_s PK_TOPOL_fcstr_fin_edge_t;
+
+
+struct PK_TOPOL_fctab_fin_edge_s {
+ PK_TOPOL_fcstr_fin_edge_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_fin_edge_s PK_TOPOL_fctab_fin_edge_t;
+
+
+struct PK_TOPOL_fcstr_edge_occ_s {
+ int edge;
+ int occ;
+};
+typedef struct PK_TOPOL_fcstr_edge_occ_s PK_TOPOL_fcstr_edge_occ_t;
+
+
+struct PK_TOPOL_fctab_edge_occ_s {
+ PK_TOPOL_fcstr_edge_occ_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_edge_occ_s PK_TOPOL_fctab_edge_occ_t;
+
+
+struct PK_TOPOL_fctab_error_facet_s {
+ int *facet;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_error_facet_s PK_TOPOL_fctab_error_facet_t;
+
+
+struct PK_TOPOL_fcstr_error_object_s {
+ PK_facet_fault_t error;
+ int object;
+};
+typedef struct PK_TOPOL_fcstr_error_object_s PK_TOPOL_fcstr_error_object_t;
+
+
+struct PK_TOPOL_fctab_error_object_s {
+ PK_TOPOL_fcstr_error_object_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_error_object_s PK_TOPOL_fctab_error_object_t;
+
+
+struct PK_TOPOL_facet_r_s {
+ int number_of_facets;
+ int number_of_fins;
+ int number_of_vertices;
+ PK_TOPOL_fctab_facet_fin_t facet_fin;
+ PK_TOPOL_fctab_fin_fin_t fin_fin;
+ PK_TOPOL_fctab_fin_vertex_t fin_vertex;
+ PK_TOPOL_fctab_vertex_point_t vertex_point;
+ PK_TOPOL_fctab_vertex_normal_t vertex_normal;
+ PK_TOPOL_fctab_vertex_param_t vertex_param;
+ PK_TOPOL_fctab_point_vec_t point_vec;
+ PK_TOPOL_fctab_normal_vec_t normal_vec;
+ PK_TOPOL_fctab_param_uv_t param_uv;
+ PK_TOPOL_fctab_param_dp_t param_dp;
+ PK_TOPOL_fctab_param_d2p_t param_d2p;
+ PK_TOPOL_fctab_facet_face_t facet_face;
+ PK_TOPOL_fctab_facet_occ_t facet_occ;
+ PK_TOPOL_fctab_edge_fin_t edge_fin;
+ PK_TOPOL_fctab_edge_occ_t edge_occ;
+ PK_TOPOL_fctab_error_facet_t error_facet;
+};
+typedef struct PK_TOPOL_facet_r_s PK_TOPOL_facet_r_t;
+
+
+struct PK_TOPOL_fcstr_point_topol_s {
+ int point;
+ PK_TOPOL_t topol;
+};
+typedef struct PK_TOPOL_fcstr_point_topol_s PK_TOPOL_fcstr_point_topol_t;
+
+
+struct PK_TOPOL_fctab_point_topol_s {
+ PK_TOPOL_fcstr_point_topol_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_point_topol_s PK_TOPOL_fctab_point_topol_t;
+
+
+struct PK_TOPOL_fcstr_fin_topol_s {
+ int fin;
+ PK_TOPOL_t topol;
+};
+typedef struct PK_TOPOL_fcstr_fin_topol_s PK_TOPOL_fcstr_fin_topol_t;
+
+
+struct PK_TOPOL_fctab_fin_topol_s {
+ PK_TOPOL_fcstr_fin_topol_t *data;
+ int length;
+};
+typedef struct PK_TOPOL_fctab_fin_topol_s PK_TOPOL_fctab_fin_topol_t;
+
+
+struct PK_TOPOL_facet_table_s {
+ PK_TOPOL_fctab_t fctab;
+ union {
+  PK_TOPOL_fctab_facet_fin_t *facet_fin;
+  PK_TOPOL_fctab_strip_boundary_t *strip_boundary;
+  PK_TOPOL_fctab_strip_zigzag_t *strip_zigzag;
+  PK_TOPOL_fctab_fin_fin_t *fin_fin;
+  PK_TOPOL_fctab_fin_data_t *fin_data;
+  PK_TOPOL_fctab_data_point_t *data_point_idx;
+  PK_TOPOL_fctab_data_normal_t *data_normal_idx;
+  PK_TOPOL_fctab_data_param_t *data_param_idx;
+  PK_TOPOL_fctab_data_deriv_t *data_deriv_idx;
+  PK_TOPOL_fctab_point_vec_t *point_vec;
+  PK_TOPOL_fctab_normal_vec_t *normal_vec;
+  PK_TOPOL_fctab_param_uv_t *param_uv;
+  PK_TOPOL_fctab_deriv_dp_t *deriv_dp;
+  PK_TOPOL_fctab_deriv_d2p_t *deriv_d2p;
+  PK_TOPOL_fctab_facet_face_t *facet_face;
+  PK_TOPOL_fctab_strip_face_t *strip_face;
+  PK_TOPOL_fctab_fin_edge_t *fin_edge;
+  PK_TOPOL_fctab_point_topol_t *point_topol;
+  PK_TOPOL_fctab_fin_topol_t *fin_topol;
+  PK_TOPOL_fctab_error_object_t *error_object;
+ } table;
+};
+typedef struct PK_TOPOL_facet_table_s PK_TOPOL_facet_table_t;
+
+
+struct PK_TOPOL_facet_2_r_s {
+ int number_of_facets;
+ int number_of_strips;
+ int number_of_fins;
+ int number_of_tables;
+ PK_TOPOL_facet_table_t *tables;
+};
+typedef struct PK_TOPOL_facet_2_r_s PK_TOPOL_facet_2_r_t;
+
+
+struct PK_TOPOL_track_record_r_s {
+ PK_TOPOL_track_t track;
+ int n_original_topols;
+ int *original_topols;
+ PK_CLASS_t *original_classes;
+ int n_product_topols;
+ PK_TOPOL_t *product_topols;
+};
+typedef struct PK_TOPOL_track_record_r_s PK_TOPOL_track_record_r_t;
+
+
+struct PK_TOPOL_track_r_s {
+ int n_track_records;
+ PK_TOPOL_track_record_r_t *track_records;
+ int *internal_origs;
+ PK_CLASS_t *internal_classes;
+ int *internal_prods;
+};
+typedef struct PK_TOPOL_track_r_s PK_TOPOL_track_r_t;
+
+
+struct PK_TOPOL_local_r_s {
+ PK_local_status_t status;
+ int n_error_entities;
+ PK_ENTITY_t *error_entities;
+};
+typedef struct PK_TOPOL_local_r_s PK_TOPOL_local_r_t;
+
+
+struct PK_ENTITY_track_record_r_s {
+ PK_ENTITY_track_t track;
+ int n_original_entities;
+ int *original_entities;
+ PK_CLASS_t *original_classes;
+ int n_product_entities;
+ PK_ENTITY_t *product_entities;
+};
+typedef struct PK_ENTITY_track_record_r_s PK_ENTITY_track_record_r_t;
+
+
+struct PK_ENTITY_track_r_s {
+ int n_track_records;
+ PK_ENTITY_track_record_r_t *track_records;
+ int *internal_origs;
+ PK_CLASS_t *internal_classes;
+ int *internal_prods;
+};
+typedef struct PK_ENTITY_track_r_s PK_ENTITY_track_r_t;
+
+
+/* PK_double_constraint_t */
+
+struct PK_double_constraint_s
+    {
+    PK_comparison_t comparison;
+    PK_INTERVAL_t   interval;
+    };
+typedef struct PK_double_constraint_s PK_double_constraint_t;
+
+
+
+/* PK_double_constraint_m */
+
+#define PK_double_constraint_m( constraint )             \
+    (                                                    \
+        (constraint).comparison = PK_comparison_never_c, \
+        (constraint).interval.value[0] = 0.0,            \
+        (constraint).interval.value[1] = 0.0             \
+    )
+
+
+/* PK_SESSION_polling_cb_t */
+
+typedef void (*PK_SESSION_polling_cb_t)(void);
+
+
+
+/* PK_SESSION_applio_t */
+
+typedef struct PK_SESSION_applio_s
+    {
+    int (*open_rd)   (int keylen, const char* key, int *strid);
+    int (*open_wr)   (int keylen, const char* key, int *strid);
+
+    int (*rd_chars)  (int strid, int n, char                *data);
+    int (*rd_bytes)  (int strid, int n, unsigned char       *data);
+    int (*rd_shorts) (int strid, int n, short               *data);
+    int (*rd_ints)   (int strid, int n, int                 *data);
+    int (*rd_doubles)(int strid, int n, double              *data);
+
+    int (*wr_chars)  (int strid, int n, const char          *data);
+    int (*wr_bytes)  (int strid, int n, const unsigned char *data);
+    int (*wr_shorts) (int strid, int n, const short         *data);
+    int (*wr_ints)   (int strid, int n, const int           *data);
+    int (*wr_doubles)(int strid, int n, const double        *data);
+
+    int (*close)     (int strid, int abort);
+
+    int (*open_uc_rd)(const PK_UCHAR_t *key, int *strid);
+    int (*open_uc_wr)(const PK_UCHAR_t *key, int *strid);
+
+    int (*open_rd_2)   (int guise, int keylen, const char* key, int *strid);
+    int (*open_wr_2)   (int guise, int keylen, const char* key, int *strid);
+    int (*open_uc_rd_2)(int guise, const PK_UCHAR_t *key, int *strid);
+    int (*open_uc_wr_2)(int guise, const PK_UCHAR_t *key, int *strid);
+    }
+    PK_SESSION_applio_t;
+
+
+
+/* PK_SESSION_indexio_t */
+
+struct PK_SESSION_indexio_s
+    {
+    int   (*ffoprd)(int guise, const char name[], void *context);
+    int   (*ffopwr)(int guise, const char name[],
+                    const char pr2[], void *context);
+    int   (*ucoprd)(int guise, const PK_UCHAR_t name[], void *context);
+    int   (*ucopwr)(int guise, const PK_UCHAR_t name[],
+                    const char pr2[], void *context);
+    int   (*ffread)(int nmax, char buffer[], int *nactual, void *context);
+    int   (*ffwrit)(int nchars, const char buffer[], void *context);
+    int   (*ffseek)(size_t pos, void *context);
+    int   (*ffclos)(int action, void *context);
+    };
+
+typedef struct PK_SESSION_indexio_s PK_SESSION_indexio_t;
+
+
+/* PK_SESSION_kernel_version_t */
+
+
+typedef struct
+    {
+    int major_revision;      /* 7 */
+    int minor_revision;      /* 1 */
+    int build_number;        /* 110 */
+    int year;                /* 1996 */
+    int month;               /* 3 */
+    int day;                 /* 5 */
+    int hour;                /* 22 */
+    int minute;              /* 1 */
+    int second;              /* 40 */
+    } PK_SESSION_kernel_version_t;
+
+
+
+/* PK_check_fault_t */
+
+typedef struct PK_check_fault_s
+    {
+    PK_check_state_t   state;       /* token indicating fault state */
+    PK_ENTITY_t        entity_1;    /* fault entity always present */
+    PK_ENTITY_t        entity_2;    /* secondary fault entity */
+    PK_VECTOR_t        position;    /* position within faulty volume */
+    } PK_check_fault_t;
+
+
+
+/* PK_check_fault_m */
+
+#define PK_check_fault_m(options)                               \
+    (                                                           \
+       (options).state             = PK_ENTITY_state_invalid_c, \
+       (options).entity_1          = PK_ENTITY_null,            \
+       (options).entity_2          = PK_ENTITY_null,            \
+       (options).position.coord[0] = 0.0,                       \
+       (options).position.coord[1] = 0.0,                       \
+       (options).position.coord[2] = 0.0                        \
+    )
+
+
+
+/* PK_blend_properties_t */
+
+struct PK_blend_properties_s
+    {
+    PK_blend_propagate_t    propagate;      /* whether to progagate */
+    PK_blend_vary_t         vary;           /* form of variation */
+    PK_blend_render_rib_t   render_rib;     /* enable rendering of ribs */
+    PK_LOGICAL_t            draw_fix;       /* whether blend will be drawn */
+    PK_blend_ov_smooth_t    ov_smooth;      /* enable smooth overflow */
+    PK_blend_ov_cliff_t     ov_cliff;       /* enable cliff edge overflow */
+    PK_blend_ov_cliff_end_t ov_cliff_end;   /* enable cliff edge end overflow */
+    PK_blend_ov_notch_t     ov_notch;       /* enable notch overflow */
+    double                  tolerance;      /* tolerance for blended edge */
+    double                  ribspace;       /* approx separation of rib lines */
+    };
+typedef struct PK_blend_properties_s PK_blend_properties_t;
+
+
+
+
+/* PK_blend_properties_m */
+
+#define PK_blend_properties_m(options)                         \
+    (                                                          \
+       (options).propagate      = PK_blend_propagate_no_c,     \
+       (options).vary           = PK_blend_vary_smooth_c,      \
+       (options).render_rib     = PK_blend_render_rib_no_c,    \
+       (options).draw_fix       = PK_LOGICAL_true,             \
+       (options).ov_smooth      = PK_blend_ov_smooth_diff_c,   \
+       (options).ov_cliff       = PK_blend_ov_cliff_diff_c,    \
+       (options).ov_cliff_end   = PK_blend_ov_cliff_end_no_c,  \
+       (options).ov_notch       = PK_blend_ov_notch_yes_c,     \
+       (options).tolerance      = 1.0e-5,                      \
+       (options).ribspace       = 0.0                          \
+    )
+
+
+/* PK_blend_setback_data_t */
+
+struct PK_blend_setback_data_s
+    {
+    int                  n_edges;    /* number of edges (0) */
+    const PK_EDGE_t    * edges;      /* edge (NULL) */
+    const PK_LOGICAL_t * which_end;  /* whether setback is on */
+    const double       * distances;  /* setback distance (NULL) */
+    };
+typedef struct PK_blend_setback_data_s PK_blend_setback_data_t;
+
+
+
+
+/* PK_blend_setback_data_m */
+
+#define PK_blend_setback_data_m(options)                       \
+    (                                                          \
+       (options).n_edges        = 0,                           \
+       (options).edges          = NULL,                        \
+       (options).which_end      = NULL,                        \
+       (options).distances      = NULL                         \
+    )
+
+
+/* PK_blend_limit_data_t */
+
+struct PK_blend_limit_data_s
+    {
+    int                          n_limits;          /* number of limits (0) */
+    const PK_VECTOR_t           *limit_points;      /* limit points (NULL) */
+    const PK_VECTOR_t           *limit_directions;  /* limit directions (NULL) */
+    const PK_EDGE_t             *edges;             /* edges (NULL) */
+    const PK_blend_limit_type_t *limit_types;       /* limit types (NULL) */
+    const PK_blend_limit_patch_t
+                                *limit_patch;       /* controls whether to try */
+    int                          n_vertices;        /* number of vertices (0) */
+    const PK_VERTEX_t           *vertices;          /* vertices (NULL) */
+    };
+typedef struct PK_blend_limit_data_s PK_blend_limit_data_t;
+
+
+
+
+/* PK_blend_limit_data_m */
+
+#define PK_blend_limit_data_m(options)                         \
+    (                                                          \
+       (options).n_limits         = 0,                         \
+       (options).limit_points     = NULL,                      \
+       (options).limit_directions = NULL,                      \
+       (options).edges            = NULL,                      \
+       (options).limit_types      = NULL,                      \
+       (options).limit_patch      = NULL,                      \
+       (options).n_vertices       = 0,                         \
+       (options).vertices         = NULL                       \
+    )
+
+
+/* PK_blend_limit_patch_array_t */
+
+struct PK_blend_limit_patch_array_s
+    {
+    int                           length;
+    const PK_blend_limit_patch_t *limit_topol_patch;
+    };
+typedef struct PK_blend_limit_patch_array_s PK_blend_limit_patch_array_t;
+
+
+/* PK_blend_vx_order_data_t */
+
+struct PK_blend_vx_order_data_s
+    {
+    PK_blend_order_t        default_vx_order;  /* default order to apply blends */
+    int                     n_vertices;        /* number of vertices (0) */
+    const PK_VERTEX_t      *vertices;          /* vertices (NULL) */
+    const PK_blend_order_t *vx_order;          /* order to apply blends at */
+    };
+typedef struct PK_blend_vx_order_data_s PK_blend_vx_order_data_t;
+
+
+
+
+/* PK_blend_vx_order_data_m */
+
+#define PK_blend_vx_order_data_m(options)                    \
+    (                                                        \
+       (options).default_vx_order = PK_blend_order_unset_c,  \
+       (options).n_vertices       = 0,                       \
+       (options).vertices         = NULL,                    \
+       (options).vx_order         = NULL                     \
+    )
+
+
+/* PK_blend_vx_blend_data_t */
+
+struct PK_blend_vx_blend_data_s
+    {
+    PK_LOGICAL_t         vertex_blend;  /* whether to vertex blend */
+    int                  n_vertices;    /* number of vertices (0) */
+    const PK_VERTEX_t   *vertices;      /* array of vertices to blend (NULL) */
+    };
+typedef struct PK_blend_vx_blend_data_s PK_blend_vx_blend_data_t;
+
+
+
+
+/* PK_blend_vx_blend_data_m */
+
+#define PK_blend_vx_blend_data_m(options)                  \
+    (                                                          \
+       (options).vertex_blend      = PK_LOGICAL_false,                        \
+       (options).n_vertices        = 0,                        \
+       (options).vertices          = NULL                      \
+    )
+
+
+/* PK_blend_y_blend_data_t */
+
+struct PK_blend_y_blend_data_s
+    {
+    PK_LOGICAL_t         y_blend;       /* whether to y blend */
+    int                  n_vertices;    /* number of vertices (0) */
+    const PK_VERTEX_t   *vertices;      /* array of vertices to blend (NULL) */
+    };
+typedef struct PK_blend_y_blend_data_s PK_blend_y_blend_data_t;
+
+
+
+
+/* PK_blend_y_blend_data_m */
+
+#define PK_blend_y_blend_data_m(options)                       \
+    (                                                          \
+       (options).y_blend           = PK_LOGICAL_false,         \
+       (options).n_vertices        = 0,                        \
+       (options).vertices          = NULL                      \
+    )
+
+
+/* PK_blend_local_check_t */
+
+struct PK_blend_local_check_s
+    {
+    PK_blend_check_su_X_t  check_su_X;       /* check for self-intersecting */
+    PK_blend_check_fa_t    check_fa;         /* check individual faces */
+    PK_blend_check_fa_fa_t check_fa_fa;      /* check for face-face */
+    };
+typedef struct PK_blend_local_check_s PK_blend_local_check_t;
+
+
+
+/* PK_blend_local_check_m */
+
+#define PK_blend_local_check_m(options)                             \
+    (                                                               \
+       (options).check_su_X          = PK_blend_check_su_X_no_c,    \
+       (options).check_fa            = PK_blend_check_fa_no_c,      \
+       (options).check_fa_fa         = PK_blend_check_fa_fa_no_c    \
+    )
+
+
+/* PK_BODY_blend_propagate_f_t */
+
+typedef PK_LOGICAL_t (*PK_BODY_blend_propagate_f_t)
+(
+/* received */
+PK_EDGE_t        /*edge*/,                /* potential propagation edge */
+PK_POINTER_t     /*external_data*/        /* external application data */
+);
+
+
+
+/* PK_blend_fix_propagate_t */
+
+struct PK_blend_fix_propagate_s
+    {
+    PK_LOGICAL_t     propagate;             /* whether to propagate */
+    double           tolerance;             /* propagation angular tolerance */
+    PK_BODY_blend_propagate_f_t function;   /* user propagation function (NULL) */
+    PK_POINTER_t     data;                  /* user data for callback function */
+    };
+typedef struct PK_blend_fix_propagate_s PK_blend_fix_propagate_t;
+
+
+
+/* PK_blend_fix_propagate_m */
+
+#define PK_blend_fix_propagate_m(options)                           \
+    (                                                               \
+       (options).propagate           = PK_LOGICAL_true,             \
+       (options).tolerance           = 3.14159265358979323846/36.0, \
+       (options).function            = NULL,                        \
+       (options).data                = NULL                         \
+    )
+
+
+/* PK_blend_delete_cap_data_t */
+
+struct PK_blend_delete_cap_data_s
+    {
+    int                  n_blends;    /* number */
+    const PK_FACE_t     *blends;      /* blend faces */
+    const PK_ENTITY_t   *end_idents;  /* topologies */
+    const PK_blend_delete_keep_t
+                        *keep;        /* flag indicating */
+    const PK_blend_cap_type_t
+                        *type;        /* type of capping to be used. */
+    };
+typedef struct PK_blend_delete_cap_data_s PK_blend_delete_cap_data_t;
+
+
+
+
+/* PK_blend_delete_cap_data_m */
+
+#define PK_blend_delete_cap_data_m(options)                            \
+    (                                                              \
+       (options).n_blends             = 0,                         \
+       (options).blends               = NULL,                      \
+       (options).end_idents           = NULL,                      \
+       (options).keep                 = NULL,                      \
+       (options).type                 = NULL                       \
+    )
+
+
+/* PK_blend_constraint_t */
+
+struct PK_blend_constraint_s
+    {
+    PK_EDGE_array_t     cliff_edges;        /* cliff edges */
+    PK_EDGE_array_t     tangent_edges;      /* tangent holdline edges */
+    PK_EDGE_array_t     conic_edges;        /* conic holdline edges */
+    PK_EDGE_array_t     inv_tangent_edges;  /* inverse tangent holdline edges */
+    PK_EDGE_array_t     inv_conic_edges;    /* inverse conic holdline edges */
+    PK_PLANE_t          limit_1;            /* first limit plane */
+    PK_PLANE_t          limit_2;            /* second limit plane */
+    int                 n_caps;             /* number of caps (0) */
+    const PK_ENTITY_t  *caps;               /* entities for capping */
+    const PK_LOGICAL_t *reverse_cap;        /* whether cap orientation */
+    PK_LOGICAL_t        localise_limit_planes;
+    PK_TOPOL_array_t    limit_topols;       /* limit faces/fins */
+    };
+typedef struct PK_blend_constraint_s PK_blend_constraint_t;
+
+
+
+
+/* PK_blend_constraint_m */
+
+#define PK_blend_constraint_m(options)                             \
+    (                                                              \
+       (options).cliff_edges.length   = 0,                         \
+       (options).tangent_edges.length = 0,                         \
+       (options).conic_edges.length   = 0,                         \
+       (options).inv_tangent_edges.length = 0,                     \
+       (options).inv_conic_edges.length   = 0,                     \
+       (options).limit_1              = PK_ENTITY_null,            \
+       (options).limit_2              = PK_ENTITY_null,            \
+       (options).n_caps               = 0,                         \
+       (options).caps                 = NULL,                      \
+       (options).reverse_cap           = NULL,                     \
+       (options).localise_limit_planes = PK_LOGICAL_false,         \
+       (options).limit_topols.length = 0                           \
+    )
+
+
+/* PK_blend_edge_shape_t */
+
+struct PK_blend_edge_shape_s
+    {
+    int                   n_ranges;    /* number of ranges (0) */
+    double               *ranges_1;    /* first ranges (0.0) */
+    double               *ranges_2;    /* second ranges (0.0) */
+    double               *rhos;        /* ranges (0.0) */
+    PK_VECTOR_t          *positions;   /* positions where ranges apply */
+    };
+typedef struct PK_blend_edge_shape_s PK_blend_edge_shape_t;
+
+
+
+
+/* PK_blend_law_t */
+
+typedef PK_LAW_sf_t PK_blend_law_t;
+
+
+
+
+/* PK_blend_shape_t */
+
+struct PK_blend_shape_s
+    {
+    PK_blend_xs_plane_t xsection;      /* cross section plane */
+    double              radius;        /* constant radius */
+    PK_CURVE_t          parameter;     /* 3D parameter curve */
+    PK_LAW_sf_t         range1;        /* 1D law function; */
+    PK_LAW_sf_t         range2;        /* 1D law function; */
+    PK_LAW_sf_t         rho;           /* 1D law function; */
+    PK_BCURVE_t         depth;         /* 2D law curve; curvature cts blends */
+    double              width;         /* width of blend for Constant Width */
+    double              ratio;         /* ratio of blend ranges for Constant */
+    PK_blend_xs_shape_t xs_shape;      /* cross section shape */
+    double              softness;      /* controls softness of curvature */
+    PK_blend_rho_t      rho_type;      /* whether to use absolute, relative or */
+    double              range1_const;  /* Constant range off left wall (0.0) */
+    double              range2_const;  /* Constant range off right wall (0.0) */
+    double              rho_const;     /* Constant rho for general conics (0.0) */
+    PK_LAW_sf_t         var_width;     /* 1D law function; */
+    PK_LAW_sf_t         var_ratio;     /* 1D law function; */
+
+    };
+typedef struct PK_blend_shape_s PK_blend_shape_t;
+
+
+
+/* PK_blend_shape_m */
+
+#define PK_blend_shape_m(options)                              \
+    (                                                          \
+       (options).xsection       = PK_blend_xs_rolling_ball_c,  \
+       (options).radius         = 0.0,                         \
+       (options).parameter      = PK_ENTITY_null,              \
+        PK_LAW_sf_m((options).range1),                         \
+        PK_LAW_sf_m((options).range2),                         \
+        PK_LAW_sf_m((options).rho),                            \
+       (options).depth          = PK_ENTITY_null,              \
+       (options).width          = 0.0,                         \
+       (options).ratio          = 1.0,                         \
+       (options).xs_shape       = PK_blend_xs_shape_unset_c,   \
+       (options).softness       = 1.0,                         \
+       (options).rho_type       = PK_blend_rho_absolute_c,     \
+       (options).range1_const   = 0.0,                         \
+       (options).range2_const   = 0.0,                         \
+       (options).rho_const      = 0.0,                         \
+        PK_LAW_sf_m((options).var_width),                      \
+        PK_LAW_sf_m((options).var_ratio)                       \
+    )
+
+
+/* PK_blend_rib_control_t */
+
+struct PK_blend_rib_control_s
+    {
+    PK_blend_output_rib_t output_rib;        /* whether and how ribs are made */
+    PK_blend_group_rib_t  group_rib;         /* how to group ribs */
+    int                   max_n_ribs;        /* limit ribs made per group (0) */
+    int                   n_interval_parms;  /* number of parameters (0) */
+    double               *interval_parms;    /* parameters dividing the spine */
+    };
+typedef struct PK_blend_rib_control_s PK_blend_rib_control_t;
+
+
+
+
+/* PK_blend_rib_control_m */
+
+#define PK_blend_rib_control_m(options)                            \
+    (                                                              \
+       (options).output_rib         = PK_blend_output_rib_no_c,    \
+       (options).group_rib          = PK_blend_group_rib_no_c,     \
+       (options).max_n_ribs         = 0,                           \
+       (options).n_interval_parms   = 0,                           \
+       (options).interval_parms     = NULL                         \
+    )
+
+
+/* PK_blend_rib_r_t */
+
+struct PK_blend_rib_r_s
+    {
+    int                   n_ribs;        /* number of ribs */
+    int                  *rib_indices;   /* unique integer ids for each rib */
+    double               *rib_parms;     /* parameter of each rib */
+    PK_GEOM_t            *ribs;          /* ribs */
+    };
+typedef struct PK_blend_rib_r_s PK_blend_rib_r_t;
+
+
+
+/* PK_fxf_error_t */
+
+struct PK_fxf_error_s
+    {
+    PK_fxf_fault_t        fault;         /* blend fault */
+    int                   n_topols;      /* number of topols */
+    PK_TOPOL_t           *topols;        /* associated topology */
+    int                   n_points;      /* number of points */
+    PK_VECTOR_t          *points;        /* error points */
+    int                   n_dists;       /* number of lengths */
+    double               *dists;         /* error lengths */
+    };
+typedef struct PK_fxf_error_s PK_fxf_error_t;
+
+
+
+/* PK_blend_setback_shape_data_t */
+
+struct PK_blend_setback_shape_data_s
+    {
+    PK_blend_setback_shape_t
+                              default_shape;  /* the default */
+    int                       n_vertices;     /* number of vertices at which */
+    const PK_VERTEX_t        *vertices;       /* array of vertices at which the */
+    const PK_blend_setback_shape_t
+                             *shapes;         /* configurations of blend vertex */
+    };
+typedef struct PK_blend_setback_shape_data_s PK_blend_setback_shape_data_t;
+
+
+
+
+/* PK_blend_setback_shape_data_m */
+
+#define PK_blend_setback_shape_data_m(options)                      \
+    (                                                               \
+       (options).default_shape     = PK_blend_setback_collar_all_c, \
+       (options).n_vertices        = 0,                             \
+       (options).vertices          = NULL,                          \
+       (options).shapes            = NULL                           \
+    )
+
+
+/* PK_blend_cap_data_t */
+
+struct PK_blend_cap_data_s
+    {
+    int                 n_caps;        /* number of caps (0) */
+    const PK_ENTITY_t  *caps;          /* entities for capping blend (NULL) */
+    const PK_LOGICAL_t *reverse_cap;   /* whether cap orientation should be */
+    };
+typedef struct PK_blend_cap_data_s PK_blend_cap_data_t;
+
+
+
+
+/* PK_blend_cap_data_m */
+
+#define PK_blend_cap_data_m(options)                            \
+    (                                                           \
+       (options).n_caps              = 0,                       \
+       (options).caps                = NULL,                    \
+       (options).reverse_cap         = NULL                     \
+    )
+
+
+/* PK_blend_delete_unders_data_t */
+
+struct PK_blend_delete_unders_data_s
+    {
+    int                      n_blends;  /* number of blend faces ( 0 ) */
+    const PK_FACE_t         *blends;    /* blend faces ( NULL ) */
+    const PK_ENTITY_array_t *unders;    /* underlying faces for each of the */
+    };
+typedef struct PK_blend_delete_unders_data_s PK_blend_delete_unders_data_t;
+
+
+
+
+/* PK_blend_delete_unders_data_m */
+
+#define PK_blend_delete_unders_data_m(options)                            \
+    (                                                              \
+       (options).n_blends             = 0,                         \
+       (options).blends               = NULL,                      \
+       (options).unders               = NULL                       \
+    )
+
+
+/* PK_range_end_t */
+
+struct PK_range_end_s
+    {
+    PK_ENTITY_t   entity;          /* entity at end of separation */
+    PK_ENTITY_t   sub_entity;      /* sub entity at end of separation */
+    PK_VECTOR_t   vector;          /* end position              (0.0, 0.0, 0.0) */
+    double        parameters[2];   /* parameter(s) at end position   (0.0, 0.0) */
+    PK_LOGICAL_t  region;          /* whether solution is regional */
+    PK_LOGICAL_t  negative;        /* whether other end is inside body */
+    };
+typedef struct PK_range_end_s PK_range_end_t;
+
+
+
+
+/* PK_range_end_m */
+
+#define PK_range_end_m(end)                             \
+    (                                                       \
+       (end).entity          = PK_ENTITY_null,          \
+       (end).sub_entity      = PK_ENTITY_null,          \
+       (end).vector.coord[0] = 0.0,                     \
+       (end).vector.coord[1] = 0.0,                     \
+       (end).vector.coord[2] = 0.0,                     \
+       (end).parameters[0]   = 0.0,                     \
+       (end).parameters[1]   = 0.0,                     \
+       (end).region          = PK_LOGICAL_false,        \
+       (end).negative        = PK_LOGICAL_false         \
+    )
+
+
+/* PK_range_1_r_t */
+
+struct PK_range_1_r_s
+    {
+    double          distance;    /* separation between entity and position */
+    PK_range_end_t  end;         /* end of line of separation on entity */
+    };
+typedef struct PK_range_1_r_s PK_range_1_r_t;
+
+
+
+/* PK_range_1_r_array_t */
+
+struct PK_range_1_r_array_s
+    {
+    PK_range_1_r_t  *array;
+    int              length;
+    };
+typedef struct PK_range_1_r_array_s PK_range_1_r_array_t;
+
+
+
+/* PK_range_2_r_t */
+
+struct PK_range_2_r_s
+    {
+    double          distance;    /* separation between entities */
+    PK_range_end_t  ends[2];     /* ends of line of separation on entities */
+    };
+typedef struct PK_range_2_r_s PK_range_2_r_t;
+
+
+
+
+/* PK_range_2_r_array_t */
+
+struct PK_range_2_r_array_s
+    {
+    PK_range_2_r_t  *array;
+    int              length;
+    };
+typedef struct PK_range_2_r_array_s PK_range_2_r_array_t;
+
+
+
+/* PK_range_guess_t */
+
+struct PK_range_guess_s
+    {
+    PK_range_guess_type_t  type;             /* form of guess */
+    double                 parameters[2];    /* parameters        (0.0, 0.0) */
+    PK_VECTOR_t            vector;           /* end position (0.0, 0.0, 0.0) */
+    };
+typedef struct PK_range_guess_s PK_range_guess_t;
+
+
+
+
+/* PK_range_guess_m */
+
+#define PK_range_guess_m(guess)                              \
+    (                                                          \
+       (guess).type            = PK_range_guess_no_c,        \
+       (guess).parameters[0]   = 0.0,                        \
+       (guess).parameters[1]   = 0.0,                        \
+       (guess).vector.coord[0] = 0.0,                        \
+       (guess).vector.coord[1] = 0.0,                        \
+       (guess).vector.coord[2] = 0.0                         \
+    )
+
+
+/* PK_range_bound_t */
+
+struct PK_range_bound_s
+    {
+    PK_LOGICAL_t        have_upper_bound;  /* (PK_LOGICAL_false) */
+    double              upper_bound;       /* upper bound on min/max separation */
+    PK_LOGICAL_t        have_lower_bound;  /* (PK_LOGICAL_false) */
+    double              lower_bound;       /* lower bound on min/max separation */
+    };
+typedef struct PK_range_bound_s PK_range_bound_t;
+
+
+
+
+/* PK_range_bound_m */
+
+#define PK_range_bound_m(bounds)                              \
+    (                                                          \
+       (bounds).have_upper_bound = PK_LOGICAL_false,          \
+       (bounds).upper_bound      = 0.0,                       \
+       (bounds).have_lower_bound = PK_LOGICAL_false,          \
+       (bounds).lower_bound      = 0.0                        \
+    )
+
+
+/* PK_range_param_bound_t */
+
+struct PK_range_param_bound_s
+    {
+    PK_LOGICAL_t      have_param_bound;
+    PK_CLASS_t        param_bound_class;
+    union
+        {
+        PK_INTERVAL_t interval;
+        PK_UVBOX_t    uvbox;
+        }             param_bound;
+    };
+
+typedef struct PK_range_param_bound_s PK_range_param_bound_t;
+
+
+
+
+/* PK_range_param_bound_m */
+
+#define PK_range_param_bound_m(params)                      \
+    (                                                        \
+    (params).have_param_bound           = PK_LOGICAL_false, \
+    (params).param_bound_class          = PK_CLASS_null,    \
+    (params).param_bound.uvbox.param[0] = 0.0,              \
+    (params).param_bound.uvbox.param[1] = 0.0,              \
+    (params).param_bound.uvbox.param[2] = 0.0,              \
+    (params).param_bound.uvbox.param[3] = 0.0               \
+    )
+
+
+/* PK_SURF_trim_data_t */
+
+struct PK_SURF_trim_data_s
+    {
+    int                n_spcurves;   /* number of trimming curves */
+    PK_CURVE_t        *spcurves;     /* trim curves */
+    PK_INTERVAL_t     *intervals;    /* trim curve intervals */
+    int               *trim_loop;    /* which trim loop */
+    int               *trim_set;     /* which trim set */
+    };
+typedef struct PK_SURF_trim_data_s PK_SURF_trim_data_t;
+
+
+
+
+/* PK_BODY_one_vertex_match_t */
+
+struct PK_BODY_one_vertex_match_s
+    {
+    PK_VERTEX_t profile_vertex;
+    PK_VERTEX_t matched_vertex;
+    };
+
+typedef struct PK_BODY_one_vertex_match_s PK_BODY_one_vertex_match_t;
+
+
+
+/* PK_BODY_one_vertex_match_m */
+
+#define PK_BODY_one_vertex_match_m(one_match)                   \
+    (                                                           \
+       (one_match).profile_vertex  = PK_ENTITY_null,            \
+       (one_match).matched_vertex = PK_ENTITY_null              \
+    )
+
+
+/* PK_BODY_vertex_match_t */
+
+struct PK_BODY_vertex_match_s
+    {
+    PK_BODY_t                   profile;
+    int                         n_matches;
+    PK_BODY_one_vertex_match_t *matches;
+    };
+
+typedef struct PK_BODY_vertex_match_s PK_BODY_vertex_match_t;
+
+
+
+/* PK_BODY_vertex_match_m */
+
+#define PK_BODY_vertex_match_m(match)                           \
+    (                                                           \
+       (match).profile   = PK_ENTITY_null,                      \
+       (match).n_matches = 0,                                   \
+       (match).matches   = NULL                                 \
+    )
+
+
+/* PK_BODY_vertex_matches_t */
+
+struct PK_BODY_vertex_matches_s
+    {
+    int                     n_mappings;
+    PK_BODY_vertex_match_t *mappings;
+    };
+
+typedef struct PK_BODY_vertex_matches_s PK_BODY_vertex_matches_t;
+
+
+
+/* PK_BODY_vertex_matches_m */
+
+#define PK_BODY_vertex_matches_m(matches)                       \
+    (                                                           \
+       (matches).n_mappings = 0,                                \
+       (matches).mappings   = NULL                              \
+    )
+
+
+/* PK_boolean_config_o_m */
+
+#define PK_boolean_config_o_m(options)                      \
+       ((options).o_t_version         = 1,                  \
+        (options).no_tool_intersect   = PK_LOGICAL_false,   \
+        (options).no_loop_intersect   = PK_LOGICAL_false,   \
+        (options).identical_intersect = PK_LOGICAL_true,    \
+        (options).one_in_all_in       = PK_LOGICAL_true)
+
+
+
+/* PK_boolean_region_select_o_m */
+
+#define PK_boolean_region_select_o_m(options)                 \
+       ((options).o_t_version         = 4,                    \
+        (options).select_type         = PK_boolean_include_c, \
+        (options).n_region_selectors  = 0,                    \
+        (options).selectors           = NULL,                 \
+        (options).selector_types      = NULL,                 \
+        (options).n_help_points       = 0,                    \
+        (options).help_points         = NULL,                 \
+        (options).region_types        = NULL                    )
+
+
+/* PK_boolean_select_topolset_o_m */
+
+#define PK_boolean_select_topolset_o_m(options)                    \
+       ((options).o_t_version         = 1,                         \
+        (options).n_selectors         = 0,                         \
+        (options).selectors           = NULL,                      \
+        (options).n_help_points       = 0,                         \
+        (options).help_points         = NULL,                      \
+        (options).target_select       = PK_selector_type_off_c,    \
+        (options).tool_select         = PK_selector_type_off_c,    \
+        (options).split_action        = PK_selector_split_fail_c     )
+
+
+/* PK_boolean_match_region_o_m */
+
+
+#define PK_boolean_match_region_o_m(options)                        \
+       ((options).o_t_version            = 1,                       \
+        (options).regions[0]             = PK_ENTITY_null,          \
+        (options).regions[1]             = PK_ENTITY_null,          \
+        (options).match_type             = PK_boolean_match_exact_c,\
+        (options).tolerance              = 0.0)
+
+
+
+/* PK_boolean_match_o_m */
+
+
+#define PK_boolean_match_o_m(options)                                      \
+       ((options).o_t_version            = 5,                              \
+        (options).n_match_regions        = 0,                              \
+        (options).match_regions          = NULL,                           \
+        (options).auto_match             = PK_LOGICAL_false,               \
+        (options).auto_match_tol         = 0.0,                            \
+        (options).match_style            = PK_boolean_match_style_basic_c, \
+        (options).update                 = PK_boolean_match_update_dflt_c)
+
+
+
+/* PK_FACE_overflow_data_o_m */
+
+#define PK_FACE_overflow_data_o_m(options)                                  \
+      ((options).o_t_version               = 2,                             \
+       (options).laminar_overflow          = PK_FACE_overflow_tangent_c,    \
+       (options).interior_overflow         = PK_FACE_overflow_none_c,       \
+       (options).sweep_direction.coord[0]  = 0.0,                           \
+       (options).sweep_direction.coord[1]  = 0.0,                           \
+       (options).sweep_direction.coord[2]  = 1.0,                           \
+       (options).laminar_walled            = PK_LOGICAL_false               \
+      )
+
+
+/* PK_FACE_instance_bodies_o_m */
+
+#define PK_FACE_instance_bodies_o_m(options)                             \
+       ((options).o_t_version            = 2,                            \
+        (options).function               = PK_boolean_unite_c,           \
+        (options).configuration          = NULL,                         \
+        (options).extend_face_list       = PK_imprint_face_list_no_c,    \
+        (options).repair_fa_fa           = PK_instance_repair_fa_fa_yes_c,\
+        (options).merge_imprinted        = PK_instance_merge_new_c,      \
+        (options).allow_disjoint         = PK_LOGICAL_false,             \
+        (options).check_fa               = PK_boolean_check_fa_yes_c,    \
+        (options).default_tol            = 1.0E-5,                       \
+        (options).max_tol                = 0.0,                          \
+        (options).imprint_complete_targ  = PK_imprint_complete_no_c,     \
+        (options).imprint_complete_tool  = PK_imprint_complete_no_c,     \
+        (options).target_material_side   = PK_boolean_material_default_c,\
+        (options).tool_material_side     = PK_boolean_material_default_c,\
+        (options).limit_target_faces     = PK_LOGICAL_false,             \
+        (options).tracking_type          = PK_instance_track_type_both_c,\
+        (options).track_edges            = PK_instance_track_edges_new_c,\
+        (options).resulting_body_type    = PK_boolean_prefer_original_c, \
+        (options).update                 = PK_boolean_update_default_c   \
+        )
+
+
+/* PK_FACE_boolean_o_m */
+
+#define PK_FACE_boolean_o_m(options)                                     \
+       ((options).o_t_version            = 17,                           \
+        (options).function               = PK_boolean_unite_c,           \
+        (options).configuration          = NULL,                         \
+        (options).select_region          = NULL,                         \
+        (options).matched_region         = NULL,                         \
+        (options).extend_face_list       = PK_imprint_face_list_no_c,    \
+        (options).stop_self_intersection = PK_LOGICAL_false,             \
+        (options).tracking               = PK_LOGICAL_false,             \
+        (options).merge_imprinted        = PK_LOGICAL_false,             \
+        (options).fence                  = PK_boolean_fence_none_c,      \
+        (options).allow_disjoint         = PK_LOGICAL_false,             \
+        (options).selective_merge        = PK_LOGICAL_false,             \
+        (options).check_fa               = PK_boolean_check_fa_yes_c,    \
+        (options).default_tol            = 1.0E-5,                       \
+        (options).max_tol                = 0.0,                          \
+        (options).merge_attributes       = PK_LOGICAL_false,             \
+        (options).keep_target_edges      = PK_LOGICAL_false,             \
+        (options).imprint_complete_targ  = PK_imprint_complete_no_c,     \
+        (options).imprint_complete_tool  = PK_imprint_complete_no_c,     \
+        (options).target_material_side   = PK_boolean_material_default_c,\
+        (options).tool_material_side     = PK_boolean_material_default_c,\
+        (options).resulting_body_type    = PK_boolean_prefer_original_c, \
+        (options).limit_target_faces     = PK_LOGICAL_false,             \
+        (options).flag_no_effect         = PK_boolean_no_effect_basic_c, \
+        (options).limit_tool_faces       = PK_LOGICAL_false,             \
+        (options).tracking_type          = PK_boolean_track_type_basic_c,\
+        (options).target_face_overflow   = NULL,                         \
+        (options).tool_face_overflow     = NULL,                         \
+        (options).update                 = PK_boolean_update_default_c   \
+        )
+
+
+/* PK_BODY_boolean_o_m */
+
+
+#define PK_BODY_boolean_o_m(options)                                         \
+       ((options).o_t_version              = 17,                             \
+        (options).function                 = PK_boolean_unite_c,             \
+        (options).configuration            = NULL,                           \
+        (options).selected_topolset        = NULL,                           \
+        (options).matched_region           = NULL,                           \
+        (options).merge_imprinted          = PK_LOGICAL_false,               \
+        (options).prune_in_solid           = PK_LOGICAL_false,               \
+        (options).prune_in_void            = PK_LOGICAL_false,               \
+        (options).fence                    = PK_boolean_fence_none_c,        \
+        (options).allow_disjoint           = PK_LOGICAL_false,               \
+        (options).selective_merge          = PK_LOGICAL_false,               \
+        (options).check_fa                 = PK_boolean_check_fa_yes_c,      \
+        (options).default_tol              = 1.0E-5,                         \
+        (options).max_tol                  = 0.0,                            \
+        (options).tracking                 = PK_LOGICAL_false,               \
+        (options).merge_attributes         = PK_LOGICAL_false,               \
+        (options).keep_target_edges        = PK_LOGICAL_false,               \
+        (options).imprint_complete_targ    = PK_imprint_complete_no_c,       \
+        (options).imprint_complete_tool    = PK_imprint_complete_no_c,       \
+        (options).target_material_side     = PK_boolean_material_default_c,  \
+        (options).tool_material_side       = PK_boolean_material_default_c,  \
+        (options).resulting_body_type      = PK_boolean_prefer_original_c,   \
+        (options).flag_no_effect           = PK_boolean_no_effect_basic_c,   \
+        (options).nm_edge_repair           = PK_nm_edge_repair_no_c,         \
+        (options).blend_radius             = 1.0E-5,                         \
+        (options).tracking_type            = PK_boolean_track_type_basic_c,  \
+        (options).target_face_overflow     = NULL,                           \
+        (options).tool_face_overflow       = NULL,                           \
+        (options).imprint_overlapping      = PK_LOGICAL_false,               \
+        (options).update                   = PK_boolean_update_default_c,    \
+        (options).merge_in_solid           = PK_LOGICAL_false,               \
+        (options).merge_in_solid_dimension = PK_TOPOL_dimension_any_c,       \
+        (options).merge_in_face            = PK_LOGICAL_false,               \
+        (options).merge_in_face_dimension  = PK_TOPOL_dimension_any_c,       \
+        (options).merge_in_edge            = PK_LOGICAL_false                \
+        )
+
+
+/* PK_boolean_report_r_t */
+
+struct PK_boolean_report_r_s
+    {
+    PK_boolean_report_t        report;
+    int                        n_entities;
+    PK_ENTITY_t               *entities;
+    };
+typedef struct PK_boolean_report_r_s PK_boolean_report_r_t;
+
+
+
+/* PK_boolean_r_t */
+
+struct PK_boolean_r_s
+    {
+    PK_boolean_result_t        result;
+    int                        n_bodies;
+    PK_BODY_t                 *bodies;
+    int                        n_reports;
+    PK_boolean_report_r_t     *reports;
+    };
+typedef struct PK_boolean_r_s PK_boolean_r_t;
+
+
+
+/* PK_boolean_config_o_t */
+
+struct PK_boolean_config_o_s
+    {
+    int             o_t_version;         /* version number */
+    PK_LOGICAL_t    no_tool_intersect;   /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    no_loop_intersect;   /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    identical_intersect; /* (PK_LOGICAL_true) */
+    PK_LOGICAL_t    one_in_all_in;       /* (PK_LOGICAL_true) */
+    };
+typedef struct PK_boolean_config_o_s PK_boolean_config_o_t;
+
+
+
+
+/* PK_boolean_region_select_o_t */
+
+struct PK_boolean_region_select_o_s
+    {
+    int                          o_t_version;        /* version number */
+    PK_boolean_region_t          select_type;        /* (PK_boolean_include_c) */
+    int                          n_region_selectors; /* (0) */
+    const PK_TOPOL_t            *selectors;          /* (NULL) */
+    const PK_boolean_select_t   *selector_types;     /* (NULL) */
+    int                          n_help_points;      /* (0) */
+    const PK_VECTOR_t           *help_points;        /* (NULL) */
+    const PK_boolean_region_t   *region_types;       /* (NULL) */
+    };
+typedef struct PK_boolean_region_select_o_s PK_boolean_region_select_o_t;
+
+
+
+
+/* PK_boolean_select_topolset_o_t */
+
+struct PK_boolean_select_topolset_o_s
+    {
+    int                         o_t_version;    /* version number */
+    int                         n_selectors;    /* (0) */
+    const PK_TOPOL_t           *selectors;      /* (NULL) */
+    int                         n_help_points;  /* (0) */
+    const PK_VECTOR_t          *help_points;    /* (NULL) */
+    PK_selector_type_t          target_select;  /* (PK_selector_type_off_c) */
+    PK_selector_type_t          tool_select;    /* (PK_selector_type_off_c) */
+    PK_selector_split_t         split_action;   /* (PK_selector_split_fail_c) */
+    };
+typedef struct PK_boolean_select_topolset_o_s
+    PK_boolean_select_topolset_o_t;
+
+
+
+/* PK_boolean_match_region_o_t */
+
+struct PK_boolean_match_region_o_s
+    {
+    int                    o_t_version;  /* version number */
+    PK_TOPOL_t             regions[2];   /* (PK_ENTITY_null, PK_ENTITY_null) */
+    PK_boolean_match_t     match_type;   /* (PK_boolean_match_exact_c) */
+    double                 tolerance;    /* (0.0) */
+    };
+typedef struct PK_boolean_match_region_o_s PK_boolean_match_region_o_t;
+
+
+
+
+/* PK_boolean_match_o_t */
+
+struct PK_boolean_match_o_s
+    {
+    int                 o_t_version;      /* version number */
+    PK_boolean_match_style_t
+                        match_style;      /* (PK_boolean_match_style_basic_c) */
+    PK_LOGICAL_t        auto_match;       /* (PK_LOGICAL_false) */
+    double              auto_match_tol;   /* (0.0) */
+    int                 n_match_regions;  /* (0) */
+    const PK_boolean_match_region_o_t
+                       *match_regions;    /* (NULL) */
+    PK_boolean_match_update_t
+                        update;           /* (PK_boolean_match_update_dflt_c) */
+    };
+typedef struct PK_boolean_match_o_s PK_boolean_match_o_t;
+
+
+
+
+/* PK_FACE_overflow_data_o_t */
+
+struct PK_FACE_overflow_data_o_s
+    {
+    int                   o_t_version;       /* version number */
+    PK_FACE_overflow_t    interior_overflow; /* how to overflow across */
+    PK_FACE_overflow_t    laminar_overflow;  /* how to overflow across */
+    PK_VECTOR1_t          sweep_direction;   /* sweep direction */
+    PK_LOGICAL_t          laminar_walled;    /* whether to add side faces */
+    };
+typedef struct PK_FACE_overflow_data_o_s PK_FACE_overflow_data_o_t;
+
+
+/* PK_FACE_instance_bodies_o_t */
+
+struct PK_FACE_instance_bodies_o_s
+    {
+    int                   o_t_version;      /* version number */
+    PK_boolean_function_t function;         /* boolean operation */
+    const PK_boolean_config_o_t
+                         *configuration;    /* target and tool */
+    PK_imprint_face_list_t
+                          extend_face_list;
+    PK_instance_repair_fa_fa_t
+                          repair_fa_fa;     /* prevent self intersections */
+    PK_instance_merge_t   merge_imprinted;  /* merge imprinted edges where */
+    PK_LOGICAL_t          allow_disjoint;   /* allow disjoint body */
+    PK_boolean_check_fa_t check_fa;         /* face check options */
+    double                default_tol;      /* default tolerance */
+    double                max_tol;          /* max tolerance */
+    PK_imprint_complete_t imprint_complete_targ;
+    PK_imprint_complete_t imprint_complete_tool;
+    PK_boolean_material_t target_material_side;
+    PK_boolean_material_t tool_material_side;
+    PK_LOGICAL_t          limit_target_faces;
+    PK_instance_track_type_t
+                          tracking_type;    /* level of tracking reporting */
+    PK_instance_track_edges_t
+                          track_edges;      /* level of edge tracking */
+
+    PK_boolean_prefer_t   resulting_body_type;
+    PK_boolean_update_t   update;           /* update switch */
+    };
+typedef struct PK_FACE_instance_bodies_o_s PK_FACE_instance_bodies_o_t;
+
+
+
+
+/* PK_FACE_boolean_o_t */
+
+struct PK_FACE_boolean_o_s
+    {
+    int                   o_t_version;       /* version number */
+    PK_boolean_function_t function;          /* boolean operation */
+    const PK_boolean_config_o_t
+                         *configuration;     /* target and tool */
+    const PK_boolean_region_select_o_t
+                         *select_region;     /* region selection (NULL) */
+    const PK_boolean_match_o_t
+                         *matched_region;    /* regions to match (NULL) */
+    PK_imprint_face_list_t
+                          extend_face_list;  /* whether to use additional */
+    PK_LOGICAL_t          stop_self_intersection;
+    PK_LOGICAL_t          tracking;          /* include tracking */
+    PK_LOGICAL_t          merge_imprinted;   /* merge imprinted edges where */
+    PK_boolean_fence_t    fence;             /* fencing options */
+    PK_LOGICAL_t          allow_disjoint;    /* allow disjoint body */
+    PK_LOGICAL_t          selective_merge;   /* selective merge */
+    PK_boolean_check_fa_t check_fa;          /* face check options */
+    double                default_tol;       /* default tolerance */
+    double                max_tol;           /* max tolerance */
+    PK_LOGICAL_t          merge_attributes;  /* merge attributes */
+    PK_LOGICAL_t          keep_target_edges; /* handle coi edges */
+    PK_imprint_complete_t imprint_complete_targ;
+    PK_imprint_complete_t imprint_complete_tool;
+    PK_boolean_material_t target_material_side;
+    PK_boolean_material_t tool_material_side;
+    PK_boolean_prefer_t   resulting_body_type;
+    PK_LOGICAL_t          limit_target_faces;
+    PK_boolean_no_effect_t
+                          flag_no_effect;    /* level of reporting of */
+    PK_LOGICAL_t          limit_tool_faces;
+    PK_boolean_track_type_t
+                          tracking_type;     /* level of tracking reporting */
+    const PK_FACE_overflow_data_o_t
+                         *target_face_overflow;
+    const PK_FACE_overflow_data_o_t
+                         *tool_face_overflow;
+    PK_boolean_update_t   update;            /* update switch */
+    };
+typedef struct PK_FACE_boolean_o_s PK_FACE_boolean_o_t;
+
+
+
+
+/* PK_BODY_boolean_o_t */
+
+struct PK_BODY_boolean_o_s
+    {
+    int                   o_t_version;       /* version number */
+    PK_boolean_function_t function;          /* which boolean operation */
+    const PK_boolean_config_o_t
+                         *configuration;     /* target and tool */
+    const PK_boolean_select_topolset_o_t
+                         *selected_topolset; /* topolsets to select (NULL) */
+    const PK_boolean_match_o_t
+                         *matched_region;    /* regions to match (NULL) */
+    PK_LOGICAL_t          merge_imprinted;   /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          prune_in_solid;    /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          prune_in_void;     /* (PK_LOGICAL_false) */
+    PK_boolean_fence_t    fence;             /* (PK_boolean_fence_none_c) */
+    PK_LOGICAL_t          allow_disjoint;    /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          selective_merge;   /* (PK_LOGICAL_false) */
+    PK_boolean_check_fa_t check_fa;          /* (PK_boolean_check_fa_yes_c) */
+    double                default_tol;       /* (1.0E-5) */
+    double                max_tol;           /* (0.0) */
+    PK_LOGICAL_t          tracking;          /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          merge_attributes;  /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          keep_target_edges; /* (PK_LOGICAL_false) */
+    PK_imprint_complete_t imprint_complete_targ;
+    PK_imprint_complete_t imprint_complete_tool;
+    PK_boolean_material_t target_material_side;
+    PK_boolean_material_t tool_material_side;
+    PK_boolean_prefer_t   resulting_body_type;
+    PK_boolean_no_effect_t
+                          flag_no_effect;    /* level of reporting of */
+    PK_nm_edge_repair_t   nm_edge_repair;    /* whether to ignore non-manifold */
+    double                blend_radius;      /* blend radius associated with */
+    PK_boolean_track_type_t
+                          tracking_type;     /* level of tracking reporting */
+    const PK_FACE_overflow_data_o_t
+                         *target_face_overflow;
+    const PK_FACE_overflow_data_o_t
+                         *tool_face_overflow;
+    PK_LOGICAL_t          imprint_overlapping;
+    PK_boolean_update_t   update;            /* update switch */
+    PK_LOGICAL_t          merge_in_solid;    /* whether any topologies which */
+    PK_TOPOL_dimension_t  merge_in_solid_dimension;
+    PK_LOGICAL_t          merge_in_face;     /* whether any redundant */
+    PK_TOPOL_dimension_t  merge_in_face_dimension;
+    PK_LOGICAL_t          merge_in_edge;     /* whether any redundant */
+    };
+typedef struct PK_BODY_boolean_o_s PK_BODY_boolean_o_t;
+
+
+
+
+/* PK_FACE_section_o_m */
+
+
+#define PK_FACE_section_o_m(options)                                     \
+       (                                                                 \
+           (options).o_t_version            = 4,                         \
+           (options).fence                  = PK_section_fence_both_c,   \
+           (options).configuration          = NULL,                      \
+           (options).select_region          = NULL,                      \
+           (options).matched_region         = NULL,                      \
+           (options).extend_face_list       = PK_LOGICAL_false,          \
+           (options).merge_imprinted        = PK_LOGICAL_false,          \
+           (options).merge_new_faces        = PK_LOGICAL_false,          \
+           (options).selective_merge        = PK_LOGICAL_false,          \
+           (options).check_fa               = PK_section_check_fa_yes_c, \
+           (options).default_tol            = 1.0E-5,                    \
+           (options).max_tol                = 0.0,                       \
+           (options).tracking               = PK_LOGICAL_false,          \
+           (options).keep_target_edges      = PK_LOGICAL_false           \
+       )
+
+
+
+/* PK_BODY_section_o_m */
+
+
+#define PK_BODY_section_o_m(options)                                     \
+       (                                                                 \
+           (options).o_t_version            = 4,                         \
+           (options).fence                  = PK_section_fence_both_c,   \
+           (options).matched_region         = NULL,                      \
+           (options).merge_imprinted        = PK_LOGICAL_false,          \
+           (options).merge_new_faces        = PK_LOGICAL_false,          \
+           (options).selective_merge        = PK_LOGICAL_false,          \
+           (options).check_fa               = PK_section_check_fa_yes_c, \
+           (options).default_tol            = 1.0E-5,                    \
+           (options).max_tol                = 0.0,                       \
+           (options).tracking               = PK_LOGICAL_false,          \
+           (options).keep_target_edges      = PK_LOGICAL_false           \
+       )
+
+
+
+/* PK_BODY_make_section_o_m */
+
+
+#define PK_BODY_make_section_o_m(options)                                \
+       (                                                                 \
+           (options).o_t_version            = 1,                         \
+           (options).default_tol            = 1.0E-5,                    \
+           (options).max_tol                = 0.0,                       \
+           (options).tracking               = PK_LOGICAL_false,          \
+           (options).allow_disjoint         = PK_LOGICAL_false,          \
+           (options).result_body_type       = PK_BODY_type_sheet_c       \
+       )
+
+
+
+/* PK_FACE_make_sect_with_sfs_o_m */
+
+
+#define PK_FACE_make_sect_with_sfs_o_m(options)                          \
+       (                                                                 \
+           (options).o_t_version            = 1,                         \
+           (options).tracking               = PK_LOGICAL_false,          \
+           (options).allow_disjoint         = PK_LOGICAL_false,          \
+           (options).extend_face_list       = PK_LOGICAL_false           \
+       )
+
+
+
+/* PK_section_report_r_t */
+
+struct PK_section_report_r_s
+    {
+    PK_section_report_t        report;
+    int                        n_entities;
+    PK_ENTITY_t               *entities;
+    };
+typedef struct PK_section_report_r_s PK_section_report_r_t;
+
+
+
+/* PK_BODY_make_section_r_t */
+
+struct PK_BODY_make_section_r_s
+    {
+    int                     n_bodies;        /* number of bodies */
+    PK_BODY_t              *bodies;          /* bodies */
+    int                     n_reports;       /* number of reports */
+    PK_section_report_r_t  *reports;         /* array of report structures */
+    };
+typedef struct PK_BODY_make_section_r_s PK_BODY_make_section_r_t;
+
+
+
+
+/* PK_FACE_make_sect_with_sfs_r_t */
+
+struct PK_FACE_make_sect_with_sfs_r_s
+    {
+    int                     n_bodies;        /* number of bodies */
+    PK_BODY_t              *bodies;          /* bodies */
+    int                     n_reports;       /* number of reports */
+    PK_section_report_r_t  *reports;         /* array of report structures */
+    };
+typedef struct PK_FACE_make_sect_with_sfs_r_s PK_FACE_make_sect_with_sfs_r_t;
+
+
+
+
+/* PK_section_2_r_t */
+
+struct PK_section_2_r_s
+    {
+    PK_section_result_t     result;          /* result of sectioning operation */
+    int                     n_front_bodies;  /* number of front bodies */
+    PK_BODY_t              *front_bodies;    /* bodies in front of section */
+    int                     n_back_bodies;   /* number of back bodies */
+    PK_BODY_t              *back_bodies;     /* bodies behind section */
+    int                     n_front_faces;   /* number of front faces */
+    PK_FACE_t              *front_faces;     /* faces in front of section */
+    int                     n_back_faces;    /* number of back faces */
+    PK_FACE_t              *back_faces;      /* faces behind section */
+    int                     n_reports;       /* number of reports */
+    PK_section_report_r_t  *reports;         /* array of report structures */
+    };
+typedef struct PK_section_2_r_s PK_section_2_r_t;
+
+
+
+
+/* PK_section_r_t */
+
+struct PK_section_r_s
+    {
+    PK_BODY_array_t front_bodies;   /* Bodies in front of section */
+    PK_BODY_array_t back_bodies;    /* Bodies behind section */
+    PK_FACE_array_t front_faces;    /* Faces in front of section */
+    PK_FACE_array_t back_faces;     /* Faces behind section */
+    };
+typedef struct PK_section_r_s PK_section_r_t;
+
+
+
+
+/* PK_FACE_section_o_t */
+
+
+struct PK_FACE_section_o_s
+    {
+    int                       o_t_version;       /* version number */
+    PK_section_fence_t        fence;             /* (PK_section_fence_both_c) */
+    const PK_boolean_config_o_t
+                             *configuration;     /* (NULL) */
+    const PK_boolean_region_select_o_t
+                             *select_region;     /* (NULL) */
+    const PK_boolean_match_o_t
+                             *matched_region;    /* (NULL) */
+    PK_LOGICAL_t              extend_face_list;  /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              merge_imprinted;   /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              merge_new_faces;   /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              selective_merge;   /* (PK_LOGICAL_false) */
+    PK_section_check_fa_t     check_fa;          /* (PK_section_check_fa_yes_c) */
+    double                    default_tol;       /* (1.0E-5) */
+    double                    max_tol;           /* (0.0) */
+    PK_LOGICAL_t              tracking;          /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              keep_target_edges;   /* (PK_LOGICAL_false) */
+    };
+typedef struct PK_FACE_section_o_s PK_FACE_section_o_t;
+
+
+
+
+/* PK_BODY_section_o_t */
+
+struct PK_BODY_section_o_s
+    {
+    int                       o_t_version;      /* version number */
+    PK_section_fence_t        fence;            /* (PK_section_fence_both_c) */
+    const PK_boolean_match_o_t
+                             *matched_region;   /* (NULL) */
+    PK_LOGICAL_t              merge_imprinted;  /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              merge_new_faces;  /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              selective_merge;  /* (PK_LOGICAL_false) */
+    PK_section_check_fa_t     check_fa;         /* (PK_section_check_fa_yes_c) */
+    double                    default_tol;      /* (1.0E-5) */
+    double                    max_tol;          /* (0.0) */
+    PK_LOGICAL_t              tracking;         /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              keep_target_edges;   /* (PK_LOGICAL_false) */
+    };
+typedef struct PK_BODY_section_o_s  PK_BODY_section_o_t;
+
+
+
+
+/* PK_BODY_make_section_o_t */
+
+struct PK_BODY_make_section_o_s
+    {
+    int                       o_t_version;       /* version number */
+    double                    default_tol;       /* (1.0E-5) */
+    double                    max_tol;           /* (0.0) */
+    PK_LOGICAL_t              tracking;          /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t              allow_disjoint;    /* (PK_LOGICAL_false) */
+    PK_BODY_type_t            result_body_type;  /* (PK_BODY_type_sheet_c) */
+    };
+typedef struct PK_BODY_make_section_o_s  PK_BODY_make_section_o_t;
+
+
+
+
+/* PK_FACE_make_sect_with_sfs_o_t */
+
+struct PK_FACE_make_sect_with_sfs_o_s
+    {
+    int                       o_t_version;       /* Version number */
+    PK_LOGICAL_t              tracking;          /* Whether the tracking */
+    PK_LOGICAL_t              allow_disjoint;    /* Whether a disjoint body */
+    PK_LOGICAL_t              extend_face_list;  /* Whether to use additional */
+    };
+typedef struct PK_FACE_make_sect_with_sfs_o_s
+            PK_FACE_make_sect_with_sfs_o_t;
+
+
+
+
+/* PK_FACE_imprint_faces_o_m */
+
+#define PK_FACE_imprint_faces_o_m(options)                            \
+    (                                                                 \
+       (options).o_t_version           = 3,                           \
+       (options).imprint_tool          = PK_LOGICAL_true,             \
+       (options).imprint_overlapping   = PK_LOGICAL_false,            \
+       (options).extend_face_list      = PK_imprint_face_list_no_c,   \
+       (options).matched_region        = NULL,                        \
+       (options).imprint_complete_targ = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_targ   = PK_imprint_extend_tangent_c, \
+       (options).imprint_complete_tool = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_tool   = PK_imprint_extend_tangent_c, \
+       (options).imprint_dir           = PK_imprint_dir_no_check_c,   \
+       (options).update                = PK_boolean_update_default_c  \
+    )
+
+
+/* PK_FACE_imprint_o_m */
+
+#define PK_FACE_imprint_o_m(options)                                  \
+    (                                                                 \
+       (options).o_t_version           = 3,                           \
+       (options).imprint_tool          = PK_LOGICAL_true,             \
+       (options).imprint_overlapping   = PK_LOGICAL_false,            \
+       (options).extend_face_list      = PK_imprint_face_list_no_c,   \
+       (options).matched_region        = NULL,                        \
+       (options).imprint_complete_targ = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_targ   = PK_imprint_extend_tangent_c, \
+       (options).imprint_complete_tool = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_tool   = PK_imprint_extend_tangent_c  \
+    )
+
+
+/* PK_BODY_imprint_faces_o_m */
+
+#define PK_BODY_imprint_faces_o_m(options)                            \
+    (                                                                 \
+       (options).o_t_version           = 3,                           \
+       (options).imprint_tool          = PK_LOGICAL_true,             \
+       (options).imprint_overlapping   = PK_LOGICAL_false,            \
+       (options).extend_face_list      = PK_imprint_face_list_no_c,   \
+       (options).matched_region        = NULL,                        \
+       (options).imprint_complete_targ = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_targ   = PK_imprint_extend_tangent_c, \
+       (options).imprint_complete_tool = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_tool   = PK_imprint_extend_tangent_c, \
+       (options).imprint_dir           = PK_imprint_dir_no_check_c,   \
+       (options).update                = PK_boolean_update_default_c  \
+    )
+
+
+/* PK_BODY_imprint_o_m */
+
+#define PK_BODY_imprint_o_m(options)                                  \
+    (                                                                 \
+       (options).o_t_version           = 4,                           \
+       (options).imprint_tool          = PK_LOGICAL_true,             \
+       (options).imprint_overlapping   = PK_LOGICAL_false,            \
+       (options).matched_region        = NULL,                        \
+       (options).imprint_complete_targ = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_targ   = PK_imprint_extend_tangent_c, \
+       (options).imprint_complete_tool = PK_imprint_complete_no_c,    \
+       (options).imprint_extend_tool   = PK_imprint_extend_tangent_c, \
+       (options).update                = PK_boolean_update_default_c  \
+    )
+
+
+/* PK_BODY_imprint_plane_o_m */
+
+#define PK_BODY_imprint_plane_o_m(options)                            \
+    (                                                                 \
+       (options).o_t_version           = 1,                           \
+       (options).have_tolerance        = PK_LOGICAL_false,            \
+       (options).tolerance             = 0.0,                         \
+       (options).imprint_dir           = PK_imprint_dir_no_check_c    \
+    )
+
+
+/* PK_FACE_imprint_faces_o_t */
+
+struct PK_FACE_imprint_faces_o_s
+    {
+    int           o_t_version;            /* version number of option structure */
+    PK_LOGICAL_t  imprint_tool;           /* whether to imprint on tool */
+    PK_LOGICAL_t  imprint_overlapping;    /* whether to imprint boundaries of */
+    PK_imprint_face_list_t
+                  extend_face_list;       /* whether to extend list of faces */
+    const PK_boolean_match_o_t
+                  *matched_region;        /* regions to match (NULL) */
+    PK_imprint_complete_t
+                  imprint_complete_targ;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_targ;    /* direction in which to complete */
+    PK_imprint_complete_t
+                  imprint_complete_tool;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_tool;    /* direction in which to complete */
+    PK_imprint_dir_t
+                  imprint_dir;            /* whether imprinted edges should */
+    PK_boolean_update_t
+                  update;                 /* update switch */
+    };
+
+typedef struct PK_FACE_imprint_faces_o_s PK_FACE_imprint_faces_o_t;
+
+
+
+/* PK_FACE_imprint_o_t */
+
+struct PK_FACE_imprint_o_s
+    {
+    int           o_t_version;            /* version number of option structure */
+    PK_LOGICAL_t  imprint_tool;           /* whether to imprint on tool */
+    PK_LOGICAL_t  imprint_overlapping;    /* whether to imprint boundaries of */
+    PK_imprint_face_list_t
+                  extend_face_list;       /* whether to extend list of faces */
+    const PK_boolean_match_o_t
+                  *matched_region;        /* regions to match (NULL) */
+    PK_imprint_complete_t
+                  imprint_complete_targ;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_targ;    /* direction in which to complete */
+    PK_imprint_complete_t
+                  imprint_complete_tool;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_tool;    /* direction in which to complete */
+    };
+
+typedef struct PK_FACE_imprint_o_s PK_FACE_imprint_o_t;
+
+
+
+/* PK_BODY_imprint_faces_o_t */
+
+struct PK_BODY_imprint_faces_o_s
+    {
+    int           o_t_version;            /* version number of option structure */
+    PK_LOGICAL_t  imprint_tool;           /* whether to imprint on tool */
+    PK_LOGICAL_t  imprint_overlapping;    /* whether to imprint boundaries of */
+    PK_imprint_face_list_t
+                  extend_face_list;       /* whether to extend list of faces */
+    const PK_boolean_match_o_t
+                 *matched_region;         /* regions to match (NULL) */
+    PK_imprint_complete_t
+                  imprint_complete_targ;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_targ;    /* direction in which to complete */
+    PK_imprint_complete_t
+                  imprint_complete_tool;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_tool;    /* direction in which to complete */
+    PK_imprint_dir_t
+                  imprint_dir;            /* whether imprinted edges should */
+    PK_boolean_update_t
+                  update;                 /* update switch */
+    };
+
+typedef struct PK_BODY_imprint_faces_o_s PK_BODY_imprint_faces_o_t;
+
+
+
+/* PK_BODY_imprint_o_t */
+
+struct PK_BODY_imprint_o_s
+    {
+    int           o_t_version;            /* version number of option structure */
+    PK_LOGICAL_t  imprint_tool;           /* whether to imprint on tool */
+    PK_LOGICAL_t  imprint_overlapping;    /* whether to imprint boundaries of */
+    const PK_boolean_match_o_t
+                  *matched_region;        /* regions to match (NULL) */
+    PK_imprint_complete_t
+                  imprint_complete_targ;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_targ;    /* direction in which to complete */
+    PK_imprint_complete_t
+                  imprint_complete_tool;  /* whether to complete imprint on */
+    PK_imprint_extend_t
+                  imprint_extend_tool;    /* direction in which to complete */
+    PK_boolean_update_t
+                  update;                 /* update switch */
+    };
+
+typedef struct PK_BODY_imprint_o_s PK_BODY_imprint_o_t;
+
+
+
+/* PK_BODY_imprint_plane_o_t */
+
+struct PK_BODY_imprint_plane_o_s
+    {
+    int               o_t_version;        /* version number of option structure */
+    PK_LOGICAL_t      have_tolerance;     /* whether a tolerance is provided */
+    double            tolerance;          /* operation tolerance (0.0) */
+    PK_imprint_dir_t  imprint_dir;        /* whether imprinted edges should */
+    };
+
+typedef struct PK_BODY_imprint_plane_o_s PK_BODY_imprint_plane_o_t;
+
+
+
+/* PK_imprint_r_t */
+
+struct PK_imprint_r_s
+    {
+    PK_EDGE_array_t    target_edges;      /* corresponding edges on target */
+    PK_EDGE_array_t    tool_edges;        /* corresponding edges on tool */
+    PK_VERTEX_array_t  target_vertices;   /* corresponding vertices on target */
+    PK_VERTEX_array_t  tool_vertices;     /* corresponding vertices on tool */
+    };
+typedef struct PK_imprint_r_s PK_imprint_r_t;
+
+
+
+
+/* PK_ENTITY_ask_description_o_m */
+
+
+#define PK_ENTITY_ask_description_o_m(options)                       \
+       ((options).o_t_version            = 1                         )
+
+
+
+/* PK_ENTITY_ask_description_o_t */
+
+
+struct PK_ENTITY_ask_description_o_s
+    {
+    int                        o_t_version;  /* version number */
+    };
+typedef struct PK_ENTITY_ask_description_o_s PK_ENTITY_ask_description_o_t;
+
+
+
+
+/* PK_ENTITY_check_attribs_o_t */
+
+struct PK_ENTITY_check_attribs_o_s
+    {
+    int                 o_t_version;       /* version number */
+    PK_LOGICAL_t        return_faults;     /* return fault information */
+    PK_LOGICAL_t        check_sub;         /* check sub-entities of that given */
+    };
+typedef struct PK_ENTITY_check_attribs_o_s PK_ENTITY_check_attribs_o_t;
+
+
+/* PK_ENTITY_check_attribs_o_m */
+
+#define PK_ENTITY_check_attribs_o_m(options)                            \
+    (                                                                   \
+        (options).o_t_version       = 1,                                \
+        (options).return_faults     = PK_LOGICAL_true,                  \
+        (options).check_sub         = PK_LOGICAL_true                   \
+    )
+
+
+/* PK_ENTITY_copy_o_t */
+
+struct PK_ENTITY_copy_o_s
+    {
+    int                 o_t_version;       /* version number */
+    PK_LOGICAL_t        want_user_fields;  /* copy user fields */
+    PK_LOGICAL_t        want_attribs;      /* copy attributes */
+    PK_LOGICAL_t        want_groups;       /* copy groups */
+    PK_LOGICAL_t        want_tracking;     /* create tracking information */
+    PK_CLASS_array_t    track_classes;     /* classes to track */
+    };
+typedef struct PK_ENTITY_copy_o_s PK_ENTITY_copy_o_t;
+
+
+/* PK_ENTITY_copy_o_m */
+
+
+#define PK_ENTITY_copy_o_m(options)                                 \
+       ((options).o_t_version          = 1,                         \
+        (options).want_user_fields     = PK_LOGICAL_false,          \
+        (options).want_attribs         = PK_LOGICAL_false,          \
+        (options).want_groups          = PK_LOGICAL_false,          \
+        (options).want_tracking        = PK_LOGICAL_false,          \
+        (options).track_classes.array  = NULL,                      \
+        (options).track_classes.length = 0                          )
+
+
+
+/* PK_ATTDEF_sf_t */
+
+struct PK_ATTDEF_sf
+    {
+    char                *name;              /* name of attribute type */
+    PK_ATTDEF_class_t    attdef_class;      /* transform characteristics */
+    int                  n_owner_types;     /* number of legal owners (>0) */
+    PK_CLASS_t          *owner_types;       /* legal owner types */
+    int                  n_fields;          /* number of fields (>= 0) */
+    PK_ATTRIB_field_t   *field_types;       /* types of above fields */
+    };
+typedef struct PK_ATTDEF_sf PK_ATTDEF_sf_t;
+
+
+
+/* PK_field_names_t */
+
+typedef union PK_field_names_u
+    {
+    char       **names;
+    PK_UCHAR_t **unames;
+    }
+    PK_field_names_t;
+
+
+
+/* PK_ATTDEF_sf_2_t */
+
+struct PK_ATTDEF_sf_2
+    {
+    char                *name;              /* name of attribute type */
+    PK_ATTDEF_class_t    attdef_class;      /* transform characteristics */
+    int                  n_owner_types;     /* number of legal owners (>0) */
+    PK_CLASS_t          *owner_types;       /* legal owner types */
+    int                  n_fields;          /* number of fields (>= 0) */
+    PK_ATTRIB_field_t   *field_types;       /* types of above fields */
+    PK_LOGICAL_t         unicode_names;     /* Unicode or char names */
+    PK_field_names_t     field_names;       /* names of above fields */
+    int                 *field_sizes;       /* for future use */
+    };
+typedef struct PK_ATTDEF_sf_2 PK_ATTDEF_sf_2_t;
+
+
+
+/* PK_ATTDEF_split_callback_f_t */
+
+typedef void    (*PK_ATTDEF_split_callback_f_t)
+(
+PK_ENTITY_t       old_entity,         /* the pre-existing entity */
+int               n_attribs,          /* number of attribs on `old_entity' */
+const PK_ATTRIB_t attribs[],          /* attribs on `old_entity' */
+PK_ENTITY_t       new_entity          /* the new entity split from `old_entity' */
+);
+
+
+/* PK_ATTDEF_merge_callback_f_t */
+
+typedef void    (*PK_ATTDEF_merge_callback_f_t)
+(
+PK_ENTITY_t       live_entity,        /* the entity that will survive the merge */
+int               n_live_attribs,     /* number of attribs on `live_entity' */
+const PK_ATTRIB_t live_attribs[],     /* attribs on `live_entity' */
+PK_ENTITY_t       doomed_entity,      /* the entity that will not survive the */
+int               n_doomed_attribs,   /* number of attribs on `doomed_entity' */
+const PK_ATTRIB_t doomed_attribs[]    /* attribs on `doomed_entity' */
+);
+
+
+/* PK_ATTDEF_delete_callback_f_t */
+
+typedef void    (*PK_ATTDEF_delete_callback_f_t)
+(
+PK_ENTITY_t       entity,             /* entity to be deleted */
+int               n_attribs,          /* number of attribs on `entity' */
+const PK_ATTRIB_t attribs[]           /* attribs on `entity' */
+);
+
+
+/* PK_ATTDEF_copy_callback_f_t */
+
+typedef void    (*PK_ATTDEF_copy_callback_f_t)
+(
+PK_ENTITY_t       old_entity,         /* pre-existing entity */
+int               n_attribs,          /* number of attribs on `old_entity' */
+const PK_ATTRIB_t attribs[],          /* attribs on `old_entity' */
+PK_ENTITY_t       new_entity          /* the new copy of `old_entity' */
+);
+
+
+/* PK_ATTDEF_transmit_callback_f_t */
+
+typedef void    (*PK_ATTDEF_transmit_callback_f_t)
+(
+PK_ENTITY_t       entity,             /* entity to be transmitted */
+int               n_attribs,          /* number of attribs on `entity */
+const PK_ATTRIB_t attribs[]           /* attribs on `entity' */
+);
+
+
+/* PK_ATTDEF_receive_callback_f_t */
+
+typedef void    (*PK_ATTDEF_receive_callback_f_t)
+(
+PK_ENTITY_t       entity,             /* entity which has been received */
+int               n_attribs,          /* number of attribs on `entity' */
+const PK_ATTRIB_t attribs[]           /* attribs on `entity' */
+);
+
+
+/* PK_ATTDEF_callback_fns_t */
+
+typedef struct PK_ATTDEF_callback_fns_s
+    {
+    PK_ATTDEF_split_callback_f_t    split_fn;     /* split callback function */
+    PK_ATTDEF_merge_callback_f_t    merge_fn;     /* merge callback function */
+    PK_ATTDEF_delete_callback_f_t   delete_fn;    /* delete callback function */
+    PK_ATTDEF_copy_callback_f_t     copy_fn;      /* copy callback function */
+    PK_ATTDEF_transmit_callback_f_t transmit_fn;  /* transmit callback function */
+    PK_ATTDEF_receive_callback_f_t  receive_fn;   /* receive callback function */
+    }
+    PK_ATTDEF_callback_fns_t;
+
+
+
+/* PK_ATTDEF_callback_flags_t */
+
+
+typedef struct PK_ATTDEF_callback_flags_s
+    {
+    PK_LOGICAL_t split_callback_on;
+    PK_LOGICAL_t merge_callback_on;
+    PK_LOGICAL_t delete_callback_on;
+    PK_LOGICAL_t copy_callback_on;
+    PK_LOGICAL_t transmit_callback_on;
+    PK_LOGICAL_t receive_callback_on;
+    }
+    PK_ATTDEF_callback_flags_t;
+
+
+
+/* PK_ATTDEF_name_cb_f_t */
+
+typedef const char   *(*PK_ATTDEF_name_cb_f_t)
+(
+/* received */
+const PK_ATTDEF_sf_2_t * /*attdef_sf*/, /* attribute definition standard form */
+PK_POINTER_t             /*context*/    /* context */
+);
+
+
+
+/* PK_ATTDEF_name_cb_t */
+
+typedef PK_ATTDEF_name_cb_f_t PK_ATTDEF_name_cb_t;
+
+
+/* PK_ATTDEF_register_cb_o_t */
+
+struct PK_ATTDEF_register_cb_o_s
+    {
+    int                       o_t_version;
+    PK_ATTDEF_callback_type_t callback_type;    /* normal or read_only */
+    };
+
+typedef struct PK_ATTDEF_register_cb_o_s
+               PK_ATTDEF_register_cb_o_t;
+
+
+
+/* PK_ATTDEF_register_cb_o_m */
+
+#define PK_ATTDEF_register_cb_o_m(options)                   \
+    (                                                        \
+       (options).o_t_version = 1,                            \
+       (options).callback_type = PK_ATTDEF_callback_normal_c \
+    )
+
+
+/* PK_GROUP_find_entities_o_t */
+
+struct PK_GROUP_find_entities_o_s
+    {
+    int          o_t_version;        /* version number */
+    PK_LOGICAL_t want_entities;      /* return entities (PK_LOGICAL_true) */
+    PK_LOGICAL_t have_entity_label;  /* whether entity label provided */
+    int          entity_label;       /* only find entities with this label (0) */
+    };
+typedef struct PK_GROUP_find_entities_o_s PK_GROUP_find_entities_o_t;
+
+
+
+/* PK_GROUP_find_entities_o_m */
+
+#define PK_GROUP_find_entities_o_m(options)             \
+    ((options).o_t_version       = 1,                   \
+     (options).want_entities     = PK_LOGICAL_true,     \
+     (options).have_entity_label = PK_LOGICAL_false,    \
+     (options).entity_label      = 0)
+
+
+/* PK_FACE_grow_cb_f_t */
+
+typedef void     (*PK_FACE_grow_cb_f_t)
+(
+/* received */
+int                 /*n_faces1*/,     /* number of faces1 */
+const PK_FACE_t     /*faces1*/[],     /* first set of clashing faces */
+int                 /*n_faces2*/,     /* number of faces2 */
+const PK_FACE_t     /*faces2*/[],     /* second set of clashing faces */
+int                 /*n_site*/,       /* number of site faces */
+const PK_FACE_t     /*site*/[],       /* faces where the clash occurs */
+PK_POINTER_t        /*context*/,      /* context for callback */
+/* returned */
+PK_FACE_grow_cb_t * /*grow*/            /* grow option */
+);
+
+
+/* PK_FACE_trim_cb_f_t */
+
+typedef void     (*PK_FACE_trim_cb_f_t)
+(
+/* received */
+int                 /*n_faces1*/,     /* number of faces1 */
+const PK_FACE_t     /*faces1*/[],     /* first set of clashing faces */
+int                 /*n_faces2*/,     /* number of faces2 */
+const PK_FACE_t     /*faces2*/[],     /* second set of clashing faces */
+int                 /*n_site*/,       /* number of site faces */
+const PK_FACE_t     /*site*/[],       /* faces where the clash occurs */
+
+PK_POINTER_t        /*context*/,      /* context for callback */
+/* returned */
+PK_FACE_trim_cb_t * /*trim*/          /* trim option */
+);
+
+
+/* PK_BODY_add_to_compound_o_t */
+
+struct PK_BODY_add_to_compound_o_s
+    {
+    int                     o_t_version;   /* version number */
+    PK_compound_geom_attr_t geom_attr;     /* controls behaviour with regard */
+    PK_LOGICAL_t            report_shared_geometry;
+    };
+typedef struct PK_BODY_add_to_compound_o_s PK_BODY_add_to_compound_o_t;
+
+
+
+/* PK_BODY_add_to_compound_o_m */
+
+#define PK_BODY_add_to_compound_o_m(options)                  \
+    (                                                         \
+       (options).o_t_version = 1,                             \
+       (options).geom_attr   = PK_compound_geom_attr_keep_c,  \
+       (options).report_shared_geometry = PK_LOGICAL_false    \
+    )
+
+
+/* PK_BODY_copy_topology_o_t */
+
+struct PK_BODY_copy_topology_o_s
+    {
+    int                    o_t_version;         /* version number */
+    PK_CLASS_array_t       tracked_classes;     /* which topological classes */
+    PK_LOGICAL_t           retain_tolerances;   /* whether to retain tolerances */
+    PK_LOGICAL_t           retain_attributes;   /* whether to retain attributes */
+    PK_LOGICAL_t           retain_groups;       /* whether to retain groups */
+
+    };
+typedef struct PK_BODY_copy_topology_o_s PK_BODY_copy_topology_o_t;
+
+
+
+/* PK_BODY_copy_topology_o_m */
+
+#define PK_BODY_copy_topology_o_m(options)                                \
+    (                                                                     \
+       (options).o_t_version             = 1,                             \
+       (options).tracked_classes.length  = 0,                             \
+       (options).tracked_classes.array   = NULL,                          \
+       (options).retain_tolerances       = PK_LOGICAL_false,              \
+       (options).retain_attributes       = PK_LOGICAL_false,              \
+       (options).retain_groups           = PK_LOGICAL_false               \
+    )
+
+
+/* PK_BODY_repair_shells_o_t */
+
+struct PK_BODY_repair_shells_o_s
+    {
+    int                        o_t_version;  /* version number */
+    PK_BODY_type_t             body_type;    /* preferred body type */
+    PK_SHELL_repair_tracking_t tracking;     /* whether to return tracking */
+    };
+typedef struct PK_BODY_repair_shells_o_s PK_BODY_repair_shells_o_t;
+
+
+
+/* PK_BODY_repair_shells_o_m */
+
+#define PK_BODY_repair_shells_o_m(options)                            \
+    (                                                                 \
+       (options).o_t_version       = 1,                               \
+       (options).body_type         = PK_BODY_type_unspecified_c,      \
+       (options).tracking          = PK_SHELL_repair_tracking_no_c    \
+    )
+
+
+/* PK_BODY_remove_from_parents_o_t */
+
+struct PK_BODY_remove_from_parents_o_s
+    {
+    int                    o_t_version;         /* version number */
+    };
+typedef struct PK_BODY_remove_from_parents_o_s PK_BODY_remove_from_parents_o_t;
+
+
+
+/* PK_BODY_remove_from_parents_o_m */
+
+#define PK_BODY_remove_from_parents_o_m(options)                          \
+    (                                                                     \
+       (options).o_t_version             = 1                              \
+    )
+
+
+/* PK_BODY_make_compound_o_t */
+
+struct PK_BODY_make_compound_o_s
+    {
+    int                     o_t_version;   /* version number */
+    PK_compound_geom_attr_t geom_attr;     /* controls behaviour with regard */
+    PK_LOGICAL_t            report_shared_geometry;
+    };
+typedef struct PK_BODY_make_compound_o_s PK_BODY_make_compound_o_t;
+
+
+
+/* PK_BODY_make_compound_o_m */
+
+#define PK_BODY_make_compound_o_m(options)                    \
+    (                                                         \
+       (options).o_t_version = 3,                             \
+       (options).geom_attr   = PK_compound_geom_attr_keep_c,  \
+       (options).report_shared_geometry = PK_LOGICAL_false    \
+    )
+
+
+/* PK_BODY_ask_parent_o_t */
+
+struct PK_BODY_ask_parent_o_s
+    {
+    int                    o_t_version;         /* version number */
+    };
+typedef struct PK_BODY_ask_parent_o_s PK_BODY_ask_parent_o_t;
+
+
+
+/* PK_BODY_ask_parent_o_m */
+
+#define PK_BODY_ask_parent_o_m(options)                    \
+    (                                                      \
+    (options).o_t_version = 1                              \
+    )
+
+
+/* PK_BODY_ask_children_o_t */
+
+struct PK_BODY_ask_children_o_s
+    {
+    int                    o_t_version;         /* version number */
+    };
+typedef struct PK_BODY_ask_children_o_s PK_BODY_ask_children_o_t;
+
+
+
+/* PK_BODY_ask_children_o_m */
+
+#define PK_BODY_ask_children_o_m(options)                  \
+    (                                                      \
+    (options).o_t_version = 1                              \
+    )
+
+
+/* PK_BODY_fix_blends_o_t */
+
+struct PK_BODY_fix_blends_o_s
+    {
+    int                    o_t_version;     /* version number of option */
+    PK_LOGICAL_t           local_check;     /* whether to perform local */
+    PK_LOGICAL_t           vx_twin;         /* return vertex tag for vertex */
+    PK_blend_local_check_t checks;          /* which local checks to perform */
+    PK_blend_setback_data_t
+                           setback_data;    /* data defining any setbacks */
+    PK_blend_transfer_topol_t
+                           transfer;        /* whether to move topology to */
+    PK_blend_fix_propagate_t
+                           propagate;       /* whether to propagate */
+    PK_blend_vx_blend_data_t
+                           vx_blend_data;   /* data defining any vertex */
+    PK_blend_y_blend_data_t
+                           y_blend_data;    /* data defining any y-shaped */
+    PK_LOGICAL_t           preserve_notch;  /* retain notch shape */
+    PK_blend_edge_update_t update;          /* update flag */
+    double                 tolerance;       /* maximum allowed tolerance for */
+    PK_blend_set_tol_t     set_tol;         /* controls when a tolerance is */
+    PK_blend_repair_su_X_t repair_su_X;     /* whether to attempt to repair */
+    PK_blend_output_sheet_t
+                           output_sheet;    /* whether to create a blend */
+    PK_blend_inside_tight_t
+                           inside_tight;    /* whether to blend on the inside */
+    PK_blend_vx_order_data_t
+                           vx_order_data;   /* order to apply blends at */
+    PK_blend_setback_shape_data_t
+                           setback_shape_data;
+    PK_blend_ov_smooth_t    ov_smooth;      /* allow smooth overlap between */
+    PK_blend_ov_notch_t     ov_notch;       /* allow notch overlap between */
+    PK_blend_order_t        ov_order;       /* order to apply non-adjacent */
+    PK_blend_repair_fa_X_t  repair_fa_X;    /* whether to attempt to repair */
+    int                     n_explicit_cliff_edges;
+    PK_EDGE_t              *explicit_cliff_edges;
+    PK_blend_ov_exp_cliff_t
+                           *explicit_cliff_edges_type;
+    PK_PARTITION_t          partition;      /* a partition */
+    PK_blend_cap_data_t     cap_data;       /* controls how a blend will be */
+    PK_blend_tolerance_t    improve_tolerance;
+    PK_blend_track_type_t   tracking_type;  /* controls the type of tracking */
+    PK_blend_laminar_trim_t laminar_trim;   /* controls how the blend will be */
+    PK_blend_limit_data_t    limit_data;    /* data defining any limits */
+    PK_TOPOL_array_t         limit_topols;  /* limit faces/fins */
+    PK_blend_limit_patch_t  *limit_topols_patch;
+    const PK_TOPOL_array_t  *limit_topols_unders;
+    PK_blend_suggest_limit_t suggest_limit; /* controls whether or not */
+    PK_blend_report_repaired_t
+                             report;        /* whether to report any repaired */
+    PK_extension_shape_t     extension_shape;
+
+    };
+
+typedef struct PK_BODY_fix_blends_o_s PK_BODY_fix_blends_o_t;
+
+
+
+/* PK_BODY_fix_blends_o_m */
+
+#define PK_BODY_fix_blends_o_m(options)                                 \
+    (                                                                   \
+       (options).o_t_version = 30,                                      \
+       (options).local_check = PK_LOGICAL_false,                        \
+       (options).vx_twin     = PK_LOGICAL_false,                        \
+       PK_blend_local_check_m((options).checks),                        \
+       PK_blend_setback_data_m((options).setback_data),                 \
+       (options).transfer    = PK_blend_transfer_topol_no_c,            \
+       PK_blend_fix_propagate_m((options).propagate),                   \
+       PK_blend_vx_blend_data_m((options).vx_blend_data),               \
+       PK_blend_y_blend_data_m((options).y_blend_data),                 \
+       (options).preserve_notch     = PK_LOGICAL_false,                 \
+       (options).update             = PK_blend_edge_update_default_c,   \
+       (options).tolerance          = 1.0e-05,                          \
+       (options).set_tol       = PK_blend_set_tol_yes_c,                \
+       (options).repair_su_X   = PK_blend_repair_su_X_no_c,             \
+       (options).output_sheet  = PK_blend_output_sheet_no_c,            \
+       (options).inside_tight = PK_blend_inside_tight_blends_c,         \
+       PK_blend_vx_order_data_m((options).vx_order_data),               \
+       PK_blend_setback_shape_data_m((options).setback_shape_data),     \
+       (options).ov_smooth   = PK_blend_ov_smooth_no_c,                 \
+       (options).ov_notch    = PK_blend_ov_notch_yes_c,                 \
+       (options).ov_order    = PK_blend_order_convex_concave_c,         \
+       (options).repair_fa_X = PK_blend_repair_fa_X_no_c,               \
+       (options).n_explicit_cliff_edges = 0,                            \
+       (options).explicit_cliff_edges = NULL,                           \
+       (options).explicit_cliff_edges_type = NULL,                      \
+       (options).partition   = PK_PARTITION_null,                       \
+       PK_blend_cap_data_m((options).cap_data),                         \
+       (options).improve_tolerance = PK_blend_tolerance_standard_c,     \
+       (options).tracking_type = PK_blend_track_type_basic_c,           \
+       (options).laminar_trim = PK_blend_laminar_trim_edges_c,          \
+       PK_blend_limit_data_m((options).limit_data),                     \
+       (options).limit_topols.length = 0,                               \
+       (options).limit_topols.array = NULL,                             \
+       (options).limit_topols_patch = NULL,                             \
+       (options).limit_topols_unders = NULL,                            \
+       (options).suggest_limit = PK_blend_suggest_limit_no_c,           \
+       (options).report = PK_blend_report_repaired_no_c,                \
+       (options).extension_shape      = PK_extension_shape_linear_c     \
+    )
+
+
+/* PK_BODY_check_o_t */
+
+struct PK_BODY_check_o_s
+    {
+    int                       o_t_version;  /* version number of option */
+    int                       max_faults;   /* limit on fault numbers (10) */
+    PK_check_geom_t           geom;         /* bad geometry */
+    PK_check_bgeom_t          bgeom;        /* bad B geometry */
+    PK_check_top_geo_t        top_geo;      /* topology/geometry inconsistency */
+    PK_check_size_box_t       size_box;     /* size box violation */
+    PK_check_fa_X_t           fa_X;         /* face self intersection */
+    PK_check_loops_t          loops;        /* loop checks */
+    PK_check_fa_fa_t          fa_fa;        /* face face inconsistency */
+    PK_check_sh_t             sh;           /* negated or inconsistent shells */
+    PK_check_corrupt_t        corrupt;      /* corrupt data or identifiers */
+    PK_check_nmnl_geom_t      nmnl_geom;    /* bad nominal geometry */
+    PK_check_returns_t        returns;      /* return version of fault info */
+    PK_check_extra_faults_t   extra_faults; /* expand PK_BODY_state_corrupt_c */
+    PK_check_attribs_t        attribs;      /* check for validity of system */
+    };
+
+typedef struct PK_BODY_check_o_s PK_BODY_check_o_t;
+
+
+
+/* PK_BODY_check_o_m */
+
+#define PK_BODY_check_o_m(options)                             \
+    (                                                          \
+       (options).o_t_version    = 4,                           \
+       (options).max_faults     = 10,                          \
+       (options).geom           = PK_check_geom_yes_c,         \
+       (options).bgeom          = PK_check_bgeom_yes_c,        \
+       (options).top_geo        = PK_check_top_geo_yes_c,      \
+       (options).size_box       = PK_check_size_box_yes_c,     \
+       (options).fa_X           = PK_check_fa_X_yes_c,         \
+       (options).loops          = PK_check_loops_yes_c,        \
+       (options).fa_fa          = PK_check_fa_fa_yes_c,        \
+       (options).sh             = PK_check_sh_yes_c,           \
+       (options).corrupt        = PK_check_corrupt_yes_c,      \
+       (options).nmnl_geom      = PK_check_nmnl_geom_yes_c,    \
+       (options).returns        = PK_check_returns_0_c,        \
+       (options).extra_faults   = PK_check_extra_faults_0_c,   \
+       (options).attribs        = PK_check_attribs_no_c       \
+    )
+
+
+/* PK_BODY_create_sheet_planar_o_t */
+
+struct PK_BODY_create_sheet_planar_o_s
+    {
+    int                    o_t_version;     /* version number (1) */
+    const int             *loops;           /* loop numbers (NULL) */
+    PK_AXIS1_sf_t          plane;           /* plane (XY plane) */
+    PK_AXIS2_sf_t          basis_set;       /* local coordinate system */
+    };
+typedef struct PK_BODY_create_sheet_planar_o_s PK_BODY_create_sheet_planar_o_t;
+
+
+
+/* PK_BODY_create_sheet_planar_o_m */
+
+#define PK_BODY_create_sheet_planar_o_m(options)          \
+    (                                                     \
+        (options).o_t_version = 1,                        \
+        (options).loops = NULL,                           \
+        (options).plane.location.coord[0] = 0.0,          \
+        (options).plane.location.coord[1] = 0.0,          \
+        (options).plane.location.coord[2] = 0.0,          \
+        (options).plane.axis.coord[0] = 0.0,              \
+        (options).plane.axis.coord[1] = 0.0,              \
+        (options).plane.axis.coord[2] = 1.0,              \
+        (options).basis_set.location.coord[0] = 0.0,      \
+        (options).basis_set.location.coord[1] = 0.0,      \
+        (options).basis_set.location.coord[2] = 0.0,      \
+        (options).basis_set.axis.coord[0] = 0.0,          \
+        (options).basis_set.axis.coord[1] = 0.0,          \
+        (options).basis_set.axis.coord[2] = 1.0,          \
+        (options).basis_set.ref_direction.coord[0] = 1.0, \
+        (options).basis_set.ref_direction.coord[1] = 0.0, \
+        (options).basis_set.ref_direction.coord[2] = 0.0  \
+    )
+
+
+/* PK_emboss_sidewall_data_t */
+
+struct PK_emboss_sidewall_data_s
+    {
+    PK_emboss_sidewall_t        sidewall;    /* how to construct sidewall */
+    PK_taper_method_t           taper_method;
+    PK_VECTOR1_t                draw_direction;
+    double                      taper_angle; /* taper angle of tapered sidewall */
+    double                      offset;      /* value for offset taper */
+    PK_SURF_t                   top_surface; /* top surface for offset taper */
+    PK_BODY_t                   sidewall_body;
+    int                         n_multi_taper_edges;
+    const PK_EDGE_t             *multi_taper_edges;
+    const double                *multi_taper_angles;
+
+    };
+typedef struct PK_emboss_sidewall_data_s PK_emboss_sidewall_data_t;
+
+
+/* PK_emboss_sidewall_data_m */
+
+#define PK_emboss_sidewall_data_m(data)                                     \
+      ((data).sidewall                  = PK_emboss_sidewall_swept_c,       \
+       (data).taper_method              = PK_taper_method_isocline_c,       \
+       (data).draw_direction.coord[0]   = 0.0,                              \
+       (data).draw_direction.coord[1]   = 0.0,                              \
+       (data).draw_direction.coord[2]   = 1.0,                              \
+       (data).taper_angle               = 0.0,                              \
+       (data).offset                    = 0.0,                              \
+       (data).top_surface               = PK_ENTITY_null,                   \
+       (data).sidewall_body             = PK_ENTITY_null,                   \
+       (data).n_multi_taper_edges       = 0,                                \
+       (data).multi_taper_edges         = NULL,                             \
+       (data).multi_taper_angles        = NULL                              \
+      )
+
+
+/* PK_emboss_overflow_data_t */
+
+struct PK_emboss_overflow_data_s
+    {
+    PK_emboss_overflow_t        interior_overflow;
+    PK_emboss_overflow_t        laminar_overflow;
+    PK_VECTOR1_t                sweep_direction;
+    PK_LOGICAL_t                laminar_walled;
+    };
+typedef struct PK_emboss_overflow_data_s PK_emboss_overflow_data_t;
+
+
+/* PK_emboss_overflow_data_m */
+
+#define PK_emboss_overflow_data_m(data)                                     \
+      ((data).interior_overflow         = PK_emboss_overflow_added_c,       \
+       (data).laminar_overflow          = PK_emboss_overflow_swept_c,       \
+       (data).sweep_direction.coord[0]  = 0.0,                              \
+       (data).sweep_direction.coord[1]  = 0.0,                              \
+       (data).sweep_direction.coord[2]  = 1.0,                              \
+       (data).laminar_walled            = PK_LOGICAL_false                  \
+      )
+
+
+/* PK_BODY_emboss_o_t */
+
+struct PK_BODY_emboss_o_s
+    {
+    int                        o_t_version; /* version number of options */
+    double                     tolerance;   /* operation tolerance */
+    PK_emboss_convexity_t      convexity;   /* convexity of emboss to be */
+    PK_emboss_profile_on_t     profile_on;  /* where profile lives */
+    PK_emboss_sidewall_data_t  sidewall_data;
+    PK_emboss_overflow_data_t  overflow_data;
+    PK_emboss_unite_sidewall_t unite;       /* whether to unite sidewall faces */
+    PK_local_ops_update_t      update;      /* update flag */
+    };
+typedef struct PK_BODY_emboss_o_s PK_BODY_emboss_o_t;
+
+
+/* PK_BODY_emboss_o_m */
+
+#define PK_BODY_emboss_o_m(options)                                         \
+       ((options).o_t_version       = 4,                                    \
+        (options).tolerance         = 1.0e-5,                               \
+        (options).convexity         = PK_emboss_convexity_both_c,           \
+        (options).profile_on        = PK_emboss_profile_on_any_c,           \
+        PK_emboss_sidewall_data_m((options).sidewall_data),                 \
+        PK_emboss_overflow_data_m((options).overflow_data),                 \
+        (options).unite             = PK_emboss_unite_sidewall_yes_c,       \
+        (options).update            = PK_local_ops_update_default_c         \
+       )
+
+
+/* PK_extend_side_data_t */
+
+struct PK_extend_side_data_s
+    {
+    int                 n_vertices;    /* number of vertices */
+    const PK_VERTEX_t  *vertices;      /* terminal vertices of the */
+    const PK_extend_side_t
+                       *extend_sides;
+};
+
+typedef struct PK_extend_side_data_s PK_extend_side_data_t;
+
+
+
+/* PK_extend_side_data_m */
+
+#define PK_extend_side_data_m(extend_side_data)                        \
+     (                                                                 \
+       (extend_side_data).n_vertices          = 0,                     \
+       (extend_side_data).vertices            = NULL,                  \
+       (extend_side_data).extend_sides        = NULL                   \
+      )
+
+
+/* PK_BODY_extend_o_t */
+
+struct PK_BODY_extend_o_s
+    {
+    int                  o_t_version;    /* version number */
+    PK_LOGICAL_t         modify;         /* whether to modify the original */
+    PK_extension_shape_t extension_shape;
+    PK_BODY_extension_t  extension_type; /* the type of the extension */
+    double               extension_distance;
+    PK_ENTITY_t          target;         /* target body or surface to define */
+    PK_extension_limit_t target_limit;   /* defines how the target controls */
+    PK_extension_smoothness_t
+                         preserve_internal_smoothness;
+    PK_extend_track_type_t
+                         track_type;     /* how to track new laminar edges */
+    PK_extend_track_internal_t
+                         track_internal; /* whether to track new internal edges */
+    PK_extend_create_t   extend_create;  /* how extension topology is created */
+    PK_extension_boundary_t
+                         extension_boundary;
+    PK_extend_side_data_t
+                         extend_side_data;
+    PK_extend_side_t     extend_side;    /* How to create side edges at any */
+    PK_local_ops_update_t
+                         update;         /* update flag */
+
+    };
+typedef struct PK_BODY_extend_o_s PK_BODY_extend_o_t;
+
+
+
+/* PK_BODY_extend_o_m */
+
+#define PK_BODY_extend_o_m(options)                                           \
+  (                                                                           \
+     (options).o_t_version                  = 9,                              \
+     (options).modify                       = PK_LOGICAL_false,               \
+     (options).extension_shape              = PK_extension_shape_linear_c,    \
+     (options).extension_type               = PK_BODY_extension_distance_c,   \
+     (options).extension_distance           = 0,                              \
+     (options).preserve_internal_smoothness = PK_extension_smoothness_g0_c,   \
+     (options).track_type                   = PK_extend_track_type_basic_c,   \
+     (options).track_internal               = PK_extend_track_internal_no_c,  \
+     (options).target                       = PK_ENTITY_null,                 \
+     (options).target_limit                 = PK_extension_limit_minimal_c,   \
+     (options).extend_create                = PK_extend_create_new_c,         \
+     (options).extension_boundary           = PK_extension_boundary_precise_c,\
+      PK_extend_side_data_m( (options).extend_side_data),                     \
+     (options).extend_side                  = PK_extend_side_default_c,       \
+     (options).update                       = PK_local_ops_update_default_c   \
+  )
+
+
+/* PK_bound_def_t */
+
+struct PK_bound_def_s
+    {
+    PK_bound_t        bound;         /* method of defining bound */
+    PK_LOGICAL_t      forward;       /* whether bound in positive sense of path */
+    double            distance;      /* extrusion distance */
+    PK_ENTITY_t       entity;        /* bounding entity */
+    PK_LOGICAL_t      nearest;       /* whether divisions are numbered from */
+    int               nth_division;  /* select nth division */
+    PK_bound_side_t   side;          /* which side is the first division if */
+    };
+typedef struct PK_bound_def_s PK_bound_def_t;
+
+
+
+/* PK_BODY_extrude_o_t */
+
+struct PK_BODY_extrude_o_s
+    {
+    int            o_t_version;      /* options structure version number */
+    PK_bound_def_t start_bound;      /* starting bound of swept body */
+    PK_bound_def_t end_bound;        /* ending bound of swept body */
+    PK_BODY_t      extruded_body;    /* body to use instead of swept profile */
+    PK_LOGICAL_t   allow_disjoint;   /* swept body can have a disjoint division */
+    };
+typedef struct PK_BODY_extrude_o_s PK_BODY_extrude_o_t;
+
+
+
+/* PK_BODY_extrude_o_m */
+
+#define PK_BODY_extrude_o_m(options)                                          \
+    (                                                                         \
+       (options).o_t_version              = 4,                                \
+       (options).start_bound.bound        = PK_bound_distance_c,              \
+       (options).start_bound.forward      = PK_LOGICAL_true,                  \
+       (options).start_bound.distance     = 0.0,                              \
+       (options).start_bound.entity       = PK_ENTITY_null,                   \
+       (options).start_bound.nearest      = PK_LOGICAL_true,                  \
+       (options).start_bound.nth_division = 1,                                \
+       (options).start_bound.side         = PK_bound_side_both_c,             \
+       (options).end_bound  .bound        = PK_bound_distance_c,              \
+       (options).end_bound  .forward      = PK_LOGICAL_true,                  \
+       (options).end_bound  .distance     = 1.0,                              \
+       (options).end_bound  .entity       = PK_ENTITY_null,                   \
+       (options).end_bound  .nearest      = PK_LOGICAL_true,                  \
+       (options).end_bound  .nth_division = 1,                                \
+       (options).end_bound  .side         = PK_bound_side_both_c,             \
+       (options).extruded_body            = PK_ENTITY_null,                   \
+       (options).allow_disjoint           = PK_LOGICAL_false                  \
+    )
+
+
+/* PK_fill_hole_clamp_planar_t */
+
+struct PK_fill_hole_clamp_planar_s
+    {
+    PK_LOGICAL_t    have_normal;
+    PK_VECTOR1_t    normal;
+    };
+
+typedef struct PK_fill_hole_clamp_planar_s PK_fill_hole_clamp_planar_t;
+
+
+
+/* PK_fill_hole_clamp_planar_m */
+
+#define PK_fill_hole_clamp_planar_m(planar_clamp)           \
+    (                                                       \
+        (planar_clamp).have_normal      = PK_LOGICAL_false, \
+        (planar_clamp).normal.coord[0]  = 0.0,              \
+        (planar_clamp).normal.coord[1]  = 0.0,              \
+        (planar_clamp).normal.coord[2]  = 0.0               \
+    )
+
+
+/* PK_fill_hole_deriv_conds_t */
+
+struct PK_fill_hole_deriv_conds_s
+    {
+    PK_fill_hole_clamp_t        type;
+    PK_fill_hole_clamp_planar_t planar_clamp;
+    };
+
+typedef struct PK_fill_hole_deriv_conds_s PK_fill_hole_deriv_conds_t;
+
+
+
+/* PK_fill_hole_deriv_conds_m */
+
+#define PK_fill_hole_deriv_conds_m(deriv_conds)                     \
+    (                                                               \
+        (deriv_conds).type = PK_fill_hole_clamp_no_c,               \
+        PK_fill_hole_clamp_planar_m( (deriv_conds).planar_clamp )   \
+    )
+
+
+/* PK_fill_hole_point_data_t */
+
+struct PK_fill_hole_point_data_s
+    {
+    int                     n_points;
+    PK_VECTOR_t            *points;
+    PK_VECTOR_t            *normals;
+    double                  points_tolerance;
+    };
+
+typedef struct PK_fill_hole_point_data_s PK_fill_hole_point_data_t;
+
+
+
+/* PK_fill_hole_point_data_m */
+
+#define PK_fill_hole_point_data_m(point_data)                       \
+    (                                                               \
+        (point_data).n_points = 0,                                  \
+        (point_data).points = NULL,                                 \
+        (point_data).normals = NULL,                                \
+        (point_data).points_tolerance = 0.0                         \
+    )
+
+
+/* PK_BODY_fill_hole_o_t */
+
+struct PK_BODY_fill_hole_o_s
+    {
+    int                       o_t_version;
+    PK_fill_hole_method_t     method;     /* method to use to fill hole */
+    PK_BODY_t                 fill_sheet; /* sheet body to patch hole */
+    PK_check_fa_fa_t          check_fa_fa;
+    PK_LOGICAL_t              attach_sheet;
+    PK_fill_hole_preference_t fill_preference;
+    PK_continuity_t           smoothness; /* allows control over the level of */
+    PK_EDGE_array_t           non_smooth_edges;
+    PK_EDGE_array_t           non_g2_smooth_edges;
+    PK_fill_hole_non_smooth_t non_g2_behaviour;
+    PK_fill_hole_update_t     update;     /* update version */
+    PK_fill_hole_topol_t      patch_topology;
+    PK_fill_hole_body_type_t  body_type;  /* preferred type of resulting body */
+    PK_BODY_array_t           supporting_bodies;
+    PK_fill_hole_imprint_t    imprint_supporting_bodies;
+    int                       n_clamps;   /* number of clamps to be applied to */
+    const PK_fill_hole_deriv_conds_t
+                             *clamps;     /* array of clamps to be applied to */
+    const int                *clamp_indices;
+    PK_fill_hole_patch_eds_t  internal_smoothness;
+    PK_fill_hole_opt_t        optimise;   /* how to optimise the algorithm */
+    int                       n_supporting_point_sets;
+    PK_fill_hole_point_data_t
+                             *supporting_point_sets;
+    };
+typedef struct PK_BODY_fill_hole_o_s PK_BODY_fill_hole_o_t;
+
+
+
+/* PK_BODY_fill_hole_o_m */
+
+#define PK_BODY_fill_hole_o_m(options)                                      \
+    (                                                                       \
+       (options).o_t_version               = 12,                            \
+       (options).method                    = PK_fill_hole_trim_to_hole_c,   \
+       (options).fill_sheet                = PK_ENTITY_null,                \
+       (options).check_fa_fa               = PK_check_fa_fa_yes_c,          \
+       (options).attach_sheet              = PK_LOGICAL_true,               \
+       (options).fill_preference           = PK_fill_hole_smooth_c,         \
+       (options).smoothness                = PK_continuity_g1_c,            \
+       (options).non_smooth_edges.length   = 0,                             \
+       (options).non_smooth_edges.array    = NULL,                          \
+       (options).non_g2_smooth_edges.length= 0,                             \
+       (options).non_g2_smooth_edges.array = NULL,                          \
+       (options).non_g2_behaviour          = PK_fill_hole_non_smooth_fail_c,\
+       (options).update                    = PK_fill_hole_update_default_c, \
+       (options).patch_topology            = PK_fill_hole_topol_multiple_c, \
+       (options).body_type                 = PK_fill_hole_body_type_orig_c, \
+       (options).supporting_bodies.length  = 0,                             \
+       (options).supporting_bodies.array   = NULL,                          \
+       (options).imprint_supporting_bodies = PK_fill_hole_imprint_sharp_c,  \
+       (options).n_clamps                  = 0,                             \
+       (options).clamps                    = NULL,                          \
+       (options).clamp_indices             = NULL,                          \
+       (options).internal_smoothness       = PK_fill_hole_patch_eds_sharp_c,\
+       (options).optimise                  = PK_fill_hole_opt_quality_c,    \
+       (options).n_supporting_point_sets   = 0,                             \
+       (options).supporting_point_sets     = NULL                           \
+    )
+
+
+/* PK_BODY_hollow_o_t */
+
+struct PK_BODY_hollow_o_s
+    {
+    int                o_t_version;     /* version number of option structure */
+    int                n_pierce_faces;  /* number of faces in `pierce_faces' */
+    const PK_FACE_t   *pierce_faces;    /* faces to be pierced (not offset) */
+    PK_check_fa_fa_t   check_fa_fa;     /* check for face-face inconsistencies */
+    int                n_offset_faces;  /* number of elements in `offset_faces' */
+    const PK_FACE_t   *offset_faces;    /* faces to be offset by a different */
+    const double      *offset_values;   /* offset values for corresponding */
+    PK_LOGICAL_t       pierce_tangent;  /* DEPRECATED (PK_LOGICAL_false) */
+    PK_offset_method_t offset_method;   /* offset method */
+    PK_LOGICAL_t       report_sx;       /* whether to report faces that have */
+    PK_fix_degens_t    fix_degens;      /* control on repairing surface */
+    PK_LOGICAL_t       report_fix_degens;
+    PK_offset_step_t   offset_step;     /* whether to create a step offset */
+    PK_hollow_local_t  hollow_local;    /* method of local hollowing */
+    int                n_local_faces;   /* number of faces for local hollowing */
+    const PK_FACE_t   *local_faces;     /* faces for local hollowing */
+    PK_EDGE_offset_blend_t
+                       blend_edges;     /* Offset edges as blend faces */
+    double             blend_radius;    /* Radius of blend faces created if */
+    PK_FACE_grow_t     grow;            /* controls which faces to grow */
+    PK_FACE_grow_cb_f_t
+                       grow_cb;         /* user callback function for */
+    PK_POINTER_t       grow_data;       /* user data for callback function */
+    PK_local_ops_update_t
+                       update;          /* update flag */
+    };
+typedef struct PK_BODY_hollow_o_s PK_BODY_hollow_o_t;
+
+
+/* PK_BODY_hollow_o_m */
+
+#define PK_BODY_hollow_o_m(options)                                   \
+       ((options).o_t_version       = 11,                             \
+        (options).n_pierce_faces    = 0,                              \
+        (options).pierce_faces      = NULL,                           \
+        (options).check_fa_fa       = PK_check_fa_fa_yes_c,           \
+        (options).n_offset_faces    = 0,                              \
+        (options).offset_faces      = NULL,                           \
+        (options).offset_values     = NULL,                           \
+        (options).pierce_tangent    = PK_LOGICAL_false,               \
+        (options).offset_method     = PK_offset_method_sx_trim_c,     \
+        (options).fix_degens        = PK_fix_degens_no_c,             \
+        (options).report_sx         = PK_LOGICAL_false,               \
+        (options).report_fix_degens = PK_LOGICAL_false,               \
+        (options).offset_step       = PK_offset_step_no_c,            \
+        (options).n_local_faces     = 0,                              \
+        (options).local_faces       = NULL,                           \
+        (options).hollow_local      = PK_hollow_local_none_c,         \
+        (options).blend_edges       = PK_EDGE_offset_blend_no_c,      \
+        (options).blend_radius      = 0.0,                            \
+        (options).grow              = PK_FACE_grow_update_c,          \
+        (options).grow_cb           = NULL,                           \
+        (options).grow_data         = NULL,                           \
+        (options).update            = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_BODY_identify_facesets_o_t */
+
+struct PK_BODY_identify_facesets_o_s
+    {
+    int                     o_t_version;     /* version number of option struct */
+    PK_boolean_function_t   function;        /* (PK_boolean_unite_c) */
+    PK_boolean_fence_t      fence;           /* (PK_boolean_fence_none_c) */
+    PK_LOGICAL_t            check_manifold;  /* (PK_LOGICAL_true) */
+    };
+
+typedef struct PK_BODY_identify_facesets_o_s PK_BODY_identify_facesets_o_t;
+
+
+
+/* PK_BODY_identify_facesets_o_m */
+
+#define PK_BODY_identify_facesets_o_m(options)            \
+    (                                                     \
+       (options).o_t_version    = 2,                      \
+       (options).function       = PK_boolean_unite_c,     \
+       (options).fence          = PK_boolean_fence_none_c,\
+       (options).check_manifold = PK_LOGICAL_true         \
+    )
+
+
+/* PK_identify_facesets_r_t */
+
+struct PK_identify_facesets_r_s
+    {
+    int                n_survive_target_faces;  /* number of surviving */
+    PK_FACE_array_t   *survive_target_faces;    /* surviving facesets */
+    int                n_survive_tool_faces;    /* number of surviving */
+    PK_FACE_array_t   *survive_tool_faces;      /* surviving facesets */
+    int                n_reject_target_faces;   /* number of rejected */
+    PK_FACE_array_t   *reject_target_faces;     /* rejected facesets */
+    int                n_reject_tool_faces;     /* number of rejected */
+    PK_FACE_array_t   *reject_tool_faces;       /* rejected facesets */
+    PK_EDGE_array_t    bound_target_edges;      /* bounds of facesets */
+    PK_EDGE_array_t    bound_tool_edges;        /* bounds of facesets */
+    };
+typedef struct PK_identify_facesets_r_s PK_identify_facesets_r_t;
+
+
+
+
+/* PK_BODY_identify_details_o_t */
+
+struct PK_BODY_identify_details_o_s
+    {
+    int                    o_t_version;        /* version number of opt struct */
+    PK_double_constraint_t hole_cyl_radius;    /* radius constraint for */
+    PK_hole_blended_t      hole_blended;       /* whether to include blend */
+    PK_double_constraint_t hole_blend_radius;  /* radius constraint for blends */
+    PK_hole_update_t       hole_update;        /* update version */
+    PK_hole_const_rad_t    hole_const_rad;     /* whether holes must have a */
+    PK_hole_ortho_t        hole_ortho;         /* whether hole components must */
+    PK_detail_perforated_t hole_perforated;    /* whether holes can be */
+    PK_detail_open_t       hole_open;          /* whether holes can be open */
+    double                 tolerance;          /* distance tolerance */
+    double                 angle_tolerance;    /* angle tolerance ( radians ) */
+    };
+
+typedef struct PK_BODY_identify_details_o_s PK_BODY_identify_details_o_t;
+
+
+
+/* PK_BODY_identify_details_o_m */
+
+#define PK_BODY_identify_details_o_m(options)                     \
+    (                                                             \
+       (options).o_t_version      = 5,                            \
+        PK_double_constraint_m( (options).hole_cyl_radius ),      \
+       (options).hole_blended     = PK_hole_blended_no_c,         \
+        PK_double_constraint_m( (options).hole_blend_radius ),    \
+       (options).hole_update      = PK_hole_update_default_c,     \
+       (options).hole_const_rad   = PK_hole_const_rad_no_c,       \
+       (options).hole_ortho       = PK_hole_ortho_no_c,           \
+       (options).hole_perforated  = PK_detail_perforated_no_c,    \
+       (options).hole_open        = PK_detail_open_no_c,          \
+       (options).tolerance        = 0.00000001,                   \
+       (options).angle_tolerance  = 0.00000000001                 \
+    )
+
+
+/* PK_identify_details_r_t */
+
+struct PK_identify_details_r_s
+    {
+    int                n_facesets;  /* number of facesets */
+    PK_FACE_array_t   *facesets;    /* facesets */
+    PK_detail_t       *details;     /* detail type of each faceset */
+    };
+typedef struct PK_identify_details_r_s PK_identify_details_r_t;
+
+
+
+/* PK_BODY_identify_general_o_t */
+
+struct PK_BODY_identify_general_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BODY_identify_general_o_s PK_BODY_identify_general_o_t;
+
+
+
+/* PK_BODY_identify_general_o_m */
+
+#define PK_BODY_identify_general_o_m(options)                              \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_identify_general_r_t */
+
+struct PK_identify_general_r_s
+    {
+    int                n_general;   /* number of general characteristics */
+    PK_general_t      *type;        /* type of each general characteristic */
+    PK_TOPOL_t        *topol;       /* associated topology */
+    };
+typedef struct PK_identify_general_r_s PK_identify_general_r_t;
+
+
+
+/* PK_BODY_find_facesets_o_t */
+
+struct PK_BODY_find_facesets_o_s
+    {
+    int                  o_t_version;        /* version number of option struct */
+    PK_boolean_region_t  selector;           /* faceset selector */
+    PK_LOGICAL_t         alternate;          /* whether to return alternating */
+    int                  n_selecting_topol;  /* no of selecting topologies (0) */
+    PK_TOPOL_t          *selecting_topol;    /* selecting topologies (NULL) */
+    PK_LOGICAL_t         want_bounds;        /* whether to return bounding */
+    };
+
+typedef struct PK_BODY_find_facesets_o_s PK_BODY_find_facesets_o_t;
+
+
+
+/* PK_BODY_find_facesets_o_m */
+
+#define PK_BODY_find_facesets_o_m(options)                        \
+    (                                                             \
+       (options).o_t_version       = 1,                           \
+       (options).selector          = PK_boolean_off_c,            \
+       (options).alternate         = PK_LOGICAL_false,            \
+       (options).n_selecting_topol = 0,                           \
+       (options).selecting_topol   = NULL,                        \
+       (options).want_bounds       = PK_LOGICAL_false             \
+    )
+
+
+/* PK_BODY_find_facesets_r_t */
+
+struct PK_BODY_find_facesets_r_s
+    {
+    int               n_selected_facesets;       /* number of returned facesets */
+    PK_FACE_array_t  *selected_facesets;         /* returned facesets */
+    PK_EDGE_array_t  *bound_edgesets;            /* edgesets bounding every */
+    };
+typedef struct PK_BODY_find_facesets_r_s PK_BODY_find_facesets_r_t;
+
+
+
+/* PK_BODY_find_extreme_o_t */
+
+struct PK_BODY_find_extreme_o_s
+    {
+    int                  o_t_version;        /* version number of option struct */
+    };
+
+typedef struct PK_BODY_find_extreme_o_s PK_BODY_find_extreme_o_t;
+
+
+
+/* PK_BODY_find_extreme_o_m */
+
+#define PK_BODY_find_extreme_o_m(options)                         \
+    (                                                             \
+       (options).o_t_version       = 1                            \
+    )
+
+
+/* PK_BODY_imprint_cus_normal_o_t */
+
+struct PK_BODY_imprint_cus_normal_o_s
+    {
+    int           o_t_version;              /* version number */
+    PK_imprint_complete_t
+                  imprint_complete;         /* whether to complete imprint on */
+    PK_imprint_tracking_t
+                  tracking_type;            /* format of returned tracking */
+    PK_imprint_proj_dist_t
+                  use_max_projection_dist;  /* whether and how to limit */
+    double        max_projection_dist;      /* ( 0.0 ) */
+    PK_LOGICAL_t  imprint_coi_exactly;      /* whether to imprint curves */
+    PK_continuity_t
+                  preferred_continuity;     /* level of continuity to impose */
+
+
+    };
+typedef struct PK_BODY_imprint_cus_normal_o_s
+               PK_BODY_imprint_cus_normal_o_t;
+
+
+
+/* PK_BODY_imprint_cus_normal_o_m */
+
+#define PK_BODY_imprint_cus_normal_o_m(options)                        \
+    (                                                                  \
+       (options).o_t_version             = 6,                          \
+       (options).imprint_complete        = PK_imprint_complete_no_c,   \
+       (options).tracking_type           = PK_imprint_tracking_basic_c,\
+       (options).use_max_projection_dist = PK_imprint_proj_dist_no_c,  \
+       (options).max_projection_dist     = 0.0,                        \
+       (options).imprint_coi_exactly     = PK_LOGICAL_false,           \
+       (options).preferred_continuity    = PK_continuity_g1_c          \
+    )
+
+
+/* PK_BODY_imprint_cus_vector_o_t */
+
+struct PK_BODY_imprint_cus_vector_o_s
+    {
+    int                 o_t_version;   /* version number of option structure */
+    };
+typedef struct PK_BODY_imprint_cus_vector_o_s
+               PK_BODY_imprint_cus_vector_o_t;
+
+
+
+/* PK_BODY_imprint_cus_vector_o_m */
+
+#define PK_BODY_imprint_cus_vector_o_m(options)                      \
+    (                                                                \
+       (options).o_t_version           = 1                           \
+    )
+
+
+/* PK_BODY_imprint_cus_vec_o_t */
+
+struct PK_BODY_imprint_cus_vec_o_s
+    {
+    int                    o_t_version;      /* version number */
+    PK_imprint_connect_t   connect;          /* How to connect disjoint */
+    PK_imprint_complete_t  imprint_complete; /* whether to complete imprint */
+    PK_LOGICAL_t           imprint_coi_exactly;
+    PK_LOGICAL_t           imprint_exactly;  /* whether to imprint curves */
+    PK_LOGICAL_t           bidirectional;    /* whether to imprint curves */
+    PK_imprint_intersect_t process_intersections;
+    };
+typedef struct PK_BODY_imprint_cus_vec_o_s
+               PK_BODY_imprint_cus_vec_o_t;
+
+
+
+/* PK_BODY_imprint_cus_vec_o_m */
+
+#define PK_BODY_imprint_cus_vec_o_m(options)                            \
+    (                                                                   \
+       (options).o_t_version            = 6,                            \
+       (options).connect                = PK_imprint_connect_none_c,    \
+       (options).imprint_complete       = PK_imprint_complete_no_c,     \
+       (options).imprint_coi_exactly    = PK_LOGICAL_false,             \
+       (options).imprint_exactly        = PK_LOGICAL_false,             \
+       (options).bidirectional          = PK_LOGICAL_false,             \
+       (options).process_intersections  = PK_imprint_intersect_update_c \
+    )
+
+
+/* PK_BODY_imprint_cus_shadow_o_t */
+
+struct PK_BODY_imprint_cus_shadow_o_s
+    {
+    int                   o_t_version;         /* version number */
+    double                tolerance;           /* curve tolerance (1.0e-5) */
+    PK_LOGICAL_t          want_edges;          /* whether to return new edges */
+    PK_LOGICAL_t          want_visible_faces;  /* whether to return visible */
+    PK_shadow_check_fa_t  check_faces;         /* check modified faces for */
+    };
+typedef struct PK_BODY_imprint_cus_shadow_o_s
+               PK_BODY_imprint_cus_shadow_o_t;
+
+
+
+/* PK_BODY_imprint_cus_shadow_o_m */
+
+#define PK_BODY_imprint_cus_shadow_o_m( opt )                           \
+    (   (opt).o_t_version               = 2,                            \
+        (opt).want_edges                = PK_LOGICAL_false,             \
+        (opt).want_visible_faces        = PK_LOGICAL_false,             \
+        (opt).tolerance                 = 0.00001,                      \
+        (opt).check_faces               = PK_shadow_check_fa_no_c)
+
+
+/* PK_BODY_loft_one_match_t */
+
+#define PK_BODY_loft_one_match_t PK_BODY_one_vertex_match_t
+
+
+
+/* PK_BODY_loft_one_match_m */
+
+#define PK_BODY_loft_one_match_m PK_BODY_one_vertex_match_m
+
+
+
+/* PK_BODY_profile_match_t */
+
+#define PK_BODY_profile_match_t PK_BODY_vertex_match_t
+
+
+
+/* PK_BODY_profile_match_m */
+
+#define PK_BODY_profile_match_m PK_BODY_vertex_match_m
+
+
+
+/* PK_BODY_loft_matches_t */
+
+#define PK_BODY_loft_matches_t PK_BODY_vertex_matches_t
+
+
+
+/* PK_BODY_loft_matches_m */
+
+#define PK_BODY_loft_matches_m PK_BODY_vertex_matches_m
+
+
+
+/* PK_BODY_loft_vector_clamp_t */
+
+struct PK_BODY_loft_vector_clamp_s
+    {
+    int                n_tangents;    /* number of derivative vectors (0) */
+    const PK_VECTOR_t *tangents;      /* array of derivative vectors (NULL) */
+    int                n_vertices;    /* number of vertices to be clamped (0) */
+    const PK_VERTEX_t *vertices;      /* array of vertices to be clamped (NULL) */
+    int                n_magnitudes;  /* number of vector magnitudes (0) */
+    const double      *magnitudes;    /* array of vector magnitudes (NULL) */
+    };
+
+typedef struct PK_BODY_loft_vector_clamp_s PK_BODY_loft_vector_clamp_t;
+
+
+
+/* PK_BODY_loft_vector_clamp_m */
+
+#define PK_BODY_loft_vector_clamp_m(vector_clamp)                        \
+    (                                                                    \
+       (vector_clamp).n_tangents   = 0,                                  \
+       (vector_clamp).tangents     = NULL,                               \
+       (vector_clamp).n_vertices   = 0,                                  \
+       (vector_clamp).vertices     = NULL,                               \
+       (vector_clamp).n_magnitudes = 0,                                  \
+       (vector_clamp).magnitudes   = NULL                                \
+    )
+
+
+/* PK_BODY_loft_face_clamp_t */
+
+struct PK_BODY_loft_face_clamp_s
+    {
+    int                n_faces;      /* number of clamping faces and clamped */
+    const PK_FACE_t   *faces;        /* array of clamping faces (NULL) */
+    const PK_EDGE_t   *edges;        /* array of clamped edges (NULL) */
+    int                n_magnitudes; /* number of magnitudes for scaling loft */
+    const double      *magnitudes;   /* array of magnitudes for scaling loft */
+    int                n_vertices;   /* number of vertices with scaling (0) */
+    const PK_VERTEX_t *vertices;     /* array of vertices with scaling (NULL) */
+    };
+
+typedef struct PK_BODY_loft_face_clamp_s PK_BODY_loft_face_clamp_t;
+
+
+
+/* PK_BODY_loft_face_clamp_m */
+
+#define PK_BODY_loft_face_clamp_m(face_clamp)                       \
+    (                                                               \
+       (face_clamp).n_faces         = 0,                            \
+       (face_clamp).faces           = NULL,                         \
+       (face_clamp).edges           = NULL,                         \
+       (face_clamp).n_magnitudes    = 0,                            \
+       (face_clamp).magnitudes      = NULL,                         \
+       (face_clamp).n_vertices      = 0,                            \
+       (face_clamp).vertices        = NULL                          \
+    )
+
+
+/* PK_BODY_loft_planar_clamp_t */
+
+struct PK_BODY_loft_planar_clamp_s
+    {
+    PK_VECTOR1_t    normal;
+    double          magnitude;
+    };
+
+typedef struct PK_BODY_loft_planar_clamp_s PK_BODY_loft_planar_clamp_t;
+
+
+
+/* PK_BODY_loft_planar_clamp_m */
+
+#define PK_BODY_loft_planar_clamp_m(planar_clamp)                   \
+    (                                                               \
+       (planar_clamp).normal.coord[0] = 0.0,                        \
+       (planar_clamp).normal.coord[1] = 0.0,                        \
+       (planar_clamp).normal.coord[2] = 0.0,                        \
+       (planar_clamp).magnitude       = 0.0                         \
+    )
+
+
+/* PK_BODY_loft_deriv_conds_t */
+
+struct PK_BODY_loft_deriv_conds_s
+    {
+    PK_BODY_loft_curvature_t          curvature_condition;
+    PK_BODY_loft_clamp_type_t         type;
+    PK_BODY_loft_vector_clamp_t       vector_clamp;
+    PK_BODY_loft_face_clamp_t         face_clamp;
+    PK_BODY_loft_planar_clamp_t       planar_clamp;
+    };
+
+typedef struct PK_BODY_loft_deriv_conds_s PK_BODY_loft_deriv_conds_t;
+
+
+
+/* PK_BODY_loft_deriv_conds_m */
+
+#define PK_BODY_loft_deriv_conds_m(deriv_conds)                          \
+    (                                                                    \
+       (deriv_conds).curvature_condition = PK_BODY_loft_unconstrained_c, \
+       (deriv_conds).type                = PK_BODY_loft_clamp_no_c,      \
+       PK_BODY_loft_vector_clamp_m( (deriv_conds).vector_clamp ),        \
+       PK_BODY_loft_face_clamp_m( (deriv_conds).face_clamp ),            \
+       PK_BODY_loft_planar_clamp_m( (deriv_conds).planar_clamp )         \
+    )
+
+
+/* PK_BODY_loft_end_conds_t */
+
+struct PK_BODY_loft_end_conds_s
+    {
+    PK_PARAM_periodic_t         periodic;
+    PK_BODY_loft_deriv_conds_t  start,
+                                end;
+    };
+
+typedef struct PK_BODY_loft_end_conds_s PK_BODY_loft_end_conds_t;
+
+
+
+/* PK_BODY_loft_end_conds_m */
+
+#define PK_BODY_loft_end_conds_m(end_conds)                          \
+    (                                                                \
+       (end_conds).periodic = PK_PARAM_periodic_no_c,                \
+       PK_BODY_loft_deriv_conds_m( (end_conds).start ),              \
+       PK_BODY_loft_deriv_conds_m( (end_conds).end )                 \
+    )
+
+
+/* PK_BODY_make_lofted_body_o_t */
+
+struct PK_BODY_make_lofted_body_o_s
+    {
+    int                               o_t_version;
+    PK_BODY_loft_end_conds_t          end_conditions;
+
+    int                               n_guide_wires;
+
+    const PK_BODY_t                  *guide_wires;
+
+    PK_BODY_simplify_t                simplify;
+    PK_BODY_topology_t                topology_form;
+    PK_BODY_vertex_matches_t          matches;
+
+    int                               n_intermediate_derivs;
+    const PK_BODY_loft_deriv_conds_t *intermediate_derivs;
+    const int                        *intermediate_profiles;
+
+    int                               n_guide_derivs;
+    const PK_BODY_loft_deriv_conds_t *guide_derivs;
+    const int                        *guide_indices;
+    double                            tolerance;
+    PK_LOGICAL_t                      minimise_tolerance;
+    PK_BODY_loft_update_t             update;
+    PK_BODY_loft_deriv_mag_t          deriv_mag;
+    PK_LOGICAL_t                      want_edge_tracking;
+    PK_BODY_smoothness_t              profile_smoothness;
+    PK_LOGICAL_t                      create_construction_topol;
+    PK_LOGICAL_t                      label_profiles;
+    };
+
+typedef struct PK_BODY_make_lofted_body_o_s PK_BODY_make_lofted_body_o_t;
+
+
+
+/* PK_BODY_make_lofted_body_o_m */
+
+#define PK_BODY_make_lofted_body_o_m(options)                                 \
+    (                                                                         \
+       (options).o_t_version               = 15,                              \
+       PK_BODY_loft_end_conds_m( (options).end_conditions ),                  \
+       (options).n_guide_wires             = 0,                               \
+       (options).guide_wires               = NULL,                            \
+       (options).simplify                  = PK_BODY_simplify_analytic_c,     \
+       (options).topology_form             = PK_BODY_topology_minimal_c,      \
+       PK_BODY_vertex_matches_m( (options).matches ),                         \
+       (options).n_intermediate_derivs     = 0,                               \
+       (options).intermediate_derivs       = NULL,                            \
+       (options).intermediate_profiles     = NULL,                            \
+       (options).n_guide_derivs            = 0,                               \
+       (options).guide_derivs              = NULL,                            \
+       (options).guide_indices             = NULL,                            \
+       (options).tolerance                 = 1.0e-5,                          \
+       (options).minimise_tolerance        = PK_LOGICAL_false,                \
+       (options).update                    = PK_BODY_loft_update_default_c,   \
+       (options).deriv_mag                 = PK_BODY_loft_deriv_mag_single_c, \
+       (options).want_edge_tracking        = PK_LOGICAL_false,                \
+       (options).profile_smoothness        = PK_BODY_smoothness_exact_c,      \
+       (options).create_construction_topol = PK_LOGICAL_false,                \
+       (options).label_profiles            = PK_LOGICAL_false                 \
+    )
+
+
+/* PK_BODY_loft_status_r_t */
+
+struct PK_BODY_loft_status_r_s
+    {
+    PK_BODY_loft_fault_t         fault;
+    PK_VECTOR_t                  fault_location;
+    PK_TOPOL_t                   fault_topol;
+    };
+
+typedef struct PK_BODY_loft_status_r_s PK_BODY_loft_status_r_t;
+
+
+
+/* PK_BODY_tracked_loft_r_t */
+
+struct PK_BODY_tracked_loft_s
+    {
+    PK_BODY_loft_status_r_t      status;
+    PK_BODY_t                    body;
+    PK_TOPOL_track_r_t           tracking_info;
+    };
+
+typedef struct PK_BODY_tracked_loft_s PK_BODY_tracked_loft_r_t;
+
+
+
+/* PK_BODY_make_curves_outline_o_t */
+
+struct PK_BODY_make_curves_outline_o_s
+    {
+    int                   o_t_version;      /* version number */
+    PK_outline_project_t  project;          /* whether to project the curves */
+    PK_VECTOR_t           project_position; /* position of plane if projecting */
+    double                tolerance;        /* curve tolerance (1.0e-6) */
+    PK_LOGICAL_t          want_topols;      /* whether to return edges or faces */
+    PK_outline_update_t   update;           /* update flag */
+    PK_LOGICAL_t          want_body;        /* whether to create a body from */
+    PK_TOPOL_dimension_t  body_dimension;   /* whether to request a body of */
+    PK_outline_edge_on_t  edge_on;          /* whether an outline is created */
+    };
+typedef struct PK_BODY_make_curves_outline_o_s PK_BODY_make_curves_outline_o_t;
+
+
+
+/* PK_BODY_make_curves_outline_o_m */
+
+
+
+#define PK_BODY_make_curves_outline_o_m( opt)                          \
+    (   (opt).o_t_version               = 4,                           \
+        (opt).project                   = PK_outline_project_no_c,     \
+        (opt).project_position.coord[0] = 0.0,                         \
+        (opt).project_position.coord[1] = 0.0,                         \
+        (opt).project_position.coord[2] = 0.0,                         \
+        (opt).tolerance                 = 1.0e-6,                      \
+        (opt).want_topols               = PK_LOGICAL_false,            \
+        (opt).update                    = PK_outline_update_default_c, \
+        (opt).want_body                 = PK_LOGICAL_false,            \
+        (opt).body_dimension            = PK_TOPOL_dimension_1_c,      \
+        (opt).edge_on                   = PK_outline_edge_on_none_c )
+
+
+/* PK_BODY_make_spun_outline_o_t */
+
+struct PK_BODY_make_spun_outline_o_s
+    {
+    int                   o_t_version;      /* version number */
+    PK_outline_project_t  project;           /* whether to project the curves */
+    PK_VECTOR_t           project_position;  /* position of plane if projecting */
+    double                tolerance;         /* curve tolerance (1.0e-6) */
+    PK_LOGICAL_t          want_topols;       /* (PK_LOGICAL_t) */
+    PK_outline_update_t   update;            /* update flag */
+    PK_LOGICAL_t          want_body;         /* whether to create a body from */
+    PK_TOPOL_dimension_t  body_dimension;    /* whether to request a body of */
+    };
+typedef struct PK_BODY_make_spun_outline_o_s PK_BODY_make_spun_outline_o_t;
+
+
+
+/* PK_BODY_make_spun_outline_o_m */
+
+
+#define PK_BODY_make_spun_outline_o_m( opt)                            \
+    (   (opt).o_t_version               = 3,                           \
+        (opt).project                   = PK_outline_project_no_c,     \
+        (opt).project_position.coord[0] = 0.0,                         \
+        (opt).project_position.coord[1] = 0.0,                         \
+        (opt).project_position.coord[2] = 0.0,                         \
+        (opt).tolerance                 = 1.0e-6,                      \
+        (opt).want_topols               = PK_LOGICAL_false,            \
+        (opt).update                    = PK_outline_update_default_c, \
+        (opt).want_body                 = PK_LOGICAL_false,            \
+        (opt).body_dimension            = PK_TOPOL_dimension_1_c )
+
+
+/* PK_BODY_taper_o_t */
+
+struct PK_BODY_taper_o_s
+    {
+    int                      o_t_version;    /* version number of option */
+    double                   tolerance;      /* max. tol. for applying */
+    PK_LOGICAL_t             miter_at_parting;
+    PK_LOGICAL_t             merge_face;     /* whether tapered faces */
+    PK_check_fa_fa_t         check_fa_fa;    /* check for face-face */
+    PK_taper_method_t        default_method; /* default tapering method */
+    int                      n_methods;      /* number of non-default */
+    const PK_taper_method_t *methods;        /* non-default tapering */
+    const PK_ENTITY_t       *method_refs;    /* reference entities to use */
+    PK_taper_corner_type_t   corner_type;    /* how to fill the gap at the */
+    int                      n_parting_edges;
+    const PK_ENTITY_t       *parting_edges;  /* all the edges lying on the */
+    PK_taper_miter_type_t    miter_type;     /* how to miter the halves */
+    int                      n_non_miter_edges;
+    const PK_EDGE_t         *non_miter_edges;
+    int                      n_replace_edges;
+    const PK_EDGE_t         *replace_edges;  /* edges to be removed to allow */
+    PK_taper_undercut_t      undercut;       /* how to cope with undercut */
+    int                      n_upper_faces;  /* number of upper faces (0) */
+    const PK_FACE_t         *upper_faces;    /* faces to be tapered from */
+    int                      n_lower_faces;  /* number of lower faces (0) */
+    const PK_FACE_t         *lower_faces;    /* faces to be tapered from */
+    PK_taper_concave_type_t  concave_type;   /* how to replace the concave */
+    double                   concave_radius; /* radius of the cylinder for */
+    PK_taper_keep_material_t keep_material;  /* how to process regions */
+    PK_local_ops_update_t    update;         /* update flag */
+    };
+typedef struct PK_BODY_taper_o_s PK_BODY_taper_o_t;
+
+
+/* PK_BODY_taper_o_m */
+
+#define PK_BODY_taper_o_m(options)                                      \
+       ((options).o_t_version          = 11,                            \
+        (options).tolerance            = 1.0e-5,                        \
+        (options).miter_at_parting     = PK_LOGICAL_true,               \
+        (options).merge_face           = PK_LOGICAL_true,               \
+        (options).check_fa_fa          = PK_check_fa_fa_yes_c,          \
+        (options).default_method       = PK_taper_method_isocline_c,    \
+        (options).n_methods            = 0,                             \
+        (options).methods              = NULL,                          \
+        (options).method_refs          = NULL,                          \
+        (options).corner_type          = PK_taper_corner_extend_c,      \
+        (options).n_parting_edges      = 0,                             \
+        (options).parting_edges        = NULL,                          \
+        (options).miter_type           = PK_taper_miter_on_ref_c,       \
+        (options).n_non_miter_edges    = 0,                             \
+        (options).non_miter_edges      = NULL,                          \
+        (options).n_replace_edges      = 0,                             \
+        (options).replace_edges        = NULL,                          \
+        (options).undercut             = PK_taper_undercut_ref_no_c,    \
+        (options).n_upper_faces        = 0,                             \
+        (options).upper_faces          = NULL,                          \
+        (options).n_lower_faces        = 0,                             \
+        (options).lower_faces          = NULL,                          \
+        (options).concave_type         = PK_taper_concave_none_c,       \
+        (options).concave_radius       = 0.0,                           \
+        (options).keep_material        = PK_taper_keep_material_no_c,   \
+        (options).update               = PK_local_ops_update_default_c  \
+       )
+
+
+/* PK_BODY_trim_neutral_sheets_o_t */
+
+struct PK_BODY_trim_neutral_sheets_o_s
+    {
+    int                      o_t_version;
+    PK_neutral_ignore_fa_t   ignore;       /* whether to ignore faces in */
+    PK_neutral_trim_method_t trim_method;  /* method of trimming neutral */
+    PK_neutral_overlap_t     overlap;      /* how to deal with overlaps in */
+    PK_LOGICAL_t             extend_and_fill_holes;
+    PK_local_ops_update_t    update;       /* update flag */
+    };
+
+typedef struct PK_BODY_trim_neutral_sheets_o_s
+    PK_BODY_trim_neutral_sheets_o_t;
+
+
+
+
+/* PK_BODY_trim_neutral_sheets_o_m */
+
+#define PK_BODY_trim_neutral_sheets_o_m(options) \
+    (                                   \
+       (options).o_t_version = 5,        \
+       (options).ignore = PK_neutral_ignore_fa_default_c,        \
+       (options).trim_method = PK_neutral_trim_method_sheets_c,      \
+       (options).overlap = PK_neutral_overlap_no_c,      \
+       (options).extend_and_fill_holes = PK_LOGICAL_false,      \
+       (options).update = PK_local_ops_update_default_c       \
+    )
+
+
+/* PK_FACE_neutral_causes_t */
+
+
+struct PK_FACE_neutral_causes_s
+    {
+    PK_FACE_t    neutral_face;    /* Face in neutral sheet. */
+    int          n_faces_back;    /* Number of faces compressed onto */
+    PK_FACE_t   *faces_back;      /* Set of faces compressed onto */
+    int          n_faces_front;   /* Number of faces compressed onto */
+    PK_FACE_t   *faces_front;     /* Set of faces compressed onto */
+    };
+typedef struct PK_FACE_neutral_causes_s PK_FACE_neutral_causes_t;
+
+
+
+
+/* PK_FACE_neutral_causes_array_t */
+
+
+struct PK_FACE_neutral_causes_array_s
+    {
+    int          n_causes;     /* Number of face causes in array */
+    PK_FACE_neutral_causes_t
+                *face_causes;  /* Set of face causes */
+    };
+typedef struct PK_FACE_neutral_causes_array_s PK_FACE_neutral_causes_array_t;
+
+
+
+
+/* PK_FACE_set_pair_t */
+
+
+struct PK_FACE_set_pair_s
+    {
+    int          n_faces1;    /* Number of faces in first set */
+    PK_FACE_t   *faces1;      /* First set of faces */
+    int          n_faces2;    /* Number of faces in second set */
+    PK_FACE_t   *faces2;      /* Second set of faces */
+    PK_BODY_t    sheet;       /* Sheet to be trimmed */
+    PK_LOGICAL_t sheet_pretrimmed;
+    };
+typedef struct PK_FACE_set_pair_s PK_FACE_set_pair_t;
+
+
+
+
+/* PK_BODY_offset_o_t */
+
+struct PK_BODY_offset_o_s
+    {
+    int                o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t       allow_disjoint;  /* whether disjoint body can be */
+    PK_check_fa_fa_t   check_fa_fa;     /* check for face-face inconsistencies */
+    int                n_offset_faces;  /* number of elements in `offset_faces' */
+    const PK_FACE_t   *offset_faces;    /* faces to be offset by a different */
+    const double      *offset_values;   /* offset values for corresponding */
+    PK_offset_method_t offset_method;   /* offset method */
+    PK_LOGICAL_t       report_sx;       /* whether to report faces that have */
+    PK_fix_degens_t    fix_degens;      /* control on repairing surface */
+    PK_LOGICAL_t       report_fix_degens;
+    PK_offset_step_t   offset_step;     /* whether to create a step offset */
+    PK_LOGICAL_t       ortho_vx_split;  /* Split laminar vertices during offset */
+    PK_offset_track_del_t
+                       track_del;       /* How to track deleted faces */
+    PK_EDGE_offset_blend_t
+                       blend_edges;     /* Offset edges as blend faces */
+    double             blend_radius;    /* Radius of blend faces created if */
+    PK_FACE_grow_t     grow;            /* controls which faces to grow */
+    PK_VERTEX_limit_t  vertex_limit;    /* How to constrain the maximum */
+    PK_EDGE_limit_t    edge_limit;      /* How to constrain the maximum */
+    PK_local_ops_update_t
+                       update;          /* update flag */
+    };
+typedef struct PK_BODY_offset_o_s PK_BODY_offset_o_t;
+
+
+/* PK_BODY_offset_o_m */
+
+#define PK_BODY_offset_o_m(options)                                   \
+       ((options).o_t_version       = 12,                             \
+        (options).allow_disjoint    = PK_LOGICAL_false,               \
+        (options).check_fa_fa       = PK_check_fa_fa_yes_c,           \
+        (options).n_offset_faces    = 0,                              \
+        (options).offset_faces      = NULL,                           \
+        (options).offset_values     = NULL,                           \
+        (options).offset_method     = PK_offset_method_sx_trim_c,     \
+        (options).fix_degens        = PK_fix_degens_no_c,             \
+        (options).report_sx         = PK_LOGICAL_false,               \
+        (options).report_fix_degens = PK_LOGICAL_false,               \
+        (options).offset_step       = PK_offset_step_no_c,            \
+        (options).ortho_vx_split    = PK_LOGICAL_false,               \
+        (options).track_del         = PK_offset_track_del_no_c,       \
+        (options).blend_edges       = PK_EDGE_offset_blend_no_c,      \
+        (options).blend_radius      = 0.0,                            \
+        (options).grow              = PK_FACE_grow_update_c,          \
+        (options).vertex_limit      = PK_VERTEX_limit_no_c,           \
+        (options).edge_limit        = PK_EDGE_limit_no_c,             \
+        (options).update            = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_BODY_offset_planar_wire_o_t */
+
+struct PK_BODY_offset_planar_wire_o_s
+    {
+    int             o_t_version;      /* version number */
+    PK_BODY_owb_gap_fill_t            /* how gaps at vertices are filled */
+                    gap_fill;         /* (PK_BODY_owb_gap_fill_round_c) */
+    PK_LOGICAL_t    local_check;      /* whether to perform local checks */
+    double          tolerance;        /* tolerance for curve conversion (0) */
+    PK_double_constraint_t
+                    gap_fill_angle;   /* angular constraint to determine */
+    PK_BODY_owb_gap_fill_t            /* how gaps at vertices are filled */
+                    constrained_gap_fill;
+    PK_LOGICAL_t    repair_self_int;  /* whether to repair self */
+    PK_LOGICAL_t    allow_disjoint;   /* whether the returned body can be */
+
+    };
+
+typedef struct PK_BODY_offset_planar_wire_o_s PK_BODY_offset_planar_wire_o_t;
+
+
+
+/* PK_BODY_offset_planar_wire_o_m */
+
+#define PK_BODY_offset_planar_wire_o_m(options)                            \
+    (                                                                      \
+    (options).o_t_version                  = 2,                            \
+    (options).gap_fill                     = PK_BODY_owb_gap_fill_round_c, \
+    (options).local_check                  = PK_LOGICAL_false,             \
+    (options).tolerance                    = 0,                            \
+    (options).gap_fill_angle.comparison    = PK_comparison_never_c,        \
+    (options).gap_fill_angle.interval.value[0] = 0,                        \
+    (options).gap_fill_angle.interval.value[1] = 0,                        \
+    (options).constrained_gap_fill         = PK_BODY_owb_gap_fill_round_c, \
+    (options).repair_self_int              = PK_LOGICAL_false,             \
+    (options).allow_disjoint               = PK_LOGICAL_false              \
+    )
+
+
+/* PK_BODY_pick_topols_o_t */
+
+struct PK_BODY_pick_topols_o_s
+    {
+    int                        o_t_version;  /* version number */
+
+    int                          max_faces;  /* max number of faces required */
+    int                          max_edges;  /* max number of edges required */
+    int                       max_vertices;  /* max number of vertices required */
+
+    PK_LOGICAL_t                near_plane;  /* whether set */
+    PK_LOGICAL_t                 far_plane;  /* whether set */
+
+    PK_LOGICAL_t        is_curve_chord_tol;
+    double                 curve_chord_tol;
+    PK_LOGICAL_t        is_curve_chord_max;
+    double                 curve_chord_max;
+    PK_LOGICAL_t        is_curve_chord_ang;
+    double                 curve_chord_ang;
+    PK_LOGICAL_t         ignore_back_faces;  /* face picking optimisation */
+
+    PK_LOGICAL_t    ignore_excess_entities;  /* face picking optimisation */
+
+    double                   max_edge_dist;  /* max distance between ray/edges */
+
+    double                 max_vertex_dist;  /* max dist between ray/vertices */
+
+    PK_VECTOR_t                 near_point;  /* point on near_plane */
+    PK_VECTOR_t                  far_point;  /* point on far_plane */
+
+    PK_BODY_pick_method_t           method;  /* method of measuring pick dist */
+
+    double                           ratio;  /* bias when measuring pick dist */
+
+    int                     n_geom_classes;  /* specify the number of */
+
+    PK_CLASS_t               *geom_classes;  /* specify the geometry classes */
+
+    PK_pick_approximate_t      pick_approx;  /* approximate curves */
+    };
+typedef struct PK_BODY_pick_topols_o_s PK_BODY_pick_topols_o_t;
+
+
+
+/* PK_BODY_pick_topols_o_m */
+
+
+#define PK_BODY_pick_topols_o_m( opt)                                   \
+    (   (opt).o_t_version         = 4,                                  \
+        (opt).max_faces           = 1,                                  \
+        (opt).max_edges           = 0,                                  \
+        (opt).max_vertices        = 0,                                  \
+        (opt).near_plane          = PK_LOGICAL_false,                   \
+        (opt).far_plane           = PK_LOGICAL_false,                   \
+        (opt).is_curve_chord_tol  = PK_LOGICAL_false,                   \
+        (opt).curve_chord_tol     = 0.0,                                \
+        (opt).is_curve_chord_max  = PK_LOGICAL_false,                   \
+        (opt).curve_chord_max     = 0.0,                                \
+        (opt).is_curve_chord_ang  = PK_LOGICAL_false,                   \
+        (opt).curve_chord_ang     = 0.0,                                \
+        (opt).ignore_back_faces   = PK_LOGICAL_true,                    \
+        (opt).ignore_excess_entities   = PK_LOGICAL_false,              \
+        (opt).max_edge_dist       = 0.0,                                \
+        (opt).max_vertex_dist     = 0.0,                                \
+        (opt).near_point.coord[0] =                                     \
+        (opt).near_point.coord[1] =                                     \
+        (opt).near_point.coord[2] = 0.0,                                \
+        (opt).far_point.coord[0]  =                                     \
+        (opt).far_point.coord[1]  =                                     \
+        (opt).far_point.coord[2]  = 0.0,                                \
+        (opt).method              = PK_BODY_pick_axial_c,               \
+        (opt).ratio               = 0.0,                                \
+        (opt).n_geom_classes      = 0,                                  \
+        (opt).geom_classes        = NULL,                               \
+        (opt).pick_approx         = PK_pick_approximate_yes_c           \
+    )
+
+
+/* PK_BODY_pick_topol_r_t */
+
+struct PK_BODY_pick_topol_r_s
+       {
+       PK_ENTITY_t  entity;
+       int          occurence;
+       PK_VECTOR_t  intersect;
+       double       distance;
+       };
+typedef struct PK_BODY_pick_topol_r_s
+               PK_BODY_pick_topol_r_t;
+
+
+/* PK_BODY_pick_topols_r_t */
+
+struct PK_BODY_pick_topols_r_s
+    {
+    int                     n_faces;
+    PK_BODY_pick_topol_r_t *faces;
+    int                     e_faces;
+
+    int                     n_edges;
+    PK_BODY_pick_topol_r_t *edges;
+    int                     e_edges;
+
+    int                     n_vertices;
+    PK_BODY_pick_topol_r_t *vertices;
+    int                     e_vertices;
+    };
+typedef struct PK_BODY_pick_topols_r_s PK_BODY_pick_topols_r_t;
+
+
+
+/* PK_BODY_problem_group_t */
+
+struct PK_BODY_problem_group_s
+    {
+    PK_BODY_sewing_problem_t     type;
+    PK_EDGE_t                   *edges;
+    int                          n_edges;
+    };
+
+typedef struct PK_BODY_problem_group_s PK_BODY_problem_group_t;
+
+
+
+
+/* PK_BODY_problem_group_array_t */
+
+struct PK_BODY_problem_group_array_s
+    {
+    PK_BODY_problem_group_t  *array;
+    int                       length;
+    };
+
+typedef struct PK_BODY_problem_group_array_s PK_BODY_problem_group_array_t;
+
+
+
+
+/* PK_BODY_sew_bodies_o_t */
+
+struct PK_BODY_sew_bodies_o_s
+    {
+    int                   o_t_version;
+    PK_LOGICAL_t          set_global_tolerance;  /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          allow_disjoint_result; /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t          treat_as_manifold;     /* (PK_LOGICAL_true) */
+    PK_BODY_sewing_type_t prefered_body_type;    /* (PK_BODY_sewing_any_c) */
+    PK_BODY_sewing_removal_t
+                          duplicate_removal;  /* (PK_BODY_sewing_remove_none_c) */
+    int                   number_of_iterations;  /* (1) */
+    double               *iteration_bounds;      /* (NULL) */
+    PK_BODY_sewing_assy_t assembly_sewing;       /* (PK_BODY_sewing_assy_no_c) */
+    PK_BODY_sewing_gen_t  general_sewing;        /* (PK_BODY_sewing_gen_no_c) */
+    PK_LOOP_sew_up_t      sew_up_inner_loops;    /* (PK_LOOP_sew_up_loop_c) */
+    };
+
+typedef struct PK_BODY_sew_bodies_o_s PK_BODY_sew_bodies_o_t;
+
+
+
+/* PK_BODY_sew_bodies_o_m */
+
+#define PK_BODY_sew_bodies_o_m(options)                                \
+    (                                                                  \
+       (options).o_t_version           = 7,                            \
+       (options).set_global_tolerance  = PK_LOGICAL_false,             \
+       (options).allow_disjoint_result = PK_LOGICAL_false,             \
+       (options).treat_as_manifold     = PK_LOGICAL_true,              \
+       (options).prefered_body_type    = PK_BODY_sewing_any_c,         \
+       (options).duplicate_removal     = PK_BODY_sewing_remove_none_c, \
+       (options).number_of_iterations  = 1,                            \
+       (options).iteration_bounds      = NULL,                         \
+       (options).assembly_sewing       = PK_BODY_sewing_assy_no_c,     \
+       (options).general_sewing        = PK_BODY_sewing_gen_no_c,      \
+       (options).sew_up_inner_loops    = PK_LOOP_sew_up_loop_c  \
+    )
+
+
+/* PK_BODY_knit_pattern_t */
+
+struct PK_BODY_knit_pattern_s
+    {
+    int                          n_edges;
+    PK_EDGE_t                   *edges;
+    PK_EDGE_t                   *matches;
+    int                          n_reversals;
+    PK_BODY_t                   *reversals;
+    };
+
+typedef struct PK_BODY_knit_pattern_s PK_BODY_knit_pattern_t;
+
+
+
+/* PK_BODY_knit_result_t */
+
+struct PK_BODY_knit_result_s
+    {
+    int                          n_unknit_edges;
+    PK_EDGE_t                   *unknit_edges;
+    PK_BODY_knit_status_t        status;
+    };
+
+typedef struct PK_BODY_knit_result_s PK_BODY_knit_result_t;
+
+
+
+/* PK_BODY_find_knit_pattern_o_t */
+
+struct PK_BODY_find_knit_pattern_o_s
+    {
+    int                      o_t_version;
+    };
+
+typedef struct PK_BODY_find_knit_pattern_o_s PK_BODY_find_knit_pattern_o_t;
+
+
+
+/* PK_BODY_find_knit_pattern_o_m */
+
+#define PK_BODY_find_knit_pattern_o_m(options)                         \
+    (                                                                  \
+       (options).o_t_version           = 1                             \
+    )
+
+
+/* PK_BODY_apply_knit_pattern_o_t */
+
+struct PK_BODY_apply_knit_pattern_o_s
+    {
+    int                      o_t_version;
+    PK_BODY_sewing_type_t    body_type;              /* (PK_BODY_sewing_any_c) */
+    PK_LOGICAL_t             sort_face_shells;       /* (PK_LOGICAL_true) */
+    PK_LOGICAL_t             close_marginal_gaps;    /* (PK_LOGICAL_true) */
+    };
+
+typedef struct PK_BODY_apply_knit_pattern_o_s PK_BODY_apply_knit_pattern_o_t;
+
+
+
+/* PK_BODY_apply_knit_pattern_o_m */
+
+#define PK_BODY_apply_knit_pattern_o_m(options)                        \
+    (                                                                  \
+       (options).o_t_version           = 2,                            \
+       (options).body_type             = PK_BODY_sewing_any_c,         \
+       (options).sort_face_shells      = PK_LOGICAL_true,               \
+       (options).close_marginal_gaps   = PK_LOGICAL_true               \
+    )
+
+
+/* PK_BODY_knit_o_t */
+
+struct PK_BODY_knit_o_s
+    {
+    int                        o_t_version;  /* version number */
+    };
+typedef struct PK_BODY_knit_o_s PK_BODY_knit_o_t;
+
+
+
+/* PK_BODY_knit_o_m */
+
+#define PK_BODY_knit_o_m(options)                                     \
+    (                                                                 \
+       (options).o_t_version       = 1                                \
+    )
+
+
+/* PK_BODY_sweep_law_discrete_t */
+
+struct PK_BODY_sweep_law_discrete_s
+    {
+    int              n_vertices;
+    PK_VERTEX_t     *vertices;
+    double          *values;
+    };
+
+typedef struct PK_BODY_sweep_law_discrete_s PK_BODY_sweep_law_discrete_t;
+
+
+
+/* PK_BODY_sweep_law_discrete_m */
+
+#define PK_BODY_sweep_law_discrete_m(law) \
+    (                                     \
+        (law.n_vertices) = 0,             \
+        (law.vertices)   = NULL,          \
+        (law.values)     = NULL           \
+    )
+
+
+/* PK_BODY_sweep_law_t */
+
+struct PK_BODY_sweep_law_s
+    {
+    PK_BODY_sweep_law_type_t        law_type;
+    PK_BODY_sweep_law_discrete_t    law_set;
+    PK_LAW_sf_t                     law_curve;
+    };
+
+typedef struct PK_BODY_sweep_law_s PK_BODY_sweep_law_t;
+
+
+
+/* PK_BODY_sweep_law_m */
+
+#define PK_BODY_sweep_law_m(options)                      \
+    (                                                     \
+       (options).law_type     = PK_BODY_sweep_law_none_c, \
+       PK_BODY_sweep_law_discrete_m( (options).law_set ), \
+       PK_LAW_sf_m( (options).law_curve )                 \
+    )
+
+
+/* PK_sweep_guide_clamp_dirn_t */
+
+struct PK_sweep_guide_clamp_dirn_s
+    {
+    int                 n_directions;  /* the number of clamp directions (0) */
+    const PK_VECTOR1_t *directions;    /* the direction of each clamp (NULL) */
+    int                 n_vertices;    /* the number of guide wire vertices for */
+    const PK_VERTEX_t  *vertices;      /* the guide wire vertices (NULL) */
+    };
+
+typedef struct PK_sweep_guide_clamp_dirn_s PK_sweep_guide_clamp_dirn_t;
+
+
+
+/* PK_sweep_guide_clamp_dirn_m */
+
+#define PK_sweep_guide_clamp_dirn_m(options)                            \
+    (                                                                   \
+       (options).n_directions             = 0,                          \
+       (options).directions               = NULL,                       \
+       (options).n_vertices               = 0,                          \
+       (options).vertices                 = NULL                        \
+    )
+
+
+/* PK_sweep_guide_control_t */
+
+struct PK_sweep_guide_control_s
+    {
+    PK_VERTEX_array_t             profile_matches;
+    PK_sweep_guide_clamp_type_t   clamp_type;  /* clamp type */
+    PK_sweep_guide_clamp_dirn_t   dirn_clamp;  /* direction clamp */
+    };
+
+typedef struct PK_sweep_guide_control_s PK_sweep_guide_control_t;
+
+
+
+/* PK_sweep_guide_control_m */
+
+#define PK_sweep_guide_control_m(options)                               \
+    (                                                                   \
+       (options).profile_matches.array    = NULL,                       \
+       (options).profile_matches.length   = 0,                          \
+       (options).clamp_type               = PK_sweep_guide_clamp_none_c,\
+       PK_sweep_guide_clamp_dirn_m((options).dirn_clamp)                \
+    )
+
+
+/* PK_sweep_const_profile_clamp_t */
+
+struct PK_sweep_const_profile_clamp_s
+    {
+    double magnitude;  /* magnitude of the clamp (1.0) */
+    };
+
+typedef struct PK_sweep_const_profile_clamp_s PK_sweep_const_profile_clamp_t;
+
+
+
+/* PK_sweep_const_profile_clamp_m */
+
+#define PK_sweep_const_profile_clamp_m(options)                         \
+    (                                                                   \
+       (options).magnitude = 1.0                                        \
+    )
+
+
+/* PK_sweep_face_clamp_t */
+
+struct PK_sweep_face_clamp_s
+    {
+    int                 n_edges;         /* number of clamping faces and */
+    const PK_EDGE_t    *edges;           /* array of clamped profile edges */
+    const PK_FACE_t    *faces;           /* array of clamping faces (NULL) */
+    int                 n_magnitudes;    /* number of magnitudes for scaling */
+    const double       *magnitudes;      /* array of magnitudes for scaling */
+    const PK_VERTEX_t  *vertices;        /* array of clamped profile vertices */
+    };
+
+typedef struct PK_sweep_face_clamp_s PK_sweep_face_clamp_t;
+
+
+
+/* PK_sweep_face_clamp_m */
+
+#define PK_sweep_face_clamp_m(options)                                  \
+    (                                                                   \
+       (options).n_edges        = 0,                                    \
+       (options).edges          = NULL,                                 \
+       (options).faces          = NULL,                                 \
+       (options).n_magnitudes   = 0,                                    \
+       (options).magnitudes     = NULL,                                 \
+       (options).vertices       = NULL                                  \
+    )
+
+
+/* PK_sweep_deriv_conds_t */
+
+struct PK_sweep_deriv_conds_s
+    {
+    PK_sweep_clamp_type_t          clamp_type;  /* clamp type */
+    PK_sweep_const_profile_clamp_t const_profile_clamp;
+    PK_sweep_face_clamp_t          face_clamp;
+    };
+
+typedef struct PK_sweep_deriv_conds_s PK_sweep_deriv_conds_t;
+
+
+
+/* PK_sweep_deriv_conds_m */
+
+#define PK_sweep_deriv_conds_m(options)                                 \
+    (                                                                   \
+       (options).clamp_type               = PK_sweep_clamp_none_c,      \
+       PK_sweep_const_profile_clamp_m( (options).const_profile_clamp ), \
+       PK_sweep_face_clamp_m( (options).face_clamp )                    \
+    )
+
+
+/* PK_BODY_make_swept_body_o_t */
+
+struct PK_BODY_make_swept_body_o_s
+    {
+    int                        o_t_version;
+    PK_BODY_sweep_alignment_t  alignment;     /* alignment of profile */
+    PK_BODY_simplify_t         simplify;      /* simplify lofted surfaces */
+    PK_BODY_topology_t         topology_form; /* topology of resultant body */
+    PK_BODY_sweep_law_t        twist;         /* twist of sweep path */
+    PK_BODY_sweep_law_t        scale;         /* scale of sweep path */
+    PK_BODY_sweep_fair_t       fair;          /* method to use for improving */
+    double                     tolerance;     /* tolerance (1.0e-5) */
+    PK_LOGICAL_t               minimise_tolerance;
+    PK_LOGICAL_t               allow_rationals;
+    PK_BODY_sweep_scale_type_t scale_type;    /* how any scaling should be */
+    PK_VECTOR_t                scale_point;   /* defining point for scale */
+    int                        n_ignorable_vertices;
+    const PK_VERTEX_t         *ignorable_vertices;
+    };
+
+typedef struct PK_BODY_make_swept_body_o_s PK_BODY_make_swept_body_o_t;
+
+
+
+/* PK_BODY_make_swept_body_o_m */
+
+#define PK_BODY_make_swept_body_o_m(options)                         \
+    (                                                                  \
+       (options).o_t_version           = 8,                            \
+       (options).alignment             = PK_BODY_sweep_align_normal_c, \
+       (options).simplify              = PK_BODY_simplify_analytic_c,  \
+       (options).topology_form         = PK_BODY_topology_minimal_c,   \
+       PK_BODY_sweep_law_m( (options).twist ),                         \
+       PK_BODY_sweep_law_m( (options).scale ),                         \
+       (options).fair                  = PK_BODY_sweep_fair_default_c, \
+       (options).tolerance             = 1.0e-5,                       \
+       (options).minimise_tolerance    = PK_LOGICAL_false,             \
+       (options).allow_rationals       = PK_LOGICAL_true,              \
+       (options).scale_type            = PK_BODY_sweep_scale_both_c,   \
+       (options).scale_point.coord[0]  = 0.0,                          \
+       (options).scale_point.coord[1]  = 0.0,                          \
+       (options).scale_point.coord[2]  = 0.0,                          \
+       (options).n_ignorable_vertices  = 0,                            \
+       (options).ignorable_vertices    = NULL                          \
+    )
+
+
+/* PK_BODY_make_swept_body_2_o_t */
+
+struct PK_BODY_make_swept_body_2_o_s
+    {
+    int                        o_t_version;
+    PK_BODY_sweep_alignment_t  alignment;   /* alignment of profile */
+    PK_BODY_simplify_t         simplify;    /* simplify swept surfaces */
+    PK_BODY_topology_t         topology_form;
+    int                        n_ignorable_vertices;
+    const PK_VERTEX_t         *ignorable_vertices;
+    PK_BODY_vertex_matches_t   matches;     /* how to match vertices on */
+    PK_BODY_sweep_law_t        twist;       /* twist of sweep path */
+    PK_LOGICAL_t               have_twist_direction;
+    PK_VECTOR1_t               twist_direction;
+    PK_BODY_sweep_law_t        scale;       /* scale of sweep path */
+    PK_BODY_sweep_scale_type_t scale_type;  /* how any scaling should be */
+    PK_VECTOR_t                scale_point; /* defining point for scale laws of */
+    PK_sweep_profile_law_t     profile_law; /* whether profiles should be */
+    double                     tolerance;   /* tolerance (1.0e-5) */
+    PK_LOGICAL_t               minimise_tolerance;
+    PK_LOGICAL_t               allow_rationals;
+    PK_LOGICAL_t               want_edge_tracking;
+    PK_LOGICAL_t               have_lock_direction;
+    PK_VECTOR1_t               lock_direction;
+    PK_sweep_lock_t            lock_type;   /* behaviour of the */
+    int                        n_lock_faces;
+    const PK_FACE_t           *lock_faces;  /* the lock faces (NULL) */
+    PK_continuity_t            preferred_continuity;
+    int                        n_guides;    /* the number of guides (0) */
+    const PK_BODY_t           *guides;      /* the guides (NULL) */
+    const PK_sweep_guide_control_t
+                              *guide_controls;
+    PK_sweep_guide_method_t    guide_method;
+    PK_sweep_guide_scale_t     guide_scale; /* scaling for sweep with guides */
+    int                        fixed_guide_index;
+    PK_LOGICAL_t               trim_to_guides;
+    PK_LOGICAL_t               have_trim_point;
+    PK_VECTOR_t                trim_point;  /* a point used to control how */
+    int                        n_profile_derivs;
+    const PK_sweep_deriv_conds_t
+                              *profile_derivs;
+    const int                 *profile_indices;
+    PK_sweep_output_xsect_t    output_xsect;
+    PK_sweep_group_xsect_t     group_xsect; /* how to group cross-sections */
+    int                        n_xsects;    /* the number of cross-sections per */
+    PK_sweep_repair_t          repair;      /* whether to attempt self- */
+    PK_BODY_sweep_update_t     update;      /* update flag */
+    };
+
+typedef struct PK_BODY_make_swept_body_2_o_s PK_BODY_make_swept_body_2_o_t;
+
+
+
+/* PK_BODY_make_swept_body_2_o_m */
+
+#define PK_BODY_make_swept_body_2_o_m(options)                          \
+    (                                                                   \
+       (options).o_t_version           = 15,                            \
+       (options).alignment             = PK_BODY_sweep_align_normal_c,  \
+       (options).simplify              = PK_BODY_simplify_analytic_c,   \
+       (options).topology_form         = PK_BODY_topology_minimal_c,    \
+       (options).n_ignorable_vertices  = 0,                             \
+       (options).ignorable_vertices    = NULL,                          \
+       PK_BODY_vertex_matches_m( (options).matches ),                   \
+       PK_BODY_sweep_law_m( (options).twist ),                          \
+       (options).have_twist_direction = PK_LOGICAL_false,               \
+       (options).twist_direction.coord[0] = 0.0,                        \
+       (options).twist_direction.coord[1] = 0.0,                        \
+       (options).twist_direction.coord[2] = 0.0,                        \
+       PK_BODY_sweep_law_m( (options).scale ),                          \
+       (options).scale_type            = PK_BODY_sweep_scale_both_c,    \
+       (options).scale_point.coord[0]  = 0.0,                           \
+       (options).scale_point.coord[1]  = 0.0,                           \
+       (options).scale_point.coord[2]  = 0.0,                           \
+       (options).profile_law           = PK_sweep_profile_law_no_c,     \
+       (options).tolerance             = 1.0e-5,                        \
+       (options).minimise_tolerance    = PK_LOGICAL_true,               \
+       (options).allow_rationals       = PK_LOGICAL_true,               \
+       (options).want_edge_tracking    = PK_LOGICAL_false,              \
+       (options).have_lock_direction   = PK_LOGICAL_false,              \
+       (options).lock_direction.coord[0]  = 0.0,                        \
+       (options).lock_direction.coord[1]  = 0.0,                        \
+       (options).lock_direction.coord[2]  = 0.0,                        \
+       (options).lock_type             = PK_sweep_lock_path_and_dir_c,  \
+       (options).n_lock_faces          = 0,                             \
+       (options).lock_faces            = NULL,                          \
+       (options).preferred_continuity  = PK_continuity_c1_c,            \
+       (options).n_guides              = 0,                             \
+       (options).guides                = NULL,                          \
+       (options).guide_controls        = NULL,                          \
+       (options).guide_method          = PK_sweep_guide_point_c,        \
+       (options).guide_scale           = PK_sweep_guide_uniform_c,      \
+       (options).fixed_guide_index     = 0,                             \
+       (options).trim_to_guides        = PK_LOGICAL_false,              \
+       (options).have_trim_point       = PK_LOGICAL_false,              \
+       (options).trim_point.coord[0]   = 0.0,                           \
+       (options).trim_point.coord[1]   = 0.0,                           \
+       (options).trim_point.coord[2]   = 0.0,                           \
+       (options).n_profile_derivs      = 0,                             \
+       (options).profile_derivs        = NULL,                          \
+       (options).profile_indices       = NULL,                          \
+       (options).output_xsect          = PK_sweep_output_xsect_no_c,    \
+       (options).group_xsect           = PK_sweep_group_xsect_per_vx_c, \
+       (options).n_xsects              = 0,                             \
+       (options).repair                = PK_sweep_repair_no_c,          \
+       (options).update                = PK_BODY_sweep_update_default_c \
+    )
+
+
+/* PK_BODY_make_swept_profiles_o_t */
+
+struct PK_BODY_make_swept_profiles_o_s
+    {
+    int                         o_t_version;
+    PK_BODY_sweep_alignment_t   alignment;
+    PK_BODY_simplify_t          simplify;
+
+    PK_BODY_sweep_law_t         twist;
+    PK_BODY_sweep_law_t         scale;
+    };
+
+typedef struct PK_BODY_make_swept_profiles_o_s PK_BODY_make_swept_profiles_o_t;
+
+
+
+/* PK_BODY_make_swept_profiles_o_m */
+
+#define PK_BODY_make_swept_profiles_o_m(options)               \
+    (                                                          \
+       (options).o_t_version   = 2,                            \
+       (options).alignment     = PK_BODY_sweep_align_normal_c, \
+       (options).simplify      = PK_BODY_simplify_analytic_c,  \
+       PK_BODY_sweep_law_m( (options).twist ),                 \
+       PK_BODY_sweep_law_m( (options).scale )                  \
+    )
+
+
+/* PK_BODY_make_swept_tool_o_t */
+
+struct PK_BODY_make_swept_tool_o_s
+    {
+    int                    o_t_version;
+    double                 tolerance;       /* tolerance (1.0e-5) */
+    PK_LOGICAL_t           allow_rationals;
+    PK_LOGICAL_t           want_edge_tracking;
+    PK_swept_tool_update_t update;          /* update flag */
+    PK_LOGICAL_t           have_lock_direction;
+    PK_VECTOR1_t           lock_direction;  /* lock direction */
+    PK_VERTEX_t            tool_site;       /* vertex on the path where the */
+    };
+
+typedef struct PK_BODY_make_swept_tool_o_s PK_BODY_make_swept_tool_o_t;
+
+
+
+/* PK_BODY_make_swept_tool_o_m */
+
+#define PK_BODY_make_swept_tool_o_m(options)                                \
+    (                                                                       \
+       (options).o_t_version             = 4,                               \
+       (options).tolerance               = 1.0e-5,                          \
+       (options).allow_rationals         = PK_LOGICAL_true,                 \
+       (options).want_edge_tracking      = PK_LOGICAL_false,                \
+       (options).update                  = PK_swept_tool_update_default_c,  \
+       (options).have_lock_direction     = PK_LOGICAL_false,                \
+       (options).lock_direction.coord[0] = 0.0,                             \
+       (options).lock_direction.coord[1] = 0.0,                             \
+       (options).lock_direction.coord[2] = 0.0,                             \
+       (options).tool_site               = PK_ENTITY_null                   \
+    )
+
+
+/* PK_BODY_sweep_status_r_t */
+
+struct PK_BODY_sweep_status_s
+    {
+    PK_BODY_sweep_fault_t        fault;
+    PK_VECTOR_t                  fault_location;
+    PK_TOPOL_t                   fault_topol;
+    };
+
+typedef struct PK_BODY_sweep_status_s PK_BODY_sweep_status_r_t;
+
+
+
+/* PK_BODY_tracked_sweep_r_t */
+
+struct PK_BODY_tracked_sweep_r_s
+    {
+    PK_BODY_sweep_status_r_t     status;
+    PK_BODY_t                    body;
+    PK_TOPOL_track_r_t           tracking_info;
+    };
+
+typedef struct PK_BODY_tracked_sweep_r_s PK_BODY_tracked_sweep_r_t;
+
+
+
+/* PK_BODY_sweep_status_2_r_t */
+
+struct PK_BODY_sweep_status_2_s
+    {
+    PK_BODY_sweep_fault_t        fault;
+    int                          n_fault_entities;
+    PK_ENTITY_t                 *fault_entities;
+    PK_VECTOR_t                 *fault_locations;
+    };
+
+typedef struct PK_BODY_sweep_status_2_s PK_BODY_sweep_status_2_r_t;
+
+
+
+/* PK_BODY_tracked_sweep_2_r_t */
+
+struct PK_BODY_tracked_sweep_2_r_s
+    {
+    PK_BODY_sweep_status_2_r_t   status;
+    PK_BODY_t                    body;
+    PK_TOPOL_track_r_t           tracking_info;
+    };
+
+typedef struct PK_BODY_tracked_sweep_2_r_s PK_BODY_tracked_sweep_2_r_t;
+
+
+
+/* PK_BODY_sweep_tool_status_r_t */
+
+struct PK_BODY_sweep_tool_status_s
+    {
+    int                     n_faults;
+    PK_sweep_tool_fault_t  *faults;
+    PK_ENTITY_t            *fault_entities;
+    PK_VECTOR_t            *fault_locations;
+    };
+
+typedef struct PK_BODY_sweep_tool_status_s PK_BODY_sweep_tool_status_r_t;
+
+
+
+/* PK_BODY_sweep_tool_r_t */
+
+struct PK_BODY_sweep_tool_r_s
+    {
+    PK_BODY_sweep_tool_status_r_t status;
+    PK_BODY_t                     body;
+    };
+
+typedef struct PK_BODY_sweep_tool_r_s PK_BODY_sweep_tool_r_t;
+
+
+
+/* PK_BODY_thicken_o_t */
+
+struct PK_BODY_thicken_o_s
+    {
+    int                     o_t_version;     /* version number */
+    int                     n_faces;         /* number of non-default faces */
+    const PK_FACE_t        *faces;           /* faces without default offsets */
+    const double           *front_offsets;   /* front offsets */
+    const double           *back_offsets;    /* back offsets */
+    PK_check_fa_fa_t        check_fa_fa;     /* check for face-face */
+    PK_thicken_method_t     method;          /* thickening method */
+    PK_VECTOR1_t            punch_dir;       /* punch direction */
+    PK_offset_method_t      offset_method;   /* offset method */
+    PK_LOGICAL_t            report_sx;       /* whether to report faces that */
+    PK_fix_degens_t         fix_degens;      /* control on repairing surface */
+    PK_LOGICAL_t            report_fix_degens;
+    int                     n_edges;         /* number of edges with user */
+    const PK_EDGE_t        *edges;           /* edges with user supplied side */
+    int                     n_surfaces;      /* number of user supplied side */
+    const PK_SURF_t        *surfaces;        /* user supplied side surfaces */
+    PK_EDGE_offset_blend_t  blend_edges;     /* Offset edges as blend faces */
+    double                  blend_radius;    /* Radius of resulting blends. */
+    PK_LOGICAL_t            ortho_vx_split;  /* Split laminar vertices */
+    PK_local_ops_update_t   update;          /* update flag */
+    PK_offset_step_t        offset_step;     /* whether to create a step */
+    int                     n_pierce_faces;  /* number of faces in */
+    const PK_FACE_t        *pierce_faces;    /* faces to be pierced */
+    PK_FACE_grow_t          grow;            /* controls which faces to grow */
+    };
+
+typedef struct PK_BODY_thicken_o_s PK_BODY_thicken_o_t;
+
+
+
+/* PK_BODY_thicken_o_m */
+
+#define PK_BODY_thicken_o_m(options)                                    \
+       ((options).o_t_version        = 10,                              \
+        (options).n_faces            = 0,                               \
+        (options).faces              = NULL,                            \
+        (options).front_offsets      = NULL,                            \
+        (options).back_offsets       = NULL,                            \
+        (options).check_fa_fa        = PK_check_fa_fa_yes_c,            \
+        (options).method             = PK_thicken_method_offset_c,      \
+        (options).punch_dir.coord[0] = 0.0,                             \
+        (options).punch_dir.coord[1] = 0.0,                             \
+        (options).punch_dir.coord[2] = 0.0,                             \
+        (options).offset_method      = PK_offset_method_sx_trim_c,      \
+        (options).fix_degens         = PK_fix_degens_no_c,              \
+        (options).report_sx          = PK_LOGICAL_false,                \
+        (options).report_fix_degens  = PK_LOGICAL_false,                \
+        (options).n_edges            = 0,                               \
+        (options).edges              = NULL,                            \
+        (options).n_surfaces         = 0,                               \
+        (options).surfaces           = NULL,                            \
+        (options).blend_edges        = PK_EDGE_offset_blend_no_c,       \
+        (options).blend_radius       = 0.0,                             \
+        (options).ortho_vx_split     = PK_LOGICAL_false,                \
+        (options).update             = PK_local_ops_update_default_c,   \
+        (options).offset_step        = PK_offset_step_no_c,             \
+        (options).n_pierce_faces     = 0,                               \
+        (options).pierce_faces       = NULL,                            \
+        (options).grow               = PK_FACE_grow_update_c            \
+      )
+
+
+/* PK_BODY_thicken_r_t */
+
+typedef PK_TOPOL_local_r_t PK_BODY_thicken_r_t;
+
+
+/* PK_BODY_transform_o_t */
+
+struct PK_BODY_transform_o_s
+    {
+    int              o_t_version;   /* version number of option structure */
+    PK_LOGICAL_t     merge_face;    /* whether transformed faces are to be */
+    PK_check_fa_fa_t check_fa_fa;   /* check for face-face inconsistencies */
+    PK_local_ops_update_t
+                     update;        /* update flag */
+    };
+typedef struct PK_BODY_transform_o_s PK_BODY_transform_o_t;
+
+
+/* PK_BODY_transform_o_m */
+
+#define PK_BODY_transform_o_m(options)                              \
+       ((options).o_t_version     = 2,                              \
+        (options).merge_face      = PK_LOGICAL_true,                \
+        (options).check_fa_fa     = PK_check_fa_fa_yes_c,           \
+        (options).update          = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_BODY_ask_topology_o_t */
+
+struct PK_BODY_ask_topology_o_s
+    {
+    int          o_t_version;      /* version number */
+    PK_LOGICAL_t want_fins;        /* whether fins required in output */
+    };
+typedef struct PK_BODY_ask_topology_o_s PK_BODY_ask_topology_o_t;
+
+
+
+/* PK_BODY_ask_topology_o_m */
+
+#define PK_BODY_ask_topology_o_m(options)                                 \
+    (                                                                         \
+        (options).o_t_version         = 1,                                    \
+        (options).want_fins           = PK_LOGICAL_false                      \
+    )
+
+
+/* PK_BODY_create_topology_o_t */
+
+struct PK_BODY_create_topology_o_s
+    {
+    int              o_t_version;     /* version number */
+    PK_BODY_type_t   body_type;       /* preferred result body type */
+    int              n_extra_faults;  /* number of extra faults to return (0) */
+    PK_BODY_fault_t *extra_faults;    /* extra faults to return (NULL) */
+    };
+typedef struct PK_BODY_create_topology_o_s
+               PK_BODY_create_topology_o_t;
+
+
+
+/* PK_BODY_create_topology_o_m */
+
+#define PK_BODY_create_topology_o_m(options)                                  \
+    (                                                                         \
+        (options).o_t_version         = 2,                                    \
+        (options).body_type           = PK_BODY_type_general_c,               \
+        (options).n_extra_faults      = 0,                                    \
+        (options).extra_faults        = NULL                                  \
+    )
+
+
+/* PK_create_fault_t */
+
+struct PK_create_fault_s
+    {
+    PK_check_state_t    state;
+    int                 n_indices;
+    int                *indices;
+    };
+
+typedef struct PK_create_fault_s
+PK_create_fault_t;
+
+
+
+
+/* PK_BODY_create_topology_2_r_t */
+
+struct PK_BODY_create_topology_2_r_s
+    {
+    PK_BODY_t          body;
+    int                n_topols;
+    PK_TOPOL_t        *topols;
+    int                n_create_faults;
+    PK_create_fault_t *create_faults;
+
+    int               *internal_indices;
+    };
+typedef struct PK_BODY_create_topology_2_r_s
+PK_BODY_create_topology_2_r_t;
+
+
+
+
+
+
+/* PK_BODY_create_topology_2_o_t */
+
+struct PK_BODY_create_topology_2_o_s
+    {
+    int              o_t_version;     /* version number */
+    PK_BODY_type_t   body_type;       /* preferred result body type */
+    };
+typedef struct PK_BODY_create_topology_2_o_s
+               PK_BODY_create_topology_2_o_t;
+
+
+
+/* PK_BODY_create_topology_2_o_m */
+
+#define PK_BODY_create_topology_2_o_m(options)                                \
+    (                                                                         \
+        (options).o_t_version         = 1,                                    \
+        (options).body_type           = PK_BODY_type_general_c                \
+    )
+
+
+/* PK_BODY_set_type_o_t */
+
+struct PK_BODY_set_type_o_s
+    {
+    int                    o_t_version;     /* version number of option */
+    };
+
+typedef struct PK_BODY_set_type_o_s PK_BODY_set_type_o_t;
+
+
+
+/* PK_BODY_set_type_o_m */
+
+#define PK_BODY_set_type_o_m(options)                                 \
+    (                                                                 \
+       (options).o_t_version = 1                                      \
+    )
+
+
+/* PK_FACE_close_gaps_o_t */
+
+struct PK_FACE_close_gaps_o_s
+    {
+    int                    o_t_version;      /* options structure version. */
+    PK_LOOP_3_space_gap_t  gap_in_3_space;   /* controls model space gaps at */
+    PK_LOOP_2_space_gap_t  gap_in_2_space;   /* controls parameter space gaps */
+    double                 tol_in_2_space;   /* tolerance value for */
+    PK_LOOP_trim_geom_t    trim_fin_geom;    /* shorten the SP-curve geometry */
+
+    };
+
+typedef struct PK_FACE_close_gaps_o_s PK_FACE_close_gaps_o_t;
+
+
+
+/* PK_FACE_close_gaps_o_m */
+
+#define PK_FACE_close_gaps_o_m(options)                           \
+    (                                                             \
+       (options).o_t_version    = 3,                              \
+       (options).gap_in_3_space = PK_LOOP_3_space_gap_close_c,    \
+       (options).gap_in_2_space = PK_LOOP_2_space_gap_no_c,       \
+       (options).tol_in_2_space = 1.0e-06,                        \
+       (options).trim_fin_geom  = PK_LOOP_trim_geom_no_c          \
+    )
+
+
+/* PK_FACE_contains_vectors_o_t */
+
+struct PK_FACE_contains_vectors_o_s
+    {
+    int          o_t_version;        /* version number of options structure */
+    int          n_uvs;              /* number of uv positions (0) */
+    PK_UV_t     *uvs;                /* uv positions (NULL) */
+    int          n_vectors;          /* number of xyz positions (0) */
+    PK_VECTOR_t *vectors;            /* xyz positions (NULL) */
+    int          n_loops;            /* number of loops (0) */
+    PK_LOOP_t   *loops;              /* loops (NULL) */
+    PK_LOGICAL_t is_on_surf;         /* whether position vector is assumed */
+    };
+typedef struct PK_FACE_contains_vectors_o_s PK_FACE_contains_vectors_o_t;
+
+
+/* PK_FACE_contains_vectors_o_m */
+
+#define PK_FACE_contains_vectors_o_m(options)                 \
+       ((options).o_t_version = 2,                            \
+        (options).n_uvs       = 0,                            \
+        (options).uvs         = NULL,                         \
+        (options).n_vectors   = 0,                            \
+        (options).vectors     = NULL,                         \
+        (options).n_loops     = 0,                            \
+        (options).loops       = NULL,                         \
+        (options).is_on_surf  = PK_LOGICAL_true               \
+       )
+
+
+/* PK_FACE_make_sheet_bodies_o_t */
+
+struct PK_FACE_make_sheet_bodies_o_s
+    {
+    int                 o_t_version;      /* version number of option structure */
+    PK_LOGICAL_t        allow_disjoint;   /* Allow disjoint bodies */
+    PK_LOGICAL_t        transfer_attribs; /* Transfer topology attributes */
+    PK_track_edges_t    track_edges;      /* return edges in tracking data */
+    PK_track_vertices_t track_vertices;   /* return vertices in tracking data */
+    };
+typedef struct PK_FACE_make_sheet_bodies_o_s PK_FACE_make_sheet_bodies_o_t;
+
+
+
+/* PK_FACE_make_sheet_bodies_o_m */
+
+#define PK_FACE_make_sheet_bodies_o_m( options )            \
+    (                                                       \
+       (options).o_t_version       = 2,                     \
+       (options).allow_disjoint    = PK_LOGICAL_false,      \
+       (options).transfer_attribs  = PK_LOGICAL_true,       \
+       (options).track_edges       = PK_track_edges_no_c,   \
+       (options).track_vertices    = PK_track_vertices_no_c \
+    )
+
+
+/* PK_FACE_make_neutral_sheet_o_t */
+
+struct PK_FACE_make_neutral_sheet_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    extend_and_fill_holes;
+    PK_LOGICAL_t    have_tolerance;  /* whether tolerance value is provided */
+    double          tolerance;       /* tolerance on surface offsets */
+    int             n_methods;       /* number of construction methods */
+    const PK_neutral_method_t
+                   *methods;         /* array of construction methods */
+    PK_LOGICAL_t    make_sheet;      /* whether to create a neutral sheet */
+    PK_neutral_face_overlap_t
+                    overlap;         /* whether to enforce face overlaps */
+    PK_local_ops_update_t
+                    update;          /* update flag */
+    };
+
+typedef struct PK_FACE_make_neutral_sheet_o_s PK_FACE_make_neutral_sheet_o_t;
+
+
+
+/* PK_FACE_make_neutral_sheet_o_m */
+
+#define PK_FACE_make_neutral_sheet_o_m( options )           \
+    (                                                       \
+       (options).o_t_version            = 6,                \
+       (options).extend_and_fill_holes  = PK_LOGICAL_true,  \
+       (options).have_tolerance         = PK_LOGICAL_false, \
+       (options).tolerance              = 0.0,              \
+       (options).n_methods              = 0,                \
+       (options).methods                = NULL,             \
+       (options).make_sheet             = PK_LOGICAL_true,  \
+       (options).overlap                = PK_neutral_face_overlap_no_c,  \
+       (options).update                 = PK_local_ops_update_default_c  \
+    )
+
+
+/* PK_FACE_repair_o_t */
+
+struct PK_FACE_repair_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        split_g1;        /* split at G1 discontinuities */
+    PK_LOGICAL_t        split_self_int;  /* split to avoid self-intersections */
+    };
+
+typedef struct PK_FACE_repair_o_s PK_FACE_repair_o_t;
+
+
+
+/* PK_FACE_repair_o_m */
+
+#define PK_FACE_repair_o_m( options )         \
+    (                                                      \
+       (options).o_t_version    = 1,                       \
+       (options).split_g1       = PK_LOGICAL_true,         \
+       (options).split_self_int = PK_LOGICAL_true          \
+    )
+
+
+/* PK_FACE_simplify_geom_o_t */
+
+struct PK_FACE_simplify_geom_o_s
+    {
+    int           o_t_version;   /* version number of option structure */
+    PK_LOGICAL_t  want_geoms;    /* user requires new geoms to be returned */
+    };
+
+typedef struct PK_FACE_simplify_geom_o_s PK_FACE_simplify_geom_o_t;
+
+
+
+/* PK_FACE_simplify_geom_o_m */
+
+#define PK_FACE_simplify_geom_o_m( options )                        \
+    (                                                       \
+       (options).o_t_version    = 1,                        \
+       (options).want_geoms     = PK_LOGICAL_false          \
+    )
+
+
+/* PK_FACE_reverse_o_t */
+
+struct PK_FACE_reverse_o_s
+    {
+    int     o_t_version;  /*version number of options structure */
+    };
+
+typedef struct PK_FACE_reverse_o_s PK_FACE_reverse_o_t;
+
+
+
+/* PK_FACE_reverse_o_m */
+
+#define PK_FACE_reverse_o_m( options ) \
+    (                                  \
+       (options).o_t_version    = 1    \
+    )
+
+
+/* PK_FACE_ask_faces_adjacent_o_t */
+
+struct PK_FACE_ask_faces_adjacent_o_s
+    {
+    int                   o_t_version;               /* version number of */
+    PK_LOGICAL_t          include_vertex_connected;  /* Whether vertex- */
+    };
+typedef struct PK_FACE_ask_faces_adjacent_o_s PK_FACE_ask_faces_adjacent_o_t;
+
+
+/* PK_FACE_ask_faces_adjacent_o_m */
+
+#define PK_FACE_ask_faces_adjacent_o_m(options)                   \
+    (                                                             \
+    (options).o_t_version  = 1,                                   \
+    (options).include_vertex_connected = PK_LOGICAL_false         \
+    )
+
+
+/* PK_FACE_check_o_t */
+
+struct PK_FACE_check_o_s
+    {
+    int                  o_t_version;  /* version number of option structure */
+    int                  max_faults;   /* limit on fault numbers (5) */
+    PK_check_geom_t      geom;         /* bad geometry (PK_check_geom_yes_c) */
+    PK_check_bgeom_t     bgeom;        /* bad B geometry (PK_check_bgeom_yes_c) */
+    PK_check_top_geo_t   top_geo;      /* topology/geometry inconsistency */
+    PK_check_size_box_t  size_box;     /* size box violation */
+    PK_check_fa_X_t      fa_X;         /* face self intersection */
+    PK_check_loops_t     loops;        /* loop checks (PK_check_loops_yes_c) */
+    PK_check_nmnl_geom_t nmnl_geom;    /* bad nominal geometry */
+    PK_check_returns_t   returns;      /* return version of fault information */
+    PK_check_attribs_t   attribs;      /* system attribute validity checks */
+    };
+
+typedef struct PK_FACE_check_o_s PK_FACE_check_o_t;
+
+
+
+/* PK_FACE_check_o_m */
+
+#define PK_FACE_check_o_m(options)                          \
+    (                                                       \
+       (options).o_t_version = 3,                           \
+       (options).max_faults  = 5,                           \
+       (options).geom        = PK_check_geom_yes_c,         \
+       (options).bgeom       = PK_check_bgeom_yes_c,        \
+       (options).top_geo     = PK_check_top_geo_yes_c,      \
+       (options).size_box    = PK_check_size_box_yes_c,     \
+       (options).fa_X        = PK_check_fa_X_yes_c,         \
+       (options).loops       = PK_check_loops_yes_c,        \
+       (options).nmnl_geom   = PK_check_nmnl_geom_yes_c,    \
+       (options).returns     = PK_check_returns_0_c,        \
+       (options).attribs     = PK_check_attribs_no_c       \
+    )
+
+
+/* PK_FACE_check_pair_o_t */
+
+struct PK_FACE_check_pair_o_s
+    {
+    int                 o_t_version;   /* version number of option structure */
+    int                 max_faults;    /* limit on fault numbers (1) */
+    };
+
+typedef struct PK_FACE_check_pair_o_s PK_FACE_check_pair_o_t;
+
+
+
+/* PK_FACE_check_pair_o_m */
+
+#define PK_FACE_check_pair_o_m(options)                 \
+    (                                                   \
+       (options).o_t_version = 1,                       \
+       (options).max_faults  = 1                        \
+    )
+
+
+/* PK_FACE_delete_o_t */
+
+struct PK_FACE_delete_o_s
+    {
+    int                   o_t_version;   /* version number of option structure */
+    PK_local_ops_update_t update;        /* update flag */
+    PK_FACE_heal_t        heal_action;   /* how to heal wounds */
+    PK_FACE_heal_loops_t  heal_loops;    /* how to process the loops of */
+    PK_LOGICAL_t          local_check;   /* whether to perform local checking */
+    PK_LOGICAL_t          allow_disjoint;
+    PK_repair_fa_fa_t     repair_fa_fa;  /* whether to repair face-face */
+    };
+typedef struct PK_FACE_delete_o_s PK_FACE_delete_o_t;
+
+
+/* PK_FACE_delete_o_m */
+
+#define PK_FACE_delete_o_m(options)                                 \
+       ((options).o_t_version     = 2,                              \
+        (options).update          = PK_local_ops_update_default_c,  \
+        (options).heal_action     = PK_FACE_heal_shrink_c,          \
+        (options).heal_loops      = PK_FACE_heal_loops_auto_c,      \
+        (options).local_check     = PK_LOGICAL_true,                \
+        (options).allow_disjoint  = PK_LOGICAL_false,               \
+        (options).repair_fa_fa    = PK_repair_fa_fa_no_c            \
+       )
+
+
+/* PK_FACE_delete_from_sheet_o_t */
+
+struct PK_FACE_delete_from_sheet_o_s
+    {
+    int                o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t       allow_disjoint;  /* Whether to allow a disjoint body to */
+    };
+typedef struct PK_FACE_delete_from_sheet_o_s PK_FACE_delete_from_sheet_o_t;
+
+
+/* PK_FACE_delete_from_sheet_o_m */
+
+#define PK_FACE_delete_from_sheet_o_m(opt)  \
+    (                                       \
+    (opt).o_t_version    = 1,               \
+    (opt).allow_disjoint = PK_LOGICAL_false \
+    )
+
+
+/* PK_FACE_delete_blends_o_t */
+
+struct PK_FACE_delete_blends_o_s
+    {
+    int                   o_t_version;   /* version number of option structure */
+    PK_check_fa_fa_t      check_fa_fa;   /* check for face-face inconsistencies */
+    PK_FACE_simplify_t    simplify;      /* whether to simplify the surfaces of */
+    PK_blend_delete_cap_t cap;           /* how to cap blends */
+    PK_blend_delete_cap_data_t
+                          cap_data;      /* definition of caps */
+    PK_local_ops_update_t update;        /* update flag */
+    PK_blend_delete_unders_data_t
+                          unders_data;   /* blend faces with user supplied */
+    };
+typedef struct PK_FACE_delete_blends_o_s PK_FACE_delete_blends_o_t;
+
+
+/* PK_FACE_delete_blends_o_m */
+
+#define PK_FACE_delete_blends_o_m(options)                          \
+       ((options).o_t_version     = 7,                              \
+        (options).check_fa_fa     = PK_check_fa_fa_yes_c,           \
+        (options).simplify        = PK_FACE_simplify_no_c,          \
+        (options).cap             = PK_blend_delete_cap_no_c,       \
+        PK_blend_delete_cap_data_m((options).cap_data),             \
+        (options).update          = PK_local_ops_update_default_c,  \
+        PK_blend_delete_unders_data_m((options).unders_data)        \
+       )
+
+
+/* PK_FACE_delete_facesets_o_t */
+
+struct PK_FACE_delete_facesets_o_s
+    {
+    int            o_t_version;     /* options structure version number */
+    PK_LOGICAL_t   allow_disjoint;  /* allow function to produce disjoint */
+    PK_FACE_heal_t heal_action;     /* healing action (PK_FACE_heal_yes_c) */
+    int            n_details;       /* number of details (0) */
+    PK_detail_t   *details;         /* array of details (NULL) */
+    double         tolerance;       /* tolerance (1.0e-6) */
+    PK_local_ops_update_t
+                   update;          /* update flag */
+    };
+typedef struct PK_FACE_delete_facesets_o_s PK_FACE_delete_facesets_o_t;
+
+
+/* PK_FACE_delete_facesets_o_m */
+
+#define PK_FACE_delete_facesets_o_m(options)                        \
+       ((options).o_t_version     = 3,                              \
+        (options).allow_disjoint  = PK_LOGICAL_false,               \
+        (options).heal_action     = PK_FACE_heal_yes_c,             \
+        (options).n_details       = 0,                              \
+        (options).details         = NULL,                           \
+        (options).tolerance       = 1.0e-6,                         \
+        (options).update          = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_FACE_emboss_o_t */
+
+struct PK_FACE_emboss_o_s
+    {
+    int                        o_t_version; /* version number of options */
+    double                     tolerance;   /* operation tolerance */
+    PK_emboss_convexity_t      convexity;   /* convexity of emboss to be */
+    PK_emboss_profile_on_t     profile_on;  /* where profile lives */
+    PK_emboss_sidewall_data_t  sidewall_data;
+    PK_emboss_overflow_data_t  overflow_data;
+    PK_emboss_unite_sidewall_t unite;       /* whether to unite sidewall faces */
+    PK_local_ops_update_t      update;      /* update flag */
+    };
+typedef struct PK_FACE_emboss_o_s PK_FACE_emboss_o_t;
+
+
+/* PK_FACE_emboss_o_m */
+
+#define PK_FACE_emboss_o_m(options)                                         \
+       ((options).o_t_version       = 3,                                    \
+        (options).tolerance         = 1.0e-5,                               \
+        (options).convexity         = PK_emboss_convexity_both_c,           \
+        (options).profile_on        = PK_emboss_profile_on_any_c,           \
+        PK_emboss_sidewall_data_m((options).sidewall_data),                 \
+        PK_emboss_overflow_data_m((options).overflow_data),                 \
+        (options).unite             = PK_emboss_unite_sidewall_yes_c,       \
+        (options).update            = PK_local_ops_update_default_c         \
+       )
+
+
+/* PK_FACE_find_outer_loop_o_t */
+
+struct PK_FACE_find_outer_loop_o_s
+    {
+    int             o_t_version;             /* version number of option */
+    };
+
+typedef struct PK_FACE_find_outer_loop_o_s PK_FACE_find_outer_loop_o_t;
+
+
+
+/* PK_EDGE_ask_convexity_o_m */
+
+#define PK_FACE_find_outer_loop_o_m(options)                         \
+    (                                                                \
+       (options).o_t_version                = 1                      \
+    )
+
+
+/* PK_FACE_find_interior_vec_o_t */
+
+struct PK_FACE_find_interior_vec_o_s
+    {
+    int         o_t_version;         /* version number of option structure */
+    };
+
+typedef struct PK_FACE_find_interior_vec_o_s PK_FACE_find_interior_vec_o_t;
+
+
+
+/* PK_FACE_find_interior_vec_o_m */
+
+#define PK_FACE_find_interior_vec_o_m(options)                       \
+    (                                                                \
+       (options).o_t_version                = 1                      \
+    )
+
+
+/* PK_FACE_hollow_o_t */
+
+struct PK_FACE_hollow_o_s
+    {
+    int                o_t_version;     /* version number of option structure */
+    PK_check_fa_fa_t   check_fa_fa;     /* check for face-face */
+    PK_LOGICAL_t       pierce_tangent;  /* DEPRECATED (PK_LOGICAL_false) */
+    PK_offset_method_t offset_method;   /* offset method */
+    PK_LOGICAL_t       report_sx;       /* whether to report faces that have */
+    PK_fix_degens_t    fix_degens;      /* control on repairing surface */
+    PK_LOGICAL_t       report_fix_degens;
+    PK_offset_step_t   offset_step;     /* whether to create a step offset */
+    PK_EDGE_offset_blend_t
+                       blend_edges;     /* Offset edges as blend faces */
+    double             blend_radius;    /* Radius of blend faces created if */
+    PK_FACE_grow_t     grow;            /* controls which faces to grow */
+    PK_local_ops_update_t
+                       update;          /* update flag */
+    };
+typedef struct PK_FACE_hollow_o_s PK_FACE_hollow_o_t;
+
+
+/* PK_FACE_hollow_o_m */
+
+#define PK_FACE_hollow_o_m(options)                                   \
+       ((options).o_t_version       = 8,                              \
+        (options).check_fa_fa       = PK_check_fa_fa_yes_c,           \
+        (options).pierce_tangent    = PK_LOGICAL_false,               \
+        (options).offset_method     = PK_offset_method_sx_trim_c,     \
+        (options).fix_degens        = PK_fix_degens_no_c,             \
+        (options).report_sx         = PK_LOGICAL_false,               \
+        (options).report_fix_degens = PK_LOGICAL_false,               \
+        (options).offset_step       = PK_offset_step_no_c,            \
+        (options).blend_edges       = PK_EDGE_offset_blend_no_c,      \
+        (options).blend_radius      = 0.0,                            \
+        (options).grow              = PK_FACE_grow_update_c,          \
+        (options).update            = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_FACE_identify_blends_o_t */
+
+struct PK_FACE_identify_blends_o_s
+    {
+    int                    o_t_version;      /* version number of options */
+    PK_double_constraint_t limit_radii;      /* only return blends with radii */
+    PK_blend_convexity_t   convexity;        /* only blends of the */
+    PK_LOGICAL_t           allow_pi;         /* whether to return blends */
+    double                 tolerance;        /* tolerance (1.0e-6) */
+    PK_LOGICAL_t           want_radii;       /* whether to return the blends */
+    PK_LOGICAL_t           want_convexities; /* whether to return the blends */
+    PK_blend_follow_branch_t
+                           follow_branch;    /* whether to follow all possible */
+    PK_LOGICAL_t           have_propagation_angle;
+    double                 propagation_angle;
+    PK_local_ops_update_t  update;           /* update flag */
+    PK_chain_optimise_t    optimise_chains;  /* how the blend chains are to be */
+    PK_blend_report_blends_t
+                           report_blends;    /* whether to create Parasolid */
+    PK_blend_distant_unders_t
+                           distant_unders;
+    };
+typedef struct PK_FACE_identify_blends_o_s PK_FACE_identify_blends_o_t;
+
+
+/* PK_FACE_identify_blends_o_m */
+
+#define PK_FACE_identify_blends_o_m(options)                                 \
+    (                                                                        \
+        (options).o_t_version                   = 6,                         \
+        (options).limit_radii.comparison        = PK_comparison_always_c,    \
+        (options).limit_radii.interval.value[0] = 0,                         \
+        (options).limit_radii.interval.value[1] = 0,                         \
+        (options).convexity                  = PK_blend_convexity_any_c,     \
+        (options).allow_pi                   = PK_LOGICAL_true,              \
+        (options).tolerance                  = 1.0e-6,                       \
+        (options).want_radii                 = PK_LOGICAL_false,             \
+        (options).want_convexities           = PK_LOGICAL_false,             \
+        (options).follow_branch              = PK_blend_follow_branch_yes_c, \
+        (options).have_propagation_angle     = PK_LOGICAL_false,             \
+        (options).propagation_angle          = 0.0,                          \
+        (options).update                     = PK_local_ops_update_default_c,\
+        (options).optimise_chains            = PK_chain_optimise_none_c,     \
+        (options).report_blends              = PK_blend_report_blends_no_c,  \
+        (options).distant_unders             = PK_blend_distant_unders_no_c  \
+    )
+
+
+/* PK_FACE_identify_blends_r_t */
+
+struct PK_FACE_identify_blends_r_s
+    {
+    int                     n_blend_facesets;    /* number of blend facesets */
+    PK_FACE_array_t        *blend_facesets;      /* faces classified as blends */
+    double                 *blend_radii;         /* radii of blend facesets */
+    PK_blend_convexity_t   *blend_convexities;   /* convexities of blend */
+    };
+typedef struct PK_FACE_identify_blends_r_s PK_FACE_identify_blends_r_t;
+
+
+/* PK_FACE_find_blend_unders_o_t */
+
+
+struct PK_FACE_find_blend_unders_o_s
+    {
+    int                     o_t_version;     /* version number of options */
+    double                  tolerance;       /* tolerance (1e-6) */
+    PK_local_ops_update_t   update;          /* update flag */
+    };
+typedef struct PK_FACE_find_blend_unders_o_s PK_FACE_find_blend_unders_o_t;
+
+
+
+
+
+
+
+/* PK_FACE_find_blend_unders_o_m */
+
+#define PK_FACE_find_blend_unders_o_m(options)                               \
+    (                                                                        \
+        (options).o_t_version                   = 2,                         \
+        (options).tolerance                     = 1.0e-6,                    \
+        (options).update                     = PK_local_ops_update_default_c \
+    )
+
+
+/* PK_FACE_find_blend_unders_r_t */
+
+struct PK_FACE_find_blend_unders_r_s
+    {
+    int                     n_unders;    /* number of underlying */
+    PK_FACE_array_t        *unders;      /* sets of faces underlying */
+    };
+typedef struct PK_FACE_find_blend_unders_r_s PK_FACE_find_blend_unders_r_t;
+
+
+/* PK_FACE_identify_blends_4_m */
+
+#define PK_FACE_identify_blends_4_m(options)                                 \
+    (                                                                        \
+        (options).o_t_version                   = 4,                         \
+        (options).limit_radii.comparison        = PK_comparison_always_c,    \
+        (options).limit_radii.interval.value[0] = 0,                         \
+        (options).limit_radii.interval.value[1] = 0,                         \
+        (options).convexity                  = PK_blend_convexity_any_c,     \
+        (options).allow_pi                   = PK_LOGICAL_true,              \
+        (options).tolerance                  = 1.0e-6,                       \
+        (options).want_radii                 = PK_LOGICAL_false,             \
+        (options).want_convexities           = PK_LOGICAL_false,             \
+        (options).follow_branch              = PK_blend_follow_branch_yes_c, \
+        (options).have_propagation_angle     = PK_LOGICAL_false,             \
+        (options).propagation_angle          = 0.0,                          \
+        (options).update                     = PK_local_ops_update_default_c \
+    )
+
+
+/* PK_FACE_identify_blends_5_m */
+
+#define PK_FACE_identify_blends_5_m(options)                                 \
+    (                                                                        \
+        (options).o_t_version                   = 5,                         \
+        (options).limit_radii.comparison        = PK_comparison_always_c,    \
+        (options).limit_radii.interval.value[0] = 0,                         \
+        (options).limit_radii.interval.value[1] = 0,                         \
+        (options).convexity                  = PK_blend_convexity_any_c,     \
+        (options).allow_pi                   = PK_LOGICAL_true,              \
+        (options).tolerance                  = 1.0e-6,                       \
+        (options).want_radii                 = PK_LOGICAL_false,             \
+        (options).want_convexities           = PK_LOGICAL_false,             \
+        (options).follow_branch              = PK_blend_follow_branch_yes_c, \
+        (options).have_propagation_angle     = PK_LOGICAL_false,             \
+        (options).propagation_angle          = 0.0,                          \
+        (options).update                     = PK_local_ops_update_default_c,\
+        (options).optimise_chains            = PK_chain_optimise_none_c      \
+    )
+
+
+/* PK_FACE_imprint_cus_normal_o_t */
+
+struct PK_FACE_imprint_cus_normal_o_s
+    {
+     int           o_t_version;              /* version number */
+     PK_imprint_complete_t
+                   imprint_complete;         /* whether to complete imprint */
+     PK_imprint_tracking_t
+                   tracking_type;            /* format of returned tracking */
+     PK_imprint_proj_dist_t
+                   use_max_projection_dist;  /* whether and how to limit */
+     double        max_projection_dist;      /* (0.0) */
+     PK_LOGICAL_t  imprint_coi_exactly;      /* whether to imprint curves */
+     PK_continuity_t
+                   preferred_continuity;     /* level of continuity to impose */
+
+    };
+typedef struct PK_FACE_imprint_cus_normal_o_s PK_FACE_imprint_cus_normal_o_t;
+
+
+
+/* PK_FACE_imprint_cus_normal_o_m */
+
+#define PK_FACE_imprint_cus_normal_o_m(options)                         \
+    (                                                                   \
+       (options).o_t_version             = 6,                           \
+       (options).imprint_complete        = PK_imprint_complete_no_c,    \
+       (options).tracking_type           = PK_imprint_tracking_basic_c, \
+       (options).use_max_projection_dist = PK_imprint_proj_dist_no_c,   \
+       (options).max_projection_dist     = 0.0,                         \
+       (options).imprint_coi_exactly     = PK_LOGICAL_false,            \
+       (options).preferred_continuity    = PK_continuity_g1_c           \
+    )
+
+
+/* PK_FACE_imprint_cus_vector_o_t */
+
+struct PK_FACE_imprint_cus_vector_o_s
+    {
+     int                 o_t_version;   /* version number of option structure */
+    };
+typedef struct PK_FACE_imprint_cus_vector_o_s PK_FACE_imprint_cus_vector_o_t;
+
+
+
+/* PK_FACE_imprint_cus_vector_o_m */
+
+#define PK_FACE_imprint_cus_vector_o_m(options)                      \
+    (                                                                \
+       (options).o_t_version           = 1                           \
+    )
+
+
+/* PK_FACE_imprint_cus_vec_o_t */
+
+struct PK_FACE_imprint_cus_vec_o_s
+    {
+    int                      o_t_version;    /* version number of option */
+    PK_imprint_connect_t     connect;        /* How to connect disjoint */
+    PK_imprint_face_hidden_t hidden;         /* How imprint is affected by */
+    PK_imprint_complete_t    imprint_complete;
+    PK_LOGICAL_t             imprint_coi_exactly;
+    PK_LOGICAL_t             imprint_exactly;
+    PK_LOGICAL_t             bidirectional;  /* whether to imprint curves */
+    PK_imprint_intersect_t   process_intersections;
+    };
+typedef struct PK_FACE_imprint_cus_vec_o_s PK_FACE_imprint_cus_vec_o_t;
+
+
+
+/* PK_FACE_imprint_cus_vec_o_m */
+
+#define PK_FACE_imprint_cus_vec_o_m(options)                           \
+    (                                                                  \
+       (options).o_t_version           = 5,                            \
+       (options).connect               = PK_imprint_connect_none_c,    \
+       (options).hidden                = PK_imprint_face_hidden_body_c,\
+       (options).imprint_complete      = PK_imprint_complete_no_c,     \
+       (options).imprint_coi_exactly   = PK_LOGICAL_false,             \
+       (options).imprint_exactly       = PK_LOGICAL_false,             \
+       (options).bidirectional         = PK_LOGICAL_false,             \
+       (options).process_intersections = PK_imprint_intersect_update_c \
+    )
+
+
+/* PK_FACE_tracking_r_t */
+
+struct PK_FACE_tracking_r_s
+    {
+    PK_FACE_t   original_face;
+    int         n_times_instanced;
+    PK_FACE_t  *instanced_faces;
+    int        *instance_index;
+    };
+typedef struct PK_FACE_tracking_r_s PK_FACE_tracking_r_t;
+
+
+
+/* PK_FACE_inst_tools_r_t */
+
+struct PK_FACE_inst_tools_r_s
+    {
+    int                     n_instances;
+    int                    *instance_indices;
+    int                     n_tracked_faces;
+    PK_FACE_tracking_r_t   *tracked_faces;
+    };
+typedef struct PK_FACE_inst_tools_r_s PK_FACE_inst_tools_r_t;
+
+
+
+/* PK_FACE_intersect_face_o_t */
+
+struct PK_FACE_intersect_face_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    PK_LOGICAL_t    have_uvbox_1;    /* whether box provided for face_1 */
+    PK_UVBOX_t      uvbox_1;         /* uvbox for face_1 */
+    PK_LOGICAL_t    have_uvbox_2;    /* whether box provided for face_2 */
+    PK_UVBOX_t      uvbox_2;         /* uvbox for face_2 */
+    PK_LOGICAL_t    have_vector;     /* whether seed vector provided */
+    PK_VECTOR_t     vector;          /* only return branch containing the seed */
+    };
+
+typedef struct PK_FACE_intersect_face_o_s PK_FACE_intersect_face_o_t;
+
+
+
+/* PK_FACE_intersect_face_o_m */
+
+#define PK_FACE_intersect_face_o_m(options)                   \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0,                 \
+       (options).have_uvbox_1          = PK_LOGICAL_false,    \
+       (options).uvbox_1.param[0]      = 0.0,                 \
+       (options).uvbox_1.param[1]      = 0.0,                 \
+       (options).uvbox_1.param[2]      = 0.0,                 \
+       (options).uvbox_1.param[3]      = 0.0,                 \
+       (options).have_uvbox_2          = PK_LOGICAL_false,    \
+       (options).uvbox_2.param[0]      = 0.0,                 \
+       (options).uvbox_2.param[1]      = 0.0,                 \
+       (options).uvbox_2.param[2]      = 0.0,                 \
+       (options).uvbox_2.param[3]      = 0.0,                 \
+       (options).have_vector           = PK_LOGICAL_false,    \
+       (options).vector.coord[0]       = 0.0,                 \
+       (options).vector.coord[1]       = 0.0,                 \
+       (options).vector.coord[2]       = 0.0                  \
+    )
+
+
+/* PK_FACE_intersect_surf_o_t */
+
+struct PK_FACE_intersect_surf_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    PK_LOGICAL_t    have_uvbox_1;    /* whether box provided for face */
+    PK_UVBOX_t      uvbox_1;         /* uvbox for face */
+    PK_LOGICAL_t    have_uvbox_2;    /* whether box provided for surf */
+    PK_UVBOX_t      uvbox_2;         /* uvbox for surf */
+    PK_LOGICAL_t    have_vector;     /* whether seed vector provided */
+    PK_VECTOR_t     vector;          /* only return branch containing the seed */
+    };
+
+typedef struct PK_FACE_intersect_surf_o_s PK_FACE_intersect_surf_o_t;
+
+
+
+/* PK_FACE_intersect_surf_o_m */
+
+#define PK_FACE_intersect_surf_o_m(options)                   \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0,                 \
+       (options).have_uvbox_1          = PK_LOGICAL_false,    \
+       (options).uvbox_1.param[0]      = 0.0,                 \
+       (options).uvbox_1.param[1]      = 0.0,                 \
+       (options).uvbox_1.param[2]      = 0.0,                 \
+       (options).uvbox_1.param[3]      = 0.0,                 \
+       (options).have_uvbox_2          = PK_LOGICAL_false,    \
+       (options).uvbox_2.param[0]      = 0.0,                 \
+       (options).uvbox_2.param[1]      = 0.0,                 \
+       (options).uvbox_2.param[2]      = 0.0,                 \
+       (options).uvbox_2.param[3]      = 0.0,                 \
+       (options).have_vector           = PK_LOGICAL_false,    \
+       (options).vector.coord[0]       = 0.0,                 \
+       (options).vector.coord[1]       = 0.0,                 \
+       (options).vector.coord[2]       = 0.0                  \
+    )
+
+
+/* PK_FACE_is_coincident_o_t */
+
+struct PK_FACE_is_coincident_o_s
+    {
+    int             o_t_version;
+    PK_TRANSF_t     transf1;     /* transform applied to face1 */
+    PK_TRANSF_t     transf2;     /* transform applied to face2 */
+    };
+
+typedef struct PK_FACE_is_coincident_o_s PK_FACE_is_coincident_o_t;
+
+
+
+
+/* PK_FACE_is_coincident_o_m */
+
+#define PK_FACE_is_coincident_o_m(options) \
+    (                                   \
+       (options).o_t_version = 2,        \
+       (options).transf1 = PK_ENTITY_null,        \
+       (options).transf2 = PK_ENTITY_null        \
+    )
+
+
+/* PK_FACE_make_3_face_blend_r_t */
+
+struct PK_FACE_make_3_face_blend_r_s
+    {
+    PK_3_face_blend_t       status;        /* blend status */
+    PK_blend_orientation_t  left_orientation;
+    PK_blend_orientation_t  right_orientation;
+    PK_blend_orientation_t  centre_orientation;
+    int                     n_sheets;      /* number of sheets */
+    PK_TOPOL_t             *sheets;        /* associated sheets */
+    int                     n_topols;      /* number of topols */
+    PK_TOPOL_t             *topols;        /* error topology */
+    int                     n_points;      /* number of points */
+    PK_VECTOR_t            *points;        /* error points */
+    int                     n_dists;       /* number of lengths */
+    double                 *dists;         /* error lengths */
+    };
+typedef struct PK_FACE_make_3_face_blend_r_s PK_FACE_make_3_face_blend_r_t;
+
+
+
+/* PK_FACE_make_3_face_blend_o_t */
+
+struct PK_FACE_make_3_face_blend_o_s
+    {
+    int                     o_t_version;    /* version number of options */
+    double                  blend_tolerance;
+    PK_LOGICAL_t            have_propagation_tolerance;
+    double                  propagation_tolerance;
+    PK_blend_propagate_t    propagate;      /* whether to propagate */
+    PK_blend_orientation_t  left_orientation;
+    PK_blend_orientation_t  right_orientation;
+    PK_blend_orientation_t  centre_orientation;
+    PK_blend_trim_t         trim;           /* blend trimming option */
+    PK_blend_walls_t        walls;          /* wall trimming option */
+    PK_blend_repair_fa_X_t  repair_fa_X;    /* whether to attempt to repair */
+    PK_blend_xs_plane_t     xsection;       /* cross section shape */
+    PK_PARTITION_t          partition;      /* a partition */
+    int                     n_limits;       /* number of limit entities (0) */
+    const PK_ENTITY_t      *limits;         /* entities limiting the blend */
+    int                     n_caps;         /* number of caps (0) */
+    const PK_ENTITY_t      *caps;           /* entities for capping */
+    const PK_LOGICAL_t     *reverse_cap;    /* whether cap orientation */
+    PK_blend_update_t       update;         /* disable changes for updates */
+    PK_blend_check_fa_fa_t  check_fa_fa;    /* check for face-face */
+    PK_blend_track_edges_t  track_edges;    /* whether to provide laminar */
+    PK_blend_trim_extent_t  trim_extent;    /* additional controls upon */
+    PK_LOGICAL_t            have_help_point;
+    PK_VECTOR_t             help_point;     /* help point */
+
+    };
+
+typedef struct PK_FACE_make_3_face_blend_o_s PK_FACE_make_3_face_blend_o_t;
+
+
+
+/* PK_FACE_make_3_face_blend_o_m */
+
+#define PK_FACE_make_3_face_blend_o_m(options)                                \
+    (                                                                         \
+       (options).o_t_version                = 11,                             \
+       (options).blend_tolerance            = 1.0e-05,                        \
+       (options).have_propagation_tolerance = PK_LOGICAL_true,                \
+       (options).propagation_tolerance      = 0.05,                           \
+       (options).propagate                  = PK_blend_propagate_yes_c,       \
+       (options).left_orientation           = PK_blend_orientation_unknown_c, \
+       (options).right_orientation          = PK_blend_orientation_unknown_c, \
+       (options).centre_orientation         = PK_blend_orientation_unknown_c, \
+       (options).trim                       = PK_blend_trim_to_walls_c,       \
+       (options).walls                      = PK_blend_walls_attach_c,        \
+       (options).repair_fa_X                = PK_blend_repair_fa_X_no_c,      \
+       (options).xsection                   = PK_blend_xs_disc_c,             \
+       (options).partition                  = PK_PARTITION_null,              \
+       (options).n_limits                   = 0,                              \
+       (options).limits                     = NULL,                           \
+       (options).n_caps                     = 0,                              \
+       (options).caps                       = NULL,                           \
+       (options).reverse_cap                = NULL,                           \
+       (options).update                     = PK_blend_update_default_c,      \
+       (options).check_fa_fa                = PK_blend_check_fa_fa_yes_c,     \
+       (options).track_edges                = PK_blend_track_edges_no_c,      \
+       (options).trim_extent                = PK_blend_trim_extent_all_c,     \
+       (options).have_help_point            = PK_LOGICAL_false,               \
+       (options).help_point.coord[0]        = 0.0,                            \
+       (options).help_point.coord[1]        = 0.0,                            \
+       (options).help_point.coord[2]        = 0.0                             \
+    )
+
+
+/* PK_FACE_make_blend_o_t */
+
+struct PK_FACE_make_blend_o_s
+    {
+    int                      o_t_version;   /* version number of options */
+    PK_blend_trim_t          trim;          /* blend trimming option */
+    PK_blend_walls_t         walls;         /* wall trimming option */
+    PK_blend_shape_t         shape;         /* shape of blend */
+    PK_blend_constraint_t    constraints;   /* constraints on blend */
+    PK_blend_rib_control_t   rib_control;   /* blend section requests */
+    double                   tolerance;     /* tolerance (1.0e-05) */
+    PK_LOGICAL_t             have_help_point;
+    PK_VECTOR_t              help_point;    /* help point */
+    PK_LOGICAL_t             multiple;      /* create multiple blend sheets */
+    PK_blend_propagate_t     propagate;     /* whether to propagate */
+    PK_LOGICAL_t             notch;         /* enable blends to notch */
+    PK_LOGICAL_t             local_check;   /* whether local checks required */
+    PK_blend_local_check_t   checks;        /* which local checks to perform */
+    PK_blend_update_t        update;        /* disable changes for updates */
+    PK_SURF_t                user_surface;  /* user supplied blend surface */
+    PK_blend_repair_su_X_t   repair_su_X;   /* whether to attempt to repair */
+    PK_blend_inside_tight_t  inside_tight;  /* blend on the inside of tightly */
+    PK_LOGICAL_t             have_propagation_angle;
+    double                   propagation_angle;
+    PK_blend_repair_fa_X_t   repair_fa_X;   /* whether to attempt to repair */
+    PK_PARTITION_t           partition;     /*  a partition */
+    PK_blend_prevent_sharp_t prevent_sharp; /* whether to attempt to prevent */
+    PK_blend_track_edges_t   track_edges;   /* whether to provide laminar */
+    PK_blend_tolerance_t     improve_tolerance;
+    PK_blend_run_out_t       run_out;       /* whether to stop the blend when */
+    double                   run_out_angle; /* the angle of normals used for */
+    PK_blend_report_repaired_t
+                             report;        /* whether to report any repaired */
+
+    PK_extension_shape_t     extension_shape;
+    PK_blend_use_master_faces_t
+                             master_faces;
+
+    PK_imprint_complete_t    imprint_complete;
+    };
+
+typedef struct PK_FACE_make_blend_o_s PK_FACE_make_blend_o_t;
+
+
+
+/* PK_FACE_make_blend_o_m */
+
+#define PK_FACE_make_blend_o_m(options)                                 \
+    (                                                                   \
+       (options).o_t_version          = 24,                             \
+       (options).trim                 = PK_blend_trim_to_walls_c,       \
+       (options).walls                = PK_blend_walls_attach_c,        \
+       PK_blend_shape_m((options).shape),                               \
+       PK_blend_constraint_m((options).constraints),                    \
+       (options).tolerance            = 1.0e-05,                        \
+       (options).have_help_point      = PK_LOGICAL_false,               \
+       (options).help_point.coord[0]  = 0.0,                            \
+       (options).help_point.coord[1]  = 0.0,                            \
+       (options).help_point.coord[2]  = 0.0,                            \
+       (options).multiple             = PK_LOGICAL_false,               \
+       (options).propagate            = PK_blend_propagate_no_c,        \
+       (options).notch                = PK_LOGICAL_false,               \
+       (options).local_check          = PK_LOGICAL_false,               \
+       PK_blend_rib_control_m((options).rib_control),                   \
+       PK_blend_local_check_m((options).checks),                        \
+       (options).update               = PK_blend_update_default_c,      \
+       (options).user_surface         = PK_ENTITY_null,                 \
+       (options).repair_su_X          = PK_blend_repair_su_X_no_c,      \
+       (options).inside_tight         = PK_blend_inside_tight_no_c,     \
+       (options).have_propagation_angle = PK_LOGICAL_false,             \
+       (options).propagation_angle    = 0.0,                            \
+       (options).repair_fa_X          = PK_blend_repair_fa_X_no_c,      \
+       (options).partition            = PK_PARTITION_null,              \
+       (options).prevent_sharp        = PK_blend_prevent_sharp_no_c,    \
+       (options).track_edges          = PK_blend_track_edges_no_c,      \
+       (options).improve_tolerance    = PK_blend_tolerance_standard_c,  \
+       (options).run_out              = PK_blend_run_out_no_c,          \
+       (options).run_out_angle        = 0.1,                            \
+       (options).report               = PK_blend_report_repaired_no_c,  \
+       (options).extension_shape      = PK_extension_shape_linear_c,    \
+       (options).master_faces         = PK_blend_use_master_faces_yes_c,\
+       (options).imprint_complete     = PK_imprint_complete_no_c        \
+    )
+
+
+/* PK_FACE_imprint_cus_isoclin_o_t */
+
+struct PK_FACE_imprint_cus_isoclin_o_s
+    {
+    int            o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t   old_iso;         /* whether former isocline curves are */
+    PK_LOGICAL_t   all_points;      /* whether curves using all the control */
+    PK_LOGICAL_t   want_ret_faces;  /* whether returned faces are required */
+    PK_LOGICAL_t   want_is_steep;   /* whether steepness data are required */
+    PK_LOGICAL_t   want_new_edges;  /* whether new edges are required */
+    };
+typedef struct PK_FACE_imprint_cus_isoclin_o_s PK_FACE_imprint_cus_isoclin_o_t;
+
+
+/* PK_FACE_imprint_cus_isoclin_o_m */
+
+#define PK_FACE_imprint_cus_isoclin_o_m(options)             \
+    (                                                        \
+        (options).o_t_version     = 1,                       \
+        (options).old_iso         = PK_LOGICAL_false,        \
+        (options).all_points      = PK_LOGICAL_true,         \
+        (options).want_ret_faces  = PK_LOGICAL_true,         \
+        (options).want_is_steep   = PK_LOGICAL_true,         \
+        (options).want_new_edges  = PK_LOGICAL_true          \
+    )
+
+
+/* PK_FACE_taper_o_t */
+
+struct PK_FACE_taper_o_s
+    {
+    int                     o_t_version;    /* version number of option */
+    PK_LOGICAL_t            merge_face;     /* whether tapered faces are to */
+    PK_check_fa_fa_t        check_fa_fa;    /* check for face-face */
+    PK_EDGE_array_t         tapered_edges;  /* tapered step edges */
+    PK_EDGE_array_t         normal_edges;   /* normal step edges */
+    PK_taper_method_t       method;         /* main face taper method */
+    double                  offset;         /* offset value (0.0) */
+    PK_SURF_t               top_surface;    /* top surface (PK_ENTITY_null) */
+    PK_taper_smooth_step_t  taper_smooth_step;
+    PK_taper_step_face_t    taper_step_face;
+    int                     n_faces;        /* number of faces, which are */
+    const PK_FACE_t        *taper_faces;    /* faces which are tapered with */
+    const double           *angles;         /* different taper angles. Size */
+    PK_taper_laminar_edge_t position;       /* defines to how process */
+    PK_FACE_grow_t          grow;           /* controls which faces to grow */
+    PK_local_ops_update_t   update;         /* update flag */
+    int                     n_parting_edges;
+    const PK_ENTITY_t      *parting_edges;  /* parting body step edges (NULL) */
+    PK_BODY_t               parting_body;   /* parting body (PK_ENTITY_null) */
+    };
+typedef struct PK_FACE_taper_o_s PK_FACE_taper_o_t;
+
+
+/* PK_FACE_taper_o_m */
+
+#define PK_FACE_taper_o_m(options)                                       \
+       ((options).o_t_version          = 10,                             \
+        (options).merge_face           = PK_LOGICAL_true,                \
+        (options).check_fa_fa          = PK_check_fa_fa_yes_c,           \
+        (options).tapered_edges.length = 0,                              \
+        (options).tapered_edges.array  = NULL,                           \
+        (options).normal_edges.length  = 0,                              \
+        (options).normal_edges.array   = NULL,                           \
+        (options).method               = PK_taper_method_isocline_c,     \
+        (options).offset               = 0.0,                            \
+        (options).top_surface          = PK_ENTITY_null,                 \
+        (options).taper_smooth_step    = PK_taper_smooth_step_no_c,      \
+        (options).taper_step_face      = PK_taper_step_face_no_c,        \
+        (options).n_faces              = 0,                              \
+        (options).taper_faces          = NULL,                           \
+        (options).angles               = NULL,                           \
+        (options).position             = PK_taper_laminar_edge_normal_c, \
+        (options).grow                 = PK_FACE_grow_update_c,          \
+        (options).update               = PK_local_ops_update_default_c,  \
+        (options).n_parting_edges      = 0,                              \
+        (options).parting_edges        = NULL,                           \
+        (options).parting_body         = PK_ENTITY_null                  \
+       )
+
+
+/* PK_FACE_offset_o_t */
+
+struct PK_FACE_offset_o_s
+    {
+    int                o_t_version;      /* version number of option structure */
+    PK_LOGICAL_t       allow_disjoint;   /* whether disjoint body can be */
+    PK_check_fa_fa_t   check_fa_fa;      /* check for face-face inconsistencies */
+    PK_offset_method_t offset_method;    /* offset method */
+    PK_LOGICAL_t       report_sx;        /* whether to report faces that have */
+    PK_fix_degens_t    fix_degens;       /* control on repairing surface */
+    PK_LOGICAL_t       report_fix_degens;
+    PK_offset_step_t   offset_step;      /* whether to create a step offset */
+    PK_LOGICAL_t       ortho_vx_split;   /* Split laminar vertices during */
+    PK_offset_track_del_t
+                       track_del;        /* How to track deleted faces */
+    PK_EDGE_offset_blend_t
+                       blend_edges;      /* Offset edges as blend faces */
+    double             blend_radius;     /* Radius of blend faces created if */
+    PK_FACE_grow_t     grow;             /* controls which faces to grow */
+    PK_VERTEX_limit_t  vertex_limit;     /* How to constrain the maximum */
+    PK_EDGE_limit_t    edge_limit;       /* How to constrain the maximum */
+    PK_local_ops_update_t
+                       update;           /* update flag */
+    };
+typedef struct PK_FACE_offset_o_s PK_FACE_offset_o_t;
+
+
+/* PK_FACE_offset_o_m */
+
+#define PK_FACE_offset_o_m(options)                                   \
+       ((options).o_t_version       = 11,                             \
+        (options).allow_disjoint    = PK_LOGICAL_false,               \
+        (options).check_fa_fa       = PK_check_fa_fa_yes_c,           \
+        (options).offset_method     = PK_offset_method_sx_trim_c,     \
+        (options).report_sx         = PK_LOGICAL_false,               \
+        (options).fix_degens        = PK_fix_degens_no_c,             \
+        (options).report_fix_degens = PK_LOGICAL_false,               \
+        (options).offset_step       = PK_offset_step_no_c,            \
+        (options).ortho_vx_split    = PK_LOGICAL_false,               \
+        (options).track_del         = PK_offset_track_del_no_c,       \
+        (options).blend_edges       = PK_EDGE_offset_blend_no_c,      \
+        (options).blend_radius      = 0.0,                            \
+        (options).grow              = PK_FACE_grow_update_c,          \
+        (options).vertex_limit      = PK_VERTEX_limit_no_c,           \
+        (options).edge_limit        = PK_EDGE_limit_no_c,             \
+        (options).update            = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_FACE_output_surf_trimmed_o_t */
+
+struct PK_FACE_output_surf_trimmed_o_s
+    {
+    int                    o_t_version;      /* option structure version */
+    PK_FACE_trim_surf_t    trim_surf;        /* what surface to use */
+    PK_LOGICAL_t           cubic;            /* bsurf to be cubic */
+    PK_LOGICAL_t           non_rational;     /* bsurf to be non-rational */
+    double                 surf_tolerance;   /* tolerance for creating bsurf */
+    PK_LOGICAL_t           extend_surf;      /* is surface extension allowed */
+    PK_FACE_trim_confine_t confine;          /* confinement */
+    double                 curve_tolerance;  /* tolerance for creating spcurves */
+    PK_FACE_trim_degen_t   degen;            /* in/exclude degeneracies */
+    PK_LOGICAL_t           want_geoms;       /* whether geometry required */
+    PK_LOGICAL_t           want_topols;      /* whether topology required */
+    };
+
+typedef struct PK_FACE_output_surf_trimmed_o_s
+               PK_FACE_output_surf_trimmed_o_t;
+
+
+
+/* PK_FACE_output_surf_trimmed_o_m */
+
+#define PK_FACE_output_surf_trimmed_o_m(options)                   \
+    (                                                              \
+       (options).o_t_version     = 1,                              \
+       (options).trim_surf       = PK_FACE_trim_surf_own_c,        \
+       (options).cubic           = PK_LOGICAL_false,               \
+       (options).non_rational    = PK_LOGICAL_false,               \
+       (options).surf_tolerance  = 0.00001,                        \
+       (options).extend_surf     = PK_LOGICAL_true,                \
+       (options).confine         = PK_FACE_trim_confine_closed_c,  \
+       (options).curve_tolerance = 0.0001,                         \
+       (options).degen           = PK_FACE_trim_degen_no_c,        \
+       (options).want_geoms      = PK_LOGICAL_false,               \
+       (options).want_topols     = PK_LOGICAL_false                \
+    )
+
+
+/* PK_pattern_face_map_t */
+
+struct PK_pattern_face_map_s
+    {
+    int                      n_loops;        /* number of boundary loops which */
+    const PK_LOOP_t         *base_loops;     /* boundary loops defining the */
+    const PK_FACE_t         *target_faces;   /* For each boundary loop, the */
+    };
+typedef struct PK_pattern_face_map_s PK_pattern_face_map_t;
+
+
+/* PK_pattern_face_map_m */
+
+#define PK_pattern_face_map_m(map)                                  \
+      ((map).n_loops               = 0,                             \
+       (map).base_loops            = NULL,                          \
+       (map).target_faces          = NULL                           \
+      )
+
+
+/* PK_FACE_pattern_o_t */
+
+struct PK_FACE_pattern_o_s
+    {
+    int                       o_t_version;   /* version number */
+    PK_pattern_check_loops_t  check_loops;   /* (PK_pattern_check_loops_no_c) */
+    PK_pattern_check_fa_fa_t  check_fa_fa;   /* (PK_pattern_check_fa_fa_no_c) */
+    PK_pattern_same_face_t    same_face;     /* (PK_pattern_same_face_yes_c) */
+    PK_pattern_coi_face_t     coi_face;      /* (PK_pattern_coi_face_yes_c) */
+    PK_pattern_reblend_t      reblend;       /* (PK_pattern_reblend_no_c) */
+    PK_pattern_face_map_t    *face_maps;     /* array of face maps for pattern */
+    PK_pattern_collision_t    collision;     /* whether to output errors */
+    };
+typedef struct PK_FACE_pattern_o_s PK_FACE_pattern_o_t;
+
+
+
+/* PK_FACE_pattern_o_m */
+
+
+#define PK_FACE_pattern_o_m(options)                                \
+       ((options).o_t_version      = 6,                             \
+        (options).check_loops      = PK_pattern_check_loops_no_c,   \
+        (options).check_fa_fa      = PK_pattern_check_fa_fa_no_c,   \
+        (options).same_face        = PK_pattern_same_face_yes_c,    \
+        (options).coi_face         = PK_pattern_coi_face_yes_c,     \
+        (options).reblend          = PK_pattern_reblend_no_c,       \
+        (options).face_maps        = NULL,                          \
+        (options).collision        = PK_pattern_collision_no_c      \
+       )
+
+
+/* PK_FACE_pattern_data_r_t */
+
+struct PK_FACE_pattern_data_r_s
+    {
+    PK_pattern_status_t        status;
+    int                        n_pattern_faces;
+    PK_FACE_t                 *pattern_faces;
+    int                        n_error_topols;
+    PK_TOPOL_t                *error_topols;
+    };
+typedef struct PK_FACE_pattern_data_r_s PK_FACE_pattern_data_r_t;
+
+
+
+/* PK_FACE_pattern_r_t */
+
+struct PK_FACE_pattern_r_s
+    {
+    PK_pattern_result_t        result;
+    int                        n_patterns;
+    PK_FACE_pattern_data_r_t  *patterns;
+    int                        n_error_topols;
+    PK_TOPOL_t                *error_topols;
+    };
+typedef struct PK_FACE_pattern_r_s PK_FACE_pattern_r_t;
+
+
+
+/* PK_replace_edge_data_t */
+
+struct PK_replace_edge_data_s
+    {
+    int                          n_edges;  /* number of edges (0) */
+    const PK_EDGE_t               *edges;  /* edges to have curves replaced */
+    const PK_CURVE_t             *curves;  /* replacement curves (NULL) */
+    const double             *tolerances;  /* desired edge tolerances (NULL) */
+    PK_replace_use_t         replace_use;  /* whether new geometry may be */
+    };
+
+typedef struct PK_replace_edge_data_s PK_replace_edge_data_t;
+
+
+
+/* PK_replace_edge_data_m */
+
+#define PK_replace_edge_data_m(edge_data)                         \
+      ((edge_data).n_edges        = 0,                            \
+       (edge_data).edges          = NULL,                         \
+       (edge_data).curves         = NULL,                         \
+       (edge_data).tolerances     = NULL,                         \
+       (edge_data).replace_use    = PK_replace_use_attempt_c      \
+      )
+
+
+/* PK_change_edge_geom_data_t */
+
+struct PK_change_edge_geom_data_s
+    {
+    int                     n_edge_arrays;  /* number of arrays of edges with */
+    const PK_EDGE_array_t  *edge_arrays;    /* arrays of edges for which the */
+    const PK_ENTITY_t      *entities;       /* array containing the entity to */
+    const PK_LOGICAL_t     *reversals;      /* array of logicals indicating */
+    const double           *offsets;        /* array of signed distances by */
+    const PK_TRANSF_t      *transforms;     /* array of transforms to be */
+    const double           *tolerances;     /* array of tolerances desired for */
+    const PK_replace_use_t *replace_uses;   /* array of controls on how the */
+    };
+
+typedef struct PK_change_edge_geom_data_s PK_change_edge_geom_data_t;
+
+
+
+/* PK_change_edge_geom_data_m */
+
+#define PK_change_edge_geom_data_m(edge_geom_data)                       \
+      ((edge_geom_data).n_edge_arrays        = 0,                        \
+       (edge_geom_data).edge_arrays          = NULL,                     \
+       (edge_geom_data).entities             = NULL,                     \
+       (edge_geom_data).reversals            = NULL,                     \
+       (edge_geom_data).offsets              = NULL,                     \
+       (edge_geom_data).transforms           = NULL,                     \
+       (edge_geom_data).tolerances           = NULL,                     \
+       (edge_geom_data).replace_uses         = NULL                      \
+      )
+
+
+/* PK_replace_vertex_data_t */
+
+struct PK_replace_vertex_data_s
+    {
+    int                n_vertices;    /* number of vertices (0) */
+    const PK_VERTEX_t *vertices;      /* vertices to have positions */
+    const PK_VECTOR_t *positions;     /* vertices replacement positions (NULL) */
+    const double      *tolerances;    /* desired vertex tolerances (NULL) */
+    };
+
+typedef struct PK_replace_vertex_data_s PK_replace_vertex_data_t;
+
+
+
+/* PK_replace_vertex_data_m */
+
+#define PK_replace_vertex_data_m(vertex_data)                       \
+      ((vertex_data).n_vertices     = 0,                            \
+       (vertex_data).vertices       = NULL,                         \
+       (vertex_data).positions      = NULL,                         \
+       (vertex_data).tolerances     = NULL                          \
+      )
+
+
+/* PK_replace_help_points_t */
+
+struct PK_replace_help_points_s
+    {
+    int                n_topologies;  /* number of topologies (0) */
+    const PK_TOPOL_t  *topologies;    /* topologies needing help points (NULL) */
+    const PK_VECTOR_t *positions;     /* help point positions (NULL) */
+    };
+
+typedef struct PK_replace_help_points_s PK_replace_help_points_t;
+
+
+
+/* PK_replace_help_points_m */
+
+#define PK_replace_help_points_m(help_points)                       \
+      ((help_points).n_topologies   = 0,                            \
+       (help_points).topologies     = NULL,                         \
+       (help_points).positions      = NULL                          \
+      )
+
+
+/* PK_replace_variation_data_t */
+
+struct PK_replace_variation_data_s
+    {
+    PK_replace_variation_t     variation;  /* whether the surfaces are replaced */
+    int                n_variation_faces;  /* number of faces (0) */
+    const PK_FACE_t     *variation_faces;  /* faces to have surfaces replaced */
+    };
+
+typedef struct PK_replace_variation_data_s PK_replace_variation_data_t;
+
+
+
+/* PK_replace_variation_data_m */
+
+#define PK_replace_variation_data_m(variation_data)                          \
+      ((variation_data).variation           = PK_replace_variation_no_c,     \
+       (variation_data).n_variation_faces   = 0,                             \
+       (variation_data).variation_faces     = NULL                           \
+      )
+
+
+/* PK_FACE_replace_surfs_o_t */
+
+struct PK_FACE_replace_surfs_o_s
+    {
+    int                       o_t_version;   /* version number */
+    PK_check_fa_fa_t          check_fa_fa;   /* check for face-face */
+    PK_replace_edge_data_t    edge_data;     /* replace data for edges */
+    PK_replace_vertex_data_t  vertex_data;   /* replace data for vertices */
+    PK_replace_help_points_t  edge_help;     /* edge help points */
+    PK_replace_help_points_t  vertex_help;   /* vertex help points */
+    PK_replace_merge_t        merge;         /* whether changed faces are to */
+    PK_replace_adjust_t       adjust;        /* whether topology of the part */
+    PK_local_ops_update_t     update;        /* update flag */
+    PK_replace_variation_data_t
+                              variation_data;
+    };
+
+typedef struct PK_FACE_replace_surfs_o_s PK_FACE_replace_surfs_o_t;
+
+
+
+/* PK_FACE_replace_surfs_o_m */
+
+
+#define PK_FACE_replace_surfs_o_m(options)                                \
+       ((options).o_t_version            = 6,                             \
+        (options).check_fa_fa            = PK_check_fa_fa_yes_c,          \
+        PK_replace_edge_data_m((options).edge_data),                      \
+        PK_replace_vertex_data_m((options).vertex_data),                  \
+        PK_replace_help_points_m((options).edge_help),                    \
+        PK_replace_help_points_m((options).vertex_help),                  \
+        (options).merge                  = PK_replace_merge_no_c,         \
+        (options).adjust                 = PK_replace_adjust_yes_c,       \
+        (options).update                 = PK_local_ops_update_default_c, \
+        PK_replace_variation_data_m((options).variation_data)             \
+       )
+
+
+
+/* PK_FACE_replace_surfs_r_t */
+
+struct PK_FACE_replace_surfs_r_s
+    {
+    PK_local_status_t          status;
+    int                        n_error_entities;
+    PK_ENTITY_t                *error_entities;
+    };
+typedef struct PK_FACE_replace_surfs_r_s PK_FACE_replace_surfs_r_t;
+
+
+
+/* PK_replace_patch_data_t */
+
+struct PK_replace_patch_data_s
+    {
+    PK_replace_patch_t  patch_type;      /* whether target faces are replaced */
+    int                 n_matches;       /* number of matched faces (0) */
+    const PK_FACE_t    *tool_patches;    /* the tool faces to replace the */
+    const PK_FACE_t    *target_patches;  /* the target faces to be replaced by */
+    int                 n_patch_edges;   /* number of patch edges (0) */
+    const PK_EDGE_t    *patch_edges;     /* boundary edges of patch tool */
+    };
+
+typedef struct PK_replace_patch_data_s PK_replace_patch_data_t;
+
+
+
+/* PK_replace_patch_data_m */
+
+#define PK_replace_patch_data_m(patch_data)                          \
+      ((patch_data).patch_type           = PK_replace_patch_no_c,    \
+       (patch_data).n_matches            = 0,                        \
+       (patch_data).tool_patches         = NULL,                     \
+       (patch_data).target_patches       = NULL,                     \
+       (patch_data).n_patch_edges        = 0,                        \
+       (patch_data).patch_edges          = NULL                      \
+      )
+
+
+/* PK_FACE_replace_with_sheet_o_t */
+
+struct PK_FACE_replace_with_sheet_o_s
+    {
+    int                       o_t_version;  /* version number */
+    double                    tolerance;    /* tolerance for operation */
+    PK_check_fa_fa_t          check_fa_fa;  /* check for face-face */
+    PK_replace_patch_data_t   patch_data;   /* patch data for faces */
+    };
+
+typedef struct PK_FACE_replace_with_sheet_o_s PK_FACE_replace_with_sheet_o_t;
+
+
+
+/* PK_FACE_replace_with_sheet_o_m */
+
+
+#define PK_FACE_replace_with_sheet_o_m(options)                     \
+       ((options).o_t_version      = 3,                             \
+        (options).tolerance        = 1.0e-06,                       \
+        (options).check_fa_fa      = PK_check_fa_fa_yes_c,          \
+        PK_replace_patch_data_m((options).patch_data)               \
+       )
+
+
+
+/* PK_FACE_cover_o_t */
+
+struct PK_FACE_cover_o_s
+    {
+    int                    o_t_version;     /* version number */
+    double                 fitting_tolerance;
+    PK_LOGICAL_t           have_bdry_tolerance;
+    double                 bdry_tolerance;  /* optional distance tolerance to */
+    PK_FACE_cover_smooth_t maintain_bdry_smoothness;
+    PK_FACE_cover_output_t output;          /* the form in which to output the */
+    PK_FACE_cover_update_t update;          /* update version */
+    };
+
+typedef struct PK_FACE_cover_o_s PK_FACE_cover_o_t;
+
+
+
+/* PK_FACE_cover_o_m */
+
+
+#define PK_FACE_cover_o_m(options)                                          \
+       ((options).o_t_version              = 2,                             \
+        (options).fitting_tolerance        = 1.0e-5,                        \
+        (options).have_bdry_tolerance      = PK_LOGICAL_false,              \
+        (options).bdry_tolerance           = 0.0,                           \
+        (options).maintain_bdry_smoothness = PK_FACE_cover_smooth_no_c,     \
+        (options).output                   = PK_FACE_cover_output_replace_c,\
+        (options).update                   = PK_FACE_cover_update_default_c \
+       )
+
+
+
+/* PK_FACE_change_data_offset_t */
+
+struct PK_FACE_change_data_offset_s
+    {
+    double   distance;               /* offset distance */
+    };
+typedef struct PK_FACE_change_data_offset_s PK_FACE_change_data_offset_t;
+
+
+/* PK_FACE_change_data_taper_t */
+
+struct PK_FACE_change_data_taper_s
+    {
+    PK_VECTOR_t         direction;         /* taper direction */
+    double              angle;             /* taper angle (radian) */
+    int                 n_refs;            /* number of reference entities */
+    const PK_ENTITY_t  *references;        /* taper reference entities */
+    };
+typedef struct PK_FACE_change_data_taper_s PK_FACE_change_data_taper_t;
+
+
+/* PK_FACE_change_data_transform_t */
+
+struct PK_FACE_change_data_transform_s
+    {
+    PK_TRANSF_t  transform;         /* transform */
+    };
+typedef struct PK_FACE_change_data_transform_s PK_FACE_change_data_transform_t;
+
+
+/* PK_FACE_change_data_replace_t */
+
+struct PK_FACE_change_data_replace_s
+    {
+    PK_SURF_t     surface;           /* replace surface */
+    PK_LOGICAL_t  sense;             /* replace surface orientation */
+    };
+typedef struct PK_FACE_change_data_replace_s PK_FACE_change_data_replace_t;
+
+
+/* PK_FACE_change_data_blend_t */
+
+typedef void* PK_FACE_change_data_blend_t;
+
+
+/* PK_FACE_change_data_bend_t */
+
+struct PK_FACE_change_data_bend_s
+    {
+    PK_FACE_change_bend_type_t type;             /* the type of this bend face */
+    PK_ENTITY_t                tool_entity;      /* entity used to construct */
+    double                     offset;           /* forward offset distance */
+    double                     backward_offset;  /* backward offset distance */
+    };
+typedef struct PK_FACE_change_data_bend_s PK_FACE_change_data_bend_t;
+
+
+/* PK_FACE_change_data_patch_t */
+
+struct PK_FACE_change_data_patch_s
+    {
+    PK_TOPOL_t                 sheet;            /* replacement topology used */
+    };
+typedef struct PK_FACE_change_data_patch_s PK_FACE_change_data_patch_t;
+
+
+/* PK_FACE_change_deform_eval_f_t */
+
+typedef PK_ERROR_code_t(*PK_FACE_change_deform_eval_f_t)
+(
+/* received */
+PK_VECTOR_t               /*position*/,          /* input position */
+PK_FACE_t                 /*face*/,              /* face for this operation */
+PK_LOGICAL_t              /*have_params*/,       /* whether surface parameters are */
+PK_UV_t                   /*params*/,            /* parameters on the surface of the */
+PK_POINTER_t              /*external_data*/,     /* external application data */
+/* returned */
+PK_VECTOR_t       *const  /*deformed_position*/  /* deformed position */
+);
+
+
+
+/* PK_FACE_change_data_deform_t */
+
+struct PK_FACE_change_data_deform_s
+    {
+    PK_FACE_change_deform_eval_f_t eval_fn;      /* user evaluator */
+    PK_POINTER_t                   eval_data;    /* evaluator data */
+    };
+typedef struct PK_FACE_change_data_deform_s PK_FACE_change_data_deform_t;
+
+
+/* PK_FACE_change_data_t */
+
+union PK_FACE_change_data_u
+    {
+    PK_FACE_change_data_offset_t    offset;     /* offset parameters */
+    PK_FACE_change_data_taper_t     taper;      /* taper parameters */
+    PK_FACE_change_data_transform_t transform;  /* transform parameters */
+    PK_FACE_change_data_replace_t   replace;    /* replace parameters */
+    PK_FACE_change_data_blend_t     blend;      /* blend parameters */
+    PK_FACE_change_data_bend_t      bend;       /* bend parameters */
+    PK_FACE_change_data_patch_t     patch;      /* patch parameters */
+    PK_FACE_change_data_deform_t    deform;     /* deform parameters */
+    };
+typedef union PK_FACE_change_data_u PK_FACE_change_data_t;
+
+
+/* PK_FACE_change_taper_o_t */
+
+struct PK_FACE_change_taper_o_s
+    {
+    int                     o_t_version;    /* version number of option */
+    PK_EDGE_array_t         tapered_edges;  /* tapered step edges */
+    PK_EDGE_array_t         normal_edges;   /* normal step edges */
+    PK_taper_method_t       method;         /* main face taper method */
+    PK_taper_smooth_step_t  taper_smooth_step;
+    PK_taper_step_face_t    taper_step_face;
+    PK_taper_laminar_edge_t position;       /* defines to how process */
+    int                     n_parting_edges;
+    const PK_ENTITY_t      *parting_edges;  /* parting body step edges (NULL) */
+    PK_BODY_t               parting_body;   /* parting body (PK_ENTITY_null) */
+    };
+typedef struct PK_FACE_change_taper_o_s PK_FACE_change_taper_o_t;
+
+
+/* PK_FACE_change_taper_o_m */
+
+#define PK_FACE_change_taper_o_m(options)                               \
+       ((options).o_t_version          = 5,                             \
+        (options).tapered_edges.length = 0,                             \
+        (options).tapered_edges.array  = NULL,                          \
+        (options).normal_edges.length  = 0,                             \
+        (options).normal_edges.array   = NULL,                          \
+        (options).method               = PK_taper_method_curve_c,       \
+        (options).taper_smooth_step    = PK_taper_smooth_step_no_c,     \
+        (options).taper_step_face      = PK_taper_step_face_no_c,       \
+        (options).position             = PK_taper_laminar_edge_normal_c,\
+        (options).n_parting_edges      = 0,                             \
+        (options).parting_edges        = NULL,                          \
+        (options).parting_body         = PK_ENTITY_null                 \
+       )
+
+
+/* PK_FACE_change_offset_o_t */
+
+struct PK_FACE_change_offset_o_s
+    {
+    int                o_t_version;
+    PK_offset_method_t offset_method;    /* offset method */
+    PK_LOGICAL_t       report_sx;        /* whether to report faces that have */
+    PK_fix_degens_t    fix_degens;       /* control on repairing surface */
+    PK_LOGICAL_t       report_fix_degens;
+    PK_offset_step_t   offset_step;      /* whether to create a step offset */
+    PK_FACE_t          reference;        /* reference face (PK_ENTITY_null) */
+    PK_ref_alignment_t ref_alignment;    /* alignment for reference face */
+    };
+typedef struct PK_FACE_change_offset_o_s PK_FACE_change_offset_o_t;
+
+
+/* PK_FACE_change_offset_o_m */
+
+#define PK_FACE_change_offset_o_m(opt)                         \
+    ((opt).o_t_version       = 5,                              \
+     (opt).offset_method     = PK_offset_method_sx_trim_c,     \
+     (opt).report_sx         = PK_LOGICAL_false,               \
+     (opt).fix_degens        = PK_fix_degens_no_c,             \
+     (opt).report_fix_degens = PK_LOGICAL_false,               \
+     (opt).offset_step       = PK_offset_step_no_c,            \
+     (opt).reference         = PK_ENTITY_null,                 \
+     (opt).ref_alignment     = PK_ref_alignment_opposed_c      \
+    )
+
+
+/* PK_FACE_change_transform_o_t */
+
+struct PK_FACE_change_transform_o_s
+    {
+    int                      o_t_version;
+    int                      n_loops;       /* number of boundary loops of the */
+    const PK_LOOP_t         *base_loops;    /* boundary loops of the faces */
+    const PK_FACE_t         *target_faces;  /* For each boundary loop, the */
+    PK_transform_step_t      transform_step;
+
+
+    };
+typedef struct PK_FACE_change_transform_o_s PK_FACE_change_transform_o_t;
+
+
+/* PK_FACE_change_transform_o_m */
+
+#define PK_FACE_change_transform_o_m(opt)               \
+    ((opt).o_t_version = 3,                             \
+     (opt).n_loops     = 0,                             \
+     (opt).base_loops  = NULL,                          \
+     (opt).target_faces = NULL,                         \
+     (opt).transform_step = PK_transform_step_no_c      \
+    )
+
+
+/* PK_FACE_change_replace_o_t */
+
+struct PK_FACE_change_replace_o_s
+    {
+    int                    o_t_version;  /* version number of option structure */
+    PK_replace_merge_t     merge;        /* whether changed faces are to be */
+    PK_replace_variation_t variation;    /* whether the surface of the face is */
+    };
+typedef struct PK_FACE_change_replace_o_s PK_FACE_change_replace_o_t;
+
+
+/* PK_FACE_change_replace_o_m */
+
+#define PK_FACE_change_replace_o_m(opt)                         \
+    ((opt).o_t_version = 3,                                     \
+     (opt).merge       = PK_replace_merge_no_c,                 \
+     (opt).variation   = PK_replace_variation_no_c              \
+    )
+
+
+/* PK_FACE_change_blend_o_t */
+
+struct PK_FACE_change_blend_o_s
+    {
+    int                     o_t_version;     /* version number of option */
+    PK_blend_xs_shape_t     xs_shape;        /* cross-section shape */
+    double                  radius;          /* radius of blend when reapplied */
+    int                     n_unders;        /* number of underlying faces of */
+    const PK_ENTITY_t      *unders;          /* faces used to define the blend */
+    const PK_blend_orientation_t
+                           *orientations;    /* which side of each of the */
+    const double           *ranges;          /* ranges on each of the unders */
+    PK_blend_ov_smooth_t    ov_smooth;       /* control smooth overflow */
+    };
+typedef struct PK_FACE_change_blend_o_s PK_FACE_change_blend_o_t;
+
+
+/* PK_FACE_change_blend_o_m */
+
+#define PK_FACE_change_blend_o_m(opt)                           \
+    ((opt).o_t_version    = 5,                                     \
+     (opt).xs_shape       = PK_blend_xs_shape_conic_c,             \
+     (opt).radius         = 0.0,                                   \
+     (opt).n_unders       = 0,                                     \
+     (opt).unders         = NULL,                                  \
+     (opt).orientations   = NULL,                                  \
+     (opt).ranges         = NULL,                                  \
+     (opt).ov_smooth      = PK_blend_ov_smooth_diff_c              \
+    )
+
+
+/* PK_FACE_change_bend_o_t */
+
+struct PK_FACE_change_bend_o_s
+    {
+    int                o_t_version;      /* version number of option structure */
+    PK_bend_merge_t    merge;            /* whether changed faces are to be */
+    };
+typedef struct PK_FACE_change_bend_o_s PK_FACE_change_bend_o_t;
+
+
+/* PK_FACE_change_bend_o_m */
+
+#define PK_FACE_change_bend_o_m(opt) \
+    ((opt).o_t_version = 1,                                     \
+     (opt).merge       = PK_bend_merge_no_c                     \
+    )
+
+
+/* PK_FACE_change_patch_o_t */
+
+struct PK_FACE_change_patch_o_s
+    {
+    int                     o_t_version;  /* version number of option structure */
+    PK_replace_patch_data_t patch_data;   /* patch data for faces */
+    PK_patch_mobility_t     mobility;     /* mobility of patch */
+    };
+typedef struct PK_FACE_change_patch_o_s PK_FACE_change_patch_o_t;
+
+
+/* PK_FACE_change_patch_o_m */
+
+#define PK_FACE_change_patch_o_m(opt)                           \
+    ((opt).o_t_version = 3,                                     \
+     PK_replace_patch_data_m((opt).patch_data),                 \
+     (opt).mobility = PK_patch_mobility_fixed_c                 \
+    )
+
+
+/* PK_FACE_change_deform_o_t */
+
+struct PK_FACE_change_deform_o_s
+    {
+    int              o_t_version;      /* version number of option structure */
+    int              n_matched_edges;  /* number of matched edges (0) */
+    const PK_EDGE_t *matched_edges;    /* matched edges (NULL) */
+    PK_deform_uv_t   deform_uv;        /* control uvboxes of resultant deformed */
+    PK_LOGICAL_t     thread_safe;      /* whether the external evaluator */
+    };
+typedef struct PK_FACE_change_deform_o_s PK_FACE_change_deform_o_t;
+
+
+/* PK_FACE_change_deform_o_m */
+
+#define PK_FACE_change_deform_o_m(opt)                \
+    ((opt).o_t_version     = 1,                       \
+     (opt).n_matched_edges = 0,                       \
+     (opt).matched_edges   = NULL,                    \
+     (opt).deform_uv       = PK_deform_uv_face_box_c, \
+     (opt).thread_safe     = PK_LOGICAL_false         \
+    )
+
+
+/* PK_FACE_change_opts_t */
+
+union PK_FACE_change_opts_u
+    {
+    const PK_FACE_change_offset_o_t    *offset;     /* offset specific options */
+    const PK_FACE_change_taper_o_t     *taper;      /* taper specific options */
+    const PK_FACE_change_transform_o_t *transform;  /* transform specific opts */
+    const PK_FACE_change_replace_o_t   *replace;    /* replace specific options */
+    const PK_FACE_change_blend_o_t     *blend;      /* blend specific options */
+    const PK_FACE_change_bend_o_t      *bend;       /* bend specific options */
+    const PK_FACE_change_patch_o_t     *patch;      /* patch specific options */
+    const PK_FACE_change_deform_o_t    *deform;     /* deform specific options */
+    };
+typedef union PK_FACE_change_opts_u PK_FACE_change_opts_t;
+
+
+/* PK_FACE_change_t */
+
+struct PK_FACE_change_s
+    {
+    PK_FACE_change_type_t  op_type;     /* change operation type */
+    PK_FACE_change_data_t  op_param;    /* change operation parameters */
+    PK_FACE_change_opts_t  op_opts;     /* change operation options */
+    };
+typedef struct PK_FACE_change_s PK_FACE_change_t;
+
+
+/* PK_FACE_change_o_t */
+
+struct PK_FACE_change_o_s
+    {
+    int                       o_t_version;
+    PK_LOGICAL_t              merge_face;
+    PK_LOGICAL_t              allow_disjoint;
+    PK_check_fa_fa_t          check_fa_fa;
+    PK_change_edge_geom_data_t
+                              edge_geom_data;
+    PK_replace_edge_data_t    edge_data;   /* replace data for edges */
+    PK_replace_vertex_data_t  vertex_data; /* replace data for vertices */
+    PK_replace_help_points_t  edge_help;   /* edge help points */
+    PK_replace_help_points_t  vertex_help; /* vertex help points */
+    PK_replace_update_t       replace_update;
+    PK_local_ops_update_t     update;      /* update flag */
+    PK_FACE_prefer_adj_t      adjacency;   /* specifies how to control the */
+    PK_FACE_grow_t            grow;        /* controls which faces to grow when */
+    PK_FACE_grow_cb_f_t       grow_cb;     /* user callback function for */
+    PK_POINTER_t              grow_data;   /* user data for callback function */
+    PK_VERTEX_limit_t         vertex_limit;
+    PK_EDGE_limit_t           edge_limit;
+    PK_repair_fa_fa_t         repair_fa_fa;
+    PK_FACE_trim_cb_f_t       trim_cb;     /* user callback function for */
+    PK_POINTER_t              trim_data;   /* user data for callback function */
+    PK_LOGICAL_t              report_surf_extension;
+    PK_change_track_edges_t   track_edges; /* which edges to return tracking */
+    PK_results_output_t       results_output;
+    PK_repair_fa_t            repair_fa;   /* whether invalid faces should be */
+    };
+typedef struct PK_FACE_change_o_s PK_FACE_change_o_t;
+
+
+/* PK_FACE_change_o_m */
+
+#define PK_FACE_change_o_m(options)                                   \
+       ((options).o_t_version      = 14,                              \
+        (options).merge_face       = PK_LOGICAL_true,                 \
+        (options).allow_disjoint   = PK_LOGICAL_false,                \
+        (options).check_fa_fa      = PK_check_fa_fa_yes_c,            \
+        PK_change_edge_geom_data_m((options).edge_geom_data),        \
+        PK_replace_edge_data_m((options).edge_data),                  \
+        PK_replace_vertex_data_m((options).vertex_data),              \
+        PK_replace_help_points_m((options).edge_help),                \
+        PK_replace_help_points_m((options).vertex_help),              \
+        (options).replace_update   = PK_replace_update_default_c,     \
+        (options).update           = PK_local_ops_update_default_c,   \
+        (options).adjacency        = PK_FACE_prefer_adj_keep_c,       \
+        (options).grow             = PK_FACE_grow_update_c,           \
+        (options).grow_cb          = NULL,                            \
+        (options).grow_data        = NULL,                            \
+        (options).vertex_limit     = PK_VERTEX_limit_no_c,            \
+        (options).edge_limit       = PK_EDGE_limit_no_c,              \
+        (options).repair_fa_fa     = PK_repair_fa_fa_no_c,            \
+        (options).trim_cb          = NULL,                            \
+        (options).trim_data        = NULL,                            \
+        (options).report_surf_extension = PK_LOGICAL_false,           \
+        (options).track_edges      = PK_change_track_edges_no_c,      \
+        (options).results_output   = PK_results_output_return_c,      \
+        (options).repair_fa        = PK_repair_fa_yes_c               \
+       )
+
+
+/* PK_FACE_transform_o_t */
+
+struct PK_FACE_transform_o_s
+    {
+    int                   o_t_version;   /* version number of option structure */
+    PK_LOGICAL_t          merge_face;    /* whether transformed faces are to be */
+    PK_check_fa_fa_t      check_fa_fa;   /* check for face-face inconsistencies */
+    PK_FACE_prefer_adj_t  adjacency;     /* specifies how to control the */
+    PK_transform_step_t   transform_step;
+    PK_FACE_grow_t        grow;          /* controls which faces to grow */
+    PK_local_ops_update_t update;        /* update flag */
+    };
+typedef struct PK_FACE_transform_o_s PK_FACE_transform_o_t;
+
+
+/* PK_FACE_transform_o_m */
+
+#define PK_FACE_transform_o_m(options)                              \
+       ((options).o_t_version     = 5,                              \
+        (options).merge_face      = PK_LOGICAL_true,                \
+        (options).check_fa_fa     = PK_check_fa_fa_yes_c,           \
+        (options).adjacency       = PK_FACE_prefer_adj_keep_c,      \
+        (options).transform_step  = PK_transform_step_no_c,         \
+        (options).grow            = PK_FACE_grow_update_c,          \
+        (options).update          = PK_local_ops_update_default_c   \
+       )
+
+
+/* PK_hole_component_t */
+
+struct PK_hole_component_s
+    {
+    PK_hole_comp_t hole_comp;   /* type of hole component */
+    double         depth;       /* depth at bottom of component */
+    double         data;        /* a parameter of component (eg radius) */
+    PK_ENTITY_t    entity;      /* entity associated with component */
+    };
+typedef struct PK_hole_component_s PK_hole_component_t;
+
+
+
+/* PK_detail_def_hole_t */
+
+struct PK_detail_def_hole_s
+    {
+    PK_AXIS2_sf_t        origin;          /* hole's position and orientation */
+    double               total_depth;     /* total depth of hole */
+    double               smallest_radius; /* smallest radius of hole */
+    PK_BODY_t            profile;         /* wire body profile */
+    int                  cb_result;       /* result of callback function */
+    int                  n_components;    /* number of hole components */
+    PK_hole_component_t *components;      /* hole components */
+    };
+typedef struct PK_detail_def_hole_s PK_detail_def_hole_t;
+
+
+
+/* PK_detail_hole_cb_f_t */
+
+typedef int        (*PK_detail_hole_cb_f_t)
+(
+/* received */
+int                   /*n_faces*/,    /* number of faces in hole detail */
+const PK_FACE_t       /*faces*/[],    /* faces in hole detail */
+PK_detail_def_hole_t  /*hole_def*/,   /* hole detail definition */
+PK_POINTER_t          /*context*/     /* context */
+);
+
+
+/* PK_detail_hole_cb_t */
+
+typedef PK_detail_hole_cb_f_t PK_detail_hole_cb_t;
+
+
+/* PK_FACE_details_hole_o_t */
+
+struct PK_FACE_details_hole_o_s
+    {
+    int                 o_t_version;        /* options structure version number */
+    PK_VECTOR_t         up;                 /* up vector for through holes */
+    PK_LOGICAL_t        include_zero_depth; /* whether zero depth components */
+    PK_LOGICAL_t        want_profiles;      /* whether wire body profiles are */
+    PK_LOGICAL_t        simplify_geom;      /* whether simplified geometry is */
+    PK_detail_hole_cb_f_t
+                        cb;                 /* callback function ( NULL ) */
+    PK_POINTER_t        cb_context;         /* context for callback function */
+    PK_LOGICAL_t        face_tracking;      /* whether extra face tracking */
+    };
+typedef struct PK_FACE_details_hole_o_s PK_FACE_details_hole_o_t;
+
+
+
+/* PK_FACE_details_hole_o_m */
+
+#define PK_FACE_details_hole_o_m(options)                  \
+       ((options).o_t_version        = 2,                  \
+        (options).up.coord[0]        = 0.0,                \
+        (options).up.coord[1]        = 0.0,                \
+        (options).up.coord[2]        = 1.0,                \
+        (options).include_zero_depth = PK_LOGICAL_true,    \
+        (options).want_profiles      = PK_LOGICAL_false,   \
+        (options).simplify_geom      = PK_LOGICAL_false,   \
+        (options).cb                 = NULL,               \
+        (options).cb_context         = NULL,               \
+        (options).face_tracking      = PK_LOGICAL_false    \
+       )
+
+
+/* PK_FACE_classify_details_o_t */
+
+struct PK_FACE_classify_details_o_s
+    {
+    int                             o_t_version;  /* options structure version */
+    const PK_FACE_details_hole_o_t *hole;         /* hole options ( NULL ) */
+    };
+typedef struct PK_FACE_classify_details_o_s PK_FACE_classify_details_o_t;
+
+
+
+/* PK_FACE_classify_details_o_m */
+
+#define PK_FACE_classify_details_o_m(options)              \
+       ((options).o_t_version     = 1,                     \
+        (options).hole            = NULL                   \
+       )
+
+
+/* PK_detail_def_t */
+
+struct PK_detail_def_s
+    {
+    PK_detail_type_t              detail_type;  /* detail type */
+    PK_FACE_array_t               faces;        /* faces comprising the detail */
+    union {
+            PK_detail_def_hole_t *hole;         /* hole detail definition */
+            void                 *unknown;
+          } detail;                             /* detail */
+    };
+typedef struct PK_detail_def_s PK_detail_def_t;
+
+
+
+/* PK_FACE_classify_details_r_t */
+
+struct PK_FACE_classify_details_r_s
+    {
+    int              n_detail_defs;  /* number of detail definitions */
+    PK_detail_def_t *detail_defs;    /* array of detail definitions */
+    };
+typedef struct PK_FACE_classify_details_r_s PK_FACE_classify_details_r_t;
+
+
+
+/* PK_INSTANCE_sf_t */
+
+
+struct PK_INSTANCE_sf_s
+    {
+    PK_ASSEMBLY_t   assembly;    /* owning assembly */
+    PK_TRANSF_t     transf;      /* transform (must be a rigid motion, or */
+    PK_PART_t       part;        /* instanced part */
+    };
+
+typedef struct PK_INSTANCE_sf_s PK_INSTANCE_sf_t;
+
+
+/* PK_LOOP_close_gaps_o_t */
+
+struct PK_LOOP_close_gaps_o_s
+    {
+    int                    o_t_version;      /* options structure version. */
+    PK_LOOP_3_space_gap_t  gap_in_3_space;   /* controls model space gaps at */
+    PK_LOOP_2_space_gap_t  gap_in_2_space;   /* controls parameter space gaps */
+    double                 tol_in_2_space;   /* tolerance value for */
+    PK_LOOP_trim_geom_t    trim_fin_geom;    /* shorten the SP-curve geometry */
+    };
+
+typedef struct PK_LOOP_close_gaps_o_s PK_LOOP_close_gaps_o_t;
+
+
+
+/* PK_LOOP_close_gaps_o_m */
+
+#define PK_LOOP_close_gaps_o_m(options)                           \
+    (                                                             \
+       (options).o_t_version    = 4,                              \
+       (options).gap_in_3_space = PK_LOOP_3_space_gap_close_c,    \
+       (options).gap_in_2_space = PK_LOOP_2_space_gap_no_c,       \
+       (options).tol_in_2_space = 1.0e-06,                        \
+       (options).trim_fin_geom  = PK_LOOP_trim_geom_no_c          \
+    )
+
+
+/* PK_LOOP_offset_planar_o_t */
+
+struct PK_LOOP_offset_planar_o_s
+    {
+    int             o_t_version;     /* version number */
+    PK_LOOP_opl_gap_fill_t           /* how gaps at vertices are filled */
+                    gap_fill;        /* (PK_LOOP_opl_gap_fill_round_c) */
+    PK_LOGICAL_t    local_check;     /* local checks? (PK_LOGICAL_false) */
+    double          tolerance;       /* tolerance for curve conversion (0) */
+    };
+
+typedef struct PK_LOOP_offset_planar_o_s PK_LOOP_offset_planar_o_t;
+
+
+
+/* PK_LOOP_offset_planar_o_m */
+
+#define PK_LOOP_offset_planar_o_m(options)                      \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).gap_fill       = PK_LOOP_opl_gap_fill_round_c, \
+       (options).local_check    = PK_LOGICAL_false,             \
+       (options).tolerance      = 0                             \
+    )
+
+
+/* PK_EDGE_ask_convexity_o_t */
+
+struct PK_EDGE_ask_convexity_o_s
+    {
+    int             o_t_version;             /* version number of option */
+    PK_LOGICAL_t    have_angular_tolerance;  /* whether angular tolerance */
+    double          angular_tolerance;       /* angular tolerance */
+    };
+
+typedef struct PK_EDGE_ask_convexity_o_s PK_EDGE_ask_convexity_o_t;
+
+
+
+/* PK_EDGE_ask_convexity_o_m */
+
+#define PK_EDGE_ask_convexity_o_m(options)                            \
+    (                                                                 \
+       (options).o_t_version                = 1,                      \
+       (options).have_angular_tolerance     = PK_LOGICAL_false,       \
+       (options).angular_tolerance          = 0.0                     \
+    )
+
+
+/* PK_EDGE_attach_curves_o_t */
+
+struct PK_EDGE_attach_curves_o_s
+    {
+    int                  o_t_version;    /* version number of options structure */
+    int                  n_intervals;    /* the number of curve intervals */
+    const PK_INTERVAL_t *intervals;      /* parametric intervals of curves */
+    const int           *interval_map;   /* curve-interval mapping (NULL) */
+    PK_LOGICAL_t         have_senses;    /* the senses array is set */
+    const PK_LOGICAL_t  *senses;         /* the orientations of curves with */
+    PK_GEOM_copy_t       copy_curves;    /* whether to copy curves before */
+    PK_check_vx_on_cu_t  vx_checking;    /* how to enforce vertex checking */
+    PK_check_geom_t      geom_checking;  /* whether to enforce geometry */
+    PK_EDGE_attach_update_t
+                         update;         /* update switch */
+    };
+
+typedef struct PK_EDGE_attach_curves_o_s PK_EDGE_attach_curves_o_t;
+
+
+
+/* PK_EDGE_attach_curves_o_m */
+
+#define PK_EDGE_attach_curves_o_m(options)                              \
+    (                                                                   \
+       (options).o_t_version         = 2,                               \
+       (options).n_intervals         = 0,                               \
+       (options).intervals           = NULL,                            \
+       (options).interval_map        = NULL,                            \
+       (options).have_senses         = PK_LOGICAL_false,                \
+       (options).senses              = NULL,                            \
+       (options).copy_curves         = PK_GEOM_copy_auto_c,             \
+       (options).vx_checking         = PK_check_vx_on_cu_all_c,         \
+       (options).geom_checking       = PK_check_geom_yes_c,             \
+       (options).update              = PK_EDGE_attach_update_default_c  \
+    )
+
+
+/* PK_EDGE_attach_curve_nmnl_o_t */
+
+struct PK_EDGE_attach_curve_nmnl_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_interval;   /* t_int is set (PK_LOGICAL_false) */
+    PK_INTERVAL_t       t_int;           /* Parametric interval of edge (0,1) */
+    };
+
+typedef struct PK_EDGE_attach_curve_nmnl_o_s PK_EDGE_attach_curve_nmnl_o_t;
+
+
+
+/* PK_EDGE_attach_curve_nmnl_o_m */
+
+#define PK_EDGE_attach_curve_nmnl_o_m(options)          \
+    (                                                   \
+       (options).o_t_version = 1,                       \
+       (options).have_interval = PK_LOGICAL_false,      \
+       (options).t_int.value[0] = 0.0,                  \
+       (options).t_int.value[1] = 1.0                   \
+    )
+
+
+/* PK_EDGE_delete_o_t */
+
+struct PK_EDGE_delete_o_s
+    {
+    int                   o_t_version;   /* version number of option structure */
+    PK_local_ops_update_t update;        /* update flag */
+    };
+
+typedef struct PK_EDGE_delete_o_s PK_EDGE_delete_o_t;
+
+
+
+/* PK_EDGE_delete_o_m */
+
+#define PK_EDGE_delete_o_m(options)                         \
+    (                                                       \
+      (options).o_t_version = 2,                            \
+      (options).update      = PK_local_ops_update_default_c \
+    )
+
+
+/* PK_EDGE_find_deviation_t */
+
+struct PK_EDGE_find_deviation_s
+    {
+    int                n_distances;      /* number of distances returned */
+    double            *distances;        /* distances */
+    PK_VECTOR_t       *edge1_vecs;       /* points on `edge1' */
+    PK_VECTOR_t       *edge2_vecs;       /* corresponding points on`edge2' */
+    PK_INTERVAL_t      interval1;        /* interval on `edge1' */
+    PK_INTERVAL_t      interval2;        /* interval on `edge2' */
+    };
+typedef struct PK_EDGE_find_deviation_s PK_EDGE_find_deviation_t;
+
+
+/* PK_EDGE_find_deviation_r_t */
+
+struct PK_EDGE_find_deviation_r_s
+    {
+    int                             n_regions;  /* number of regions */
+    PK_EDGE_find_deviation_t       *regions;    /* regions returned */
+    };
+typedef struct PK_EDGE_find_deviation_r_s PK_EDGE_find_deviation_r_t;
+
+
+/* PK_EDGE_find_deviation_o_t */
+
+struct PK_EDGE_find_deviation_o_s
+    {
+    int             o_t_version;             /* Version number of option */
+
+    int             max_samples;             /* How many distances to find(0) */
+
+    PK_LOGICAL_t    bound_at_split_vertex;   /* Whether vertices of split ring */
+
+    PK_LOGICAL_t    have_upper_bound;        /* An upper bound is provided */
+
+    double          upper_bound;             /* Upper bound for deviation(0.0) */
+
+    };
+
+typedef struct PK_EDGE_find_deviation_o_s PK_EDGE_find_deviation_o_t;
+
+
+/* PK_EDGE_find_deviation_o_m */
+
+#define PK_EDGE_find_deviation_o_m( options )                 \
+    (                                                         \
+       (options).o_t_version        = 1,                      \
+       (options).max_samples        = 0,                      \
+       (options).bound_at_split_vertex = PK_LOGICAL_false,    \
+       (options).have_upper_bound      = PK_LOGICAL_false,    \
+       (options).upper_bound  = 0.0                           \
+    )
+
+
+/* PK_EDGE_offset_on_body_r_t */
+
+struct PK_EDGE_offset_on_body_r_s
+    {
+    PK_offset_on_body_t      status;             /* the status of the offset */
+    int                      n_fault_entities;   /* number of entities */
+    PK_ENTITY_t             *fault_entities;     /* associated entities */
+    };
+
+typedef struct PK_EDGE_offset_on_body_r_s PK_EDGE_offset_on_body_r_t;
+
+
+/* PK_EDGE_offset_on_body_o_t */
+
+struct PK_EDGE_offset_on_body_o_s
+    {
+    int     o_t_version;             /* version number of option structure */
+    double  offset_distance;         /* distance to offset */
+    double  tolerance;               /* tolerance for offset (1.0e-06) */
+    };
+
+typedef struct PK_EDGE_offset_on_body_o_s PK_EDGE_offset_on_body_o_t;
+
+
+
+/* PK_EDGE_offset_on_body_o_m */
+
+#define PK_EDGE_offset_on_body_o_m( options )                        \
+    (                                                                \
+       (options).o_t_version        = 1,                             \
+       (options).offset_distance    = 0.0,                           \
+       (options).tolerance          = 0.000001                       \
+    )
+
+
+/* PK_EDGE_optimise_o_t */
+
+struct PK_EDGE_optimise_o_s
+    {
+    int                 o_t_version;  /* version number of option structure */
+    double              max_dev;      /* the desired maximum deviation (0) */
+    PK_EDGE_max_dev_t   set_max_dev;  /* whether or not `max_dev' is set by */
+    };
+
+typedef struct PK_EDGE_optimise_o_s PK_EDGE_optimise_o_t;
+
+
+
+/* PK_EDGE_optimise_o_m */
+
+#define PK_EDGE_optimise_o_m( options )                            \
+    (                                                                \
+       (options).o_t_version        = 1,                             \
+       (options).max_dev            = 0,                             \
+       (options).set_max_dev        = PK_EDGE_max_dev_edge_tol_c \
+    )
+
+
+/* PK_EDGE_remove_to_bodies_o_t */
+
+struct PK_EDGE_remove_to_bodies_o_s
+    {
+    int                 o_t_version;           /* version number of option */
+    PK_LOGICAL_t        allow_disjoint;        /* Whether disjoint bodies can */
+    PK_track_bodies_t   track_bodies;          /* return bodies in tracking */
+    };
+typedef struct PK_EDGE_remove_to_bodies_o_s PK_EDGE_remove_to_bodies_o_t;
+
+
+/* PK_EDGE_remove_to_bodies_o_m */
+
+#define PK_EDGE_remove_to_bodies_o_m(options)               \
+    (                                                       \
+    (options).o_t_version          = 1,                     \
+    (options).allow_disjoint       = PK_LOGICAL_true,       \
+    (options).track_bodies         = PK_track_bodies_no_c   \
+    )
+
+
+/* PK_EDGE_repair_o_t */
+
+struct PK_EDGE_repair_o_s
+    {
+    int                 o_t_version;      /* version number of option structure */
+    PK_LOGICAL_t        ensure_on_surfs;  /* ensure edges lie on surfaces */
+    double              max_tolerance;    /* maximum tolerance allowed for */
+    PK_LOGICAL_t        intersect;        /* intersect face surfaces */
+    PK_LOGICAL_t        check_tols;       /* check for clashing vertex */
+    };
+
+typedef struct PK_EDGE_repair_o_s PK_EDGE_repair_o_t;
+
+
+
+/* PK_EDGE_repair_o_m */
+
+#define PK_EDGE_repair_o_m(options)            \
+    (                                                   \
+       (options).o_t_version = 3,                       \
+       (options).ensure_on_surfs = PK_LOGICAL_true,     \
+       (options).max_tolerance = 0.00001,               \
+       (options).intersect = PK_LOGICAL_false,          \
+       (options).check_tols = PK_LOGICAL_true           \
+    )
+
+
+/* PK_EDGE_reset_precision_o_t */
+
+struct PK_EDGE_reset_precision_o_s
+    {
+    int                    o_t_version;  /* version number of option */
+    PK_reset_prec_method_t method;       /* method how the edge geometry */
+    };
+
+typedef struct PK_EDGE_reset_precision_o_s PK_EDGE_reset_precision_o_t;
+
+
+
+/* PK_EDGE_reset_precision_o_m */
+
+#define PK_EDGE_reset_precision_o_m( options )                      \
+    (                                                               \
+       (options).o_t_version   = 1,                                 \
+       (options).method        = PK_reset_prec_method_any_c         \
+    )
+
+
+/* PK_EDGE_reverse_2_o_t */
+
+struct PK_EDGE_reverse_2_o_s
+    {
+    int o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_EDGE_reverse_2_o_s PK_EDGE_reverse_2_o_t;
+
+
+
+/* PK_EDGE_reverse_2_o_m */
+
+#define PK_EDGE_reverse_2_o_m(options)          \
+    (                                           \
+       (options).o_t_version = 1                \
+    )
+
+
+/* PK_EDGE_set_precision_o_t */
+
+struct PK_EDGE_set_precision_o_s
+    {
+    int                       o_t_version;    /* options structure version */
+    PK_set_precision_method_t sp_method;      /* method used for generating */
+    PK_set_precision_report_t report_short_edges;
+    };
+
+typedef struct PK_EDGE_set_precision_o_s PK_EDGE_set_precision_o_t;
+
+
+
+/* PK_EDGE_set_precision_o_m */
+
+#define PK_EDGE_set_precision_o_m(options)                                 \
+    (                                                                      \
+       (options).o_t_version           = 2,                                \
+       (options).sp_method             = PK_set_precision_default_c,       \
+       (options).report_short_edges    = PK_set_precision_report_no_c      \
+    )
+
+
+/* PK_EDGE_check_o_t */
+
+struct PK_EDGE_check_o_s
+    {
+    int                  o_t_version;  /* version number of option structure */
+    int                  max_faults;   /* limit on fault numbers (5) */
+    PK_check_geom_t      geom;         /* bad geometry (PK_check_geom_yes_c) */
+    PK_check_bgeom_t     bgeom;        /* bad B geometry (PK_check_bgeom_yes_c) */
+    PK_check_top_geo_t   top_geo;      /* topology/geometry inconsistency */
+    PK_check_size_box_t  size_box;     /* size box violation */
+    PK_check_nmnl_geom_t nmnl_geom;    /* bad nominal geometry */
+    PK_check_returns_t   returns;      /* return version of fault information */
+    PK_check_attribs_t   attribs;      /* system attribute validity checks */
+    };
+
+typedef struct PK_EDGE_check_o_s PK_EDGE_check_o_t;
+
+
+
+/* PK_EDGE_check_o_m */
+
+#define PK_EDGE_check_o_m(options)                          \
+    (                                                       \
+       (options).o_t_version = 3,                           \
+       (options).max_faults  = 5,                           \
+       (options).geom        = PK_check_geom_yes_c,         \
+       (options).bgeom       = PK_check_bgeom_yes_c,        \
+       (options).top_geo     = PK_check_top_geo_edge_c,     \
+       (options).size_box    = PK_check_size_box_yes_c,     \
+       (options).nmnl_geom   = PK_check_nmnl_geom_yes_c,    \
+       (options).returns     = PK_check_returns_0_c,        \
+       (options).attribs     = PK_check_attribs_no_c       \
+    )
+
+
+/* PK_EDGE_make_wire_body_o_t */
+
+struct PK_EDGE_make_wire_body_o_s
+    {
+    int            o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t   allow_disjoint;  /* the operation may return disjoint */
+    PK_LOGICAL_t   copy_dep_geom;   /* copy curves with dependent geometry */
+    PK_LOGICAL_t   use_nmnl_geom;   /* use existing nominal geometry where */
+    double         tolerance;       /* curve approximation tolerance */
+    };
+
+typedef struct PK_EDGE_make_wire_body_o_s PK_EDGE_make_wire_body_o_t;
+
+
+
+/* PK_EDGE_make_wire_body_o_m */
+
+#define PK_EDGE_make_wire_body_o_m( options )               \
+    (                                                       \
+       (options).o_t_version    = 1,                        \
+       (options).allow_disjoint = PK_LOGICAL_false,         \
+       (options).copy_dep_geom  = PK_LOGICAL_true,          \
+       (options).use_nmnl_geom  = PK_LOGICAL_false,         \
+       (options).tolerance      = 0.00001                   \
+    )
+
+
+/* PK_EDGE_curve_direction_t */
+
+struct PK_EDGE_curve_direction_s
+    {
+    PK_EDGE_curve_dir_t       type;        /* type of method used */
+    PK_EDGE_t                 edge;        /* Edge we want to orient with */
+    PK_FIN_t                  fin;         /* fin sets direction */
+    PK_VERTEX_t               end_vertex;  /* vertex sets direction */
+    PK_VECTOR_t               point;       /* point to be used with direction */
+    PK_VECTOR1_t              direction;   /* direction to be used with point */
+    };
+
+typedef struct PK_EDGE_curve_direction_s PK_EDGE_curve_direction_t;
+
+
+
+
+/* PK_EDGE_curve_direction_m */
+
+#define PK_EDGE_curve_direction_m( cu_dir )                             \
+    (                                                                   \
+    (cu_dir).type                       = PK_EDGE_curve_dir_none_c,     \
+    (cu_dir).edge                       = PK_ENTITY_null,               \
+    (cu_dir).fin                        = PK_ENTITY_null,               \
+    (cu_dir).end_vertex                 = PK_ENTITY_null,               \
+    (cu_dir).point.coord[0]             = 0.0,                          \
+    (cu_dir).point.coord[0]             = 0.0,                          \
+    (cu_dir).point.coord[0]             = 0.0,                          \
+    (cu_dir).direction.coord[0]         = 1.0,                          \
+    (cu_dir).direction.coord[1]         = 0.0,                          \
+    (cu_dir).direction.coord[2]         = 0.0                           \
+    )
+
+
+/* PK_EDGE_make_curve_o_t */
+
+struct PK_EDGE_make_curve_o_s
+    {
+    int                       o_t_version;   /* version of option structure */
+    PK_EDGE_curve_direction_t curve_dir;     /* structure to set curve dir */
+    };
+
+typedef struct PK_EDGE_make_curve_o_s PK_EDGE_make_curve_o_t;
+
+
+
+/* PK_EDGE_make_curve_o_m */
+
+#define PK_EDGE_make_curve_o_m(options)                                   \
+    (                                                                     \
+       (options).o_t_version               = 2,                           \
+       PK_EDGE_curve_direction_m( (options).curve_dir )                   \
+    )
+
+
+/* PK_EDGE_set_blend_chamfer_o_t */
+
+struct PK_EDGE_set_blend_chamfer_o_s
+    {
+    int                    o_t_version;   /* version number of option structure */
+    PK_blend_properties_t  properties;    /* properties of blend */
+    };
+
+typedef struct PK_EDGE_set_blend_chamfer_o_s PK_EDGE_set_blend_chamfer_o_t;
+
+
+
+/* PK_EDGE_set_blend_chamfer_o_m */
+
+#define PK_EDGE_set_blend_chamfer_o_m(options)                            \
+    (                                                                     \
+       (options).o_t_version               = 1,                           \
+       PK_blend_properties_m((options).properties)                        \
+    )
+
+
+/* PK_EDGE_set_blend_constant_o_t */
+
+struct PK_EDGE_set_blend_constant_o_s
+    {
+    int                    o_t_version;   /* version number of option structure */
+    PK_EDGE_t              cliff_edge;    /* top of cliff (PK_ENTITY_null) */
+    PK_blend_properties_t  properties;    /* properties of blend */
+    PK_blend_xs_shape_t    xs_shape;      /* cross section shape */
+    };
+
+typedef struct PK_EDGE_set_blend_constant_o_s PK_EDGE_set_blend_constant_o_t;
+
+
+
+/* PK_EDGE_set_blend_constant_o_m */
+
+#define PK_EDGE_set_blend_constant_o_m(options)                           \
+    (                                                                     \
+       (options).o_t_version               = 2,                           \
+       (options).cliff_edge                = PK_ENTITY_null,              \
+       PK_blend_properties_m((options).properties),                       \
+       (options).xs_shape                  = PK_blend_xs_shape_conic_c    \
+    )
+
+
+/* PK_EDGE_set_blend_variable_o_t */
+
+struct PK_EDGE_set_blend_variable_o_s
+    {
+    int                    o_t_version;   /* version number of option structure */
+    PK_blend_properties_t  properties;    /* properties of blend */
+    PK_blend_rho_t         rho_type;      /* whether to use absolute, */
+    PK_blend_xs_shape_t    xs_shape;      /* cross section shape */
+    };
+
+typedef struct PK_EDGE_set_blend_variable_o_s PK_EDGE_set_blend_variable_o_t;
+
+
+
+/* PK_EDGE_set_blend_variable_o_m */
+
+#define PK_EDGE_set_blend_variable_o_m(options)                           \
+    (                                                                     \
+       (options).o_t_version               = 3,                           \
+       PK_blend_properties_m((options).properties),                       \
+       (options).rho_type                  = PK_blend_rho_absolute_c,     \
+       (options).xs_shape                  = PK_blend_xs_shape_conic_c    \
+    )
+
+
+/* PK_EDGE_set_blend_constant_1_m */
+
+#define PK_EDGE_set_blend_constant_1_m(options)                           \
+    (                                                                     \
+       (options).o_t_version               = 1,                           \
+       (options).cliff_edge                = PK_ENTITY_null,              \
+       PK_blend_properties_m((options).properties)                        \
+    )
+
+
+/* PK_VERTEX_optimise_o_t */
+
+struct PK_VERTEX_optimise_o_s
+    {
+    int                    o_t_version;  /* version number of option structure */
+    double                 max_dev;      /* the desired maximum deviation */
+    PK_VERTEX_max_dev_t    set_max_dev;  /* whether or not `max_dev' is set by */
+     PK_local_ops_update_t update;       /* update flag */
+    };
+
+typedef struct PK_VERTEX_optimise_o_s PK_VERTEX_optimise_o_t;
+
+
+
+/* PK_VERTEX_optimise_o_m */
+
+#define PK_VERTEX_optimise_o_m( options )                             \
+    (                                                                 \
+       (options).o_t_version        = 2,                              \
+       (options).max_dev            = 0,                              \
+       (options).set_max_dev        = PK_VERTEX_max_dev_vertex_tol_c, \
+       (options).update             = PK_local_ops_update_default_c   \
+    )
+
+
+/* PK_FACE_split_at_param_o_t */
+
+struct PK_FACE_split_at_param_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_FACE_split_at_param_o_s PK_FACE_split_at_param_o_t;
+
+
+
+/* PK_FACE_split_at_param_o_m */
+
+#define PK_FACE_split_at_param_o_m( options )                        \
+    (                                                       \
+       (options).o_t_version    = 1                         \
+    )
+
+
+/* PK_ATTRIB_filter_f_t */
+
+typedef PK_LOGICAL_t (*PK_ATTRIB_filter_f_t)( const int *, void *);
+
+
+/* PK_ATTRIB_field_values_t */
+
+union PK_ATTRIB_field_values_u
+    {
+    const int           *ints;
+    const double        *doubles;
+    const char          *chars;
+    const PK_UCHAR_t    *uchars;
+    const PK_VECTOR_t   *vectors;
+    const PK_AXIS1_sf_t *axes;
+    const PK_POINTER_t  *pointers;
+    };
+
+typedef union PK_ATTRIB_field_values_u PK_ATTRIB_field_values_t;
+
+
+
+/* PK_ATTRIB_cb_f_t */
+
+typedef PK_LOGICAL_t         (*PK_ATTRIB_cb_f_t)
+(
+/* received */
+const PK_ATTDEF_sf_2_t        * /*attdef_sf*/,  /* attribute definition standard */
+const int                       /*lengths*/[],  /* attribute field lengths */
+const PK_ATTRIB_field_values_t  /*values*/[],   /* attribute field values */
+PK_POINTER_t                    /*context*/     /* context */
+);
+
+
+/* PK_ATTRIB_cb_t */
+
+typedef PK_ATTRIB_cb_f_t PK_ATTRIB_cb_t;
+
+
+/* PK_PART_ask_attribs_cb_o_t */
+
+struct PK_PART_ask_attribs_cb_o_s
+    {
+    int             o_t_version;     /* version number of options structure */
+    PK_ATTDEF_t     attdef;          /* attribute definition (PK_ENTITY_null) */
+    PK_LOGICAL_t    want_attribs;    /* return attributes (PK_LOGICAL_true) */
+    PK_LOGICAL_t    want_owners;     /* return owners (PK_LOGICAL_true) */
+    };
+
+typedef struct PK_PART_ask_attribs_cb_o_s PK_PART_ask_attribs_cb_o_t;
+
+
+
+/* PK_PART_ask_attribs_cb_o_m */
+
+#define PK_PART_ask_attribs_cb_o_m(options)         \
+    (                                               \
+        (options).o_t_version  = 1,                 \
+        (options).attdef       = PK_ENTITY_null,    \
+        (options).want_attribs = PK_LOGICAL_true,   \
+        (options).want_owners  = PK_LOGICAL_true    \
+    )
+
+
+/* PK_PART_delete_attribs_o_t */
+
+struct PK_PART_delete_attribs_o_s
+    {
+    int        o_t_version;    /* version number of option structure */
+    PK_CLASS_t entity_class;   /* class of entity from which to delete */
+    };
+
+typedef struct PK_PART_delete_attribs_o_s PK_PART_delete_attribs_o_t;
+
+
+
+/* PK_PART_delete_attribs_o_m */
+
+#define PK_PART_delete_attribs_o_m(options)         \
+    (                                               \
+        (options).o_t_version  = 1,                 \
+        (options).entity_class = PK_CLASS_entity    \
+    )
+
+
+/* PK_PART_receive_o_m */
+
+#define PK_PART_receive_o_m(options)                                        \
+       ((options).o_t_version             = 6,                              \
+        (options).transmit_format         = PK_transmit_format_neutral_c,   \
+        (options).receive_user_fields     = PK_LOGICAL_false,               \
+        (options).attdef_mismatch         = PK_ATTDEF_mismatch_fail_c,      \
+        (options).part_index              = 0,                              \
+        (options).n_part_indices          = 0,                              \
+        (options).part_indices            = NULL,                           \
+        (options).n_identifiers           = 0,                              \
+        (options).identifiers             = NULL,                           \
+        (options).receive_indexed_context = NULL,                           \
+        (options).key_is_partition        = PK_LOGICAL_false,               \
+        (options).receive_compound        = PK_receive_compound_split_c )
+
+
+/* PK_PART_receive_o_t */
+
+struct PK_PART_receive_o_s
+    {
+    int                     o_t_version;
+    PK_transmit_format_t    transmit_format;
+    PK_LOGICAL_t            receive_user_fields;
+    PK_ATTDEF_mismatch_t    attdef_mismatch;
+    int                     part_index;
+    int                     n_part_indices;
+    const int              *part_indices;
+    int                     n_identifiers;
+    const int              *identifiers;
+    PK_POINTER_t            receive_indexed_context;
+    PK_LOGICAL_t            key_is_partition;
+    PK_receive_compound_t   receive_compound;
+    };
+typedef struct PK_PART_receive_o_s PK_PART_receive_o_t;
+
+
+/* PK_PART_transmit_o_m */
+
+#define PK_PART_transmit_o_m(options)                                       \
+      ((options).o_t_version              = 3,                              \
+       (options).transmit_format          = PK_transmit_format_neutral_c,   \
+       (options).transmit_user_fields     = PK_LOGICAL_true,                \
+       (options).transmit_version         = 0,                              \
+       (options).transmit_nmnl_geometry   = PK_LOGICAL_false,               \
+       (options).transmit_indexed_context = NULL)
+
+
+/* PK_PART_transmit_o_t */
+
+struct PK_PART_transmit_o_s
+    {
+    int                     o_t_version;
+    PK_transmit_format_t    transmit_format;
+    PK_LOGICAL_t            transmit_user_fields;
+    int                     transmit_version;
+    PK_LOGICAL_t            transmit_nmnl_geometry;
+    PK_POINTER_t            transmit_indexed_context;
+    };
+
+typedef struct PK_PART_transmit_o_s PK_PART_transmit_o_t;
+
+
+/* PK_TOPOL_delete_redundant_2_o_t */
+
+struct PK_TOPOL_delete_redundant_2_o_s
+{
+int                  o_t_version;          /* version number of options */
+PK_TOPOL_dimension_t max_topol_dimension;  /* controls which topologies or */
+PK_redundant_merge_t scope;                /* controls the scope of the search */
+int                  n_protected_topols;   /* number of protected topologies */
+const PK_TOPOL_t    *protected_topols;     /* protected topology array */
+};
+
+typedef struct PK_TOPOL_delete_redundant_2_o_s
+                        PK_TOPOL_delete_redundant_2_o_t;
+
+
+
+/* PK_TOPOL_delete_redundant_2_o_m */
+
+#define PK_TOPOL_delete_redundant_2_o_m(options)                 \
+    (                                                            \
+       (options).o_t_version = 1,                                \
+       (options).max_topol_dimension = PK_TOPOL_dimension_any_c, \
+       (options).scope               = PK_redundant_merge_on_c,  \
+       (options).n_protected_topols  = 0,                        \
+       (options).protected_topols    = NULL                      \
+    )
+
+
+/* PK_TOPOL_identify_redundant_o_t */
+
+struct PK_TOPOL_identify_redundant_o_s
+{
+int                  o_t_version;            /* version number of options */
+PK_TOPOL_dimension_t max_topol_dimension;    /* controls which topologies or */
+PK_redundant_merge_t scope;                  /* controls the scope of the */
+PK_LOGICAL_t         want_redundant_topols;  /* whether redundant topols */
+PK_redundant_propagate_t
+                     propagate_redundancy;   /* whether redundancy */
+};
+
+typedef struct PK_TOPOL_identify_redundant_o_s
+               PK_TOPOL_identify_redundant_o_t;
+
+
+
+/* PK_TOPOL_delete_identify_o_m */
+
+#define PK_TOPOL_identify_redundant_o_m(options)                      \
+    (                                                                 \
+       (options).o_t_version           = 2,                           \
+       (options).max_topol_dimension   = PK_TOPOL_dimension_any_c,    \
+       (options).scope                 = PK_redundant_merge_on_c,     \
+       (options).want_redundant_topols = PK_LOGICAL_true,             \
+       (options).propagate_redundancy  = PK_redundant_propagate_no_c  \
+    )
+
+
+/* PK_TOPOL_make_new_o_t */
+
+struct PK_TOPOL_make_new_o_s
+    {
+    int         o_t_version;         /* version number of option structure */
+    };
+
+typedef struct PK_TOPOL_make_new_o_s PK_TOPOL_make_new_o_t;
+
+
+
+/* PK_TOPOL_make_new_o_m */
+
+#define PK_TOPOL_make_new_o_m(options)                               \
+    (                                                                \
+       (options).o_t_version                = 1                      \
+    )
+
+
+/* PK_TOPOL_clash_type_t */
+
+
+typedef int PK_TOPOL_clash_type_t;
+
+
+
+
+/* PK_TOPOL_clash_type_t */
+
+
+#define PK_TOPOL_clash_none                 ((PK_TOPOL_clash_type_t) 0)
+#define PK_TOPOL_clash_a_in_b               ((PK_TOPOL_clash_type_t) 1)
+#define PK_TOPOL_clash_b_in_a               ((PK_TOPOL_clash_type_t) 2)
+#define PK_TOPOL_clash_exists               ((PK_TOPOL_clash_type_t) 3)
+#define PK_TOPOL_clash_abut_no_class        ((PK_TOPOL_clash_type_t) 4)
+#define PK_TOPOL_clash_abut_b_in_a          ((PK_TOPOL_clash_type_t) 5)
+#define PK_TOPOL_clash_abut_b_out_a         ((PK_TOPOL_clash_type_t) 6)
+#define PK_TOPOL_clash_interfere            ((PK_TOPOL_clash_type_t) 7)
+
+
+
+/* PK_TOPOL_clash_t */
+
+
+struct PK_TOPOL_clash_s
+    {
+    PK_TOPOL_t              target;          /* Face or Body (aka 'A') */
+    int                     target_index;    /* Index of owner in input */
+    PK_TOPOL_t              tool;            /* Face or Body ('B') */
+    int                     tool_index;      /* Index of owner in input */
+    PK_TOPOL_clash_type_t   clash_type;      /* Type of clash being reported */
+    };
+
+typedef struct PK_TOPOL_clash_s PK_TOPOL_clash_t;
+
+
+
+
+/* PK_TOPOL_clash_o_t */
+
+
+struct PK_TOPOL_clash_o_s
+    {
+    int          o_t_version;    /* Version of this PK option structure */
+    int          n_op_ex;        /* Number of entity pairs that may be ignored */
+    PK_TOPOL_t  *op_ex1;         /* First half of pairs that may be ignored */
+    PK_TOPOL_t  *op_ex2;         /* Second half of pairs that may be ignored */
+    PK_LOGICAL_t find_all;       /* Find all clashes, not just the first */
+    PK_LOGICAL_t find_intersect; /* Examine clashes for true interference */
+    PK_LOGICAL_t mul_target_tf;  /* There is one transform in tf1 for each */
+    PK_LOGICAL_t mul_tool_tf;    /* One transform in tf2 for each tool, as */
+    PK_TOPOL_t   target_owner;   /* Owning topology of target entities */
+    PK_TOPOL_t   tool_owner;     /* Owning topology of tool entities */
+    };
+
+typedef struct PK_TOPOL_clash_o_s PK_TOPOL_clash_o_t;
+
+
+
+/* PK_TOPOL_clash_o_m */
+
+
+#define PK_TOPOL_clash_o_m( opt)                                        \
+    (   (opt).o_t_version = 2,                                          \
+        (opt).n_op_ex = 0,                                              \
+        (opt).op_ex1 = (opt).op_ex2 = NULL,                             \
+        (opt).find_all = (opt).find_intersect = PK_LOGICAL_false,       \
+        (opt).mul_target_tf = (opt).mul_tool_tf = PK_LOGICAL_false,     \
+        (opt).target_owner = (opt).tool_owner = PK_ENTITY_null)
+
+
+/* PK_TOPOL_find_nabox_o_t */
+
+struct PK_TOPOL_find_nabox_o_s
+    {
+    int            o_t_version;   /* options structure version number */
+    PK_LOGICAL_t   have_axis2;    /* whether axis2 supplied */
+    PK_AXIS2_sf_t  axis2;         /* local coordinate system for nabox */
+    };
+typedef struct PK_TOPOL_find_nabox_o_s PK_TOPOL_find_nabox_o_t;
+
+
+/* PK_TOPOL_find_nabox_o_m */
+
+#define PK_TOPOL_find_nabox_o_m(options)                                      \
+    (                                                                         \
+        (options).o_t_version = 1,                                            \
+        (options).have_axis2  = PK_LOGICAL_false,                             \
+        (options).axis2.location.coord[0] = 0.0,                              \
+        (options).axis2.location.coord[1] = 0.0,                              \
+        (options).axis2.location.coord[2] = 0.0,                              \
+        (options).axis2.axis.coord[0] = 0.0,                                  \
+        (options).axis2.axis.coord[1] = 0.0,                                  \
+        (options).axis2.axis.coord[2] = 1.0,                                  \
+        (options).axis2.ref_direction.coord[0] = 1.0,                         \
+        (options).axis2.ref_direction.coord[1] = 0.0,                         \
+        (options).axis2.ref_direction.coord[2] = 0.0                          \
+    )
+
+
+/* PK_facet_local_tolerances_t */
+
+struct PK_facet_local_tolerances_s
+    {
+    double             curve_chord_tol;
+    double             curve_chord_max;
+    double             curve_chord_ang;
+    double             surface_plane_tol;
+    double             surface_plane_ang;
+    };
+typedef struct PK_facet_local_tolerances_s PK_facet_local_tolerances_t;
+
+
+/* PK_facet_local_tolerances_m */
+
+#define PK_facet_local_tolerances_m( opt )                               \
+    (   (opt).curve_chord_tol           = 0.0,                           \
+        (opt).curve_chord_max           = 0.0,                           \
+        (opt).curve_chord_ang           = 0.0,                           \
+        (opt).surface_plane_tol         = 0.0,                           \
+        (opt).surface_plane_ang         = 0.0                            )
+
+
+
+/* PK_TOPOL_facet_mesh_o_t */
+
+struct PK_TOPOL_facet_mesh_o_s
+    {
+    int                o_t_version;       /* version of this PK option struct */
+    PK_facet_shape_t   shape;             /* constraints on facet generation */
+    PK_facet_match_t   match;             /* vertex matching strategy at edges */
+    PK_facet_density_t density;           /* increased facet density */
+    PK_facet_cull_t    cull;              /* culling of view dependent facets */
+    int                n_loops;           /* array of loops in sheet bodies to */
+    PK_LOOP_t         *loops;             /* be ignored when facetting(0,NULL) */
+    int                max_facet_sides;   /* max number of sides on a facet (3) */
+    PK_LOGICAL_t    is_min_facet_width;   /* whether min_facet_width is set */
+    double             min_facet_width;   /* minimum facet width */
+    PK_LOGICAL_t    is_max_facet_width;   /* whether max_facet_width is set */
+    double             max_facet_width;   /* maximum facet width */
+    PK_LOGICAL_t    is_curve_chord_tol;   /* whether curve_chord_tol is set */
+    double             curve_chord_tol;   /* chordal tolerance between a curve */
+    PK_LOGICAL_t    is_curve_chord_max;   /* whether curve_chord_max is set */
+    double             curve_chord_max;   /* max length of chord in model units */
+    PK_LOGICAL_t    is_curve_chord_ang;   /* whether curve_chord_ang is set */
+    double             curve_chord_ang;   /* max angle between curve and chord */
+    PK_LOGICAL_t    is_surface_plane_tol; /* whether surface_plane_tol is set */
+    double             surface_plane_tol; /* distance tolerance between surface */
+    PK_LOGICAL_t    is_surface_plane_ang; /* whether surface_plane_ang is set */
+    double             surface_plane_ang; /* angular tolerance between surface */
+    PK_LOGICAL_t    is_facet_plane_tol;   /* whether facet_plane_tol is set */
+    double             facet_plane_tol;   /* max dist from facet to mid-plane */
+    PK_LOGICAL_t    is_facet_plane_ang;   /* whether facet_plane_ang is set */
+    double             facet_plane_ang;   /* facet_plane_tol : max_facet_width */
+    PK_LOGICAL_t   is_local_density_tol;  /* whether local_density_tol is set */
+    double            local_density_tol;  /* local value of surface_plane_tol */
+    PK_LOGICAL_t   is_local_density_ang;  /* whether local_density_ang is set */
+    double            local_density_ang;  /* local value of surface_plane_ang */
+    PK_facet_degen_t  degen;              /* whether to output multiple */
+    int               n_view_directions;  /* array of view directions used */
+    PK_VECTOR1_t                          /* when increasing the facet density */
+                     *view_directions;    /* (0, NULL) */
+    int               n_local_tols;       /* array of sets of local tolerances */
+    PK_facet_local_tolerances_t
+                     *local_tols;         /* (0, NULL) */
+    int               n_topols_with_local_tols;
+    PK_TOPOL_t       *topols_with_local_tols;
+    int              *local_tols_for_topols;
+    PK_facet_ignore_t ignore;             /* whether to ignore small features */
+    double            ignore_value;       /* features smaller than this will be */
+    PK_facet_ignore_scope_t
+                      ignore_scope;       /* whether to treat a face */
+    PK_facet_wire_edges_t
+                      wire_edges;         /* whether to take wire edges into */
+    PK_facet_incr_t
+                      incremental_facetting;
+    PK_facet_incr_refine_t
+                      incremental_refinement;
+    PK_facet_incr_report_t
+                      incremental_report;
+    PK_facet_inflect_t
+                      inflect;            /* Whether facets around points of */
+    PK_facet_quality_t
+                      quality;            /* Whether to perform extra checks */
+    PK_LOGICAL_t      vertices_on_planar;
+    PK_facet_respect_t
+                      respect_offset;     /* Whether to take into account faces */
+    };
+typedef struct PK_TOPOL_facet_mesh_o_s PK_TOPOL_facet_mesh_o_t;
+
+
+
+/* PK_TOPOL_facet_mesh_o_m */
+
+#define PK_TOPOL_facet_mesh_o_m( opt)                                     \
+    (   (opt).o_t_version               = 11,                              \
+        (opt).shape                     = PK_facet_shape_convex_c,        \
+        (opt).match                     = PK_facet_match_topol_c,         \
+        (opt).density                   = PK_facet_density_no_view_c,     \
+        (opt).cull                      = PK_facet_cull_none_c,           \
+        (opt).n_loops                   = 0,                              \
+        (opt).loops                     = NULL,                           \
+        (opt).max_facet_sides           = 3,                              \
+        (opt).is_min_facet_width        = PK_LOGICAL_false,               \
+        (opt).min_facet_width           = 0.0,                            \
+        (opt).is_max_facet_width        = PK_LOGICAL_false,               \
+        (opt).max_facet_width           = 0.0,                            \
+        (opt).is_curve_chord_tol        = PK_LOGICAL_false,               \
+        (opt).curve_chord_tol           = 0.0,                            \
+        (opt).is_curve_chord_max        = PK_LOGICAL_false,               \
+        (opt).curve_chord_max           = 0.0,                            \
+        (opt).is_curve_chord_ang        = PK_LOGICAL_false,               \
+        (opt).curve_chord_ang           = 0.0,                            \
+        (opt).is_surface_plane_tol      = PK_LOGICAL_false,               \
+        (opt).surface_plane_tol         = 0.0,                            \
+        (opt).is_surface_plane_ang      = PK_LOGICAL_false,               \
+        (opt).surface_plane_ang         = 0.0,                            \
+        (opt).is_facet_plane_tol        = PK_LOGICAL_false,               \
+        (opt).facet_plane_tol           = 0.0,                            \
+        (opt).is_facet_plane_ang        = PK_LOGICAL_false,               \
+        (opt).facet_plane_ang           = 0.0,                            \
+        (opt).is_local_density_tol      = PK_LOGICAL_false,               \
+        (opt).local_density_tol         = 0.0,                            \
+        (opt).is_local_density_ang      = PK_LOGICAL_false,               \
+        (opt).local_density_ang         = 0.0,                            \
+        (opt).degen                     = PK_facet_degen_multiple_vxs_c,  \
+        (opt).n_view_directions         = 0,                              \
+        (opt).view_directions           = NULL,                           \
+        (opt).n_local_tols              = 0,                              \
+        (opt).local_tols                = NULL,                           \
+        (opt).n_topols_with_local_tols  = 0,                              \
+        (opt).topols_with_local_tols    = NULL,                           \
+        (opt).local_tols_for_topols     = NULL,                           \
+        (opt).ignore                    = PK_facet_ignore_no_c,           \
+        (opt).ignore_value              = 0.0,                            \
+        (opt).ignore_scope              = PK_facet_ignore_scope_global_c, \
+        (opt).wire_edges                = PK_facet_wire_edges_no_c,       \
+        (opt).incremental_facetting     = PK_facet_incr_no_c,             \
+        (opt).incremental_refinement    = PK_facet_incr_refine_no_c,      \
+        (opt).incremental_report        = PK_facet_incr_report_no_c,      \
+        (opt).inflect                   = PK_facet_inflect_no_c,          \
+        (opt).quality                   = PK_facet_quality_standard_c,    \
+        (opt).vertices_on_planar        = PK_LOGICAL_false,               \
+        (opt).respect_offset            = PK_facet_respect_no_c           )
+
+
+
+/* PK_TOPOL_facet_mesh_2_o_t */
+
+struct PK_TOPOL_facet_mesh_2_o_s
+    {
+    int                o_t_version;       /* version of this PK option struct */
+    PK_facet_shape_t   shape;             /* constraints on facet generation */
+    PK_facet_match_t   match;             /* vertex matching strategy at edges */
+    PK_facet_density_t density;           /* increased facet density */
+    int                n_view_directions; /* array of view directions in which */
+    PK_VECTOR1_t      *view_directions;   /* (0, NULL) */
+    PK_facet_cull_t    cull;              /* culling of view dependent facets */
+    int                n_cull_transfs;    /* array of view transformations in */
+    PK_TRANSF_t       *cull_transfs;      /* (0, NULL) */
+    int                n_loops;           /* array of loops in sheet bodies to */
+    PK_LOOP_t         *loops;             /* be ignored when facetting(0,NULL) */
+    int                max_facet_sides;   /* max number of sides on a facet (3) */
+    PK_LOGICAL_t    is_min_facet_width;   /* whether min_facet_width is set */
+    double             min_facet_width;   /* minimum facet width */
+    PK_LOGICAL_t    is_max_facet_width;   /* whether max_facet_width is set */
+    double             max_facet_width;   /* maximum facet width */
+    PK_LOGICAL_t    is_curve_chord_tol;   /* whether curve_chord_tol is set */
+    double             curve_chord_tol;   /* chordal tolerance between a curve */
+    PK_LOGICAL_t    is_curve_chord_max;   /* whether curve_chord_max is set */
+    double             curve_chord_max;   /* max length of chord in model units */
+    PK_LOGICAL_t    is_curve_chord_ang;   /* whether curve_chord_ang is set */
+    double             curve_chord_ang;   /* max angle between curve and chord */
+    PK_LOGICAL_t    is_surface_plane_tol; /* whether surface_plane_tol is set */
+    double             surface_plane_tol; /* distance tolerance between surface */
+    PK_LOGICAL_t    is_surface_plane_ang; /* whether surface_plane_ang is set */
+    double             surface_plane_ang; /* angular tolerance between surface */
+    PK_LOGICAL_t    is_facet_plane_tol;   /* whether facet_plane_tol is set */
+    double             facet_plane_tol;   /* max dist from facet to mid-plane */
+    PK_LOGICAL_t    is_facet_plane_ang;   /* whether facet_plane_ang is set */
+    double             facet_plane_ang;   /* facet_plane_tol : max_facet_width */
+    PK_LOGICAL_t    is_local_density_tol; /* whether local_density_tol is set */
+    double             local_density_tol; /* local value of surface_plane_tol */
+    PK_LOGICAL_t    is_local_density_ang; /* whether local_density_ang is set */
+    double             local_density_ang; /* local value of surface_plane_ang */
+    int                n_local_tols;      /* array of sets of local tolerances */
+    PK_facet_local_tolerances_t
+                      *local_tols;        /* (0, NULL) */
+    int                n_topols_with_local_tols;
+    PK_TOPOL_t        *topols_with_local_tols;
+    int               *local_tols_for_topols;
+    PK_facet_ignore_t  ignore;            /* whether to ignore small features */
+    double             ignore_value;      /* features smaller than this will be */
+    PK_facet_ignore_scope_t
+                       ignore_scope;      /* whether to treat a face */
+    PK_facet_wire_edges_t
+                       wire_edges;        /* whether to take wire edges into */
+    PK_facet_incr_t
+                       incremental_facetting;
+    PK_facet_incr_refine_t
+                       incremental_refinement;
+    PK_facet_incr_report_t
+                       incremental_report;
+    PK_facet_inflect_t inflect;           /* Whether facets around points of */
+    PK_facet_quality_t quality;           /* Whether to perform extra checks */
+    PK_LOGICAL_t       vertices_on_planar;
+    PK_facet_sing_topol_t
+                       sing_topol;        /* facet topology required around a */
+    PK_facet_respect_t
+                       respect_offset;    /* Whether to take into account faces */
+    };
+typedef struct PK_TOPOL_facet_mesh_2_o_s PK_TOPOL_facet_mesh_2_o_t;
+
+
+
+/* PK_TOPOL_facet_mesh_2_o_m */
+
+#define PK_TOPOL_facet_mesh_2_o_m( opt)                                   \
+    (   (opt).o_t_version               = 17,                             \
+        (opt).shape                     = PK_facet_shape_convex_c,        \
+        (opt).match                     = PK_facet_match_topol_c,         \
+        (opt).density                   = PK_facet_density_no_view_c,     \
+        (opt).n_view_directions         = 0,                              \
+        (opt).view_directions           = NULL,                           \
+        (opt).cull                      = PK_facet_cull_none_c,           \
+        (opt).n_cull_transfs            = 0,                              \
+        (opt).cull_transfs              = NULL,                           \
+        (opt).n_loops                   = 0,                              \
+        (opt).loops                     = NULL,                           \
+        (opt).max_facet_sides           = 3,                              \
+        (opt).is_min_facet_width        = PK_LOGICAL_false,               \
+        (opt).min_facet_width           = 0.0,                            \
+        (opt).is_max_facet_width        = PK_LOGICAL_false,               \
+        (opt).max_facet_width           = 0.0,                            \
+        (opt).is_curve_chord_tol        = PK_LOGICAL_false,               \
+        (opt).curve_chord_tol           = 0.0,                            \
+        (opt).is_curve_chord_max        = PK_LOGICAL_false,               \
+        (opt).curve_chord_max           = 0.0,                            \
+        (opt).is_curve_chord_ang        = PK_LOGICAL_false,               \
+        (opt).curve_chord_ang           = 0.0,                            \
+        (opt).is_surface_plane_tol      = PK_LOGICAL_false,               \
+        (opt).surface_plane_tol         = 0.0,                            \
+        (opt).is_surface_plane_ang      = PK_LOGICAL_false,               \
+        (opt).surface_plane_ang         = 0.0,                            \
+        (opt).is_facet_plane_tol        = PK_LOGICAL_false,               \
+        (opt).facet_plane_tol           = 0.0,                            \
+        (opt).is_facet_plane_ang        = PK_LOGICAL_false,               \
+        (opt).facet_plane_ang           = 0.0,                            \
+        (opt).is_local_density_tol      = PK_LOGICAL_false,               \
+        (opt).local_density_tol         = 0.0,                            \
+        (opt).is_local_density_ang      = PK_LOGICAL_false,               \
+        (opt).local_density_ang         = 0.0,                            \
+        (opt).n_local_tols              = 0,                              \
+        (opt).local_tols                = NULL,                           \
+        (opt).n_topols_with_local_tols  = 0,                              \
+        (opt).topols_with_local_tols    = NULL,                           \
+        (opt).local_tols_for_topols     = NULL,                           \
+        (opt).ignore                    = PK_facet_ignore_no_c,           \
+        (opt).ignore_value              = 0.0,                            \
+        (opt).ignore_scope              = PK_facet_ignore_scope_global_c, \
+        (opt).wire_edges                = PK_facet_wire_edges_no_c,       \
+        (opt).incremental_facetting     = PK_facet_incr_no_c,             \
+        (opt).incremental_refinement    = PK_facet_incr_refine_no_c,      \
+        (opt).incremental_report        = PK_facet_incr_report_no_c,      \
+        (opt).inflect                   = PK_facet_inflect_no_c,          \
+        (opt).quality                   = PK_facet_quality_standard_c,    \
+        (opt).vertices_on_planar        = PK_LOGICAL_false,               \
+        (opt).sing_topol                = PK_facet_sing_topol_default_c,  \
+        (opt).respect_offset            = PK_facet_respect_no_c           )
+
+
+
+/* PK_TOPOL_facet_tables_cb_f_t */
+
+typedef  PK_ERROR_code_t  (*PK_TOPOL_facet_tables_cb_f_t)
+(
+/* received */
+PK_TOPOL_t                   /*topol*/,      /* body that facets belong to */
+PK_TRANSF_t                  /*transform*/,  /* transform associated with body */
+PK_TOPOL_facet_2_r_t *const  /*tables*/,     /* returned facet tables */
+PK_POINTER_t                 /*context*/     /* context */
+);
+
+
+/* PK_TOPOL_facet_choice_o_t */
+
+struct PK_TOPOL_facet_choice_o_s
+    {
+    int        o_t_version;               /* version of this PK option struct */
+    PK_LOGICAL_t facet_fin;
+    PK_LOGICAL_t fin_fin;
+    PK_LOGICAL_t fin_vertex;
+    PK_LOGICAL_t vertex_point;
+    PK_LOGICAL_t vertex_normal;
+    PK_LOGICAL_t vertex_param;
+    PK_LOGICAL_t point_vec;
+    PK_LOGICAL_t normal_vec;
+    PK_LOGICAL_t param_uv;
+    PK_LOGICAL_t param_dp;
+    PK_LOGICAL_t param_d2p;
+    PK_LOGICAL_t facet_face;
+    PK_LOGICAL_t facet_occ;
+    PK_LOGICAL_t edge_fin;
+    PK_LOGICAL_t edge_occ;
+    PK_LOGICAL_t error_facet;
+    };
+    typedef struct PK_TOPOL_facet_choice_o_s PK_TOPOL_facet_choice_o_t;
+
+
+
+/* PK_TOPOL_facet_choice_o_m */
+
+#define PK_TOPOL_facet_choice_o_m( opt )                                \
+    (   (opt).o_t_version                = 11,                          \
+        (opt).facet_fin                  = PK_LOGICAL_true,             \
+        (opt).fin_fin                    = PK_LOGICAL_true,             \
+        (opt).fin_vertex                 = PK_LOGICAL_true,             \
+        (opt).vertex_point               = PK_LOGICAL_true,             \
+        (opt).vertex_normal              = PK_LOGICAL_false,            \
+        (opt).vertex_param               = PK_LOGICAL_false,            \
+        (opt).point_vec                  = PK_LOGICAL_true,             \
+        (opt).normal_vec                 = PK_LOGICAL_false,            \
+        (opt).param_uv                   = PK_LOGICAL_false,            \
+        (opt).param_dp                   = PK_LOGICAL_false,            \
+        (opt).param_d2p                  = PK_LOGICAL_false,            \
+        (opt).facet_face                 = PK_LOGICAL_false,            \
+        (opt).facet_occ                  = PK_LOGICAL_false,            \
+        (opt).edge_fin                   = PK_LOGICAL_false,            \
+        (opt).edge_occ                   = PK_LOGICAL_false,            \
+        (opt).error_facet                = PK_LOGICAL_false             )
+
+
+/* PK_TOPOL_facet_choice_2_o_t */
+
+struct PK_TOPOL_facet_choice_2_o_s
+    {
+    int             o_t_version;            /* version of this PK option struct */
+    int             max_facets_per_strip;   /* (10000) */
+    PK_facet_split_strip_t                  /* whether to split strips so that */
+                    split_strips;           /* no strip spans more than a */
+    PK_facet_consistent_parms_t             /* whether to force surface */
+                    consistent_parms;       /* parameters for facet vertices */
+    PK_facet_smp_t  smp;                    /* whether to multi-thread */
+    PK_TOPOL_facet_tables_cb_f_t            /* callback function for returning */
+                    facet_tables_cb;        /* facet tables (NULL) */
+    PK_POINTER_t    facet_tables_context;   /* context for callback (NULL) */
+    PK_LOGICAL_t    thread_safe;            /* whether the callback function is */
+    PK_facet_pt_report_t
+                    report_pts_off_topol;   /* whether to report facet points */
+    PK_LOGICAL_t    facet_fin;              /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    strip_boundary;         /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    strip_zigzag;           /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    fin_fin;                /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    fin_data;               /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    data_point_idx;         /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    data_normal_idx;        /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    data_param_idx;         /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    data_deriv_idx;         /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    point_vec;              /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    normal_vec;             /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    param_uv;               /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    deriv_dp;               /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    deriv_d2p;              /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    facet_face;             /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    strip_face;             /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    fin_edge;               /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    point_topol;            /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    fin_topol;              /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t    error_object;           /* (PK_LOGICAL_false) */
+    };
+    typedef struct PK_TOPOL_facet_choice_2_o_s PK_TOPOL_facet_choice_2_o_t;
+
+
+
+/* PK_TOPOL_facet_choice_2_o_m */
+
+#define PK_TOPOL_facet_choice_2_o_m( opt )                                 \
+    (   (opt).o_t_version                = 17,                             \
+        (opt).max_facets_per_strip       = 10000,                          \
+        (opt).split_strips               = PK_facet_split_strip_no_c,      \
+        (opt).consistent_parms           = PK_facet_consistent_parms_no_c, \
+        (opt).smp                        = PK_facet_smp_no_c,              \
+        (opt).facet_tables_cb            = NULL,                           \
+        (opt).facet_tables_context       = NULL,                           \
+        (opt).thread_safe                = PK_LOGICAL_false,               \
+        (opt).report_pts_off_topol       = PK_facet_pt_report_no_c,        \
+        (opt).facet_fin                  = PK_LOGICAL_false,               \
+        (opt).strip_boundary             = PK_LOGICAL_false,               \
+        (opt).strip_zigzag               = PK_LOGICAL_false,               \
+        (opt).fin_fin                    = PK_LOGICAL_false,               \
+        (opt).fin_data                   = PK_LOGICAL_false,               \
+        (opt).data_point_idx             = PK_LOGICAL_false,               \
+        (opt).data_normal_idx            = PK_LOGICAL_false,               \
+        (opt).data_param_idx             = PK_LOGICAL_false,               \
+        (opt).data_deriv_idx             = PK_LOGICAL_false,               \
+        (opt).point_vec                  = PK_LOGICAL_false,               \
+        (opt).normal_vec                 = PK_LOGICAL_false,               \
+        (opt).param_uv                   = PK_LOGICAL_false,               \
+        (opt).deriv_dp                   = PK_LOGICAL_false,               \
+        (opt).deriv_d2p                  = PK_LOGICAL_false,               \
+        (opt).facet_face                 = PK_LOGICAL_false,               \
+        (opt).strip_face                 = PK_LOGICAL_false,               \
+        (opt).fin_edge                   = PK_LOGICAL_false,               \
+        (opt).point_topol                = PK_LOGICAL_false,               \
+        (opt).fin_topol                  = PK_LOGICAL_false,               \
+        (opt).error_object               = PK_LOGICAL_false                )
+
+
+/* PK_TOPOL_facet_o_t */
+
+struct PK_TOPOL_facet_o_s
+    {
+    PK_TOPOL_facet_mesh_o_t       control;
+    PK_TOPOL_facet_choice_o_t      choice;
+    };
+typedef struct PK_TOPOL_facet_o_s PK_TOPOL_facet_o_t;
+
+
+
+/* PK_TOPOL_facet_o_m */
+
+#define PK_TOPOL_facet_o_m(opt)                 \
+    (                                           \
+    PK_TOPOL_facet_mesh_o_m( (opt).control ),   \
+    PK_TOPOL_facet_choice_o_m( (opt).choice )   \
+    )
+
+
+/* PK_TOPOL_facet_2_o_t */
+
+struct PK_TOPOL_facet_2_o_s
+    {
+    PK_TOPOL_facet_mesh_2_o_t      control;
+    PK_TOPOL_facet_choice_2_o_t    choice;
+    };
+typedef struct PK_TOPOL_facet_2_o_s PK_TOPOL_facet_2_o_t;
+
+
+
+/* PK_TOPOL_facet_2_o_m */
+
+#define PK_TOPOL_facet_2_o_m(opt)               \
+    (                                           \
+    PK_TOPOL_facet_mesh_2_o_m( (opt).control ), \
+    PK_TOPOL_facet_choice_2_o_m( (opt).choice ) \
+    )
+
+
+/* PK_TOPOL_render_facet_go_o_t */
+
+struct PK_TOPOL_render_facet_go_o_s
+    {
+    int                       o_t_version;    /* version of PK option struct */
+    PK_facet_go_normals_t     go_normals;     /* whether to output GO surface */
+    PK_facet_go_parameters_t  go_parameters;  /* whether to output GO surf */
+    PK_facet_go_edges_t       go_edges;       /* whether to output GO edge */
+    PK_facet_go_strips_t      go_strips;      /* whether to output facets in */
+    int                       go_max_facets_per_strip;
+    PK_facet_go_interleaved_t go_interleaved; /* whether to interleave the */
+    PK_facet_split_strip_t    split_strips;   /* whether to split facet strips */
+    PK_facet_consistent_parms_t consistent_parms;
+
+    };
+typedef struct PK_TOPOL_render_facet_go_o_s PK_TOPOL_render_facet_go_o_t;
+
+
+
+/* PK_TOPOL_render_facet_go_o_m */
+
+#define PK_TOPOL_render_facet_go_o_m( opt )                                \
+    (   (opt).o_t_version                = 11,                             \
+        (opt).go_normals                 = PK_facet_go_normals_no_c,       \
+        (opt).go_parameters              = PK_facet_go_parameters_no_c,    \
+        (opt).go_edges                   = PK_facet_go_edges_no_c,         \
+        (opt).go_strips                  = PK_facet_go_strips_no_c,        \
+        (opt).go_max_facets_per_strip    = 0,                              \
+        (opt).go_interleaved             = PK_facet_go_interleaved_no_c,   \
+        (opt).split_strips               = PK_facet_split_strip_no_c,      \
+        (opt).consistent_parms           = PK_facet_consistent_parms_no_c  )
+
+
+/* PK_TOPOL_render_facet_o_t */
+
+struct PK_TOPOL_render_facet_o_s
+    {
+    PK_TOPOL_facet_mesh_o_t       control;
+    PK_TOPOL_render_facet_go_o_t  go_option;
+    };
+typedef struct PK_TOPOL_render_facet_o_s PK_TOPOL_render_facet_o_t;
+
+
+
+
+/* PK_TOPOL_render_facet_o_m */
+
+#define PK_TOPOL_render_facet_o_m(opt)              \
+    (                                               \
+    PK_TOPOL_facet_mesh_o_m( (opt).control ),       \
+    PK_TOPOL_render_facet_go_o_m( (opt).go_option ) \
+    )
+
+
+/* PK_TOPOL_eval_mass_props_o_t */
+
+struct PK_TOPOL_eval_mass_props_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_mass_t           mass;            /* required mass properties */
+    PK_mass_periphery_t periphery;       /* periphery required */
+    PK_mass_bound_t     bound;           /* bounds on results required */
+    PK_LOGICAL_t        single;          /* whether to treat topols as */
+    PK_LOGICAL_t        use_facets;      /* whether to use alternative facetted */
+    double              facet_tol;       /* chordal tolerance to use for facets */
+    PK_mass_local_density_t
+                        same_dim_density;
+    PK_mass_local_density_t
+                        lower_dim_density;
+    };
+
+typedef struct PK_TOPOL_eval_mass_props_o_s PK_TOPOL_eval_mass_props_o_t;
+
+
+
+/* PK_TOPOL_eval_mass_props_o_m */
+
+#define PK_TOPOL_eval_mass_props_o_m(options)            \
+    (                                                    \
+       (options).o_t_version = 3,                        \
+       (options).mass        = PK_mass_m_of_i_c,         \
+       (options).periphery   = PK_mass_periphery_yes_c,  \
+       (options).bound       = PK_mass_bound_no_c,       \
+       (options).single      = PK_LOGICAL_false,         \
+       (options).use_facets  = PK_LOGICAL_false,         \
+       (options).facet_tol   = 0.0,                      \
+       (options).same_dim_density = PK_mass_local_density_unset_c, \
+       (options).lower_dim_density = PK_mass_local_density_unset_c \
+    )
+
+
+/* PK_TOPOL_range_o_t */
+
+struct PK_TOPOL_range_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* whether tolerance value is provided */
+    double              tolerance;       /* tolerance on accuracy of distance */
+    PK_range_bound_t    bound;           /* bounds on the minimum/maximum */
+    PK_range_guess_t    guesses[2];      /* guesses for each end */
+    PK_range_type_t     range_type;      /* whether to find the global minimum */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_TOPOL_range_o_s PK_TOPOL_range_o_t;
+
+
+
+/* PK_TOPOL_range_o_m */
+
+#define PK_TOPOL_range_o_m(options)                                      \
+    (                                                                    \
+       (options).o_t_version                = 3,                         \
+       (options).have_tolerance             = PK_LOGICAL_false,          \
+       (options).tolerance                  = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                              \
+       PK_range_guess_m( (options).guesses[0] ),                         \
+       PK_range_guess_m( (options).guesses[1] ),                         \
+       (options).range_type                 = PK_range_type_minimum_c,   \
+       (options).opt_level                  = PK_range_opt_performance_c \
+    )
+
+
+/* PK_TOPOL_range_local_o_t */
+
+struct PK_TOPOL_range_local_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_TOPOL_range_local_o_s PK_TOPOL_range_local_o_t;
+
+
+
+/* PK_TOPOL_range_local_o_m */
+
+#define PK_TOPOL_range_local_o_m(options)                            \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_TOPOL_range_array_o_t */
+
+struct PK_TOPOL_range_array_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_bound_t    bound;           /* bounds on min/max separation */
+    PK_range_type_t     range_type;      /* whether to find the global minimum */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_TOPOL_range_array_o_s PK_TOPOL_range_array_o_t;
+
+
+
+/* PK_TOPOL_range_array_o_m */
+
+#define PK_TOPOL_range_array_o_m(options)                            \
+    (                                                                \
+       (options).o_t_version            = 3,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).range_type             = PK_range_type_minimum_c,   \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_TOPOL_range_vector_o_t */
+
+struct PK_TOPOL_range_vector_o_s
+    {
+    int                     o_t_version;     /* version number of option */
+    PK_LOGICAL_t            have_tolerance;  /* (PK_LOGICAL_false) */
+    double                  tolerance;       /* tolerance */
+    PK_range_bound_t        bound;           /* bounds on min separation */
+    PK_range_guess_t        guess;           /* guess for end on `topol' */
+    PK_range_opt_t          opt_level;       /* the level of analysis */
+    PK_range_param_entity_t param_entity;    /* option to return a vector and */
+   };
+
+typedef struct PK_TOPOL_range_vector_o_s PK_TOPOL_range_vector_o_t;
+
+
+
+/* PK_TOPOL_range_vector_o_m */
+
+#define PK_TOPOL_range_vector_o_m(options)                           \
+    (                                                                \
+       (options).o_t_version            = 3,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       PK_range_guess_m( (options).guess ),                          \
+       (options).opt_level              = PK_range_opt_performance_c,\
+       (options).param_entity           = PK_range_param_entity_topol_c  \
+    )
+
+
+/* PK_TOPOL_range_local_vector_o_t */
+
+struct PK_TOPOL_range_local_vector_o_s
+    {
+    int                 o_t_version;      /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;   /* (PK_LOGICAL_false) */
+    double              tolerance;        /* tolerance */
+    PK_range_type_t     range_type;       /* whether to find local minima */
+    PK_LOGICAL_t        orthogonal_only;  /* whether to find only */
+    PK_range_opt_t      opt_level;        /* the level of analysis */
+    PK_range_param_entity_t param_entity; /* option to return a vector and */
+    };
+
+typedef struct PK_TOPOL_range_local_vector_o_s PK_TOPOL_range_local_vector_o_t;
+
+
+
+/* PK_TOPOL_range_local_vector_o_m */
+
+#define PK_TOPOL_range_local_vector_o_m(options)                     \
+    (                                                                \
+       (options).o_t_version            = 4,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       (options).range_type             = PK_range_type_minimum_c,   \
+       (options).orthogonal_only        = PK_LOGICAL_false,          \
+       (options).opt_level              = PK_range_opt_performance_c,\
+       (options).param_entity           = PK_range_param_entity_topol_c  \
+    )
+
+
+/* PK_TOPOL_range_array_vector_o_t */
+
+struct PK_TOPOL_range_array_vector_o_s
+    {
+    int                     o_t_version;     /* version number of */
+    PK_LOGICAL_t            have_tolerance;  /* (PK_LOGICAL_false) */
+    double                  tolerance;       /* tolerance */
+    PK_range_bound_t        bound;           /* bounds on min separation */
+    PK_range_opt_t          opt_level;       /* the level of analysis */
+    PK_range_param_entity_t param_entity;    /* option to return a vector and */
+    };
+
+typedef struct PK_TOPOL_range_array_vector_o_s PK_TOPOL_range_array_vector_o_t;
+
+
+
+/* PK_TOPOL_range_array_vector_o_m */
+
+#define PK_TOPOL_range_array_vector_o_m(options)                     \
+    (                                                                \
+       (options).o_t_version            = 3,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).opt_level              = PK_range_opt_performance_c,\
+       (options).param_entity           = PK_range_param_entity_topol_c  \
+    )
+
+
+/* PK_TOPOL_range_geom_o_t */
+
+struct PK_TOPOL_range_geom_o_s
+    {
+    int                    o_t_version;     /* version number of option */
+    PK_LOGICAL_t           have_tolerance;  /* whether tolerance value is */
+    double                 tolerance;       /* tolerance on accuracy of */
+    PK_range_bound_t       bound;           /* bounds on the minimum/maximum */
+    PK_range_guess_t       guesses[2];      /* guesses for each end */
+    PK_range_type_t        range_type;      /* whether to find the global */
+    PK_range_param_bound_t param_bound;     /* parameter range for the */
+    PK_range_opt_t         opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_TOPOL_range_geom_o_s PK_TOPOL_range_geom_o_t;
+
+
+
+/* PK_TOPOL_range_geom_o_m */
+
+#define PK_TOPOL_range_geom_o_m(options)                                 \
+    (                                                                    \
+       (options).o_t_version                = 2,                         \
+       (options).have_tolerance             = PK_LOGICAL_false,          \
+       (options).tolerance                  = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                              \
+       PK_range_guess_m( (options).guesses[0] ),                         \
+       PK_range_guess_m( (options).guesses[1] ),                         \
+       (options).range_type                 = PK_range_type_minimum_c,   \
+       PK_range_param_bound_m( (options).param_bound ),                  \
+       (options).opt_level                  = PK_range_opt_performance_c \
+    )
+
+
+/* PK_TOPOL_range_geom_array_o_t */
+
+struct PK_TOPOL_range_geom_array_o_s
+    {
+    int                     o_t_version;     /* version number of option */
+    PK_LOGICAL_t            have_tolerance;  /* whether tolerance value is */
+    double                  tolerance;       /* tolerance on accuracy of */
+    PK_range_bound_t        bound;           /* bounds on min/max separation */
+    PK_range_type_t         range_type;      /* whether to find the global */
+    PK_range_param_bound_t *param_bounds;    /* parameter ranges for */
+    PK_range_opt_t           opt_level;      /* the level of analysis */
+    };
+
+typedef struct PK_TOPOL_range_geom_array_o_s PK_TOPOL_range_geom_array_o_t;
+
+
+
+
+/* PK_TOPOL_range_geom_array_o_m */
+
+#define PK_TOPOL_range_geom_array_o_m(options)                       \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).range_type             = PK_range_type_minimum_c,   \
+       (options).param_bounds           = NULL,                      \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_TOPOL_render_line_o_t */
+
+struct PK_TOPOL_render_line_o_s
+    {
+    int                      o_t_version; /* version of this PK option struct */
+    PK_render_edge_t         edge;        /* whether to draw edges */
+    PK_render_silhouette_t   silhouette;  /* whether to draw silhouettes */
+    PK_render_planar_t       planar;      /* whether to draw planar hatching */
+    PK_render_radial_t       radial;      /* whether to draw radial hatching */
+    PK_render_param_t        param;       /* whether to draw parametric hatch */
+    PK_render_unfix_t        unfix;       /* whether to draw unfixed blends */
+    PK_render_vis_t          visibility;  /* whether to determine visibility */
+    PK_render_smooth_t       smooth;      /* whether to indicate smooth edges */
+    PK_render_internal_t     internal;    /* whether to indicate internal edges */
+    PK_render_region_t       region;      /* whether to produce regional data */
+    PK_render_hierarch_t     hierarch;    /* whether to produce hierarchical */
+    PK_render_bcurve_t       bcurve;      /* method for rendering bcurves */
+    PK_render_viewport_t     viewport;    /* whether to use viewport(s) */
+    PK_render_invisible_t    invisible;   /* whether to output invisible lines */
+    PK_render_drafting_t     drafting;    /* whether to distinguish lines */
+    PK_render_self_hidden_t  self_hidden; /* whether to distinguish lines */
+    PK_LOGICAL_t             is_curve_chord_tol;
+    double                   curve_chord_tol;
+    PK_LOGICAL_t             is_curve_chord_max;
+    double                   curve_chord_max;
+    PK_LOGICAL_t             is_curve_chord_ang;
+    double                   curve_chord_ang;
+    double                   planar_spacing;
+    PK_AXIS1_sf_t            planar_axis;
+    double                   radial_around;
+    double                   radial_along;
+    double                   radial_about;
+    double                   param_u;
+    double                   param_v;
+    double                   unfix_spacing;
+    PK_NABOX_sf_t            viewport_sf;
+    double                   radial_around_start;
+    double                   radial_along_start;
+    double                   radial_about_start;
+    double                   param_u_start;
+    double                   param_v_start;
+    PK_render_ignore_t       ignore;
+    double                   ignore_value;
+    PK_render_overlap_t      overlap;
+    PK_render_memory_target_t   memory_target;
+    size_t                   memory_target_value;
+    PK_LOGICAL_t             is_edge_smooth_tol;
+    double                   edge_smooth_tol;
+    int                      n_viewports;
+    const PK_NABOX_sf_t     *viewports;
+    PK_render_transparent_t transparent;  /* whether to draw transparent bodies */
+    int                     n_transparent_indices;
+    const int              *transparent_indices;
+    PK_render_transp_hid_t  transparent_hid;
+    int                     n_overlap_indices;
+    const int              *overlap_indices1;
+    const int              *overlap_indices2;
+    int                     n_overlap_indices2;
+    int                     n_suppressed_indices;
+    const int              *suppressed_indices;
+    PK_render_ske_missing_t ske_missing;  /* whether to draw bodies with */
+    PK_render_viewport_type_t viewport_type;
+    PK_render_viewport_clip_t viewport_clipping;
+    PK_render_report_line_t report_lines;  /* whether to report line fit */
+    };
+typedef struct PK_TOPOL_render_line_o_s PK_TOPOL_render_line_o_t;
+
+
+
+/* PK_TOPOL_render_null_g */
+
+#define PK_TOPOL_render_null_g -1.0E36
+
+
+/* PK_TOPOL_render_line_o_m */
+
+
+
+#define PK_TOPOL_render_line_o_m( opt)                                  \
+    (   (opt).o_t_version = 18,                                         \
+        (opt).edge        = PK_render_edge_yes_c,                       \
+        (opt).silhouette  = PK_render_silhouette_no_c,                  \
+        (opt).planar      = PK_render_planar_no_c,                      \
+        (opt).radial      = PK_render_radial_no_c,                      \
+        (opt).param       = PK_render_param_no_c,                       \
+        (opt).unfix       = PK_render_unfix_no_c,                       \
+        (opt).visibility  = PK_render_vis_no_c,                         \
+        (opt).smooth      = PK_render_smooth_no_c,                      \
+        (opt).internal    = PK_render_internal_no_c,                    \
+        (opt).region      = PK_render_region_no_c,                      \
+        (opt).hierarch    = PK_render_hierarch_no_c,                    \
+        (opt).bcurve      = PK_render_bcurve_polyline_c,                \
+        (opt).viewport    = PK_render_viewport_no_c,                    \
+        (opt).invisible   = PK_render_invisible_no_c,                   \
+        (opt).drafting    = PK_render_drafting_no_c,                    \
+        (opt).self_hidden = PK_render_self_hidden_no_c,                 \
+        (opt).is_curve_chord_tol            = PK_LOGICAL_false,         \
+        (opt).curve_chord_tol               = 0.0,                      \
+        (opt).is_curve_chord_max            = PK_LOGICAL_false,         \
+        (opt).curve_chord_max               = 0.0,                      \
+        (opt).is_curve_chord_ang            = PK_LOGICAL_false,         \
+        (opt).curve_chord_ang               = 0.0,                      \
+        (opt).planar_spacing                = 0.0,                      \
+        (opt).planar_axis.location.coord[0] = 0.0,                      \
+        (opt).planar_axis.location.coord[1] = 0.0,                      \
+        (opt).planar_axis.location.coord[2] = 0.0,                      \
+        (opt).planar_axis.axis.coord[0]     = 0.0,                      \
+        (opt).planar_axis.axis.coord[1]     = 0.0,                      \
+        (opt).planar_axis.axis.coord[2]     = 0.0,                      \
+        (opt).radial_around                 = 0.0,                      \
+        (opt).radial_along                  = 0.0,                      \
+        (opt).radial_about                  = 0.0,                      \
+        (opt).param_u                       = 0.0,                      \
+        (opt).param_v                       = 0.0,                      \
+        (opt).unfix_spacing                 = 0.0,                      \
+        (opt).radial_around_start           = PK_TOPOL_render_null_g,   \
+        (opt).radial_along_start            = PK_TOPOL_render_null_g,   \
+        (opt).radial_about_start            = PK_TOPOL_render_null_g,   \
+        (opt).param_u_start                 = PK_TOPOL_render_null_g,   \
+        (opt).param_v_start                 = PK_TOPOL_render_null_g,   \
+        (opt).ignore_value                  = 0.0,                      \
+        (opt).ignore                        = PK_render_ignore_no_c,    \
+        (opt).overlap                       = PK_render_overlap_no_c,   \
+        (opt).memory_target                 = PK_render_memory_target_no_c,\
+        (opt).memory_target_value           = 0,                        \
+        (opt).is_edge_smooth_tol            = PK_LOGICAL_false,         \
+        (opt).edge_smooth_tol               = 0.0,                      \
+        (opt).viewports                     = NULL,                     \
+        (opt).n_viewports                   = 0,                        \
+        (opt).transparent                   = PK_render_transparent_no_c,\
+        (opt).n_transparent_indices         = 0,                        \
+        (opt).transparent_indices           = NULL,                     \
+        (opt).transparent_hid               = PK_render_transp_hid_no_c,\
+        (opt).n_overlap_indices             = 0,                        \
+        (opt).overlap_indices1              = NULL,                     \
+        (opt).overlap_indices2              = NULL,                     \
+        (opt).n_overlap_indices2            = 0,                        \
+        (opt).n_suppressed_indices          = 0,                        \
+        (opt).suppressed_indices            = NULL,                     \
+        (opt).ske_missing                   = PK_render_ske_missing_no_c,   \
+        (opt).viewport_type                 = PK_render_viewport_type_3D_c, \
+        (opt).viewport_clipping             = PK_render_viewport_clip_no_c, \
+        (opt).report_lines                  = PK_render_report_line_no_c    \
+    )
+
+
+/* PK_CURVE_make_approx_o_t */
+
+struct PK_CURVE_make_approx_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_CURVE_approx_t   approx_type;     /* approximation type */
+    double              tolerance;       /* tolerance ( 0.00001 ) */
+    };
+
+typedef struct PK_CURVE_make_approx_o_s PK_CURVE_make_approx_o_t;
+
+
+
+/* PK_CURVE_make_approx_o_m */
+
+#define PK_CURVE_make_approx_o_m( options )                     \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).approx_type    = PK_CURVE_approx_arclength_c,  \
+       (options).tolerance      = 0.00001                       \
+    )
+
+
+/* PK_CURVE_embed_in_surf_o_t */
+
+struct PK_CURVE_embed_in_surf_o_s
+    {
+    int             o_t_version;          /* option structure version */
+    PK_LOGICAL_t    have_curve_interval;  /* whether have interval */
+    PK_INTERVAL_t   curve_interval;       /* parameteric interval of curve */
+    };
+typedef struct PK_CURVE_embed_in_surf_o_s PK_CURVE_embed_in_surf_o_t;
+
+
+/* PK_CURVE_embed_in_surf_o_m */
+
+#define PK_CURVE_embed_in_surf_o_m(options)                             \
+    (                                                                   \
+       (options).o_t_version                = 1,                        \
+       (options).have_curve_interval        = PK_LOGICAL_false,         \
+       (options).curve_interval.value[0]    = 0.0,                      \
+       (options).curve_interval.value[1]    = 1.0                       \
+    )
+
+
+/* PK_CURVE_find_discontinuity_o_t */
+
+struct PK_CURVE_find_discontinuity_o_s
+    {
+    int             o_t_version;    /* option structure version */
+    PK_continuity_t level;          /* indicates level and type of query */
+    PK_LOGICAL_t    have_interval;  /* whether to query a curve portion */
+    PK_INTERVAL_t   interval;       /* curve portion to query */
+    };
+typedef struct PK_CURVE_find_discontinuity_o_s
+   PK_CURVE_find_discontinuity_o_t;
+
+
+/* PK_CURVE_find_discontinuity_o_m */
+
+#define PK_CURVE_find_discontinuity_o_m(options)                           \
+    (                                                                      \
+       (options).o_t_version              = 1,                             \
+       (options).level                    = PK_continuity_c3_c,            \
+       (options).have_interval            = PK_LOGICAL_false,              \
+       (options).interval.value[0]        = 0,                             \
+       (options).interval.value[1]        = 1                              \
+    )
+
+
+/* PK_CURVE_find_vectors_r_t */
+
+struct PK_CURVE_find_vectors_r_s
+    {
+    int                          n_entries;
+    int                         *indices;
+    PK_CURVE_find_vectors_t     *statuses;
+    PK_VECTOR_t                 *vectors;
+    double                      *parms;
+    };
+typedef struct PK_CURVE_find_vectors_r_s PK_CURVE_find_vectors_r_t;
+
+
+
+/* PK_CURVE_find_vectors_o_t */
+
+struct PK_CURVE_find_vectors_o_s
+    {
+    int                 o_t_version;         /* option structure version */
+    int                 n_measurements;      /* number of measurements */
+    double             *measurements;        /* values of the measurements */
+    PK_measure_t        measurement_method;  /* what `measurements' measure */
+    PK_ERROR_on_fail_t  error_on_failure;    /* when to return error */
+    };
+typedef struct PK_CURVE_find_vectors_o_s PK_CURVE_find_vectors_o_t;
+
+
+/* PK_CURVE_find_vectors_o_m */
+
+#define PK_CURVE_find_vectors_o_m(options)                            \
+    (                                                                 \
+        (options).o_t_version           = 1,                          \
+        (options).n_measurements        = 0,                          \
+        (options).measurements          = NULL,                       \
+        (options).measurement_method    = PK_measure_chord_ratio_c,   \
+        (options).error_on_failure      = PK_ERROR_on_fail_no_c       \
+    )
+
+
+/* PK_CURVE_degen_t */
+
+struct PK_CURVE_degen_s
+    {
+    PK_CURVE_degen_type_t type;
+    PK_LOGICAL_t          have_position;
+    PK_VECTOR_t           position;
+    PK_INTERVAL_t         range;
+    PK_GEOM_t             geom;
+    };
+
+typedef struct PK_CURVE_degen_s PK_CURVE_degen_t;
+
+
+
+/* PK_CURVE_degens_t */
+
+struct PK_CURVE_degens_s
+    {
+    int               n_degen;  /* number of degeneracies */
+    PK_CURVE_degen_t *degen;    /* details of degeneracies */
+    };
+
+typedef struct PK_CURVE_degens_s PK_CURVE_degens_t;
+
+
+
+/* PK_CURVE_find_degens_o_t */
+
+struct PK_CURVE_find_degens_o_s
+    {
+    int              o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_CURVE_find_degens_o_s PK_CURVE_find_degens_o_t;
+
+
+
+/* PK_CURVE_find_degens_o_m */
+
+#define PK_CURVE_find_degens_o_m(options)               \
+    (                                                   \
+       (options).o_t_version = 1                        \
+    )
+
+
+/* PK_CURVE_fix_degens_o_t */
+
+struct PK_CURVE_fix_degens_o_s
+    {
+    int                  o_t_version;      /* version number of option */
+    double               tolerance;        /* tolerance for approximating */
+    double               target_radius;    /* lower bounds for the radius of */
+    };
+
+typedef struct PK_CURVE_fix_degens_o_s PK_CURVE_fix_degens_o_t;
+
+
+
+/* PK_CURVE_fix_degens_o_m */
+
+#define PK_CURVE_fix_degens_o_m(options)                      \
+    (                                                         \
+       (options).o_t_version     = 1,                         \
+       (options).tolerance       = 1.0e-5,                    \
+       (options).target_radius   = 0.0                        \
+    )
+
+
+/* PK_CURVE_fix_degens_cu_t */
+
+struct PK_CURVE_fix_degens_cu_s
+    {
+    PK_CURVE_t      res_curve;
+    PK_fix_status_t status;
+    double          achieved_tol;
+    double          achieved_radius;
+    };
+
+typedef struct PK_CURVE_fix_degens_cu_s PK_CURVE_fix_degens_cu_t;
+
+
+
+/* PK_CURVE_fix_degens_r_t */
+
+struct PK_CURVE_fix_degens_r_s
+    {
+    int                       n_curves;
+    PK_CURVE_fix_degens_cu_t *curves;
+    };
+
+typedef struct PK_CURVE_fix_degens_r_s PK_CURVE_fix_degens_r_t;
+
+
+
+/* PK_CURVE_self_int_t */
+
+struct PK_CURVE_self_int_s
+    {
+    PK_self_int_type_t type;
+    int                n_positions;
+    PK_VECTOR_t       *positions;
+    int                n_intervals;
+    PK_INTERVAL_t     *intervals;
+    int                n_entities;
+    PK_ENTITY_t       *entities;
+    };
+
+typedef struct PK_CURVE_self_int_s PK_CURVE_self_int_t;
+
+
+
+/* PK_CURVE_self_ints_t */
+
+struct PK_CURVE_self_ints_s
+    {
+    int                  n_self_int;  /* number of self-intersections */
+    PK_CURVE_self_int_t *self_int;    /* details of self-intersections */
+    };
+
+typedef struct PK_CURVE_self_ints_s PK_CURVE_self_ints_t;
+
+
+
+/* PK_CURVE_find_self_int_o_t */
+
+struct PK_CURVE_find_self_int_o_s
+    {
+    int              o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_CURVE_find_self_int_o_s PK_CURVE_find_self_int_o_t;
+
+
+
+/* PK_CURVE_find_self_int_o_m */
+
+#define PK_CURVE_find_self_int_o_m(options)             \
+    (                                                   \
+       (options).o_t_version = 1                        \
+    )
+
+
+/* PK_CURVE_fix_self_int_o_t */
+
+struct PK_CURVE_fix_self_int_o_s
+    {
+    int                  o_t_version;     /* version number of option structure */
+    PK_fix_method_t      fix_method;      /* method used to generate new curves */
+    PK_LOGICAL_t         allow_multiple;  /* whether to allow multiple curves */
+    double               tolerance;       /* tolerance for approximating */
+    PK_LOGICAL_t         have_param;      /* whether a parameter is supplied */
+    double               param;           /* a parameter used to select the */
+    };
+
+typedef struct PK_CURVE_fix_self_int_o_s PK_CURVE_fix_self_int_o_t;
+
+
+
+/* PK_CURVE_fix_self_int_o_m */
+
+#define PK_CURVE_fix_self_int_o_m(options)                      \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).fix_method     = PK_fix_method_extract_c,      \
+       (options).allow_multiple = PK_LOGICAL_true,              \
+       (options).tolerance      = 1.0e-5,                       \
+       (options).have_param     = PK_LOGICAL_false,             \
+       (options).param          = 0.0                           \
+    )
+
+
+/* PK_CURVE_fix_self_int_cu_t */
+
+struct PK_CURVE_fix_self_int_cu_s
+    {
+    PK_CURVE_t      res_curve;
+    PK_fix_status_t status;
+    double          achieved_tol;
+    };
+
+typedef struct PK_CURVE_fix_self_int_cu_s PK_CURVE_fix_self_int_cu_t;
+
+
+
+/* PK_CURVE_fix_self_int_r_t */
+
+struct PK_CURVE_fix_self_int_r_s
+    {
+    int                         n_curves;
+    PK_CURVE_fix_self_int_cu_t *curves;
+    PK_CURVE_fix_fault_t        fault;
+    };
+
+typedef struct PK_CURVE_fix_self_int_r_s PK_CURVE_fix_self_int_r_t;
+
+
+
+/* PK_CURVE_intersect_curve_o_t */
+
+struct PK_CURVE_intersect_curve_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    PK_SURF_t       common_surf;     /* surf containing curves or */
+    };
+
+typedef struct PK_CURVE_intersect_curve_o_s PK_CURVE_intersect_curve_o_t;
+
+
+
+/* PK_CURVE_intersect_curve_o_m */
+
+#define PK_CURVE_intersect_curve_o_m(options)                 \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0,                 \
+       (options).common_surf           = PK_ENTITY_null       \
+    )
+
+
+/* PK_CURVE_make_bcurve_o_t */
+
+struct PK_CURVE_make_bcurve_o_s
+    {
+    int                     o_t_version;   /* option structure version */
+    double                  tolerance;     /* max deviation of `curve' */
+    PK_LOGICAL_t            have_degree;   /* whether a degree is */
+    int                     degree;        /* degree of `bcurve' */
+    PK_force_continuity_t   force_continuity;
+    PK_continuity_t         continuity;    /* level of continuity */
+    PK_LOGICAL_t            force_non_rational;
+    PK_LOGICAL_t            force_bezier;  /* whether `bcurve' should be */
+    PK_make_bcurve_update_t update;        /* update flag */
+    };
+
+typedef struct PK_CURVE_make_bcurve_o_s PK_CURVE_make_bcurve_o_t;
+
+
+/* PK_CURVE_make_bcurve_o_m */
+
+#define PK_CURVE_make_bcurve_o_m(options)                                   \
+    (                                                                       \
+       (options).o_t_version               = 2,                             \
+       (options).tolerance                 = 1.0e-5,                        \
+       (options).have_degree               = PK_LOGICAL_false,              \
+       (options).degree                    = 3,                             \
+       (options).force_continuity          = PK_force_continuity_no_c,      \
+       (options).continuity                = PK_continuity_c1_c,            \
+       (options).force_non_rational        = PK_LOGICAL_false,              \
+       (options).force_bezier              = PK_LOGICAL_false,              \
+       (options).update                    = PK_make_bcurve_update_default_c\
+    )
+
+
+/* PK_CURVE_make_spcurves_o_t */
+
+struct PK_CURVE_make_spcurves_o_s
+    {
+    int                       o_t_version;  /* option structure version */
+    PK_make_spcurves_degen_t  degenerate;   /* create degenerate SP-curves */
+    PK_LOGICAL_t              sense;        /* SP-curves in same direction */
+    PK_make_spcurves_method_t sp_method;    /* method used for generating */
+    };
+typedef struct PK_CURVE_make_spcurves_o_s PK_CURVE_make_spcurves_o_t;
+
+
+/* PK_CURVE_make_spcurves_o_m */
+
+#define PK_CURVE_make_spcurves_o_m(options)                             \
+    (                                                                   \
+       (options).o_t_version       = 1,                                 \
+       (options).degenerate        = PK_make_spcurves_degen_no_c,       \
+       (options).sense             = PK_LOGICAL_true,                   \
+       (options).sp_method         = PK_make_spcurves_method_dflt_c     \
+    )
+
+
+/* PK_CURVE_make_wire_body_o_t */
+
+struct PK_CURVE_make_wire_body_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    double          tolerance;       /* max separation between any two curve */
+    PK_LOGICAL_t    allow_disjoint;  /* is the wire body allowed to be */
+    PK_LOGICAL_t    check;           /* check the body for errors? */
+    PK_LOGICAL_t    want_edges;      /* return the new edges in new_edges? */
+    PK_LOGICAL_t    want_indices;    /* return the edge indices in edge_index? */
+    PK_CURVE_sequential_t
+                    sequential;      /* whether the curves are supplied in the */
+    };
+
+typedef struct PK_CURVE_make_wire_body_o_s PK_CURVE_make_wire_body_o_t;
+
+
+/* PK_CURVE_make_wire_body_o_m */
+
+#define PK_CURVE_make_wire_body_o_m(options)                         \
+    (                                                                \
+       (options).o_t_version           = 2,                          \
+       (options).tolerance             = 0.000001,                   \
+       (options).allow_disjoint        = PK_LOGICAL_true,            \
+       (options).check                 = PK_LOGICAL_true,            \
+       (options).want_edges            = PK_LOGICAL_false,           \
+       (options).want_indices          = PK_LOGICAL_false,           \
+       (options).sequential            = PK_CURVE_sequential_no_c    \
+    )
+
+
+/* PK_CURVE_is_isoparam_o_t */
+
+struct PK_CURVE_is_isoparam_o_s
+    {
+    int           o_t_version;      /* version number of option structure */
+    PK_LOGICAL_t  want_interval;    /* whether range on surface is wanted */
+    PK_LOGICAL_t  want_alignment;   /* whether to compute how the non-constant */
+    };
+
+typedef struct PK_CURVE_is_isoparam_o_s PK_CURVE_is_isoparam_o_t;
+
+
+
+
+/* PK_CURVE_is_isoparam_o_m */
+
+#define PK_CURVE_is_isoparam_o_m(options)                       \
+    (                                                           \
+        (options).o_t_version           = 1,                    \
+        (options).want_interval         = PK_LOGICAL_false,     \
+        (options).want_alignment        = PK_LOGICAL_false      \
+    )
+
+
+/* PK_proj_geom_t */
+
+struct PK_proj_geom_s
+    {
+    PK_GEOM_t            geom;
+    PK_INTERVAL_t        range;
+    double               achieved_tol;
+    };
+
+typedef struct PK_proj_geom_s PK_proj_geom_t;
+
+
+
+/* PK_CURVE_project_r_t */
+
+struct PK_CURVE_project_r_s
+    {
+    int                  n_geoms;
+    PK_proj_geom_t      *geoms;
+    };
+
+typedef struct PK_CURVE_project_r_s PK_CURVE_project_r_t;
+
+
+
+/* PK_CURVE_project_o_t */
+
+struct PK_CURVE_project_o_s
+    {
+    int                   o_t_version;     /* version number of options */
+    PK_LOGICAL_t          have_direction;  /* whether `direction' is set */
+    PK_VECTOR1_t          direction;       /* the direction of projection */
+    PK_LOGICAL_t          bidirectional;   /* bidirectional projection */
+    PK_proj_max_dist_t    use_max_dist;    /* how to limit projection */
+    double                max_dist;        /* limiting projection distance */
+    PK_proj_face_hidden_t hidden;          /* how to project to hidden faces */
+    PK_proj_connect_t     connect;         /* how to connect disjoint outputs */
+    PK_CLASS_array_t      banned_classes;  /* array of curve classes which are */
+    PK_proj_split_clash_t split_clash;     /* how to split resulting clashes */
+    PK_proj_to_points_t   create_points;   /* how to project curves to points */
+    PK_LOGICAL_t          construction;    /* whether to add as construction */
+    double                tolerance;       /* operation tolerance */
+    PK_proj_function_t    function;        /* whether to project or imprint */
+    PK_imprint_precision_t
+                          imprint_precision;
+    PK_proj_nominal_t     nominal;         /* whether to attach as nominal */
+    PK_proj_complete_t    complete;        /* how to complete imprints */
+    PK_proj_update_t      update;          /* update switch */
+    PK_proj_tracking_t    tracking;        /* format of track records */
+    };
+
+typedef struct PK_CURVE_project_o_s PK_CURVE_project_o_t;
+
+
+
+/* PK_CURVE_project_o_m */
+
+#define PK_CURVE_project_o_m(options)                                    \
+    (                                                                    \
+       (options).o_t_version            = 3,                             \
+       (options).have_direction         = PK_LOGICAL_false,              \
+       (options).direction.coord[0]     = 0.0,                           \
+       (options).direction.coord[1]     = 0.0,                           \
+       (options).direction.coord[2]     = 0.0,                           \
+       (options).bidirectional          = PK_LOGICAL_false,              \
+       (options).use_max_dist           = PK_proj_max_dist_no_c,         \
+       (options).max_dist               = 0.0,                           \
+       (options).hidden                 = PK_proj_face_hidden_body_c,    \
+       (options).connect                = PK_proj_connect_none_c,        \
+       (options).banned_classes.length  = 0,                             \
+       (options).banned_classes.array   = NULL,                          \
+       (options).split_clash            = PK_proj_split_clash_all_c,     \
+       (options).create_points          = PK_proj_to_points_no_c,        \
+       (options).construction           = PK_LOGICAL_true,               \
+       (options).tolerance              = 1.0e-6,                        \
+       (options).function               = PK_proj_function_project_c,    \
+       (options).imprint_precision      = PK_imprint_precision_auto_c,   \
+       (options).nominal                = PK_proj_nominal_no_c,          \
+       (options).complete               = PK_proj_complete_no_c,         \
+       (options).update                 = PK_proj_update_default_c,      \
+       (options).tracking               = PK_proj_tracking_basic_c       \
+    )
+
+
+/* PK_CURVE_spin_o_t */
+
+struct PK_CURVE_spin_o_s
+    {
+    int                      o_t_version;
+    PK_LOGICAL_t             simplify;              /* (PK_LOGICAL_false) */
+    PK_LOGICAL_t             confine;               /* (PK_LOGICAL_false) */
+    PK_INTERVAL_t            interval;              /* ((0,0)) */
+    };
+
+typedef struct PK_CURVE_spin_o_s PK_CURVE_spin_o_t;
+
+
+
+/* PK_CURVE_spin_o_m */
+
+#define PK_CURVE_spin_o_m(options)                                     \
+    (                                                                  \
+       (options).o_t_version           = 1,                            \
+       (options).simplify              = PK_LOGICAL_false,             \
+       (options).confine               = PK_LOGICAL_false,             \
+       (options).interval.value[0]     = 0,                            \
+       (options).interval.value[1]     = 0                             \
+    )
+
+
+/* PK_BCURVE_clamp_knots_o_t */
+
+struct PK_BCURVE_clamp_knots_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BCURVE_clamp_knots_o_s PK_BCURVE_clamp_knots_o_t;
+
+
+
+/* PK_BCURVE_clamp_knots_o_m */
+
+#define PK_BCURVE_clamp_knots_o_m(options)                                 \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_BCURVE_join_o_t */
+
+struct PK_BCURVE_join_o_s
+    {
+    int         o_t_version;         /* version of options structure (1) */
+    int         n_knots;             /* number of knot values (0) */
+    double     *knots;               /* acceptable values to snap to (NULL) */
+    double      snap_tolerance;      /* tolerance for snapping to knots (0.0) */
+    };
+
+typedef struct PK_BCURVE_join_o_s PK_BCURVE_join_o_t;
+
+
+
+/* PK_BCURVE_join_o_m */
+
+#define PK_BCURVE_join_o_m(options)                         \
+    (                                                       \
+       (options).o_t_version        = 1,                    \
+       (options).n_knots            = 0,                    \
+       (options).knots              = NULL,                 \
+       (options).snap_tolerance     = 0.0                   \
+    )
+
+
+/* PK_BCURVE_lower_degree_o_t */
+
+struct PK_BCURVE_lower_degree_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    PK_LOGICAL_t have_tolerance;     /* whether tolerance was supplied */
+    double       tolerance;          /* distance tolerance */
+    };
+
+typedef struct PK_BCURVE_lower_degree_o_s PK_BCURVE_lower_degree_o_t;
+
+
+
+/* PK_BCURVE_lower_degree_o_m */
+
+#define PK_BCURVE_lower_degree_o_m(options)                                \
+    (                                                                      \
+       (options).o_t_version           = 1,                                \
+       (options).have_tolerance        = PK_LOGICAL_false,                 \
+       (options).tolerance             = 1.0e-08                           \
+    )
+
+
+/* PK_BCURVE_raise_degree_o_t */
+
+struct PK_BCURVE_raise_degree_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BCURVE_raise_degree_o_s PK_BCURVE_raise_degree_o_t;
+
+
+
+/* PK_BCURVE_raise_degree_o_m */
+
+#define PK_BCURVE_raise_degree_o_m(options)                                \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_BCURVE_reparameterise_o_t */
+
+struct PK_BCURVE_reparameterise_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BCURVE_reparameterise_o_s PK_BCURVE_reparameterise_o_t;
+
+
+
+/* PK_BCURVE_reparameterise_o_m */
+
+#define PK_BCURVE_reparameterise_o_m(options)                              \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_BCURVE_remove_knots_o_t */
+
+struct PK_BCURVE_remove_knots_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    PK_LOGICAL_t have_tolerance;     /* whether tolerance is set */
+    double       tolerance;          /* tolerance for knot removal */
+    int          n_knot_indices;     /* number of knot indices (0) */
+    const int   *knot_indices;       /* indices of knots to be removed (NULL) */
+    const int   *remove_multiplicities;
+    };
+
+typedef struct PK_BCURVE_remove_knots_o_s PK_BCURVE_remove_knots_o_t;
+
+
+
+/* PK_BCURVE_remove_knots_o_m */
+
+#define PK_BCURVE_remove_knots_o_m(options)                        \
+    (                                                              \
+       (options).o_t_version           = 1,                        \
+       (options).have_tolerance        = PK_LOGICAL_false,         \
+       (options).tolerance             = 0.0,                      \
+       (options).n_knot_indices        = 0,                        \
+       (options).knot_indices          = NULL,                     \
+       (options).remove_multiplicities = NULL                      \
+    )
+
+
+/* PK_BCURVE_sf_t */
+
+struct PK_BCURVE_sf_s
+    {
+    int degree;                              /* The degree = order-1. */
+    int n_vertices;                          /* The number of vertices. */
+    int vertex_dim;                          /* The dimension of each vertex. */
+    PK_LOGICAL_t is_rational;                /* True if the curve is rational. */
+    double *vertex;                          /* The vertices. */
+    PK_BCURVE_form_t form;                   /* The curve shape. */
+    int n_knots;                             /* The number of distinct knot */
+    int *knot_mult;                          /* The multiplicity of each knot. */
+    double *knot;                            /* The distinct knot values. */
+    PK_knot_type_t knot_type;                /* Enum describing the knot set. */
+    PK_LOGICAL_t is_periodic;                /* True if the curve is periodic. */
+    PK_LOGICAL_t is_closed;                  /* True if the curve is closed. */
+    PK_self_intersect_t self_intersecting;   /* Yes no or maybe. */
+    };
+typedef struct PK_BCURVE_sf_s PK_BCURVE_sf_t;
+
+
+/* PK_BCURVE_ask_knots_o_t */
+
+struct PK_BCURVE_ask_knots_o_s
+    {
+    int            o_t_version;           /* option structure version */
+    PK_LOGICAL_t   want_expanded_knots;   /* whether to return expanded knot */
+    };
+typedef struct PK_BCURVE_ask_knots_o_s
+   PK_BCURVE_ask_knots_o_t;
+
+
+/* PK_BCURVE_ask_knots_o_m */
+
+#define PK_BCURVE_ask_knots_o_m(options)                                    \
+    (                                                                       \
+       (options).o_t_version              = 1,                              \
+       (options).want_expanded_knots      = PK_LOGICAL_false                \
+    )
+
+
+/* PK_extend_control_t */
+
+struct PK_extend_control_s
+    {
+    PK_extension_shape_t  extension_shape;  /* The extension method */
+    PK_BCURVE_extension_t extension_type;   /* How to measure how far to extend */
+    double                value;            /* How far to extend. */
+    };
+
+typedef struct PK_extend_control_s PK_extend_control_t;
+
+
+
+/* PK_extend_control_m */
+
+#define PK_extend_control_m(control)                                     \
+    (                                                                    \
+       (control).extension_shape = PK_extension_shape_linear_c,          \
+       (control).extension_type  = PK_BCURVE_extension_none_c,           \
+       (control).value           = 0.0                                   \
+    )
+
+
+/* PK_BCURVE_extend_o_t */
+
+struct PK_BCURVE_extend_o_s
+    {
+    int                       o_t_version;    /* options structure version. */
+    PK_extend_control_t       low_control;    /* extension required at lower t */
+    PK_extend_control_t       high_control;   /* extension required at higher t */
+    PK_extend_closed_t        extend_closed;  /* whether to extend closed or */
+    };
+
+typedef struct PK_BCURVE_extend_o_s PK_BCURVE_extend_o_t;
+
+
+
+/* PK_BCURVE_extend_o_m */
+
+#define PK_BCURVE_extend_o_m(options)                                      \
+    (                                                                      \
+       (options).o_t_version = 2,                                          \
+       PK_extend_control_m( (options).low_control ),                       \
+       PK_extend_control_m( (options).high_control ),                      \
+       (options).extend_closed = PK_extend_closed_no_c                     \
+    )
+
+
+/* PK_BCURVE_extend_r_t */
+
+struct PK_BCURVE_extend_r_s
+    {
+    PK_BCURVE_extend_status_t status;
+    PK_BCURVE_t               res_bcurve;
+    int                       n_values;
+    double                   *values;
+    };
+typedef struct PK_BCURVE_extend_r_s PK_BCURVE_extend_r_t;
+
+
+
+/* PK_BCURVE_fit_eval_f_t */
+
+typedef PK_ERROR_code_t(*PK_BCURVE_fit_eval_f_t)
+(
+/* received */
+double                    /*parameter*/,       /* parameter at which to evaluate */
+PK_LOGICAL_t              /*calculate_deriv*/, /* whether the evaluator should */
+PK_POINTER_t              /*external_data*/,   /* external application data */
+/* returned */
+PK_VECTOR_t       *const  /*point*/,           /* sample point at `parameter' */
+double            *const  /*weight*/,          /* weight of this point */
+PK_VECTOR_t       *const  /*deriv*/            /* 1st derivative at `parameter' */
+);
+
+
+
+/* PK_BCURVE_fit_chain_t */
+
+struct PK_BCURVE_fit_chain_s
+    {
+    int              n_curves_in_chain;  /* number of curves in this chain (0) */
+    PK_CURVE_t      *curves_in_chain;    /* curves in the chain (NULL) */
+    PK_INTERVAL_t   *curve_intervals;    /* parameter intervals for each */
+    double          *fit_parameters;     /* parameters for bcurve at ends */
+    };
+
+typedef struct PK_BCURVE_fit_chain_s PK_BCURVE_fit_chain_t;
+
+
+
+/* PK_BCURVE_fit_chain_m */
+
+#define PK_BCURVE_fit_chain_m(chain)                             \
+    (                                                            \
+       (chain).n_curves_in_chain    = 0,                         \
+       (chain).curves_in_chain      = NULL,                      \
+       (chain).curve_intervals      = NULL,                      \
+       (chain).fit_parameters       = NULL                       \
+    )
+
+
+/* PK_BCURVE_fit_eval_data_t */
+
+struct PK_BCURVE_fit_eval_data_s
+    {
+    PK_POINTER_t            external_data; /* for external evaluator (NULL) */
+
+    PK_BCURVE_fit_chain_t   chain_data;    /* for internal chain-of-curves */
+    };
+
+typedef struct PK_BCURVE_fit_eval_data_s PK_BCURVE_fit_eval_data_t;
+
+
+
+/* PK_BCURVE_fit_eval_data_m */
+
+#define PK_BCURVE_fit_eval_data_m(eval_data)                         \
+    (                                                                \
+       (eval_data).external_data        = NULL,                      \
+       PK_BCURVE_fit_chain_m( (eval_data).chain_data )               \
+    )
+
+
+/* PK_BCURVE_fit_data_t */
+
+struct PK_BCURVE_fit_data_s
+    {
+    PK_BCURVE_fit_eval_type_t    eval_type;  /* what evaluator to use */
+    PK_BCURVE_fit_eval_f_t       eval_fn;    /* user evaluator (NULL) */
+    PK_BCURVE_fit_eval_data_t    eval_data;  /* evaluator data */
+    PK_BCURVE_fit_err_method_t   err_method; /* error method for bcurve */
+    PK_LOGICAL_t                 rational;   /* if bcurve is to be rational */
+    };
+
+typedef struct PK_BCURVE_fit_data_s  PK_BCURVE_fit_data_t;
+
+
+
+/* PK_BCURVE_fit_data_m */
+
+#define PK_BCURVE_fit_data_m(fit_data)                         \
+    (                                                          \
+       (fit_data).eval_type  = PK_BCURVE_fit_eval_chain_c,     \
+       (fit_data).eval_fn    = NULL,                           \
+       PK_BCURVE_fit_eval_data_m( (fit_data).eval_data ),      \
+       (fit_data).err_method = PK_BCURVE_fit_err_parm_c,       \
+       (fit_data).rational   = PK_LOGICAL_false                \
+    )
+
+
+/* PK_BCURVE_fit_fault_t */
+
+struct PK_BCURVE_fit_fault_s
+    {
+    PK_LOGICAL_t     no_faults;           /* true if the fit succeeded */
+    PK_BCURVE_fit_t *status;              /* status for each bcurve */
+    double          *distance_errors;     /* final maximum distance errors */
+    double          *angular_errors;      /* final maximum angular errors */
+    double          *error_parameters;    /* parameters at which the */
+    };
+
+typedef struct PK_BCURVE_fit_fault_s PK_BCURVE_fit_fault_t;
+
+
+
+/* PK_BCURVE_create_by_fitting_o_t */
+
+struct PK_BCURVE_create_by_fitting_o_s
+{
+int                           o_t_version;  /* option structure version number */
+int                           n_curves;     /* number of bcurves to create (0) */
+PK_BCURVE_fit_data_t         *fit_data;     /* array of fitting data (NULL) */
+PK_INTERVAL_t                 range;        /* parameter range for bcurves */
+double                        tolerance;    /* distance tolerance (0.00001) */
+double                        angular_tolerance;  /* angular tolerance (0.0) */
+int                           n_break_parms;      /* number of break parms (0) */
+double                       *break_parms;        /* break-parameters (NULL) */
+};
+
+typedef struct PK_BCURVE_create_by_fitting_o_s PK_BCURVE_create_by_fitting_o_t;
+
+
+
+/* PK_BCURVE_create_by_fitting_o_m */
+
+#define PK_BCURVE_create_by_fitting_o_m(options)                        \
+    (                                                                   \
+       (options).o_t_version          = 1,                              \
+       (options).n_curves             = 0,                              \
+       (options).fit_data             = NULL,                           \
+       (options).range.value[0]       = 0,                              \
+       (options).range.value[1]       = 1,                              \
+       (options).tolerance            = 1.0e-05,                        \
+       (options).angular_tolerance    = 0.0,                            \
+       (options).n_break_parms        = 0,                              \
+       (options).break_parms          = NULL                            \
+    )
+
+
+/* PK_CURVE_general_eval_f_t */
+
+typedef PK_ERROR_code_t(*PK_CURVE_general_eval_f_t)
+(
+/* received */
+double                    /*parameter*/,       /* parameter at which to evaluate */
+int                       /*n_deriv*/,         /* number of derivatives requested */
+PK_HAND_t                 /*hand_direction*/,  /* evaluation direction */
+PK_POINTER_t              /*external_data*/,   /* external application data */
+/* returned */
+double            *const  /*derivs*/           /* point and derivatives */
+);
+
+
+
+/* PK_CURVE_general_user_t */
+
+struct PK_CURVE_general_user_s
+    {
+    PK_CURVE_general_eval_f_t  eval_fn;            /* user evaluator */
+    PK_POINTER_t               eval_data;          /* evaluator data */
+    int                        dimension;          /* curve dimension */
+    int                        highest_deriv;      /* highest derivative that */
+    PK_LOGICAL_t               is_closed;          /* closure of curve */
+    PK_LOGICAL_t               is_periodic;        /* periodicity of curve */
+    int                        n_discontinuities;  /* size of `discontinuities' */
+    double                    *discontinuities;    /* array of parameters at */
+    };
+
+typedef struct PK_CURVE_general_user_s  PK_CURVE_general_user_t;
+
+
+
+/* PK_CURVE_general_t */
+
+struct PK_CURVE_general_s
+    {
+    PK_CURVE_general_type_t type;
+    union
+        {
+        PK_CURVE_t              parasolid_curve;
+        PK_CURVE_general_user_t user_curve;
+        } curve;
+    };
+
+typedef struct PK_CURVE_general_s  PK_CURVE_general_t;
+
+
+
+/* PK_CURVE_general_m */
+
+#define PK_CURVE_general_m(general_curve)                           \
+    (                                                               \
+       (general_curve).type             = PK_CURVE_general_curve_c, \
+       (general_curve).curve.parasolid_curve  = PK_ENTITY_null      \
+    )
+
+
+/* PK_BCURVE_fitted_fault_t */
+
+struct PK_BCURVE_fitted_fault_s
+    {
+    PK_BCURVE_fitted_t status;           /* status for the fit */
+    double             distance_error;   /* final maximum distance error */
+    double             angular_error;    /* final maximum angular error */
+    double             error_parameter;  /* parameter at which the */
+    };
+
+typedef struct PK_BCURVE_fitted_fault_s PK_BCURVE_fitted_fault_t;
+
+
+
+/* PK_BCURVE_create_fitted_o_t */
+
+struct PK_BCURVE_create_fitted_o_s
+{
+int                 o_t_version;                  /* option structure version */
+PK_CURVE_general_t  curve;                        /* curve to be fit */
+PK_INTERVAL_t       range;                        /* parameter range for */
+double              tolerance;                    /* distance tolerance */
+double              angular_tolerance;            /* angular tolerance (0.0) */
+int                 n_interpolation_parms;        /* number of parameters at */
+double             *interpolation_parms;          /* parameters at which to */
+PK_LOGICAL_t        preserve_parameterisation;    /* whether or not the fitted */
+};
+
+typedef struct PK_BCURVE_create_fitted_o_s
+               PK_BCURVE_create_fitted_o_t;
+
+
+
+/* PK_BCURVE_create_fitted_o_m */
+
+#define PK_BCURVE_create_fitted_o_m(options)                        \
+    (                                                               \
+       (options).o_t_version                = 2,                    \
+       (options).range.value[0]             = 0,                    \
+       (options).range.value[1]             = 1,                    \
+       (options).tolerance                  = 1.0e-06,              \
+       (options).angular_tolerance          = 0.0,                  \
+       (options).n_interpolation_parms      = 0,                    \
+       (options).interpolation_parms        = NULL,                 \
+       (options).preserve_parameterisation  = PK_LOGICAL_true       \
+    )
+
+
+/* PK_BCURVE_make_bsurf_lofted_o_t */
+
+struct PK_BCURVE_make_bsurf_lofted_o_s
+    {
+    int              o_t_version;      /* version number of option structure(1) */
+    PK_PARAM_end_t   v_end;            /* end condition at lower v end */
+    PK_PARAM_end_t   V_end;            /* end condition at upper V end */
+    int              n_v_derivs;       /* number of doubles in v_derivs (0) */
+    int              n_V_derivs;       /* number of doubles in V_derivs (0) */
+    double          *v_derivs;         /* derivative data at lower v (NULL) */
+    double          *V_derivs;         /* derivative data at upper V (NULL) */
+    PK_PARAM_twist_t u_v;              /* how lower u lower v twist vector */
+    PK_PARAM_twist_t u_V;              /* how lower u upper V twist vector */
+    PK_PARAM_twist_t U_v;              /* how upper U lower v twist vector */
+    PK_PARAM_twist_t U_V;              /* how upper U upper V twist vector */
+    PK_VECTOR_t      u_v_twist;        /* lower u lower v twist vector (0,0,0) */
+    PK_VECTOR_t      u_V_twist;        /* lower u upper V twist vector (0,0,0) */
+    PK_VECTOR_t      U_v_twist;        /* upper U lower v twist vector (0,0,0) */
+    PK_VECTOR_t      U_V_twist;        /* upper U upper V twist vector (0,0,0) */
+    PK_PARAM_degen_t v_degen;          /* degeneracy beyond lower v */
+    PK_PARAM_degen_t V_degen;          /* degeneracy beyond upper V */
+    PK_VECTOR_t      v_degen_vector;   /* position vector of point degeneracy */
+    PK_VECTOR_t      V_degen_vector;   /* position vector of point degeneracy */
+    int              n_v_degen_bcurve; /* number of doubles in v_degen_bcurve */
+    int              n_V_degen_bcurve; /* number of doubles in V_degen_bcurve */
+    double          *v_degen_bcurve;   /* vertices of degenerate bcurve (NULL) */
+    double          *V_degen_bcurve;   /* vertices of degenerate bcurve (NULL) */
+    PK_PARAM_knot_t  how_knot;         /* how knot vector defined */
+    double          *knot;             /* knot vector (NULL) */
+    PK_LOGICAL_t     amalgamate;       /* whether to amalgamate knot vectors */
+    int              n_v_degen_segs;   /* number of degenerate segments to add */
+    int              n_V_degen_segs;   /* number of degenerate segments to add */
+    int             *v_degen_segs;     /* degenerate segment positions on lower */
+    int             *V_degen_segs;     /* degenerate segment positions on upper */
+    PK_LOGICAL_t     force_cubic;      /* make result cubic in v even if it is */
+    };
+
+typedef struct PK_BCURVE_make_bsurf_lofted_o_s PK_BCURVE_make_bsurf_lofted_o_t;
+
+
+
+/* PK_BCURVE_make_bsurf_lofted_o_m */
+
+#define PK_BCURVE_make_bsurf_lofted_o_m(options)                    \
+    (                                                               \
+       (options).o_t_version             = 1,                       \
+       (options).v_end                   = PK_PARAM_end_natural_c,  \
+       (options).V_end                   = PK_PARAM_end_natural_c,  \
+       (options).n_v_derivs              = 0,                       \
+       (options).n_V_derivs              = 0,                       \
+       (options).v_derivs                = NULL,                    \
+       (options).V_derivs                = NULL,                    \
+       (options).u_v                     = PK_PARAM_twist_no_c,     \
+       (options).u_V                     = PK_PARAM_twist_no_c,     \
+       (options).U_v                     = PK_PARAM_twist_no_c,     \
+       (options).U_V                     = PK_PARAM_twist_no_c,     \
+       (options).u_v_twist.coord[0]      = 0.0,                     \
+       (options).u_v_twist.coord[1]      = 0.0,                     \
+       (options).u_v_twist.coord[2]      = 0.0,                     \
+       (options).u_V_twist.coord[0]      = 0.0,                     \
+       (options).u_V_twist.coord[1]      = 0.0,                     \
+       (options).u_V_twist.coord[2]      = 0.0,                     \
+       (options).U_v_twist.coord[0]      = 0.0,                     \
+       (options).U_v_twist.coord[1]      = 0.0,                     \
+       (options).U_v_twist.coord[2]      = 0.0,                     \
+       (options).U_V_twist.coord[0]      = 0.0,                     \
+       (options).U_V_twist.coord[1]      = 0.0,                     \
+       (options).U_V_twist.coord[2]      = 0.0,                     \
+       (options).v_degen                 = PK_PARAM_degen_no_c,     \
+       (options).V_degen                 = PK_PARAM_degen_no_c,     \
+       (options).v_degen_vector.coord[0] = 0.0,                     \
+       (options).v_degen_vector.coord[1] = 0.0,                     \
+       (options).v_degen_vector.coord[2] = 0.0,                     \
+       (options).V_degen_vector.coord[0] = 0.0,                     \
+       (options).V_degen_vector.coord[1] = 0.0,                     \
+       (options).V_degen_vector.coord[2] = 0.0,                     \
+       (options).n_v_degen_bcurve        = 0,                       \
+       (options).n_V_degen_bcurve        = 0,                       \
+       (options).v_degen_bcurve          = NULL,                    \
+       (options).V_degen_bcurve          = NULL,                    \
+       (options).how_knot                = PK_PARAM_knot_auto_c,    \
+       (options).knot                    = NULL,                    \
+       (options).amalgamate              = PK_LOGICAL_false,        \
+       (options).n_v_degen_segs          = 0,                       \
+       (options).n_V_degen_segs          = 0,                       \
+       (options).v_degen_segs            = NULL,                    \
+       (options).V_degen_segs            = NULL,                    \
+       (options).force_cubic             = PK_LOGICAL_false         \
+    )
+
+
+/* PK_BCURVE_make_matched_o_t */
+
+struct PK_BCURVE_make_matched_o_s
+    {
+    int             o_t_version;
+    };
+
+typedef struct PK_BCURVE_make_matched_o_s PK_BCURVE_make_matched_o_t;
+
+
+
+/* PK_BCURVE_make_matched_o_m */
+
+#define PK_BCURVE_make_matched_o_m(options)                 \
+    (                                                       \
+       (options).o_t_version           = 1                  \
+    )
+
+
+/* PK_BCURVE_piecewise_sf_t */
+
+struct PK_BCURVE_piecewise_sf_s
+    {
+    int                   degree;            /* The degree = order-1. */
+    int                   n_segments;        /* The number of curve segments */
+    int                   dim;               /* Dimension of coefficient vecs */
+    PK_LOGICAL_t          is_rational;       /* True if the curve is rational. */
+    PK_piecewise_rep_t    rep;               /* Representation method. */
+    double               *coeffs;            /* Coefficient vectors */
+    };
+typedef struct PK_BCURVE_piecewise_sf_s PK_BCURVE_piecewise_sf_t;
+
+
+/* PK_BCURVE_splinewise_sf_t */
+
+struct PK_BCURVE_splinewise_sf_s
+    {
+    int                   degree;            /* The degree = order-1. */
+    int                   n_positions;       /* The number of positions */
+    PK_VECTOR_t          *positions;         /* The positions */
+    PK_PARAM_end_t        t_end;             /* End condition at lower t */
+    PK_PARAM_end_t        T_end;             /* End condition at upper T */
+    PK_VECTOR_t           t_deriv;           /* Derivative at lower t */
+    PK_VECTOR_t           T_deriv;           /* Derivative at upper T */
+    PK_PARAM_knot_t       how_knot;          /* How knot vector defined */
+    double               *knot;              /* Knot vector */
+    };
+typedef struct PK_BCURVE_splinewise_sf_s PK_BCURVE_splinewise_sf_t;
+
+
+/* PK_BCURVE_create_spline_o_t */
+
+struct PK_BCURVE_create_spline_o_s
+    {
+    int                     o_t_version;      /* options structure version */
+
+    PK_INTERVAL_t           param_interval;   /* parameter range for the */
+
+    int                     n_parameters;     /* number of parameters (0) */
+    const double           *parameters;       /* parameters for `positions' */
+    const int              *param_indices;    /* indices linking `parameters' */
+
+    int                     n_derivs;         /* number of derivatives (0) */
+    const PK_VECTOR_t      *derivs;           /* derivatives at `positions' */
+    const int              *deriv_orders;     /* order of each derivative */
+    const int              *deriv_indices;    /* indices linking `derivs' to */
+
+    int                     degree;           /* degree for B-curve (0) */
+    PK_LOGICAL_t            is_periodic;      /* whether B-curve is periodic */
+
+    int                     n_knots;          /* number of knots supplied (0) */
+    const double           *knots;            /* the knots (NULL) */
+    const int              *knot_mults;       /* multiplicities of the knots */
+    PK_BCURVE_overdefined_t overdefined;      /* behaviour if overdefined */
+    PK_BCURVE_clamp_t       clamp;            /* clamp to apply to the B-curve */
+    PK_LOGICAL_t            have_clamp_axes;  /* whether `clamp_axes' are */
+    PK_AXIS2_sf_t           clamp_axes;       /* clamp axes */
+    };
+
+typedef struct PK_BCURVE_create_spline_o_s PK_BCURVE_create_spline_o_t;
+
+
+
+/* PK_BCURVE_create_spline_o_m */
+
+#define PK_BCURVE_create_spline_o_m(options)                                  \
+    (                                                                         \
+       (options).o_t_version                  = 3,                            \
+       (options).param_interval.value[0]      = 0.0,                          \
+       (options).param_interval.value[1]      = 1.0,                          \
+       (options).n_parameters                 = 0,                            \
+       (options).parameters                   = NULL,                         \
+       (options).param_indices                = NULL,                         \
+       (options).n_derivs                     = 0,                            \
+       (options).derivs                       = NULL,                         \
+       (options).deriv_orders                 = NULL,                         \
+       (options).deriv_indices                = NULL,                         \
+       (options).degree                       = 0,                            \
+       (options).is_periodic                  = PK_LOGICAL_false,             \
+       (options).n_knots                      = 0,                            \
+       (options).knots                        = NULL,                         \
+       (options).knot_mults                   = NULL,                         \
+       (options).overdefined                  = PK_BCURVE_overdefined_fail_c, \
+       (options).clamp                        = PK_BCURVE_clamp_no_c,         \
+       (options).have_clamp_axes              = PK_LOGICAL_false,             \
+       (options).clamp_axes.location.coord[0] = 0.0,                          \
+       (options).clamp_axes.location.coord[1] = 0.0,                          \
+       (options).clamp_axes.location.coord[2] = 0.0,                          \
+       (options).clamp_axes.axis.coord[0]     = 0.0,                          \
+       (options).clamp_axes.axis.coord[1]     = 0.0,                          \
+       (options).clamp_axes.axis.coord[2]     = 0.0,                          \
+       (options).clamp_axes.ref_direction.coord[0] = 0.0,                     \
+       (options).clamp_axes.ref_direction.coord[1] = 0.0,                     \
+       (options).clamp_axes.ref_direction.coord[2] = 0.0                      \
+    )
+
+
+/* PK_BCURVE_create_spline_2_o_t */
+
+struct PK_BCURVE_create_spline_2_o_s
+    {
+    int                     o_t_version;    /* options structure version */
+
+    PK_INTERVAL_t           param_interval; /* parameter range for the */
+
+    int                     n_parameters;   /* number of parameters (0) */
+    const double           *parameters;     /* parameters for `positions' */
+    const int              *param_indices;  /* indices linking `parameters' to */
+
+    int                     n_derivs;       /* number of derivatives (0) */
+    const PK_VECTOR_t      *derivs;         /* derivatives at `positions' */
+    const int              *deriv_orders;   /* order of each derivative (NULL) */
+    const int              *deriv_indices;  /* indices linking `derivs' to */
+
+    PK_spline_method_t      spline_method;  /* the default behaviour for each */
+    int                     n_special;      /* number of `positions' to have */
+    const int              *special_indices;
+    PK_LOGICAL_t            have_fit_tol;   /* whether a fitted tolerance is */
+    double                  fit_tol;        /* fit tolerance */
+    PK_LOGICAL_t            have_chordal_tol;
+    double                  chordal_tol;    /* the maximum distance between a */
+    int                     n_breaks;       /* number of break points (0) */
+    const int              *break_indices;  /* indices of `positions' that are */
+
+    int                     degree;         /* degree for B-curve(s) (0) */
+    PK_LOGICAL_t            is_periodic;    /* whether spline is periodic */
+
+    int                     n_knots;        /* number of knots supplied (0) */
+    const double           *knots;          /* the knots (NULL) */
+    const int              *knot_mults;     /* multiplicities of the knots */
+    PK_BCURVE_overdefined_t overdefined;    /* behaviour if overdefined */
+    PK_BCURVE_clamp_t       clamp;          /* clamp to apply to the */
+    PK_LOGICAL_t            have_clamp_axes;
+    PK_AXIS2_sf_t           clamp_axes;     /* clamp axes */
+    PK_spline_update_t      update;         /* update flag */
+    };
+
+typedef struct PK_BCURVE_create_spline_2_o_s PK_BCURVE_create_spline_2_o_t;
+
+
+
+/* PK_BCURVE_create_spline_2_o_m */
+
+#define PK_BCURVE_create_spline_2_o_m(options)                                \
+    (                                                                         \
+       (options).o_t_version                  = 2,                            \
+       (options).param_interval.value[0]      = 0.0,                          \
+       (options).param_interval.value[1]      = 1.0,                          \
+       (options).n_parameters                 = 0,                            \
+       (options).parameters                   = NULL,                         \
+       (options).param_indices                = NULL,                         \
+       (options).n_derivs                     = 0,                            \
+       (options).derivs                       = NULL,                         \
+       (options).deriv_orders                 = NULL,                         \
+       (options).deriv_indices                = NULL,                         \
+       (options).spline_method               = PK_spline_method_interpolate_c,\
+       (options).n_special                    = 0,                            \
+       (options).special_indices              = NULL,                         \
+       (options).have_fit_tol                 = PK_LOGICAL_false,             \
+       (options).fit_tol                      = 0.0,                          \
+       (options).have_chordal_tol             = PK_LOGICAL_false,             \
+       (options).chordal_tol                  = 0.0,                          \
+       (options).n_breaks                     = 0,                            \
+       (options).break_indices                = NULL,                         \
+       (options).degree                       = 0,                            \
+       (options).is_periodic                  = PK_LOGICAL_false,             \
+       (options).n_knots                      = 0,                            \
+       (options).knots                        = NULL,                         \
+       (options).knot_mults                   = NULL,                         \
+       (options).overdefined                  = PK_BCURVE_overdefined_fail_c, \
+       (options).clamp                        = PK_BCURVE_clamp_no_c,         \
+       (options).have_clamp_axes              = PK_LOGICAL_false,             \
+       (options).clamp_axes.location.coord[0] = 0.0,                          \
+       (options).clamp_axes.location.coord[1] = 0.0,                          \
+       (options).clamp_axes.location.coord[2] = 0.0,                          \
+       (options).clamp_axes.axis.coord[0]     = 0.0,                          \
+       (options).clamp_axes.axis.coord[1]     = 0.0,                          \
+       (options).clamp_axes.axis.coord[2]     = 0.0,                          \
+       (options).clamp_axes.ref_direction.coord[0] = 0.0,                     \
+       (options).clamp_axes.ref_direction.coord[1] = 0.0,                     \
+       (options).clamp_axes.ref_direction.coord[2] = 0.0,                     \
+       (options).update                       = PK_spline_update_default_c    \
+    )
+
+
+/* PK_BCURVE_spline_cu_t */
+
+struct PK_BCURVE_spline_cu_s
+    {
+    PK_BCURVE_t             bcurve;          /* the resultant B-curve */
+    PK_BCURVE_spline_stat_t status;          /* the status of this B-curve */
+    double                  distance_error;  /* the maximum distance error */
+    double                  distance_t;      /* the parameter at which the */
+    double                  chordal_error;   /* the maximum deviation from the */
+    double                  chordal_t;       /* the parameter at which the */
+    double                  angular_error;   /* unused */
+    double                  angular_t;       /* unused */
+    };
+
+typedef struct PK_BCURVE_spline_cu_s PK_BCURVE_spline_cu_t;
+
+
+
+/* PK_BCURVE_spline_r_t */
+
+struct PK_BCURVE_spline_r_s
+    {
+    int                    n_bcurves;       /* number of returned B-curves */
+    PK_BCURVE_spline_cu_t *bcurves;         /* information for each returned */
+    PK_BCURVE_spline_t     fault;           /* fault */
+    int                    n_fault_values;  /* number of fault_values */
+    int                   *fault_values;    /* fault values */
+    };
+
+typedef struct PK_BCURVE_spline_r_s PK_BCURVE_spline_r_t;
+
+
+
+/* PK_SURF_find_discontinuity_o_t */
+
+struct PK_SURF_find_discontinuity_o_s
+    {
+    int             o_t_version;   /* option structure version */
+    PK_continuity_t level;         /* level and type of continuity to calculate */
+    PK_LOGICAL_t    have_uvbox;    /* true if sub-domain is to be used */
+    PK_UVBOX_t      uvbox;         /* sub-domain of surface */
+    };
+typedef struct PK_SURF_find_discontinuity_o_s PK_SURF_find_discontinuity_o_t;
+
+
+
+/* PK_SURF_find_discontinuity_o_m */
+
+#define PK_SURF_find_discontinuity_o_m(options)                 \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).level          = PK_continuity_c3_c,           \
+       (options).have_uvbox     = PK_LOGICAL_false,             \
+       (options).uvbox.param[0] = 0.0,                          \
+       (options).uvbox.param[1] = 0.0,                          \
+       (options).uvbox.param[2] = 0.0,                          \
+       (options).uvbox.param[3] = 0.0                           \
+    )
+
+
+/* PK_SURF_self_int_t */
+
+struct PK_SURF_self_int_s
+    {
+    PK_self_int_type_t type;
+    int                n_positions;
+    PK_VECTOR_t       *positions;
+    int                n_uvboxes;
+    PK_UVBOX_t        *uvboxes;
+    int                n_entities;
+    PK_ENTITY_t       *entities;
+    };
+
+typedef struct PK_SURF_self_int_s PK_SURF_self_int_t;
+
+
+
+/* PK_SURF_self_ints_t */
+
+struct PK_SURF_self_ints_s
+    {
+    int                 n_self_int;  /* number of self-intersections */
+    PK_SURF_self_int_t *self_int;    /* details of self-intersections */
+    };
+
+typedef struct PK_SURF_self_ints_s PK_SURF_self_ints_t;
+
+
+
+/* PK_SURF_find_self_int_o_t */
+
+struct PK_SURF_find_self_int_o_s
+    {
+    int              o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_SURF_find_self_int_o_s PK_SURF_find_self_int_o_t;
+
+
+
+/* PK_SURF_find_self_int_o_m */
+
+#define PK_SURF_find_self_int_o_m(options)              \
+    (                                                   \
+       (options).o_t_version = 1                        \
+    )
+
+
+/* PK_SURF_fix_self_int_o_t */
+
+struct PK_SURF_fix_self_int_o_s
+    {
+    int                  o_t_version;     /* version number of option structure */
+    PK_fix_method_t      fix_method;      /* method used to generate new */
+    PK_LOGICAL_t         allow_multiple;  /* whether to allow multiple surfaces */
+    PK_SURF_split_t      split;           /* whether to prefer splitting the */
+    double               tolerance;       /* tolerance for approximating */
+    PK_LOGICAL_t         have_uv_param;   /* whether uv parameters are supplied */
+    PK_UV_t              uv_param;        /* uv parameters used to select the */
+    };
+
+typedef struct PK_SURF_fix_self_int_o_s PK_SURF_fix_self_int_o_t;
+
+
+
+/* PK_SURF_fix_self_int_o_m */
+
+#define PK_SURF_fix_self_int_o_m(options)                       \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).fix_method     = PK_fix_method_extract_c,      \
+       (options).allow_multiple = PK_LOGICAL_true,              \
+       (options).split          = PK_SURF_split_prefer_u_c,     \
+       (options).tolerance      = 1.0e-5,                       \
+       (options).have_uv_param  = PK_LOGICAL_false,             \
+       (options).uv_param.param[0] = 0.0,                       \
+       (options).uv_param.param[1] = 0.0                        \
+    )
+
+
+/* PK_SURF_fix_self_int_surf_t */
+
+struct PK_SURF_fix_self_int_surf_s
+    {
+    PK_SURF_t       res_surf;
+    PK_fix_status_t status;
+    double          achieved_tol;
+    };
+
+typedef struct PK_SURF_fix_self_int_surf_s PK_SURF_fix_self_int_surf_t;
+
+
+
+/* PK_SURF_fix_self_int_r_t */
+
+struct PK_SURF_fix_self_int_r_s
+    {
+    int                          n_surfs;
+    PK_SURF_fix_self_int_surf_t *surfs;
+    PK_SURF_fix_fault_t          fault;
+    };
+
+typedef struct PK_SURF_fix_self_int_r_s PK_SURF_fix_self_int_r_t;
+
+
+
+/* PK_SURF_degen_t */
+
+struct PK_SURF_degen_s
+    {
+    PK_SURF_degen_type_t type;
+    PK_LOGICAL_t         have_position;
+    PK_VECTOR_t          position;
+    PK_LOGICAL_t         have_normal;
+    PK_VECTOR1_t         normal;
+    PK_UVBOX_t           uvbox;
+    };
+
+typedef struct PK_SURF_degen_s PK_SURF_degen_t;
+
+
+
+/* PK_SURF_degens_t */
+
+struct PK_SURF_degens_s
+    {
+    int              n_degen;  /* number of degeneracies */
+    PK_SURF_degen_t *degen;    /* details of degeneracies */
+    };
+
+typedef struct PK_SURF_degens_s PK_SURF_degens_t;
+
+
+
+/* PK_SURF_find_degens_o_t */
+
+struct PK_SURF_find_degens_o_s
+    {
+    int              o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_SURF_find_degens_o_s PK_SURF_find_degens_o_t;
+
+
+
+/* PK_SURF_find_degens_o_m */
+
+#define PK_SURF_find_degens_o_m(options)                \
+    (                                                   \
+       (options).o_t_version = 1                        \
+    )
+
+
+/* PK_SURF_fix_degens_o_t */
+
+struct PK_SURF_fix_degens_o_s
+    {
+    int                  o_t_version;      /* version number of option */
+    double               tolerance;        /* tolerance for approximating */
+    double               target_radii[2];  /* lower bounds for the radius of */
+    int                  n_normals;        /* number of normals (0) */
+    const PK_VECTOR1_t  *normals;          /* normals of the degeneracies */
+    const int           *normal_indices;   /* indices linking `normals' to each */
+    };
+
+typedef struct PK_SURF_fix_degens_o_s PK_SURF_fix_degens_o_t;
+
+
+
+/* PK_SURF_fix_degens_o_m */
+
+#define PK_SURF_fix_degens_o_m(options)                       \
+    (                                                         \
+       (options).o_t_version     = 1,                         \
+       (options).tolerance       = 1.0e-5,                    \
+       (options).target_radii[0] = 0.0,                       \
+       (options).target_radii[1] = 0.0,                       \
+       (options).n_normals       = 0,                         \
+       (options).normals         = NULL,                      \
+       (options).normal_indices  = NULL                       \
+    )
+
+
+/* PK_SURF_fix_degens_r_t */
+
+struct PK_SURF_fix_degens_r_s
+    {
+    PK_SURF_t       res_surf;
+    PK_fix_status_t status;
+    double          achieved_tol;
+    double          achieved_radii[2];
+    };
+
+typedef struct PK_SURF_fix_degens_r_s PK_SURF_fix_degens_r_t;
+
+
+
+/* PK_SURF_create_blend_o_t */
+
+struct PK_SURF_create_blend_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_help;       /* (PK_LOGICAL_false) */
+    PK_VECTOR_t     help;            /* help vector */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    };
+
+typedef struct PK_SURF_create_blend_o_s PK_SURF_create_blend_o_t;
+
+
+
+/* PK_SURF_create_blend_o_m */
+
+#define PK_SURF_create_blend_o_m(options)                 \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_help             = PK_LOGICAL_false,    \
+       (options).help.coord[0]         = 0.0,                 \
+       (options).help.coord[1]         = 0.0,                 \
+       (options).help.coord[2]         = 0.0,                 \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0                  \
+    )
+
+
+/* PK_SURF_extend_o_t */
+
+struct PK_SURF_extend_o_s
+    {
+    int                  o_t_version;      /* option structure version */
+    PK_SURF_extension_t  extension_type;   /* the type of the extension */
+    PK_VECTOR_t          extension_point;  /* point to extend to */
+    PK_BOX_t             extension_box;    /* box to extend to */
+    PK_UVBOX_t           extension_uvbox;  /* uv box to extend to */
+    double               u_ratio;          /* ratio of the u parameter */
+    double               U_ratio;          /* ratio of the u parameter */
+    double               v_ratio;          /* ratio of the v parameter */
+    double               V_ratio;          /* ratio of the v parameter */
+    PK_LOGICAL_t         allow_partial_extension;
+    PK_extension_shape_t extension_shape;  /* the method for extending */
+    PK_SURF_extend_update_t
+                         update;           /* update flag */
+    };
+
+typedef struct PK_SURF_extend_o_s PK_SURF_extend_o_t;
+
+
+
+/* PK_SURF_extend_o_m */
+
+#define PK_SURF_extend_o_m(options)                                         \
+    (                                                                       \
+       (options).o_t_version              = 3,                              \
+       (options).extension_type           = PK_SURF_extension_none_c,       \
+       (options).extension_point.coord[0] =                                 \
+       (options).extension_point.coord[1] =                                 \
+       (options).extension_point.coord[2] = 0,                              \
+       (options).extension_box.coord[0]   =                                 \
+       (options).extension_box.coord[1]   =                                 \
+       (options).extension_box.coord[2]   =                                 \
+       (options).extension_box.coord[3]   =                                 \
+       (options).extension_box.coord[4]   =                                 \
+       (options).extension_box.coord[5]   = 0,                              \
+       (options).extension_uvbox.param[0] =                                 \
+       (options).extension_uvbox.param[1] =                                 \
+       (options).extension_uvbox.param[2] =                                 \
+       (options).extension_uvbox.param[3] = 0,                              \
+       (options).u_ratio                  = 0,                              \
+       (options).U_ratio                  = 0,                              \
+       (options).v_ratio                  = 0,                              \
+       (options).V_ratio                  = 0,                              \
+       (options).allow_partial_extension  = PK_LOGICAL_false,               \
+       (options).extension_shape          = PK_extension_shape_linear_c,    \
+       (options).update                   = PK_SURF_extend_update_default_c \
+    )
+
+
+/* PK_SURF_intersect_curve_o_t */
+
+struct PK_SURF_intersect_curve_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    };
+
+typedef struct PK_SURF_intersect_curve_o_s PK_SURF_intersect_curve_o_t;
+
+
+
+/* PK_SURF_intersect_curve_o_m */
+
+#define PK_SURF_intersect_curve_o_m(options)                  \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0                  \
+    )
+
+
+/* PK_SURF_intersect_surf_o_t */
+
+struct PK_SURF_intersect_surf_o_s
+    {
+    int             o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t    have_box;        /* whether box provided (PK_LOGICAL_false) */
+    PK_BOX_t        box;             /* box of interest */
+    PK_LOGICAL_t    have_uvbox_1;    /* whether box provided for surf_1 */
+    PK_UVBOX_t      uvbox_1;         /* uvbox for surf_1 */
+    PK_LOGICAL_t    have_uvbox_2;    /* whether box provided for surf_2 */
+    PK_UVBOX_t      uvbox_2;         /* uvbox for surf_2 */
+    PK_LOGICAL_t    have_vector;     /* whether seed vector provided */
+    PK_VECTOR_t     vector;          /* only return branch containing the seed */
+    };
+
+typedef struct PK_SURF_intersect_surf_o_s PK_SURF_intersect_surf_o_t;
+
+
+
+/* PK_SURF_intersect_surf_o_m */
+
+#define PK_SURF_intersect_surf_o_m(options)                   \
+    (                                                         \
+       (options).o_t_version           = 1,                   \
+       (options).have_box              = PK_LOGICAL_false,    \
+       (options).box.coord[0]          = 0.0,                 \
+       (options).box.coord[1]          = 0.0,                 \
+       (options).box.coord[2]          = 0.0,                 \
+       (options).box.coord[3]          = 0.0,                 \
+       (options).box.coord[4]          = 0.0,                 \
+       (options).box.coord[5]          = 0.0,                 \
+       (options).have_uvbox_1          = PK_LOGICAL_false,    \
+       (options).uvbox_1.param[0]      = 0.0,                 \
+       (options).uvbox_1.param[1]      = 0.0,                 \
+       (options).uvbox_1.param[2]      = 0.0,                 \
+       (options).uvbox_1.param[3]      = 0.0,                 \
+       (options).have_uvbox_2          = PK_LOGICAL_false,    \
+       (options).uvbox_2.param[0]      = 0.0,                 \
+       (options).uvbox_2.param[1]      = 0.0,                 \
+       (options).uvbox_2.param[2]      = 0.0,                 \
+       (options).uvbox_2.param[3]      = 0.0,                 \
+       (options).have_vector           = PK_LOGICAL_false,    \
+       (options).vector.coord[0]       = 0.0,                 \
+       (options).vector.coord[1]       = 0.0,                 \
+       (options).vector.coord[2]       = 0.0                  \
+    )
+
+
+/* PK_SURF_make_bsurf_o_t */
+
+struct PK_SURF_make_bsurf_o_s
+    {
+    int                        o_t_version;
+    double                     tolerance;  /* tolerance for */
+    PK_LOGICAL_t               force_cubic;
+    PK_LOGICAL_t               force_non_rational;
+    PK_force_continuity_t      force_continuity;
+    PK_continuity_t            continuity;
+    PK_make_bsurf_update_t     update;     /* update flag */
+    };
+
+typedef struct PK_SURF_make_bsurf_o_s PK_SURF_make_bsurf_o_t;
+
+
+
+/* PK_SURF_make_bsurf_o_m */
+
+#define PK_SURF_make_bsurf_o_m(options)                                 \
+    (                                                                   \
+       (options).o_t_version           = 2,                             \
+       (options).tolerance             = 1.0e-5,                        \
+       (options).force_cubic           = PK_LOGICAL_false,              \
+       (options).force_non_rational    = PK_LOGICAL_false,              \
+       (options).force_continuity      = PK_force_continuity_no_c,      \
+       (options).continuity            = PK_continuity_c1_c,            \
+       (options).update                = PK_make_bsurf_update_default_c \
+    )
+
+
+/* PK_SURF_make_sheet_trimmed_o_t */
+
+struct PK_SURF_make_sheet_trimmed_o_s
+    {
+    int                    o_t_version;      /* option structure version */
+    PK_LOGICAL_t           check_wires;      /* identify wire topology */
+    PK_LOGICAL_t           check_self_int;   /* check for topological */
+    PK_LOGICAL_t           check_loops;      /* check for loop consistency */
+    PK_LOGICAL_t           nominal_geom;     /* Enable nominal geometry */
+    };
+
+typedef struct PK_SURF_make_sheet_trimmed_o_s
+               PK_SURF_make_sheet_trimmed_o_t;
+
+
+
+/* PK_SURF_make_sheet_trimmed_o_m */
+
+#define PK_SURF_make_sheet_trimmed_o_m(options)                    \
+    (                                                              \
+       (options).o_t_version     = 2,                              \
+       (options).check_wires     = PK_LOGICAL_false,               \
+       (options).check_self_int  = PK_LOGICAL_false,               \
+       (options).check_loops     = PK_LOGICAL_false,               \
+       (options).nominal_geom    = PK_LOGICAL_false                \
+    )
+
+
+/* PK_SURF_make_curve_isoparam_o_t */
+
+struct PK_SURF_make_curve_isoparam_o_s
+{
+int                   o_t_version;            /* version number */
+PK_isoparam_prefer_t  preferred_curve_type;   /* how to construct an */
+PK_LOGICAL_t          want_interval;          /* whether to return the */
+};
+
+typedef struct PK_SURF_make_curve_isoparam_o_s
+               PK_SURF_make_curve_isoparam_o_t;
+
+
+
+/* PK_SURF_make_curve_isoparam_o_m */
+
+#define PK_SURF_make_curve_isoparam_o_m(options)                     \
+    (                                                                \
+       (options).o_t_version          = 1,                           \
+       (options).preferred_curve_type = PK_isoparam_prefer_simple_c, \
+       (options).want_interval        = PK_LOGICAL_true              \
+    )
+
+
+/* PK_SURF_make_cus_isocline_o_m */
+
+#define PK_SURF_make_cus_isocline_o_m(options)                \
+    (                                                        \
+        (options).o_t_version     = 1,                       \
+        (options).old_iso         = PK_LOGICAL_false,        \
+        (options).all_points      = PK_LOGICAL_true          \
+    )
+
+
+/* PK_SURF_make_cus_isocline_o_t */
+
+struct PK_SURF_make_cus_isocline_o_s
+    {
+    int            o_t_version;    /* version number of option structure */
+    PK_LOGICAL_t   old_iso;        /* whether former isocline curves are */
+    PK_LOGICAL_t   all_points;     /* whether curves using all the control */
+    };
+typedef struct PK_SURF_make_cus_isocline_o_s PK_SURF_make_cus_isocline_o_t;
+
+
+
+/* PK_BSURF_clamp_knots_o_t */
+
+struct PK_BSURF_clamp_knots_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BSURF_clamp_knots_o_s PK_BSURF_clamp_knots_o_t;
+
+
+
+/* PK_BSURF_clamp_knots_o_m */
+
+#define PK_BSURF_clamp_knots_o_m(options)                                  \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_BSURF_lower_degree_o_t */
+
+struct PK_BSURF_lower_degree_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    PK_LOGICAL_t have_tolerance;     /* whether tolerance was specified */
+    double       tolerance;          /* distance tolerance */
+    };
+
+typedef struct PK_BSURF_lower_degree_o_s PK_BSURF_lower_degree_o_t;
+
+
+
+/* PK_BSURF_lower_degree_o_m */
+
+#define PK_BSURF_lower_degree_o_m(options)                                 \
+    (                                                                      \
+       (options).o_t_version           = 1,                                \
+       (options).have_tolerance        = PK_LOGICAL_false,                 \
+       (options).tolerance             = 0.0                               \
+    )
+
+
+/* PK_BSURF_raise_degree_o_t */
+
+struct PK_BSURF_raise_degree_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    };
+
+typedef struct PK_BSURF_raise_degree_o_s PK_BSURF_raise_degree_o_t;
+
+
+
+/* PK_BSURF_raise_degree_o_m */
+
+#define PK_BSURF_raise_degree_o_m(options)                                \
+    (                                                                      \
+       (options).o_t_version           = 1                                 \
+    )
+
+
+/* PK_BSURF_remove_knots_o_t */
+
+struct PK_BSURF_remove_knots_o_s
+    {
+    int          o_t_version;        /* options structure version */
+    PK_LOGICAL_t have_tolerance;     /* whether tolerance is set */
+    double       tolerance;          /* tolerance for knot removal */
+    int          n_knot_indices;     /* number of knot indices (0) */
+    const int   *knot_indices;       /* indices of knots to be removed (NULL) */
+    const int   *remove_multiplicities;
+    };
+
+typedef struct PK_BSURF_remove_knots_o_s PK_BSURF_remove_knots_o_t;
+
+
+
+/* PK_BSURF_remove_knots_o_m */
+
+#define PK_BSURF_remove_knots_o_m(options)                         \
+    (                                                              \
+       (options).o_t_version           = 1,                        \
+       (options).have_tolerance        = PK_LOGICAL_false,         \
+       (options).tolerance             = 0.0,                      \
+       (options).n_knot_indices        = 0,                        \
+       (options).knot_indices          = NULL,                     \
+       (options).remove_multiplicities = NULL                      \
+    )
+
+
+/* PK_BSURF_reparameterise_o_t */
+
+struct PK_BSURF_reparameterise_o_s
+    {
+    int            o_t_version;        /* options structure version */
+    PK_LOGICAL_t   have_u_interval;    /* whether to reparameterise along U */
+    PK_INTERVAL_t  u_interval;         /* new interval along U direction (0,0) */
+    PK_LOGICAL_t   have_v_interval;    /* whether to reparameterise along V */
+    PK_INTERVAL_t  v_interval;         /* new interval along V direction (0,0) */
+    PK_LOGICAL_t   transpose;          /* whether to transpose U and V */
+    PK_LOGICAL_t   reverse_u;          /* whether to reverse the U direction */
+    PK_LOGICAL_t   reverse_v;          /* whether to reverse the V direction */
+    };
+
+typedef struct PK_BSURF_reparameterise_o_s PK_BSURF_reparameterise_o_t;
+
+
+
+/* PK_BSURF_reparameterise_o_m */
+
+#define PK_BSURF_reparameterise_o_m(options)                             \
+    (                                                                    \
+       (options).o_t_version           = 2,                              \
+       (options).have_u_interval       = PK_LOGICAL_false,               \
+       (options).u_interval.value[0]   = 0.0,                            \
+       (options).u_interval.value[1]   = 0.0,                            \
+       (options).have_v_interval       = PK_LOGICAL_false,               \
+       (options).v_interval.value[0]   = 0.0,                            \
+       (options).v_interval.value[1]   = 0.0,                            \
+       (options).transpose             = PK_LOGICAL_false,               \
+       (options).reverse_u             = PK_LOGICAL_false,               \
+       (options).reverse_v             = PK_LOGICAL_false                \
+    )
+
+
+/* PK_BSURF_sf_t */
+
+struct PK_BSURF_sf_s
+    {
+    int u_degree;                            /* The degree in u = order-1. */
+    int v_degree;                            /* The degree in v = order-1. */
+    int n_u_vertices;                        /* The number of vertices in u. */
+    int n_v_vertices;                        /* The number of vertices in v. */
+    int vertex_dim;                          /* The dimension of each vertex. */
+    PK_LOGICAL_t is_rational;                /* True if the surface is rational */
+    double *vertex;                          /* The vertices. */
+    PK_BSURF_form_t form;                    /* The surface shape. */
+    int n_u_knots;                           /* The number of distinct knot */
+    int n_v_knots;                           /* The number of distinct knot */
+    int *u_knot_mult;                        /* The multiplicities in u. */
+    int *v_knot_mult;                        /* The multiplicities in v. */
+    double *u_knot;                          /* The distinct knot values in u. */
+    double *v_knot;                          /* The distinct knot values in v. */
+    PK_knot_type_t u_knot_type;              /* Enum describing the u knot set. */
+    PK_knot_type_t v_knot_type;              /* Enum describing the v knot set. */
+    PK_LOGICAL_t is_u_periodic;              /* Periodic in u. */
+    PK_LOGICAL_t is_v_periodic;              /* Periodic in v. */
+    PK_LOGICAL_t is_u_closed;                /* Closed in u. */
+    PK_LOGICAL_t is_v_closed;                /* Closed in v. */
+    PK_self_intersect_t self_intersecting;   /* Yes no or maybe. */
+    PK_convexity_t convexity;                /* Yes no or maybe. */
+    };
+typedef struct PK_BSURF_sf_s PK_BSURF_sf_t;
+
+
+/* PK_BSURF_ask_knots_o_t */
+
+struct PK_BSURF_ask_knots_o_s
+    {
+    int            o_t_version;           /* option structure version */
+    PK_LOGICAL_t   want_expanded_knots;   /* whether to return expanded knots */
+    };
+typedef struct PK_BSURF_ask_knots_o_s
+   PK_BSURF_ask_knots_o_t;
+
+
+/* PK_BSURF_ask_knots_o_m */
+
+#define PK_BSURF_ask_knots_o_m(options)                                     \
+    (                                                                       \
+       (options).o_t_version              = 1,                              \
+       (options).want_expanded_knots      = PK_LOGICAL_false                \
+    )
+
+
+/* PK_SURF_general_eval_f_t */
+
+typedef PK_ERROR_code_t(*PK_SURF_general_eval_f_t)
+(
+/* received */
+PK_UV_t                   /*uv*/,             /* u and v parameter pair */
+int                       /*n_u_derivs*/,     /* number of u derivatives */
+int                       /*n_v_derivs*/,     /* number of v derivatives */
+PK_HAND_t                 /*u_hand_dir*/,     /* u evaluation direction */
+PK_HAND_t                 /*v_hand_dir*/,     /* v evaluation direction */
+PK_POINTER_t              /*external_data*/,  /* external application data */
+/* returned */
+double            *const  /*p*/               /* point and derivatives */
+);
+
+
+
+/* PK_SURF_general_user_t */
+
+struct PK_SURF_general_user_s
+    {
+    PK_SURF_general_eval_f_t eval_fn;              /* user evaluator */
+    PK_POINTER_t             eval_data;            /* evaluator data */
+    int                      highest_u_deriv;      /* highest u derivative that */
+    int                      highest_v_deriv;      /* highest v derivative that */
+    PK_LOGICAL_t             is_u_closed;          /* closure of surface in u */
+    PK_LOGICAL_t             is_v_closed;          /* closure of surface in v */
+    PK_LOGICAL_t             is_u_periodic;        /* periodicity of surface */
+    PK_LOGICAL_t             is_v_periodic;        /* periodicity of surface */
+    int                      n_u_discontinuities;  /* number of params in */
+    double                  *u_discontinuities;    /* array of u parameters */
+    int                      n_v_discontinuities;  /* number of params in */
+    double                  *v_discontinuities;    /* array of v parameters */
+    };
+
+typedef struct PK_SURF_general_user_s  PK_SURF_general_user_t;
+
+
+
+/* PK_SURF_general_t */
+
+struct PK_SURF_general_s
+    {
+    PK_SURF_general_type_t type;
+    union
+        {
+        PK_SURF_t              parasolid_surf;
+        PK_SURF_general_user_t user_surf;
+        } surf;
+    };
+
+typedef struct PK_SURF_general_s  PK_SURF_general_t;
+
+
+
+/* PK_SURF_general_m */
+
+#define PK_SURF_general_m(general_surf)                                \
+    (                                                                  \
+       (general_surf).type                  = PK_SURF_general_surf_c,  \
+       (general_surf).surf.parasolid_surf   = PK_ENTITY_null           \
+    )
+
+
+/* PK_BSURF_fitted_fault_t */
+
+struct PK_BSURF_fitted_fault_s
+    {
+    PK_BSURF_fitted_t  status;           /* status for the fit */
+    double             distance_error;   /* final maximum distance error */
+    double             angular_error;    /* final maximum angular error */
+    PK_UV_t            error_uv;         /* parameters at which the */
+    };
+
+typedef struct PK_BSURF_fitted_fault_s PK_BSURF_fitted_fault_t;
+
+
+
+/* PK_BSURF_create_fitted_o_t */
+
+struct PK_BSURF_create_fitted_o_s
+{
+int                o_t_version;              /* option structure version number */
+PK_SURF_general_t  surf;                     /* surface to be fitted */
+PK_INTERVAL_t      u_range;                  /* u parameter range for B-surface */
+PK_INTERVAL_t      v_range;                  /* v parameter range for B-surface */
+double             tolerance;                /* distance tolerance (1.0e-5) */
+double             angular_tolerance;        /* angular tolerance (0.0) */
+int                n_u_interpolation_parms;  /* number of parameters at which */
+const double      *u_interpolation_parms;    /* u parameters at which to */
+int                n_v_interpolation_parms;  /* number of parameters at which */
+const double      *v_interpolation_parms;    /* v parameters at which to */
+};
+
+typedef struct PK_BSURF_create_fitted_o_s
+               PK_BSURF_create_fitted_o_t;
+
+
+
+/* PK_BSURF_create_fitted_o_m */
+
+#define PK_BSURF_create_fitted_o_m(options)                       \
+    (                                                             \
+       (options).o_t_version             = 1,                     \
+       (options).u_range.value[0]        = 0,                     \
+       (options).u_range.value[1]        = 1,                     \
+       (options).v_range.value[0]        = 0,                     \
+       (options).v_range.value[1]        = 1,                     \
+       (options).tolerance               = 1.0e-05,               \
+       (options).angular_tolerance       = 0.0,                   \
+       (options).n_u_interpolation_parms = 0,                     \
+       (options).u_interpolation_parms   = NULL,                  \
+       (options).n_v_interpolation_parms = 0,                     \
+       (options).v_interpolation_parms   = NULL                   \
+    )
+
+
+/* PK_BSURF_piecewise_sf_t */
+
+struct PK_BSURF_piecewise_sf_s
+    {
+    int                 u_degree;            /* The degree in u = order-1. */
+    int                 v_degree;            /* The degree in v = order-1. */
+    int                 n_u_segments;        /* The number of segments in u. */
+    int                 n_v_segments;        /* The number of segments in v. */
+    int                 dim;                 /* Dimension of coefficient vecs */
+    PK_LOGICAL_t        is_rational;         /* True if the surface is rational */
+    PK_piecewise_rep_t  rep;                 /* Representation method */
+    double             *coeffs;              /* Coefficient vectors */
+    };
+typedef struct PK_BSURF_piecewise_sf_s PK_BSURF_piecewise_sf_t;
+
+
+/* PK_BSURF_splinewise_sf_t */
+
+struct PK_BSURF_splinewise_sf_s
+    {
+    int                 u_degree;       /* The u degree = order -1 */
+    int                 v_degree;       /* The u degree = order -1 */
+    int                 n_u_positions;  /* The number of positions in u */
+    int                 n_v_positions;  /* The number of positions in v */
+    PK_VECTOR_t        *positions;      /* The positions */
+    PK_PARAM_end_t      u_end;          /* End condition at lower u */
+    PK_PARAM_end_t      v_end;          /* End condition at lower v */
+    PK_PARAM_end_t      U_end;          /* End condition at upper U */
+    PK_PARAM_end_t      V_end;          /* End condition at upper V */
+    PK_VECTOR_t        *u_derivs;       /* Derivatives at lower u */
+    PK_VECTOR_t        *v_derivs;       /* Derivatives at lower v */
+    PK_VECTOR_t        *U_derivs;       /* Derivatives at upper U */
+    PK_VECTOR_t        *V_derivs;       /* Derivatives at upper V */
+    PK_PARAM_knot_t     u_how_knot;     /* How u knot vector defined */
+    PK_PARAM_knot_t     v_how_knot;     /* How v knot vector defined */
+    double             *u_knot;         /* u Knot vector */
+    double             *v_knot;         /* v Knot vector */
+    PK_PARAM_twist_t    u_v;            /* how lower u lower v */
+    PK_PARAM_twist_t    u_V;            /* how lower u upper V */
+    PK_PARAM_twist_t    U_v;            /* how upper U lower v */
+    PK_PARAM_twist_t    U_V;            /* how upper U upper V */
+    PK_VECTOR_t         u_v_twist;      /* lower u lower v twist vector */
+    PK_VECTOR_t         u_V_twist;      /* lower u upper V twist vector */
+    PK_VECTOR_t         U_v_twist;      /* upper U lower v twist vector */
+    PK_VECTOR_t         U_V_twist;      /* upper U upper V twist vector */
+    };
+typedef struct PK_BSURF_splinewise_sf_s PK_BSURF_splinewise_sf_t;
+
+
+/* PK_BSURF_constrained_fault_t */
+
+struct PK_BSURF_constrained_fault_s
+    {
+    PK_BSURF_constrained_t  status;          /* status for the surface fit */
+    double                  distance_error;  /* the maximum distance error */
+    PK_UV_t                 distance_uv;     /* parameters at which the */
+    double                  angular_error;   /* the maximum angular error */
+    PK_UV_t                 angular_uv;      /* parameters at which the */
+    };
+typedef struct PK_BSURF_constrained_fault_s PK_BSURF_constrained_fault_t;
+
+
+
+/* PK_BSURF_create_constrained_o_t */
+
+struct PK_BSURF_create_constrained_o_s
+    {
+    int                     o_t_version;   /* version number of options */
+    int                     n_positions;   /* number of position constraints */
+    const PK_VECTOR_t      *positions;     /* position constraints (NULL) */
+    const PK_UV_t          *uvs;           /* uv parameters of `positions' */
+    PK_SURF_t               uv_surface;    /* surface for parameterising */
+    int                     n_normals;     /* number of normal constraints */
+    const PK_VECTOR1_t     *normals;       /* normal constraints (NULL) */
+    const int              *normal_indices;
+    double                  tolerance;     /* distance tolerance (1.0e-5) */
+    double                  angular_tolerance;
+    PK_constrained_opt_t    optimise;      /* how to optimise the algorithm */
+    PK_constrained_update_t update;        /* update flag */
+    };
+typedef struct PK_BSURF_create_constrained_o_s PK_BSURF_create_constrained_o_t;
+
+
+
+/* PK_BSURF_create_constrained_o_m */
+
+#define PK_BSURF_create_constrained_o_m(options)                            \
+       ((options).o_t_version       = 2,                                    \
+        (options).n_positions       = 0,                                    \
+        (options).positions         = NULL,                                 \
+        (options).uvs               = NULL,                                 \
+        (options).uv_surface        = PK_ENTITY_null,                       \
+        (options).n_normals         = 0,                                    \
+        (options).normals           = NULL,                                 \
+        (options).normal_indices    = NULL,                                 \
+        (options).tolerance         = 1.0e-5,                               \
+        (options).angular_tolerance = 0.0,                                  \
+        (options).optimise          = PK_constrained_opt_perf_c,            \
+        (options).update            = PK_constrained_update_default_c       \
+       )
+
+
+/* PK_POINT_sf_t */
+
+
+struct PK_POINT_sf_s
+    {
+    PK_VECTOR_t position;     /* cartesian position */
+    };
+
+typedef struct PK_POINT_sf_s PK_POINT_sf_t;
+
+
+
+/* PK_GEOM_check_o_t */
+
+struct PK_GEOM_check_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    int                 max_faults;      /* limit on fault numbers (1) */
+    PK_check_geom_t     geom;            /* bad geometry (PK_check_geom_yes_c) */
+    PK_check_attribs_t  attribs;         /* system attribute validity checks */
+    };
+
+typedef struct PK_GEOM_check_o_s PK_GEOM_check_o_t;
+
+
+
+/* PK_GEOM_check_o_m */
+
+#define PK_GEOM_check_o_m(options)                      \
+    (                                                   \
+       (options).o_t_version = 2,                       \
+       (options).max_faults  = 1,                       \
+       (options).geom        = PK_check_geom_yes_c,     \
+       (options).attribs     = PK_check_attribs_no_c    \
+    )
+
+
+/* PK_GEOM_copy_r_t */
+
+struct PK_GEOM_copy_r_s
+    {
+    int                  n_copied_geoms;
+    PK_GEOM_t           *copied_geoms;
+    PK_ENTITY_track_r_t  tracking;
+    };
+typedef struct PK_GEOM_copy_r_s PK_GEOM_copy_r_t;
+
+
+
+
+/* PK_GEOM_copy_o_t */
+
+struct PK_GEOM_copy_o_s
+    {
+    int                         o_t_version;         /* version number */
+    PK_ITEM_t                   destination;         /* destination for copies */
+    PK_GEOM_copy_t              copy_dependents;     /* which geometric */
+    PK_GEOM_copy_t              copy_attributes;     /* copy attributes */
+    };
+typedef struct PK_GEOM_copy_o_s PK_GEOM_copy_o_t;
+
+
+
+/* PK_GEOM_copy_o_m */
+
+#define PK_GEOM_copy_o_m(options)                                           \
+    (                                                                       \
+        (options).o_t_version      = 1,                                     \
+        (options).destination      = PK_ITEM_null,                          \
+        (options).copy_dependents  = PK_GEOM_copy_always_c,                 \
+        (options).copy_attributes  = PK_GEOM_copy_never_c                   \
+    )
+
+
+/* PK_GEOM_range_o_t */
+
+struct PK_GEOM_range_o_s
+    {
+    int                    o_t_version;     /* version number of option struct. */
+    PK_LOGICAL_t           have_tolerance;  /* whether tolerance value is */
+    double                 tolerance;       /* tolerance on accuracy of */
+    PK_range_bound_t       bound;           /* bounds on min separation */
+    PK_range_guess_t       guesses[2];      /* guesses for each end */
+    PK_range_type_t        range_type;      /* whether to find the global */
+    PK_range_param_bound_t param_bound[2];  /* parameter bound for the */
+    PK_range_opt_t         opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_o_s PK_GEOM_range_o_t;
+
+
+
+/* PK_GEOM_range_o_m */
+
+#define PK_GEOM_range_o_m(options)                                      \
+    (                                                                   \
+       (options).o_t_version                = 3,                        \
+       (options).have_tolerance             = PK_LOGICAL_false,         \
+       (options).tolerance                  = 0.0,                      \
+       PK_range_bound_m( (options).bound ),                             \
+       PK_range_guess_m( (options).guesses[0] ),                        \
+       PK_range_guess_m( (options).guesses[1] ),                        \
+       (options).range_type                 = PK_range_type_minimum_c,  \
+       PK_range_param_bound_m( (options).param_bound[0] ),              \
+       PK_range_param_bound_m( (options).param_bound[1] ),              \
+       (options).opt_level               = PK_range_opt_performance_c   \
+    )
+
+
+/* PK_GEOM_range_local_o_t */
+
+struct PK_GEOM_range_local_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_local_o_s PK_GEOM_range_local_o_t;
+
+
+
+/* PK_GEOM_range_local_o_m */
+
+#define PK_GEOM_range_local_o_m(options)                             \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_GEOM_range_array_o_t */
+
+struct PK_GEOM_range_array_o_s
+    {
+    int                     o_t_version;      /* version number of option */
+    PK_LOGICAL_t            have_tolerance;   /* (PK_LOGICAL_false) */
+    double                  tolerance;        /* tolerance */
+    PK_range_bound_t        bound;            /* bounds on min separation */
+    PK_range_type_t         range_type;       /* whether to find the global */
+    PK_range_param_bound_t *param_bounds[2];  /* parameter bound for the */
+    PK_range_opt_t          opt_level;        /* the level of analysis */
+   };
+
+typedef struct PK_GEOM_range_array_o_s PK_GEOM_range_array_o_t;
+
+
+
+/* PK_GEOM_range_array_o_m */
+
+#define PK_GEOM_range_array_o_m(options)                             \
+    (                                                                \
+       (options).o_t_version            = 3,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).range_type             = PK_range_type_minimum_c,   \
+       (options).param_bounds[0]        = NULL,                      \
+       (options).param_bounds[1]        = NULL,                      \
+       (options).opt_level              = PK_range_opt_performance_c \
+   )
+
+
+/* PK_GEOM_range_vector_o_t */
+
+struct PK_GEOM_range_vector_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_bound_t    bound;           /* bounds on min separation */
+    PK_range_guess_t    guess;           /* guess for end on `geom' */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_vector_o_s PK_GEOM_range_vector_o_t;
+
+
+
+/* PK_GEOM_range_vector_o_m */
+
+#define PK_GEOM_range_vector_o_m(options)                            \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       PK_range_guess_m( (options).guess ),                          \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_GEOM_range_local_vector_o_t */
+
+struct PK_GEOM_range_local_vector_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_local_vector_o_s PK_GEOM_range_local_vector_o_t;
+
+
+
+/* PK_GEOM_range_local_vector_o_m */
+
+#define PK_GEOM_range_local_vector_o_m(options)                      \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_GEOM_range_array_vector_o_t */
+
+struct PK_GEOM_range_array_vector_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* (PK_LOGICAL_false) */
+    double              tolerance;       /* tolerance */
+    PK_range_bound_t    bound;           /* bounds on min separation */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_array_vector_o_s PK_GEOM_range_array_vector_o_t;
+
+
+
+/* PK_GEOM_range_array_vector_o_m */
+
+#define PK_GEOM_range_array_vector_o_m(options)                      \
+    (                                                                \
+       (options).o_t_version            = 2,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_GEOM_range_vector_many_o_t */
+
+struct PK_GEOM_range_vector_many_o_s
+    {
+    int                 o_t_version;     /* version number of option structure */
+    PK_LOGICAL_t        have_tolerance;  /* whether tolerance value is */
+    double              tolerance;       /* tolerance on accuracy of */
+    PK_range_bound_t    bound;           /* bounds on minimum separation */
+    PK_range_guess_t   *guesses;         /* guesses for end on `geom' (NULL) */
+    PK_range_opt_t      opt_level;       /* the level of analysis */
+    };
+
+typedef struct PK_GEOM_range_vector_many_o_s PK_GEOM_range_vector_many_o_t;
+
+
+
+/* PK_GEOM_range_vector_many_o_m */
+
+#define PK_GEOM_range_vector_many_o_m(options)                        \
+    (                                                                \
+       (options).o_t_version            = 1,                         \
+       (options).have_tolerance         = PK_LOGICAL_false,          \
+       (options).tolerance              = 0.0,                       \
+       PK_range_bound_m( (options).bound ),                          \
+       (options).guesses                = NULL,                      \
+       (options).opt_level              = PK_range_opt_performance_c \
+    )
+
+
+/* PK_GEOM_render_line_o_t */
+
+struct PK_GEOM_render_line_o_s
+    {
+    int                    o_t_version;   /* version of this PK option struct */
+    PK_render_param_t      param;         /* whether to draw parametric hatch */
+    PK_render_boundary_t   boundary;      /* whether to draw surface boundaries */
+    PK_render_bcurve_t     bcurve;        /* method for rendering bcurves */
+    PK_LOGICAL_t             is_curve_chord_tol;
+    double                   curve_chord_tol;
+    PK_LOGICAL_t             is_curve_chord_max;
+    double                   curve_chord_max;
+    PK_LOGICAL_t             is_curve_chord_ang;
+    double                   curve_chord_ang;
+    double                 param_u;       /* hatch spacing in U direction (0.0) */
+    double                 param_v;       /* hatch spacing in V direction (0.0) */
+    };
+typedef struct PK_GEOM_render_line_o_s PK_GEOM_render_line_o_t;
+
+
+
+/* PK_GEOM_render_line_o_m */
+
+
+
+#define PK_GEOM_render_line_o_m( opt)                                   \
+    (   (opt).o_t_version = 2,                                          \
+        (opt).param       = PK_render_param_no_c,                       \
+        (opt).boundary    = PK_render_boundary_yes_c,                   \
+        (opt).bcurve      = PK_render_bcurve_polyline_c,                \
+        (opt).is_curve_chord_tol            = PK_LOGICAL_false,         \
+        (opt).curve_chord_tol = 0.0,                                    \
+        (opt).is_curve_chord_max            = PK_LOGICAL_false,         \
+        (opt).curve_chord_max = 0.0,                                    \
+        (opt).is_curve_chord_ang            = PK_LOGICAL_false,         \
+        (opt).curve_chord_ang = 0.0,                                    \
+        (opt).param_u  =                      0.0,                      \
+        (opt).param_v  =                      0.0                       )
+
+
+
+/* PK_GEOM_transform_o_t */
+
+struct PK_GEOM_transform_o_s
+{
+int                   o_t_version;    /* version of options structure */
+double                tolerance;      /* precision for replacing geometry (0.0) */
+PK_GEOM_transform_t   modify;         /* modify geometry in-place or */
+PK_LOGICAL_t          want_out_geoms; /* fill return array with new geom */
+PK_LOGICAL_t          want_exact;     /* fill exact array (PK_LOGICAL_true) */
+};
+typedef struct PK_GEOM_transform_o_s PK_GEOM_transform_o_t;
+
+
+/* PK_GEOM_transform_o_m */
+
+#define PK_GEOM_transform_o_m(options)                         \
+       ((options).o_t_version    = 1,                          \
+        (options).tolerance      = 0.0,                        \
+        (options).modify         = PK_GEOM_transform_new_c,    \
+        (options).want_out_geoms = PK_LOGICAL_true,            \
+        (options).want_exact     = PK_LOGICAL_true             \
+       )
+
+
+/* PK_LINE_sf_t */
+
+
+struct PK_LINE_sf_s
+    {
+    PK_AXIS1_sf_t basis_set;  /* a cartesian point and a direction */
+    };
+
+typedef struct PK_LINE_sf_s PK_LINE_sf_t;
+
+
+
+/* PK_CIRCLE_sf_t */
+
+
+struct PK_CIRCLE_sf_s
+    {
+    PK_AXIS2_sf_t basis_set;  /* centre, plane normal, direction to t = 0 */
+    double        radius;     /* the radius of the circle(>0) */
+    };
+
+typedef struct PK_CIRCLE_sf_s PK_CIRCLE_sf_t;
+
+
+
+/* PK_ELLIPSE_sf_t */
+
+
+struct PK_ELLIPSE_sf_s
+    {
+    PK_AXIS2_sf_t basis_set;     /* centre, plane normal, major axis */
+    double        R1;            /* the larger radius of the ellipse(>0) */
+    double        R2;            /* the smaller radius of the ellipse(>0) */
+    };
+
+typedef struct PK_ELLIPSE_sf_s PK_ELLIPSE_sf_t;
+
+
+
+/* PK_PLANE_sf_t */
+
+
+struct PK_PLANE_sf_s
+    {
+    PK_AXIS2_sf_t   basis_set;   /* point, normal, drn of constant v lines */
+    };
+
+typedef struct PK_PLANE_sf_s PK_PLANE_sf_t;
+
+
+/* PK_CYL_sf_t */
+
+
+struct PK_CYL_sf_s
+    {
+    PK_AXIS2_sf_t   basis_set;   /* location, cylinder axis, drn. to u = 0 */
+    double          radius;      /* the radius of the cylinder */
+    };
+
+typedef struct PK_CYL_sf_s PK_CYL_sf_t;
+
+
+/* PK_CONE_sf_t */
+
+
+struct PK_CONE_sf_s
+    {
+    PK_AXIS2_sf_t   basis_set;   /* location, cone axis, drn. to u = 0 */
+    double          radius;      /* the radius of a circle on the cone(>=0) */
+    double          semi_angle;  /* the half angle of the cone in radians */
+    };
+
+typedef struct PK_CONE_sf_s PK_CONE_sf_t;
+
+
+/* PK_SPHERE_sf_t */
+
+
+struct PK_SPHERE_sf_s
+    {
+    PK_AXIS2_sf_t basis_set;  /*centre, drn. to north pole, drn. to u = 0 */
+    double        radius;     /*the radius of the sphere(>0) */
+    };
+
+typedef struct PK_SPHERE_sf_s PK_SPHERE_sf_t;
+
+
+
+/* PK_TORUS_sf_t */
+
+
+struct PK_TORUS_sf_s
+    {
+    PK_AXIS2_sf_t basis_set;     /* centre, axis and a reference direction */
+    double        major_radius;  /* the major radius of the torus(!=0) */
+    double        minor_radius;  /* the minor radius of the torus(>0) */
+    };
+
+typedef struct PK_TORUS_sf_s PK_TORUS_sf_t;
+
+
+
+/* PK_OFFSET_sf_t */
+
+
+struct PK_OFFSET_sf_s
+    {
+    PK_SURF_t       underlying_surface;   /*underlying surface */
+    double          offset_distance;      /*an offset distance */
+    };
+
+typedef struct PK_OFFSET_sf_s PK_OFFSET_sf_t;
+
+
+
+/* PK_TRCURVE_sf_t */
+
+
+struct PK_TRCURVE_sf_s
+    {
+    PK_CURVE_t      basis_curve;   /* basis curve */
+    PK_INTERVAL_t   t_int;         /* interval on basis curve */
+    };
+
+typedef struct PK_TRCURVE_sf_s PK_TRCURVE_sf_t;
+
+
+
+/* PK_SWEPT_sf_t */
+
+
+struct PK_SWEPT_sf_s
+    {
+    PK_CURVE_t            curve;          /* curve to sweep */
+    PK_VECTOR1_t          direction;      /* vector direction to sweep */
+    };
+
+typedef struct PK_SWEPT_sf_s PK_SWEPT_sf_t;
+
+
+
+
+/* PK_SPUN_sf_t */
+
+
+struct PK_SPUN_sf_s
+    {
+    PK_CURVE_t            curve;          /* curve to spin */
+    PK_AXIS1_sf_t         axis;           /* axis defn for spin */
+    };
+
+typedef struct PK_SPUN_sf_s PK_SPUN_sf_t;
+
+
+
+
+/* PK_SPCURVE_sf_t */
+
+
+struct PK_SPCURVE_sf_s
+    {
+    PK_SURF_t             surf;           /* surface */
+    PK_CURVE_t            curve;          /* curve */
+    };
+
+typedef struct PK_SPCURVE_sf_s PK_SPCURVE_sf_t;
+
+
+
+/* PK_BLENDSF_sf_t */
+
+
+    struct PK_BLENDSF_sf_s
+        {
+        PK_GEOM_t     geom_1;        /* first supporting geometry */
+        PK_GEOM_t     geom_2;        /* second supporting geometry */
+        double        radii[2];      /* blend surface radii */
+        PK_CURVE_t    spine;         /* blend spine */
+        PK_INTERVAL_t spine_extent;  /* parameter range of spine */
+        };
+    typedef struct PK_BLENDSF_sf_s PK_BLENDSF_sf_t;
+
+
+
+/* PK_FCURVE_sf_t */
+
+
+    struct PK_FCURVE_sf_s
+        {
+        char       *key;        /* curve key */
+        int         n_ints;     /* number of integer values (>=0) */
+        int        *ints;       /* integer values */
+        int         n_doubles;  /* number of double values  (>=0) */
+        double     *doubles;    /* double values */
+        size_t      space;      /* data space required      (>=0) */
+        PK_TRANSF_t transf;     /* transformation (may be PK_ENTITY_null) */
+        };
+    typedef struct PK_FCURVE_sf_s PK_FCURVE_sf_t;
+
+
+
+
+/* PK_FSURF_sf_t */
+
+
+    struct PK_FSURF_sf_s
+        {
+        char       *key;        /* surf key */
+        int         n_ints;     /* number of integer values (>=0) */
+        int        *ints;       /* integer values */
+        int         n_doubles;  /* number of double values  (>=0) */
+        double     *doubles;    /* double values */
+        size_t      space;      /* data space required      (>=0) */
+        PK_TRANSF_t transf;     /* transformation (may be PK_ENTITY_null) */
+        };
+    typedef struct PK_FSURF_sf_s PK_FSURF_sf_t;
+
+
+
+
+/* PK_MARK_frustrum_t */
+
+typedef PK_ERROR_code_t (*PK_MARK_open_f_t)(PK_MARK_t, PK_LOGICAL_t);
+typedef PK_ERROR_code_t (*PK_MARK_close_f_t)(PK_MARK_t);
+typedef PK_ERROR_code_t (*PK_MARK_write_f_t)(PK_MARK_t, int, const char*);
+typedef PK_ERROR_code_t (*PK_MARK_read_f_t)(PK_MARK_t, int, char*);
+typedef PK_ERROR_code_t (*PK_MARK_check_f_t)(PK_MARK_t, PK_LOGICAL_t *);
+typedef PK_ERROR_code_t (*PK_MARK_delete_f_t)(PK_MARK_t);
+
+struct PK_MARK_frustrum_s
+    {
+    PK_MARK_open_f_t   open_fn;      /* open a rollmark for read or write */
+    PK_MARK_close_f_t  close_fn;     /* close a rollmark */
+    PK_MARK_write_f_t  write_fn;     /* write data to a rollmark */
+    PK_MARK_read_f_t   read_fn;      /* read data from a rollmark */
+    PK_MARK_check_f_t  check_fn;     /* check if mark is still valid */
+    PK_MARK_delete_f_t delete_fn;    /* delete a rollmark */
+    };
+typedef struct PK_MARK_frustrum_s PK_MARK_frustrum_t;
+
+
+
+
+/* PK_MARK_start_o_t */
+
+struct PK_MARK_start_o_s
+    {
+    PK_LOGICAL_t forward;  /* whether roll-forward is enabled (PK_LOGICAL_true) */
+    };
+typedef struct PK_MARK_start_o_s PK_MARK_start_o_t;
+
+
+
+/* PK_MARK_start_o_m */
+
+
+#define PK_MARK_start_o_m(val) (val).forward = PK_LOGICAL_true
+
+
+
+/* PK_PMARK_ask_entities_o_t */
+
+struct PK_PMARK_ask_entities_o_s
+    {
+    int                       o_t_version;        /* version number */
+    PK_PMARK_t                from_pmark;         /* pmark to start from */
+    PK_LOGICAL_t              want_new_entities;  /* return new entities */
+    PK_LOGICAL_t              want_mod_entities;  /* return mod entities */
+    PK_LOGICAL_t              want_del_entities;  /* return del entities */
+    PK_LOGICAL_t              want_logged_mod;    /* return entities modified */
+    PK_CLASS_array_t          new_entities_classes;
+    PK_CLASS_array_t          mod_entities_classes;
+    PK_CLASS_array_t          del_entities_classes;
+    };
+typedef struct PK_PMARK_ask_entities_o_s PK_PMARK_ask_entities_o_t;
+
+
+
+/* PK_PMARK_ask_entities_o_m */
+
+#define PK_PMARK_ask_entities_o_m(options)                      \
+    ((options).o_t_version                 = 1,                 \
+     (options).from_pmark                  = PK_PMARK_null,     \
+     (options).want_new_entities           = PK_LOGICAL_true,   \
+     (options).want_mod_entities           = PK_LOGICAL_true,   \
+     (options).want_del_entities           = PK_LOGICAL_true,   \
+     (options).want_logged_mod             = PK_LOGICAL_false,  \
+     (options).new_entities_classes.array  = NULL,              \
+     (options).new_entities_classes.length = 0,                 \
+     (options).mod_entities_classes.array  = NULL,              \
+     (options).mod_entities_classes.length = 0,                 \
+     (options).del_entities_classes.array  = NULL,              \
+     (options).del_entities_classes.length = 0)
+
+
+/* PK_PMARK_goto_attrib_cb_f_t */
+
+typedef void (*PK_PMARK_goto_attrib_cb_f_t)
+(
+/* received */
+PK_ATTRIB_t     /*attrib*/,     /* attribute about to be deleted */
+PK_ATTDEF_t     /*attdef*/,     /* attribute definition */
+PK_POINTER_t    /*context*/     /* context */
+);
+
+
+/* PK_PMARK_goto_attrib_cb_t */
+
+typedef PK_PMARK_goto_attrib_cb_f_t PK_PMARK_goto_attrib_cb_t;
+
+
+/* PK_PMARK_goto_o_t */
+
+struct PK_PMARK_goto_o_s
+    {
+    int                       o_t_version;        /* version number */
+    PK_LOGICAL_t              want_attrib_mod;    /* return entities modified */
+    PK_PMARK_goto_attrib_cb_f_t
+                              del_attrib_cb;      /* deleted attribute callback */
+    PK_POINTER_t              del_context;        /* context for callback */
+    PK_ATTDEF_array_t         del_attdefs;        /* definitions of deleted */
+    PK_LOGICAL_t              want_new_entities;  /* return new entities */
+    PK_LOGICAL_t              want_mod_entities;  /* return mod entities */
+    PK_LOGICAL_t              want_del_entities;  /* return del entities */
+    PK_LOGICAL_t              want_logged_mod;    /* return entities modified */
+    PK_CLASS_array_t          new_entities_classes;
+    PK_CLASS_array_t          mod_entities_classes;
+    PK_CLASS_array_t          del_entities_classes;
+    };
+typedef struct PK_PMARK_goto_o_s PK_PMARK_goto_o_t;
+
+
+
+/* PK_PMARK_goto_o_m */
+
+#define PK_PMARK_goto_o_m(options)                              \
+    ((options).o_t_version                 = 4,                 \
+     (options).want_attrib_mod             = PK_LOGICAL_true,   \
+     (options).del_attrib_cb               = NULL,              \
+     (options).del_context                 = NULL,              \
+     (options).del_attdefs.array           = NULL,              \
+     (options).del_attdefs.length          = 0,                 \
+     (options).want_new_entities           = PK_LOGICAL_true,   \
+     (options).want_mod_entities           = PK_LOGICAL_true,   \
+     (options).want_del_entities           = PK_LOGICAL_true,   \
+     (options).want_logged_mod             = PK_LOGICAL_false,  \
+     (options).new_entities_classes.array  = NULL,              \
+     (options).new_entities_classes.length = 0,                 \
+     (options).mod_entities_classes.array  = NULL,              \
+     (options).mod_entities_classes.length = 0,                 \
+     (options).del_entities_classes.array  = NULL,              \
+     (options).del_entities_classes.length = 0)
+
+
+/* PK_PARTITION_advance_pmark_o_m */
+
+#define PK_PARTITION_advance_pmark_o_m(options) \
+    ((options).o_t_version = 1)
+
+
+/* PK_PARTITION_advance_pmark_o_t */
+
+struct PK_PARTITION_advance_pmark_o_s
+    {
+    int         o_t_version;     /* version number */
+    };
+typedef struct PK_PARTITION_advance_pmark_o_s PK_PARTITION_advance_pmark_o_t;
+
+
+
+/* PK_PARTITION_copy_o_m */
+
+#define PK_PARTITION_copy_o_m(options)                          \
+    ((options).o_t_version = 1,                                 \
+     (options).copy_deltas = PK_PARTITION_copy_deltas_none_c)
+
+
+/* PK_PARTITION_copy_o_t */
+
+struct PK_PARTITION_copy_o_s
+    {
+    int                        o_t_version;
+    PK_PARTITION_copy_deltas_t copy_deltas;
+    };
+typedef struct PK_PARTITION_copy_o_s PK_PARTITION_copy_o_t;
+
+
+
+/* PK_PARTITION_delete_o_m */
+
+#define PK_PARTITION_delete_o_m(options)            \
+    ((options).o_t_version      = 1,                \
+     (options).delete_non_empty = PK_LOGICAL_false)
+
+
+/* PK_PARTITION_delete_o_t */
+
+struct PK_PARTITION_delete_o_s
+    {
+    int          o_t_version;        /* version number */
+    PK_LOGICAL_t delete_non_empty;   /* forcibly delete non-empty partitions */
+    };
+typedef struct PK_PARTITION_delete_o_s PK_PARTITION_delete_o_t;
+
+
+
+/*  */
+
+#define PK_PARTITION_create_pmark PK_PARTITION_make_pmark
+
+
+/* PK_PARTITION_make_pmark_o_t */
+
+struct PK_PARTITION_make_pmark_o_s
+    {
+    int                       o_t_version;        /* structure version */
+    PK_LOGICAL_t              want_attrib_mod;    /* return entities modified */
+    PK_LOGICAL_t              want_new_entities;  /* return new entities */
+    PK_LOGICAL_t              want_mod_entities;  /* return modified entities */
+    PK_LOGICAL_t              want_del_entities;  /* return deleted entities */
+    PK_LOGICAL_t              want_logged_mod;    /* return entities modified */
+    PK_CLASS_array_t          new_entities_classes;
+    PK_CLASS_array_t          mod_entities_classes;
+    PK_CLASS_array_t          del_entities_classes;
+    };
+typedef struct PK_PARTITION_make_pmark_o_s PK_PARTITION_make_pmark_o_t;
+
+
+/* PK_PARTITION_make_pmark_o_m */
+
+#define PK_PARTITION_make_pmark_o_m(options)                    \
+    ((options).o_t_version                 = 2,                 \
+     (options).want_attrib_mod             = PK_LOGICAL_true,   \
+     (options).want_new_entities           = PK_LOGICAL_true,   \
+     (options).want_mod_entities           = PK_LOGICAL_true,   \
+     (options).want_del_entities           = PK_LOGICAL_true,   \
+     (options).want_logged_mod             = PK_LOGICAL_false,  \
+     (options).new_entities_classes.array  = NULL,              \
+     (options).new_entities_classes.length = 0,                 \
+     (options).mod_entities_classes.array  = NULL,              \
+     (options).mod_entities_classes.length = 0,                 \
+     (options).del_entities_classes.array  = NULL,              \
+     (options).del_entities_classes.length = 0)
+
+
+/* PK_PARTITION_merge_o_m */
+
+#define PK_PARTITION_merge_o_m(options) \
+    ((options).o_t_version = 1)
+
+
+/* PK_PARTITION_merge_o_t */
+
+struct PK_PARTITION_merge_o_s
+    {
+    int         o_t_version;     /* version number */
+    };
+typedef struct PK_PARTITION_merge_o_s PK_PARTITION_merge_o_t;
+
+
+
+/* PK_PARTITION_receive_o_m */
+
+
+#define PK_PARTITION_receive_o_m(options)                                     \
+       ((options).o_t_version                 = 8,                            \
+        (options).transmit_format             = PK_transmit_format_neutral_c, \
+        (options).receive_user_fields         = PK_LOGICAL_false,             \
+        (options).receive_deltas              = PK_PARTITION_rcv_deltas_no_c, \
+        (options).receive_prev_version_deltas = PK_LOGICAL_false,             \
+        (options).attdef_callback             = NULL,                         \
+        (options).attdef_context              = NULL,                         \
+        (options).attdef_callback_on          = PK_ATTDEF_cb_on_mismatch_c,   \
+        (options).deltas_block                = NULL,                         \
+        (options).receive_all_attdefs         = PK_LOGICAL_true,              \
+        (options).allow_missing_deltas        = PK_LOGICAL_false ,            \
+        (options).receive_compound            = PK_receive_compound_split_c )
+
+
+/* PK_PARTITION_receive_o_t */
+
+struct PK_PARTITION_receive_o_s
+    {
+    int                       o_t_version;
+    PK_transmit_format_t      transmit_format;
+    PK_LOGICAL_t              receive_user_fields;
+    PK_PARTITION_rcv_deltas_t receive_deltas;
+    PK_LOGICAL_t              receive_prev_version_deltas;
+    PK_ATTDEF_name_cb_f_t     attdef_callback;
+    PK_POINTER_t              attdef_context;
+    PK_ATTDEF_cb_on_t         attdef_callback_on;
+    const PK_MEMORY_block_t  *deltas_block;
+    PK_LOGICAL_t              receive_all_attdefs;
+    PK_LOGICAL_t              allow_missing_deltas;
+    PK_receive_compound_t     receive_compound;
+    };
+typedef struct PK_PARTITION_receive_o_s PK_PARTITION_receive_o_t;
+
+
+
+/* PK_PARTITION_receive_deltas_o_m */
+
+
+#define PK_PARTITION_receive_deltas_o_m(options)                              \
+       ((options).o_t_version               = 3,                              \
+        (options).attdef_callback           = NULL,                           \
+        (options).attdef_context            = NULL,                           \
+        (options).attdef_callback_on        = PK_ATTDEF_cb_on_mismatch_c,     \
+        (options).new_at_mark               = PK_PMARK_new_at_current_mark_c, \
+        (options).receive_compound          = PK_receive_compound_fail_c )
+
+
+/* PK_PARTITION_receive_deltas_o_t */
+
+struct PK_PARTITION_receive_deltas_o_s
+    {
+    int                       o_t_version;
+    PK_ATTDEF_name_cb_f_t     attdef_callback;
+    PK_POINTER_t              attdef_context;
+    PK_ATTDEF_cb_on_t         attdef_callback_on;
+    PK_PMARK_new_at_mark_t    new_at_mark;
+    PK_receive_compound_t     receive_compound;
+    };
+typedef struct PK_PARTITION_receive_deltas_o_s PK_PARTITION_receive_deltas_o_t;
+
+
+
+/* PK_PARTITION_transmit_o_m */
+
+#define PK_PARTITION_transmit_o_m(options)                                    \
+      ((options).o_t_version              = 5,                                \
+       (options).transmit_format          = PK_transmit_format_neutral_c,     \
+       (options).transmit_user_fields     = PK_LOGICAL_true,                  \
+       (options).transmit_deltas          = PK_PARTITION_xmt_deltas_none_c,   \
+       (options).transmit_version         = 0,                                \
+       (options).transmit_all_attdefs     = PK_LOGICAL_true,                  \
+       (options).pmarks.array             = NULL,                             \
+       (options).pmarks.length            = 0,                                \
+       (options).transmit_indexed_context = NULL)
+
+
+/* PK_PARTITION_transmit_o_t */
+
+struct PK_PARTITION_transmit_o_s
+    {
+    int                       o_t_version;
+    PK_transmit_format_t      transmit_format;
+    PK_LOGICAL_t              transmit_user_fields;
+    PK_PARTITION_xmt_deltas_t transmit_deltas;
+    int                       transmit_version;
+    PK_LOGICAL_t              transmit_all_attdefs;
+    PK_PMARK_array_t          pmarks;
+    PK_POINTER_t              transmit_indexed_context;
+    };
+typedef struct PK_PARTITION_transmit_o_s PK_PARTITION_transmit_o_t;
+
+
+
+/* PK_PARTITION_transmit_delta_o_m */
+
+#define PK_PARTITION_transmit_delta_o_m(options)                           \
+       ((options).o_t_version            = 2,                              \
+        (options).transmit_deltas        = PK_PARTITION_xmt_deltas_all_c,  \
+        (options).pmarks.array           = NULL,                           \
+        (options).pmarks.length          = 0)
+
+
+/* PK_PARTITION_transmit_delta_o_t */
+
+struct PK_PARTITION_transmit_delta_o_s
+    {
+    int                       o_t_version;
+    PK_PARTITION_xmt_deltas_t transmit_deltas;
+    PK_PMARK_array_t          pmarks;
+    };
+typedef struct PK_PARTITION_transmit_delta_o_s PK_PARTITION_transmit_delta_o_t;
+
+
+
+/* PK_SESSION_ask_attdefs_o_m */
+
+#define PK_SESSION_ask_attdefs_o_m(options)     \
+    ((options).o_t_version  = 1,                \
+     (options).want_attdefs = PK_LOGICAL_true)
+
+
+/* PK_SESSION_ask_attdefs_o_t */
+
+struct PK_SESSION_ask_attdefs_o_s
+    {
+    int          o_t_version;        /* version number */
+    PK_LOGICAL_t want_attdefs;       /* return attribute definitions */
+    };
+typedef struct PK_SESSION_ask_attdefs_o_s PK_SESSION_ask_attdefs_o_t;
+
+
+
+/* PK_SESSION_smp_o_m */
+
+#define PK_SESSION_smp_o_m(options)                                     \
+      ((options).o_t_version            = 1,                            \
+       (options).thread_format          = PK_thread_per_processor_c,    \
+       (options).n_threads              = 1,                            \
+       (options).on_single_processor    = PK_LOGICAL_false)
+
+
+/* PK_SESSION_smp_o_t */
+
+struct PK_SESSION_smp_o_s
+    {
+    int                 o_t_version;          /* version number */
+    PK_thread_t         thread_format;        /* (PK_thread_per_processor_c) */
+    int                 n_threads;            /* (1) */
+    PK_LOGICAL_t        on_single_processor;  /* (PK_LOGICAL_false) */
+    };
+typedef struct PK_SESSION_smp_o_s PK_SESSION_smp_o_t;
+
+
+/* PK_SESSION_smp_r_t */
+
+struct PK_SESSION_smp_r_s
+    {
+    PK_thread_t         thread_format;
+    int                 n_threads;
+    PK_LOGICAL_t        on_single_processor;
+    int                 n_processors;
+    };
+typedef struct PK_SESSION_smp_r_s PK_SESSION_smp_r_t;
+
+
+/* PK_SESSION_watch_create_cb_t */
+
+typedef void (*PK_SESSION_watch_create_cb_t)(int);
+
+
+
+/* PK_SESSION_watch_destroy_cb_t */
+
+typedef void (*PK_SESSION_watch_destroy_cb_t)(int);
+
+
+
+/* PK_SESSION_software_option_t */
+
+typedef int PK_SESSION_software_option_t;
+
+
+/* PK_SESSION_software_option_t */
+
+#define PK_SESSION_SURF_coincide_c      \
+      ((PK_SESSION_software_option_t) 4201)
+#define PK_SESSION_old_isoclines_c      \
+      ((PK_SESSION_software_option_t) 4202)
+#define PK_SESSION_old_blend_bounds_c   \
+      ((PK_SESSION_software_option_t) 4203)
+#define PK_SESSION_PLANE_exact_coi_c    \
+      ((PK_SESSION_software_option_t) 4204)
+#define PK_SESSION_FACE_old_uvbox_c     \
+      ((PK_SESSION_software_option_t) 4205)
+#define PK_SESSION_ENTITY_persist_alt_c \
+      ((PK_SESSION_software_option_t) 4206)
+#define PK_SESSION_check_pre_v140_c \
+      ((PK_SESSION_software_option_t) 4207)
+#define PK_SESSION_SURF_old_min_radii_c \
+      ((PK_SESSION_software_option_t) 4208)
+#define PK_SESSION_check_pre_v141_c \
+      ((PK_SESSION_software_option_t) 4209)
+#define PK_SESSION_old_helix_c \
+      ((PK_SESSION_software_option_t) 4210)
+#define PK_SESSION_boolean_pre_v141_c \
+      ((PK_SESSION_software_option_t) 4211)
+#define PK_SESSION_local_ops_pre_v132_c \
+      ((PK_SESSION_software_option_t) 4212)
+#define PK_SESSION_point_int_pre_v132_c \
+      ((PK_SESSION_software_option_t) 4213)
+#define PK_SESSION_region_gt_pre_v150_c \
+      ((PK_SESSION_software_option_t) 4214)
+#define PK_SESSION_pre_v150_switch_1_c \
+      ((PK_SESSION_software_option_t) 4215)
+#define PK_SESSION_pre_v150_switch_2_c \
+      ((PK_SESSION_software_option_t) 4216)
+#define PK_SESSION_check_transmit_c \
+      ((PK_SESSION_software_option_t) 4217)
+#define PK_SESSION_pre_v151_switch_1_c \
+      ((PK_SESSION_software_option_t) 4218)
+#define PK_SESSION_pre_v150_switch_3_c \
+      ((PK_SESSION_software_option_t) 4219)
+#define PK_SESSION_pre_v160_switch_1_c \
+      ((PK_SESSION_software_option_t) 4220)
+#define PK_SESSION_pre_v170_switch_1_c \
+      ((PK_SESSION_software_option_t) 4221)
+#define PK_SESSION_pre_v161_switch_1_c \
+      ((PK_SESSION_software_option_t) 4222)
+#define PK_SESSION_pre_v170_switch_2_c \
+      ((PK_SESSION_software_option_t) 4223)
+#define PK_SESSION_pre_v161_switch_2_c \
+      ((PK_SESSION_software_option_t) 4224)
+#define PK_SESSION_pre_v180_switch_1_c \
+      ((PK_SESSION_software_option_t) 4225)
+#define PK_SESSION_pre_v161_switch_3_c \
+      ((PK_SESSION_software_option_t) 4226)
+#define PK_SESSION_pre_v170_switch_3_c \
+      ((PK_SESSION_software_option_t) 4228)
+#define PK_SESSION_pre_v170_switch_4_c \
+      ((PK_SESSION_software_option_t) 4230)
+#define PK_SESSION_pre_v161_switch_4_c \
+      ((PK_SESSION_software_option_t) 4229)
+#define PK_SESSION_pre_v181_switch_1_c \
+      ((PK_SESSION_software_option_t) 4250)
+#define PK_SESSION_pre_v170_switch_5_c \
+      ((PK_SESSION_software_option_t) 4231)
+#define PK_SESSION_pre_v181_switch_2_c \
+      ((PK_SESSION_software_option_t) 4251)
+#define PK_SESSION_pre_v161_switch_5_c \
+      ((PK_SESSION_software_option_t) 4280)
+#define PK_SESSION_pre_v180_switch_2_c \
+      ((PK_SESSION_software_option_t) 4236)
+#define PK_SESSION_pre_v161_switch_6_c \
+      ((PK_SESSION_software_option_t) 4281)
+#define PK_SESSION_pre_v191_switch_1_c \
+      ((PK_SESSION_software_option_t) 4300)
+#define PK_SESSION_pre_v171_switch_2_c \
+      ((PK_SESSION_software_option_t) 4232)
+#define PK_SESSION_pre_v180_switch_3_c \
+      ((PK_SESSION_software_option_t) 4237)
+#define PK_SESSION_pre_v191_switch_2_c \
+      ((PK_SESSION_software_option_t) 4301)
+#define PK_SESSION_pre_v191_switch_3_c \
+      ((PK_SESSION_software_option_t) 4302)
+#define PK_SESSION_pre_v191_switch_4_c \
+      ((PK_SESSION_software_option_t) 4303)
+#define PK_SESSION_pre_v180_switch_4_c \
+      ((PK_SESSION_software_option_t) 4238)
+#define PK_SESSION_pre_v181_switch_3_c \
+      ((PK_SESSION_software_option_t) 4252)
+#define PK_SESSION_pre_v191_switch_5_c \
+      ((PK_SESSION_software_option_t) 4304)
+#define PK_SESSION_pre_v191_switch_6_c \
+      ((PK_SESSION_software_option_t) 4305)
+#define PK_SESSION_pre_v191_switch_7_c \
+      ((PK_SESSION_software_option_t) 4306)
+#define PK_SESSION_pre_v191_switch_8_c \
+      ((PK_SESSION_software_option_t) 4307)
+#define PK_SESSION_pre_v181_switch_4_c \
+      ((PK_SESSION_software_option_t) 4253)
+#define PK_SESSION_pre_v191_switch_9_c \
+      ((PK_SESSION_software_option_t) 4308)
+#define PK_SESSION_pre_v191_switch_10_c \
+      ((PK_SESSION_software_option_t) 4309)
+#define PK_SESSION_pre_v191_switch_11_c \
+      ((PK_SESSION_software_option_t) 4310)
+#define PK_SESSION_pre_v191_switch_12_c \
+      ((PK_SESSION_software_option_t) 4311)
+#define PK_SESSION_pre_v181_switch_5_c \
+      ((PK_SESSION_software_option_t) 4254)
+#define PK_SESSION_pre_v210_switch_1_c \
+      ((PK_SESSION_software_option_t) 4401)
+#define PK_SESSION_pre_v181_switch_6_c \
+      ((PK_SESSION_software_option_t) 4255)
+#define PK_SESSION_pre_v210_switch_2_c \
+      ((PK_SESSION_software_option_t) 4402)
+#define PK_SESSION_pre_v191_switch_13_c \
+      ((PK_SESSION_software_option_t) 4312)
+#define PK_SESSION_pre_v191_switch_14_c \
+      ((PK_SESSION_software_option_t) 4313)
+#define PK_SESSION_pre_v191_switch_15_c \
+      ((PK_SESSION_software_option_t) 4314)
+#define PK_SESSION_pre_v191_switch_16_c \
+      ((PK_SESSION_software_option_t) 4315)
+#define PK_SESSION_pre_v181_switch_7_c \
+      ((PK_SESSION_software_option_t) 4256)
+#define PK_SESSION_pre_v191_switch_17_c \
+      ((PK_SESSION_software_option_t) 4316)
+#define PK_SESSION_pre_v191_switch_18_c \
+      ((PK_SESSION_software_option_t) 4317)
+#define PK_SESSION_pre_v191_switch_19_c \
+      ((PK_SESSION_software_option_t) 4318)
+#define PK_SESSION_pre_v221_switch_1_c \
+      ((PK_SESSION_software_option_t) 4501)
+#define PK_SESSION_pre_v181_switch_8_c \
+      ((PK_SESSION_software_option_t) 4257)
+#define PK_SESSION_pre_v221_switch_2_c \
+      ((PK_SESSION_software_option_t) 4502)
+#define PK_SESSION_pre_v181_switch_9_c \
+      ((PK_SESSION_software_option_t) 4258)
+#define PK_SESSION_pre_v230_switch_1_c \
+      ((PK_SESSION_software_option_t) 4551)
+#define PK_SESSION_pre_v221_switch_3_c \
+      ((PK_SESSION_software_option_t) 4503)
+#define PK_SESSION_pre_v191_switch_20_c \
+      ((PK_SESSION_software_option_t) 4319)
+#define PK_SESSION_pre_v230_switch_2_c \
+      ((PK_SESSION_software_option_t) 4552)
+#define PK_SESSION_pre_v230_switch_3_c \
+      ((PK_SESSION_software_option_t) 4553)
+#define PK_SESSION_pre_v230_switch_4_c \
+      ((PK_SESSION_software_option_t) 4554)
+#define PK_SESSION_pre_v230_switch_5_c \
+      ((PK_SESSION_software_option_t) 4555)
+#define PK_SESSION_pre_v191_switch_21_c \
+      ((PK_SESSION_software_option_t) 4320)
+#define PK_SESSION_pre_v231_switch_1_c \
+      ((PK_SESSION_software_option_t) 4601)
+#define PK_SESSION_pre_v231_switch_2_c \
+      ((PK_SESSION_software_option_t) 4602)
+#define PK_SESSION_pre_v230_switch_6_c \
+      ((PK_SESSION_software_option_t) 4556)
+#define PK_SESSION_pre_v231_switch_3_c \
+      ((PK_SESSION_software_option_t) 4603)
+#define PK_SESSION_pre_v221_switch_4_c \
+      ((PK_SESSION_software_option_t) 4504)
+#define PK_SESSION_pre_v230_switch_7_c \
+      ((PK_SESSION_software_option_t) 4557)
+#define PK_SESSION_pre_v240_switch_1_c \
+      ((PK_SESSION_software_option_t) 4651)
+#define PK_SESSION_pre_v210_switch_3_c \
+      ((PK_SESSION_software_option_t) 4403)
+#define PK_SESSION_pre_v230_switch_8_c \
+      ((PK_SESSION_software_option_t) 4558)
+#define PK_SESSION_pre_v241_switch_1_c \
+      ((PK_SESSION_software_option_t) 4701)
+#define PK_SESSION_pre_v241_switch_2_c \
+      ((PK_SESSION_software_option_t) 4702)
+#define PK_SESSION_pre_v240_switch_2_c \
+      ((PK_SESSION_software_option_t) 4652)
+#define PK_SESSION_pre_v241_switch_3_c \
+      ((PK_SESSION_software_option_t) 4703)
+#define PK_SESSION_pre_v231_switch_4_c \
+      ((PK_SESSION_software_option_t) 4604)
+#define PK_SESSION_pre_v240_switch_3_c \
+      ((PK_SESSION_software_option_t) 4653)
+#define PK_SESSION_pre_v221_switch_6_c \
+      ((PK_SESSION_software_option_t) 4506)
+#define PK_SESSION_pre_v250_switch_0_c \
+      ((PK_SESSION_software_option_t) 4750)
+#define PK_SESSION_pre_v221_switch_5_c \
+      ((PK_SESSION_software_option_t) 4505)
+#define PK_SESSION_pre_v241_switch_4_c \
+      ((PK_SESSION_software_option_t) 4704)
+#define PK_SESSION_pre_v240_switch_4_c \
+      ((PK_SESSION_software_option_t) 4654)
+#define PK_SESSION_pre_v250_switch_1_c \
+      ((PK_SESSION_software_option_t) 4751)
+#define PK_SESSION_pre_v250_switch_2_c \
+      ((PK_SESSION_software_option_t) 4752)
+#define PK_SESSION_pre_v250_switch_3_c \
+      ((PK_SESSION_software_option_t) 4753)
+#define PK_SESSION_pre_v250_switch_4_c \
+      ((PK_SESSION_software_option_t) 4754)
+#define PK_SESSION_pre_v250_switch_5_c \
+      ((PK_SESSION_software_option_t) 4755)
+#define PK_SESSION_pre_v250_switch_6_c \
+      ((PK_SESSION_software_option_t) 4756)
+#define PK_SESSION_pre_v251_switch_0_c \
+      ((PK_SESSION_software_option_t) 4800)
+#define PK_SESSION_pre_v250_switch_7_c \
+      ((PK_SESSION_software_option_t) 4757)
+#define PK_SESSION_pre_v210_switch_4_c \
+      ((PK_SESSION_software_option_t) 4404)
+#define PK_SESSION_pre_v240_switch_5_c \
+      ((PK_SESSION_software_option_t) 4655)
+#define PK_SESSION_pre_v250_switch_8_c \
+      ((PK_SESSION_software_option_t) 4758)
+#define PK_SESSION_pre_v230_switch_9_c \
+      ((PK_SESSION_software_option_t) 4559)
+#define PK_SESSION_pre_v250_switch_9_c \
+      ((PK_SESSION_software_option_t) 4759)
+#define PK_SESSION_pre_v231_switch_5_c \
+      ((PK_SESSION_software_option_t) 4605)
+#define PK_SESSION_pre_v240_switch_6_c \
+      ((PK_SESSION_software_option_t) 4656)
+#define PK_SESSION_pre_v241_switch_5_c \
+      ((PK_SESSION_software_option_t) 4705)
+#define PK_SESSION_pre_v250_switch_10_c \
+      ((PK_SESSION_software_option_t) 4760)
+#define PK_SESSION_pre_v250_switch_11_c \
+      ((PK_SESSION_software_option_t) 4761)
+#define PK_SESSION_pre_v251_switch_1_c \
+      ((PK_SESSION_software_option_t) 4801)
+#define PK_SESSION_pre_v251_switch_2_c \
+      ((PK_SESSION_software_option_t) 4802)
+#define PK_SESSION_pre_v241_switch_6_c \
+      ((PK_SESSION_software_option_t) 4706)
+#define PK_SESSION_pre_v250_switch_12_c \
+      ((PK_SESSION_software_option_t) 4762)
+#define PK_SESSION_pre_v251_switch_3_c \
+      ((PK_SESSION_software_option_t) 4803)
+#define PK_SESSION_pre_v251_switch_4_c \
+      ((PK_SESSION_software_option_t) 4804)
+#define PK_SESSION_pre_v260_switch_0_c \
+      ((PK_SESSION_software_option_t) 4850)
+#define PK_SESSION_pre_v241_switch_7_c \
+      ((PK_SESSION_software_option_t) 4707)
+#define PK_SESSION_pre_v261_switch_0_c \
+      ((PK_SESSION_software_option_t) 4900)
+#define PK_SESSION_pre_v191_switch_22_c \
+      ((PK_SESSION_software_option_t) 4321)
+#define PK_SESSION_post_v260_switch_1_c \
+      ((PK_SESSION_software_option_t) 4951)
+#define PK_SESSION_pre_v230_switch_10_c \
+      ((PK_SESSION_software_option_t) 4560)
+#define PK_SESSION_pre_v231_switch_6_c \
+      ((PK_SESSION_software_option_t) 4606)
+#define PK_SESSION_pre_v260_switch_1_c \
+      ((PK_SESSION_software_option_t) 4851)
+#define PK_SESSION_pre_v250_switch_13_c \
+      ((PK_SESSION_software_option_t) 4763)
+#define PK_SESSION_pre_v241_switch_8_c \
+      ((PK_SESSION_software_option_t) 4708)
+#define PK_SESSION_pre_v230_switch_11_c \
+      ((PK_SESSION_software_option_t) 4561)
+
+
+
+/* PK_SESSION_frustrum_o_m */
+
+#define PK_SESSION_frustrum_o_m(fr) (\
+    (fr).fstart = NULL, \
+    (fr).fabort = NULL, \
+    (fr).fstop  = NULL, \
+    (fr).fmallo = NULL, \
+    (fr).fmfree = NULL, \
+    (fr).gosgmt = NULL, \
+    (fr).goopsg = NULL, \
+    (fr).goclsg = NULL, \
+    (fr).gopixl = NULL, \
+    (fr).gooppx = NULL, \
+    (fr).goclpx = NULL, \
+    (fr).ffoprd = NULL, \
+    (fr).ffopwr = NULL, \
+    (fr).ffclos = NULL, \
+    (fr).ffread = NULL, \
+    (fr).ffwrit = NULL, \
+    (fr).ffoprb = NULL, \
+    (fr).ffseek = NULL, \
+    (fr).fftell = NULL, \
+    (fr).fgcrcu = NULL, \
+    (fr).fgcrsu = NULL, \
+    (fr).fgevcu = NULL, \
+    (fr).fgevsu = NULL, \
+    (fr).fgprcu = NULL, \
+    (fr).fgprsu = NULL, \
+    (fr).ucoprd = NULL, \
+    (fr).ucopwr = NULL)
+
+
+/* PK_SESSION_indexio_o_m */
+
+#define PK_SESSION_indexio_o_m(fr) (\
+    (fr).ffoprd = NULL, \
+    (fr).ffopwr = NULL, \
+    (fr).ucoprd = NULL, \
+    (fr).ucopwr = NULL, \
+    (fr).ffread = NULL, \
+    (fr).ffwrit = NULL, \
+    (fr).ffseek = NULL, \
+    (fr).ffclos = NULL)
+
+
+/* PK_SESSION_start_o_t */
+
+
+struct PK_SESSION_start_o_s
+    {
+    int     o_t_version;   /* version number of this option structure */
+    char   *journal_file;  /* name of journal file (NULL) */
+    int     user_field;    /* size of user fields in integers (0) */
+    int     reserved;      /* for future use (1) */
+    };
+typedef struct PK_SESSION_start_o_s PK_SESSION_start_o_t;
+
+
+/* PK_SESSION_start_o_m */
+
+#define PK_SESSION_start_o_m(options)                                     \
+       ((options).o_t_version    = 1,                                     \
+        (options).journal_file   = NULL,                                  \
+        (options).user_field     = 0,                                     \
+        (options).reserved       = 1)
+
+
+/* PK_SESSION_receive_o_m */
+
+
+#define PK_SESSION_receive_o_m(options)                                  \
+       ((options).o_t_version            = 1,                            \
+        (options).transmit_format        = PK_transmit_format_neutral_c, \
+        (options).receive_user_fields    = PK_LOGICAL_false )
+
+
+
+/* PK_SESSION_receive_o_t */
+
+struct PK_SESSION_receive_o_s
+    {
+    int                             o_t_version;
+    PK_transmit_format_t            transmit_format;
+    PK_LOGICAL_t                    receive_user_fields;
+    };
+typedef struct PK_SESSION_receive_o_s PK_SESSION_receive_o_t;
+
+
+
+/* PK_SESSION_transmit_o_m */
+
+#define PK_SESSION_transmit_o_m(options)                                \
+       ((options).o_t_version          = 2,                             \
+        (options).transmit_format      = PK_transmit_format_neutral_c,  \
+        (options).transmit_user_fields = PK_LOGICAL_true,               \
+        (options).transmit_deltas      = PK_PARTITION_xmt_deltas_none_c)
+
+
+/* PK_SESSION_transmit_o_t */
+
+struct PK_SESSION_transmit_o_s
+    {
+    int                             o_t_version;
+    PK_transmit_format_t            transmit_format;
+    PK_LOGICAL_t                    transmit_user_fields;
+    PK_PARTITION_xmt_deltas_t       transmit_deltas;
+    };
+typedef struct PK_SESSION_transmit_o_s PK_SESSION_transmit_o_t;
+
+
+/* PK_MEMORY_alloc_f_t */
+
+typedef void* (*PK_MEMORY_alloc_f_t)( size_t );    /* type for an allocator */
+
+
+/* PK_MEMORY_free_f_t */
+
+typedef void  (*PK_MEMORY_free_f_t) ( void * );    /* type for a free function */
+
+
+/* PK_MEMORY_frustrum_t */
+
+
+struct PK_MEMORY_frustrum_s
+    {
+    PK_MEMORY_alloc_f_t alloc_fn;                  /* registered allocator */
+    PK_MEMORY_free_f_t free_fn;                    /* registered free function */
+    };
+typedef struct PK_MEMORY_frustrum_s PK_MEMORY_frustrum_t;
+
+
+
+/* PK_THREAD_chain_start_o_m */
+
+#define PK_THREAD_chain_start_o_m(options)  \
+    ((options).o_t_version = 1,             \
+     (options).length      = 0)
+
+
+/* PK_THREAD_chain_start_o_t */
+
+struct PK_THREAD_chain_start_o_s
+    {
+    int o_t_version;     /* version number */
+    int length;          /* maximum length of chain links (0) */
+    };
+typedef struct PK_THREAD_chain_start_o_s PK_THREAD_chain_start_o_t;
+
+
+/* PK_THREAD_chain_stop_o_m */
+
+#define PK_THREAD_chain_stop_o_m(options)   \
+    ((options).o_t_version = 1)
+
+
+/* PK_THREAD_chain_stop_o_t */
+
+struct PK_THREAD_chain_stop_o_s
+    {
+    int o_t_version;     /* version number */
+    };
+typedef struct PK_THREAD_chain_stop_o_s PK_THREAD_chain_stop_o_t;
+
+
+/* PK_THREAD_ask_function_run_o_m */
+
+#define PK_THREAD_ask_function_run_o_m(options) \
+    ((options).o_t_version = 1)
+
+
+/* PK_THREAD_ask_function_run_o_t */
+
+struct PK_THREAD_ask_function_run_o_s
+    {
+    int o_t_version;     /* version number */
+    };
+typedef struct PK_THREAD_ask_function_run_o_s PK_THREAD_ask_function_run_o_t;
+
+
+/* PK_THREAD_set_function_run_o_m */
+
+#define PK_THREAD_set_function_run_o_m(options) \
+    ((options).o_t_version = 1)
+
+
+/* PK_THREAD_set_function_run_o_t */
+
+struct PK_THREAD_set_function_run_o_s
+    {
+    int o_t_version;     /* version number */
+    };
+typedef struct PK_THREAD_set_function_run_o_s PK_THREAD_set_function_run_o_t;
+
+
+/* PK_BB_sf_t */
+
+
+    struct PK_BB_sf_s
+        {
+        PK_CLASS_array_t create;         /* creation classes */
+        PK_CLASS_array_t deleet;         /* deletion classes */
+        PK_CLASS_array_t copy;           /* copy classes */
+        PK_CLASS_array_t transfer;       /* transfer classes */
+        PK_CLASS_array_t merge;          /* merge classes */
+        PK_CLASS_array_t split;          /* split classes */
+        PK_CLASS_array_t transform;      /* transform classes */
+        PK_CLASS_array_t change_attrib;  /* attribute classes */
+        PK_CLASS_array_t change;         /* change classes */
+        };
+    typedef struct PK_BB_sf_s PK_BB_sf_t;
+
+
+
+/* PK_VECTOR_make_lsq_plane_o_t */
+
+struct PK_VECTOR_make_lsq_plane_o_s
+    {
+    int                o_t_version;      /* options structure version */
+    };
+
+typedef struct PK_VECTOR_make_lsq_plane_o_s PK_VECTOR_make_lsq_plane_o_t;
+
+
+
+/* PK_VECTOR_make_lsq_plane_o_m */
+
+#define PK_VECTOR_make_lsq_plane_o_m(options)                       \
+    (                                                              \
+       (options).o_t_version      = 1                              \
+    )
+
+
+/* PK_TRANSF_check_o_t */
+
+struct PK_TRANSF_check_o_s
+    {
+    int        o_t_version;     /* version number of option structure */
+    int        max_faults;      /* limit on fault numbers (1) */
+    };
+
+typedef struct PK_TRANSF_check_o_s PK_TRANSF_check_o_t;
+
+
+
+/* PK_TRANSF_check_o_m */
+
+#define PK_TRANSF_check_o_m(options)  \
+    (                                 \
+       (options).o_t_version = 1,     \
+       (options).max_faults  = 1      \
+    )
+
+
+/* PK_TRANSF_create_view_o_t */
+
+struct PK_TRANSF_create_view_o_s
+    {
+    int           o_t_version;         /* options structure version */
+    PK_LOGICAL_t  have_eye_position;   /* whether a perspective vector exists */
+    PK_VECTOR_t   eye_position;        /* perspective eye position */
+    };
+typedef struct PK_TRANSF_create_view_o_s PK_TRANSF_create_view_o_t;
+
+
+
+/* PK_TRANSF_create_view_o_m */
+
+#define PK_TRANSF_create_view_o_m(options)                              \
+    (                                                                   \
+       (options).o_t_version            = 1,                            \
+       (options).have_eye_position      = PK_LOGICAL_false,             \
+       (options).eye_position.coord[0]  = 0.0,                          \
+       (options).eye_position.coord[1]  = 0.0,                          \
+       (options).eye_position.coord[2]  = 0.0                           \
+    )
+
+
+/* PK_TRANSF_classify_o_t */
+
+struct PK_TRANSF_classify_o_s
+    {
+    int                     o_t_version;  /* version number of option structure */
+    PK_TRANSF_diagnostics_t diagnostics;  /* whether to return diagnostics as */
+    };
+
+typedef struct PK_TRANSF_classify_o_s PK_TRANSF_classify_o_t;
+
+
+
+/* PK_TRANSF_classify_o_m */
+
+#define PK_TRANSF_classify_o_m(options)                         \
+    (                                                           \
+       (options).o_t_version    = 1,                            \
+       (options).diagnostics    = PK_TRANSF_diagnostics_none_c  \
+    )
+
+
+/* PK_TRANSF_classify_r_t */
+
+struct PK_TRANSF_classify_r_s
+    {
+    PK_matrix_type_t             matrix_type;
+    double                       determinant;
+    PK_VECTOR_t                  unit_rows_deviations;
+    PK_VECTOR_t                  orthog_rows_deviations;
+    PK_VECTOR_t                  translation;
+    PK_VECTOR_t                  perspective;
+    double                       scale;
+    };
+
+typedef struct PK_TRANSF_classify_r_s PK_TRANSF_classify_r_t;
+
+
+
+/* PK_DELTA_frustrum_t */
+
+typedef PK_ERROR_code_t (*PK_DELTA_open_for_write_f_t)(PK_PMARK_t,
+                                                       PK_DELTA_t *);
+typedef PK_ERROR_code_t (*PK_DELTA_open_for_read_f_t)(PK_DELTA_t);
+typedef PK_ERROR_code_t (*PK_DELTA_close_f_t)(PK_DELTA_t);
+typedef PK_ERROR_code_t (*PK_DELTA_write_f_t)(PK_DELTA_t, unsigned int,
+                                              const char*);
+typedef PK_ERROR_code_t (*PK_DELTA_read_f_t)(PK_DELTA_t, unsigned int, char*);
+typedef PK_ERROR_code_t (*PK_DELTA_delete_f_t)(PK_DELTA_t);
+
+struct PK_DELTA_frustrum_s
+    {
+    PK_DELTA_open_for_write_f_t open_for_write_fn;
+    PK_DELTA_open_for_read_f_t open_for_read_fn;
+    PK_DELTA_close_f_t  close_fn;     /* close a rollmark */
+    PK_DELTA_write_f_t  write_fn;     /* write data to a rollmark */
+    PK_DELTA_read_f_t   read_fn;      /* read data from a rollmark */
+    PK_DELTA_delete_f_t delete_fn;    /* delete a rollmark */
+    };
+typedef struct PK_DELTA_frustrum_s PK_DELTA_frustrum_t;
+
+
+
+
+/* PK_FUNCTION_find_o_t */
+
+struct PK_FUNCTION_find_o_s
+    {
+    int o_t_version;     /* version number of option structure */
+    };
+
+typedef struct PK_FUNCTION_find_o_s PK_FUNCTION_find_o_t;
+
+
+
+/* PK_FUNCTION_find_o_m */
+
+#define PK_FUNCTION_find_o_m(options)                     \
+    (                                                     \
+       (options).o_t_version = 1                          \
+    )
+
+
+
+
+/*********************************************************************/
+/* #DEFINE's */
+/*********************************************************************/
+
+/* PK_enclosure_t */
+
+#define   PK_enclosure_inside_c   ((PK_enclosure_t)ENCLIN)
+#define   PK_enclosure_outside_c  ((PK_enclosure_t)ENCLOU)
+#define   PK_enclosure_on_c       ((PK_enclosure_t)ENCLON)
+
+/* PK_ATTDEF_class_t */
+
+#define   PK_ATTDEF_class_internal_c ((PK_ATTDEF_class_t)RQAC00)
+#define   PK_ATTDEF_class_01_c       ((PK_ATTDEF_class_t)RQAC01)
+#define   PK_ATTDEF_class_02_c       ((PK_ATTDEF_class_t)RQAC02)
+#define   PK_ATTDEF_class_03_c       ((PK_ATTDEF_class_t)RQAC03)
+#define   PK_ATTDEF_class_04_c       ((PK_ATTDEF_class_t)RQAC04)
+#define   PK_ATTDEF_class_05_c       ((PK_ATTDEF_class_t)RQAC05)
+#define   PK_ATTDEF_class_06_c       ((PK_ATTDEF_class_t)RQAC06)
+#define   PK_ATTDEF_class_07_c       ((PK_ATTDEF_class_t)RQAC07)
+
+/* PK_ATTRIB_field_t */
+
+#define   PK_ATTRIB_field_integer_c     ((PK_ATTRIB_field_t)RQAPIN)
+#define   PK_ATTRIB_field_real_c        ((PK_ATTRIB_field_t)RQAPRL)
+#define   PK_ATTRIB_field_string_c      ((PK_ATTRIB_field_t)RQAPCS)
+#define   PK_ATTRIB_field_vector_c      ((PK_ATTRIB_field_t)RQAPVC)
+#define   PK_ATTRIB_field_coordinate_c  ((PK_ATTRIB_field_t)RQAPCO)
+#define   PK_ATTRIB_field_direction_c   ((PK_ATTRIB_field_t)RQAPDR)
+#define   PK_ATTRIB_field_axis_c        ((PK_ATTRIB_field_t)RQAPAX)
+#define   PK_ATTRIB_field_entity_c      ((PK_ATTRIB_field_t)  5908)
+#define   PK_ATTRIB_field_pointer_c     ((PK_ATTRIB_field_t)  5909)
+#define   PK_ATTRIB_field_ustring_c     ((PK_ATTRIB_field_t)  5910)
+
+/* PK_boolean_function_t */
+
+#define   PK_boolean_intersect    ((PK_boolean_function_t)BOOPIN)
+#define   PK_boolean_subtract     ((PK_boolean_function_t)BOOPSU)
+#define   PK_boolean_unite        ((PK_boolean_function_t)BOOPUN)
+
+#define   PK_boolean_intersect_c  ((PK_boolean_function_t)BOOPIN)
+#define   PK_boolean_subtract_c   ((PK_boolean_function_t)BOOPSU)
+#define   PK_boolean_unite_c      ((PK_boolean_function_t)BOOPUN)
+
+/* PK_boolean_region_t */
+
+#define   PK_boolean_include    ((PK_boolean_region_t)BOOPIC)
+#define   PK_boolean_exclude    ((PK_boolean_region_t)BOOPEC)
+
+#define   PK_boolean_include_c          ((PK_boolean_region_t)BOOPIC)
+#define   PK_boolean_exclude_c          ((PK_boolean_region_t)BOOPEC)
+#define   PK_boolean_mixed_selection_c  ((PK_boolean_region_t)15948)
+#define   PK_boolean_off_c              ((PK_boolean_region_t)15949)
+
+/* PK_BODY_type_t */
+
+#define PK_BODY_type_minimum_c     ((PK_BODY_type_t) ENBYMN)
+#define PK_BODY_type_acorn_c       ((PK_BODY_type_t) 5606)
+#define PK_BODY_type_wire_c        ((PK_BODY_type_t) ENBYWR)
+#define PK_BODY_type_sheet_c       ((PK_BODY_type_t) ENBYSH)
+#define PK_BODY_type_solid_c       ((PK_BODY_type_t) ENBYSO)
+#define PK_BODY_type_general_c     ((PK_BODY_type_t) ENBYGN)
+#define PK_BODY_type_unspecified_c ((PK_BODY_type_t) 5607)
+#define PK_BODY_type_empty_c       ((PK_BODY_type_t) 5608)
+#define PK_BODY_type_compound_c    ((PK_BODY_type_t) 5609)
+
+/* PK_VERTEX_type_t */
+
+#define PK_VERTEX_type_isolated_c   ((PK_VERTEX_type_t) ENVEIS)
+#define PK_VERTEX_type_spur_c       ((PK_VERTEX_type_t) ENVESP)
+#define PK_VERTEX_type_wire_c       ((PK_VERTEX_type_t) ENVEWR)
+#define PK_VERTEX_type_normal_c     ((PK_VERTEX_type_t) ENVENO)
+
+/* PK_LOOP_type_t */
+
+#define PK_LOOP_type_hole_c         ((PK_LOOP_type_t) ENLOHO)
+#define PK_LOOP_type_peripheral_c   ((PK_LOOP_type_t) ENLOPE)
+#define PK_LOOP_type_other_c        ((PK_LOOP_type_t) ENLONA)
+
+#define PK_LOOP_type_vertex_c       ((PK_LOOP_type_t) 5410)
+#define PK_LOOP_type_wire_c         ((PK_LOOP_type_t) 5411)
+#define PK_LOOP_type_outer_c        ((PK_LOOP_type_t) 5412)
+#define PK_LOOP_type_inner_c        ((PK_LOOP_type_t) 5413)
+#define PK_LOOP_type_winding_c      ((PK_LOOP_type_t) 5414)
+#define PK_LOOP_type_inner_sing_c   ((PK_LOOP_type_t) 5415)
+#define PK_LOOP_type_likely_outer_c ((PK_LOOP_type_t) 5416)
+#define PK_LOOP_type_likely_inner_c ((PK_LOOP_type_t) 5417)
+#define PK_LOOP_type_unclear_c      ((PK_LOOP_type_t) 5418)
+#define PK_LOOP_type_error_c        ((PK_LOOP_type_t) 5419)
+
+/* PK_intersect_vector_t */
+
+#define PK_intersect_vector_simple_c   ((PK_intersect_vector_t) CICLSI)
+#define PK_intersect_vector_start_c    ((PK_intersect_vector_t) CICLSC)
+#define PK_intersect_vector_end_c      ((PK_intersect_vector_t) CICLEC)
+#define PK_intersect_vector_tangent_c  ((PK_intersect_vector_t) CICLTG)
+
+/* PK_intersect_curve_t */
+
+#define PK_intersect_curve_simple_c    ((PK_intersect_curve_t) SICLSI)
+#define PK_intersect_curve_tangent_c   ((PK_intersect_curve_t) SICLTG)
+
+/* PK_intersect_fc_t */
+
+#define PK_intersect_fc_simple_c       ((PK_intersect_fc_t) CFCLSI)
+#define PK_intersect_fc_tangent_c      ((PK_intersect_fc_t) CFCLTG)
+#define PK_intersect_fc_out_in_c       ((PK_intersect_fc_t) CFCLEF)
+#define PK_intersect_fc_in_out_c       ((PK_intersect_fc_t) CFCLLF)
+#define PK_intersect_fc_out_coi_c      ((PK_intersect_fc_t) CFCLEB)
+#define PK_intersect_fc_coi_out_c      ((PK_intersect_fc_t) CFCLLB)
+#define PK_intersect_fc_coi_in_c       ((PK_intersect_fc_t) CFCLEI)
+#define PK_intersect_fc_in_coi_c       ((PK_intersect_fc_t) CFCLLI)
+#define PK_intersect_fc_in_tangent_c   ((PK_intersect_fc_t) CFCLTI)
+#define PK_intersect_fc_out_tangent_c  ((PK_intersect_fc_t) CFCLTO)
+#define PK_intersect_fc_in_c           ((PK_intersect_fc_t) CFCLUC)
+#define PK_intersect_fc_start_c        ((PK_intersect_fc_t) CFCLSC)
+#define PK_intersect_fc_end_c          ((PK_intersect_fc_t) CFCLEC)
+
+/* PK_reset_prec_t */
+
+#define PK_reset_prec_ok_c             ((PK_reset_prec_t) RTTLOK)
+#define PK_reset_prec_tangent_c        ((PK_reset_prec_t) RTTLNT)
+#define PK_reset_prec_missing_geom_c   ((PK_reset_prec_t) RTTLMG)
+#define PK_reset_prec_failure_c        ((PK_reset_prec_t) RTTLRF)
+
+/* PK_mass_t */
+
+#define PK_mass_no_c                   ((PK_mass_t) MAOPNA)
+#define PK_mass_mass_c                 ((PK_mass_t) MAOPAM)
+#define PK_mass_c_of_g_c               ((PK_mass_t) MAOPCG)
+#define PK_mass_m_of_i_c               ((PK_mass_t) MAOPIN)
+
+/* PK_mass_periphery_t */
+
+#define PK_mass_periphery_no_c         ((PK_mass_periphery_t) MAOPNP)
+#define PK_mass_periphery_yes_c        ((PK_mass_periphery_t) MAOPPE)
+
+/* PK_mass_bound_t */
+
+#define PK_mass_bound_no_c             ((PK_mass_bound_t) MAOPNE)
+#define PK_mass_bound_modulus_c        ((PK_mass_bound_t) MAOPEM)
+#define PK_mass_bound_interval_c       ((PK_mass_bound_t) MAOPEI)
+
+/* PK_check_state_t */
+
+#define PK_BODY_state_corrupt_c           ((PK_check_state_t) RTSTCR)
+#define PK_BODY_state_invalid_ident_c     ((PK_check_state_t) RTSTID)
+#define PK_BODY_state_inside_out_c        ((PK_check_state_t) RTSTNG)
+#define PK_BODY_state_bad_regions_c       ((PK_check_state_t) RTSTRS)
+#define PK_EDGE_state_open_c              ((PK_check_state_t) RTSTOC)
+#define PK_EDGE_state_bad_vertex_c        ((PK_check_state_t) RTSTVC)
+#define PK_EDGE_state_reversed_c          ((PK_check_state_t) RTSTER)
+#define PK_EDGE_state_bad_spcurve_c       ((PK_check_state_t) RTSTSP)
+#define PK_EDGE_state_vertices_touch_c    ((PK_check_state_t) RTSTVT)
+#define PK_EDGE_state_bad_face_order_c    ((PK_check_state_t) RTSTFO)
+#define PK_EDGE_state_bad_wire_ed_ed_c    ((PK_check_state_t) RTSTEE)
+#define PK_EDGE_state_open_nmnl_c         ((PK_check_state_t) RTSTON)
+#define PK_EDGE_state_bad_vertex_nmnl_c   ((PK_check_state_t) RTSTVN)
+#define PK_EDGE_state_bad_sp_nmnl_c       ((PK_check_state_t) RTSTSN)
+#define PK_EDGE_state_reversed_nmnl_c     ((PK_check_state_t) RTSTRN)
+#define PK_ENTITY_state_invalid_c         ((PK_check_state_t) RTSTIG)
+#define PK_FACE_state_bad_vertex_c        ((PK_check_state_t) RTSTVS)
+#define PK_FACE_state_bad_edge_c          ((PK_check_state_t) RTSTES)
+#define PK_FACE_state_bad_edge_order_c    ((PK_check_state_t) RTSTEO)
+#define PK_FACE_state_no_vtx_at_sing_c    ((PK_check_state_t) RTSTMV)
+#define PK_FACE_state_bad_loops_c         ((PK_check_state_t) RTSTLC)
+#define PK_FACE_state_self_int_c          ((PK_check_state_t) RTSTSX)
+#define PK_FACE_state_bad_wire_fa_ed_c    ((PK_check_state_t) RTSTEF)
+#define PK_FACE_state_check_fail_c        ((PK_check_state_t) RTSTFC)
+#define PK_FACE_state_bad_face_face_c     ((PK_check_state_t) RTSTFF)
+#define PK_GEOM_state_self_int_c          ((PK_check_state_t) RTSTGX)
+#define PK_GEOM_state_degenerate_c        ((PK_check_state_t) RTSTDG)
+#define PK_REGION_state_bad_shells_c      ((PK_check_state_t) RTSTSH)
+#define PK_SHELL_state_bad_topol_geom_c   ((PK_check_state_t) RTSTSG)
+#define PK_SHELL_state_bad_sh_sh_c        ((PK_check_state_t) RTSTAC)
+#define PK_TOPOL_state_not_G1_c           ((PK_check_state_t) RTSTGC)
+#define PK_TOPOL_state_size_box_c         ((PK_check_state_t) RTSTBX)
+#define PK_TOPOL_state_check_fail_c       ((PK_check_state_t) RTSTCF)
+#define PK_TOPOL_state_no_geom_c          ((PK_check_state_t) RTSTMG)
+#define PK_BODY_state_ok_c                ((PK_check_state_t) RTTSOK)
+#define PK_FACE_state_redundant_c         ((PK_check_state_t) RTTSFR)
+#define PK_CURVE_state_inconsistent_c     ((PK_check_state_t) RTTSCI)
+#define PK_LOOP_state_invalid_c           ((PK_check_state_t) RTTSLI)
+#define PK_EDGE_state_bad_order_c         ((PK_check_state_t) RTTSEO)
+#define PK_ATTDEF_state_bad_name_c        ((PK_check_state_t) RTSTAN)
+#define PK_ATTRIB_state_bad_string_c      ((PK_check_state_t) RTSTAS)
+#define PK_ATTRIB_state_invalid_att_c     ((PK_check_state_t) RTSTAT)
+#define PK_ATTRIB_state_bad_data_len_c    ((PK_check_state_t) RTSTDL)
+#define PK_ATTRIB_state_bad_ustring_c     ((PK_check_state_t) RTSTBU)
+#define PK_ATTRIB_state_byte_oor_c        ((PK_check_state_t) RTSTBB)
+#define PK_ATTRIB_state_empty_field_c     ((PK_check_state_t) RTSTEM)
+#define PK_ATTRIB_state_int_oor_c         ((PK_check_state_t) RTSTBI)
+#define PK_ATTRIB_state_non_unit_vec_c    ((PK_check_state_t) RTSTNU)
+#define PK_ATTRIB_state_real_oor_c        ((PK_check_state_t) RTSTBR)
+#define PK_ATTRIB_state_short_oor_c       ((PK_check_state_t) RTSTSB)
+#define PK_ATTRIB_state_p_vector_oor_c    ((PK_check_state_t) RTSTPV)
+
+/* PK_FACE_trim_confine_t */
+
+#define PK_FACE_trim_confine_no_c         ((PK_FACE_trim_confine_t) SROPCN)
+#define PK_FACE_trim_confine_yes_c        ((PK_FACE_trim_confine_t) SROPCY)
+#define PK_FACE_trim_confine_closed_c     ((PK_FACE_trim_confine_t) SROPCC)
+#define PK_FACE_trim_confine_periph_c     ((PK_FACE_trim_confine_t) SROPCP)
+
+/* PK_FACE_trim_degen_t */
+
+#define PK_FACE_trim_degen_no_c           ((PK_FACE_trim_degen_t) SROPED)
+#define PK_FACE_trim_degen_yes_c          ((PK_FACE_trim_degen_t) SROPID)
+
+/* PK_BB_status_t */
+
+#define PK_BB_status_off_c        ((PK_BB_status_t) BBOPOF)
+#define PK_BB_status_on_c         ((PK_BB_status_t) BBOPON)
+#define PK_BB_status_user_field_c ((PK_BB_status_t) BBOPUF)
+
+/* PK_BB_event_t */
+
+#define PK_BB_event_create_c        ((PK_BB_event_t) BBEVCR)
+#define PK_BB_event_delete_c        ((PK_BB_event_t) BBEVDE)
+#define PK_BB_event_copy_c          ((PK_BB_event_t) BBEVCO)
+#define PK_BB_event_transfer_c      ((PK_BB_event_t) BBEVTR)
+#define PK_BB_event_merge_c         ((PK_BB_event_t) BBEVME)
+#define PK_BB_event_split_c         ((PK_BB_event_t) BBEVSP)
+#define PK_BB_event_transform_c     ((PK_BB_event_t) BBEVTF)
+#define PK_BB_event_change_attrib_c ((PK_BB_event_t) BBEVAC)
+#define PK_BB_event_change_c        ((PK_BB_event_t) BBEVCH)
+
+/* PK_blend_trim_t */
+
+#define PK_blend_trim_no_c          ((PK_blend_trim_t) FXFTNT)
+#define PK_blend_trim_short_c       ((PK_blend_trim_t) FXFTST)
+#define PK_blend_trim_long_c        ((PK_blend_trim_t) FXFTLT)
+#define PK_blend_trim_to_walls_c    ((PK_blend_trim_t) FXFTTB)
+
+/* PK_fxf_fault_t */
+
+#define PK_fxf_fault_no_fault_c         ((PK_fxf_fault_t) FXFEOK)
+#define PK_fxf_fault_sheet_c            ((PK_fxf_fault_t) FXFEST)
+#define PK_fxf_fault_unknown_c          ((PK_fxf_fault_t) FXFEER)
+#define PK_fxf_fault_insufficient_c     ((PK_fxf_fault_t) FXFEID)
+#define PK_fxf_fault_inconsistent_c     ((PK_fxf_fault_t) FXFEXD)
+#define PK_fxf_fault_wall_c             ((PK_fxf_fault_t) FXFEIF)
+#define PK_fxf_fault_range_c            ((PK_fxf_fault_t) FXFEIR)
+#define PK_fxf_fault_cliff_c            ((PK_fxf_fault_t) FXFEIC)
+#define PK_fxf_fault_thl_c              ((PK_fxf_fault_t) FXFEIH)
+#define PK_fxf_fault_chl_c              ((PK_fxf_fault_t) FXFECL)
+#define PK_fxf_fault_curved_c           ((PK_fxf_fault_t) FXFEFC)
+#define PK_fxf_fault_small_c            ((PK_fxf_fault_t) FXFERS)
+#define PK_fxf_fault_large_c            ((PK_fxf_fault_t) FXFERL)
+#define PK_fxf_fault_left_c             ((PK_fxf_fault_t) FXFELN)
+#define PK_fxf_fault_right_c            ((PK_fxf_fault_t) FXFERN)
+#define PK_fxf_fault_both_c             ((PK_fxf_fault_t) FXFEBN)
+#define PK_fxf_fault_sheet_clash_c      ((PK_fxf_fault_t) FXFESC)
+#define PK_fxf_fault_wall_clash_c       ((PK_fxf_fault_t) FXFEWC)
+#define PK_fxf_fault_face_face_c        ((PK_fxf_fault_t) FXFEFF)
+#define PK_fxf_fault_self_int_c         ((PK_fxf_fault_t) FXFEGX)
+#define PK_fxf_fault_rho_value_c        ((PK_fxf_fault_t) FXFERV)
+#define PK_fxf_fault_asymmetric_c       ((PK_fxf_fault_t) FXFEAR)
+#define PK_fxf_fault_bad_spine_c        ((PK_fxf_fault_t) FXFEIS)
+#define PK_fxf_fault_bad_ribs_c         ((PK_fxf_fault_t) 17474)
+#define PK_fxf_fault_repaired_c         ((PK_fxf_fault_t) 17475)
+#define PK_fxf_fault_plane_origin_c     ((PK_fxf_fault_t) 17476)
+#define PK_fxf_fault_plane_insuff_c     ((PK_fxf_fault_t) 17477)
+#define PK_fxf_fault_preview_rib_c      ((PK_fxf_fault_t) 17478)
+#define PK_fxf_fault_rho_too_large_c    ((PK_fxf_fault_t) 17479)
+
+/* PK_BODY_fault_t */
+
+#define PK_BODY_fault_no_fault_c        ((PK_BODY_fault_t) RTTOOK)
+#define PK_BODY_fault_bad_body_c        ((PK_BODY_fault_t) RTTOBB)
+#define PK_BODY_fault_unknown_c         ((PK_BODY_fault_t) RTTODE)
+#define PK_BODY_fault_unknown_child_c   ((PK_BODY_fault_t) RTTOUC)
+#define PK_BODY_fault_duplicate_child_c ((PK_BODY_fault_t) RTTODC)
+#define PK_BODY_fault_wrong_child_c     ((PK_BODY_fault_t) RTTOWC)
+#define PK_BODY_fault_missing_child_c   ((PK_BODY_fault_t) RTTOFC)
+#define PK_BODY_fault_extra_child_c     ((PK_BODY_fault_t) RTTOMC)
+#define PK_BODY_fault_wrong_parent_c    ((PK_BODY_fault_t) RTTOWP)
+#define PK_BODY_fault_missing_parent_c  ((PK_BODY_fault_t) RTTOFP)
+#define PK_BODY_fault_extra_parent_c    ((PK_BODY_fault_t) RTTOMP)
+#define PK_BODY_fault_bad_wire_c        ((PK_BODY_fault_t) RTTODW)
+#define PK_BODY_fault_bad_loop_c        ((PK_BODY_fault_t) RTTOIL)
+#define PK_BODY_fault_bad_shells_c      ((PK_BODY_fault_t) RTTOCS)
+#define PK_BODY_fault_disjoint_shell_c  ((PK_BODY_fault_t) RTTODS)
+#define PK_BODY_fault_non_manifold_c    ((PK_BODY_fault_t) RTTONM)
+#define PK_BODY_fault_bad_region_c      ((PK_BODY_fault_t) 15117 )
+#define PK_BODY_fault_bad_fa_sh_rg_c    ((PK_BODY_fault_t) 15118 )
+#define PK_BODY_fault_empty_region_c    ((PK_BODY_fault_t) 15119 )
+
+/* PK_abort_reason_t */
+
+#define PK_abort_user_interrupt_c     ((PK_abort_reason_t) SLABUI)
+#define PK_abort_runtime_error_c      ((PK_abort_reason_t) SLABRE)
+#define PK_abort_frustrum_error_c     ((PK_abort_reason_t) SLABFE)
+
+/* PK_BODY_knit_status_t */
+
+#define PK_BODY_knit_completed_c      ((PK_BODY_knit_status_t) RTKNOK)
+#define PK_BODY_knit_not_completed_c  ((PK_BODY_knit_status_t) RTKNIN)
+
+/* PK_SHELL_type_t */
+
+#define PK_SHELL_type_acorn_c           ((PK_SHELL_type_t) 3500)
+#define PK_SHELL_type_wireframe_c       ((PK_SHELL_type_t) 3501)
+#define PK_SHELL_type_wireframe_free_c  ((PK_SHELL_type_t) 3502)
+#define PK_SHELL_type_mixed_c           ((PK_SHELL_type_t) 3503)
+
+/* PK_SHELL_sign_t */
+
+#define PK_SHELL_sign_positive_c  ((PK_SHELL_sign_t) 3550)
+#define PK_SHELL_sign_negative_c  ((PK_SHELL_sign_t) 3551)
+#define PK_SHELL_sign_open_c      ((PK_SHELL_sign_t) 3552)
+
+/* PK_FIN_type_t */
+
+#define PK_FIN_type_wire_c    ((PK_FIN_type_t) 3600)
+#define PK_FIN_type_biwire_c  ((PK_FIN_type_t) 3601)
+#define PK_FIN_type_normal_c  ((PK_FIN_type_t) 3602)
+
+/* PK_EDGE_vertex_type_t */
+
+#define PK_EDGE_type_open_c    ((PK_EDGE_vertex_type_t) 3650)
+#define PK_EDGE_type_closed_c  ((PK_EDGE_vertex_type_t) 3651)
+#define PK_EDGE_type_ring_c    ((PK_EDGE_vertex_type_t) 3652)
+
+/* PK_EDGE_fins_type_t */
+
+#define PK_EDGE_type_wireframe_c  ((PK_EDGE_fins_type_t) 3700)
+#define PK_EDGE_type_laminar_c    ((PK_EDGE_fins_type_t) 3701)
+#define PK_EDGE_type_normal_c     ((PK_EDGE_fins_type_t) 3702)
+#define PK_EDGE_type_general_c    ((PK_EDGE_fins_type_t) 3703)
+
+/* PK_neutral_error_t */
+
+#define PK_neutral_success_c            ((PK_neutral_error_t) 3800)
+#define PK_neutral_illegal_input_c      ((PK_neutral_error_t) 3801)
+#define PK_neutral_numerical_failure_c  ((PK_neutral_error_t) 3802)
+#define PK_neutral_unknown_config_c     ((PK_neutral_error_t) 3803)
+#define PK_neutral_imprint_failure_c    ((PK_neutral_error_t) 3804)
+#define PK_neutral_extend_failure_c     ((PK_neutral_error_t) 3805)
+#define PK_neutral_fill_hole_failure_c  ((PK_neutral_error_t) 3806)
+
+/* PK_knot_type_t (8500-8549) */
+
+#define PK_knot_unset_c            ((PK_knot_type_t) 8500)
+#define PK_knot_non_uniform_c      ((PK_knot_type_t) 8501)
+#define PK_knot_uniform_c          ((PK_knot_type_t) 8502)
+#define PK_knot_quasi_uniform_c    ((PK_knot_type_t) 8503)
+#define PK_knot_piecewise_bezier_c ((PK_knot_type_t) 8504)
+#define PK_knot_bezier_ends_c      ((PK_knot_type_t) 8505)
+#define PK_knot_smooth_seam_c      ((PK_knot_type_t) 8506)
+
+/* PK_self_intersect_t (8550-8599) */
+
+#define PK_self_intersect_unset_c ((PK_self_intersect_t) 8550)
+#define PK_self_intersect_false_c ((PK_self_intersect_t) 8551)
+#define PK_self_intersect_true_c  ((PK_self_intersect_t) 8552)
+
+/* PK_convexity_t (8600-8649) */
+
+#define PK_convexity_unset_c     ((PK_convexity_t) 8600)
+#define PK_convexity_arbitrary_c ((PK_convexity_t) 8601)
+#define PK_convexity_convex_c    ((PK_convexity_t) 8602)
+#define PK_convexity_concave_c   ((PK_convexity_t) 8603)
+
+/* PK_BCURVE_form_t (8650-8699) */
+
+#define PK_BCURVE_form_unset_c      ((PK_BCURVE_form_t) 8650)
+#define PK_BCURVE_form_arbitrary_c  ((PK_BCURVE_form_t) 8651)
+#define PK_BCURVE_form_polyline_c   ((PK_BCURVE_form_t) 8652)
+#define PK_BCURVE_form_circular_c   ((PK_BCURVE_form_t) 8653)
+#define PK_BCURVE_form_elliptic_c   ((PK_BCURVE_form_t) 8654)
+#define PK_BCURVE_form_parabolic_c  ((PK_BCURVE_form_t) 8655)
+#define PK_BCURVE_form_hyperbolic_c ((PK_BCURVE_form_t) 8656)
+
+/* PK_BSURF_form_t (8700-8749) */
+
+#define PK_BSURF_form_unset_c       ((PK_BSURF_form_t) 8700)
+#define PK_BSURF_form_arbitrary_c   ((PK_BSURF_form_t) 8701)
+#define PK_BSURF_form_planar_c      ((PK_BSURF_form_t) 8702)
+#define PK_BSURF_form_cylindrical_c ((PK_BSURF_form_t) 8703)
+#define PK_BSURF_form_conical_c     ((PK_BSURF_form_t) 8704)
+#define PK_BSURF_form_spherical_c   ((PK_BSURF_form_t) 8705)
+#define PK_BSURF_form_toroidal_c    ((PK_BSURF_form_t) 8706)
+#define PK_BSURF_form_revolved_c    ((PK_BSURF_form_t) 8707)
+#define PK_BSURF_form_ruled_c       ((PK_BSURF_form_t) 8708)
+#define PK_BSURF_form_gen_cone_c    ((PK_BSURF_form_t) 8709)
+#define PK_BSURF_form_quadric_c     ((PK_BSURF_form_t) 8710)
+#define PK_BSURF_form_swept_c       ((PK_BSURF_form_t) 8711)
+
+/* PK_HAND_t */
+
+#define PK_HAND_left_c                  ((PK_HAND_t) 32760)
+#define PK_HAND_right_c                 ((PK_HAND_t) 32761)
+
+/* PK_PARAM_bound_t    (18000-18019) */
+
+#define PK_PARAM_bound_infinite_c                  ((PK_PARAM_bound_t) 18000)
+#define PK_PARAM_bound_extendable_c                ((PK_PARAM_bound_t) 18001)
+#define PK_PARAM_bound_bound_c                     ((PK_PARAM_bound_t) 18002)
+#define PK_PARAM_bound_closed_c                    ((PK_PARAM_bound_t) 18003)
+#define PK_PARAM_bound_degenerate_c                ((PK_PARAM_bound_t) 18004)
+
+/* PK_PARAM_periodic_t (18020-18039) */
+
+#define PK_PARAM_periodic_no_c                 ((PK_PARAM_periodic_t) 18020)
+#define PK_PARAM_periodic_yes_c                ((PK_PARAM_periodic_t) 18021)
+#define PK_PARAM_periodic_seamed_c             ((PK_PARAM_periodic_t) 18022)
+
+/* PK_PARAM_form_t     (18040-18059) */
+
+#define PK_PARAM_form_linear_c                  ((PK_PARAM_form_t) 18040)
+#define PK_PARAM_form_circular_c                ((PK_PARAM_form_t) 18041)
+#define PK_PARAM_form_any_c                     ((PK_PARAM_form_t) 18042)
+
+/* PK_BODY_sewing_problem_t (18060-18069) */
+
+#define PK_BODY_sewing_overlapping_c  (( PK_BODY_sewing_problem_t ) 18060)
+#define PK_BODY_sewing_non_manifold_c (( PK_BODY_sewing_problem_t ) 18061)
+#define PK_BODY_sewing_non_oriented_c (( PK_BODY_sewing_problem_t ) 18062)
+#define PK_BODY_sewing_unspecified_c  (( PK_BODY_sewing_problem_t ) 18063)
+
+/* PK_BODY_sewing_type_t    (18070-18075) */
+
+#define PK_BODY_sewing_solid_c        (( PK_BODY_sewing_type_t ) 18070)
+#define PK_BODY_sewing_sheet_c        (( PK_BODY_sewing_type_t ) 18071)
+#define PK_BODY_sewing_general_c      (( PK_BODY_sewing_type_t ) 18072)
+#define PK_BODY_sewing_any_c          (( PK_BODY_sewing_type_t ) 18073)
+
+/* PK_BODY_sewing_removal_t (18076-18079) */
+
+#define PK_BODY_sewing_remove_none_c   (( PK_BODY_sewing_removal_t ) 18076)
+#define PK_BODY_sewing_remove_poss_c   (( PK_BODY_sewing_removal_t ) 18077)
+#define PK_BODY_sewing_remove_cert_c   (( PK_BODY_sewing_removal_t ) 18078)
+
+/* PK_FACE_heal_t (18080-18099) */
+
+#define PK_FACE_heal_no_c               (( PK_FACE_heal_t ) 18080)
+#define PK_FACE_heal_cap_c              (( PK_FACE_heal_t ) 18081)
+#define PK_FACE_heal_grow_from_child_c  (( PK_FACE_heal_t ) 18082)
+#define PK_FACE_heal_grow_from_parent_c (( PK_FACE_heal_t ) 18083)
+#define PK_FACE_heal_shrink_c           (( PK_FACE_heal_t ) 18084)
+#define PK_FACE_heal_yes_c              (( PK_FACE_heal_t ) 18085)
+
+/* PK_local_check_t (18100-18119) */
+
+#define PK_local_check_no_c      (( PK_local_check_t ) 18100)
+#define PK_local_check_ok_c      (( PK_local_check_t ) 18101)
+#define PK_local_check_negated_c (( PK_local_check_t ) 18102)
+#define PK_local_check_failed_c  (( PK_local_check_t ) 18103)
+
+/* PK_section_fence_t */
+
+#define PK_section_fence_front_c        ((PK_section_fence_t) 18200)
+#define PK_section_fence_back_c         ((PK_section_fence_t) 18201)
+#define PK_section_fence_both_c         ((PK_section_fence_t) 18202)
+
+/* PK_boolean_fence_t */
+
+#define PK_boolean_fence_front_c        ((PK_boolean_fence_t) 18210)
+#define PK_boolean_fence_back_c         ((PK_boolean_fence_t) 18211)
+#define PK_boolean_fence_none_c         ((PK_boolean_fence_t) 18212)
+
+/* PK_transmit_format_t */
+
+#define PK_transmit_format_text_c           ((PK_transmit_format_t) 18220)
+#define PK_transmit_format_binary_c         ((PK_transmit_format_t) 18221)
+#define PK_transmit_format_neutral_c        ((PK_transmit_format_t) 18222)
+#define PK_transmit_format_applio_c         ((PK_transmit_format_t) 18223)
+#define PK_transmit_format_xml_c            ((PK_transmit_format_t) 18224)
+#define PK_transmit_format_typed_binary_c   ((PK_transmit_format_t) 18225)
+#define PK_transmit_format_indexio_c        ((PK_transmit_format_t) 18226)
+
+/* PK_PARTITION_xmt_deltas_t */
+
+#define PK_PARTITION_xmt_deltas_none_c   ((PK_PARTITION_xmt_deltas_t) 18230)
+#define PK_PARTITION_xmt_deltas_all_c    ((PK_PARTITION_xmt_deltas_t) 18231)
+#define PK_PARTITION_xmt_deltas_main_c   ((PK_PARTITION_xmt_deltas_t) 18232)
+#define PK_PARTITION_xmt_deltas_later_c  ((PK_PARTITION_xmt_deltas_t) 18233)
+
+/* PK_PARTITION_rcv_deltas_t */
+
+#define PK_PARTITION_rcv_deltas_no_c     ((PK_PARTITION_rcv_deltas_t) 18240)
+#define PK_PARTITION_rcv_deltas_later_c  ((PK_PARTITION_rcv_deltas_t) 18241)
+#define PK_PARTITION_rcv_deltas_yes_c    ((PK_PARTITION_rcv_deltas_t) 18242)
+
+/* PK_boolean_match_t */
+
+#define PK_boolean_match_exact_c        ((PK_boolean_match_t) 18250)
+#define PK_boolean_match_contains_c     ((PK_boolean_match_t) 18251)
+#define PK_boolean_match_overlap_c      ((PK_boolean_match_t) 18252)
+#define PK_boolean_match_imprinted_c    ((PK_boolean_match_t) 18253)
+
+/* PK_range_guess_type_t */
+
+#define PK_range_guess_no_c             ((PK_range_guess_type_t) 18260)
+#define PK_range_guess_param_c          ((PK_range_guess_type_t) 18261)
+#define PK_range_guess_vector_c         ((PK_range_guess_type_t) 18262)
+
+/* PK_range_result_t */
+
+#define PK_range_result_found_c         ((PK_range_result_t) 18270)
+#define PK_range_result_lower_c         ((PK_range_result_t) 18271)
+#define PK_range_result_upper_c         ((PK_range_result_t) 18272)
+#define PK_range_result_not_found_c     ((PK_range_result_t) 18273)
+
+/* PK_check_geom_t */
+
+#define PK_check_geom_no_c              ((PK_check_geom_t) 18280)
+#define PK_check_geom_basic_c           ((PK_check_geom_t) 18281)
+#define PK_check_geom_lazy_c            ((PK_check_geom_t) 18282)
+#define PK_check_geom_full_c            ((PK_check_geom_t) 18283)
+#define PK_check_geom_yes_c             ((PK_check_geom_t) 18284)
+
+/* PK_check_bgeom_t */
+
+#define PK_check_bgeom_no_c             ((PK_check_bgeom_t) 18290)
+#define PK_check_bgeom_yes_c            ((PK_check_bgeom_t) 18291)
+
+/* PK_check_top_geo_t */
+
+#define PK_check_top_geo_no_c           ((PK_check_top_geo_t) 18300)
+#define PK_check_top_geo_edge_c         ((PK_check_top_geo_t) 18301)
+#define PK_check_top_geo_face_c         ((PK_check_top_geo_t) 18302)
+#define PK_check_top_geo_yes_c          ((PK_check_top_geo_t) 18303)
+
+/* PK_check_size_box_t */
+
+#define PK_check_size_box_no_c           ((PK_check_size_box_t) 18310)
+#define PK_check_size_box_yes_c          ((PK_check_size_box_t) 18311)
+
+/* PK_check_fa_X_t */
+
+#define PK_check_fa_X_no_c           ((PK_check_fa_X_t) 18320)
+#define PK_check_fa_X_yes_c          ((PK_check_fa_X_t) 18321)
+
+/* PK_check_loops_t */
+
+#define PK_check_loops_no_c           ((PK_check_loops_t) 18330)
+#define PK_check_loops_yes_c          ((PK_check_loops_t) 18331)
+
+/* PK_check_fa_fa_t */
+
+#define PK_check_fa_fa_no_c           ((PK_check_fa_fa_t) 18340)
+#define PK_check_fa_fa_yes_c          ((PK_check_fa_fa_t) 18341)
+
+/* PK_check_sh_t */
+
+#define PK_check_sh_no_c           ((PK_check_sh_t) 18350)
+#define PK_check_sh_yes_c          ((PK_check_sh_t) 18351)
+
+/* PK_check_corrupt_t */
+
+#define PK_check_corrupt_no_c           ((PK_check_corrupt_t) 18360)
+#define PK_check_corrupt_yes_c          ((PK_check_corrupt_t) 18361)
+
+/* PK_FACE_trim_surf_t */
+
+#define PK_FACE_trim_surf_own_c         ((PK_FACE_trim_surf_t) 18370)
+#define PK_FACE_trim_surf_bsurf_c       ((PK_FACE_trim_surf_t) SROPBS)
+
+/* PK_blend_check_t */
+
+#define PK_blend_check_vertex_c         ((PK_blend_check_t) 18380)
+#define PK_blend_check_full_c           ((PK_blend_check_t) 18381)
+
+/* PK_blend_fault_t */
+
+#define PK_blend_fault_no_blend_c       ((PK_blend_fault_t) 18390)
+#define PK_blend_fault_no_fault_c       ((PK_blend_fault_t) 18391)
+#define PK_blend_fault_self_int_c       ((PK_blend_fault_t) 18392)
+#define PK_blend_fault_face_face_c      ((PK_blend_fault_t) 18393)
+#define PK_blend_fault_conic_c          ((PK_blend_fault_t) 18394)
+#define PK_blend_fault_repaired_c       ((PK_blend_fault_t) 18395)
+#define PK_blend_fault_bad_cap_c        ((PK_blend_fault_t) 18396)
+#define PK_blend_fault_rho_too_large_c  ((PK_blend_fault_t) 18397)
+#define PK_blend_fault_tangent_c        ((PK_blend_fault_t) BLCCTN)
+#define PK_blend_fault_singularity_c    ((PK_blend_fault_t) BLCCSN)
+#define PK_blend_fault_obsolete_c       ((PK_blend_fault_t) BLCCOT)
+#define PK_blend_fault_vertex_c         ((PK_blend_fault_t) BLCCMX)
+#define PK_blend_fault_sheet_c          ((PK_blend_fault_t) BLCCRS)
+#define PK_blend_fault_general_c        ((PK_blend_fault_t) BLCCRE)
+#define PK_blend_fault_2_edge_c         ((PK_blend_fault_t) BLCCTV)
+#define PK_blend_fault_chamfer_c        ((PK_blend_fault_t) BLCCHM)
+#define PK_blend_fault_bsurf_c          ((PK_blend_fault_t) BLCCXT)
+#define PK_blend_fault_range_c          ((PK_blend_fault_t) BLCCIR)
+#define PK_blend_fault_type_c           ((PK_blend_fault_t) BLCCIT)
+#define PK_blend_fault_edge_c           ((PK_blend_fault_t) BLCCAB)
+#define PK_blend_fault_loop_c           ((PK_blend_fault_t) BLCCOL)
+#define PK_blend_fault_overlap_c        ((PK_blend_fault_t) BLCCOB)
+#define PK_blend_fault_overlap_edge_c   ((PK_blend_fault_t) BLCCOU)
+#define PK_blend_fault_bad_end_c        ((PK_blend_fault_t) BLCCUE)
+#define PK_blend_fault_face_c           ((PK_blend_fault_t) BLCCRL)
+#define PK_blend_fault_overlap_end_c    ((PK_blend_fault_t) BLCCOE)
+#define PK_blend_fault_end_c            ((PK_blend_fault_t) BLCCIE)
+#define PK_blend_fault_chamfer_intsec_c ((PK_blend_fault_t) BLCCIX)
+#define PK_blend_fault_edge_intsec_c    ((PK_blend_fault_t) BLCCEX)
+#define PK_blend_fault_other_edge_c     ((PK_blend_fault_t) BLCCOI)
+#define PK_blend_fault_cliffedge_c      ((PK_blend_fault_t) BLCCIP)
+#define PK_blend_fault_unknown_c        ((PK_blend_fault_t) BLCCUN)
+#define PK_blend_fault_g2_with_cliff_c  ((PK_blend_fault_t) 18398)
+#define PK_blend_fault_g2_vx_blend_c    ((PK_blend_fault_t) 18399)
+
+/* PK_blend_type_t */
+
+#define PK_blend_type_no_c              ((PK_blend_type_t) 18400)
+#define PK_blend_type_ball_constant_c   ((PK_blend_type_t) 18401)
+#define PK_blend_type_ball_variable_c   ((PK_blend_type_t) 18402)
+#define PK_blend_type_chamfer_c         ((PK_blend_type_t) 18403)
+
+/* PK_blend_propagate_t */
+
+#define PK_blend_propagate_no_c              ((PK_blend_propagate_t) 18410)
+#define PK_blend_propagate_yes_c             ((PK_blend_propagate_t) 18411)
+
+/* PK_blend_vary_t */
+
+#define PK_blend_vary_smooth_c               ((PK_blend_vary_t) 18420)
+#define PK_blend_vary_linear_c               ((PK_blend_vary_t) 18421)
+
+/* PK_blend_render_rib_t */
+
+#define PK_blend_render_rib_no_c             ((PK_blend_render_rib_t) 18430)
+#define PK_blend_render_rib_yes_c            ((PK_blend_render_rib_t) 18431)
+
+/* PK_blend_ov_smooth_t */
+
+#define PK_blend_ov_smooth_no_c              ((PK_blend_ov_smooth_t) 18440)
+#define PK_blend_ov_smooth_diff_c            ((PK_blend_ov_smooth_t) 18441)
+#define PK_blend_ov_smooth_any_c             ((PK_blend_ov_smooth_t) 18442)
+
+/* PK_blend_ov_cliff_t */
+
+#define PK_blend_ov_cliff_no_c               ((PK_blend_ov_cliff_t) 18450)
+#define PK_blend_ov_cliff_diff_c             ((PK_blend_ov_cliff_t) 18451)
+#define PK_blend_ov_cliff_any_c              ((PK_blend_ov_cliff_t) 18452)
+
+/* PK_blend_ov_cliff_end_t */
+
+#define PK_blend_ov_cliff_end_no_c           ((PK_blend_ov_cliff_end_t) 18460)
+#define PK_blend_ov_cliff_end_yes_c          ((PK_blend_ov_cliff_end_t) 18461)
+
+/* PK_blend_ov_notch_t */
+
+#define PK_blend_ov_notch_no_c               ((PK_blend_ov_notch_t) 18470)
+#define PK_blend_ov_notch_yes_c              ((PK_blend_ov_notch_t) 18471)
+
+/* PK_blend_walls_t */
+
+#define PK_blend_walls_trim_no_c             ((PK_blend_walls_t) 18480)
+#define PK_blend_walls_trim_both_c           ((PK_blend_walls_t) FXFTTW)
+#define PK_blend_walls_attach_c              ((PK_blend_walls_t) FXFTAT)
+#define PK_blend_walls_solid_c               ((PK_blend_walls_t) FXFTSO)
+
+/* PK_blend_cs_t */
+
+#define PK_blend_cs_rolling_ball_c       ((PK_blend_cs_t) 18490)
+#define PK_blend_cs_disc_c               ((PK_blend_cs_t) 18491)
+#define PK_blend_cs_isoparameter_c       ((PK_blend_cs_t) 18492)
+
+/* PK_blend_xs_plane_t */
+
+#define PK_blend_xs_rolling_ball_c       ((PK_blend_xs_plane_t) 18490)
+#define PK_blend_xs_disc_c               ((PK_blend_xs_plane_t) 18491)
+#define PK_blend_xs_isoparameter_c       ((PK_blend_xs_plane_t) 18492)
+
+/* PK_piecewise_rep_t */
+
+#define PK_piecewise_rep_bezier_c        ((PK_piecewise_rep_t) 18500)
+#define PK_piecewise_rep_polynomial_c    ((PK_piecewise_rep_t) 18501)
+#define PK_piecewise_rep_hermite_c       ((PK_piecewise_rep_t) 18502)
+#define PK_piecewise_rep_taylor_c        ((PK_piecewise_rep_t) 18503)
+
+/* PK_PARAM_end_t */
+
+#define PK_PARAM_end_periodic_c          ((PK_PARAM_end_t) 18510)
+#define PK_PARAM_end_natural_c           ((PK_PARAM_end_t) 18511)
+#define PK_PARAM_end_clamped_vector_c    ((PK_PARAM_end_t) 18512)
+#define PK_PARAM_end_clamped_bcurve_c    ((PK_PARAM_end_t) 18513)
+
+/* PK_PARAM_knot_t */
+
+#define PK_PARAM_knot_auto_c             ((PK_PARAM_knot_t) 18520)
+#define PK_PARAM_knot_defined_c          ((PK_PARAM_knot_t) 18521)
+
+/* PK_PARAM_twist_t */
+
+#define PK_PARAM_twist_no_c              ((PK_PARAM_twist_t) 18530)
+#define PK_PARAM_twist_yes_c             ((PK_PARAM_twist_t) 18531)
+
+/* PK_TOPOL_sense_t */
+
+#define PK_TOPOL_sense_none_c            ((PK_TOPOL_sense_t) 18540)
+#define PK_TOPOL_sense_negative_c        ((PK_TOPOL_sense_t) 18541)
+#define PK_TOPOL_sense_positive_c        ((PK_TOPOL_sense_t) 18542)
+
+/* PK_PARAM_degen_t */
+
+#define PK_PARAM_degen_no_c              ((PK_PARAM_degen_t) 18550)
+#define PK_PARAM_degen_vector_c          ((PK_PARAM_degen_t) 18551)
+#define PK_PARAM_degen_bcurve_c          ((PK_PARAM_degen_t) 18552)
+
+/* PK_render_edge_t         (20100-20101 allocated) */
+
+#define PK_render_edge_no_c             ((PK_render_edge_t) 20100)
+#define PK_render_edge_yes_c            ((PK_render_edge_t) 20101)
+
+/* PK_render_silhouette_t   (20120-20121) allocated */
+
+#define PK_render_silhouette_no_c       ((PK_render_silhouette_t) 20120)
+#define PK_render_silhouette_arcs_c     ((PK_render_silhouette_t) 20121)
+#define PK_render_silhouette_yes_c      ((PK_render_silhouette_t) 20122)
+
+/* PK_render_planar_t       (20140-20143 allocated) */
+
+#define PK_render_planar_no_c           ((PK_render_planar_t) 20140)
+#define PK_render_planar_attrib_c       ((PK_render_planar_t) 20141)
+#define PK_render_planar_free_c         ((PK_render_planar_t) 20142)
+#define PK_render_planar_yes_c          ((PK_render_planar_t) 20143)
+
+/* PK_render_radial_t       (20160-20162) allocated */
+
+#define PK_render_radial_no_c           ((PK_render_radial_t) 20160)
+#define PK_render_radial_attrib_c       ((PK_render_radial_t) 20161)
+#define PK_render_radial_yes_c          ((PK_render_radial_t) 20162)
+#define PK_render_radial_free_c         ((PK_render_radial_t) 20163)
+
+/* PK_render_param_t        (20180-20182) allocated */
+
+#define PK_render_param_no_c            ((PK_render_param_t) 20180)
+#define PK_render_param_attrib_c        ((PK_render_param_t) 20181)
+#define PK_render_param_yes_c           ((PK_render_param_t) 20182)
+#define PK_render_param_free_c          ((PK_render_param_t) 20183)
+
+/* PK_render_unfix_t        (20200-20202) allocated */
+
+#define PK_render_unfix_no_c            ((PK_render_unfix_t) 20200)
+#define PK_render_unfix_attrib_c        ((PK_render_unfix_t) 20201)
+#define PK_render_unfix_yes_c           ((PK_render_unfix_t) 20202)
+
+/* PK_render_boundary_t     (20220-20221) allocated */
+
+#define PK_render_boundary_no_c         ((PK_render_boundary_t) 20220)
+#define PK_render_boundary_yes_c        ((PK_render_boundary_t) 20221)
+
+/* PK_render_transparent_t  (20240-20242 allocated) */
+
+#define PK_render_transparent_no_c      ((PK_render_transparent_t) 20240)
+#define PK_render_transparent_yes_c     ((PK_render_transparent_t) 20241)
+#define PK_render_transparent_index_c   ((PK_render_transparent_t) 20242)
+
+/* PK_render_transp_hid_t   (20243-20244 allocated) */
+
+#define PK_render_transp_hid_no_c       ((PK_render_transp_hid_t) 20243)
+#define PK_render_transp_hid_yes_c      ((PK_render_transp_hid_t) 20244)
+
+/* PK_render_vis_t          (20300-20305) allocated */
+
+#define PK_render_vis_no_c              ((PK_render_vis_t) 20300)
+#define PK_render_vis_hid_c             ((PK_render_vis_t) 20301)
+#define PK_render_vis_inv_c             ((PK_render_vis_t) 20302)
+#define PK_render_vis_hid_draft_c       ((PK_render_vis_t) 20303)
+#define PK_render_vis_inv_draft_c       ((PK_render_vis_t) 20304)
+#define PK_render_vis_extended_c        ((PK_render_vis_t) 20305)
+
+/* PK_render_smooth_t       (20320-20322) allocated */
+
+#define PK_render_smooth_no_c           ((PK_render_smooth_t) 20320)
+#define PK_render_smooth_yes_c          ((PK_render_smooth_t) 20321)
+#define PK_render_smooth_draft_c        ((PK_render_smooth_t) 20322)
+
+/* PK_render_internal_t     (20340-20341) allocated */
+
+#define PK_render_internal_no_c         ((PK_render_internal_t) 20340)
+#define PK_render_internal_yes_c        ((PK_render_internal_t) 20341)
+
+/* PK_render_region_t       (20360-20362) allocated */
+
+#define PK_render_region_no_c           ((PK_render_region_t) 20360)
+#define PK_render_region_attrib_c       ((PK_render_region_t) 20361)
+#define PK_render_region_yes_c          ((PK_render_region_t) 20362)
+
+/* PK_render_hierarch_t     (20380-20383) allocated */
+
+#define PK_render_hierarch_no_c         ((PK_render_hierarch_t) 20380)
+#define PK_render_hierarch_no_geom_c    ((PK_render_hierarch_t) 20381)
+#define PK_render_hierarch_yes_c        ((PK_render_hierarch_t) 20382)
+#define PK_render_hierarch_param_c      ((PK_render_hierarch_t) 20383)
+
+/* PK_render_bcurve_t       (20400-20402) allocated */
+
+#define PK_render_bcurve_polyline_c     ((PK_render_bcurve_t) 20400)
+#define PK_render_bcurve_bezier_c       ((PK_render_bcurve_t) 20401)
+#define PK_render_bcurve_nurbs_c        ((PK_render_bcurve_t) 20402)
+
+/* PK_render_viewport_t     (20420-20422) allocated */
+
+#define PK_render_viewport_no_c         ((PK_render_viewport_t) 20420)
+#define PK_render_viewport_yes_c        ((PK_render_viewport_t) 20421)
+#define PK_render_viewport_array_c      ((PK_render_viewport_t) 20422)
+
+/* PK_render_invisible_t    (20440-20441) allocated */
+
+#define PK_render_invisible_no_c        ((PK_render_invisible_t) 20440)
+#define PK_render_invisible_yes_c       ((PK_render_invisible_t) 20441)
+
+/* PK_render_drafting_t     (20450-20451) allocated */
+
+#define PK_render_drafting_no_c         ((PK_render_drafting_t) 20450)
+#define PK_render_drafting_yes_c        ((PK_render_drafting_t) 20451)
+
+/* PK_render_self_hidden_t  (20460-20461) allocated */
+
+#define PK_render_self_hidden_no_c      ((PK_render_self_hidden_t) 20460)
+#define PK_render_self_hidden_yes_c     ((PK_render_self_hidden_t) 20461)
+
+/* PK_render_viewport_clip_t (20470-20471) allocated */
+
+#define PK_render_viewport_clip_no_c    ((PK_render_viewport_clip_t) 20470)
+#define PK_render_viewport_clip_yes_c   ((PK_render_viewport_clip_t) 20471)
+
+/* PK_render_viewport_type_t (20480-20481) allocated */
+
+#define PK_render_viewport_type_3D_c   ((PK_render_viewport_type_t) 20480)
+#define PK_render_viewport_type_2D_c   ((PK_render_viewport_type_t) 20481)
+
+/* PK_render_line_t (20490-20499) allocated */
+
+#define PK_render_line_edge_c     ((PK_render_line_t) 20490)
+#define PK_render_line_silh_c     ((PK_render_line_t) 20491)
+#define PK_render_line_hatch_c    ((PK_render_line_t) 20492)
+#define PK_render_line_inter_c    ((PK_render_line_t) 20493)
+#define PK_render_line_clip_c     ((PK_render_line_t) 20494)
+
+/* PK_facet_shape_t         (20500-20502) allocated */
+
+#define PK_facet_shape_any_c           ((PK_facet_shape_t) 20500)
+#define PK_facet_shape_cut_c           ((PK_facet_shape_t) 20501)
+#define PK_facet_shape_convex_c        ((PK_facet_shape_t) 20502)
+
+/* PK_facet_match_t         (20520-20523) allocated */
+
+#define PK_facet_match_no_c            ((PK_facet_match_t) 20520)
+#define PK_facet_match_geom_c          ((PK_facet_match_t) 20521)
+#define PK_facet_match_topol_c         ((PK_facet_match_t) 20522)
+#define PK_facet_match_trimmed_c       ((PK_facet_match_t) 20523)
+
+/* PK_facet_density_t       (20540-20543) allocated */
+
+#define PK_facet_density_no_view_c     ((PK_facet_density_t) 20540)
+#define PK_facet_density_use_view_c    ((PK_facet_density_t) 20541)
+#define PK_facet_density_parallel_c    ((PK_facet_density_t) 20542)
+#define PK_facet_density_sil_and_par_c ((PK_facet_density_t) 20543)
+
+/* PK_facet_cull_t          (20560-20561) allocated */
+
+#define PK_facet_cull_none_c           ((PK_facet_cull_t) 20560)
+#define PK_facet_cull_back_c           ((PK_facet_cull_t) 20561)
+
+/* PK_facet_degen_t         (20580-20582) allocated */
+
+#define PK_facet_degen_multiple_vxs_c      ((PK_facet_degen_t) 20580)
+#define PK_facet_degen_single_vx_c         ((PK_facet_degen_t) 20581)
+#define PK_facet_degen_average_parms_c     ((PK_facet_degen_t) 20582)
+
+/* PK_facet_go_normals_t    (20600-20601) allocated */
+
+#define PK_facet_go_normals_no_c       ((PK_facet_go_normals_t) 20600)
+#define PK_facet_go_normals_yes_c      ((PK_facet_go_normals_t) 20601)
+
+/* PK_facet_go_parameters_t (20620-20623) allocated */
+
+#define PK_facet_go_parameters_no_c    ((PK_facet_go_parameters_t) 20620)
+#define PK_facet_go_parameters_d0_c    ((PK_facet_go_parameters_t) 20621)
+#define PK_facet_go_parameters_d1_c    ((PK_facet_go_parameters_t) 20622)
+#define PK_facet_go_parameters_d2_c    ((PK_facet_go_parameters_t) 20623)
+
+/* PK_facet_go_edges_t      (20640-20659) allocated */
+
+#define PK_facet_go_edges_no_c         ((PK_facet_go_edges_t)  20640)
+#define PK_facet_go_edges_yes_c        ((PK_facet_go_edges_t)  20641)
+
+/* PK_facet_go_strips_t     (20660-20661) allocated */
+
+#define PK_facet_go_strips_no_c        ((PK_facet_go_strips_t) 20660)
+#define PK_facet_go_strips_yes_c       ((PK_facet_go_strips_t) 20661)
+
+/* PK_facet_go_interleaved_t(20680-20681) allocated */
+
+#define PK_facet_go_interleaved_no_c   ((PK_facet_go_interleaved_t) 20680)
+#define PK_facet_go_interleaved_yes_c  ((PK_facet_go_interleaved_t) 20681)
+
+/* PK_facet_fault_t         (20700-20720) allocated */
+
+#define PK_facet_fault_face_c          ((PK_facet_fault_t) 20700)
+#define PK_facet_fault_facet_c         ((PK_facet_fault_t) 20701)
+#define PK_facet_fault_vertex_point_c  ((PK_facet_fault_t) 20702)
+#define PK_facet_fault_vertex_normal_c ((PK_facet_fault_t) 20703)
+#define PK_facet_fault_vertex_param_c  ((PK_facet_fault_t) 20704)
+#define PK_facet_fault_thin_face_c     ((PK_facet_fault_t) 20705)
+#define PK_facet_fault_body_c          ((PK_facet_fault_t) 20706)
+#define PK_facet_fault_data_normal_c   ((PK_facet_fault_t) 20707)
+#define PK_facet_fault_data_param_c    ((PK_facet_fault_t) 20708)
+#define PK_facet_fault_data_deriv_c    ((PK_facet_fault_t) 20709)
+#define PK_facet_fault_mangled_facet_c ((PK_facet_fault_t) 20710)
+#define PK_facet_fault_mangled_strip_c ((PK_facet_fault_t) 20711)
+#define PK_facet_fault_missing_face_c  ((PK_facet_fault_t) 20712)
+#define PK_facet_fault_refinement_c    ((PK_facet_fault_t) 20713)
+#define PK_facet_fault_incr_facet_c    ((PK_facet_fault_t) 20714)
+#define PK_facet_fault_pt_off_edge_0_c ((PK_facet_fault_t) 20715)
+#define PK_facet_fault_pt_off_edge_1_c ((PK_facet_fault_t) 20716)
+#define PK_facet_fault_pt_off_edge_2_c ((PK_facet_fault_t) 20717)
+#define PK_facet_fault_pt_off_face_c   ((PK_facet_fault_t) 20718)
+#define PK_facet_fault_topol_param_c   ((PK_facet_fault_t) 20719)
+#define PK_facet_fault_topol_deriv_c   ((PK_facet_fault_t) 20720)
+
+/* PK_BODY_pick_method_t */
+
+#define PK_BODY_pick_radial_c        ((PK_BODY_pick_method_t) 20900)
+#define PK_BODY_pick_axial_c         ((PK_BODY_pick_method_t) 20901)
+#define PK_BODY_pick_ratio_c         ((PK_BODY_pick_method_t) 20902)
+#define PK_BODY_pick_axial_location_c   ((PK_BODY_pick_method_t) 20903)
+
+/* PK_boolean_select_t */
+
+#define PK_boolean_select_specific_c    ((PK_boolean_select_t) 21000)
+#define PK_boolean_select_adjacent_c    ((PK_boolean_select_t) 21001)
+#define PK_boolean_select_propagate_c   ((PK_boolean_select_t) 21002)
+
+/* PK_thread_t */
+
+#define PK_thread_disabled_c         ((PK_thread_t) 21010)
+#define PK_thread_per_processor_c    ((PK_thread_t) 21011)
+#define PK_thread_absolute_c         ((PK_thread_t) 21012)
+
+/* PK_blend_output_rib_t */
+
+#define PK_blend_output_rib_no_c           ((PK_blend_output_rib_t) 21020)
+#define PK_blend_output_rib_on_fail_c      ((PK_blend_output_rib_t) 21021)
+#define PK_blend_output_rib_only_c         ((PK_blend_output_rib_t) 21022)
+#define PK_blend_output_rib_also_c         ((PK_blend_output_rib_t) 21023)
+#define PK_blend_output_rib_at_help_c      ((PK_blend_output_rib_t) 21024)
+
+/* PK_blend_group_rib_t */
+
+#define PK_blend_group_rib_no_c        ((PK_blend_group_rib_t) 21030)
+#define PK_blend_group_rib_by_face_c   ((PK_blend_group_rib_t) 21031)
+#define PK_blend_group_rib_by_parms_c  ((PK_blend_group_rib_t) 21032)
+
+/* PK_blend_check_su_X_t */
+
+#define PK_blend_check_su_X_no_c        ((PK_blend_check_su_X_t) 21040)
+#define PK_blend_check_su_X_not_bsurf_c ((PK_blend_check_su_X_t) 21041)
+#define PK_blend_check_su_X_yes_c       ((PK_blend_check_su_X_t) 21042)
+
+/* PK_blend_check_fa_t */
+
+#define PK_blend_check_fa_no_c    ((PK_blend_check_fa_t) 21050)
+#define PK_blend_check_fa_yes_c   ((PK_blend_check_fa_t) 21051)
+
+/* PK_blend_check_fa_fa_t */
+
+#define PK_blend_check_fa_fa_no_c    ((PK_blend_check_fa_fa_t) 21060)
+#define PK_blend_check_fa_fa_yes_c   ((PK_blend_check_fa_fa_t) 21061)
+
+/* PK_blend_update_t */
+
+#define PK_blend_update_0_c    ((PK_blend_update_t) 21070)
+#define PK_blend_update_1_c    ((PK_blend_update_t) 21071)
+#define PK_blend_update_2_c    ((PK_blend_update_t) 21073)
+#define PK_blend_update_3_c    ((PK_blend_update_t) 21074)
+#define PK_blend_update_4_c    ((PK_blend_update_t) 21075)
+#define PK_blend_update_5_c    ((PK_blend_update_t) 21076)
+#define PK_blend_update_6_c    ((PK_blend_update_t) 21077)
+#define PK_blend_update_7_c    ((PK_blend_update_t) 21078)
+#define PK_blend_update_8_c    ((PK_blend_update_t) 21079)
+#define PK_blend_update_9_c    ((PK_blend_update_t) 24220)
+#define PK_blend_update_10_c   ((PK_blend_update_t) 24221)
+#define PK_blend_update_11_c   ((PK_blend_update_t) 24222)
+#define PK_blend_update_12_c   ((PK_blend_update_t) 24223)
+#define PK_blend_update_13_c   ((PK_blend_update_t) 24224)
+#define PK_blend_update_14_c   ((PK_blend_update_t) 24225)
+#define PK_blend_update_15_c   ((PK_blend_update_t) 24226)
+#define PK_blend_update_16_c   ((PK_blend_update_t) 24227)
+#define PK_blend_update_17_c   ((PK_blend_update_t) 24228)
+#define PK_blend_update_18_c   ((PK_blend_update_t) 24229)
+#define PK_blend_update_19_c   ((PK_blend_update_t) 24230)
+#define PK_blend_update_default_c    ((PK_blend_update_t) 21072)
+
+/* PK_BCURVE_fit_eval_type_t */
+
+#define PK_BCURVE_fit_eval_user_c       ((PK_BCURVE_fit_eval_type_t) 21080)
+#define PK_BCURVE_fit_eval_chain_c      ((PK_BCURVE_fit_eval_type_t) 21081)
+
+/* PK_BCURVE_fit_err_method_t */
+
+#define PK_BCURVE_fit_err_none_c      ((PK_BCURVE_fit_err_method_t) 21090)
+#define PK_BCURVE_fit_err_parm_c      ((PK_BCURVE_fit_err_method_t) 21091)
+#define PK_BCURVE_fit_err_closest_c   ((PK_BCURVE_fit_err_method_t) 21092)
+
+/* PK_BCURVE_fit_t */
+
+#define PK_BCURVE_fit_success_c             ((PK_BCURVE_fit_t) 21100)
+#define PK_BCURVE_fit_failure_c             ((PK_BCURVE_fit_t) 21101)
+#define PK_BCURVE_fit_other_failed_c        ((PK_BCURVE_fit_t) 21102)
+#define PK_BCURVE_fit_eval_failure_c        ((PK_BCURVE_fit_t) 21103)
+#define PK_BCURVE_fit_bad_n_curves_c        ((PK_BCURVE_fit_t) 21104)
+#define PK_BCURVE_fit_bad_range_c           ((PK_BCURVE_fit_t) 21105)
+#define PK_BCURVE_fit_bad_tolerance_c       ((PK_BCURVE_fit_t) 21106)
+#define PK_BCURVE_fit_bad_err_method_c      ((PK_BCURVE_fit_t) 21107)
+#define PK_BCURVE_fit_bad_eval_type_c       ((PK_BCURVE_fit_t) 21108)
+#define PK_BCURVE_fit_bad_break_parm_c      ((PK_BCURVE_fit_t) 21109)
+#define PK_BCURVE_fit_bad_chain_c           ((PK_BCURVE_fit_t) 21110)
+#define PK_BCURVE_fit_bad_fit_parm_c        ((PK_BCURVE_fit_t) 21111)
+
+/* PK_BODY_curve_nmnl_t */
+
+#define PK_BODY_curve_nmnl_no_c         ((PK_BODY_curve_nmnl_t) 21200)
+#define PK_BODY_curve_nmnl_yes_c        ((PK_BODY_curve_nmnl_t) 21201)
+
+/* PK_LOOP_opl_gap_fill_t */
+
+#define PK_LOOP_opl_gap_fill_round_c     ((PK_LOOP_opl_gap_fill_t) 21210)
+#define PK_LOOP_opl_gap_fill_linear_c    ((PK_LOOP_opl_gap_fill_t) 21211)
+#define PK_LOOP_opl_gap_fill_natural_c   ((PK_LOOP_opl_gap_fill_t) 21212)
+
+
+/* PK_BODY_owb_gap_fill_t */
+
+#define PK_BODY_owb_gap_fill_round_c     ((PK_BODY_owb_gap_fill_t) 21220)
+#define PK_BODY_owb_gap_fill_linear_c    ((PK_BODY_owb_gap_fill_t) 21221)
+#define PK_BODY_owb_gap_fill_natural_c   ((PK_BODY_owb_gap_fill_t) 21222)
+
+
+/* PK_pattern_check_fa_fa_t */
+
+#define PK_pattern_check_fa_fa_no_c    (( PK_pattern_check_fa_fa_t ) 21300)
+#define PK_pattern_check_fa_fa_yes_c   (( PK_pattern_check_fa_fa_t ) 21301)
+
+/* PK_pattern_check_loops_t */
+
+#define PK_pattern_check_loops_no_c      (( PK_pattern_check_loops_t ) 21310)
+#define PK_pattern_check_loops_yes_c     (( PK_pattern_check_loops_t ) 21311)
+#define PK_pattern_check_loops_outside_c (( PK_pattern_check_loops_t ) 21312)
+
+/* PK_pattern_status_t */
+
+#define PK_pattern_status_ok_c          (( PK_pattern_status_t ) 21320)
+#define PK_pattern_status_fail_c        (( PK_pattern_status_t ) 21321)
+#define PK_pattern_status_outside_fa_c  (( PK_pattern_status_t ) 21322)
+#define PK_pattern_status_outside_reg_c (( PK_pattern_status_t ) 21323)
+#define PK_pattern_status_tf_failed_c   (( PK_pattern_status_t ) 21324)
+#define PK_pattern_status_face_clash_c  (( PK_pattern_status_t ) 21325)
+#define PK_pattern_status_colliding_c   (( PK_pattern_status_t ) 21326)
+
+/* PK_pattern_same_face_t */
+
+#define PK_pattern_same_face_no_c    (( PK_pattern_same_face_t ) 21340)
+#define PK_pattern_same_face_yes_c   (( PK_pattern_same_face_t ) 21341)
+
+/* PK_pattern_coi_face_t */
+
+#define PK_pattern_coi_face_unknown_c (( PK_pattern_coi_face_t ) 21350)
+#define PK_pattern_coi_face_yes_c     (( PK_pattern_coi_face_t ) 21351)
+
+/* PK_pattern_result_t */
+
+#define PK_pattern_result_ok_c             (( PK_pattern_result_t ) 21360)
+#define PK_pattern_result_partial_c        (( PK_pattern_result_t ) 21361)
+#define PK_pattern_result_fail_c           (( PK_pattern_result_t ) 21362)
+#define PK_pattern_result_mixed_faces_c    (( PK_pattern_result_t ) 21363)
+#define PK_pattern_result_instanced_c      (( PK_pattern_result_t ) 21364)
+#define PK_pattern_result_invalid_set_c    (( PK_pattern_result_t ) 21365)
+#define PK_pattern_result_miss_geom_c      (( PK_pattern_result_t ) 21366)
+
+/* PK_pattern_reblend_t */
+
+#define PK_pattern_reblend_no_c     (( PK_pattern_reblend_t ) 23270)
+#define PK_pattern_reblend_yes_c    (( PK_pattern_reblend_t ) 23271)
+
+/* PK_pattern_collision_t */
+
+#define PK_pattern_collision_no_c   (( PK_pattern_collision_t ) 21370)
+#define PK_pattern_collision_yes_c  (( PK_pattern_collision_t ) 21371)
+
+/* PK_local_check_su_X_t */
+
+#define PK_local_check_su_X_no_c        ((PK_local_check_su_X_t) 21400)
+#define PK_local_check_su_X_yes_c       ((PK_local_check_su_X_t) 21401)
+
+/* PK_local_check_topol_t */
+
+#define PK_local_check_topol_no_c        ((PK_local_check_topol_t) 21410)
+#define PK_local_check_topol_yes_c       ((PK_local_check_topol_t) 21411)
+
+/* PK_local_change_topol_t */
+
+#define PK_local_change_topol_no_c       ((PK_local_change_topol_t) 21420)
+#define PK_local_change_topol_yes_c      ((PK_local_change_topol_t) 21421)
+
+/* PK_local_status_t */
+
+#define PK_local_status_ok_c             ((PK_local_status_t) 21450)
+#define PK_local_status_nocheck_c        ((PK_local_status_t) 21451)
+#define PK_local_status_fail_c           ((PK_local_status_t) 21452)
+#define PK_local_status_cant_get_pt_c    ((PK_local_status_t) 21453)
+#define PK_local_status_cant_get_cu_c    ((PK_local_status_t) 21454)
+#define PK_local_status_cant_get_su_c    ((PK_local_status_t) 21455)
+#define PK_local_status_cant_offset_c    ((PK_local_status_t) 21456)
+#define PK_local_status_side_cu_fail_c   ((PK_local_status_t) 21457)
+#define PK_local_status_side_su_fail_c   ((PK_local_status_t) 21458)
+#define PK_local_status_not_same_by_c    ((PK_local_status_t) 21459)
+#define PK_local_status_fa_fail_c        ((PK_local_status_t) 21460)
+#define PK_local_status_fa_fa_fail_c     ((PK_local_status_t) 21461)
+#define PK_local_status_ed_remains_c     ((PK_local_status_t) 21462)
+#define PK_local_status_point_contact_c  ((PK_local_status_t) 21463)
+#define PK_local_status_bad_reference_c  ((PK_local_status_t) 21464)
+#define PK_local_status_not_supported_c  ((PK_local_status_t) 21465)
+#define PK_local_status_cant_extend_c    ((PK_local_status_t) 21466)
+#define PK_local_status_sheet_small_c    ((PK_local_status_t) 21467)
+#define PK_local_status_cant_use_cu_c    ((PK_local_status_t) 21468)
+#define PK_local_status_eds_unconnected_c ((PK_local_status_t) 21469)
+#define PK_local_status_non_laminar_c    ((PK_local_status_t) 21470)
+#define PK_local_status_reference_loop_c ((PK_local_status_t) 21471)
+#define PK_local_status_lp_outside_fa_c  ((PK_local_status_t) 21472)
+#define PK_local_status_target_missed_c  ((PK_local_status_t) 21473)
+#define PK_local_status_wrong_side_c     ((PK_local_status_t) 21474)
+#define PK_local_status_vx_large_tol_c   ((PK_local_status_t) 21475)
+#define PK_local_status_ed_large_tol_c   ((PK_local_status_t) 21476)
+#define PK_local_status_blend_too_tight_c ((PK_local_status_t) 21477)
+#define PK_local_status_cant_make_blend_c ((PK_local_status_t) 21478)
+#define PK_local_status_bad_chamfer_c    ((PK_local_status_t) 21479)
+#define PK_local_status_bad_blend_c      ((PK_local_status_t) 21480)
+#define PK_local_status_not_blend_surf_c ((PK_local_status_t) 21481)
+
+/* PK_TOPOL_track_t */
+
+#define PK_TOPOL_track_delete_c        (( PK_TOPOL_track_t ) 21500)
+#define PK_TOPOL_track_merge_c         (( PK_TOPOL_track_t ) 21501)
+#define PK_TOPOL_track_create_c        (( PK_TOPOL_track_t ) 21502)
+#define PK_TOPOL_track_split_c         (( PK_TOPOL_track_t ) 21503)
+#define PK_TOPOL_track_derive_c        (( PK_TOPOL_track_t ) 21504)
+
+/* PK_BODY_simplify_t */
+
+#define PK_BODY_simplify_analytic_c     (( PK_BODY_simplify_t ) 21520)
+#define PK_BODY_simplify_no_c           (( PK_BODY_simplify_t ) 21521)
+#define PK_BODY_simplify_swept_spun_c   (( PK_BODY_simplify_t ) 21522)
+
+#define PK_BODY_simplify_yes_c          (( PK_BODY_simplify_t ) 21520)
+
+/* PK_BODY_loft_curvature_t */
+
+#define PK_BODY_loft_natural_c          (( PK_BODY_loft_curvature_t ) 21530)
+#define PK_BODY_loft_unconstrained_c    (( PK_BODY_loft_curvature_t ) 21531)
+#define PK_BODY_loft_clamped_c          (( PK_BODY_loft_curvature_t ) 21532)
+
+/* PK_BODY_loft_clamp_type_t */
+
+#define PK_BODY_loft_clamp_no_c         (( PK_BODY_loft_clamp_type_t ) 21540)
+#define PK_BODY_loft_clamp_vector_c     (( PK_BODY_loft_clamp_type_t ) 21541)
+#define PK_BODY_loft_clamp_face_c       (( PK_BODY_loft_clamp_type_t ) 21542)
+#define PK_BODY_loft_clamp_planar_c     (( PK_BODY_loft_clamp_type_t ) 21543)
+
+/* PK_BODY_loft_fault_t */
+
+#define PK_BODY_loft_ok_c               (( PK_BODY_loft_fault_t ) 21550)
+#define PK_BODY_loft_failure_c          (( PK_BODY_loft_fault_t ) 21551)
+#define PK_BODY_loft_bad_profile_c      (( PK_BODY_loft_fault_t ) 21552)
+#define PK_BODY_loft_surf_failure_c     (( PK_BODY_loft_fault_t ) 21553)
+#define PK_BODY_loft_check_failure_c    (( PK_BODY_loft_fault_t ) 21554)
+#define PK_BODY_loft_geom_self_int_c    (( PK_BODY_loft_fault_t ) 21555)
+#define PK_BODY_loft_topol_self_int_c   (( PK_BODY_loft_fault_t ) 21556)
+#define PK_BODY_loft_geom_degen_c       (( PK_BODY_loft_fault_t ) 21557)
+#define PK_BODY_loft_small_profile_c    (( PK_BODY_loft_fault_t ) 21558)
+#define PK_BODY_loft_bad_match_c        (( PK_BODY_loft_fault_t ) 21559)
+#define PK_BODY_loft_bad_clamp_c        (( PK_BODY_loft_fault_t ) 22000)
+#define PK_BODY_loft_bad_profile_type_c (( PK_BODY_loft_fault_t ) 22001)
+#define PK_BODY_loft_bad_end_conds_c    (( PK_BODY_loft_fault_t ) 22002)
+#define PK_BODY_loft_bad_guide_wire_c   (( PK_BODY_loft_fault_t ) 22003)
+#define PK_BODY_loft_bad_guide_match_c  (( PK_BODY_loft_fault_t ) 22004)
+#define PK_BODY_loft_bad_simplify_c     (( PK_BODY_loft_fault_t ) 22005)
+
+/* PK_BODY_sweep_alignment_t */
+
+#define PK_BODY_sweep_align_normal_c    (( PK_BODY_sweep_alignment_t ) 21560 )
+#define PK_BODY_sweep_align_parallel_c  (( PK_BODY_sweep_alignment_t ) 21561 )
+#define PK_BODY_sweep_align_parm_c      (( PK_BODY_sweep_alignment_t ) 21562 )
+#define PK_BODY_sweep_align_arclength_c (( PK_BODY_sweep_alignment_t ) 21563 )
+
+/* PK_BODY_sweep_law_type_t */
+
+#define PK_BODY_sweep_law_none_c      (( PK_BODY_sweep_law_type_t ) 21570)
+#define PK_BODY_sweep_law_discrete_c  (( PK_BODY_sweep_law_type_t ) 21571)
+#define PK_BODY_sweep_law_curve_c     (( PK_BODY_sweep_law_type_t ) 21572)
+#define PK_BODY_sweep_law_curve_inv_c (( PK_BODY_sweep_law_type_t ) 21573)
+
+/* PK_BODY_sweep_fault_t */
+
+#define PK_BODY_sweep_ok_c               (( PK_BODY_sweep_fault_t ) 21580)
+#define PK_BODY_sweep_failure_c          (( PK_BODY_sweep_fault_t ) 21581)
+#define PK_BODY_sweep_bad_path_c         (( PK_BODY_sweep_fault_t ) 21582)
+#define PK_BODY_sweep_bad_profile_c      (( PK_BODY_sweep_fault_t ) 21583)
+#define PK_BODY_sweep_surf_failure_c     (( PK_BODY_sweep_fault_t ) 21584)
+#define PK_BODY_sweep_curve_failure_c    (( PK_BODY_sweep_fault_t ) 21585)
+#define PK_BODY_sweep_check_failure_c    (( PK_BODY_sweep_fault_t ) 21586)
+#define PK_BODY_sweep_geom_self_int_c    (( PK_BODY_sweep_fault_t ) 21587)
+#define PK_BODY_sweep_topol_self_int_c   (( PK_BODY_sweep_fault_t ) 21588)
+#define PK_BODY_sweep_geom_degen_c       (( PK_BODY_sweep_fault_t ) 21589)
+#define PK_BODY_sweep_small_profile_c    (( PK_BODY_sweep_fault_t ) 21590)
+#define PK_BODY_sweep_bad_vertex_c       (( PK_BODY_sweep_fault_t ) 21591)
+#define PK_BODY_sweep_bad_lock_dir_c     (( PK_BODY_sweep_fault_t ) 21592)
+#define PK_BODY_sweep_non_c2_c           (( PK_BODY_sweep_fault_t ) 21593)
+#define PK_BODY_sweep_bad_guide_c        (( PK_BODY_sweep_fault_t ) 21594)
+#define PK_BODY_sweep_bad_match_c        (( PK_BODY_sweep_fault_t ) 21595)
+#define PK_BODY_sweep_bad_trim_point_c   (( PK_BODY_sweep_fault_t ) 21596)
+#define PK_BODY_sweep_non_g1_failure_c   (( PK_BODY_sweep_fault_t ) 21597)
+#define PK_BODY_sweep_repaired_c         (( PK_BODY_sweep_fault_t ) 21598)
+#define PK_BODY_sweep_bad_lock_face_c    (( PK_BODY_sweep_fault_t ) 21599)
+
+/* PK_boolean_report_t */
+
+#define PK_boolean_report_failure_c        ((PK_boolean_report_t) 21600)
+#define PK_boolean_report_opposed_sheets_c ((PK_boolean_report_t) 21601)
+#define PK_boolean_report_solid_has_void_c ((PK_boolean_report_t) 21602)
+#define PK_boolean_report_partial_coi_c    ((PK_boolean_report_t) 21603)
+#define PK_boolean_report_t_sheet_c        ((PK_boolean_report_t) 21604)
+#define PK_boolean_report_non_manifold_c   ((PK_boolean_report_t) 21605)
+#define PK_boolean_report_invalid_match_c  ((PK_boolean_report_t) 21606)
+#define PK_boolean_report_imprint_fail_c   ((PK_boolean_report_t) 21607)
+#define PK_boolean_report_intersect_fail_c ((PK_boolean_report_t) 21608)
+#define PK_boolean_report_invalid_face_c   ((PK_boolean_report_t) 21609)
+#define PK_boolean_report_inside_out_c     ((PK_boolean_report_t) 21610)
+
+/* PK_boolean_result_t */
+
+#define PK_boolean_result_success_c     ((PK_boolean_result_t) 21650)
+#define PK_boolean_result_no_clash_c    ((PK_boolean_result_t) 21651)
+#define PK_boolean_result_no_effect_c   ((PK_boolean_result_t) 21652)
+#define PK_boolean_result_failed_c      ((PK_boolean_result_t) 21653)
+#define PK_boolean_result_not_solid_c   ((PK_boolean_result_t) 21654)
+#define PK_boolean_result_is_tool_c     ((PK_boolean_result_t) 21655)
+#define PK_boolean_result_imprint_c     ((PK_boolean_result_t) 21656)
+
+/* PK_section_report_t */
+
+#define PK_section_report_failure_c        ((PK_section_report_t) 21700)
+#define PK_section_report_solid_has_void_c ((PK_section_report_t) 21701)
+#define PK_section_report_partial_coi_c    ((PK_section_report_t) 21702)
+#define PK_section_report_t_sheet_c        ((PK_section_report_t) 21703)
+#define PK_section_report_non_manifold_c   ((PK_section_report_t) 21704)
+#define PK_section_report_invalid_match_c  ((PK_section_report_t) 21705)
+#define PK_section_report_imprint_fail_c   ((PK_section_report_t) 21606)
+#define PK_section_report_intersect_fail_c ((PK_section_report_t) 21607)
+#define PK_section_report_invalid_face_c   ((PK_section_report_t) 21608)
+
+/* PK_section_result_t */
+
+#define PK_section_result_success_c     ((PK_section_result_t) 21750)
+#define PK_section_result_no_clash_c    ((PK_section_result_t) 21751)
+#define PK_section_result_no_effect_c   ((PK_section_result_t) 21752)
+#define PK_section_result_failed_c      ((PK_section_result_t) 21753)
+
+/* PK_blend_transfer_topol_t */
+
+#define PK_blend_transfer_topol_no_c     ((PK_blend_transfer_topol_t) 21770)
+#define PK_blend_transfer_topol_yes_c    ((PK_blend_transfer_topol_t) 21771)
+
+/* PK_local_check_fa_fa_t */
+
+#define PK_local_check_fa_fa_no_c    ((PK_local_check_fa_fa_t) 21780)
+#define PK_local_check_fa_fa_yes_c   ((PK_local_check_fa_fa_t) 21781)
+
+/* PK_boolean_check_fa_t */
+
+#define PK_boolean_check_fa_no_c        ((PK_boolean_check_fa_t) 21800)
+#define PK_boolean_check_fa_yes_c       ((PK_boolean_check_fa_t) 21801)
+
+/* PK_section_check_fa_t */
+
+#define PK_section_check_fa_no_c        ((PK_section_check_fa_t) 21810)
+#define PK_section_check_fa_yes_c       ((PK_section_check_fa_t) 21811)
+
+/* PK_render_ignore_t */
+
+#define PK_render_ignore_no_c          ((PK_render_ignore_t) 21820)
+#define PK_render_ignore_absolute_c    ((PK_render_ignore_t) 21821)
+#define PK_render_ignore_ratio_c       ((PK_render_ignore_t) 21822)
+#define PK_render_ignore_body_ratio_c  ((PK_render_ignore_t) 21823)
+
+/* PK_BODY_topology_t */
+
+#define PK_BODY_topology_minimal_c (( PK_BODY_topology_t ) 21830)
+#define PK_BODY_topology_columns_c (( PK_BODY_topology_t ) 21831)
+#define PK_BODY_topology_grid_c    (( PK_BODY_topology_t ) 21832)
+
+/* PK_step_surf_t */
+
+#define PK_step_tapered_c (( PK_step_surf_t ) 21840)
+#define PK_step_normal_c  (( PK_step_surf_t ) 21841)
+
+/* PK_taper_method_t */
+
+#define PK_taper_method_curve_c   (( PK_taper_method_t) 21845)
+#define PK_taper_method_surface_c (( PK_taper_method_t) 21846)
+#define PK_taper_method_isocline_c (( PK_taper_method_t) 21847)
+#define PK_taper_method_offset_c (( PK_taper_method_t) 21848)  /***offset_draft */
+#define PK_taper_method_normal_c  (( PK_taper_method_t) 21849)
+
+/* PK_bound_t */
+
+#define PK_bound_distance_c (( PK_bound_t ) 21850)
+#define PK_bound_sheet_c    (( PK_bound_t ) 21851)
+#define PK_bound_surf_c     (( PK_bound_t ) 21852)
+#define PK_bound_face_c     (( PK_bound_t ) 21853)
+#define PK_bound_body_c     (( PK_bound_t ) 21854)
+#define PK_bound_none_c     (( PK_bound_t ) 21855)
+
+/* PK_render_overlap_t */
+
+#define PK_render_overlap_no_c          ((PK_render_overlap_t) 21871)
+#define PK_render_overlap_yes_c         ((PK_render_overlap_t) 21872)
+#define PK_render_overlap_intersect_c   ((PK_render_overlap_t) 21873)
+#define PK_render_overlap_intsec_all_c  ((PK_render_overlap_t) 21874)
+#define PK_render_overlap_intsec_pair_c ((PK_render_overlap_t) 21875)
+
+/* PK_FACE_coi_t */
+
+#define PK_FACE_coi_yes_c            ((PK_FACE_coi_t) 21880)
+#define PK_FACE_coi_yes_reversed_c   ((PK_FACE_coi_t) 21881)
+#define PK_FACE_coi_no_topol_c       ((PK_FACE_coi_t) 21882)
+#define PK_FACE_coi_no_bound_1_c     ((PK_FACE_coi_t) 21883)
+#define PK_FACE_coi_no_bound_2_c     ((PK_FACE_coi_t) 21884)
+#define PK_FACE_coi_no_face_1_c      ((PK_FACE_coi_t) 21885)
+#define PK_FACE_coi_no_face_2_c      ((PK_FACE_coi_t) 21886)
+#define PK_FACE_coi_no_rubber_c      ((PK_FACE_coi_t) 21887)
+
+/* PK_DEBUG_global_res_t */
+
+#define PK_DEBUG_global_res_diffs_c     (( PK_DEBUG_global_res_t ) 21920)
+#define PK_DEBUG_global_res_no_diffs_c  (( PK_DEBUG_global_res_t ) 21921)
+
+/* PK_DEBUG_local_res_t */
+
+#define PK_DEBUG_local_res_diffs_c       (( PK_DEBUG_local_res_t ) 21930)
+#define PK_DEBUG_local_res_no_diffs_c    (( PK_DEBUG_local_res_t ) 21931)
+
+/* PK_DEBUG_diff_t */
+
+#define PK_DEBUG_diff_n_shells_c        (( PK_DEBUG_diff_t ) 21940)
+#define PK_DEBUG_diff_n_faces_c         (( PK_DEBUG_diff_t ) 21941)
+#define PK_DEBUG_diff_n_loops_c         (( PK_DEBUG_diff_t ) 21942)
+#define PK_DEBUG_diff_n_acc_edges_c     (( PK_DEBUG_diff_t ) 21943)
+#define PK_DEBUG_diff_n_tol_edges_c     (( PK_DEBUG_diff_t ) 21944)
+#define PK_DEBUG_diff_n_fins_c          (( PK_DEBUG_diff_t ) 21945)
+#define PK_DEBUG_diff_n_acc_vxs_c       (( PK_DEBUG_diff_t ) 21946)
+#define PK_DEBUG_diff_n_tol_vxs_c       (( PK_DEBUG_diff_t ) 21947)
+#define PK_DEBUG_diff_n_vxs_c           (( PK_DEBUG_diff_t ) 21948)
+#define PK_DEBUG_diff_n_cht_pts_c       (( PK_DEBUG_diff_t ) 21949)
+#define PK_DEBUG_diff_surf_dev_c        (( PK_DEBUG_diff_t ) 21950)
+#define PK_DEBUG_diff_curve_dev_c       (( PK_DEBUG_diff_t ) 21951)
+#define PK_DEBUG_diff_vx_dev_c          (( PK_DEBUG_diff_t ) 21952)
+#define PK_DEBUG_diff_surf_class_c      (( PK_DEBUG_diff_t ) 21953)
+#define PK_DEBUG_diff_curve_class_c     (( PK_DEBUG_diff_t ) 21954)
+#define PK_DEBUG_diff_edge_tol_c        (( PK_DEBUG_diff_t ) 21955)
+#define PK_DEBUG_diff_vx_tol_c          (( PK_DEBUG_diff_t ) 21956)
+#define PK_DEBUG_diff_face_sense_c      (( PK_DEBUG_diff_t ) 21957)
+#define PK_DEBUG_diff_surf_sense_c      (( PK_DEBUG_diff_t ) 21958)
+#define PK_DEBUG_diff_curve_sense_c     (( PK_DEBUG_diff_t ) 21959)
+#define PK_DEBUG_diff_vx_missing_c      (( PK_DEBUG_diff_t ) 21960)
+#define PK_DEBUG_diff_face_match_c      (( PK_DEBUG_diff_t ) 21961)
+#define PK_DEBUG_diff_fin_match_c       (( PK_DEBUG_diff_t ) 21962)
+#define PK_DEBUG_diff_vx_match_c        (( PK_DEBUG_diff_t ) 21963)
+
+/* PK_boolean_match_style_t */
+
+#define PK_boolean_match_style_basic_c  ((PK_boolean_match_style_t) 21990)
+#define PK_boolean_match_style_relax_c  ((PK_boolean_match_style_t) 21991)
+#define PK_boolean_match_style_auto_c   ((PK_boolean_match_style_t) 21992)
+
+/* PK_SURF_extend_status_t */
+
+#define PK_SURF_extend_ok_c              (( PK_SURF_extend_status_t ) 22010)
+#define PK_SURF_extend_unextended_c      (( PK_SURF_extend_status_t ) 22011)
+#define PK_SURF_extend_partial_c         (( PK_SURF_extend_status_t ) 22012)
+#define PK_SURF_extend_invalid_c         (( PK_SURF_extend_status_t ) 22013)
+#define PK_SURF_extend_failure_c         (( PK_SURF_extend_status_t ) 22014)
+
+/* PK_SURF_extension_t */
+
+#define PK_SURF_extension_none_c        (( PK_SURF_extension_t ) 22030)
+#define PK_SURF_extension_point_c       (( PK_SURF_extension_t ) 22031)
+#define PK_SURF_extension_box_c         (( PK_SURF_extension_t ) 22032)
+#define PK_SURF_extension_uvbox_c       (( PK_SURF_extension_t ) 22033)
+#define PK_SURF_extension_ratio_c       (( PK_SURF_extension_t ) 22034)
+
+/* PK_thicken_method_t */
+
+#define PK_thicken_method_offset_c   (( PK_thicken_method_t ) 22040 )
+#define PK_thicken_method_punch_c    (( PK_thicken_method_t ) 22041 )
+
+/* PK_ATTDEF_callback_type_t */
+
+#define PK_ATTDEF_callback_normal_c     (( PK_ATTDEF_callback_type_t ) 22050)
+#define PK_ATTDEF_callback_read_only_c  (( PK_ATTDEF_callback_type_t ) 22051)
+
+/* PK_FACE_change_type_t */
+
+#define PK_FACE_change_type_none_c       ((PK_FACE_change_type_t) 22060)
+#define PK_FACE_change_type_offset_c     ((PK_FACE_change_type_t) 22061)
+#define PK_FACE_change_type_taper_c      ((PK_FACE_change_type_t) 22062)
+#define PK_FACE_change_type_transform_c  ((PK_FACE_change_type_t) 22063)
+#define PK_FACE_change_type_replace_c    ((PK_FACE_change_type_t) 22064)
+#define PK_FACE_change_type_blend_c      ((PK_FACE_change_type_t) 22065)
+#define PK_FACE_change_type_bend_c       ((PK_FACE_change_type_t) 22066)
+#define PK_FACE_change_type_patch_c      ((PK_FACE_change_type_t) 22067)
+#define PK_FACE_change_type_deform_c     ((PK_FACE_change_type_t) 22068)
+
+/* PK_PARAM_direction_t */
+
+#define PK_PARAM_direction_u_c   ((PK_PARAM_direction_t) 22070)
+#define PK_PARAM_direction_v_c   ((PK_PARAM_direction_t) 22071)
+
+/* PK_fill_hole_fault_t */
+
+#define PK_fill_hole_ok_c                (( PK_fill_hole_fault_t ) 22080)
+#define PK_fill_hole_bad_edge_c          (( PK_fill_hole_fault_t ) 22081)
+#define PK_fill_hole_duplicate_c         (( PK_fill_hole_fault_t ) 22082)
+#define PK_fill_hole_vertex_c            (( PK_fill_hole_fault_t ) 22083)
+#define PK_fill_hole_too_many_loops_c    (( PK_fill_hole_fault_t ) 22084)
+#define PK_fill_hole_gap_c               (( PK_fill_hole_fault_t ) 22085)
+#define PK_fill_hole_no_edge_on_target_c (( PK_fill_hole_fault_t ) 22086)
+#define PK_fill_hole_cant_match_body_c   (( PK_fill_hole_fault_t ) 22087)
+#define PK_fill_hole_cant_match_edge_c   (( PK_fill_hole_fault_t ) 22088)
+#define PK_fill_hole_too_small_c         (( PK_fill_hole_fault_t ) 22089)
+#define PK_fill_hole_unknown_c           (( PK_fill_hole_fault_t ) 22090)
+#define PK_fill_hole_face_c              (( PK_fill_hole_fault_t ) 22091)
+#define PK_fill_hole_face_face_c         (( PK_fill_hole_fault_t ) 22092)
+#define PK_fill_hole_not_smooth_c        (( PK_fill_hole_fault_t ) 22093)
+#define PK_fill_hole_too_complex_c       (( PK_fill_hole_fault_t ) 22094)
+#define PK_fill_hole_didnt_converge_c    (( PK_fill_hole_fault_t ) 22095)
+#define PK_fill_hole_supp_not_smooth_c   (( PK_fill_hole_fault_t ) 22096)
+
+/* PK_fill_hole_method_t */
+
+#define PK_fill_hole_trim_to_hole_c      ((PK_fill_hole_method_t) 22100)
+#define PK_fill_hole_trim_to_sheet_c     ((PK_fill_hole_method_t) 22101)
+#define PK_fill_hole_create_patch_c      ((PK_fill_hole_method_t) 22102)
+#define PK_fill_hole_extend_adjacent_c   ((PK_fill_hole_method_t) 22103)
+
+/* PK_facet_ignore_t        (22111-22114) allocated */
+
+#define PK_facet_ignore_no_c               ((PK_facet_ignore_t) 22111)
+#define PK_facet_ignore_absolute_c         ((PK_facet_ignore_t) 22112)
+#define PK_facet_ignore_ratio_c            ((PK_facet_ignore_t) 22113)
+#define PK_facet_ignore_body_ratio_c       ((PK_facet_ignore_t) 22114)
+
+/* PK_CURVE_approx_t */
+
+#define PK_CURVE_approx_arclength_c   ((PK_CURVE_approx_t) 22120)
+#define PK_CURVE_approx_even_c        ((PK_CURVE_approx_t) 22129)
+
+/* PK_facet_ignore_scope_t  (22130-22131) allocated */
+
+#define PK_facet_ignore_scope_local_c      ((PK_facet_ignore_scope_t) 22130)
+#define PK_facet_ignore_scope_global_c     ((PK_facet_ignore_scope_t) 22131)
+
+/* PK_facet_wire_edges_t    (22140-22141) allocated */
+
+#define PK_facet_wire_edges_no_c               ((PK_facet_wire_edges_t) 22140)
+#define PK_facet_wire_edges_yes_c              ((PK_facet_wire_edges_t) 22141)
+
+/* PK_offset_method_t */
+
+#define PK_offset_method_sx_trim_c       (( PK_offset_method_t ) 22150 )
+#define PK_offset_method_sx_repair_1_c   (( PK_offset_method_t ) 22151 )
+#define PK_offset_method_sx_repair_2_c   (( PK_offset_method_t ) 22152 )
+
+#define PK_offset_method_accurate_c      (( PK_offset_method_t ) 22150 )
+#define PK_offset_method_approximate_c   (( PK_offset_method_t ) 22151 )
+
+/* PK_render_memory_target_t */
+
+#define PK_render_memory_target_no_c     (( PK_render_memory_target_t ) 22160 )
+#define PK_render_memory_target_yes_c    (( PK_render_memory_target_t ) 22161 )
+
+/* PK_outline_project_t */
+
+#define PK_outline_project_no_c      (( PK_outline_project_t ) 22170 )
+#define PK_outline_project_plane_c   (( PK_outline_project_t ) 22171 )
+
+/* PK_pick_approximate_t */
+
+#define PK_pick_approximate_no_c   (( PK_pick_approximate_t ) 22180 )
+#define PK_pick_approximate_yes_c  (( PK_pick_approximate_t ) 22181 )
+
+/* PK_blend_edge_update_t */
+
+#define PK_blend_edge_update_0_c        ((PK_blend_edge_update_t) 22190)
+#define PK_blend_edge_update_1_c        ((PK_blend_edge_update_t) 22191)
+#define PK_blend_edge_update_2_c        ((PK_blend_edge_update_t) 22193)
+#define PK_blend_edge_update_3_c        ((PK_blend_edge_update_t) 22194)
+#define PK_blend_edge_update_4_c        ((PK_blend_edge_update_t) 22195)
+#define PK_blend_edge_update_5_c        ((PK_blend_edge_update_t) 22196)
+#define PK_blend_edge_update_6_c        ((PK_blend_edge_update_t) 22197)
+#define PK_blend_edge_update_7_c        ((PK_blend_edge_update_t) 22198)
+#define PK_blend_edge_update_8_c        ((PK_blend_edge_update_t) 22199)
+#define PK_blend_edge_update_9_c        ((PK_blend_edge_update_t) 23810)
+#define PK_blend_edge_update_10_c       ((PK_blend_edge_update_t) 23811)
+#define PK_blend_edge_update_11_c       ((PK_blend_edge_update_t) 23812)
+#define PK_blend_edge_update_12_c       ((PK_blend_edge_update_t) 23813)
+#define PK_blend_edge_update_13_c       ((PK_blend_edge_update_t) 23814)
+#define PK_blend_edge_update_14_c       ((PK_blend_edge_update_t) 23815)
+#define PK_blend_edge_update_15_c       ((PK_blend_edge_update_t) 23816)
+#define PK_blend_edge_update_16_c       ((PK_blend_edge_update_t) 23817)
+#define PK_blend_edge_update_17_c       ((PK_blend_edge_update_t) 23818)
+#define PK_blend_edge_update_18_c       ((PK_blend_edge_update_t) 23819)
+#define PK_blend_edge_update_19_c       ((PK_blend_edge_update_t) 23820)
+#define PK_blend_edge_update_20_c       ((PK_blend_edge_update_t) 23821)
+#define PK_blend_edge_update_default_c  ((PK_blend_edge_update_t) 22192)
+
+/* PK_blend_xs_shape_t */
+
+#define PK_blend_xs_shape_unset_c           ((PK_blend_xs_shape_t) 22200)
+#define PK_blend_xs_shape_conic_c           ((PK_blend_xs_shape_t) 22201)
+#define PK_blend_xs_shape_g2_c              ((PK_blend_xs_shape_t) 22202)
+#define PK_blend_xs_shape_chamfer_c         ((PK_blend_xs_shape_t) 22203)
+
+
+/* PK_BODY_sweep_fair_t */
+
+#define PK_BODY_sweep_fair_no_c             (( PK_BODY_sweep_fair_t ) 22210 )
+#define PK_BODY_sweep_fair_twist_c          (( PK_BODY_sweep_fair_t ) 22211 )
+#define PK_BODY_sweep_fair_twist_2_c        (( PK_BODY_sweep_fair_t ) 22212 )
+#define PK_BODY_sweep_fair_default_c        (( PK_BODY_sweep_fair_t ) 22213 )
+
+/* PK_comparison_t */
+
+#define PK_comparison_always_c         ((PK_comparison_t) 22220)
+#define PK_comparison_less_c           ((PK_comparison_t) 22221)
+#define PK_comparison_equal_c          ((PK_comparison_t) 22222)
+#define PK_comparison_greater_c        ((PK_comparison_t) 22223)
+#define PK_comparison_between_c        ((PK_comparison_t) 22224)
+#define PK_comparison_outside_c        ((PK_comparison_t) 22225)
+#define PK_comparison_never_c          ((PK_comparison_t) 22226)
+
+/* PK_blend_identify_t */
+
+#define PK_blend_identify_within_c           ((PK_blend_identify_t) 22240)
+#define PK_blend_identify_exc_chain_c        ((PK_blend_identify_t) 22241)
+#define PK_blend_identify_inc_chain_c        ((PK_blend_identify_t) 22242)
+#define PK_blend_identify_max_chain_c        ((PK_blend_identify_t) 22243)
+#define PK_blend_identify_dependent_c        ((PK_blend_identify_t) 22244)
+
+/* PK_detail_t */
+
+#define PK_detail_any_c                 ((PK_detail_t) 22250)
+#define PK_detail_rubber_c              ((PK_detail_t) 22251)
+#define PK_detail_hole_cyl_c            ((PK_detail_t) 22252)
+#define PK_detail_hole_cyl_through_c    ((PK_detail_t) 22253)
+#define PK_detail_hole_cyl_blind_c      ((PK_detail_t) 22254)
+#define PK_detail_hole_cyl_closed_c     ((PK_detail_t) 22255)
+#define PK_detail_blend_rb_const_r_c    ((PK_detail_t) 22256)
+
+/* PK_replace_merge_t */
+
+#define PK_replace_merge_no_c      ((PK_replace_merge_t) 22300)
+#define PK_replace_merge_in_c      ((PK_replace_merge_t) 22301)
+#define PK_replace_merge_out_c     ((PK_replace_merge_t) 22302)
+
+/* PK_offset_step_t */
+
+#define PK_offset_step_no_c         (( PK_offset_step_t ) 22310 )
+#define PK_offset_step_pierce_c     (( PK_offset_step_t ) 22311 )
+#define PK_offset_step_yes_c        ( PK_offset_step_pierce_c )
+#define PK_offset_step_all_c        (( PK_offset_step_t ) 22312 )
+#define PK_offset_step_site_c       (( PK_offset_step_t ) 22313 )
+
+/* PK_blend_orientation_t */
+
+#define PK_blend_orientation_before_c   (( PK_blend_orientation_t ) 22320 )
+#define PK_blend_orientation_behind_c   (( PK_blend_orientation_t ) 22321 )
+#define PK_blend_orientation_unknown_c  (( PK_blend_orientation_t ) 22322 )
+
+/* PK_3_face_blend_t */
+
+#define PK_3_face_blend_ok_c              (( PK_3_face_blend_t ) 22330 )
+#define PK_3_face_blend_sheet_c           (( PK_3_face_blend_t ) 22331 )
+#define PK_3_face_blend_fail_c            (( PK_3_face_blend_t ) 22332 )
+#define PK_3_face_blend_bad_guide_c       (( PK_3_face_blend_t ) 22333 )
+#define PK_3_face_blend_bad_wall_c        (( PK_3_face_blend_t ) 22334 )
+#define PK_3_face_blend_bad_orient_c      (( PK_3_face_blend_t ) 22335 )
+#define PK_3_face_blend_unoriented_c      (( PK_3_face_blend_t ) 22336 )
+#define PK_3_face_blend_bad_blend_tol_c   (( PK_3_face_blend_t ) 22337 )
+#define PK_3_face_blend_bad_prop_tol_c    (( PK_3_face_blend_t ) 22338 )
+#define PK_3_face_blend_sheet_clash_c     (( PK_3_face_blend_t ) 22339 )
+#define PK_3_face_blend_wall_clash_c      (( PK_3_face_blend_t ) 22340 )
+#define PK_3_face_blend_face_face_c       (( PK_3_face_blend_t ) 22341 )
+#define PK_3_face_blend_self_int_c        (( PK_3_face_blend_t ) 22342 )
+#define PK_3_face_blend_inconsistent_c    (( PK_3_face_blend_t ) 22343 )
+#define PK_3_face_blend_plane_origin_c    (( PK_3_face_blend_t ) 22344 )
+#define PK_3_face_blend_plane_insuff_c    (( PK_3_face_blend_t ) 22345 )
+#define PK_3_face_blend_bad_help_c        (( PK_3_face_blend_t ) 22346 )
+
+/* PK_FACE_simplify_t */
+
+#define PK_FACE_simplify_adj_blends_c       (( PK_FACE_simplify_t ) 22360)
+#define PK_FACE_simplify_no_c               (( PK_FACE_simplify_t ) 22361)
+
+/* PK_blend_convexity_t */
+
+#define PK_blend_convexity_any_c        (( PK_blend_convexity_t ) 8600)
+#define PK_blend_convexity_concave_c    (( PK_blend_convexity_t ) 8603)
+#define PK_blend_convexity_convex_c     (( PK_blend_convexity_t ) 8602)
+
+/* PK_fill_hole_preference_t */
+
+#define PK_fill_hole_smooth_c       ((PK_fill_hole_preference_t) 22370)
+#define PK_fill_hole_prefer_plane_c ((PK_fill_hole_preference_t) 22371)
+#define PK_fill_hole_plane_only_c   ((PK_fill_hole_preference_t) 22372)
+#define PK_fill_hole_non_smooth_c   ((PK_fill_hole_preference_t) 22373)
+
+/* PK_blend_set_tol_t */
+
+#define PK_blend_set_tol_yes_c      ((PK_blend_set_tol_t) 22380)
+#define PK_blend_set_tol_no_c       ((PK_blend_set_tol_t) 22381)
+
+/* PK_hole_blended_t */
+
+#define PK_hole_blended_no_c            ((PK_hole_blended_t) 22390)
+#define PK_hole_blended_in_c            ((PK_hole_blended_t) 22391)
+#define PK_hole_blended_out_c           ((PK_hole_blended_t) 22392)
+#define PK_hole_blended_trimmed_in_c    ((PK_hole_blended_t) 22393)
+#define PK_hole_blended_trimmed_out_c   ((PK_hole_blended_t) 22394)
+
+/* PK_taper_corner_type_t */
+
+#define PK_taper_corner_extend_c    (( PK_taper_corner_type_t) 22400 )
+#define PK_taper_corner_plane_c     (( PK_taper_corner_type_t) 22401 )
+
+/* PK_VERTEX_optimise_result_t */
+
+#define PK_VERTEX_optimise_success_c      ((PK_VERTEX_optimise_result_t) 22410)
+#define PK_VERTEX_optimise_failure_c      ((PK_VERTEX_optimise_result_t) 22411)
+
+/* PK_VERTEX_max_dev_t */
+
+#define PK_VERTEX_max_dev_vertex_tol_c ((PK_VERTEX_max_dev_t) 22420)
+#define PK_VERTEX_max_dev_supplied_c   ((PK_VERTEX_max_dev_t) 22421)
+
+/* PK_taper_smooth_step_t */
+
+#define PK_taper_smooth_step_yes_c    (( PK_taper_smooth_step_t) 22430 )
+#define PK_taper_smooth_step_no_c     (( PK_taper_smooth_step_t) 22431 )
+
+/* PK_hole_update_t */
+
+#define PK_hole_update_0_c              ((PK_hole_update_t) 22440)
+#define PK_hole_update_default_c        ((PK_hole_update_t) 22441)
+
+/* PK_TOPOL_fctab_t (22450-22468) allocated */
+
+#define PK_TOPOL_fctab_facet_fin_c             ((PK_TOPOL_fctab_t) 22450)
+#define PK_TOPOL_fctab_strip_boundary_c        ((PK_TOPOL_fctab_t) 22451)
+#define PK_TOPOL_fctab_strip_zigzag_c          ((PK_TOPOL_fctab_t) 22452)
+#define PK_TOPOL_fctab_fin_fin_c               ((PK_TOPOL_fctab_t) 22453)
+#define PK_TOPOL_fctab_fin_data_c              ((PK_TOPOL_fctab_t) 22454)
+#define PK_TOPOL_fctab_data_point_c            ((PK_TOPOL_fctab_t) 22455)
+#define PK_TOPOL_fctab_data_normal_c           ((PK_TOPOL_fctab_t) 22456)
+#define PK_TOPOL_fctab_data_param_c            ((PK_TOPOL_fctab_t) 22457)
+#define PK_TOPOL_fctab_data_deriv_c            ((PK_TOPOL_fctab_t) 22458)
+#define PK_TOPOL_fctab_point_vec_c             ((PK_TOPOL_fctab_t) 22459)
+#define PK_TOPOL_fctab_normal_vec_c            ((PK_TOPOL_fctab_t) 22460)
+#define PK_TOPOL_fctab_param_uv_c              ((PK_TOPOL_fctab_t) 22461)
+#define PK_TOPOL_fctab_deriv_dp_c              ((PK_TOPOL_fctab_t) 22462)
+#define PK_TOPOL_fctab_deriv_d2p_c             ((PK_TOPOL_fctab_t) 22463)
+#define PK_TOPOL_fctab_facet_face_c            ((PK_TOPOL_fctab_t) 22464)
+#define PK_TOPOL_fctab_strip_face_c            ((PK_TOPOL_fctab_t) 22465)
+#define PK_TOPOL_fctab_fin_edge_c              ((PK_TOPOL_fctab_t) 22466)
+#define PK_TOPOL_fctab_error_object_c          ((PK_TOPOL_fctab_t) 22467)
+#define PK_TOPOL_fctab_point_topol_c           ((PK_TOPOL_fctab_t) 22468)
+#define PK_TOPOL_fctab_fin_topol_c             ((PK_TOPOL_fctab_t) 22469)
+
+/* PK_facet_split_strip_t (22500-22501) allocated */
+
+#define PK_facet_split_strip_no_c       ((PK_facet_split_strip_t) 22500)
+#define PK_facet_split_strip_yes_c      ((PK_facet_split_strip_t) 22501)
+
+/* PK_facet_consistent_parms_t (22510-22512) allocated */
+
+#define PK_facet_consistent_parms_no_c  ((PK_facet_consistent_parms_t) 22510)
+#define PK_facet_consistent_parms_su_c  ((PK_facet_consistent_parms_t) 22511)
+#define PK_facet_consistent_parms_yes_c (PK_facet_consistent_parms_su_c)
+#define PK_facet_consistent_parms_fa_c  ((PK_facet_consistent_parms_t) 22512)
+
+/* PK_BODY_loft_update_t */
+
+#define PK_BODY_loft_update_0_c          ((PK_BODY_loft_update_t) 22520)
+#define PK_BODY_loft_update_1_c          ((PK_BODY_loft_update_t) 22521)
+#define PK_BODY_loft_update_2_c          ((PK_BODY_loft_update_t) 22522)
+#define PK_BODY_loft_update_default_c    ((PK_BODY_loft_update_t) 22523)
+#define PK_BODY_loft_update_3_c          ((PK_BODY_loft_update_t) 22524)
+#define PK_BODY_loft_update_4_c          ((PK_BODY_loft_update_t) 22525)
+
+/* PK_taper_miter_type_t */
+
+#define PK_taper_miter_on_ref_c         ((PK_taper_miter_type_t) 22530)
+#define PK_taper_miter_to_face_c        ((PK_taper_miter_type_t) 22531)
+#define PK_taper_miter_at_open_c        ((PK_taper_miter_type_t) 22532)
+
+/* PK_BODY_sweep_scale_type_t */
+
+#define PK_BODY_sweep_scale_posn_c      ((PK_BODY_sweep_scale_type_t) 22540)
+#define PK_BODY_sweep_scale_size_c      ((PK_BODY_sweep_scale_type_t) 22541)
+#define PK_BODY_sweep_scale_both_c      ((PK_BODY_sweep_scale_type_t) 22542)
+
+/* PK_facet_vx_data_type_t (22550-22555) allocated */
+
+#define PK_facet_vx_data_ordinary_c     ((PK_facet_vx_data_type_t) 22550)
+#define PK_facet_vx_data_mixed_c        ((PK_facet_vx_data_type_t) 22551)
+#define PK_facet_vx_data_spike_c        ((PK_facet_vx_data_type_t) 22552)
+#define PK_facet_vx_data_fin_c          ((PK_facet_vx_data_type_t) 22553)
+#define PK_facet_vx_data_start_spike_c  ((PK_facet_vx_data_type_t) 22554)
+#define PK_facet_vx_data_end_spike_c    ((PK_facet_vx_data_type_t) 22555)
+
+/* PK_facet_incr_t (22560-22563) allocated */
+
+#define PK_facet_incr_no_c              ((PK_facet_incr_t) 22560)
+#define PK_facet_incr_clear_c           ((PK_facet_incr_t) 22561)
+#define PK_facet_incr_refresh_c         ((PK_facet_incr_t) 22562)
+#define PK_facet_incr_yes_c             ((PK_facet_incr_t) 22563)
+
+/* PK_facet_incr_refine_t (22570-22571) allocated */
+
+#define PK_facet_incr_refine_no_c       ((PK_facet_incr_refine_t) 22570)
+#define PK_facet_incr_refine_yes_c      ((PK_facet_incr_refine_t) 22571)
+
+/* PK_facet_incr_report_t (22580-22583) allocated */
+
+#define PK_facet_incr_report_no_c       ((PK_facet_incr_report_t) 22580)
+#define PK_facet_incr_report_missing_c  ((PK_facet_incr_report_t) 22581)
+#define PK_facet_incr_report_refine_c   ((PK_facet_incr_report_t) 22582)
+#define PK_facet_incr_report_yes_c      ((PK_facet_incr_report_t) 22583)
+
+/* PK_hole_const_rad_t */
+
+#define PK_hole_const_rad_no_c          ((PK_hole_const_rad_t) 22590)
+#define PK_hole_const_rad_yes_c         ((PK_hole_const_rad_t) 22591)
+
+/* PK_hole_ortho_t */
+
+#define PK_hole_ortho_no_c              ((PK_hole_ortho_t) 22600)
+#define PK_hole_ortho_yes_c             ((PK_hole_ortho_t) 22601)
+
+/* PK_fill_hole_update_t */
+
+#define PK_fill_hole_update_0_c       (( PK_fill_hole_update_t) 22610 )
+#define PK_fill_hole_update_1_c       (( PK_fill_hole_update_t) 22611 )
+#define PK_fill_hole_update_2_c       (( PK_fill_hole_update_t) 22612 )
+#define PK_fill_hole_update_3_c       (( PK_fill_hole_update_t) 22613 )
+#define PK_fill_hole_update_4_c       (( PK_fill_hole_update_t) 22614 )
+#define PK_fill_hole_update_default_c (( PK_fill_hole_update_t) 22615 )
+#define PK_fill_hole_update_5_c       (( PK_fill_hole_update_t) 22616 )
+#define PK_fill_hole_update_6_c       (( PK_fill_hole_update_t) 22617 )
+#define PK_fill_hole_update_7_c       (( PK_fill_hole_update_t) 22618 )
+#define PK_fill_hole_update_8_c       (( PK_fill_hole_update_t) 22619 )
+#define PK_fill_hole_update_9_c       (( PK_fill_hole_update_t) 25330 )
+#define PK_fill_hole_update_10_c      (( PK_fill_hole_update_t) 25331 )
+#define PK_fill_hole_update_11_c      (( PK_fill_hole_update_t) 25332 )
+
+/* PK_FACE_change_bend_type_t */
+
+#define PK_FACE_change_bend_c           ((PK_FACE_change_bend_type_t) 22620)
+#define PK_FACE_change_bend_side_c      ((PK_FACE_change_bend_type_t) 22621)
+
+/* PK_bend_merge_t */
+
+#define PK_bend_merge_no_c      ((PK_bend_merge_t) 22630)
+#define PK_bend_merge_in_c      ((PK_bend_merge_t) 22631)
+#define PK_bend_merge_out_c     ((PK_bend_merge_t) 22632)
+
+/* PK_EDGE_offset_blend_t */
+
+#define PK_EDGE_offset_blend_no_c           ((PK_EDGE_offset_blend_t) 22640)
+#define PK_EDGE_offset_blend_convex_c       ((PK_EDGE_offset_blend_t) 22641)
+
+/* PK_replace_adjust_t */
+
+#define PK_replace_adjust_no_c          ((PK_replace_adjust_t) 22650)
+#define PK_replace_adjust_yes_c         ((PK_replace_adjust_t) 22651)
+
+/* PK_replace_use_t */
+
+#define PK_replace_use_attempt_c          ((PK_replace_use_t) 22660)
+#define PK_replace_use_yes_c              ((PK_replace_use_t) 22661)
+#define PK_replace_use_existing_c         ((PK_replace_use_t) 22662)
+
+/* PK_hole_comp_t */
+
+#define PK_hole_comp_cyl_c              ((PK_hole_comp_t) 22670)
+#define PK_hole_comp_cone_in_c          ((PK_hole_comp_t) 22671)
+#define PK_hole_comp_cone_out_c         ((PK_hole_comp_t) 22672)
+#define PK_hole_comp_blnd_in_concave_c  ((PK_hole_comp_t) 22673)
+#define PK_hole_comp_blnd_out_concave_c ((PK_hole_comp_t) 22674)
+#define PK_hole_comp_blnd_in_convex_c   ((PK_hole_comp_t) 22675)
+#define PK_hole_comp_blnd_out_convex_c  ((PK_hole_comp_t) 22676)
+#define PK_hole_comp_zero_depth_in_c    ((PK_hole_comp_t) 22677)
+#define PK_hole_comp_zero_depth_out_c   ((PK_hole_comp_t) 22678)
+#define PK_hole_comp_open_end_c         ((PK_hole_comp_t) 22679)
+#define PK_hole_comp_closed_end_c       ((PK_hole_comp_t) 22680)
+#define PK_hole_comp_unknown_c          ((PK_hole_comp_t) 22681)
+
+/* PK_detail_type_t */
+
+#define PK_detail_type_unknown_c        ((PK_detail_type_t) 22690)
+#define PK_detail_type_hole_c           ((PK_detail_type_t) 22691)
+
+/* PK_blend_repair_su_X_t */
+
+#define PK_blend_repair_su_X_no_c         ((PK_blend_repair_su_X_t) 22710)
+#define PK_blend_repair_su_X_yes_c        ((PK_blend_repair_su_X_t) 22711)
+#define PK_blend_repair_su_X_report_c     ((PK_blend_repair_su_X_t) 22712)
+
+/* PK_blend_output_sheet_t */
+
+#define PK_blend_output_sheet_no_c      ((PK_blend_output_sheet_t) 22720)
+#define PK_blend_output_sheet_yes_c     ((PK_blend_output_sheet_t) 22721)
+#define PK_blend_output_sheet_on_fail_c ((PK_blend_output_sheet_t) 22722)
+
+/* PK_local_ops_update_t */
+
+#define PK_local_ops_update_0_c         ((PK_local_ops_update_t) 22730)
+#define PK_local_ops_update_1_c         ((PK_local_ops_update_t) 23320)
+#define PK_local_ops_update_2_c         ((PK_local_ops_update_t) 23720)
+#define PK_local_ops_update_3_c         ((PK_local_ops_update_t) 24331)
+#define PK_local_ops_update_4_c         ((PK_local_ops_update_t) 24332)
+#define PK_local_ops_update_5_c         ((PK_local_ops_update_t) 24333)
+#define PK_local_ops_update_6_c         ((PK_local_ops_update_t) 24334)
+#define PK_local_ops_update_7_c         ((PK_local_ops_update_t) 24335)
+#define PK_local_ops_update_8_c         ((PK_local_ops_update_t) 24336)
+#define PK_local_ops_update_9_c         ((PK_local_ops_update_t) 24337)
+#define PK_local_ops_update_10_c        ((PK_local_ops_update_t) 24338)
+#define PK_local_ops_update_11_c        ((PK_local_ops_update_t) 24339)
+#define PK_local_ops_update_12_c        ((PK_local_ops_update_t) 25540)
+#define PK_local_ops_update_default_c   ((PK_local_ops_update_t) 24330)
+
+/* PK_replace_update_t */
+
+#define PK_replace_update_0_c          ((PK_replace_update_t) 22730)
+#define PK_replace_update_default_c    ((PK_replace_update_t) 22731)
+
+/* PK_fill_hole_topol_t */
+
+#define PK_fill_hole_topol_multiple_c   ((PK_fill_hole_topol_t) 22740)
+#define PK_fill_hole_topol_minimal_c    ((PK_fill_hole_topol_t) 22741)
+#define PK_fill_hole_topol_single_c     ((PK_fill_hole_topol_t) 22742)
+
+/* PK_extension_shape_t */
+
+#define PK_extension_shape_linear_c       ((PK_extension_shape_t) 22750)
+#define PK_extension_shape_soft_c         ((PK_extension_shape_t) 22751)
+#define PK_extension_shape_reflective_c   ((PK_extension_shape_t) 22752)
+#define PK_extension_shape_natural_c      ((PK_extension_shape_t) 22753)
+#define PK_extension_shape_arc_c          ((PK_extension_shape_t) 22754)
+
+/* PK_BODY_extension_t */
+
+#define PK_BODY_extension_distance_c ((PK_BODY_extension_t) 22760)
+#define PK_BODY_extension_target_c   ((PK_BODY_extension_t) 22761)
+
+/* PK_BODY_loft_deriv_mag_t */
+
+#define PK_BODY_loft_deriv_mag_single_c    ((PK_BODY_loft_deriv_mag_t) 22770)
+#define PK_BODY_loft_deriv_mag_smooth_c    ((PK_BODY_loft_deriv_mag_t) 22771)
+
+/* PK_imprint_complete_t */
+
+#define PK_imprint_complete_no_c      (( PK_imprint_complete_t ) 22780)
+#define PK_imprint_complete_edge_c    (( PK_imprint_complete_t ) 22781)
+#define PK_imprint_complete_laminar_c (( PK_imprint_complete_t ) 22782)
+#define PK_imprint_complete_faceset_c (( PK_imprint_complete_t ) 22783)
+
+/* PK_imprint_extend_t */
+
+#define PK_imprint_extend_tangent_c     (( PK_imprint_extend_t ) 22790)
+#define PK_imprint_extend_orth_fwd_c    (( PK_imprint_extend_t ) 22791)
+#define PK_imprint_extend_orth_back_c   (( PK_imprint_extend_t ) 22792)
+
+/* PK_facet_inflect_t */
+
+#define PK_facet_inflect_no_c           (( PK_facet_inflect_t ) 22800)
+#define PK_facet_inflect_split_near_c   (( PK_facet_inflect_t ) 22801)
+
+/* PK_imprint_connect_t */
+
+#define PK_imprint_connect_none_c       (( PK_imprint_connect_t ) 22810)
+#define PK_imprint_connect_side_c       (( PK_imprint_connect_t ) 22811)
+#define PK_imprint_connect_all_c        (( PK_imprint_connect_t ) 22812)
+#define PK_imprint_connect_side_all_c   (( PK_imprint_connect_t ) 22813)
+#define PK_imprint_connect_hidden_all_c (( PK_imprint_connect_t ) 22814)
+
+/* PK_range_type_t */
+
+#define PK_range_type_minimum_c        (( PK_range_type_t ) 22820)
+#define PK_range_type_maximum_c        (( PK_range_type_t ) 22821)
+
+/* PK_boolean_material_t */
+
+#define PK_boolean_material_none_c      ((PK_boolean_material_t) 22830)
+#define PK_boolean_material_inside_c    ((PK_boolean_material_t) 22831)
+#define PK_boolean_material_default_c   ((PK_boolean_material_t) 22832)
+#define PK_boolean_material_outside_c   ((PK_boolean_material_t) 22833)
+
+/* PK_DEBUG_roll_direction_t */
+
+#define PK_DEBUG_roll_no_c         (( PK_DEBUG_roll_direction_t ) 22840)
+#define PK_DEBUG_roll_back_main_c  (( PK_DEBUG_roll_direction_t ) 22841)
+#define PK_DEBUG_roll_back_c       (( PK_DEBUG_roll_direction_t ) 22842)
+#define PK_DEBUG_roll_fwd_c        (( PK_DEBUG_roll_direction_t ) 22843)
+#define PK_DEBUG_roll_both_c       (( PK_DEBUG_roll_direction_t ) 22844)
+
+/* PK_blend_rho_t */
+
+#define PK_blend_rho_absolute_c         ((PK_blend_rho_t) 22850)
+#define PK_blend_rho_relative_c         ((PK_blend_rho_t) 22851)
+#define PK_blend_rho_centre_c           ((PK_blend_rho_t) 22852)
+
+/* PK_taper_undercut_t */
+
+#define PK_taper_undercut_ref_no_c      ((PK_taper_undercut_t) 22860)
+#define PK_taper_undercut_ref_yes_c     ((PK_taper_undercut_t) 22861)
+
+/* PK_EDGE_optimise_result_t */
+
+#define PK_EDGE_optimise_success_c      ((PK_EDGE_optimise_result_t) 22870)
+#define PK_EDGE_optimise_failure_c      ((PK_EDGE_optimise_result_t) 22871)
+
+/* PK_EDGE_max_dev_t */
+
+#define PK_EDGE_max_dev_edge_tol_c   ((PK_EDGE_max_dev_t) 22880)
+#define PK_EDGE_max_dev_supplied_c   ((PK_EDGE_max_dev_t) 22881)
+
+/* PK_check_state_t */
+
+#define PK_SESSION_state_corrupt_c      ((PK_check_state_t) 22890)
+#define PK_BB_state_corrupt_c           ((PK_check_state_t) 22891)
+#define PK_KI_LIST_state_corrupt_c      ((PK_check_state_t) 22892)
+#define PK_GEOM_state_corrupt_c         ((PK_check_state_t) 22893)
+#define PK_TRANSF_state_corrupt_c       ((PK_check_state_t) 22894)
+#define PK_ASSEMBLY_state_corrupt_c     ((PK_check_state_t) 22895)
+#define PK_PARTITION_state_corrupt_c    ((PK_check_state_t) 22896)
+#define PK_PARTITION_state_xref_c       ((PK_check_state_t) 22897)
+#define PK_ITEM_state_unattached_c      ((PK_check_state_t) 22898)
+#define PK_BCURVE_state_close_knots_c   ((PK_check_state_t) 22899)
+#define PK_BSURF_state_close_u_knots_c  ((PK_check_state_t) 22900)
+#define PK_BSURF_state_close_v_knots_c  ((PK_check_state_t) 22901)
+#define PK_EDGE_state_touch_edge_c      ((PK_check_state_t) 22902)
+#define PK_TOPOL_state_bad_closed_c     ((PK_check_state_t) 22903)
+#define PK_TOPOL_state_u_parm_degen_c   ((PK_check_state_t) 22904)
+#define PK_TOPOL_state_v_parm_degen_c   ((PK_check_state_t) 22905)
+#define PK_TOPOL_state_parm_degen_c     ((PK_check_state_t) 22906)
+#define PK_TOPOL_state_u_phys_degen_c   ((PK_check_state_t) 22907)
+#define PK_TOPOL_state_v_phys_degen_c   ((PK_check_state_t) 22908)
+#define PK_TOPOL_state_phys_degen_c     ((PK_check_state_t) 22909)
+
+/* PK_extension_smoothness_t */
+
+#define PK_extension_smoothness_g0_c ((PK_extension_smoothness_t) 22910)
+#define PK_extension_smoothness_g1_c ((PK_extension_smoothness_t) 22911)
+
+/* PK_boolean_prefer_t */
+
+#define PK_boolean_prefer_solid_c         ((PK_boolean_prefer_t) 22920)
+#define PK_boolean_prefer_sheet_c         ((PK_boolean_prefer_t) 22921)
+#define PK_boolean_prefer_original_c      ((PK_boolean_prefer_t) 22922)
+#define PK_boolean_prefer_wire_c          ((PK_boolean_prefer_t) 22923)
+#define PK_boolean_prefer_general_c       ((PK_boolean_prefer_t) 22924)
+#define PK_boolean_prefer_simplest_c      ((PK_boolean_prefer_t) 22925)
+
+/* PK_emboss_sidewall_t */
+
+#define PK_emboss_sidewall_tapered_c    ((PK_emboss_sidewall_t) 22930)
+#define PK_emboss_sidewall_ruled_c      ((PK_emboss_sidewall_t) 22931)
+#define PK_emboss_sidewall_swept_c      ((PK_emboss_sidewall_t) 22932)
+#define PK_emboss_sidewall_supplied_c   ((PK_emboss_sidewall_t) 22933)
+
+/* PK_emboss_profile_on_t */
+
+#define PK_emboss_profile_on_endcap_c  ((PK_emboss_profile_on_t) 22940)
+#define PK_emboss_profile_on_target_c  ((PK_emboss_profile_on_t) 22941)
+#define PK_emboss_profile_on_any_c     ((PK_emboss_profile_on_t) 22942)
+
+/* PK_emboss_convexity_t */
+
+#define PK_emboss_convexity_both_c      ((PK_emboss_convexity_t) 22950)
+#define PK_emboss_convexity_pad_c       ((PK_emboss_convexity_t) 22951)
+#define PK_emboss_convexity_pocket_c    ((PK_emboss_convexity_t) 22952)
+
+/* PK_bound_side_t */
+
+#define PK_bound_side_both_c        ((PK_bound_side_t) 22980)
+#define PK_bound_side_out_c         ((PK_bound_side_t) 22981)
+#define PK_bound_side_in_c          ((PK_bound_side_t) 22982)
+
+/* PK_blend_inside_tight_t */
+
+#define PK_blend_inside_tight_no_c      ((PK_blend_inside_tight_t) 22990)
+#define PK_blend_inside_tight_blends_c  ((PK_blend_inside_tight_t) 22991)
+#define PK_blend_inside_tight_faces_c   ((PK_blend_inside_tight_t) 22992)
+#define PK_blend_inside_tight_partial_c ((PK_blend_inside_tight_t) 22993)
+
+/* PK_imprint_face_hidden_t */
+
+#define PK_imprint_face_hidden_no_c     (( PK_imprint_face_hidden_t ) 23000)
+#define PK_imprint_face_hidden_array_c  (( PK_imprint_face_hidden_t ) 23001)
+#define PK_imprint_face_hidden_body_c   (( PK_imprint_face_hidden_t ) 23002)
+
+/* PK_taper_concave_type_t */
+
+#define PK_taper_concave_none_c      (( PK_taper_concave_type_t) 23010 )
+#define PK_taper_concave_radius_c    (( PK_taper_concave_type_t) 23011 )
+#define PK_taper_concave_plane_c     (( PK_taper_concave_type_t) 23012 )
+#define PK_taper_concave_mix_c       (( PK_taper_concave_type_t) 23013 )
+
+/* PK_BODY_smoothness_t */
+
+#define PK_BODY_smoothness_exact_c    ((PK_BODY_smoothness_t) 23020)
+#define PK_BODY_smoothness_relax_c    ((PK_BODY_smoothness_t) 23021)
+
+/* PK_ATTDEF_cb_on_t */
+
+#define PK_ATTDEF_cb_on_mismatch_c    ((PK_ATTDEF_cb_on_t) 23030)
+#define PK_ATTDEF_cb_on_any_c         ((PK_ATTDEF_cb_on_t) 23031)
+
+/* PK_taper_step_face_t */
+
+#define PK_taper_step_face_yes_c    (( PK_taper_step_face_t) 23040 )
+#define PK_taper_step_face_no_c     (( PK_taper_step_face_t) 23041 )
+#define PK_taper_preserve_smooth_c  (( PK_taper_step_face_t) 23042 )
+
+/* PK_facet_quality_t */
+
+#define PK_facet_quality_standard_c    (( PK_facet_quality_t ) 23050)
+#define PK_facet_quality_improved_c    (( PK_facet_quality_t ) 23051)
+
+/* PK_emboss_overflow_t */
+
+#define PK_emboss_overflow_added_c      ((PK_emboss_overflow_t) 23060)
+#define PK_emboss_overflow_mixed_c      ((PK_emboss_overflow_t) 23061)
+#define PK_emboss_overflow_ruled_c      ((PK_emboss_overflow_t) 23062)
+#define PK_emboss_overflow_swept_c      ((PK_emboss_overflow_t) 23063)
+#define PK_emboss_overflow_none_c       ((PK_emboss_overflow_t) 23064)
+#define PK_emboss_overflow_laminar_c    ((PK_emboss_overflow_t) 23065)
+
+/* PK_BCURVE_extend_status_t */
+
+#define PK_BCURVE_extend_ok_c            (( PK_BCURVE_extend_status_t ) 23070)
+#define PK_BCURVE_extend_unextended_c    (( PK_BCURVE_extend_status_t ) 23071)
+#define PK_BCURVE_extend_partial_c       (( PK_BCURVE_extend_status_t ) 23072)
+#define PK_BCURVE_extend_failure_c       (( PK_BCURVE_extend_status_t ) 23073)
+
+/* PK_BCURVE_extension_t */
+
+#define PK_BCURVE_extension_none_c          (( PK_BCURVE_extension_t ) 23080)
+#define PK_BCURVE_extension_distance_c      (( PK_BCURVE_extension_t ) 23081)
+#define PK_BCURVE_extension_to_parm_c       (( PK_BCURVE_extension_t ) 23082)
+#define PK_BCURVE_extension_parm_ratio_c    (( PK_BCURVE_extension_t ) 23083)
+
+/* PK_BCURVE_spline_t */
+
+#define PK_BCURVE_spline_ok_c          (( PK_BCURVE_spline_t ) 23090)
+#define PK_BCURVE_spline_failure_c     (( PK_BCURVE_spline_t ) 23091)
+#define PK_BCURVE_spline_degree_c      (( PK_BCURVE_spline_t ) 23092)
+#define PK_BCURVE_spline_bad_derivs_c  (( PK_BCURVE_spline_t ) 23093)
+#define PK_BCURVE_spline_many_derivs_c (( PK_BCURVE_spline_t ) 23094)
+#define PK_BCURVE_spline_bad_params_c  (( PK_BCURVE_spline_t ) 23095)
+#define PK_BCURVE_spline_bad_knots_c   (( PK_BCURVE_spline_t ) 23096)
+#define PK_BCURVE_spline_high_mult_c   (( PK_BCURVE_spline_t ) 23097)
+#define PK_BCURVE_spline_overdefined_c (( PK_BCURVE_spline_t ) 23098)
+
+/* PK_BCURVE_overdefined_t */
+
+#define PK_BCURVE_overdefined_fail_c   (( PK_BCURVE_overdefined_t ) 23110)
+#define PK_BCURVE_overdefined_insert_c (( PK_BCURVE_overdefined_t ) 23111)
+
+/* PK_blend_order_t */
+
+#define PK_blend_order_min_convexity_c      ((PK_blend_order_t) 23120)
+#define PK_blend_order_maj_convexity_c      ((PK_blend_order_t) 23121)
+#define PK_blend_order_concave_convex_c     ((PK_blend_order_t) 23122)
+#define PK_blend_order_convex_concave_c     ((PK_blend_order_t) 23123)
+#define PK_blend_order_unset_c              ((PK_blend_order_t) 23124)
+
+/* PK_blend_setback_shape_t */
+
+#define PK_blend_setback_collar_all_c  ((PK_blend_setback_shape_t) 23130)
+#define PK_blend_setback_collar_none_c ((PK_blend_setback_shape_t) 23131)
+
+/* PK_DEBUG_output_session_t */
+
+#define PK_DEBUG_output_session_no_c (( PK_DEBUG_output_session_t ) 23140)
+#define PK_DEBUG_output_session_bin_c (( PK_DEBUG_output_session_t ) 23141)
+
+/* PK_continuity_t */
+
+#define PK_continuity_c1_c (( PK_continuity_t ) 23150)
+#define PK_continuity_c2_c (( PK_continuity_t ) 23151)
+#define PK_continuity_c3_c (( PK_continuity_t ) 23152)
+#define PK_continuity_g1_c (( PK_continuity_t ) 23153)
+#define PK_continuity_g2_c (( PK_continuity_t ) 23154)
+#define PK_continuity_g3_c (( PK_continuity_t ) 23155)
+
+/* PK_boolean_no_effect_t */
+
+#define PK_boolean_no_effect_basic_c     ((PK_boolean_no_effect_t) 23160)
+#define PK_boolean_no_effect_advanced_c  ((PK_boolean_no_effect_t) 23161)
+
+/* PK_taper_laminar_edge_t */
+
+#define PK_taper_laminar_edge_normal_c ((PK_taper_laminar_edge_t) 23170)
+#define PK_taper_laminar_edge_draw_c   ((PK_taper_laminar_edge_t) 23171)
+
+/* PK_offset_on_body_t */
+
+#define PK_offset_on_body_ok_c             ((PK_offset_on_body_t) 23180)
+#define PK_offset_on_body_fail_c           ((PK_offset_on_body_t) 23181)
+#define PK_offset_on_body_bad_dirn_c       ((PK_offset_on_body_t) 23182)
+#define PK_offset_on_body_connected_c      ((PK_offset_on_body_t) 23183)
+#define PK_offset_on_body_outside_c        ((PK_offset_on_body_t) 23184)
+
+/* PK_CURVE_general_type_t */
+
+#define PK_CURVE_general_user_c      ((PK_CURVE_general_type_t) 23190)
+#define PK_CURVE_general_curve_c     ((PK_CURVE_general_type_t) 23191)
+
+/* PK_BCURVE_fitted_t */
+
+#define PK_BCURVE_fitted_success_c             ((PK_BCURVE_fitted_t) 23200)
+#define PK_BCURVE_fitted_failure_c             ((PK_BCURVE_fitted_t) 23201)
+#define PK_BCURVE_fitted_eval_failure_c        ((PK_BCURVE_fitted_t) 23202)
+#define PK_BCURVE_fitted_bad_range_c           ((PK_BCURVE_fitted_t) 23203)
+#define PK_BCURVE_fitted_bad_tolerance_c       ((PK_BCURVE_fitted_t) 23204)
+#define PK_BCURVE_fitted_bad_eval_type_c       ((PK_BCURVE_fitted_t) 23205)
+#define PK_BCURVE_fitted_bad_interp_parm_c     ((PK_BCURVE_fitted_t) 23206)
+
+/* PK_SURF_general_type_t */
+
+#define PK_SURF_general_user_c      ((PK_SURF_general_type_t) 23220)
+#define PK_SURF_general_surf_c      ((PK_SURF_general_type_t) 23221)
+
+/* PK_BSURF_fitted_t */
+
+#define PK_BSURF_fitted_success_c             ((PK_BSURF_fitted_t) 23230)
+#define PK_BSURF_fitted_failure_c             ((PK_BSURF_fitted_t) 23231)
+#define PK_BSURF_fitted_eval_failure_c        ((PK_BSURF_fitted_t) 23232)
+#define PK_BSURF_fitted_bad_range_c           ((PK_BSURF_fitted_t) 23233)
+#define PK_BSURF_fitted_bad_tolerance_c       ((PK_BSURF_fitted_t) 23234)
+#define PK_BSURF_fitted_bad_eval_type_c       ((PK_BSURF_fitted_t) 23235)
+#define PK_BSURF_fitted_u_interp_parm_c       ((PK_BSURF_fitted_t) 23236)
+#define PK_BSURF_fitted_v_interp_parm_c       ((PK_BSURF_fitted_t) 23237)
+
+/* PK_sweep_guide_method_t */
+
+#define PK_sweep_guide_point_c    ((PK_sweep_guide_method_t) 23250)
+#define PK_sweep_guide_chord_c    ((PK_sweep_guide_method_t) 23251)
+#define PK_sweep_guide_curve_c    ((PK_sweep_guide_method_t) 23252)
+#define PK_sweep_guide_project_c  ((PK_sweep_guide_method_t) 23253)
+
+/* PK_sweep_guide_clamp_type_t */
+
+#define PK_sweep_guide_clamp_none_c   ((PK_sweep_guide_clamp_type_t) 23260)
+#define PK_sweep_guide_clamp_dirn_c   ((PK_sweep_guide_clamp_type_t) 23261)
+#define PK_sweep_guide_clamp_fixed_c  ((PK_sweep_guide_clamp_type_t) 23262)
+
+/* PK_replace_variation_t */
+
+#define PK_replace_variation_no_c     ((PK_replace_variation_t) 23280)
+#define PK_replace_variation_yes_c    ((PK_replace_variation_t) 23281)
+
+/* PK_sweep_guide_scale_t */
+
+#define PK_sweep_guide_uniform_c  ((PK_sweep_guide_scale_t) 23290)
+#define PK_sweep_guide_lateral_c  ((PK_sweep_guide_scale_t) 23291)
+
+/* PK_sweep_clamp_type_t */
+
+#define PK_sweep_clamp_none_c           ((PK_sweep_clamp_type_t) 23300)
+#define PK_sweep_clamp_const_profile_c  ((PK_sweep_clamp_type_t) 23301)
+#define PK_sweep_clamp_face_c           ((PK_sweep_clamp_type_t) 23302)
+
+/* PK_PARTITION_copy_deltas_t */
+
+#define PK_PARTITION_copy_deltas_none_c  ((PK_PARTITION_copy_deltas_t) 23310)
+#define PK_PARTITION_copy_deltas_all_c   ((PK_PARTITION_copy_deltas_t) 23311)
+#define PK_PARTITION_copy_deltas_main_c  ((PK_PARTITION_copy_deltas_t) 23312)
+#define PK_PARTITION_copy_deltas_curr_c  ((PK_PARTITION_copy_deltas_t) 23313)
+
+/* PK_thicken_update_t */
+
+#define PK_thicken_update_0_c        ((PK_thicken_update_t) 23320)
+#define PK_thicken_update_default_c  ((PK_thicken_update_t) 23321)
+
+/* PK_imprint_tracking_t */
+
+#define PK_imprint_tracking_basic_c     (( PK_imprint_tracking_t ) 23330)
+#define PK_imprint_tracking_curves_c    (( PK_imprint_tracking_t ) 23331)
+
+/* PK_blend_repair_fa_X_t */
+
+#define PK_blend_repair_fa_X_no_c         ((PK_blend_repair_fa_X_t) 23340)
+#define PK_blend_repair_fa_X_yes_c        ((PK_blend_repair_fa_X_t) 23341)
+
+/* PK_replace_patch_t */
+
+#define PK_replace_patch_no_c     ((PK_replace_patch_t) 23350)
+#define PK_replace_patch_yes_c    ((PK_replace_patch_t) 23351)
+
+/* PK_facet_sing_topol_t */
+
+#define PK_facet_sing_topol_default_c   ((PK_facet_sing_topol_t) 23360)
+#define PK_facet_sing_topol_degen_c     ((PK_facet_sing_topol_t) 23361)
+
+/* PK_detail_perforated_t */
+
+#define PK_detail_perforated_no_c       ((PK_detail_perforated_t) 23370)
+#define PK_detail_perforated_yes_c      ((PK_detail_perforated_t) 23371)
+
+/* PK_detail_open_t */
+
+#define PK_detail_open_no_c             ((PK_detail_open_t) 23380)
+#define PK_detail_open_yes_c            ((PK_detail_open_t) 23381)
+
+/* PK_boolean_match_update_t */
+
+#define PK_boolean_match_update_0_c        ((PK_boolean_match_update_t) 23390)
+#define PK_boolean_match_update_dflt_c     ((PK_boolean_match_update_t) 23391)
+
+/* PK_sweep_tool_fault_t */
+
+#define PK_sweep_tool_bad_path_c         (( PK_sweep_tool_fault_t ) 23401)
+#define PK_sweep_tool_bad_tool_c         (( PK_sweep_tool_fault_t ) 23402)
+#define PK_sweep_tool_surf_failure_c     (( PK_sweep_tool_fault_t ) 23403)
+#define PK_sweep_tool_check_failure_c    (( PK_sweep_tool_fault_t ) 23404)
+#define PK_sweep_tool_geom_self_int_c    (( PK_sweep_tool_fault_t ) 23405)
+#define PK_sweep_tool_topol_self_int_c   (( PK_sweep_tool_fault_t ) 23406)
+#define PK_sweep_tool_geom_degen_c       (( PK_sweep_tool_fault_t ) 23407)
+#define PK_sweep_tool_small_tool_c       (( PK_sweep_tool_fault_t ) 23408)
+#define PK_sweep_tool_bad_lock_dir_c     (( PK_sweep_tool_fault_t ) 23409)
+#define PK_sweep_tool_topol_change_c     (( PK_sweep_tool_fault_t ) 25530)
+
+/* PK_imprint_proj_dist_t */
+
+#define PK_imprint_proj_dist_no_c     (( PK_imprint_proj_dist_t ) 23430)
+#define PK_imprint_proj_dist_whole_c  (( PK_imprint_proj_dist_t ) 23431)
+#define PK_imprint_proj_dist_parts_c  (( PK_imprint_proj_dist_t ) 23432)
+
+/* PK_ATTDEF_mismatch_t */
+
+#define PK_ATTDEF_mismatch_fail_c       ((PK_ATTDEF_mismatch_t) 23440)
+#define PK_ATTDEF_mismatch_ignore_c     ((PK_ATTDEF_mismatch_t) 23441)
+
+/* PK_extend_closed_t */
+
+#define PK_extend_closed_no_c            ((PK_extend_closed_t) 23450)
+#define PK_extend_closed_non_periodic_c  ((PK_extend_closed_t) 23451)
+#define PK_extend_closed_yes_c           ((PK_extend_closed_t) 23452)
+
+/* PK_CURVE_sequential_t */
+
+#define PK_CURVE_sequential_no_c   ((PK_CURVE_sequential_t) 23460)
+#define PK_CURVE_sequential_yes_c  ((PK_CURVE_sequential_t) 23461)
+
+/* PK_nm_edge_repair_t */
+
+#define PK_nm_edge_repair_no_c     ((PK_nm_edge_repair_t) 23470)
+#define PK_nm_edge_repair_blend_c  ((PK_nm_edge_repair_t) 23471)
+
+/* PK_SESSION_binding_t */
+
+#define PK_SESSION_binding_unknown_c        ((PK_SESSION_binding_t)23480)
+#define PK_SESSION_binding_C_native_c       ((PK_SESSION_binding_t)23481)
+#define PK_SESSION_binding_net_unsafe_c     ((PK_SESSION_binding_t)23482)
+#define PK_SESSION_binding_net_safe_c       ((PK_SESSION_binding_t)23483)
+
+/* PK_blend_ov_exp_cliff_t */
+
+#define PK_blend_ov_exp_cliff_no_c  ((PK_blend_ov_exp_cliff_t) 23500)
+#define PK_blend_ov_exp_cliff_yes_c ((PK_blend_ov_exp_cliff_t) 23501)
+
+/* PK_PARTITION_type_t */
+
+#define PK_PARTITION_type_standard_c        ((PK_PARTITION_type_t) 23510)
+#define PK_PARTITION_type_light_c           ((PK_PARTITION_type_t) 23511)
+
+/* PK_taper_keep_material_t */
+
+#define PK_taper_keep_material_no_c        ((PK_taper_keep_material_t) 23520)
+#define PK_taper_keep_material_yes_c       ((PK_taper_keep_material_t) 23521)
+
+/* PK_emboss_unite_sidewall_t */
+
+#define PK_emboss_unite_sidewall_yes_c   ((PK_emboss_unite_sidewall_t) 23530)
+#define PK_emboss_unite_sidewall_no_c    ((PK_emboss_unite_sidewall_t) 23531)
+
+/* PK_boolean_track_type_t */
+
+#define PK_boolean_track_type_basic_c    ((PK_boolean_track_type_t) 23540)
+#define PK_boolean_track_type_comp_c     ((PK_boolean_track_type_t) 23541)
+
+/* PK_set_precision_method_t */
+
+#define PK_set_precision_default_c         ((PK_set_precision_method_t) 23550)
+#define PK_set_precision_c2_c              ((PK_set_precision_method_t) 23551)
+
+/* PK_PMARK_new_at_mark_t */
+
+#define PK_PMARK_new_at_current_mark_c      ((PK_PMARK_new_at_mark_t) 23560)
+#define PK_PMARK_new_with_partition_c       ((PK_PMARK_new_at_mark_t) 23561)
+
+/* PK_extend_track_type_t */
+
+#define PK_extend_track_type_basic_c ((PK_extend_track_type_t) 23570 )
+#define PK_extend_track_type_edges_c ((PK_extend_track_type_t) 23571 )
+
+/* PK_extend_track_internal_t */
+
+#define PK_extend_track_internal_no_c  ((PK_extend_track_internal_t) 23580)
+#define PK_extend_track_internal_yes_c ((PK_extend_track_internal_t) 23581)
+
+/* PK_EDGE_convexity_t */
+
+#define PK_EDGE_convexity_smooth_flat_c  ((PK_EDGE_convexity_t) 23590)
+#define PK_EDGE_convexity_smooth_cvx_c   ((PK_EDGE_convexity_t) 23591)
+#define PK_EDGE_convexity_smooth_ccv_c   ((PK_EDGE_convexity_t) 23592)
+#define PK_EDGE_convexity_smooth_inf_c   ((PK_EDGE_convexity_t) 23593)
+#define PK_EDGE_convexity_smooth_var_c   ((PK_EDGE_convexity_t) 23594)
+#define PK_EDGE_convexity_knife_cvx_c    ((PK_EDGE_convexity_t) 23595)
+#define PK_EDGE_convexity_knife_ccv_c    ((PK_EDGE_convexity_t) 23596)
+#define PK_EDGE_convexity_convex_c       ((PK_EDGE_convexity_t) 23597)
+#define PK_EDGE_convexity_concave_c      ((PK_EDGE_convexity_t) 23598)
+#define PK_EDGE_convexity_variable_c     ((PK_EDGE_convexity_t) 23599)
+
+/* PK_sweep_lock_t */
+
+#define PK_sweep_lock_path_and_dir_c ((PK_sweep_lock_t) 23600)
+#define PK_sweep_lock_path_c         ((PK_sweep_lock_t) 23601)
+#define PK_sweep_lock_rotation_c     ((PK_sweep_lock_t) 23602)
+
+/* PK_force_continuity_t */
+
+#define PK_force_continuity_no_c     ((PK_force_continuity_t) 23610)
+#define PK_force_continuity_prefer_c ((PK_force_continuity_t) 23611)
+#define PK_force_continuity_yes_c    ((PK_force_continuity_t) 23612)
+
+/* PK_SURF_make_bsurf_t */
+
+#define PK_SURF_make_bsurf_exact_c     ((PK_SURF_make_bsurf_t) 23620)
+#define PK_SURF_make_bsurf_approx_c    ((PK_SURF_make_bsurf_t) 23621)
+#define PK_SURF_make_bsurf_too_tight_c ((PK_SURF_make_bsurf_t) 23622)
+
+/* PK_achieved_cont_t */
+
+#define PK_achieved_cont_yes_c ((PK_achieved_cont_t) 23630)
+#define PK_achieved_cont_no_c  ((PK_achieved_cont_t) 23631)
+
+/* PK_make_spcurves_method_t */
+
+#define PK_make_spcurves_method_dflt_c     ((PK_make_spcurves_method_t) 23640)
+#define PK_make_spcurves_method_c2_c       ((PK_make_spcurves_method_t) 23641)
+
+/* PK_check_nmnl_geom_t */
+
+#define PK_check_nmnl_geom_no_c     ((PK_check_nmnl_geom_t) 23650)
+#define PK_check_nmnl_geom_yes_c    ((PK_check_nmnl_geom_t) 23651)
+
+/* PK_check_returns_t */
+
+#define PK_check_returns_latest_c   ((PK_check_returns_t) 23660)
+#define PK_check_returns_0_c        ((PK_check_returns_t) 23661)
+#define PK_check_returns_1_c        ((PK_check_returns_t) 23662)
+#define PK_check_returns_2_c        ((PK_check_returns_t) 23663)
+
+/* PK_make_spcurves_degen_t */
+
+#define PK_make_spcurves_degen_no_c     ((PK_make_spcurves_degen_t) 23670)
+#define PK_make_spcurves_degen_join_c   ((PK_make_spcurves_degen_t) 23671)
+
+/* PK_LOOP_3_space_gap_t */
+
+#define PK_LOOP_3_space_gap_no_c        ((PK_LOOP_3_space_gap_t) 23680)
+#define PK_LOOP_3_space_gap_close_c     ((PK_LOOP_3_space_gap_t) 23681)
+
+/* PK_LOOP_2_space_gap_t */
+
+#define PK_LOOP_2_space_gap_no_c        ((PK_LOOP_2_space_gap_t) 23690)
+#define PK_LOOP_2_space_gap_minimise_c  ((PK_LOOP_2_space_gap_t) 23691)
+#define PK_LOOP_2_space_gap_close_cu_c  ((PK_LOOP_2_space_gap_t) 23692)
+#define PK_LOOP_2_space_gap_close_all_c ((PK_LOOP_2_space_gap_t) 23693)
+
+/* PK_sweep_output_xsect_t */
+
+#define PK_sweep_output_xsect_no_c      ((PK_sweep_output_xsect_t) 23700)
+#define PK_sweep_output_xsect_yes_c     ((PK_sweep_output_xsect_t) 23701)
+#define PK_sweep_output_xsect_on_fail_c ((PK_sweep_output_xsect_t) 23702)
+
+/* PK_sweep_group_xsect_t */
+
+#define PK_sweep_group_xsect_per_vx_c   ((PK_sweep_group_xsect_t) 23710)
+#define PK_sweep_group_xsect_per_edge_c ((PK_sweep_group_xsect_t) 23711)
+#define PK_sweep_group_xsect_no_c       ((PK_sweep_group_xsect_t) 23712)
+
+/* PK_FACE_change_update_t */
+
+#define PK_FACE_change_update_0_c          ((PK_FACE_change_update_t) 23720)
+#define PK_FACE_change_update_default_c    ((PK_FACE_change_update_t) 23729)
+
+/* PK_set_precision_report_t */
+
+#define PK_set_precision_report_no_c       ((PK_set_precision_report_t) 23730)
+#define PK_set_precision_report_yes_c      ((PK_set_precision_report_t) 23731)
+
+/* PK_FACE_overflow_t */
+
+#define PK_FACE_overflow_tangent_c    ((PK_FACE_overflow_t) 23740)
+#define PK_FACE_overflow_ruled_c      ((PK_FACE_overflow_t) 23741)
+#define PK_FACE_overflow_swept_c      ((PK_FACE_overflow_t) 23742)
+#define PK_FACE_overflow_added_c      ((PK_FACE_overflow_t) 23743)
+#define PK_FACE_overflow_mixed_c      ((PK_FACE_overflow_t) 23744)
+#define PK_FACE_overflow_none_c       ((PK_FACE_overflow_t) 23745)
+
+/* PK_render_ske_missing_t  (23750-23759 allocated) */
+
+#define PK_render_ske_missing_no_c      ((PK_render_ske_missing_t) 23750)
+#define PK_render_ske_missing_yes_c     ((PK_render_ske_missing_t) 23751)
+
+/* PK_range_opt_t  (23760-23769 allocated) */
+
+#define PK_range_opt_performance_c                 ((PK_range_opt_t) 23760)
+#define PK_range_opt_accuracy_c                    ((PK_range_opt_t) 23761)
+
+/* PK_general_t */
+
+#define PK_general_nm_edge_c            ((PK_general_t) 23770)
+#define PK_general_nm_vertex_c          ((PK_general_t) 23771)
+#define PK_general_opposed_faces_c      ((PK_general_t) 23772)
+#define PK_general_solid_internal_c     ((PK_general_t) 23773)
+#define PK_general_mixed_dimension_c    ((PK_general_t) 23774)
+#define PK_general_wire_in_solid_c      ((PK_general_t) 23775)
+
+/* PK_self_int_type_t */
+
+#define PK_self_int_type_general_c    ((PK_self_int_type_t) 23780)
+#define PK_self_int_type_sing_c       ((PK_self_int_type_t) 23781)
+#define PK_self_int_type_mixed_c      ((PK_self_int_type_t) 23782)
+
+/* PK_blend_prevent_sharp_t */
+
+#define PK_blend_prevent_sharp_no_c       ((PK_blend_prevent_sharp_t) 23790)
+#define PK_blend_prevent_sharp_yes_c      ((PK_blend_prevent_sharp_t) 23791)
+#define PK_blend_prevent_sharp_report_c   ((PK_blend_prevent_sharp_t) 23792)
+
+/* PK_extension_limit_t */
+
+#define PK_extension_limit_minimal_c      ((PK_extension_limit_t) 23800)
+#define PK_extension_limit_inside_c       ((PK_extension_limit_t) 23801)
+#define PK_extension_limit_outside_c      ((PK_extension_limit_t) 23802)
+
+/* PK_GEOM_transform_t */
+
+#define PK_GEOM_transform_modify_c     ((PK_GEOM_transform_t)23820)
+#define PK_GEOM_transform_new_c        ((PK_GEOM_transform_t)23821)
+
+/* PK_hollow_local_t */
+
+#define PK_hollow_local_add_c     (( PK_hollow_local_t ) 23830 )
+#define PK_hollow_local_exclude_c (( PK_hollow_local_t ) 23831 )
+#define PK_hollow_local_none_c    (( PK_hollow_local_t ) 23832 )
+
+/* PK_FACE_prefer_adj_t */
+
+#define PK_FACE_prefer_adj_keep_c     ((PK_FACE_prefer_adj_t) 23840)
+#define PK_FACE_prefer_adj_change_c   ((PK_FACE_prefer_adj_t) 23841)
+
+/* PK_REPORT_record_type_t */
+
+#define PK_REPORT_record_type_1_c  ((PK_REPORT_record_type_t) 23850)
+#define PK_REPORT_record_type_2_c  ((PK_REPORT_record_type_t) 23851)
+#define PK_REPORT_record_type_3_c  ((PK_REPORT_record_type_t) 23852)
+
+/* PK_REPORT_1_t */
+
+#define PK_REPORT_1_ok_c                ((PK_REPORT_1_t) 23870)
+#define PK_REPORT_1_nocheck_c           ((PK_REPORT_1_t) 23871)
+#define PK_REPORT_1_fail_c              ((PK_REPORT_1_t) 23872)
+#define PK_REPORT_1_cant_get_pt_c       ((PK_REPORT_1_t) 23873)
+#define PK_REPORT_1_cant_get_cu_c       ((PK_REPORT_1_t) 23874)
+#define PK_REPORT_1_cant_get_su_c       ((PK_REPORT_1_t) 23875)
+#define PK_REPORT_1_cant_offset_c       ((PK_REPORT_1_t) 23876)
+#define PK_REPORT_1_side_cu_fail_c      ((PK_REPORT_1_t) 23877)
+#define PK_REPORT_1_side_su_fail_c      ((PK_REPORT_1_t) 23878)
+#define PK_REPORT_1_not_same_by_c       ((PK_REPORT_1_t) 23879)
+#define PK_REPORT_1_fa_fail_c           ((PK_REPORT_1_t) 23880)
+#define PK_REPORT_1_fa_fa_fail_c        ((PK_REPORT_1_t) 23881)
+#define PK_REPORT_1_ed_remains_c        ((PK_REPORT_1_t) 23882)
+#define PK_REPORT_1_point_contact_c     ((PK_REPORT_1_t) 23883)
+#define PK_REPORT_1_bad_reference_c     ((PK_REPORT_1_t) 23884)
+#define PK_REPORT_1_not_supported_c     ((PK_REPORT_1_t) 23885)
+#define PK_REPORT_1_cant_extend_c       ((PK_REPORT_1_t) 23886)
+#define PK_REPORT_1_sheet_small_c       ((PK_REPORT_1_t) 23887)
+#define PK_REPORT_1_cant_use_cu_c       ((PK_REPORT_1_t) 23888)
+#define PK_REPORT_1_eds_unconnected_c   ((PK_REPORT_1_t) 23889)
+#define PK_REPORT_1_non_laminar_c       ((PK_REPORT_1_t) 23890)
+#define PK_REPORT_1_reference_loop_c    ((PK_REPORT_1_t) 23891)
+#define PK_REPORT_1_lp_outside_fa_c     ((PK_REPORT_1_t) 23892)
+#define PK_REPORT_1_target_missed_c     ((PK_REPORT_1_t) 23893)
+#define PK_REPORT_1_wrong_side_c        ((PK_REPORT_1_t) 23894)
+#define PK_REPORT_1_ed_vxs_touch_c      ((PK_REPORT_1_t) 23895)
+#define PK_REPORT_1_ed_large_tol_c      ((PK_REPORT_1_t) 23896)
+#define PK_REPORT_1_vx_large_tol_c      ((PK_REPORT_1_t) 23897)
+#define PK_REPORT_1_negated_c           ((PK_REPORT_1_t) 23898)
+#define PK_REPORT_1_check_fail_c        ((PK_REPORT_1_t) 23899)
+#define PK_REPORT_1_fa_overlap_c        ((PK_REPORT_1_t) 23900)
+#define PK_REPORT_1_osthread_fail_c     ((PK_REPORT_1_t) 23901)
+#define PK_REPORT_1_osthread_ok_c       ((PK_REPORT_1_t) 23902)
+#define PK_REPORT_1_imp_dir_undef_c     ((PK_REPORT_1_t) 23903)
+#define PK_REPORT_1_fa_fix_degens_c     ((PK_REPORT_1_t) 23904)
+#define PK_REPORT_1_fa_sx_repair_c      ((PK_REPORT_1_t) 23905)
+#define PK_REPORT_1_fa_not_offset_c     ((PK_REPORT_1_t) 23906)
+#define PK_REPORT_1_fa_fa_repair_c      ((PK_REPORT_1_t) 23907)
+#define PK_REPORT_1_rep_sx_faces_c      ((PK_REPORT_1_t) 23908)
+#define PK_REPORT_1_rep_G2_faces_c      ((PK_REPORT_1_t) 23909)
+#define PK_REPORT_1_deform_surf_c       ((PK_REPORT_1_t) 23910)
+#define PK_REPORT_1_blend_too_tight_c   ((PK_REPORT_1_t) 23911)
+#define PK_REPORT_1_cant_make_blend_c   ((PK_REPORT_1_t) 23912)
+#define PK_REPORT_1_bad_chamfer_c       ((PK_REPORT_1_t) 23913)
+#define PK_REPORT_1_bad_blend_c         ((PK_REPORT_1_t) 23914)
+#define PK_REPORT_1_not_blend_surf_c    ((PK_REPORT_1_t) 23915)
+#define PK_REPORT_1_cut_no_clash_c      ((PK_REPORT_1_t) 23916)
+#define PK_REPORT_1_cut_incomplete_c    ((PK_REPORT_1_t) 23917)
+#define PK_REPORT_1_cut_unclassed_c     ((PK_REPORT_1_t) 23918)
+#define PK_REPORT_1_inconsistent_geom_c ((PK_REPORT_1_t) 23919)
+#define PK_REPORT_1_region_type_undef_c ((PK_REPORT_1_t) 23920)
+
+/* PK_sweep_repair_t */
+
+#define PK_sweep_repair_no_c      ((PK_sweep_repair_t) 23970)
+#define PK_sweep_repair_yes_c     ((PK_sweep_repair_t) 23971)
+#define PK_sweep_repair_report_c  ((PK_sweep_repair_t) 23972)
+
+/* PK_track_edges_t */
+
+#define PK_track_edges_yes_c     ((PK_track_edges_t) 23980)
+#define PK_track_edges_no_c      ((PK_track_edges_t) 23981)
+
+/* PK_track_vertices_t */
+
+#define PK_track_vertices_yes_c     ((PK_track_vertices_t) 23990)
+#define PK_track_vertices_no_c      ((PK_track_vertices_t) 23991)
+
+/* PK_BSURF_constrained_t */
+
+#define PK_BSURF_constrained_success_c      ((PK_BSURF_constrained_t) 24000)
+#define PK_BSURF_constrained_failure_c      ((PK_BSURF_constrained_t) 24001)
+#define PK_BSURF_constrained_not_fit_c      ((PK_BSURF_constrained_t) 24002)
+
+/* PK_BCURVE_clamp_t */
+
+#define PK_BCURVE_clamp_no_c          ((PK_BCURVE_clamp_t) 24010)
+#define PK_BCURVE_clamp_extreme_c     ((PK_BCURVE_clamp_t) 24011)
+#define PK_BCURVE_clamp_constant_c    ((PK_BCURVE_clamp_t) 24012)
+
+/* PK_fix_method_t */
+
+#define PK_fix_method_extract_c    ((PK_fix_method_t) 24020)
+#define PK_fix_method_approx_c     ((PK_fix_method_t) 24021)
+
+/* PK_SURF_fix_fault_t */
+
+#define PK_SURF_fix_fault_ok_c            ((PK_SURF_fix_fault_t) 24030)
+#define PK_SURF_fix_fault_incomplete_c    ((PK_SURF_fix_fault_t) 24031)
+
+/* PK_CURVE_fix_fault_t */
+
+#define PK_CURVE_fix_fault_ok_c            ((PK_CURVE_fix_fault_t) 24040)
+#define PK_CURVE_fix_fault_incomplete_c    ((PK_CURVE_fix_fault_t) 24041)
+
+/* PK_SURF_split_t */
+
+#define PK_SURF_split_prefer_u_c    ((PK_SURF_split_t) 24050)
+#define PK_SURF_split_prefer_v_c    ((PK_SURF_split_t) 24051)
+#define PK_SURF_split_only_u_c      ((PK_SURF_split_t) 24052)
+#define PK_SURF_split_only_v_c      ((PK_SURF_split_t) 24053)
+
+/* PK_fix_status_t */
+
+#define PK_fix_status_exact_c        ((PK_fix_status_t) 24060)
+#define PK_fix_status_approx_c       ((PK_fix_status_t) 24061)
+#define PK_fix_status_too_tight_c    ((PK_fix_status_t) 24062)
+
+/* PK_DEBUG_try_smp_t */
+
+#define PK_DEBUG_try_smp_no_c       ((PK_DEBUG_try_smp_t) 24070)
+#define PK_DEBUG_try_smp_A_c        ((PK_DEBUG_try_smp_t) 24071)
+#define PK_DEBUG_try_smp_B_c        ((PK_DEBUG_try_smp_t) 24072)
+
+/* PK_transform_step_t */
+
+#define PK_transform_step_no_c          ((PK_transform_step_t) 24080)
+#define PK_transform_step_smooth_c      ((PK_transform_step_t) 24081)
+#define PK_transform_step_all_c         ((PK_transform_step_t) 24082)
+#define PK_transform_step_not_coi_c     ((PK_transform_step_t) 24083)
+#define PK_transform_step_smooth_site_c ((PK_transform_step_t) 24084)
+
+/* PK_blend_track_edges_t  */
+
+#define PK_blend_track_edges_no_c      ((PK_blend_track_edges_t) 24090)
+#define PK_blend_track_edges_laminar_c ((PK_blend_track_edges_t) 24091)
+
+/* PK_blend_delete_cap_t */
+
+#define PK_blend_delete_cap_no_c      (( PK_blend_delete_cap_t ) 24100)
+#define PK_blend_delete_cap_planar_c  (( PK_blend_delete_cap_t ) 24109)
+
+/* PK_facet_smp_t (24110-24111) allocated */
+
+#define PK_facet_smp_no_c   ((PK_facet_smp_t) 24110)
+#define PK_facet_smp_body_c ((PK_facet_smp_t) 24111)
+
+/* PK_FACE_grow_t */
+
+#define PK_FACE_grow_update_c     ((PK_FACE_grow_t) 24120)
+#define PK_FACE_grow_auto_c       ((PK_FACE_grow_t) 24121)
+#define PK_FACE_grow_moving_c     ((PK_FACE_grow_t) 24122)
+#define PK_FACE_grow_fixed_c      ((PK_FACE_grow_t) 24123)
+#define PK_FACE_grow_no_c         ((PK_FACE_grow_t) 24124)
+#define PK_FACE_grow_fail_c       ((PK_FACE_grow_t) 24125)
+
+/* PK_blend_tolerance_t */
+
+#define PK_blend_tolerance_standard_c ((PK_blend_tolerance_t) 24130)
+#define PK_blend_tolerance_improved_c ((PK_blend_tolerance_t) 24131)
+
+/* PK_offset_track_del_t */
+
+#define PK_offset_track_del_no_c        ((PK_offset_track_del_t) 24140)
+#define PK_offset_track_del_sx_repair_c ((PK_offset_track_del_t) 24141)
+
+/* PK_extend_create_t */
+
+#define PK_extend_create_new_c   ((PK_extend_create_t) 24150)
+#define PK_extend_create_split_c ((PK_extend_create_t) 24151)
+
+/* PK_blend_follow_branch_t */
+
+#define PK_blend_follow_branch_yes_c   ((PK_blend_follow_branch_t) 24160)
+#define PK_blend_follow_branch_no_c    ((PK_blend_follow_branch_t) 24161)
+
+/* PK_BCURVE_spline_stat_t */
+
+#define PK_BCURVE_spline_stat_exact_c      ((PK_BCURVE_spline_stat_t) 24170)
+#define PK_BCURVE_spline_stat_approx_c     ((PK_BCURVE_spline_stat_t) 24171)
+#define PK_BCURVE_spline_stat_not_fit_c    ((PK_BCURVE_spline_stat_t) 24172)
+
+/* PK_spline_method_t */
+
+#define PK_spline_method_interpolate_c    ((PK_spline_method_t) 24180)
+#define PK_spline_method_fit_c            ((PK_spline_method_t) 24181)
+
+/* PK_BODY_sewing_assy_t */
+
+#define PK_BODY_sewing_assy_no_c         ((PK_BODY_sewing_assy_t) 24190)
+#define PK_BODY_sewing_assy_orient_c     ((PK_BODY_sewing_assy_t) 24191)
+#define PK_BODY_sewing_assy_extend_c     ((PK_BODY_sewing_assy_t) 24192)
+
+/* PK_LOOP_trim_geom_t */
+
+#define PK_LOOP_trim_geom_no_c       ((PK_LOOP_trim_geom_t) 24200)
+#define PK_LOOP_trim_geom_yes_c      ((PK_LOOP_trim_geom_t) 24201)
+
+/* PK_blend_track_type_t */
+
+#define PK_blend_track_type_basic_c  ((PK_blend_track_type_t) 24210)
+#define PK_blend_track_type_unders_c ((PK_blend_track_type_t) 24211)
+
+/* PK_ENTITY_track_t */
+
+#define PK_ENTITY_track_delete_c        (( PK_ENTITY_track_t ) 24230)
+#define PK_ENTITY_track_merge_c         (( PK_ENTITY_track_t ) 24231)
+#define PK_ENTITY_track_create_c        (( PK_ENTITY_track_t ) 24232)
+#define PK_ENTITY_track_split_c         (( PK_ENTITY_track_t ) 24233)
+#define PK_ENTITY_track_derive_c        (( PK_ENTITY_track_t ) 24234)
+
+/* PK_BODY_sewing_gen_t */
+
+#define PK_BODY_sewing_gen_no_c          ((PK_BODY_sewing_gen_t) 24240)
+#define PK_BODY_sewing_gen_loc_manf_c    ((PK_BODY_sewing_gen_t) 24241)
+
+/* PK_blend_delete_keep_t */
+
+#define PK_blend_delete_keep_no_c    (( PK_blend_delete_keep_t ) 24250)
+#define PK_blend_delete_keep_yes_c   (( PK_blend_delete_keep_t ) 24251)
+
+/* PK_REPORT_2_t */
+
+#define PK_REPORT_2_grow_fail_c     ((PK_REPORT_2_t) 24260)
+#define PK_REPORT_2_grow_1_c        ((PK_REPORT_2_t) 24261)
+#define PK_REPORT_2_grow_2_c        ((PK_REPORT_2_t) 24262)
+#define PK_REPORT_2_grow_no_c       ((PK_REPORT_2_t) 24263)
+#define PK_REPORT_2_shared_geometry_c    ((PK_REPORT_2_t) 24264)
+
+/* PK_extension_boundary_t */
+
+#define PK_extension_boundary_precise_c   ((PK_extension_boundary_t) 24270)
+#define PK_extension_boundary_loose_c     ((PK_extension_boundary_t) 24271)
+
+/* PK_VERTEX_limit_t */
+
+#define PK_VERTEX_limit_no_c          ((PK_VERTEX_limit_t) 24280)
+#define PK_VERTEX_limit_report_c      ((PK_VERTEX_limit_t) 24281)
+#define PK_VERTEX_limit_yes_c         ((PK_VERTEX_limit_t) 24282)
+
+/* PK_FACE_grow_cb_t */
+
+#define PK_FACE_grow_cb_default_c    ((PK_FACE_grow_cb_t) 24290)
+#define PK_FACE_grow_cb_auto_c       ((PK_FACE_grow_cb_t) 24291)
+#define PK_FACE_grow_cb_faces1_c     ((PK_FACE_grow_cb_t) 24292)
+#define PK_FACE_grow_cb_faces2_c     ((PK_FACE_grow_cb_t) 24293)
+#define PK_FACE_grow_cb_no_c         ((PK_FACE_grow_cb_t) 24294)
+#define PK_FACE_grow_cb_fail_c       ((PK_FACE_grow_cb_t) 24295)
+
+/* PK_spline_update_t */
+
+#define PK_spline_update_0_c       ((PK_spline_update_t) 24300)
+#define PK_spline_update_1_c       ((PK_spline_update_t) 24301)
+#define PK_spline_update_default_c ((PK_spline_update_t) 24302)
+
+/* PK_sweep_profile_law_t */
+
+#define PK_sweep_profile_law_no_c  ((PK_sweep_profile_law_t) 24310)
+#define PK_sweep_profile_law_yes_c ((PK_sweep_profile_law_t) 24311)
+
+/* PK_EDGE_limit_t */
+
+#define PK_EDGE_limit_no_c          ((PK_EDGE_limit_t) 24320)
+#define PK_EDGE_limit_report_c      ((PK_EDGE_limit_t) 24321)
+#define PK_EDGE_limit_yes_c         ((PK_EDGE_limit_t) 24322)
+
+/* PK_TOPOL_dimension_t */
+
+#define PK_TOPOL_dimension_0_c   ((PK_TOPOL_dimension_t) 24340)
+#define PK_TOPOL_dimension_1_c   ((PK_TOPOL_dimension_t) 24341)
+#define PK_TOPOL_dimension_2_c   ((PK_TOPOL_dimension_t) 24342)
+#define PK_TOPOL_dimension_any_c ((PK_TOPOL_dimension_t) 24343)
+
+/* PK_redundant_merge_t */
+
+#define PK_redundant_merge_in_c     ((PK_redundant_merge_t) 24350)
+#define PK_redundant_merge_on_c     ((PK_redundant_merge_t) 24351)
+#define PK_redundant_merge_out_c    ((PK_redundant_merge_t) 24352)
+
+/* PK_repair_fa_fa_t */
+
+#define PK_repair_fa_fa_no_c           ((PK_repair_fa_fa_t) 24360)
+#define PK_repair_fa_fa_yes_c          ((PK_repair_fa_fa_t) 24361)
+
+/* PK_neutral_ignore_fa_t */
+
+#define PK_neutral_ignore_fa_no_c      ((PK_neutral_ignore_fa_t) 24370)
+#define PK_neutral_ignore_fa_default_c ((PK_neutral_ignore_fa_t) 24371)
+
+/* PK_blend_trim_extent_t */
+
+#define PK_blend_trim_extent_all_c      ((PK_blend_trim_extent_t) 24380)
+#define PK_blend_trim_extent_sides_c    ((PK_blend_trim_extent_t) 24381)
+
+/* PK_redundant_propagate_t */
+
+#define PK_redundant_propagate_no_c      ((PK_redundant_propagate_t) 24390)
+#define PK_redundant_propagate_yes_c     ((PK_redundant_propagate_t) 24391)
+
+/* PK_REPORT_3_t */
+
+#define PK_REPORT_3_unset_c               ((PK_REPORT_3_t) 24400)
+#define PK_REPORT_3_surf_extended_c       ((PK_REPORT_3_t) 24401)
+#define PK_REPORT_3_blend_limit_topol_c   ((PK_REPORT_3_t) 24402)
+#define PK_REPORT_3_blend_limit_data_c    ((PK_REPORT_3_t) 24403)
+#define PK_REPORT_3_discontinuities_c     ((PK_REPORT_3_t) 24404)
+#define PK_REPORT_3_neutral_face_data_c   ((PK_REPORT_3_t) 24405)
+#define PK_REPORT_3_distance_err_c        ((PK_REPORT_3_t) 24406)
+#define PK_REPORT_3_worse_curvature_c     ((PK_REPORT_3_t) 24407)
+#define PK_REPORT_3_cover_surf_c          ((PK_REPORT_3_t) 24408)
+#define PK_REPORT_3_sharp_eds_c           ((PK_REPORT_3_t) 24409)
+#define PK_REPORT_3_tight_curvature_c     ((PK_REPORT_3_t) 24410)
+#define PK_REPORT_3_proj_cu_split_c       ((PK_REPORT_3_t) 24411)
+#define PK_REPORT_3_geom_extended_c       ((PK_REPORT_3_t) 24412)
+#define PK_REPORT_3_blend_x_g1_c          ((PK_REPORT_3_t) 24413)
+#define PK_REPORT_3_compound_split_c      ((PK_REPORT_3_t) 24415)
+#define PK_REPORT_3_fill_hole_non_g2_c    ((PK_REPORT_3_t) 24416)
+#define PK_REPORT_3_identified_blend_c    ((PK_REPORT_3_t) 24417)
+#define PK_REPORT_3_line_fit_tols_c       ((PK_REPORT_3_t) 24418)
+
+
+/* PK_FACE_trim_cb_t */
+
+#define PK_FACE_trim_cb_auto_c    ((PK_FACE_trim_cb_t) 24420)
+#define PK_FACE_trim_cb_fail_c    ((PK_FACE_trim_cb_t) 24421)
+
+/* PK_patch_mobility_t */
+
+#define PK_patch_mobility_fixed_c  ((PK_patch_mobility_t) 24430)
+#define PK_patch_mobility_moving_c ((PK_patch_mobility_t) 24431)
+
+/* PK_deform_uv_t */
+
+#define PK_deform_uv_face_box_c    ((PK_deform_uv_t) 24440)
+#define PK_deform_uv_all_c         ((PK_deform_uv_t) 24441)
+
+/* PK_BODY_sweep_update_t */
+
+#define PK_BODY_sweep_update_0_c       ((PK_BODY_sweep_update_t) 24450)
+#define PK_BODY_sweep_update_default_c ((PK_BODY_sweep_update_t) 24451)
+#define PK_BODY_sweep_update_1_c       ((PK_BODY_sweep_update_t) 24452)
+#define PK_BODY_sweep_update_2_c       ((PK_BODY_sweep_update_t) 24453)
+#define PK_BODY_sweep_update_3_c       ((PK_BODY_sweep_update_t) 24454)
+
+/* PK_instance_repair_fa_fa_t */
+
+#define PK_instance_repair_fa_fa_no_c  (( PK_instance_repair_fa_fa_t ) 24460)
+#define PK_instance_repair_fa_fa_yes_c (( PK_instance_repair_fa_fa_t ) 24461)
+
+/* PK_instance_track_type_t */
+
+#define PK_instance_track_type_none_c   ((PK_instance_track_type_t) 24470)
+#define PK_instance_track_type_inst_c   ((PK_instance_track_type_t) 24471)
+#define PK_instance_track_type_topol_c  ((PK_instance_track_type_t) 24472)
+#define PK_instance_track_type_both_c   ((PK_instance_track_type_t) 24473)
+
+/* PK_instance_merge_t */
+
+#define PK_instance_merge_no_c          (( PK_instance_merge_t ) 24480)
+#define PK_instance_merge_new_c         (( PK_instance_merge_t ) 24481)
+
+/* PK_DEBUG_report_cb_t */
+
+#define PK_DEBUG_report_cb_no_c         ((PK_DEBUG_report_cb_t) 24490)
+#define PK_DEBUG_report_cb_function_c   ((PK_DEBUG_report_cb_t) 24491)
+
+/* PK_neutral_trim_method_t */
+
+#define PK_neutral_trim_method_sheets_c ((PK_neutral_trim_method_t) 24500)
+#define PK_neutral_trim_method_sides_c  ((PK_neutral_trim_method_t) 24501)
+
+/* PK_fill_hole_body_type_t */
+
+#define PK_fill_hole_body_type_orig_c      ((PK_fill_hole_body_type_t) 24510)
+#define PK_fill_hole_body_type_sheet_c     ((PK_fill_hole_body_type_t) 24511)
+#define PK_fill_hole_body_type_solid_c     ((PK_fill_hole_body_type_t) 24512)
+
+/* PK_instance_track_edges_t */
+
+#define PK_instance_track_edges_no_c        ((PK_instance_track_edges_t) 24520)
+#define PK_instance_track_edges_laminar_c   ((PK_instance_track_edges_t) 24521)
+#define PK_instance_track_edges_new_c       ((PK_instance_track_edges_t) 24522)
+
+/* PK_outline_update_t */
+
+#define PK_outline_update_default_c  ((PK_outline_update_t) 24531)
+#define PK_outline_update_0_c        ((PK_outline_update_t) 24530)
+#define PK_outline_update_1_c        ((PK_outline_update_t) 24532)
+#define PK_outline_update_2_c        ((PK_outline_update_t) 24533)
+#define PK_outline_update_3_c        ((PK_outline_update_t) 24534)
+#define PK_outline_update_4_c        ((PK_outline_update_t) 24535)
+#define PK_outline_update_5_c        ((PK_outline_update_t) 24536)
+#define PK_outline_update_6_c        ((PK_outline_update_t) 24537)
+#define PK_outline_update_7_c        ((PK_outline_update_t) 24538)
+
+/* PK_neutral_overlap_t */
+
+#define PK_neutral_overlap_no_c         ((PK_neutral_overlap_t) 24540)
+#define PK_neutral_overlap_report_c     ((PK_neutral_overlap_t) 24541)
+#define PK_neutral_overlap_repair_c     ((PK_neutral_overlap_t) 24542)
+
+/* PK_isoparam_prefer_t */
+
+#define PK_isoparam_prefer_simple_c            ((PK_isoparam_prefer_t) 24550)
+#define PK_isoparam_prefer_bcurve_c            ((PK_isoparam_prefer_t) 24551)
+#define PK_isoparam_prefer_spcurve_c           ((PK_isoparam_prefer_t) 24552)
+
+/* PK_THREAD_exclusion_t */
+
+#define PK_THREAD_exclusion_none_c      ((PK_THREAD_exclusion_t) 24560)
+#define PK_THREAD_exclusion_serious_c   ((PK_THREAD_exclusion_t) 24561)
+#define PK_THREAD_exclusion_fatal_c     ((PK_THREAD_exclusion_t) 24562)
+
+/* PK_facet_pt_report_m */
+
+#define PK_facet_pt_report_no_c        ((PK_facet_pt_report_t) 24570)
+#define PK_facet_pt_report_off_eds_c   ((PK_facet_pt_report_t) 24571)
+#define PK_facet_pt_report_off_tpl_c   ((PK_facet_pt_report_t) 24572)
+
+/* PK_imprint_intersect_t */
+
+#define PK_imprint_intersect_update_c    ((PK_imprint_intersect_t) 24580)
+#define PK_imprint_intersect_fail_c      ((PK_imprint_intersect_t) 24581)
+#define PK_imprint_intersect_fix_c       ((PK_imprint_intersect_t) 24582)
+
+/* PK_SHELL_repair_tracking_t */
+
+#define  PK_SHELL_repair_tracking_no_c    ((PK_SHELL_repair_tracking_t) 24590)
+#define  PK_SHELL_repair_tracking_yes_c   ((PK_SHELL_repair_tracking_t) 24591)
+
+/* PK_SHELL_repair_stat_t */
+
+#define  PK_SHELL_repair_stat_ok_c      ((PK_SHELL_repair_stat_t) 24600)
+#define  PK_SHELL_repair_stat_no_fix_c  ((PK_SHELL_repair_stat_t) 24601)
+#define  PK_SHELL_repair_stat_invalid_c ((PK_SHELL_repair_stat_t) 24602)
+
+/* PK_SURF_degen_type_t */
+
+#define PK_SURF_degen_type_param_c         ((PK_SURF_degen_type_t) 24610)
+#define PK_SURF_degen_type_phys_cvx_c      ((PK_SURF_degen_type_t) 24611)
+#define PK_SURF_degen_type_phys_ccv_c      ((PK_SURF_degen_type_t) 24612)
+#define PK_SURF_degen_type_phys_mixed_c    ((PK_SURF_degen_type_t) 24613)
+#define PK_SURF_degen_type_phys_undef_c    ((PK_SURF_degen_type_t) 24614)
+
+/* PK_check_state_t */
+
+#define PK_ASSEMBLY_state_bad_type_c    ((PK_check_state_t) 24620   )
+#define PK_ASSEMBLY_state_cyclic_ref_c  ((PK_check_state_t) 24621   )
+#define PK_BODY_state_bad_type_c        ((PK_check_state_t) 24622   )
+#define PK_BODY_state_no_region_c       ((PK_check_state_t) 24623   )
+#define PK_BODY_state_no_shell_c        ((PK_check_state_t) 24624   )
+#define PK_BODY_state_no_solid_reg_c    ((PK_check_state_t) 24625   )
+#define PK_BODY_state_region_1_solid_c  ((PK_check_state_t) 24626   )
+#define PK_BODY_state_shell_not_first_c ((PK_check_state_t) 24627   )
+#define PK_BODY_state_wrong_ext_reg_c   ((PK_check_state_t) 24628   )
+#define PK_BODY_state_wrong_num_regs_c  ((PK_check_state_t) 24629   )
+#define PK_EDGE_state_bad_fins_c        ((PK_check_state_t) 24630   )
+#define PK_EDGE_state_bad_tol_c         ((PK_check_state_t) 24631   )
+#define PK_EDGE_state_fin_bad_ring_c    ((PK_check_state_t) 24632   )
+#define PK_EDGE_state_fin_ed_next_pos_c ((PK_check_state_t) 24633   )
+#define PK_EDGE_state_fin_ed_not_ed_c   ((PK_check_state_t) 24634   )
+#define PK_EDGE_state_fin_not_pos_c     ((PK_check_state_t) 24635   )
+#define PK_EDGE_state_single_vertex_c   ((PK_check_state_t) 24636   )
+#define PK_EDGE_state_wire_corrupt_c    ((PK_check_state_t) 24637   )
+#define PK_ENTITY_state_bad_owner_c     ((PK_check_state_t) 24639   )
+#define PK_ENTITY_state_has_att_group_c ((PK_check_state_t) 24640   )
+#define PK_ENTITY_state_shared_c        ((PK_check_state_t) 24641   )
+#define PK_FACE_state_diff_sh_same_rg_c ((PK_check_state_t) 24642   )
+#define PK_FACE_state_edge_moebius_c    ((PK_check_state_t) 24643   )
+#define PK_FACE_state_wrong_sense_c     ((PK_check_state_t) 24646   )
+#define PK_FIN_state_bad_c              ((PK_check_state_t) 24647   )
+#define PK_FIN_state_bad_ed_fins_c      ((PK_check_state_t) 24648   )
+#define PK_FIN_state_corrupt_c          ((PK_check_state_t) 24649   )
+#define PK_FIN_state_ed_next_is_fin_c   ((PK_check_state_t) 24650   )
+#define PK_FIN_state_edge_diff_vertex_c ((PK_check_state_t) 24651   )
+#define PK_FIN_state_no_ed_next_in_sh_c ((PK_check_state_t) 24652   )
+#define PK_FIN_state_non_zero_ident_c   ((PK_check_state_t) 24653   )
+#define PK_FIN_state_not_ed_next_prev_c ((PK_check_state_t) 24654   )
+#define PK_FIN_state_not_lp_next_prev_c ((PK_check_state_t) 24655   )
+#define PK_FIN_state_vx_not_vx_c        ((PK_check_state_t) 24656   )
+#define PK_FIN_state_wrong_vertex_c     ((PK_check_state_t) 24657   )
+#define PK_GEOM_state_bad_dep_type_c    ((PK_check_state_t) 24658   )
+#define PK_GEOM_state_bad_geom_owner_c  ((PK_check_state_t) 24659   )
+#define PK_GEOM_state_bad_owner_c       ((PK_check_state_t) 24660   )
+#define PK_GEOM_state_bad_topol_owner_c ((PK_check_state_t) 24661   )
+#define PK_GEOM_state_dup_geom_owner_c  ((PK_check_state_t) 24662   )
+#define PK_GEOM_state_not_owners_dep_c  ((PK_check_state_t) 24663   )
+#define PK_GEOM_state_not_owning_dep_c  ((PK_check_state_t) 24664   )
+#define PK_GROUP_state_bad_c            ((PK_check_state_t) 24665   )
+#define PK_INSTANCE_state_bad_transf_c  ((PK_check_state_t) 24666   )
+#define PK_INSTANCE_state_bad_type_c    ((PK_check_state_t) 24667   )
+#define PK_INSTANCE_state_corrupt_c     ((PK_check_state_t) 24668   )
+#define PK_LOOP_state_isolated_has_cu_c ((PK_check_state_t) 24669   )
+#define PK_PART_state_bad_attrib_c      ((PK_check_state_t) 24670   )
+#define PK_PART_state_bad_attrib_list_c ((PK_check_state_t) 24671   )
+#define PK_PART_state_bad_state_c       ((PK_check_state_t) 24672   )
+#define PK_PART_state_corrupt_c         ((PK_check_state_t) 24673   )
+#define PK_PART_state_has_key_c         ((PK_check_state_t) 24674   )
+#define PK_PART_state_no_key_c          ((PK_check_state_t) 24675   )
+#define PK_REGION_state_no_shell_c      ((PK_check_state_t) 24676   )
+#define PK_REGION_state_wrongly_solid_c ((PK_check_state_t) 24677   )
+#define PK_SHELL_state_bad_body_c       ((PK_check_state_t) 24678   )
+#define PK_SHELL_state_bad_fa_orient_c  ((PK_check_state_t) 24679   )
+#define PK_SHELL_state_bad_wf_acorn_c   ((PK_check_state_t) 24680   )
+#define PK_SHELL_state_bad_wf_c         ((PK_check_state_t) 24681   )
+#define PK_SHELL_state_closed_bad_fa_c  ((PK_check_state_t) 24682   )
+#define PK_SHELL_state_ed_fa_in_acorn_c ((PK_check_state_t) 24683   )
+#define PK_SHELL_state_eds_fragmented_c ((PK_check_state_t) 24684   )
+#define PK_SHELL_state_fas_fragmented_c ((PK_check_state_t) 24685   )
+#define PK_SHELL_state_no_vx_ed_fa_c    ((PK_check_state_t) 24686   )
+#define PK_SHELL_state_not_owning_vx_c  ((PK_check_state_t) 24687   )
+#define PK_SHELL_state_open_bad_fa_c    ((PK_check_state_t) 24688   )
+#define PK_SHELL_state_reg_meet_at_ed_c ((PK_check_state_t) 24689   )
+#define PK_SHELL_state_reg_meet_at_vx_c ((PK_check_state_t) 24690   )
+#define PK_SHELL_state_sheet_no_fa_c    ((PK_check_state_t) 24691   )
+#define PK_SHELL_state_too_many_fas_c   ((PK_check_state_t) 24692   )
+#define PK_TOPOL_state_bad_box_c        ((PK_check_state_t) 24693   )
+#define PK_TOPOL_state_bad_geom_share_c ((PK_check_state_t) 24694   )
+#define PK_TOPOL_state_bad_owner_type_c ((PK_check_state_t) 24695   )
+#define PK_TOPOL_state_share_no_geom_c  ((PK_check_state_t) 24696   )
+#define PK_VERTEX_state_bad_fin_c       ((PK_check_state_t) 24697   )
+#define PK_VERTEX_state_bad_isolated_c  ((PK_check_state_t) 24698   )
+#define PK_VERTEX_state_bad_tol_c       ((PK_check_state_t) 24699   )
+#define PK_VERTEX_state_fin_chains_c    ((PK_check_state_t) 24700   )
+#define PK_VERTEX_state_non_manifold_c  ((PK_check_state_t) 24701   )
+#define PK_VERTEX_state_not_dep_of_sh_c ((PK_check_state_t) 24702   )
+#define PK_VERTEX_state_owner_not_sh_c  ((PK_check_state_t) 24703   )
+#define PK_VERTEX_state_sheet_corrupt_c ((PK_check_state_t) 24704   )
+#define PK_VERTEX_state_too_many_eds_c  ((PK_check_state_t) 24705   )
+#define PK_VERTEX_state_wf_ed_bad_sh_c  ((PK_check_state_t) 24706   )
+#define PK_LOOP_state_not_closed_c      ((PK_check_state_t) 24707   )
+#define PK_TOPOL_state_extra_child_c    ((PK_check_state_t) 24708   )
+#define PK_TOPOL_state_extra_parent_c   ((PK_check_state_t) 24709   )
+#define PK_TOPOL_state_missing_parent_c ((PK_check_state_t) 24710   )
+#define PK_TOPOL_state_wrong_child_c    ((PK_check_state_t) 24711   )
+#define PK_BODY_state_ok_but_alt_type_c ((PK_check_state_t) 24712   )
+
+/* PK_check_extra_faults_t */
+
+#define PK_check_extra_faults_0_c       ((PK_check_extra_faults_t) 24720)
+#define PK_check_extra_faults_1_c       ((PK_check_extra_faults_t) 24721)
+#define PK_check_extra_faults_latest_c  ((PK_check_extra_faults_t) 24722)
+
+/* PK_extend_side_t */
+
+#define PK_extend_side_default_c             ((PK_extend_side_t) 24730)
+#define PK_extend_side_follow_adj_c          ((PK_extend_side_t) 24731)
+#define PK_extend_side_ortho_base_c          ((PK_extend_side_t) 24732)
+
+/* PK_blend_laminar_trim_t */
+
+#define PK_blend_laminar_trim_edges_c        ((PK_blend_laminar_trim_t) 24740)
+#define PK_blend_laminar_trim_bound_c        ((PK_blend_laminar_trim_t) 24741)
+
+/* PK_blend_run_out_t */
+
+#define PK_blend_run_out_angle_c      ((PK_blend_run_out_t) 24750)
+#define PK_blend_run_out_no_c         ((PK_blend_run_out_t) 24751)
+
+/* PK_check_vx_on_cu_t */
+
+#define PK_check_vx_on_cu_all_c              ((PK_check_vx_on_cu_t) 24760)
+#define PK_check_vx_on_cu_none_c             ((PK_check_vx_on_cu_t) 24761)
+#define PK_check_vx_on_cu_unbounded_c        ((PK_check_vx_on_cu_t) 24762)
+
+/* PK_GEOM_copy_t */
+
+#define PK_GEOM_copy_always_c        ((PK_GEOM_copy_t) 24770)
+#define PK_GEOM_copy_never_c         ((PK_GEOM_copy_t) 24771)
+#define PK_GEOM_copy_auto_c          ((PK_GEOM_copy_t) 24772)
+
+/* PK_GROUP_split_empty_m */
+
+#define PK_GROUP_split_empty_no_c    ((PK_GROUP_split_empty_t) 24780)
+#define PK_GROUP_split_empty_copy_c  ((PK_GROUP_split_empty_t) 24781)
+
+/* PK_GROUP_merge_empty_m */
+
+#define PK_GROUP_merge_empty_no_c    ((PK_GROUP_merge_empty_t) 24790)
+#define PK_GROUP_merge_empty_yes_c   ((PK_GROUP_merge_empty_t) 24791)
+
+/* PK_SURF_extend_update_m */
+
+#define PK_SURF_extend_update_default_c  ((PK_SURF_extend_update_t) 24810)
+#define PK_SURF_extend_update_0_c        ((PK_SURF_extend_update_t) 24811)
+
+/* PK_change_track_edges_t */
+
+#define PK_change_track_edges_no_c      ((PK_change_track_edges_t) 24820)
+#define PK_change_track_edges_laminar_c ((PK_change_track_edges_t) 24821)
+
+/* PK_imprint_dir_t */
+
+#define PK_imprint_dir_consistent_c    ((PK_imprint_dir_t) 24830)
+#define PK_imprint_dir_no_check_c      ((PK_imprint_dir_t) 24831)
+
+/* PK_blend_suggest_limit_t */
+
+#define PK_blend_suggest_limit_no_c     ((PK_blend_suggest_limit_t) 24780)
+#define PK_blend_suggest_limit_yes_c    ((PK_blend_suggest_limit_t) 24781)
+#define PK_blend_suggest_limit_patch_c  ((PK_blend_suggest_limit_t) 24782)
+
+/* PK_fix_degens_t */
+
+#define PK_fix_degens_no_c        ((PK_fix_degens_t) 24850)
+#define PK_fix_degens_offset_c    ((PK_fix_degens_t) 24851)
+#define PK_fix_degens_all_c       ((PK_fix_degens_t) 24852)
+
+/* PK_constrained_update_t */
+
+#define PK_constrained_update_0_c       ((PK_constrained_update_t) 24860)
+#define PK_constrained_update_default_c ((PK_constrained_update_t) 24861)
+#define PK_constrained_update_1_c       ((PK_constrained_update_t) 24862)
+
+/* PK_constrained_opt_t */
+
+#define PK_constrained_opt_perf_c          ((PK_constrained_opt_t) 24870)
+#define PK_constrained_opt_smoothness_c    ((PK_constrained_opt_t) 24871)
+
+/* PK_measure_t */
+
+#define PK_measure_distance_c           ((PK_measure_t) 24880)
+#define PK_measure_distance_ratio_c     ((PK_measure_t) 24881)
+#define PK_measure_chord_c              ((PK_measure_t) 24882)
+#define PK_measure_chord_ratio_c        ((PK_measure_t) 24883)
+#define PK_measure_2_chords_ratio_c     ((PK_measure_t) 24884)
+
+
+/* PK_CURVE_find_vectors_t */
+
+#define PK_CURVE_find_vectors_ok_c      ((PK_CURVE_find_vectors_t) 24890)
+#define PK_CURVE_find_vectors_err_c     ((PK_CURVE_find_vectors_t) 24891)
+#define PK_CURVE_find_vectors_degen_c   ((PK_CURVE_find_vectors_t) 24892)
+#define PK_CURVE_find_vectors_bounds_c  ((PK_CURVE_find_vectors_t) 24893)
+#define PK_CURVE_find_vectors_tol_c     ((PK_CURVE_find_vectors_t) 24894)
+#define PK_CURVE_find_vectors_tol_err_c ((PK_CURVE_find_vectors_t) 24895)
+
+/* PK_CURVE_make_bcurve_t */
+
+#define PK_CURVE_make_bcurve_exact_c     ((PK_CURVE_make_bcurve_t) 24900)
+#define PK_CURVE_make_bcurve_approx_c    ((PK_CURVE_make_bcurve_t) 24901)
+
+/* PK_fill_hole_patch_eds_t */
+
+#define PK_fill_hole_patch_eds_sharp_c   ((PK_fill_hole_patch_eds_t) 24910)
+#define PK_fill_hole_patch_eds_smooth_c   ((PK_fill_hole_patch_eds_t) 24911)
+
+/* PK_THREAD_chain_type_t */
+
+#define PK_THREAD_chain_concurrent_c    ((PK_THREAD_chain_type_t) 24920)
+#define PK_THREAD_chain_exclusive_c     ((PK_THREAD_chain_type_t) 24921)
+#define PK_THREAD_chain_none_c          ((PK_THREAD_chain_type_t) 24922)
+
+/* PK_blend_limit_type_t */
+
+#define PK_blend_limit_type_edge_c      ((PK_blend_limit_type_t) 24930)
+#define PK_blend_limit_type_overlap_c   ((PK_blend_limit_type_t) 24931)
+
+/* PK_boolean_update_t */
+
+#define PK_boolean_update_0_c       ((PK_boolean_update_t) 24940)
+#define PK_boolean_update_1_c       ((PK_boolean_update_t) 24942)
+#define PK_boolean_update_2_c       ((PK_boolean_update_t) 24943)
+#define PK_boolean_update_3_c       ((PK_boolean_update_t) 24944)
+#define PK_boolean_update_4_c       ((PK_boolean_update_t) 24945)
+#define PK_boolean_update_5_c       ((PK_boolean_update_t) 24946)
+#define PK_boolean_update_default_c ((PK_boolean_update_t) 24941)
+
+/* PK_ERROR_on_fail_t */
+
+#define PK_ERROR_on_fail_any_c  ((PK_ERROR_on_fail_t) 24950)
+#define PK_ERROR_on_fail_all_c  ((PK_ERROR_on_fail_t) 24951)
+#define PK_ERROR_on_fail_no_c   ((PK_ERROR_on_fail_t) 24952)
+
+/* PK_fill_hole_opt_t */
+
+#define PK_fill_hole_opt_performance_c    ((PK_fill_hole_opt_t) 24960)
+#define PK_fill_hole_opt_quality_c        ((PK_fill_hole_opt_t) 24961)
+
+/* PK_make_bsurf_update_t */
+
+#define PK_make_bsurf_update_default_c  ((PK_make_bsurf_update_t) 24970)
+#define PK_make_bsurf_update_0_c        ((PK_make_bsurf_update_t) 24971)
+#define PK_make_bsurf_update_1_c        ((PK_make_bsurf_update_t) 24972)
+
+/* PK_fill_hole_imprint_t */
+
+#define PK_fill_hole_imprint_sharp_c ((PK_fill_hole_imprint_t) 24980)
+#define PK_fill_hole_imprint_yes_c   ((PK_fill_hole_imprint_t) 24981)
+
+/* PK_range_param_entity_m */
+
+#define PK_range_param_entity_topol_c   ((PK_range_param_entity_t) 24990)
+#define PK_range_param_entity_sub_c     ((PK_range_param_entity_t) 24991)
+
+/* PK_results_output_m */
+
+#define PK_results_output_return_c   ((PK_results_output_t) 25000)
+#define PK_results_output_report_c   ((PK_results_output_t) 25001)
+
+/* PK_CURVE_degen_type_t */
+
+#define PK_CURVE_degen_type_param_c         ((PK_CURVE_degen_type_t) 25010)
+#define PK_CURVE_degen_type_phys_c          ((PK_CURVE_degen_type_t) 25011)
+#define PK_CURVE_degen_type_on_surf_c       ((PK_CURVE_degen_type_t) 25012)
+
+/* PK_neutral_method_t */
+
+#define PK_neutral_method_mid_offset_c  ((PK_neutral_method_t) 25020)
+#define PK_neutral_method_offset_left_c ((PK_neutral_method_t) 25021)
+#define PK_neutral_method_medial_c      ((PK_neutral_method_t) 25022)
+
+/* PK_blend_report_repaired_t */
+
+#define PK_blend_report_repaired_yes_c   ((PK_blend_report_repaired_t) 25030)
+#define PK_blend_report_repaired_no_c    ((PK_blend_report_repaired_t) 25031)
+
+/* PK_blend_limit_patch_t */
+
+#define PK_blend_limit_patch_yes_c       ((PK_blend_limit_patch_t) 25040)
+#define PK_blend_limit_patch_no_c        ((PK_blend_limit_patch_t) 25041)
+
+/* PK_EDGE_attach_update_t */
+
+#define PK_EDGE_attach_update_default_c  ((PK_EDGE_attach_update_t) 25050)
+#define PK_EDGE_attach_update_0_c        ((PK_EDGE_attach_update_t) 25051)
+
+/* PK_FACE_cover_output_t */
+
+#define PK_FACE_cover_output_replace_c    (( PK_FACE_cover_output_t ) 25060)
+#define PK_FACE_cover_output_sheet_c      (( PK_FACE_cover_output_t ) 25061)
+
+/* PK_FACE_cover_smooth_t */
+
+#define PK_FACE_cover_smooth_yes_c    (( PK_FACE_cover_smooth_t ) 25070)
+#define PK_FACE_cover_smooth_no_c     (( PK_FACE_cover_smooth_t ) 25071)
+
+/* PK_mass_local_density_t */
+
+#define PK_mass_local_density_override_c ((PK_mass_local_density_t) 25080)
+#define PK_mass_local_density_additive_c ((PK_mass_local_density_t) 25081)
+#define PK_mass_local_density_ignore_c   ((PK_mass_local_density_t) 25082)
+#define PK_mass_local_density_unset_c    ((PK_mass_local_density_t) 25083)
+
+/* PK_reset_prec_method_t */
+
+#define PK_reset_prec_method_any_c         ((PK_reset_prec_method_t) 25090)
+#define PK_reset_prec_method_inter_c       ((PK_reset_prec_method_t) 25091)
+#define PK_reset_prec_method_int_only_c    ((PK_reset_prec_method_t) 25092)
+
+/* PK_receive_compound_t */
+
+#define PK_receive_compound_split_c    ((PK_receive_compound_t) 25100)
+#define PK_receive_compound_keep_c     ((PK_receive_compound_t) 25101)
+#define PK_receive_compound_fail_c     ((PK_receive_compound_t) 25102)
+
+/* PK_fill_hole_clamp_t */
+
+#define PK_fill_hole_clamp_no_c        ((PK_fill_hole_clamp_t) 25110)
+#define PK_fill_hole_clamp_planar_c    ((PK_fill_hole_clamp_t) 25111)
+
+/* PK_selector_split_t */
+
+#define PK_selector_split_fail_c         ((PK_selector_split_t) 25130)
+#define PK_selector_split_propagate_c    ((PK_selector_split_t) 25131)
+
+/* PK_proj_connect_t */
+
+#define PK_proj_connect_none_c       (( PK_proj_connect_t ) 25140)
+#define PK_proj_connect_side_c       (( PK_proj_connect_t ) 25141)
+#define PK_proj_connect_all_c        (( PK_proj_connect_t ) 25142)
+#define PK_proj_connect_side_all_c   (( PK_proj_connect_t ) 25143)
+#define PK_proj_connect_hidden_all_c (( PK_proj_connect_t ) 25144)
+
+/* PK_proj_face_hidden_t */
+
+#define PK_proj_face_hidden_no_c     (( PK_proj_face_hidden_t ) 25150)
+#define PK_proj_face_hidden_array_c  (( PK_proj_face_hidden_t ) 25151)
+#define PK_proj_face_hidden_body_c   (( PK_proj_face_hidden_t ) 25152)
+
+/* PK_proj_max_dist_t */
+
+#define PK_proj_max_dist_no_c     (( PK_proj_max_dist_t ) 25160)
+#define PK_proj_max_dist_whole_c  (( PK_proj_max_dist_t ) 25161)
+
+/* PK_proj_split_clash_t */
+
+#define PK_proj_split_clash_no_c     ((PK_proj_split_clash_t) 25170)
+#define PK_proj_split_clash_self_c   ((PK_proj_split_clash_t) 25171)
+#define PK_proj_split_clash_all_c    ((PK_proj_split_clash_t) 25172)
+
+/* PK_proj_to_points_t */
+
+#define PK_proj_to_points_no_c     ((PK_proj_to_points_t) 25180)
+#define PK_proj_to_points_tol_c    ((PK_proj_to_points_t) 25181)
+#define PK_proj_to_points_all_c    ((PK_proj_to_points_t) 25182)
+
+/* PK_ref_alignment_t */
+
+#define PK_ref_alignment_opposed_c  ((PK_ref_alignment_t) 25190)
+#define PK_ref_alignment_aligned_c  ((PK_ref_alignment_t) 25191)
+
+/* PK_BODY_config_t */
+
+#define PK_BODY_config_standard_c   ((PK_BODY_config_t) 25200)
+#define PK_BODY_config_compound_c   ((PK_BODY_config_t) 25201)
+#define PK_BODY_config_child_c      ((PK_BODY_config_t) 25202)
+
+/* PK_selector_type_t */
+
+#define PK_selector_type_exclude_c  ((PK_selector_type_t) 25210)
+#define PK_selector_type_include_c  ((PK_selector_type_t) 25211)
+#define PK_selector_type_off_c      ((PK_selector_type_t) 25212)
+
+/* PK_compound_geom_attr_t */
+
+#define PK_compound_geom_attr_keep_c   ((PK_compound_geom_attr_t) 25220)
+#define PK_compound_geom_attr_merge_c  ((PK_compound_geom_attr_t) 25221)
+
+/* PK_check_attribs_t */
+
+#define PK_check_attribs_no_c     ((PK_check_attribs_t) 25230)
+#define PK_check_attribs_yes_c    ((PK_check_attribs_t) 25231)
+
+/* PK_EDGE_curve_dir_t */
+
+#define PK_EDGE_curve_dir_none_c    ((PK_EDGE_curve_dir_t) 25240)
+#define PK_EDGE_curve_dir_fin_c     ((PK_EDGE_curve_dir_t) 25241)
+#define PK_EDGE_curve_dir_vertex_c  ((PK_EDGE_curve_dir_t) 25242)
+#define PK_EDGE_curve_dir_point_c   ((PK_EDGE_curve_dir_t) 25243)
+
+/* PK_GEOM_soft_extended_t */
+
+#define PK_GEOM_soft_extended_no_c   ((PK_GEOM_soft_extended_t) 25250)
+#define PK_GEOM_soft_extended_yes_c  ((PK_GEOM_soft_extended_t) 25251)
+
+/* PK_chain_optimise_t */
+
+#define PK_chain_optimise_none_c         ((PK_chain_optimise_t) 25270)
+#define PK_chain_optimise_for_reblend_c  ((PK_chain_optimise_t) 25271)
+
+/* PK_swept_tool_update_t */
+
+#define PK_swept_tool_update_default_c ((PK_swept_tool_update_t) 25280)
+#define PK_swept_tool_update_0_c       ((PK_swept_tool_update_t) 25281)
+#define PK_swept_tool_update_1_c       ((PK_swept_tool_update_t) 25282)
+
+/* PK_matrix_type_t */
+
+#define PK_matrix_type_identity_c     ((PK_matrix_type_t) 25290)
+#define PK_matrix_type_rotation_c     ((PK_matrix_type_t) 25291)
+#define PK_matrix_type_reflection_c   ((PK_matrix_type_t) 25292)
+#define PK_matrix_type_general_c      ((PK_matrix_type_t) 25293)
+#define PK_matrix_type_unclassified_c ((PK_matrix_type_t) 25294)
+
+/* PK_TRANSF_diagnostics_t */
+
+#define PK_TRANSF_diagnostics_none_c   ((PK_TRANSF_diagnostics_t) 25300)
+#define PK_TRANSF_diagnostics_all_c    ((PK_TRANSF_diagnostics_t) 25301)
+
+/* PK_blend_cap_type_t */
+
+#define PK_blend_cap_type_within_c       ((PK_blend_cap_type_t) 25310)
+#define PK_blend_cap_type_beyond_c       ((PK_blend_cap_type_t) 25311)
+#define PK_blend_cap_type_at_edge_c      ((PK_blend_cap_type_t) 25312)
+
+/* PK_CURVE_is_isoparam_t */
+
+#define PK_CURVE_is_isoparam_no_c       ((PK_CURVE_is_isoparam_t) 25310)
+#define PK_CURVE_is_isoparam_yes_c      ((PK_CURVE_is_isoparam_t) 25319)
+
+/* PK_isoparam_alignment_t */
+
+#define PK_isoparam_alignment_aligned_c   ((PK_isoparam_alignment_t) 25320)
+#define PK_isoparam_alignment_opposed_c   ((PK_isoparam_alignment_t) 25321)
+#define PK_isoparam_alignment_unset_c     ((PK_isoparam_alignment_t) 25322)
+
+
+/* PK_proj_complete_t */
+
+#define PK_proj_complete_no_c      (( PK_proj_complete_t ) 25340)
+#define PK_proj_complete_edge_c    (( PK_proj_complete_t ) 25341)
+#define PK_proj_complete_laminar_c (( PK_proj_complete_t ) 25342)
+#define PK_proj_complete_faceset_c (( PK_proj_complete_t ) 25343)
+
+/* PK_proj_nominal_t */
+
+#define PK_proj_nominal_yes_c      (( PK_proj_nominal_t ) 25350)
+#define PK_proj_nominal_no_c       (( PK_proj_nominal_t ) 25351)
+
+/* PK_proj_function_t */
+
+#define PK_proj_function_project_c      ((PK_proj_function_t) 25360)
+#define PK_proj_function_imprint_c      ((PK_proj_function_t) 25361)
+#define PK_proj_function_both_c         ((PK_proj_function_t) 25362)
+
+/* PK_proj_update_t */
+
+#define PK_proj_update_default_c      ((PK_proj_update_t) 25370)
+#define PK_proj_update_0_c            ((PK_proj_update_t) 25371)
+#define PK_proj_update_1_c            ((PK_proj_update_t) 25372)
+#define PK_proj_update_2_c            ((PK_proj_update_t) 25373)
+
+/* PK_imprint_precision_t */
+
+#define PK_imprint_precision_auto_c        ((PK_imprint_precision_t) 25380)
+#define PK_imprint_precision_accurate_c    ((PK_imprint_precision_t) 25381)
+
+/* PK_neutral_face_overlap_t */
+
+#define PK_neutral_face_overlap_no_c    ((PK_neutral_face_overlap_t) 25390)
+#define PK_neutral_face_overlap_yes_c   ((PK_neutral_face_overlap_t) 25391)
+
+/* PK_facet_respect_t */
+
+#define PK_facet_respect_no_c        (( PK_facet_respect_t ) 25400)
+#define PK_facet_respect_yes_c       (( PK_facet_respect_t ) 25401)
+
+/* PK_FUNCTION_run_t */
+
+#define PK_FUNCTION_run_concurrent_c    (( PK_FUNCTION_run_t ) 25410)
+#define PK_FUNCTION_run_exclusive_c     (( PK_FUNCTION_run_t ) 25411)
+#define PK_FUNCTION_run_dynamic_c       (( PK_FUNCTION_run_t ) 25412)
+#define PK_FUNCTION_run_mutable_conc_c  (( PK_FUNCTION_run_t ) 25413)
+#define PK_FUNCTION_run_mutable_exc_c   (( PK_FUNCTION_run_t ) 25414)
+
+/* PK_blend_fault_t            ( 25420 - 25429 ) (18390-18399) */
+
+#define PK_blend_fault_g2_collar_setb_c    ((PK_blend_fault_t) 25420)
+
+/* PK_track_edges_t */
+
+#define PK_track_bodies_yes_c     ((PK_track_bodies_t) 25430)
+#define PK_track_bodies_no_c      ((PK_track_bodies_t) 25431)
+
+/* PK_outline_edge_on_t */
+
+#define PK_outline_edge_on_none_c      (( PK_outline_edge_on_t ) 25440 )
+#define PK_outline_edge_on_all_c       (( PK_outline_edge_on_t ) 25441 )
+
+/* PK_fill_hole_non_smooth_t */
+
+#define PK_fill_hole_non_smooth_fail_c  (( PK_fill_hole_non_smooth_t ) 25540 )
+#define PK_fill_hole_non_smooth_allow_c (( PK_fill_hole_non_smooth_t ) 25541 )
+
+/* PK_blend_params_t */
+
+#define PK_blend_params_none_c          ((PK_blend_params_t) 25460)
+#define PK_blend_params_face_offset_c   ((PK_blend_params_t) 25461)
+
+/* PK_blend_report_blends_t */
+
+#define PK_blend_report_blends_yes_c ((PK_blend_report_blends_t) 25470)
+#define PK_blend_report_blends_no_c  ((PK_blend_report_blends_t) 25471)
+
+/* PK_blend_distant_unders_t */
+
+#define PK_blend_distant_unders_yes_c   ((PK_blend_distant_unders_t) 25480)
+#define PK_blend_distant_unders_no_c    ((PK_blend_distant_unders_t) 25481)
+
+/* PK_repair_fa_t  */
+
+#define PK_repair_fa_yes_c        (( PK_repair_fa_t ) 25490 )
+#define PK_repair_fa_local_c      (( PK_repair_fa_t ) 25491 )
+
+/* PK_LOOP_sew_up_t */
+
+#define PK_LOOP_sew_up_loop_c (( PK_LOOP_sew_up_t ) 25500 )
+#define PK_LOOP_sew_up_no_c (( PK_LOOP_sew_up_t ) 25501 )
+
+/* PK_shadow_check_fa_t */
+
+#define PK_shadow_check_fa_no_c      (( PK_shadow_check_fa_t ) 25510 )
+#define PK_shadow_check_fa_yes_c     (( PK_shadow_check_fa_t ) 25511 )
+
+/* PK_proj_tracking_t */
+
+#define PK_proj_tracking_basic_c      (( PK_proj_tracking_t ) 25520 )
+#define PK_proj_tracking_completion_c (( PK_proj_tracking_t ) 25521 )
+
+/* PK_render_report_line_t (25550-25559) */
+
+#define PK_render_report_line_no_c         ((PK_render_report_line_t) 25550)
+#define PK_render_report_line_fail_c       ((PK_render_report_line_t) 25551)
+#define PK_render_report_line_loose_c      ((PK_render_report_line_t) 25552)
+#define PK_render_report_line_all_c        ((PK_render_report_line_t) 25553)
+
+/* PK_blend_use_master_faces_t */
+
+#define PK_blend_use_master_faces_no_c    ((PK_blend_use_master_faces_t) 25560)
+#define PK_blend_use_master_faces_yes_c   ((PK_blend_use_master_faces_t) 25561)
+
+/* PK_FACE_cover_update_t */
+
+#define PK_FACE_cover_update_default_c    ((PK_FACE_cover_update_t) 25570)
+#define PK_FACE_cover_update_0_c          ((PK_FACE_cover_update_t) 25571)
+
+/* PK_make_bcurve_update_t */
+
+#define PK_make_bcurve_update_default_c  ((PK_make_bcurve_update_t) 25580)
+#define PK_make_bcurve_update_0_c        ((PK_make_bcurve_update_t) 25581)
+
+/* PK_ITEM_null */
+
+#define PK_ITEM_null ((PK_ITEM_t) 0)
+
+/* PK_ENTITY_null */
+
+#define PK_ENTITY_null ((PK_ENTITY_t) 0)
+
+/* PK_PMARK_null */
+
+#define PK_PMARK_null ((PK_PMARK_t) 0)
+
+/* PK_MARK_null */
+
+#define PK_MARK_null ((PK_MARK_t) 0)
+
+/* PK_PARTITION_null */
+
+#define PK_PARTITION_null ((PK_PARTITION_t) 0)
+
+/* PK_APPITEM_null */
+
+#define PK_APPITEM_null ((PK_APPITEM_t) 0)
+
+/* PK_REPORT_null */
+
+#define PK_REPORT_null  ((PK_REPORT_t) -1)
+
+/* PK_ERROR_severity_t */
+
+#define PK_ERROR_none    ((PK_ERROR_severity_t) 0)
+#define PK_ERROR_mild    ((PK_ERROR_severity_t) 1)
+#define PK_ERROR_serious ((PK_ERROR_severity_t) 2)
+#define PK_ERROR_fatal   ((PK_ERROR_severity_t) 3)
+
+/* PK_LOGICAL_true, PK_LOGICAL_false */
+
+#define PK_LOGICAL_true  ((PK_LOGICAL_t) 01)
+#define PK_LOGICAL_false ((PK_LOGICAL_t) 00)
+
+/* PK_LAW_sf_m */
+
+#define PK_LAW_sf_m(sf)                                     \
+    (                                                       \
+       (sf).degree           = 0,                           \
+       (sf).n_vertices       = 0,                           \
+       (sf).vertex_dim       = 1,                           \
+       (sf).is_rational      = PK_LOGICAL_false,            \
+       (sf).vertex           = NULL,                        \
+       (sf).n_knots          = 0,                           \
+       (sf).knot_mult        = NULL,                        \
+       (sf).knot             = NULL,                        \
+       (sf).knot_type        = PK_knot_unset_c,             \
+       (sf).is_periodic      = PK_LOGICAL_false,            \
+       (sf).is_closed        = PK_LOGICAL_false             \
+    )
+
+/* #defines for PK_CLASS_xxx */
+
+#define PK_CLASS_null      ((PK_CLASS_t) 500)
+#define PK_CLASS_class     ((PK_CLASS_t)(PK_CLASS_null+ 1))
+
+/* special classes */
+
+#define PK_CLASS_entity    ((PK_CLASS_t) TYEN00)
+#define PK_CLASS_primitive ((PK_CLASS_t)(PK_CLASS_null+ 2))
+#define PK_CLASS_error     ((PK_CLASS_t)(PK_CLASS_null+ 3))
+#define PK_CLASS_session   ((PK_CLASS_t)(PK_CLASS_null+ 4))
+#define PK_CLASS_memory    ((PK_CLASS_t)(PK_CLASS_null+ 5))
+#define PK_CLASS_mark      ((PK_CLASS_t)(PK_CLASS_null+ 6))
+#define PK_CLASS_pmark     ((PK_CLASS_t)(PK_CLASS_null+ 7))
+#define PK_CLASS_partition ((PK_CLASS_t)(PK_CLASS_null+ 8))
+#define PK_CLASS_bb        ((PK_CLASS_t)(PK_CLASS_null+ 9))
+
+/* primitive classes */
+
+#define PK_CLASS_int       ((PK_CLASS_t)(PK_CLASS_null+10))
+#define PK_CLASS_double    ((PK_CLASS_t)(PK_CLASS_null+11))
+#define PK_CLASS_char      ((PK_CLASS_t)(PK_CLASS_null+12))
+#define PK_CLASS_string    ((PK_CLASS_t)(PK_CLASS_null+13))
+#define PK_CLASS_logical   ((PK_CLASS_t)(PK_CLASS_null+14))
+#define PK_CLASS_vector    ((PK_CLASS_t)(PK_CLASS_null+15))
+#define PK_CLASS_interval  ((PK_CLASS_t)(PK_CLASS_null+16))
+#define PK_CLASS_box       ((PK_CLASS_t)(PK_CLASS_null+17))
+#define PK_CLASS_uvbox     ((PK_CLASS_t)(PK_CLASS_null+18))
+#define PK_CLASS_uv        ((PK_CLASS_t)(PK_CLASS_null+19))
+#define PK_CLASS_pointer   ((PK_CLASS_t)(PK_CLASS_null+20))
+#define PK_CLASS_vector1   ((PK_CLASS_t)(PK_CLASS_null+21))
+#define PK_CLASS_size      ((PK_CLASS_t)(PK_CLASS_null+22))
+
+/* entity classes */
+
+#define PK_CLASS_attrib    ((PK_CLASS_t) TYENAD)
+#define PK_CLASS_attdef    ((PK_CLASS_t) TYADAD)
+#define PK_CLASS_group     ((PK_CLASS_t) TYADFE)
+#define PK_CLASS_transf    ((PK_CLASS_t) TYGETF)
+#define PK_CLASS_ki_list   ((PK_CLASS_t) TYADLI)
+
+/* topol */
+
+#define PK_CLASS_topol     ((PK_CLASS_t) TYENTO)
+#define PK_CLASS_part      ((PK_CLASS_t) 5012)
+#define PK_CLASS_assembly  ((PK_CLASS_t) TYTOAS)
+#define PK_CLASS_body      ((PK_CLASS_t) TYTOBY)
+#define PK_CLASS_instance  ((PK_CLASS_t) TYTOIN)
+#define PK_CLASS_region    ((PK_CLASS_t) TYTORG)
+#define PK_CLASS_shell     ((PK_CLASS_t) TYTOSH)
+#define PK_CLASS_face      ((PK_CLASS_t) TYTOFA)
+#define PK_CLASS_loop      ((PK_CLASS_t) TYTOLO)
+#define PK_CLASS_edge      ((PK_CLASS_t) TYTOED)
+#define PK_CLASS_fin       ((PK_CLASS_t) TYTOFN)
+#define PK_CLASS_vertex    ((PK_CLASS_t) TYTOVX)
+
+/* geom */
+
+#define PK_CLASS_geom      ((PK_CLASS_t) TYENGE)
+
+/* surf */
+
+#define PK_CLASS_surf      ((PK_CLASS_t) TYGESU)
+#define PK_CLASS_plane     ((PK_CLASS_t) TYSUPL)
+#define PK_CLASS_cyl       ((PK_CLASS_t) TYSUCY)
+#define PK_CLASS_cone      ((PK_CLASS_t) TYSUCO)
+#define PK_CLASS_sphere    ((PK_CLASS_t) TYSUSP)
+#define PK_CLASS_torus     ((PK_CLASS_t) TYSUTO)
+#define PK_CLASS_bsurf     ((PK_CLASS_t) TYSUPA)
+#define PK_CLASS_offset    ((PK_CLASS_t) TYSUOF)
+#define PK_CLASS_fsurf     ((PK_CLASS_t) TYSUFG)
+#define PK_CLASS_swept     ((PK_CLASS_t) TYSUSE)
+#define PK_CLASS_spun      ((PK_CLASS_t) TYSUSU)
+#define PK_CLASS_blendsf   ((PK_CLASS_t) TYSUBL)
+
+/* curve */
+
+#define PK_CLASS_curve     ((PK_CLASS_t) TYGECU)
+#define PK_CLASS_line      ((PK_CLASS_t) TYCUST)
+#define PK_CLASS_circle    ((PK_CLASS_t) TYCUCI)
+#define PK_CLASS_ellipse   ((PK_CLASS_t) TYCUEL)
+#define PK_CLASS_bcurve    ((PK_CLASS_t) TYCUPA)
+#define PK_CLASS_icurve    ((PK_CLASS_t) TYCUIN)
+#define PK_CLASS_fcurve    ((PK_CLASS_t) TYCUFG)
+#define PK_CLASS_spcurve   ((PK_CLASS_t) TYCUSP)
+#define PK_CLASS_trcurve   ((PK_CLASS_t) TYCUTR)
+#define PK_CLASS_cpcurve   ((PK_CLASS_t) TYCUCP)
+
+/* point */
+
+#define PK_CLASS_point     ((PK_CLASS_t) TYPTCA)
+
+/* nabox */
+
+#define PK_CLASS_nabox     ((PK_CLASS_t) 2005)
+#define PK_CLASS_item      ((PK_CLASS_t)(PK_CLASS_null+23))
+#define PK_CLASS_appitem   ((PK_CLASS_t)(PK_CLASS_null+24))
+
+/* alias names for where PK terminology is totally different from KI */
+
+#define PK_ERROR_not_in_group               PK_ERROR_not_in_feat
+#define PK_ERROR_wrong_class_for_group      PK_ERROR_wrong_type_for_feat
+#define PK_ERROR_already_in_group           PK_ERROR_already_in_feat
+#define PK_ERROR_existing_attdef            PK_ERROR_existing_attr_type
+#define PK_ERROR_duplicate_array_item       PK_ERROR_duplicate_list_item
+#define PK_ERROR_not_an_entity              PK_ERROR_not_a_tag
+#define PK_ERROR_wrong_entity_in_array      PK_ERROR_wrong_entity_in_list
+#define PK_ERROR_array_too_short            PK_ERROR_list_too_short
+#define PK_ERROR_R1_R2_mismatch             PK_ERROR_majrad_minrad_mismatch
+#define PK_ERROR_impossible_spin            PK_ERROR_impossible_swing
+#define PK_ERROR_no_closest_approach        KI_closest_approach_failed
+#define PK_ERROR_bad_class_event_comb       KI_bad_entity_event_comb
+#define PK_ERROR_bb_is_off                  KI_bulletinb_is_off
+#define PK_ERROR_FG_eval_not_found          PK_ERROR_FG_evaluator_not_found
+#define PK_ERROR_FG_doubles                 PK_ERROR_FG_real_data_error
+#define PK_ERROR_FG_ints                    PK_ERROR_FG_integer_data_error
+
+/* #defines for PK_ERROR_code_t - which don't exist in the KI. */
+
+#define PK_ERROR_not_implemented        ((PK_ERROR_code_t)  5000)
+#define PK_ERROR_not_in_PK              ((PK_ERROR_code_t)  5001)
+#define PK_ERROR_unknown_class          ((PK_ERROR_code_t)  5002)
+#define PK_ERROR_frustrum_failure       ((PK_ERROR_code_t)  5003)
+#define PK_ERROR_recursion_depth        ((PK_ERROR_code_t)  5004)
+#define PK_ERROR_not_a_part             ((PK_ERROR_code_t)  5005)
+#define PK_ERROR_bad_mark               ((PK_ERROR_code_t)  5006)
+#define PK_ERROR_mark_ki_started        ((PK_ERROR_code_t)  5007)
+#define PK_ERROR_mark_not_started       ((PK_ERROR_code_t)  5008)
+#define PK_ERROR_num_derivs_not_equal   ((PK_ERROR_code_t)  5009)
+#define PK_ERROR_memory_not_empty       ((PK_ERROR_code_t)  5010)
+#define PK_ERROR_no_last_error          ((PK_ERROR_code_t)  5011)
+#define PK_ERROR_zero_bytes_required    ((PK_ERROR_code_t)  5012)
+#define PK_ERROR_bad_field_number       ((PK_ERROR_code_t)  5013)
+#define PK_ERROR_field_of_wrong_type    ((PK_ERROR_code_t)  5014)
+#define PK_ERROR_invalid_group_class    ((PK_ERROR_code_t)  5015)
+#define PK_ERROR_unhandleable_condition ((PK_ERROR_code_t)  5016)
+#define PK_ERROR_wrong_group_class      ((PK_ERROR_code_t)  5017)
+#define PK_ERROR_eval_failure           ((PK_ERROR_code_t)  5018)
+#define PK_ERROR_not_a_unit_vector      ((PK_ERROR_code_t)  5019)
+#define PK_ERROR_existing_attrib        ((PK_ERROR_code_t)  5020)
+#define PK_ERROR_solid_region           ((PK_ERROR_code_t)  5021)
+#define PK_ERROR_o_t_version_unknown    ((PK_ERROR_code_t)  5022)
+#define PK_ERROR_mark_pk_started        ((PK_ERROR_code_t)  5023)
+#define PK_ERROR_vectors_are_parallel   ((PK_ERROR_code_t)  5024)
+#define PK_ERROR_sum_of_offsets_eq_0    ((PK_ERROR_code_t)  5025)
+#define PK_ERROR_distance_too_small     ((PK_ERROR_code_t)  5026)
+#define PK_ERROR_vectors_not_orthogonal ((PK_ERROR_code_t)  5027)
+#define PK_ERROR_zero_interval          ((PK_ERROR_code_t)  5028)
+#define PK_ERROR_periodic_open          ((PK_ERROR_code_t)  5029)
+#define PK_ERROR_periodic_not_smooth    ((PK_ERROR_code_t)  5030)
+#define PK_ERROR_cant_get_point         ((PK_ERROR_code_t)  5031)
+#define PK_ERROR_cant_get_curve         ((PK_ERROR_code_t)  5032)
+#define PK_ERROR_edge_didnt_vanish      ((PK_ERROR_code_t)  5033)
+#define PK_ERROR_face_face_check_fails  ((PK_ERROR_code_t)  5034)
+#define PK_ERROR_face_check_fails       ((PK_ERROR_code_t)  5035)
+#define PK_ERROR_not_a_hand             ((PK_ERROR_code_t)  5036)
+#define PK_ERROR_bad_interval           ((PK_ERROR_code_t)  5037)
+#define PK_ERROR_bad_uvbox              ((PK_ERROR_code_t)  5038)
+#define PK_ERROR_cannot_make_current    ((PK_ERROR_code_t)  5039)
+#define PK_ERROR_bb_not_empty           ((PK_ERROR_code_t)  5040)
+#define PK_ERROR_bad_class              ((PK_ERROR_code_t)  5041)
+#define PK_ERROR_bad_class_combn        ((PK_ERROR_code_t)  5042)
+#define PK_ERROR_o_t_version_incorrect  ((PK_ERROR_code_t)  5043)
+#define PK_ERROR_bad_boolean_function   ((PK_ERROR_code_t)  5044)
+#define PK_ERROR_bad_boolean_region     ((PK_ERROR_code_t)  5045)
+#define PK_ERROR_distancing_failed      ((PK_ERROR_code_t)  5046)
+#define PK_ERROR_no_overlap             ((PK_ERROR_code_t)  5047)
+#define PK_ERROR_rollback_not_started   ((PK_ERROR_code_t)  5048)
+#define PK_ERROR_rollback_started       ((PK_ERROR_code_t)  5049)
+#define PK_ERROR_cant_get_surf          ((PK_ERROR_code_t)  5050)
+#define PK_ERROR_bad_section_fence      ((PK_ERROR_code_t)  5051)
+#define PK_ERROR_bad_boolean_fence      ((PK_ERROR_code_t)  5052)
+#define PK_ERROR_cant_get_side_curve    ((PK_ERROR_code_t)  5053)
+#define PK_ERROR_cant_get_side_surf     ((PK_ERROR_code_t)  5054)
+#define PK_ERROR_sewing_failed          ((PK_ERROR_code_t)  5055)
+#define PK_ERROR_duplicate_parts        ((PK_ERROR_code_t)  5056)
+#define PK_ERROR_deltas_not_available   ((PK_ERROR_code_t)  5057)
+#define PK_ERROR_not_at_pmark           ((PK_ERROR_code_t)  5058)
+#define PK_ERROR_bad_boolean_match      ((PK_ERROR_code_t)  5059)
+#define PK_ERROR_invalid_match_region   ((PK_ERROR_code_t)  5060)
+#define PK_ERROR_check_error            ((PK_ERROR_code_t)  5061)
+#define PK_ERROR_check_failure          ((PK_ERROR_code_t)  5062)
+#define PK_ERROR_no_approx_data         ((PK_ERROR_code_t)  5063)
+#define PK_ERROR_not_general            ((PK_ERROR_code_t)  5064)
+#define PK_ERROR_cant_merge_regions     ((PK_ERROR_code_t)  5065)
+#define PK_ERROR_not_a_bb               ((PK_ERROR_code_t)  5066)
+#define PK_ERROR_bad_bb_status          ((PK_ERROR_code_t)  5067)
+#define PK_ERROR_unsupported_operation  ((PK_ERROR_code_t)  5068)
+#define PK_ERROR_bad_end_condition      ((PK_ERROR_code_t)  5069)
+#define PK_ERROR_bad_boolean_select     ((PK_ERROR_code_t)  5070)
+#define PK_ERROR_bad_thread             ((PK_ERROR_code_t)  5071)
+#define PK_ERROR_no_intersect           ((PK_ERROR_code_t)  5072)
+#define PK_ERROR_obsolete_function      ((PK_ERROR_code_t)  5073)
+#define PK_ERROR_reverse_edge_failed    ((PK_ERROR_code_t)  5074)
+#define PK_ERROR_orientation_failed     ((PK_ERROR_code_t)  5075)
+#define PK_ERROR_bad_edge               ((PK_ERROR_code_t)  5076)
+#define PK_ERROR_curve_nmnl_off         ((PK_ERROR_code_t)  5077)
+#define PK_ERROR_bad_pattern_check      ((PK_ERROR_code_t)  5078)
+#define PK_ERROR_bad_pattern_status     ((PK_ERROR_code_t)  5079)
+#define PK_ERROR_bad_pattern_result     ((PK_ERROR_code_t)  5080)
+#define PK_ERROR_wrong_version_delta    ((PK_ERROR_code_t)  5081)
+#define PK_ERROR_edge_not_open          ((PK_ERROR_code_t)  5082)
+#define PK_ERROR_edge_not_manifold      ((PK_ERROR_code_t)  5083)
+#define PK_ERROR_vertex_not_manifold    ((PK_ERROR_code_t)  5084)
+#define PK_ERROR_no_common_vertex       ((PK_ERROR_code_t)  5085)
+#define PK_ERROR_fin_not_at_vertex      ((PK_ERROR_code_t)  5086)
+#define PK_ERROR_bad_fin                ((PK_ERROR_code_t)  5087)
+#define PK_ERROR_not_laminar_side       ((PK_ERROR_code_t)  5088)
+#define PK_ERROR_wireframe_edge         ((PK_ERROR_code_t)  5089)
+#define PK_ERROR_different_shells       ((PK_ERROR_code_t)  5090)
+#define PK_ERROR_face_contains_loop     ((PK_ERROR_code_t)  5091)
+#define PK_ERROR_only_one_loop          ((PK_ERROR_code_t)  5092)
+#define PK_ERROR_invalid_face           ((PK_ERROR_code_t)  5093)
+#define PK_ERROR_fins_not_distinct      ((PK_ERROR_code_t)  5094)
+#define PK_ERROR_bad_check_topol        ((PK_ERROR_code_t)  5095)
+#define PK_ERROR_bad_check_su_X         ((PK_ERROR_code_t)  5096)
+#define PK_ERROR_bad_change_topol       ((PK_ERROR_code_t)  5097)
+#define PK_ERROR_bad_local_status       ((PK_ERROR_code_t)  5098)
+#define PK_ERROR_bad_topol_track        ((PK_ERROR_code_t)  5099)
+#define PK_ERROR_fin_not_in_loop        ((PK_ERROR_code_t)  5100)
+#define PK_ERROR_too_many_edges         ((PK_ERROR_code_t)  5101)
+#define PK_ERROR_loop_not_isolated      ((PK_ERROR_code_t)  5102)
+#define PK_ERROR_loops_not_same_face    ((PK_ERROR_code_t)  5103)
+#define PK_ERROR_bad_boolean_report     ((PK_ERROR_code_t)  5104)
+#define PK_ERROR_bad_boolean_result     ((PK_ERROR_code_t)  5105)
+#define PK_ERROR_bad_section_report     ((PK_ERROR_code_t)  5106)
+#define PK_ERROR_bad_section_result     ((PK_ERROR_code_t)  5107)
+#define PK_ERROR_edge_is_wire           ((PK_ERROR_code_t)  5108)
+#define PK_ERROR_bad_boolean_check_fa   ((PK_ERROR_code_t)  5109)
+#define PK_ERROR_bad_section_check_fa   ((PK_ERROR_code_t)  5110)
+#define PK_ERROR_inconsistent_offset    ((PK_ERROR_code_t)  5111)
+#define PK_ERROR_inconsistent_thicken   ((PK_ERROR_code_t)  5112)
+#define PK_ERROR_bad_twist_law          ((PK_ERROR_code_t)  5113)
+#define PK_ERROR_bad_scale_law          ((PK_ERROR_code_t)  5114)
+#define PK_ERROR_bad_profile_matching   ((PK_ERROR_code_t)  5115)
+#define PK_ERROR_bad_end_conditions     ((PK_ERROR_code_t)  5116)
+#define PK_ERROR_loft_failed            ((PK_ERROR_code_t)  5117)
+#define PK_ERROR_sweep_failed           ((PK_ERROR_code_t)  5118)
+#define PK_ERROR_different_loops        ((PK_ERROR_code_t)  5119)
+#define PK_ERROR_edge_is_ring           ((PK_ERROR_code_t)  5120)
+#define PK_ERROR_loops_not_distinct     ((PK_ERROR_code_t)  5121)
+#define PK_ERROR_point_contact          ((PK_ERROR_code_t)  5122)
+#define PK_ERROR_sweep_need_piecewise   ((PK_ERROR_code_t)  5123)
+#define PK_ERROR_zero_vector            ((PK_ERROR_code_t)  5124)
+#define PK_ERROR_bad_iteration_count    ((PK_ERROR_code_t)  5125)
+#define PK_ERROR_bad_gap_bound          ((PK_ERROR_code_t)  5126)
+#define PK_ERROR_bad_match_style        ((PK_ERROR_code_t)  5127)
+#define PK_ERROR_no_division            ((PK_ERROR_code_t)  5128)
+#define PK_ERROR_no_nth_division        ((PK_ERROR_code_t)  5129)
+#define PK_ERROR_bad_reference          ((PK_ERROR_code_t)  5130)
+#define PK_ERROR_cant_fill_hole         ((PK_ERROR_code_t)  5131)
+#define PK_ERROR_no_data                ((PK_ERROR_code_t)  5132)
+#define PK_ERROR_too_many_geoms         ((PK_ERROR_code_t)  5133)
+#define PK_ERROR_disjoint               ((PK_ERROR_code_t)  5134)
+#define PK_ERROR_duplicate_name         ((PK_ERROR_code_t)  5135)
+#define PK_ERROR_failed_to_make_outline ((PK_ERROR_code_t)  5136)
+#define PK_ERROR_failed_to_blend        ((PK_ERROR_code_t)  5137)
+#define PK_ERROR_failed_to_offset       ((PK_ERROR_code_t)  5138)
+#define PK_ERROR_failed_to_taper        ((PK_ERROR_code_t)  5139)
+#define PK_ERROR_failed_to_transform    ((PK_ERROR_code_t)  5140)
+#define PK_ERROR_journalling_on         ((PK_ERROR_code_t)  5141)
+#define PK_ERROR_dbg_rprt_not_stopped   ((PK_ERROR_code_t)  5142)
+#define PK_ERROR_dbg_rprt_not_started   ((PK_ERROR_code_t)  5143)
+#define PK_ERROR_imprint_shadows_failed ((PK_ERROR_code_t)  5144)
+#define PK_ERROR_bad_combination        ((PK_ERROR_code_t)  5145)
+#define PK_ERROR_partition_is_current   ((PK_ERROR_code_t)  5146)
+#define PK_ERROR_partition_not_empty    ((PK_ERROR_code_t)  5147)
+#define PK_ERROR_failed_to_bend         ((PK_ERROR_code_t)  5148)
+#define PK_ERROR_cant_use_curve         ((PK_ERROR_code_t)  5149)
+#define PK_ERROR_cant_extend            ((PK_ERROR_code_t)  5150)
+#define PK_ERROR_bad_boolean_material   ((PK_ERROR_code_t)  5151)
+#define PK_ERROR_cant_complete_imprint  ((PK_ERROR_code_t)  5152)
+#define PK_ERROR_edge_closure_mismatch  ((PK_ERROR_code_t)  5153)
+#define PK_ERROR_bad_boolean_prefer     ((PK_ERROR_code_t)  5154)
+#define PK_ERROR_not_started            ((PK_ERROR_code_t)  5155)
+#define PK_ERROR_not_stopped            ((PK_ERROR_code_t)  5156)
+#define PK_ERROR_bad_output_session     ((PK_ERROR_code_t)  5157)
+#define PK_ERROR_bad_boolean_no_effect  ((PK_ERROR_code_t)  5158)
+#define PK_ERROR_null_evaluator         ((PK_ERROR_code_t)  5159)
+#define PK_ERROR_ambiguous_imprint      ((PK_ERROR_code_t)  5160)
+#define PK_ERROR_bad_match_update       ((PK_ERROR_code_t)  5161)
+#define PK_ERROR_cant_limit_faces       ((PK_ERROR_code_t)  5162)
+#define PK_ERROR_bad_partition          ((PK_ERROR_code_t)  5163)
+#define PK_ERROR_edge_too_short         ((PK_ERROR_code_t)  5164)
+#define PK_ERROR_loop_is_sliver         ((PK_ERROR_code_t)  5165)
+#define PK_ERROR_cyclic_group           ((PK_ERROR_code_t)  5166)
+#define PK_ERROR_find_self_int_failed   ((PK_ERROR_code_t)  5167)
+#define PK_ERROR_indexio_not_registered ((PK_ERROR_code_t)  5168)
+#define PK_ERROR_xt_data_not_indexed    ((PK_ERROR_code_t)  5169)
+#define PK_ERROR_bad_report             ((PK_ERROR_code_t)  5170)
+#define PK_ERROR_wrong_report           ((PK_ERROR_code_t)  5171)
+#define PK_ERROR_fix_self_int_failed    ((PK_ERROR_code_t)  5172)
+#define PK_ERROR_wrong_number_entities  ((PK_ERROR_code_t)  5173)
+#define PK_ERROR_clashing_limits        ((PK_ERROR_code_t)  5174)
+#define PK_ERROR_closed_report          ((PK_ERROR_code_t)  5175)
+#define PK_ERROR_bad_cap_definition     ((PK_ERROR_code_t)  5176)
+#define PK_ERROR_mutual_dependency      ((PK_ERROR_code_t)  5177)
+#define PK_ERROR_artificial_error       ((PK_ERROR_code_t)  5178)
+#define PK_ERROR_failed_to_deform       ((PK_ERROR_code_t)  5179)
+#define PK_ERROR_evaluator_failed       ((PK_ERROR_code_t)  5180)
+#define PK_ERROR_su_not_coincident      ((PK_ERROR_code_t)  5181)
+#define PK_ERROR_tool_generation        ((PK_ERROR_code_t)  5182)
+#define PK_ERROR_unsupported_transf     ((PK_ERROR_code_t)  5183)
+#define PK_ERROR_bad_2d_viewport        ((PK_ERROR_code_t)  5184)
+#define PK_ERROR_find_degens_failed     ((PK_ERROR_code_t)  5185)
+#define PK_ERROR_fix_degens_failed      ((PK_ERROR_code_t)  5186)
+#define PK_ERROR_bad_orientation        ((PK_ERROR_code_t)  5187)
+#define PK_ERROR_laminar_edge           ((PK_ERROR_code_t)  5188)
+#define PK_ERROR_copy_failed            ((PK_ERROR_code_t)  5189)
+#define PK_ERROR_find_interior_failed   ((PK_ERROR_code_t)  5190)
+#define PK_ERROR_failed_to_facet        ((PK_ERROR_code_t)  5191)
+#define PK_ERROR_cant_get_vectors       ((PK_ERROR_code_t)  5192)
+#define PK_ERROR_bad_chord              ((PK_ERROR_code_t)  5193)
+#define PK_ERROR_interval_exceed_period ((PK_ERROR_code_t)  5194)
+#define PK_ERROR_interval_le_0          ((PK_ERROR_code_t)  5195)
+#define PK_ERROR_no_measurements        ((PK_ERROR_code_t)  5196)
+#define PK_ERROR_failed_to_change       ((PK_ERROR_code_t)  5197)
+#define PK_ERROR_invalid_methods        ((PK_ERROR_code_t)  5198)
+#define PK_ERROR_cant_find_thickness    ((PK_ERROR_code_t)  5199)
+#define PK_ERROR_zero_thickness         ((PK_ERROR_code_t)  5200)
+#define PK_ERROR_cant_make_valid_split  ((PK_ERROR_code_t)  5201)
+#define PK_ERROR_same_edge              ((PK_ERROR_code_t)  5202)
+#define PK_ERROR_density_lt_0           ((PK_ERROR_code_t)  5203)
+#define PK_ERROR_cant_cover             ((PK_ERROR_code_t)  5204)
+#define PK_ERROR_bad_faces              ((PK_ERROR_code_t)  5205)
+#define PK_ERROR_bad_acorn              ((PK_ERROR_code_t)  5206)
+#define PK_ERROR_child_body             ((PK_ERROR_code_t)  5207)
+#define PK_ERROR_grid_not_on_boundary   ((PK_ERROR_code_t)  5208)
+#define PK_ERROR_grid_disjoint          ((PK_ERROR_code_t)  5209)
+#define PK_ERROR_grid_not_wireframe     ((PK_ERROR_code_t)  5210)
+#define PK_ERROR_grid_not_smooth        ((PK_ERROR_code_t)  5211)
+#define PK_ERROR_not_smooth             ((PK_ERROR_code_t)  5212)
+#define PK_ERROR_ambiguous_selector     ((PK_ERROR_code_t)  5213)
+#define PK_ERROR_inconsistent_selection ((PK_ERROR_code_t)  5214)
+#define PK_ERROR_callback_failed        ((PK_ERROR_code_t)  5215)
+#define PK_ERROR_illegal_cliff          ((PK_ERROR_code_t)  5216)
+#define PK_ERROR_bad_blend_rho_type     ((PK_ERROR_code_t)  5217)
+#define PK_ERROR_failed_to_project      ((PK_ERROR_code_t)  5218)
+#define PK_ERROR_all_edges_in_body      ((PK_ERROR_code_t)  5219)
+#define PK_ERROR_not_edge_on            ((PK_ERROR_code_t)  5220)
+#define PK_ERROR_function_not_conc      ((PK_ERROR_code_t)  5221)
+#define PK_ERROR_function_not_exclusive ((PK_ERROR_code_t)  5222)
+#define PK_ERROR_function_not_mutable   ((PK_ERROR_code_t)  5223)
+#define PK_ERROR_invalid_object         ((PK_ERROR_code_t)  9999)
+
+/* PK_imprint_face_list_t */
+
+#define PK_imprint_face_list_no_c     (( PK_imprint_face_list_t ) 00)
+#define PK_imprint_face_list_target_c (( PK_imprint_face_list_t ) 01)
+#define PK_imprint_face_list_tool_c   (( PK_imprint_face_list_t ) 02)
+#define PK_imprint_face_list_both_c   (( PK_imprint_face_list_t ) 03)
+
+/* PK_FACE_heal_loops_t */
+
+#define PK_FACE_heal_loops_together_c  (( PK_FACE_heal_loops_t ) 00)
+#define PK_FACE_heal_loops_separate_c  (( PK_FACE_heal_loops_t ) 01)
+#define PK_FACE_heal_loops_auto_c      (( PK_FACE_heal_loops_t ) 02)
+
+
+/*********************************************************************/
+/* FUNCTIONS */
+/*********************************************************************/
+
+
+#ifdef __cplusplus
+#define PK_linkage_m extern "C"
+#else
+#define PK_linkage_m extern
+#endif
+
+
+PK_linkage_m PK_ERROR_code_t PK_CLASS_ask_superclass
+(
+/* received */
+PK_CLASS_t         /*class*/,             /* a class */
+/* returned */
+PK_CLASS_t *const  /*superclass*/         /* immediate superclass of class */
+);
+/*
+This function return the class token of the given class's immediate superclass.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CLASS_is_subclass
+(
+/* received */
+PK_CLASS_t           /*may_be_subclass*/, /* a potential subclass */
+PK_CLASS_t           /*class*/,           /* a class */
+/* returned */
+PK_LOGICAL_t *const  /*is_subclass*/      /* whether it was a subclass */
+);
+/*
+This function returns whether `may_be_subclass' is a subclass of `class'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_DELTA_register_callbacks
+(
+/* received */
+PK_DELTA_frustrum_t  /*frustrum*/  /* frustrum functions */
+);
+/*
+This function registers the partitioned rollback frustrum, and switches on
+partitioned rollback. It should be called before PK_SESSION_start.
+(PK_SESSION_stop switches off partitioned rollback and deregisters the
+partitioned rollback frustrum).
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_create
+(
+/* returned */
+PK_MARK_t *const  /*mark*/               /* created mark */
+);
+/*
+This function sets a rollmark and returns a mark identifier.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_goto
+(
+/* received */
+PK_MARK_t        /*mark*/             /* mark to go to */
+);
+/*
+This function returns the modeller to the state when the given mark was
+created.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_delete
+(
+/* received */
+PK_MARK_t        /*mark*/             /* mark to delete */
+);
+/*
+This function deletes the given mark. The remaining marks, if any, will still
+form a linear sequence.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_start
+(
+/* received */
+PK_MARK_frustrum_t         /*frustrum*/,  /* frustrum functions */
+const PK_MARK_start_o_t  * /*options*/    /* options structure */
+);
+/*
+This function starts non-partitioned PK rollback.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_is_on
+(
+/* returned */
+PK_LOGICAL_t *const  /*is_on*/           /* whether non-partitioned rollback active */
+);
+/*
+This function returns whether the non-partitioned PK rollback system is active.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_is
+(
+/* received */
+int                  /*may_be_mark*/,   /* potential mark */
+/* returned */
+PK_LOGICAL_t *const  /*is_mark*/        /* whether it is a mark */
+);
+/*
+This function returns whether the given argument is a mark.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_following
+(
+/* received */
+PK_MARK_t         /*mark*/,      /* a mark */
+/* returned */
+PK_MARK_t *const  /*following*/      /* its following mark */
+);
+/*
+This function returns the mark following the given one. If the given mark is
+the last mark, PK_MARK_null is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_preceding
+(
+/* received */
+PK_MARK_t         /*mark*/,      /* a mark */
+/* returned */
+PK_MARK_t *const  /*preceding*/      /* its preceding mark */
+);
+/*
+This function returns the mark preceding the given one. If the given mark is
+the first mark, PK_MARK_null is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_state
+(
+/* returned */
+PK_MARK_t    *const  /*current*/,        /* current (or immediately previous) mark */
+PK_LOGICAL_t *const  /*is_at_mark*/      /* whether modeller is at mark */
+);
+/*
+This function returns the current state of the non-partitioned PK rollback
+system.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_frustrum
+(
+/* returned */
+PK_MARK_frustrum_t *const  /*frustrum*/  /* frustrum functions */
+);
+/*
+This function returns the registered frustrum of the non-partitioned PK
+rollback system.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_forward
+(
+/* returned */
+PK_LOGICAL_t *const  /*is_enabled*/      /* whether roll forward is enabled */
+);
+/*
+This function returns PK_LOGICAL_true if roll-forward is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_stop
+(
+void
+);
+/*
+This function shuts down the non-partitioned PK rollback system.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MARK_ask_pmarks
+(
+/* received */
+PK_MARK_t           /*mark*/,            /* mark to find pmarks for */
+/* returned */
+int         *const  /*n_pmarks*/,        /* number of pmarks of mark */
+PK_PMARK_t **const  /*pmarks*/           /* pmarks of mark */
+);
+/*
+This function returns the pmarks which are used by the given mark, i.e. those
+which would be current if the given mark were rolled to - one for each
+partition in the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_register_callbacks
+(
+/* received */
+PK_MEMORY_frustrum_t  /*frustrum*/       /* application's memory handlers */
+);
+/*
+This function registers memory allocation and free functions for Parasolid
+to use when returning variable length information.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_ask_callbacks
+(
+/* returned */
+PK_MEMORY_frustrum_t *const  /*frustrum*/       /* current memory handlers */
+);
+/*
+This function returns the functions which are currently registered for
+Parasolid to use when allocating and freeing variable length information
+returned from the PK interface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_free
+(
+/* received */
+void           * /*pointer*/             /* pointer to allocated memory */
+);
+/*
+This function frees previously allocated memory.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_alloc
+(
+/* received */
+size_t           /*nbytes*/,             /* number of bytes required */
+/* returned */
+void    **const  /*pointer*/             /* allocated memory (possibly NULL) */
+);
+/*
+This function allocates the specified amount of memory required in bytes.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_set_block_size
+(
+/* received */
+size_t           /*size*/   /* required default block size */
+);
+/*
+This function sets the size of the smallest block of memory that Parasolid
+will request from FMALLO (PK_FMALLO_f_t) for modelling data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_ask_block_size
+(
+/* returned */
+size_t   *const  /*size*/   /* default block size */
+);
+/*
+This function returns the current smallest size of a block of memory that
+Parasolid will request from FMALLO (PK_FMALLO_f_t) for storing modelling data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_MEMORY_block_f
+(
+/* received */
+PK_MEMORY_block_t *const  /*block*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_entities
+(
+/* received */
+PK_PMARK_t                        /*pmark*/,          /* destination pmark */
+const PK_PMARK_ask_entities_o_t * /*options*/,        /* options structure */
+/* returned */
+int                       *const  /*n_new*/,          /* number of entities created */
+int                      **const  /*new_entities*/,   /* entities created */
+int                       *const  /*n_mod*/,          /* number of entities modified */
+int                      **const  /*mod_entities*/,   /* entities modified */
+int                       *const  /*n_del*/,          /* number of entities deleted */
+int                      **const  /*del_entities*/    /* entities deleted */
+);
+/*
+This function returns the entities that would be created, modified and deleted
+if rolling to the destination `pmark'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_is
+(
+/* received */
+int                  /*may_be_pmark*/,  /* a potential pmark */
+/* returned */
+PK_LOGICAL_t *const  /*is_pmark*/       /* whether it is a pmark */
+);
+/*
+This function returns PK_LOGICAL_true if its argument is a partition mark.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_delete
+(
+/* received */
+int                 /*n_pmarks*/,         /* number of pmarks */
+const PK_PMARK_t  * /*pmarks*/,           /* pmark array */
+/* returned */
+int         *const  /*n_bad_pmarks*/,     /* number of bad pmarks */
+PK_PMARK_t **const  /*bad_pmarks*/        /* bad pmark array */
+);
+/*
+This function deletes the given partition marks. It returns an array of
+pmarks which could not be deleted.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_goto
+(
+/* received */
+PK_PMARK_t           /*pmark*/,           /* pmark to go to */
+/* returned */
+int          *const  /*n_new*/,           /* number of entities created */
+PK_ENTITY_t **const  /*new_entities*/,    /* entities created (optional) */
+int          *const  /*n_mod*/,           /* number of entities modified */
+PK_ENTITY_t **const  /*mod_entities*/,    /* entities modified (optional) */
+int          *const  /*n_del*/,           /* number of entities deleted */
+int         **const  /*del_entities*/     /* entities deleted (optional) */
+);
+/*
+This function returns the partition to the state when the given pmark was
+created.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_goto_2
+(
+/* received */
+PK_PMARK_t                /*pmark*/,          /* pmark to go to */
+const PK_PMARK_goto_o_t * /*options*/,        /* options structure */
+/* returned */
+int               *const  /*n_new*/,          /* number of entities created */
+PK_ENTITY_t      **const  /*new_entities*/,   /* entities created */
+int               *const  /*n_mod*/,          /* number of entities modified */
+PK_ENTITY_t      **const  /*mod_entities*/,   /* entities modified */
+int               *const  /*n_del*/,          /* number of entities deleted */
+int              **const  /*del_entities*/    /* entities deleted */
+);
+/*
+This function returns the partition to the state when the given pmark was
+created.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_partition
+(
+/* received */
+PK_PMARK_t             /*pmark*/,      /* a pmark */
+/* returned */
+PK_PARTITION_t *const  /*partition*/   /* the partition of the pmark */
+);
+/*
+This function returns the partition of the given partition mark.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_following
+(
+/* received */
+PK_PMARK_t          /*pmark*/,         /* a pmark */
+/* returned */
+int         *const  /*n_following*/,   /* number of following pmarks */
+PK_PMARK_t **const  /*following*/      /* following pmarks (optional) */
+);
+/*
+This function returns the pmarks following the given one, i.e. its alternative
+future pmarks in the pmark graph.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_preceding
+(
+/* received */
+PK_PMARK_t         /*pmark*/,         /* a pmark */
+/* returned */
+PK_PMARK_t *const  /*preceding*/      /* preceding pmark */
+);
+/*
+This function returns the pmark preceding the given one, or PK_PMARK_null if
+there is none.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_marks
+(
+/* received */
+PK_PMARK_t         /*pmark*/,         /* a pmark */
+/* returned */
+int        *const  /*n_marks*/,       /* number of marks of pmark */
+PK_MARK_t **const  /*marks*/          /* marks of pmark (optional) */
+);
+/*
+This functions returns the marks which `use' the given pmark. A mark M uses
+the given pmark if rolling to M would make the given pmark current.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_ask_identifier
+(
+/* received */
+PK_PMARK_t       /*pmark*/,               /* pmark */
+/* returned */
+int      *const  /*identifier*/           /* identifier of pmark */
+);
+/*
+This function returns the identifier of a pmark, which is a positive integer
+unique within its partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PMARK_is_used_by_mark
+(
+/* received */
+PK_PMARK_t           /*pmark*/,       /* pmark to test */
+/* returned */
+PK_LOGICAL_t *const  /*is_used*/      /* whether it is used by a mark */
+);
+/*
+This function returns PK_LOGICAL_true if the given pmark is used in a session
+mark. That is, there is a session mark M such that if M were rolled to, the
+given pmark would be current.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_ask
+(
+/* received */
+PK_BB_t            /*bb*/,       /* not used */
+/* returned */
+PK_BB_sf_t *const  /*bb_sf*/     /* bulletin board standard form */
+);
+/*
+This function returns the standard form of the bulletin board.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_ask_status
+(
+/* received */
+PK_BB_t                /*bb*/,       /* not used */
+/* returned */
+PK_BB_status_t *const  /*status*/    /* present status */
+);
+/*
+This function returns the status of the bulletin board.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_create
+(
+/* received */
+const PK_BB_sf_t * /*bb_sf*/,       /* bulletin board standard form */
+/* returned */
+PK_BB_t  *const    /*bb*/           /* not used */
+);
+/*
+This function creates the bulletin board from its standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_is
+(
+/* received */
+PK_BB_t              /*bb*/,       /* not used */
+/* returned */
+PK_LOGICAL_t *const  /*whether*/   /* whether the received argument is a bb */
+);
+/*
+This function returns whether the received argument is a bulletin board.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_is_empty
+(
+/* received */
+PK_BB_t              /*bb*/,         /* not used */
+/* returned */
+PK_LOGICAL_t *const  /*is_empty*/    /* true if the BB is off or empty */
+);
+/*
+This function returns PK_LOGICAL_true if the Bulletin Board is off, or on and
+empty (i.e. has no events on it).
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_output_events
+(
+/* received */
+PK_BB_t                /*bb*/,            /* not used */
+PK_LOGICAL_t           /*empty*/,         /* whether to empty bulletin board */
+/* returned */
+int            *const  /*n_entities*/,    /* number of entities */
+int           **const  /*events*/,        /* events to which entities belong */
+PK_ENTITY_t   **const  /*entities*/,      /* entities */
+PK_BB_event_t **const  /*event_types*/,   /* event types */
+PK_CLASS_t    **const  /*classes*/,       /* classes of entities */
+int           **const  /*user_fields*/    /* user fields */
+);
+/*
+This function outputs the events stored in the bulletin board
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BB_set_status
+(
+/* received */
+PK_BB_t          /*bb*/,       /* not used */
+PK_BB_status_t   /*status*/    /* required status */
+);
+/*
+This function sets the status of a bulletin board.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_close_knots
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether close knots are allowed */
+);
+/*
+This function returns whether bgeometry may have knots closer together than the
+session angular tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_angle_precision
+(
+/* returned */
+double  *const   /*precision*/    /* precision */
+);
+/*
+This function returns the session angle precision.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_attdefs
+(
+/* received */
+const PK_SESSION_ask_attdefs_o_t * /*options*/,       /* options */
+/* returned */
+int                        *const  /*n_attdefs*/,     /* number of attribute */
+PK_ATTDEF_t               **const  /*attdefs*/        /* attribute definitions */
+);
+/*
+This function returns all user-defined attribute definitions in the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_check_arguments
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether argument checking is enabled */
+);
+/*
+This function returns whether argument checking is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_check_continuity
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether continuity checking is enabled */
+);
+/*
+This function returns whether continuity checking is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_check_self_int
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether self intersection checking is enabled */
+);
+/*
+This function returns whether self intersection checking is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_curr_partition
+(
+/* returned */
+PK_PARTITION_t *const  /*partition*/   /* current partition */
+);
+/*
+This function returns the current partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_general_topology
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether generalised topology is enabled */
+);
+/*
+This function returns whether generalised topology is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_function
+(
+/* returned */
+const char   **const  /*fn_name*/          /* function name string */
+);
+/*
+This function returns the name of the PK function currently being called.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_journalling
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether journalling is enabled */
+);
+/*
+This function returns whether journalling is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_mark
+(
+/* returned */
+PK_MARK_t    *const  /*mark*/,      /* current session mark (possibly PK_MARK_null) */
+PK_LOGICAL_t *const  /*at_mark*/    /* whether at the mark or not */
+);
+/*
+This function returns the current session mark, and whether the session is at
+that mark or has been modified since it was created or rolled to.
+
+If no session marks have been created, or they have all been deleted, then
+PK_MARK_null will be returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_memory_usage
+(
+/* returned */
+size_t   *const  /*total*/,   /* total amount of memory */
+size_t   *const  /*free*/     /* free space */
+);
+/*
+This function returns the amount of memory currently occupied by the model
+data structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_partitions
+(
+/* returned */
+int             *const  /*n_partitions*/,           /* number of partitions (>= 0) */
+PK_PARTITION_t **const  /*partitions*/              /* partitions (optional) */
+);
+/*
+This function returns the partitions in the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_parts
+(
+/* returned */
+int        *const  /*n_parts*/,           /* number of parts (>= 0) */
+PK_PART_t **const  /*parts*/              /* parts (optional) */
+);
+/*
+This function returns all parts in the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_precision
+(
+/* returned */
+double  *const   /*precision*/    /* required precision */
+);
+/*
+This function returns the session precision.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_swept_spun_surfs
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/  /* whether swept/spun surfaces enabled */
+);
+/*
+This function returns whether topological sweep and spin functions are
+allowed to produce swept and spun surfaces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_tag_highest
+(
+/* returned */
+int      *const  /*highest_tag*/  /* value of highest tag allocated */
+);
+/*
+This function returns the value of the highest tag allocated.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_tag_limit
+(
+/* returned */
+int      *const  /*limit*/  /* tag value limit */
+);
+/*
+This function returns whether tag limitation is enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_tags_remaining
+(
+/* returned */
+int      *const  /*tags_remaining*/  /* number of available unused tags */
+);
+/*
+This function returns the current number of tags which are available for
+subsequent use.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_user_field_len
+(
+/* returned */
+int *const       /*user_field_length*/  /* user field length */
+);
+/*
+This function returns the length of the user fields.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_comment
+(
+/* received */
+const char     * /*comment*/               /* null-terminated string to set */
+);
+/*
+Write a comment to the journal file
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_is_roll_forward_on
+(
+/* returned */
+PK_LOGICAL_t *const  /*roll_forward_on*/  /* roll forward interface parameter */
+);
+/*
+This function returns PK_LOGICAL_true if the roll-forward interface parameter
+is set to true, i.e. PK_MARK_goto is able to roll the session forwards.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_is_rollback_on
+(
+/* returned */
+PK_LOGICAL_t *const  /*rollback_on*/  /* true if rollback is on */
+);
+/*
+This function returns PK_LOGICAL_true if partitioned rollback has been enabled
+(see PK_DELTA_register_callbacks), otherwise PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_is_in_kernel
+(
+/* returned */
+PK_LOGICAL_t *const  /*is_in_kernel*/,    /* whether called from within the kernel */
+PK_LOGICAL_t *const  /*is_protected*/     /* whether called from protected region */
+);
+/*
+This function returns whether it has been called from within the kernel or
+from outside the kernel.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_is_in_kernel_2
+(
+/* returned */
+PK_LOGICAL_t *const  /*is_in_kernel*/,    /* whether called from within the kernel */
+PK_LOGICAL_t *const  /*is_protected*/,    /* whether called from protected region */
+PK_LOGICAL_t *const  /*is_subthread*/     /* whether called from internal thread */
+);
+/*
+This function returns whether it has been called from within the kernel or
+from outside the kernel.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register_polling_cb
+(
+/* received */
+const PK_SESSION_polling_cb_t   /*new*/,  /* function to register (may be NULL) */
+/* returned */
+PK_SESSION_polling_cb_t *const  /*old*/   /* pointer to space for previous */
+);
+/*
+This function registers the given application polling callback function
+and returns the previous value. `old' may be NULL, in which case the
+previous value is not returned, `new' may also be NULL to cancel the
+existing callback function.
+
+The polling callback may be registered or changed at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_close_knots
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether close knots are allowed */
+);
+/*
+This function sets whether bgeometry may have knots closer together than the
+session angular tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_angle_precision
+(
+/* received */
+double           /*angle_precision*/    /* required angle_precision */
+);
+/*
+This function sets the session angle precision.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_check_arguments
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether argument checking required */
+);
+/*
+This function sets whether argument checking is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_check_continuity
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether continuity checking required */
+);
+/*
+This function sets whether continuity checking is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_check_self_int
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether self intersection checking required */
+);
+/*
+This function sets whether self intersection checking is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_general_topology
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether generalised topology is to be enabled */
+);
+/*
+This function sets whether generalised topology is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_journalling
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether journalling is to be enabled */
+);
+/*
+This function sets whether journalling is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_precision
+(
+/* received */
+double           /*precision*/    /* required precision */
+);
+/*
+This function sets the session precision.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_roll_forward
+(
+/* received */
+PK_LOGICAL_t   /*roll_forward_on*/  /* roll_forward parameter setting */
+);
+/*
+This function sets the roll_forward interface parameter. If it is set to true,
+PK_MARK_goto is able to roll the session forwards.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_swept_spun_surfs
+(
+/* received */
+PK_LOGICAL_t     /*whether*/  /* whether swept/spun surfs are to be enabled */
+);
+/*
+This function sets whether topological sweep and spin functions are
+allowed to produce swept and spun surfaces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_tag_limit
+(
+/* received */
+int              /*limit*/  /* maximum tag value allowed */
+);
+/*
+This function sets whether tag limitation is to be enabled.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_tidy
+(
+void
+);
+/*
+This function ensures that PK is in a valid state whenever a longjump is made.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_smp
+(
+/* received */
+const PK_SESSION_smp_o_t * /*options*/       /* SMP options */
+);
+/*
+This function sets the Symmetric Multi-Processing (SMP) parameters
+for the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_smp_stacksize
+(
+/* received */
+size_t           /*size*/
+);
+/*
+Set the size of the stack allocated to Parasolid SMP threads.
+
+A zero value instructs Parasolid to use the platform default.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_smp
+(
+/* returned */
+PK_SESSION_smp_r_t   *const  /*results*/       /* SMP return structure */
+);
+/*
+This function retrieves the current session Symmetric Multi-Processing (SMP)
+parameters.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_smp_stacksize
+(
+/* returned */
+size_t   *const  /*size*/
+);
+/*
+Returns the size of the stack allocated to Parasolid SMP threads.
+
+A zero value means that Parasolid will use the platform default.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_watch_tags
+(
+/* received */
+int                                  /*n_tags*/,      /* number of tags */
+const int                            /*tags*/[],      /* tags to watch */
+const PK_SESSION_watch_create_cb_t   /*create_fn*/,   /* create entity callback */
+const PK_SESSION_watch_destroy_cb_t  /*destroy_fn*/   /* destroy entity callback */
+);
+/*
+This function registers an array of tagged entities which are to be watched
+via two application callback functions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_software_option
+(
+/* received */
+PK_SESSION_software_option_t     /*option*/,
+/* returned */
+int                            * /*ival*/
+);
+/*
+Return the current setting of a variant software option.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_software_option
+(
+/* received */
+PK_SESSION_software_option_t     /*option*/,
+int                              /*ival*/
+);
+/*
+Replace the setting of a variant software option.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register_frustrum
+(
+/* received */
+const PK_SESSION_frustrum_t * /*new*/
+);
+/*
+Installs a new frustrum.
+
+This function may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_frustrum
+(
+/* returned */
+PK_SESSION_frustrum_t *const  /*res*/
+);
+/*
+Return the installed frustrum.
+
+This function may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register_indexio
+(
+/* received */
+const PK_SESSION_indexio_t * /*new*/
+);
+/*
+Installs a new Indexed Frustrum.
+
+This function may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_indexio
+(
+/* returned */
+PK_SESSION_indexio_t *const  /*res*/
+);
+/*
+Return the installed Indexed Frustrum.
+
+This function may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register_applio
+(
+/* received */
+const PK_SESSION_applio_t * /*new*/    /* functions to register (may be NULL) */
+);
+/*
+This function registers a new set of functions for use when the 'applio' format
+is selected for transmit files. If 'new' is NULL, all registered functions are
+set to NULL.
+
+It may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_applio
+(
+/* returned */
+PK_SESSION_applio_t *const  /*res*/
+);
+/*
+This function returns the registered 'applio' functions for transmit file
+input and output.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register_applio_2
+(
+/* received */
+const PK_SESSION_applio_t * /*new*/    /* functions to register (may be NULL) */
+);
+/*
+This function registers a new set of functions for use when the 'applio' format
+is selected for transmit files. If 'new' is NULL, all registered functions are
+set to NULL.
+
+It may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_applio_2
+(
+/* returned */
+PK_SESSION_applio_t *const  /*res*/
+);
+/*
+This function returns the registered 'applio' functions for transmit file
+input and output.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_set_unicode
+(
+/* received */
+PK_LOGICAL_t     /*whether*/      /* whether to enable Unicode keys */
+);
+/*
+Enables/disables Unicode keys for Frustrum and application i/o.
+
+This function can be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_unicode
+(
+/* returned */
+PK_LOGICAL_t *const  /*whether*/
+);
+/*
+Returns whether Unicode keys are enabled for Frustrum and application i/o.
+
+This function can be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_kernel_version
+(
+/* returned */
+PK_SESSION_kernel_version_t *const  /*info*/
+);
+/*
+returns modeller version and datestamp
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_register
+(
+/* received */
+int              /*code*/,
+PK_POINTER_t     /*data*/
+);
+/*
+This function allows mutual registration between Parasolid and companion
+UGS toolkit products at run-time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_start
+(
+/* received */
+const PK_SESSION_start_o_t * /*options*/
+);
+/*
+This function starts the Parasolid modeller.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_stop
+(
+void
+);
+/*
+This function stops the modeller.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_abort
+(
+/* received */
+PK_abort_reason_t  /*reason*/
+);
+/*
+This function makes a request to Parasolid to abort the interrupted current
+operation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_ask_binding
+(
+/* received */
+PK_SESSION_binding_t             /*enquiry*/,
+/* returned */
+PK_SESSION_binding_t     *const  /*answer*/
+);
+/*
+This function allows the application to identify the programming
+language binding in use.
+
+This function may be called at any time.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_receive
+(
+/* received */
+const char                   * /*key*/,       /* key string */
+const PK_SESSION_receive_o_t * /*options*/    /* receive options */
+);
+/*
+This function receives a session from the given 'file' `key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_receive_u
+(
+/* received */
+const PK_UCHAR_t             * /*key*/,       /* key string */
+const PK_SESSION_receive_o_t * /*options*/    /* receive options */
+);
+/*
+This function receives a session from the given Unicode 'file' `key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_receive_version
+(
+/* received */
+const char                        * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a session transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_receive_version_u
+(
+/* received */
+const PK_UCHAR_t                  * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a session transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_transmit
+(
+/* received */
+const char                    * /*key*/,          /* key string */
+const PK_SESSION_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the session to the given 'file' `key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SESSION_transmit_u
+(
+/* received */
+const PK_UCHAR_t              * /*key*/,          /* key string */
+const PK_SESSION_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the session to the given Unicode 'file' `key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_ask_callbacks
+(
+/* returned */
+PK_ERROR_frustrum_t *const  /*frustrum*/   /* session error handler */
+);
+/*
+This function returns the application error handler for the session, (if one
+is registered), or NULL.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_register_callbacks
+(
+/* received */
+PK_ERROR_frustrum_t  /*frustrum*/          /* application's error handler */
+);
+/*
+This function registers the given application error handler for the session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_ask_last
+(
+/* returned */
+PK_LOGICAL_t  *const  /*was_error*/,      /* whether there was an error */
+PK_ERROR_sf_t *const  /*error_sf*/        /* description of the error */
+);
+/*
+This function returns the standard form of the most recent PK error.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_clear_last
+(
+/* returned */
+PK_LOGICAL_t *const  /*was_error*/        /* whether there was an error to clear */
+);
+/*
+This function clears the most recent PK error.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_raise
+(
+/* received */
+PK_ERROR_sf_t    /*error_sf*/         /* description of the error */
+);
+/*
+This function raises a PK-format error.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ERROR_reraise
+(
+/* returned */
+PK_LOGICAL_t *const  /*was_error*/        /* whether there was an error to raise */
+);
+/*
+This function repeats the most recent PK error.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_ask
+(
+/* received */
+PK_REPORT_t           /*report*/,        /* which report required */
+/* returned */
+PK_REPORT_r_t *const  /*report_r*/        /* report data */
+);
+/*
+This function returns the data of the requested `report'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_clear
+(
+/* received */
+PK_REPORT_t      /*report*/    /* which report to clear */
+);
+/*
+This function clears the requested `report'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_add_records
+(
+/* received */
+PK_REPORT_t               /*report*/,            /* which report to append to */
+int                       /*n_report_records*/,  /* number of report records */
+const PK_REPORT_record_t  /*report_records*/[]   /* report records */
+);
+/*
+This function adds the given `report_records' to the `report'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_r_f
+(
+/* received */
+PK_REPORT_r_t *const  /*report_r*/    /* report return type */
+);
+/*
+This function frees the memory of a PK_REPORT_r_t
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_close
+(
+/* received */
+PK_REPORT_t      /*report*/
+);
+/*
+This function closes the given `report'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_create
+(
+/* received */
+const char        * /*name*/,        /* name of report */
+/* returned */
+PK_REPORT_t *const  /*report*/       /* identifier of report */
+);
+/*
+This function creates a `report' with the given `name'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_find
+(
+/* received */
+const char        * /*name*/,         /* name of report */
+/* returned */
+PK_REPORT_t *const  /*report*/       /* identifier of report */
+);
+/*
+This function returns the `report' which has the given `name'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_delete
+(
+/* received */
+PK_REPORT_t      /*report*/      /* report no longer required */
+);
+/*
+This function deletes a `report'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_set_function
+(
+/* received */
+PK_REPORT_t      /*report*/,
+const char     * /*function*/
+);
+/*
+This function sets the function name of a report.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REPORT_is_open
+(
+/* received */
+PK_REPORT_t          /*report*/,     /* the report */
+/* returned */
+PK_LOGICAL_t *const  /*is_open*/     /* whether report is open or closed */
+);
+/*
+This function returns PK_LOGICAL_true if the given report is open and
+PK_LOGICAL_false if it is closed.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_function
+(
+/* received */
+int                 /*depth*/,        /* recursion depth */
+/* returned */
+const char **const  /*fn_name*/,      /* function name string (may be NULL) */
+int         *const  /*total_depth*/   /* current total recursion depth (>= 0) */
+);
+/*
+This function returns the name of the PK function being executed in the
+calling thread and the total recursion depth of its current call stack.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_is_in_kernel
+(
+/* returned */
+PK_LOGICAL_t *const  /*is_in_kernel*/,    /* whether called from within the kernel */
+PK_LOGICAL_t *const  /*is_protected*/,    /* whether called from protected region */
+PK_LOGICAL_t *const  /*is_subthread*/,    /* whether called from internal thread */
+PK_LOGICAL_t *const  /*is_excluding*/     /* whether function is excluding threads */
+);
+/*
+This function returns whether the calling thread is executing inside the
+kernel.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_tidy
+(
+void
+);
+/*
+This function ensures that Parasolid is in a valid state for the calling
+thread whenever a longjump is made.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_last_error
+(
+/* returned */
+PK_LOGICAL_t  *const  /*was_error*/,      /* whether there was an error */
+PK_ERROR_sf_t *const  /*error_sf*/        /* description of the error */
+);
+/*
+This function returns the standard form of the most recent PK error in the
+calling thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_clear_last_error
+(
+/* returned */
+PK_LOGICAL_t *const  /*was_error*/        /* whether there was an error to clear */
+);
+/*
+This function clears the most recent PK error in the calling thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_error_cbs
+(
+/* returned */
+PK_ERROR_frustrum_t *const  /*frustrum*/   /* thread error handler */
+);
+/*
+This function returns the error handler for the calling thread (if one is
+registered), or NULL.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_register_error_cbs
+(
+/* received */
+PK_ERROR_frustrum_t  /*frustrum*/          /* application's error handler */
+);
+/*
+This function registers the given error handler for the calling thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_memory_cbs
+(
+/* returned */
+PK_MEMORY_frustrum_t *const  /*frustrum*/       /* thread memory handlers */
+);
+/*
+This function returns the functions which are currently registered for the
+calling thread to use when allocating and freeing variable length information
+returned from the PK interface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_register_memory_cbs
+(
+/* received */
+PK_MEMORY_frustrum_t  /*frustrum*/       /* application's memory handlers */
+);
+/*
+This function registers memory allocation and free functions for the calling
+thread to use in Parasolid when returning variable length information.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_exclusion
+(
+/* returned */
+PK_THREAD_exclusion_t *const  /*exclusion*/,       /* type of thread exclusion */
+PK_LOGICAL_t          *const  /*was_this_thread*/  /* whether the calling thread */
+);
+/*
+This function returns whether the Parasolid interface is currently excluding
+other threads entering and whether the calling thread caused the exclusion.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_clear_exclusion
+(
+/* received */
+PK_THREAD_exclusion_t         /*clear*/,           /* type of exclusion to clear */
+/* returned */
+PK_THREAD_exclusion_t *const  /*exclusion*/,       /* type of thread exclusion */
+PK_LOGICAL_t          *const  /*was_this_thread*/  /* whether the calling thread */
+);
+/*
+This function tries to clear an exclusion that may be preventing other threads
+from entering Parasolid.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_chain_start
+(
+/* received */
+PK_THREAD_chain_type_t            /*type*/,
+const PK_THREAD_chain_start_o_t * /*options*/
+);
+/*
+This function starts chaining Parasolid functions in the calling thread.
+The exclusivity of this function is dynamic and corresponds with the value
+of `type'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_chain_stop
+(
+/* received */
+const PK_THREAD_chain_stop_o_t * /*options*/
+);
+/*
+This function stops chaining Parasolid functions in the calling thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_is_in_chain
+(
+/* returned */
+PK_THREAD_chain_type_t *const  /*type*/,
+int                    *const  /*length*/,
+int                    *const  /*remaining*/
+);
+/*
+This function returns the type of chain running in the calling thread, along
+with its link length and the maximum number of remaining functions in the
+current chain link.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_ask_function_run
+(
+/* received */
+int                                    /*n_functions*/,   /* number of functions */
+const PK_FUNCTION_t                    /*functions*/[],   /* functions */
+const PK_THREAD_ask_function_run_o_t * /*options*/,       /* options structure */
+/* returned */
+PK_FUNCTION_run_t                      /*run_values*/[]   /* how functions run */
+);
+/*
+This function asks whether the given PK functions will be run concurrently
+or exclusively in this thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_THREAD_set_function_run
+(
+/* received */
+int                                    /*n_functions*/,   /* number of functions */
+const PK_FUNCTION_t                    /*functions*/[],   /* functions */
+const PK_FUNCTION_run_t                /*run_values*/[],  /* how functions run */
+const PK_THREAD_set_function_run_o_t * /*options*/        /* options structure */
+);
+/*
+This function sets whether the given PK functions will be run concurrently
+or exclusively in this thread.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_track_r_f
+(
+/* received */
+PK_ENTITY_track_r_t *const  /*tracking*/   /* tracking information to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_attribs
+(
+/* received */
+PK_ENTITY_t          /*entity*/,          /* entity */
+PK_ATTDEF_t          /*attdef*/,          /* attribute definition */
+/* returned */
+int          *const  /*n_attribs*/,       /* number of attributes (>=0) */
+PK_ATTRIB_t **const  /*attribs*/          /* array of attributes  (optional) */
+);
+/*
+This function returns all the attributes with the given attribute definition
+directly attached to the given entity. If the attribute definition is
+PK_ENTITY_null, then all attributes of any type are returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_class
+(
+/* received */
+PK_ENTITY_t        /*entity*/,            /* entity */
+/* returned */
+PK_CLASS_t *const  /*class*/              /* class of entity */
+);
+/*
+This function returns the given entity's concrete class.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_description
+(
+/* received */
+int                                       /*tag*/,  /* PK entity or internal tag */
+const PK_ENTITY_ask_description_o_t * /*options*/,  /* options structure */
+/* returned */
+char **const                      /*description*/   /* ptr to null terminated string */
+);
+/*
+This function returns a textual description of Parasolid's internal
+representation of a PK entity
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_first_attrib
+(
+/* received */
+PK_ENTITY_t         /*entity*/,           /* entity */
+PK_ATTDEF_t         /*attdef*/,           /* attribute definition */
+/* returned */
+PK_ATTRIB_t *const  /*attrib*/            /* an attribute on entity of given attdef. */
+);
+/*
+This function returns an attribute with the given attribute definition
+attached to the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_identifier
+(
+/* received */
+PK_ENTITY_t      /*entity*/,              /* entity */
+/* returned */
+int      *const  /*identifier*/           /* identifier of entity (possibly 0) */
+);
+/*
+This function returns the identifier of an entity within a part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_owning_groups
+(
+/* received */
+PK_ENTITY_t         /*entity*/,           /* an entity */
+/* returned */
+int         *const  /*n_groups*/,         /* number of groups (>=0) */
+PK_GROUP_t **const  /*groups*/            /* groups (optional) */
+);
+/*
+This function returns the set of groups of which the given entity is a member.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_partition
+(
+/* received */
+PK_ENTITY_t            /*entity*/,      /* an entity */
+/* returned */
+PK_PARTITION_t *const  /*partition*/    /* partition of entity */
+);
+/*
+This function returns the partition containing the given entity. If the
+entity is an attribute definition, the partition will be PK_PARTITION_null,
+otherwise it will be non-null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_ask_user_field
+(
+/* received */
+PK_ENTITY_t      /*entity*/,       /* entity to receive message */
+/* returned */
+int      *const  /*user_field*/    /* user_field values */
+);
+/*
+This function returns the user field values for the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_check_attribs
+(
+/* received */
+PK_ENTITY_t                          /*entity*/,      /* entity */
+PK_ATTDEF_t                          /*attdef*/,      /* attribute definition */
+const PK_ENTITY_check_attribs_o_t  * /*options*/,     /* options structure */
+/* returned */
+int                          *const  /*n_faults*/,    /* number of bad attributes */
+PK_check_fault_t            **const  /*faults*/       /* attribute fault information */
+);
+/*
+This function checks the system attributes attached to the given entity, and
+returns information concerning the faulty attributes found, if any.  These are
+attributes with definitions having names of the form "SDL/TYSA_xxx".
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_copy
+(
+/* received */
+PK_ENTITY_t         /*entity*/,           /* an entity */
+/* returned */
+PK_ENTITY_t *const  /*entity_copy*/       /* copy of given entity */
+);
+/*
+This function produces a new entity which is a copy of the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_copy_2
+(
+/* received */
+PK_ENTITY_t                 /*entity*/,       /* an entity */
+const PK_ENTITY_copy_o_t  * /*options*/,      /* options structure */
+/* returned */
+PK_ENTITY_t         *const  /*entity_copy*/,  /* copy of given entity */
+PK_ENTITY_track_r_t *const  /*tracking*/      /* tracking information */
+);
+/*
+This function produces a new entity which is a copy of the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_delete
+(
+/* received */
+int                 /*n_entities*/,       /* number of entities to be deleted */
+const PK_ENTITY_t * /*entities*/          /* entities to be deleted */
+);
+/*
+This function deletes the given entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_delete_attribs
+(
+/* received */
+PK_ENTITY_t      /*entity*/,              /* entity */
+PK_ATTDEF_t      /*attdef*/,              /* attribute definition */
+/* returned */
+int      *const  /*n_deleted*/            /* number of attributes deleted (>=0) */
+);
+/*
+This function deletes any attributes with the given definition directly
+attached to the given entity.  If the attribute definition is
+PK_ENTITY_null, all attributes, of any type, are deleted.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is
+(
+/* received */
+int                  /*may_be_entity*/,   /* potential entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_entity*/        /* whether it is an entity */
+);
+/*
+This function returns whether the given argument is an entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is_curve
+(
+/* received */
+PK_ENTITY_t          /*entity*/,          /* an entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_curve*/         /* whether entity is a curve */
+);
+/*
+This function returns whether the given entity is a curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is_geom
+(
+/* received */
+PK_ENTITY_t          /*entity*/,          /*an  entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_geom*/          /* whether entity is geometry */
+);
+/*
+This function returns whether the given entity is geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is_part
+(
+/* received */
+PK_ENTITY_t          /*entity*/,         /* an entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_part*/         /* whether entity is a part */
+);
+/*
+This function returns whether the given entity is a part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is_surf
+(
+/* received */
+PK_ENTITY_t          /*entity*/,          /* an entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_surf*/          /* whether entity is a surface */
+);
+/*
+This function returns whether the given entity is a surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_is_topol
+(
+/* received */
+PK_ENTITY_t          /*entity*/,           /* entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_topol*/          /* whether entity is topology */
+);
+/*
+This function returns whether the given entity is topology.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_may_own_attdef
+(
+/* received */
+PK_ENTITY_t          /*entity*/,          /* entity */
+PK_ATTDEF_t          /*attdef*/,          /* attribute definition */
+/* returned */
+PK_LOGICAL_t *const  /*whether*/
+);
+/*
+This function returns PK_LOGICAL_true if an attribute constructed from the
+given attribute definition could be attached to the given entity, otherwise
+PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ENTITY_set_user_field
+(
+/* received */
+PK_ENTITY_t      /*entity*/,       /* entity to receive message */
+const int      * /*user_field*/    /* user_field values */
+/* returned */
+);
+/*
+This function sets the user field values for the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_ask
+(
+/* received */
+PK_ATTDEF_t            /*attdef*/,        /* attribute definition */
+/* returned */
+PK_ATTDEF_sf_t *const  /*attsf*/
+);
+/*
+This function writes the standard form of an attribute definition at the
+given address. The application is not required to initialise any of the fields
+of the standard form but assumes responsibility for subsequently deallocating
+array fields of non zero length.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_create
+(
+/* received */
+const PK_ATTDEF_sf_t * /*attsf*/,
+/* returned */
+PK_ATTDEF_t    *const  /*attdef*/         /* attribute definition */
+);
+/*
+This function creates an attribute definition from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_ask_2
+(
+/* received */
+PK_ATTDEF_t              /*attdef*/,        /* attribute definition */
+/* returned */
+PK_ATTDEF_sf_2_t *const  /*attsf*/
+);
+/*
+This function writes the standard form of an attribute definition at the
+given address. The application is not required to initialise any of the fields
+of the standard form but assumes responsibility for subsequently deallocating
+array fields of non zero length.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_create_2
+(
+/* received */
+const PK_ATTDEF_sf_2_t * /*attsf*/,
+/* returned */
+PK_ATTDEF_t      *const  /*attdef*/         /* attribute definition */
+);
+/*
+This function creates an attribute definition from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_register_cb
+(
+/* received */
+PK_ATTDEF_t                       /*attdef*/,     /* attribute definition */
+const PK_ATTDEF_callback_fns_t  * /*callbacks*/,  /* callback functions */
+const PK_ATTDEF_register_cb_o_t * /*options*/     /* options */
+);
+/*
+This function registers a set of callback functions to be called when entities
+with attributes with definition `attdef' undergo certain events.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_register_callbacks
+(
+/* received */
+PK_ATTDEF_t                      /*attdef*/,        /* attribute definition */
+const PK_ATTDEF_callback_fns_t * /*callbacks*/      /* callback functions */
+);
+/*
+This function registers a set of callback functions to be called when entities
+with attributes with definition `attdef' undergo certain events.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_ask_callbacks
+(
+/* received */
+PK_ATTDEF_t                      /*attdef*/,        /* attribute definition */
+/* returned */
+PK_ATTDEF_callback_fns_t *const  /*callbacks*/      /* callback functions */
+);
+/*
+This function returns the attribute callback functions associated with
+`attdef'. If PK_ATTDEF_register_callbacks or PK_ATTDEF_register_cb has not yet
+been called on this attribute definition, the functions returned will all be
+NULL.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_set_callback_flags
+(
+/* received */
+PK_ATTDEF_t                        /*attdef*/,        /* attribute definition */
+const PK_ATTDEF_callback_flags_t * /*flags*/          /* callback flags */
+);
+/*
+This functions set the callback function on/off flags associated with
+`attdef'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_ask_callback_flags
+(
+/* received */
+PK_ATTDEF_t                      /*attdef*/,        /* attribute definition */
+/* returned */
+PK_ATTDEF_callback_flags_t *const  /*flags*/      /* callback flags */
+);
+/*
+This function returns the attribute callback flags associated with
+`attdef'. If PK_ATTDEF_set_callback_flags has not yet been called on this
+attribute definition, the flags returned will all be PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTDEF_find
+(
+/* received */
+const char        * /*name*/,             /* attribute definition name */
+/* returned */
+PK_ATTDEF_t *const  /*attdef*/            /* attribute definition */
+);
+/*
+This function returns the attribute definition that has the given name.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_owner
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,           /* attribute */
+/* returned */
+PK_ENTITY_t *const  /*owner*/             /* entity which owns attribute */
+);
+/*
+This function returns the owner of an attribute, i.e. the entity to which it
+is attached.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_attdef
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,           /* attribute */
+/* returned */
+PK_ATTDEF_t *const  /*attdef*/            /* attribute definition */
+);
+/*
+This function returns the attribute definition of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_ints
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0 ) */
+/* returned */
+int      *const  /*n_ints*/,              /* number of ints    (>= 0) */
+int     **const  /*ints*/                 /* integers (optional) */
+);
+/*
+This function returns the array of integers from field `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_ints
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+/* returned */
+int      *const  /*n_ints*/,              /* number of ints    (>= 0) */
+int     **const  /*ints*/                 /* integers (optional) */
+);
+/*
+This function returns the array of integers from field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_doubles
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+/* returned */
+int      *const  /*n_doubles*/,           /* number of doubles (>=0) */
+double  **const  /*doubles*/              /* doubles (optional) */
+);
+/*
+This function returns the array of doubles from field `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_doubles
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+/* returned */
+int      *const  /*n_doubles*/,           /* number of doubles (>=0) */
+double  **const  /*doubles*/              /* doubles (optional) */
+);
+/*
+This function returns the array of doubles from field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_string
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+/* returned */
+char    **const  /*string*/               /* pointer to character string */
+);
+/*
+This function returns the character string stored in field number `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_string
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+/* returned */
+char    **const  /*string*/               /* pointer to character string */
+);
+/*
+This function returns the character string stored in field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_ustring
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,       /* attribute */
+int                 /*field_no*/,     /* field number (>= 0) */
+/* returned */
+PK_UCHAR_t **const  /*string*/        /* pointer to Unicode string */
+);
+/*
+This function returns the Unicode string stored in field number `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_ustring
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,       /* attribute */
+const char        * /*field_name*/,   /* field name */
+/* returned */
+PK_UCHAR_t **const  /*string*/        /* pointer to Unicode string */
+);
+/*
+This function returns the Unicode string stored in field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_vectors
+(
+/* received */
+PK_ATTRIB_t          /*attrib*/,          /* attribute */
+int                  /*field_no*/,        /* field number (>= 0) */
+/* returned */
+int          *const  /*n_vectors*/,       /* number of vectors (>= 0) */
+PK_VECTOR_t **const  /*vectors*/          /* vectors (optional) */
+);
+/*
+This function returns the array of vectors from field `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_vectors
+(
+/* received */
+PK_ATTRIB_t          /*attrib*/,          /* attribute */
+const char         * /*field_name*/,      /* field name */
+/* returned */
+int          *const  /*n_vectors*/,       /* number of vectors (>= 0) */
+PK_VECTOR_t **const  /*vectors*/          /* vectors (optional) */
+);
+/*
+This function returns the array of vectors from field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_axes
+(
+/* received */
+PK_ATTRIB_t            /*attrib*/,        /* attribute */
+int                    /*field_no*/,      /* field number (>= 0) */
+/* returned */
+int            *const  /*n_axes*/,        /* number of axes (>=0) */
+PK_AXIS1_sf_t **const  /*axes*/           /* axes (optional) */
+);
+/*
+This function returns the array of axes from field `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_axes
+(
+/* received */
+PK_ATTRIB_t            /*attrib*/,        /* attribute */
+const char           * /*field_name*/,    /* field name */
+/* returned */
+int            *const  /*n_axes*/,        /* number of axes (>=0) */
+PK_AXIS1_sf_t **const  /*axes*/           /* axes (optional) */
+);
+/*
+This function returns the array of axes from field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_pointers
+(
+/* received */
+PK_ATTRIB_t           /*attrib*/,               /* attribute */
+int                   /*field_no*/,             /* field number (>= 0) */
+/* returned */
+int           *const  /*n_pointers*/,           /* number of pointers (>=0) */
+PK_POINTER_t **const  /*pointers*/              /* pointers (optional) */
+);
+/*
+This function returns the array of pointers from field `field_no'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_named_pointers
+(
+/* received */
+PK_ATTRIB_t           /*attrib*/,               /* attribute */
+const char          * /*field_name*/,           /* field name */
+/* returned */
+int           *const  /*n_pointers*/,           /* number of pointers (>=0) */
+PK_POINTER_t **const  /*pointers*/              /* pointers (optional) */
+);
+/*
+This function returns the array of pointers from field `field_name'
+of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_nth_int
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+int              /*index*/,               /* index of integer (>= 0) */
+/* returned */
+int      *const  /*n*/                    /* nth integer */
+);
+/*
+This function returns a single element of the integer array from field
+`field_no' of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_nth_double
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+int              /*index*/,               /* index of double (>= 0) */
+/* returned */
+double   *const  /*d*/                    /* nth double. */
+);
+/*
+This function returns a single element of the double array from field
+`field_no' of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_nth_vector
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,           /* attribute */
+int                 /*field_no*/,         /* field number (>= 0) */
+int                 /*index*/,            /* index of vector (>= 0) */
+/* returned */
+PK_VECTOR_t *const  /*vector*/             /* nth vector */
+);
+/*
+This function returns a single element of the vector array from field
+`field_no' of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_nth_axis
+(
+/* received */
+PK_ATTRIB_t           /*attrib*/,         /* attribute */
+int                   /*field_no*/,       /* field number (>= 0) */
+int                   /*index*/,          /* index of axis (>= 0) */
+/* returned */
+PK_AXIS1_sf_t *const  /*axis*/            /* nth axis */
+);
+/*
+This function returns a single element of the axis array from field
+`field_no' of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_ask_nth_pointer
+(
+/* received */
+PK_ATTRIB_t          /*attrib*/,              /* attribute */
+int                  /*field_no*/,            /* field number (>= 0) */
+int                  /*index*/,               /* index of pointer (>= 0) */
+/* returned */
+PK_POINTER_t *const  /*pointer*/              /* nth pointer. */
+);
+/*
+This function returns a single element of the pointer array from field
+`field_no' of the given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_create_empty
+(
+/* received */
+PK_ENTITY_t         /*entity*/,           /* entity to attach to */
+PK_ATTDEF_t         /*attdef*/,           /* attribute definition */
+/* returned */
+PK_ATTRIB_t *const  /*attrib*/            /* created attribute */
+);
+/*
+This function creates an attribute with the given definition with no data
+(all fields of length zero), and attaches it to the given entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_ints
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+int              /*n_ints*/,              /* number of ints (>= 0) */
+const int        /*ints*/[]               /* ints to set */
+);
+/*
+This function copies `ints' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_ints
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+int              /*n_ints*/,              /* number of ints (>= 0) */
+const int        /*ints*/[]               /* ints to set */
+);
+/*
+This function copies `ints' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_doubles
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+int              /*n_doubles*/,           /* number of doubles (>= 0) */
+const double     /*doubles*/[]            /* doubles to set */
+);
+/*
+This function copies `doubles' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_doubles
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+int              /*n_doubles*/,           /* number of doubles (>= 0) */
+const double     /*doubles*/[]            /* doubles to set */
+);
+/*
+This function copies `doubles' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_string
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+int              /*field_no*/,            /* field number (>= 0) */
+const char     * /*string*/               /* null-terminated string to set */
+);
+/*
+This function copies `string' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_string
+(
+/* received */
+PK_ATTRIB_t      /*attrib*/,              /* attribute */
+const char     * /*field_name*/,          /* field name */
+const char     * /*string*/               /* null-terminated string to set */
+);
+/*
+This function copies `string' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_ustring
+(
+/* received */
+PK_ATTRIB_t        /*attrib*/,        /* attribute */
+int                /*field_no*/,      /* field number (>= 0) */
+const PK_UCHAR_t * /*string*/         /* null-terminated string to set */
+);
+/*
+This function copies Unicode `string' into field number `field_no' of the
+given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_ustring
+(
+/* received */
+PK_ATTRIB_t        /*attrib*/,        /* attribute */
+const char       * /*field_name*/,    /* field name */
+const PK_UCHAR_t * /*string*/         /* null-terminated string to set */
+);
+/*
+This function copies Unicode `string' into field `field_name' of the
+given attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_vectors
+(
+/* received */
+PK_ATTRIB_t        /*attrib*/,            /* attribute */
+int                /*field_no*/,          /* field number (>= 0) */
+int                /*n_vectors*/,         /* number of vectors (>=0) */
+const PK_VECTOR_t  /*vectors*/[]          /* vectors to set */
+);
+/*
+This function copies `vectors' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_vectors
+(
+/* received */
+PK_ATTRIB_t        /*attrib*/,            /* attribute */
+const char       * /*field_name*/,        /* field name */
+int                /*n_vectors*/,         /* number of vectors (>=0) */
+const PK_VECTOR_t  /*vectors*/[]          /* vectors to set */
+);
+/*
+This function copies `vectors' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_axes
+(
+/* received */
+PK_ATTRIB_t          /*attrib*/,          /* attribute */
+int                  /*field_no*/,        /* field number (>= 0) */
+int                  /*n_axes*/,          /* number of axes (>= 0) */
+const PK_AXIS1_sf_t  /*axes*/[]           /* axes to set */
+);
+/*
+This function copies `axes' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_axes
+(
+/* received */
+PK_ATTRIB_t          /*attrib*/,          /* attribute */
+const char         * /*field_name*/,      /* field name */
+int                  /*n_axes*/,          /* number of axes (>= 0) */
+const PK_AXIS1_sf_t  /*axes*/[]           /* axes to set */
+);
+/*
+This function copies `axes' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_pointers
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,              /* attribute */
+int                 /*field_no*/,            /* field number (>= 0) */
+int                 /*n_pointers*/,          /* number of pointers (>= 0) */
+const PK_POINTER_t  /*pointers*/[]           /* pointers to set */
+);
+/*
+This function copies `pointers' into field number `field_no' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ATTRIB_set_named_pointers
+(
+/* received */
+PK_ATTRIB_t         /*attrib*/,              /* attribute */
+const char        * /*field_name*/,          /* field name */
+int                 /*n_pointers*/,          /* number of pointers (>= 0) */
+const PK_POINTER_t  /*pointers*/[]           /* pointers to set */
+);
+/*
+This function copies `pointers' into field `field_name' of the given
+attribute.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_create_from_entities
+(
+/* received */
+PK_PART_t          /*part*/,              /* part within which group is to be */
+PK_CLASS_t         /*entity_class*/,      /* allowed class of entities in group */
+int                /*n_entities*/,        /* number of entities  (>=0) */
+const PK_ENTITY_t  /*entities*/[],        /* entities */
+/* returned */
+PK_GROUP_t *const  /*group*/              /* group created */
+);
+/*
+This function creates a group within the given part containing the given
+set of entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_ask_entities
+(
+/* received */
+PK_GROUP_t           /*group*/,           /* group */
+/* returned */
+int          *const  /*n_entities*/,      /* number of entities (>=0) */
+PK_ENTITY_t **const  /*entities*/         /* entities  (optional) */
+);
+/*
+This function returns the set of entities contained in the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_ask_entity_class
+(
+/* received */
+PK_GROUP_t         /*group*/,             /* group */
+/* returned */
+PK_CLASS_t *const  /*entity_class*/       /* class of entity allowed in the group */
+);
+/*
+This function returns the class of the entities allowed in the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_ask_entity_label
+(
+/* received */
+PK_GROUP_t       /*group*/,           /* group */
+PK_ENTITY_t      /*entity*/,          /* entity in the group */
+/* returned */
+int      *const  /*entity_label*/     /* label of the entity in the group */
+);
+/*
+This function returns the label of the given entity in the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_ask_part
+(
+/* received */
+PK_GROUP_t        /*group*/,              /* group */
+/* returned */
+PK_PART_t *const  /*part*/                /* the part containing this group */
+);
+/*
+This function returns the part which contains the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_contains_entity
+(
+/* received */
+PK_GROUP_t           /*group*/,           /* group */
+PK_ENTITY_t          /*entity*/,          /* entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_contained*/     /* is the entity contained in the group ? */
+);
+/*
+This function returns whether the given entity is contained in the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_find_entities
+(
+/* received */
+PK_GROUP_t                         /*group*/,       /* group */
+const PK_GROUP_find_entities_o_t * /*options*/,     /* find options */
+/* returned */
+int                        *const  /*n_entities*/,  /* number of entities (>=0) */
+PK_ENTITY_t               **const  /*entities*/     /* entities */
+);
+/*
+This function finds entities in the given group based on the given options.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_add_entities
+(
+/* received */
+PK_GROUP_t         /*group*/,             /* group */
+int                /*n_entities*/,        /* number of entities (>=0) */
+const PK_ENTITY_t  /*entities*/[]         /* entities */
+);
+/*
+This function adds the given set of entities to the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_merge_entities
+(
+/* received */
+PK_GROUP_t         /*group*/,             /* group */
+int                /*n_entities*/,        /* number of entities (>=0) */
+const PK_ENTITY_t  /*entities*/[],        /* entities */
+/* returned */
+int        *const  /*n_added*/            /* number of entities added to group (>=0) */
+);
+/*
+This function merges the given array of entities into the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_remove_entities
+(
+/* received */
+PK_GROUP_t         /*group*/,         /* group */
+int                /*n_entities*/,    /* number of entities */
+const PK_ENTITY_t  /*entities*/[],    /* entities */
+/* returned */
+int        *const  /*n_removed*/      /* number of entities removed from group */
+);
+/*
+This function removes from the given group, any entities which are also in
+the given array of entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GROUP_set_entity_label
+(
+/* received */
+PK_GROUP_t       /*group*/,           /* group */
+PK_ENTITY_t      /*entity*/,          /* entity in the group */
+int              /*entity_label*/     /* label of the entity in the group */
+);
+/*
+This function sets the label of the given entity in the given group.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create
+(
+/* received */
+const PK_TRANSF_sf_t * /*transf_sf*/,   /* transf standard form */
+/* returned */
+PK_TRANSF_t    *const  /*transf*/       /* created transf */
+);
+/*
+This function creates a transf from the given standard form.  See
+documentation for PK_TRANSF_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_ask
+(
+/* received */
+PK_TRANSF_t            /*transf*/,      /* transf to receive message */
+/* returned */
+PK_TRANSF_sf_t *const  /*transf_sf*/    /* transf standard form */
+);
+/*
+This function returns the standard form of the given transf.
+The application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_TRANSF_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_transform
+(
+/* received */
+PK_TRANSF_t         /*transf_1*/,     /* first transformation */
+PK_TRANSF_t         /*transf_2*/,     /* second transformation */
+/* returned */
+PK_TRANSF_t *const  /*transf_out*/
+);
+/*
+This function evaluates the product of two transformations.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create_equal_scale
+(
+/* received */
+double              /*scale*/,        /* scaling factor */
+PK_VECTOR_t         /*centre*/,       /* centre of scaling */
+/* returned */
+PK_TRANSF_t *const  /*transf*/        /* equal scaling transformation */
+);
+/*
+This function creates an equal scaling transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create_reflection
+(
+/* received */
+PK_VECTOR_t         /*position*/,     /* position on plane */
+PK_VECTOR1_t        /*normal*/,       /* normal direction */
+/* returned */
+PK_TRANSF_t *const  /*transf*/        /* reflection transformation */
+);
+/*
+This function creates a reflection transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create_rotation
+(
+/* received */
+PK_VECTOR_t         /*position*/,     /* position on axis */
+PK_VECTOR1_t        /*axis*/,         /* axis direction */
+double              /*angle*/,        /* rotation angle (radians) */
+/* returned */
+PK_TRANSF_t *const  /*transf*/        /* rotation transformation */
+);
+/*
+This function creates a rotation transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create_translation
+(
+/* received */
+PK_VECTOR_t         /*displacement*/,     /* direction and distance */
+/* returned */
+PK_TRANSF_t *const  /*transf*/            /* translation transformation */
+);
+/*
+Create a translation transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_check
+(
+/* received */
+PK_TRANSF_t                 /*transf*/,       /* transformation to be checked */
+const PK_TRANSF_check_o_t * /*options*/,      /* options structure */
+/* returned */
+int                 *const  /*n_faults*/,     /* number of faults */
+PK_check_fault_t   **const  /*faults*/        /* faults */
+);
+/*
+This function checks the given transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_create_view
+(
+/* received */
+PK_VECTOR1_t                       /*view_direction*/,       /* view direction */
+const PK_TRANSF_create_view_o_t  * /*options*/,              /* option structure */
+/* returned */
+PK_TRANSF_t *const                 /*transf*/                /* the view transform */
+);
+/*
+This function returns a valid viewing transform given a unit vector that
+designates the desired `view_direction'. Optionally an `eye_position' can be
+provided via the options structure in order to add perspective behaviour to the
+transform. This can be done by setting the flag `have_eye_position' to
+PK_LOGICAL_true.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_is_equal
+(
+/* received */
+PK_TRANSF_t          /*t1*/,       /* first transformation */
+PK_TRANSF_t          /*t2*/,       /* second transformation */
+/* returned */
+PK_LOGICAL_t *const  /*is_equal*/  /* whether transformations are equal */
+);
+/*
+This function determines whether two transformations are equal.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_classify_r_f
+(
+/* received */
+PK_TRANSF_classify_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRANSF_classify
+(
+/* received */
+PK_TRANSF_t                    /*transf*/,       /* transformation to be classified */
+const PK_TRANSF_classify_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_TRANSF_classify_r_t *const  /*results*/       /* results */
+);
+/*
+This function classifies a supplied transform and optionally returns
+diagnostic information in the form of numerical data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_ask_entities_by_attdef
+(
+/* received */
+PK_TOPOL_t           /*topol*/,           /* topological entity */
+PK_CLASS_t           /*class*/,           /* class of requested entities */
+PK_LOGICAL_t         /*have_attrib*/,     /* whether entities have an attribute */
+PK_ATTDEF_t          /*attdef*/,          /* attribute definition */
+/* returned */
+int          *const  /*n_entities*/,      /* number of entities ( >= 0 ) */
+PK_ENTITY_t **const  /*entities*/         /* entities ( optional ) */
+);
+/*
+This function returns the set of `entities' of the given `class' which belong
+to `topol' and either do or do not have an attribute of the given `attdef',
+depending upon `have_attrib'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_delete_redundant
+(
+/* received */
+PK_TOPOL_t       /*topol*/      /* Topology to delete */
+);
+/*
+This function removes redundant topology from the given `topol'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_detach_geom
+(
+/* received */
+PK_TOPOL_t       /*topol*/        /* topology from which geometry is to be detached */
+);
+/*
+This function detaches geometry from topology.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_make_general_body
+(
+/* received */
+int                /*n_topols*/,      /* number of topologies (> 0) */
+const PK_TOPOL_t   /*topols*/[],      /* array of topologies */
+/* returned */
+PK_BODY_t  *const  /*body*/,          /* general body */
+PK_TOPOL_t         /*copy_topols*/[]  /* corresponding copy topologies */
+);
+/*
+This function creates a general body from a set of topologies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_remove_body_component
+(
+/* received */
+PK_TOPOL_t        /*topol*/,      /* a topological entity in required component */
+/* returned */
+PK_BODY_t *const  /*body*/        /* result body */
+);
+/*
+This function extracts a connected component of a body as a new body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_delete_redundant_2
+(
+/* received */
+int                                     /*n_topols*/,  /* number of topols */
+const PK_TOPOL_t                        /*topols*/[],  /* array of topols */
+const PK_TOPOL_delete_redundant_2_o_t * /*options*/,   /* options structure */
+/* returned */
+PK_TOPOL_track_r_t              *const  /*tracking*/   /* tracking information */
+);
+/*
+This function removes redundant topology or sub-topology from the given list
+of topologies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_identify_redundant
+(
+/* received */
+int                                     /*n_topols*/,           /* number of topols */
+const PK_TOPOL_t                        /*topols*/[],           /* array of topols */
+const PK_TOPOL_identify_redundant_o_t * /*options*/,            /* options structure */
+/* returned */
+int                             *const  /*n_redundant_topols*/, /* number of topols */
+PK_TOPOL_t                     **const  /*redundant_topols*/    /* identified topols */
+);
+/*
+This function identifies redundant topology or subtopology from the given
+list of topologies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_make_new
+(
+/* received */
+PK_TOPOL_t                      /*topol*/,        /* topol */
+const PK_TOPOL_make_new_o_t   * /*options*/,      /* options structure */
+/* returned */
+PK_TOPOL_t              *const  /*new_topol*/     /* new topol */
+);
+/*
+This function removes groups and attributes attached to `topol' and
+replaces `topol' with `new_topol'.The topological entity must be a face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_clash
+(
+/* received */
+const int                  /*n_targets*/,     /* Number of target topologies */
+const PK_TOPOL_t           /*targets*/[],     /* Array of target topols */
+const PK_TRANSF_t          /*tf1*/[],         /* Transforms for targets */
+const int                  /*n_tools*/,       /* Number of tool topologies */
+const PK_TOPOL_t           /*tools*/[],       /* Array of tool topols */
+const PK_TRANSF_t          /*tf2*/[],         /* Transforms for tools */
+const PK_TOPOL_clash_o_t * /*options*/,       /* Options to be used */
+/* returned */
+int                *const  /*n_clash*/,       /* Number of clashes found */
+PK_TOPOL_clash_t  **const  /*clashes*/        /* Returned array of clashes */
+);
+/*
+This function clashes sets of topologies and returns the (list of)
+body, face or edge pairs which clash; the test can be comprehensive, or just
+find the first set, and can also return types of clashes.
+
+This function supports body v body, body v face, and face v face clashing.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_eval_mass_props
+(
+/* received */
+int                                  /*n_topols*/,     /* number of topols ( >0 ) */
+const PK_TOPOL_t                     /*topols*/[],     /* topological entities array */
+double                               /*accuracy*/,     /* 0.0 <= accuracy <= 1.0 */
+const PK_TOPOL_eval_mass_props_o_t * /*options*/,      /* options structure */
+/* returned */
+double                               /*amount*/[],     /* amount */
+double                               /*mass*/[],       /* mass */
+double                               /*c_of_g*/[],     /* centre of gravity */
+double                               /*m_of_i*/[],     /* moment of inertia */
+double                               /*periphery*/[]   /* periphery */
+);
+/*
+This function evaluates mass properties of a given set of topological
+entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range
+(
+/* received */
+PK_TOPOL_t                   /*topol_1*/,         /* first topological entity */
+PK_TOPOL_t                   /*topol_2*/,         /* second topological entity */
+const PK_TOPOL_range_o_t   * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t    *const  /*range_result*/,    /* whether range data returned */
+PK_range_2_r_t       *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum/maximum distance between two
+topological entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_local
+(
+/* received */
+PK_TOPOL_t                       /*topol_1*/,         /* first topological entity */
+PK_TOPOL_t                       /*topol_2*/,         /* second topological entity */
+const PK_TOPOL_range_local_o_t * /*options*/,         /* options structure */
+/* returned */
+int                      *const  /*n_ranges*/,        /* no. local minima */
+PK_range_2_r_t          **const  /*ranges*/           /* range data */
+);
+/*
+This function finds the local minimum separations between two topological
+entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_array
+(
+/* received */
+int                              /*n_topols_1*/,      /* no. entities in 1st array */
+const PK_TOPOL_t                 /*topols_1*/[],      /* first topological array */
+int                              /*n_topols_2*/,      /* no. entities in 2nd array */
+const PK_TOPOL_t                 /*topols_2*/[],      /* second topological array */
+const PK_TOPOL_range_array_o_t * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t        *const  /*range_result*/,    /* whether range data returned */
+PK_range_2_r_t           *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum/maximum separation between two arrays
+of topological entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_vector
+(
+/* received */
+PK_TOPOL_t                          /*topol*/,           /* topological entity */
+PK_VECTOR_t                         /*vector*/,          /* position */
+const PK_TOPOL_range_vector_o_t   * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t           *const  /*range_result*/,    /* if range data returned */
+PK_range_1_r_t              *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum separation between a topological
+entity and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_local_vector
+(
+/* received */
+PK_TOPOL_t                              /*topol*/,           /* topological entity */
+PK_VECTOR_t                             /*vector*/,          /* position vector */
+const PK_TOPOL_range_local_vector_o_t * /*options*/,         /* options structure */
+/* returned */
+int                             *const  /*n_ranges*/,        /* no. local extrema */
+PK_range_1_r_t                 **const  /*ranges*/           /* range data */
+);
+/*
+This function finds the local minimum/maximum separations between a topological
+entity and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_array_vector
+(
+/* received */
+int                                     /*n_topols*/,        /* no. topologies */
+const PK_TOPOL_t                        /*topols*/[],        /* topological array */
+PK_VECTOR_t                             /*vector*/,          /* position vector */
+const PK_TOPOL_range_array_vector_o_t * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t               *const  /*range_result*/,    /* whether range data */
+PK_range_1_r_t                  *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum separation between an array
+of topological entities and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_geom
+(
+/* received */
+PK_TOPOL_t                       /*topol*/,           /* topological entity */
+PK_GEOM_t                        /*geom*/,            /* geometrical entity */
+const PK_TOPOL_range_geom_o_t  * /*options*/,         /* option structure */
+/* returned */
+PK_range_result_t        *const  /*range_result*/,    /* whether range data returned */
+PK_range_2_r_t           *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum/maximum distance between
+a topology and a geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_range_geom_array
+(
+/* received */
+int                                   /*n_topols*/,     /* no. entities */
+const PK_TOPOL_t                      /*topols*/[],     /* topological array */
+int                                   /*n_geoms*/,      /* no. entities */
+const PK_GEOM_t                       /*geoms*/[],      /* geometrical array */
+const PK_TOPOL_range_geom_array_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_range_result_t             *const  /*range_result*/, /* whether range data */
+PK_range_2_r_t                *const  /*range*/         /* range data */
+);
+/*
+This function finds the global minimum / maximum separation between an array
+of topological and an array of geometrical entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_find_box
+(
+/* received */
+PK_TOPOL_t       /*topol*/,        /* entity for which a box is required */
+/* returned */
+PK_BOX_t *const  /*box*/           /* box containing entity */
+);
+/*
+This function returns a BOX which bounds the given topological entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_find_nabox
+(
+/* received */
+int                             /*n_topols*/,   /* number of entities */
+const PK_TOPOL_t                /*topols*/[],   /* entities to be boxed */
+const PK_TRANSF_t               /*transfs*/[],  /* transformations to be applied */
+const PK_TOPOL_find_nabox_o_t * /*options*/,    /* options */
+/* returned */
+PK_NABOX_sf_t           *const  /*nabox*/       /* returned non-aligned box */
+);
+/*
+This function returns a non-aligned box bounding the given topological
+entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_track_r_f
+(
+/* received */
+PK_TOPOL_track_r_t      *const  /*tracking*/   /* tracking information to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_local_r_f
+(
+/* received */
+PK_TOPOL_local_r_t *const  /*loc*/
+);
+/*
+Frees the memory associated with the TOPOL_local return structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_render_line
+(
+/* received */
+const int                        /*n_topols*/,         /* number of entities */
+const PK_TOPOL_t                 /*topols*/[],         /* entities to rendered */
+const PK_TRANSF_t                /*topol_transfs*/[],  /* applied transformations */
+const PK_TRANSF_t                /*view_transf*/,      /* viewing transformation */
+const PK_TOPOL_render_line_o_t * /*options*/           /* options structure */
+);
+/*
+Render an array of topological entities through GO as
+a) a view independent wire frame drawing
+b) a view dependent wire frame drawing
+or  c) a hidden line drawing,
+according to values supplied in an options structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_facet
+(
+/* received */
+const int                         /*n_topols*/,         /* number of entities */
+const PK_TOPOL_t                  /*topols*/[],         /* entities to be facetted */
+const PK_TRANSF_t                 /*topol_transfs*/[],  /* applied transformations */
+const PK_TRANSF_t                 /*view_transf*/,      /* viewing transformation */
+const PK_TOPOL_facet_o_t        * /*options*/,          /* options structure */
+/* returned */
+PK_TOPOL_facet_r_t        *const  /*tables*/            /* addr of tabular structure */
+);
+/*
+Generate a facetted representation of topological entities in tabular form
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_facet_2
+(
+/* received */
+const int                         /*n_topols*/,         /* number of entities */
+const PK_TOPOL_t                  /*topols*/[],         /* entities to be facetted */
+const PK_TRANSF_t                 /*topol_transfs*/[],  /* applied transformations */
+const PK_TOPOL_facet_2_o_t      * /*options*/,          /* options structure */
+/* returned */
+PK_TOPOL_facet_2_r_t      *const  /*tables*/            /* returned tables */
+);
+/*
+Generate a facetted representation of topological entities in tabular form
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_facet_r_f
+(
+/* received */
+PK_TOPOL_facet_r_t *const  /*tables*/   /* facet tables to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_facet_2_r_f
+(
+/* received */
+PK_TOPOL_facet_2_r_t *const  /*tables*/   /* facet tables to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TOPOL_render_facet
+(
+/* received */
+const int                         /*n_topols*/,         /* number of entities */
+const PK_TOPOL_t                  /*topols*/[],         /* entities to be facetted */
+const PK_TRANSF_t                 /*topol_transfs*/[],  /* applied transformations */
+const PK_TRANSF_t                 /*view_transf*/,      /* viewing transformation */
+const PK_TOPOL_render_facet_o_t * /*options*/           /* options structure */
+);
+/*
+Generate a facetted representation of topological entities through GO.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_boolean_r_f
+(
+/* received */
+PK_boolean_r_t      *const  /*results*/   /* boolean results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_section_r_f
+(
+/* received */
+PK_BODY_make_section_r_t *const  /*results*/      /* section results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_sect_with_sfs_r_f
+(
+/* received */
+PK_FACE_make_sect_with_sfs_r_t *const  /*results*/   /* section results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_section_2_r_f
+(
+/* received */
+PK_section_2_r_t *const  /*results*/      /* section results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_section_r_f
+(
+/* received */
+PK_section_r_t *const  /*results*/    /* section results to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_imprint_r_f
+(
+/* received */
+PK_imprint_r_t *const  /*results*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_add_geoms
+(
+/* received */
+PK_PART_t         /*part*/,        /* part to have geoms added */
+int               /*n_geoms*/,     /* number of geoms */
+const PK_GEOM_t   /*geoms*/[]      /* geoms to be added to part */
+/* returned */
+);
+/*
+This function adds the given geometry to the part's construction geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_all_attdefs
+(
+/* received */
+PK_PART_t            /*part*/,            /* part */
+/* returned */
+int          *const  /*n_attdefs*/,       /* number of attdefs (>= 0) */
+PK_ATTDEF_t **const  /*attdefs*/          /* attdefs (optional) */
+);
+/*
+This function returns the attribute definitions of all the attributes attached
+to entities within the given part. If the part is an assembly, only the
+attribute definitions of attributes directly attached to the assembly and its
+instances are returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_all_attribs
+(
+/* received */
+PK_PART_t            /*part*/,            /* part */
+PK_ATTDEF_t          /*attdef*/,          /* attribute definition */
+/* returned */
+int          *const  /*n_attribs*/,       /* number of attributes (>= 0) */
+PK_ATTRIB_t **const  /*attribs*/          /* attributes (optional) */
+);
+/*
+This function returns all the attributes with the given attribute definition
+attached to any entity within the given part. If the attribute definition is
+PK_ENTITY_null, all attributes are returned, of any type.
+If the part is an assembly, only the attributes directly attached to the
+assembly and its instances are returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_attribs_cb
+(
+/* received */
+PK_PART_t                          /*part*/,        /* part within which to select */
+PK_ATTRIB_cb_f_t                   /*callback*/,    /* attribute selection callback */
+PK_POINTER_t                       /*context*/,     /* context for callback function */
+const PK_PART_ask_attribs_cb_o_t * /*options*/,     /* options */
+/* returned */
+int                        *const  /*n_attribs*/,   /* number of attributes (>= 0) */
+PK_ATTRIB_t               **const  /*attribs*/,     /* attributes */
+PK_ENTITY_t               **const  /*owners*/       /* owning entities */
+);
+/*
+This function returns selected attributes and their owners from entities
+within the given `part', using the `callback' function to select attributes
+from their definition and field values.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_attribs_filter
+(
+/* received */
+PK_PART_t             /*part*/,            /* entity */
+PK_ATTDEF_t           /*attdef*/,          /* attribute definition */
+int                   /*n_fields*/,        /* number of fields */
+const int             /*fields*/[],        /* fields to check */
+const int             /*indices*/[],       /* indices in fields */
+const int     *const  /*values*/,          /* values to match ( may be NULL ) */
+PK_ATTRIB_filter_f_t  /*filter*/,          /* filter function ( may be NULL ) */
+PK_POINTER_t          /*context*/,         /* context for filter fn. */
+/* returned */
+int           *const  /*n_attribs*/,       /* number of attributes (>= 0) */
+PK_ATTRIB_t  **const  /*attribs*/          /* attributes (optional) */
+);
+/*
+This function returns all the attributes attached to any entities within the
+given part which have the given attribute definition and the contents of whose
+integer fields match those specified either by the array of values passed in,
+or by the supplied filter function, or both.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_attrib_owners
+(
+/* received */
+PK_PART_t             /*part*/,            /* entity */
+PK_ATTDEF_t           /*attdef*/,          /* attribute definition */
+int                   /*n_fields*/,        /* number of fields */
+const int             /*fields*/[],        /* fields to check */
+const int             /*indices*/[],       /* indices in fields */
+const int     *const  /*values*/,          /* values to match ( may be NULL ) */
+PK_ATTRIB_filter_f_t  /*filter*/,          /* filter function ( may be NULL ) */
+PK_POINTER_t          /*context*/,         /* context for filter fn. */
+/* returned */
+int           *const  /*n_entities*/,      /* number of entities (>= 0) */
+PK_ENTITY_t  **const  /*entities*/         /* entities (optional) */
+);
+/*
+This function returns all the entities within the given part that have attached
+attributes which are have the given attribute definition and the contents of
+whose integer fields match those specified either by the array of values passed
+in, or by the supplied filter function, or both.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_construction_surfs
+(
+/* received */
+PK_PART_t          /*part*/,              /* a part */
+/* returned */
+int        *const  /*n_con_surfs*/,       /* number of construction surfaces (>=0) */
+PK_SURF_t **const  /*con_surfs*/          /* construction surfaces (optional) */
+);
+/*
+This function returns the set of construction surfaces connected to the
+given part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_construction_curves
+(
+/* received */
+PK_PART_t           /*part*/,             /* a part */
+/* returned */
+int         *const  /*n_con_curves*/,     /* number of construction curves (>=0) */
+PK_CURVE_t **const  /*con_curves*/        /* construction curves (optional) */
+);
+/*
+This function returns the set of construction curves connected to the given
+part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_construction_points
+(
+/* received */
+PK_PART_t           /*part*/,             /* a part */
+/* returned */
+int         *const  /*n_con_points*/,     /* number of construction points (>=0) */
+PK_POINT_t **const  /*con_points*/        /* construction points (optional) */
+);
+/*
+This function returns the set of construction points connected to the given
+part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_geoms
+(
+/* received */
+PK_PART_t           /*part*/,        /* part to have geoms asked */
+/* returned */
+int         *const  /*n_geoms*/,     /* number of geoms (>=0) */
+PK_GEOM_t  **const  /*geoms*/        /* geoms (optional) */
+);
+/*
+This function returns the set of geometric entities (points, curves and
+surfaces) in the given part which are not attached to the part's topology.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_groups
+(
+/* received */
+PK_PART_t           /*part*/,             /* a part */
+/* returned */
+int         *const  /*n_groups*/,     /* number of groups (>=0) */
+PK_GROUP_t **const  /*groups*/        /* groups (optional) */
+);
+/*
+This function returns the set of groups contained within the given part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_ask_ref_instances
+(
+/* received */
+PK_PART_t              /*part*/,             /* a part */
+/* returned */
+int            *const  /*n_instances*/,      /* number of instances (>=0) */
+PK_INSTANCE_t **const  /*instances*/         /* instances ( optional ) */
+);
+/*
+This function returns the set of instances which instance the given part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_delete_attribs
+(
+/* received */
+PK_PART_t                          /*part*/,          /* part within which to delete */
+int                                /*n_attdefs*/,     /* number of attribute */
+const PK_ATTDEF_t                  /*attdefs*/[],     /* attribute definitions */
+const PK_PART_delete_attribs_o_t * /*options*/,       /* options */
+/* returned */
+int                        *const  /*n_deleted*/      /* number of attributes */
+);
+/*
+This function deletes attributes of given attribute definitions from entities
+within the given `part'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_find_entity_by_ident
+(
+/* received */
+PK_PART_t           /*part*/,         /* part in which to search for entity */
+PK_CLASS_t          /*class*/,        /* class of entity */
+int                 /*identifier*/,   /* identifier of entity */
+/* returned */
+PK_ENTITY_t *const  /*entity*/        /* entity (may be PK_ENTITY_null) */
+);
+/*
+This function searches the given `part' for an `entity' of the given `class'
+with the given `identifier'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_rectify_identifiers
+(
+/* received */
+PK_PART_t            /*part*/,        /* part to receive message */
+/* returned */
+int          *const  /*n_entities*/,  /* number of entities with changed idents */
+PK_ENTITY_t **const  /*entities*/,    /* entities with changed idents */
+int         **const  /*old_idents*/,  /* old idents of entities */
+int         **const  /*new_idents*/   /* new idents of entities */
+);
+/*
+This function ensures that a part has no duplicate or invalid identifiers.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_remove_geoms
+(
+/* received */
+PK_PART_t         /*part*/,        /* part to have geoms removed */
+int               /*n_geoms*/,     /* number of geoms to be removed */
+const PK_GEOM_t   /*geoms*/[],     /* geoms to be removed from part */
+/* returned */
+int       *const  /*n_removed*/    /* number of geoms removed */
+);
+/*
+This function removes from the part's construction geometry, any geometric
+entities which are also in the given array of geoms.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive
+(
+/* received */
+const char                 * /*key*/,          /* key string */
+const PK_PART_receive_o_t  * /*options*/,      /* receive options */
+/* returned */
+int                  *const  /*n_parts*/,      /* number of parts received */
+PK_PART_t           **const  /*parts*/         /* parts received */
+);
+/*
+This function receives one or more parts using the given key string.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive_b
+(
+/* received */
+      PK_MEMORY_block_t      /*block*/,
+const PK_PART_receive_o_t  * /*options*/,      /* receive options */
+/* returned */
+int                  *const  /*n_parts*/,      /* number of parts received */
+PK_PART_t           **const  /*parts*/         /* parts received */
+);
+/*
+This function receives one or more parts directly from application memory.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive_u
+(
+/* received */
+const PK_UCHAR_t           * /*key*/,          /* key string */
+const PK_PART_receive_o_t  * /*options*/,      /* receive options */
+/* returned */
+int                  *const  /*n_parts*/,      /* number of parts received */
+PK_PART_t           **const  /*parts*/         /* parts received */
+);
+/*
+This function receives one or more parts using the given Unicode key string.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive_version
+(
+/* received */
+const char                        * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a part transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive_version_b
+(
+/* received */
+PK_MEMORY_block_t                   /*block*/,
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to
+transmit a given part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_receive_version_u
+(
+/* received */
+const PK_UCHAR_t                  * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a part transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_transmit
+(
+/* received */
+int                          /*n_parts*/,      /* number of parts */
+const PK_PART_t            * /*parts*/,        /* parts */
+const char                 * /*key*/,          /* key string */
+const PK_PART_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the given parts using the given key string.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_transmit_b
+(
+/* received */
+int                          /*n_parts*/,      /* number of parts */
+const PK_PART_t            * /*parts*/,        /* parts */
+const PK_PART_transmit_o_t * /*options*/,      /* transmit options */
+/* returned */
+PK_MEMORY_block_t    *const  /*block*/         /* chain of XT data */
+);
+/*
+This function transmits the given parts into application memory.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PART_transmit_u
+(
+/* received */
+int                          /*n_parts*/,      /* number of parts */
+const PK_PART_t            * /*parts*/,        /* parts */
+const PK_UCHAR_t           * /*key*/,          /* key string */
+const PK_PART_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the given parts using the given Unicode key string.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_ask_parts
+(
+/* received */
+PK_ASSEMBLY_t      /*assembly*/,   /* assembly */
+/* returned */
+int        *const  /*n_parts*/,    /* number of parts in assembly (>=0) */
+PK_PART_t **const  /*parts*/       /* parts in assembly (optional) */
+);
+/*
+This function returns the parts in an assembly. As each part corresponds to one
+instance, there may be duplicates.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_ask_parts_transfs
+(
+/* received */
+PK_ASSEMBLY_t        /*assembly*/,   /* assembly */
+/* returned */
+int          *const  /*n_parts*/,    /* number of parts in assembly (>=0) */
+PK_PART_t   **const  /*parts*/,      /* parts in assembly (optional) */
+PK_TRANSF_t **const  /*transfs*/     /* transforms in assembly (optional) */
+);
+/*
+This function returns the parts in an assembly, together with their associated
+transforms. As each part corresponds to one instance, there may be duplicates
+in the parts array.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_ask_instances
+(
+/* received */
+PK_ASSEMBLY_t          /*assembly*/,       /* assembly */
+/* returned */
+int            *const  /*n_instances*/,    /* number of instances in assembly (>=0) */
+PK_INSTANCE_t **const  /*instances*/       /* instances in assembly (optional) */
+);
+/*
+This function returns the instances in an assembly.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_create_empty
+(
+/* returned */
+PK_ASSEMBLY_t *const  /*assembly*/        /* created assembly */
+);
+/*
+This function creates an empty assembly.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_make_level_assembly
+(
+/* received */
+PK_ASSEMBLY_t         /*assembly*/,         /* assembly */
+/* returned */
+PK_ASSEMBLY_t *const  /*level_assembly*/    /* level assembly */
+);
+/*
+This function creates a new assembly which contains, for each path from
+the given assembly to a body contained in it, an instance of that body with a
+transform equal to the product of the transforms attached to instances along
+the path.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ASSEMBLY_transform
+(
+/* received */
+PK_ASSEMBLY_t       /*assembly*/,     /* assembly */
+PK_TRANSF_t         /*transf*/        /* transform (may be PK_ENTITY_null) */
+);
+/*
+This function transforms an assembly by transforming its top-level instances.
+The given transform must be a rigid motion. The null transform is treated as
+the identity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_add_to_compound
+(
+/* received */
+int                                 /*n_bodies*/,  /* number of bodies */
+const PK_BODY_t                     /*bodies*/[],  /* bodies */
+PK_BODY_t                           /*compound*/,  /* compound body */
+const PK_BODY_add_to_compound_o_t * /*options*/    /* options */
+);
+/*
+This function adds `bodies' to an existing `compound' body, so they become
+child bodies with the compound body as their parent.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_change_partition
+(
+/* received */
+PK_BODY_t         /*body*/,          /* body to move */
+PK_PARTITION_t    /*partition*/      /* partition to move into */
+);
+/*
+This function moves the given body and the entities within it into the given
+partition, without changing their tags.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_contains_vector
+(
+/* received */
+PK_BODY_t              /*body*/,       /* the body */
+PK_VECTOR_t            /*vector*/,     /* the position vector */
+/* returned */
+PK_enclosure_t *const  /*enclosure*/,  /* enclosure code */
+PK_TOPOL_t     *const  /*topology*/    /* topology which coincides with given vector */
+);
+/*
+This function determines whether the point represented by the given
+position vector lies inside, outside, or on the boundary of the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_copy_topology
+(
+/* received */
+PK_BODY_t                               /*body*/,          /* body to copy */
+const PK_BODY_copy_topology_o_t       * /*options*/,       /* options structure */
+/* returned */
+PK_BODY_t                       *const  /*body_copy*/,     /* copy of given body */
+PK_TOPOL_track_r_t              *const  /*tracking*/       /* tracking information */
+);
+/*
+This function produces a new body which is a copy of the given body, with no
+geometry being copied.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_disjoin
+(
+/* received */
+PK_BODY_t          /*target*/,            /* a body */
+/* returned */
+int        *const  /*n_bodies*/,          /* number of disjoint bodies (>= 1) */
+PK_BODY_t **const  /*bodies*/             /* disjoint bodies */
+);
+/*
+This function divides the target body into one or more disjoint bodies, each
+of which represents a connected point-set.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_find_laminar_edges
+(
+/* received */
+PK_BODY_t                /*body*/,            /* a body */
+/* returned */
+int              *const  /*n_components*/,    /* number of components (>= 0) */
+PK_EDGE_array_t **const  /*components*/       /* components (optional) */
+);
+/*
+This function returns the laminar edges in the given body. Laminar edges are
+those with exactly one fin, i.e. one attached face on one 'side'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_manifold_bodies
+(
+/* received */
+PK_BODY_t          /*body*/,          /* body to decompose */
+/* returned */
+int        *const  /*n_components*/,  /* number of manifold bodies */
+PK_BODY_t **const  /*components*/     /* array of manifold bodies */
+);
+/*
+This function breaks a body into manifold pieces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_reverse_orientation
+(
+/* received */
+PK_BODY_t         /*body*/               /* body to negate */
+);
+/*
+This function reverses the orientation of a body
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_set_curve_nmnl_state
+(
+/* received */
+PK_BODY_t                /*body*/,
+PK_BODY_curve_nmnl_t     /*setting*/
+);
+/*
+This function sets whether nominal curves are enabled for the `body'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_simplify_geom
+(
+/* received */
+PK_BODY_t          /*body*/,          /* body */
+PK_LOGICAL_t       /*local*/,         /* whether partial replacement allowed */
+/* returned */
+int        *const  /*n_geoms*/,       /* number of geoms returned */
+PK_GEOM_t **const  /*geoms*/          /* new geoms (optional) */
+);
+/*
+This function simplifies the geometry of a body where possible.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_repair_shells
+(
+/* received */
+PK_BODY_t                         /*body*/,      /* body to repair */
+const PK_BODY_repair_shells_o_t * /*options*/,   /* options structure */
+/* returned */
+PK_SHELL_repair_stat_t    *const  /*status*/,    /* status returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/   /* tracking information */
+);
+/*
+This function attempts to repair the shell and region structure of the given
+`body'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_remove_from_parents
+(
+/* received */
+int                                     /*n_children*/,  /* number of children */
+const PK_BODY_t                         /*children*/[],  /* children */
+const PK_BODY_remove_from_parents_o_t * /*options*/      /* options */
+);
+/*
+This function removes the given child bodies from their parents.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_compound
+(
+/* received */
+int                               /*n_bodies*/,  /* number of bodies */
+const PK_BODY_t                   /*bodies*/[],  /* bodies */
+const PK_BODY_make_compound_o_t * /*options*/,   /* options */
+/* returned */
+PK_BODY_t                 *const  /*compound*/   /* compound body */
+);
+/*
+This function creates a compound body containing `bodies'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_components
+(
+/* received */
+PK_BODY_t            /*body*/,               /* a body */
+/* returned */
+int          *const  /*n_components*/,       /* number of components (>= 1) */
+PK_SHELL_t  **const  /*components*/          /* components (optional) */
+);
+/*
+This function returns the components of the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_regions
+(
+/* received */
+PK_BODY_t            /*body*/,            /* a body */
+/* returned */
+int          *const  /*n_regions*/,       /* number of regions (>= 1) */
+PK_REGION_t **const  /*regions*/          /* regions (optional) */
+);
+/*
+This function returns the regions of the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_shells
+(
+/* received */
+PK_BODY_t           /*body*/,             /* a body */
+/* returned */
+int         *const  /*n_shells*/,         /* number of shells (>= 0) */
+PK_SHELL_t **const  /*shells*/            /* shells (optional) */
+);
+/*
+This function returns the set of shells in the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_faces
+(
+/* received */
+PK_BODY_t          /*body*/,              /* a body */
+/* returned */
+int        *const  /*n_faces*/,           /* number of faces (>= 0) */
+PK_FACE_t **const  /*faces*/              /* faces (optional) */
+);
+/*
+This function returns the set of faces in the given `body'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_loops
+(
+/* received */
+PK_BODY_t          /*body*/,              /* a body */
+/* returned */
+int        *const  /*n_loops*/,           /* number of loops (>= 0) */
+PK_LOOP_t **const  /*loops*/              /* loops (optional) */
+);
+/*
+This function return the set of loops in the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_fins
+(
+/* received */
+PK_BODY_t         /*body*/,               /* a body */
+/* returned */
+int       *const  /*n_fins*/,             /* number of fins (>= 0) */
+PK_FIN_t **const  /*fins*/                /* fins (optional) */
+);
+/*
+This function returns the set of fins in the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_edges
+(
+/* received */
+PK_BODY_t          /*body*/,              /* a body */
+/* returned */
+int        *const  /*n_edges*/,           /* number of edges (>= 0) */
+PK_EDGE_t **const  /*edges*/              /* edges (optional) */
+);
+/*
+This function returns the set of edges in the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_vertices
+(
+/* received */
+PK_BODY_t            /*body*/,            /* a body */
+/* returned */
+int          *const  /*n_vertices*/,      /* number of vertices (>= 0) */
+PK_VERTEX_t **const  /*vertices*/         /* vertices (optional) */
+);
+/*
+This function returns the set of vertices in the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_first_face
+(
+/* received */
+PK_BODY_t         /*body*/,            /* a body */
+/* returned */
+PK_FACE_t *const  /*first_face*/       /* a face (possibly PK_ENTITY_null) */
+);
+/*
+This function returns a face in the given body, if one exists, otherwise
+PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_first_edge
+(
+/* received */
+PK_BODY_t         /*body*/,          /* a body */
+/* returned */
+PK_EDGE_t *const  /*first_edge*/      /* an edge (possibly PK_ENTITY_null) */
+);
+/*
+This function returns an edge in the given body, if one exists, otherwise
+PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_memory_usage
+(
+/* received */
+PK_BODY_t        /*body*/,
+/* returned */
+size_t   *const  /*total*/
+);
+/*
+This function returns the amount of memory currently occupied by the
+body's data structures. Note: this may vary during the course of a
+session.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_curve_nmnl_state
+(
+/* received */
+PK_BODY_t                    /*body*/,
+/* returned */
+PK_BODY_curve_nmnl_t *const  /*setting*/
+);
+/*
+This function returns whether nominal curves are enabled for the `body'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_parent
+(
+/* received */
+PK_BODY_t                      /*body*/,     /* body */
+const PK_BODY_ask_parent_o_t * /*options*/,  /* options */
+/* returned */
+PK_BODY_t              *const  /*parent*/    /* parent (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the compound body containing `body', if any. Otherwise
+it returns PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_children
+(
+/* received */
+PK_BODY_t                        /*body*/,        /* body */
+const PK_BODY_ask_children_o_t * /*options*/,     /* options */
+/* returned */
+int                      *const  /*n_children*/,  /* number of children (>= 0) */
+PK_BODY_t               **const  /*children*/     /* children */
+);
+/*
+If `body' is a compound body, this function returns its child bodies. If it is
+not a compound body, no children are returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_type
+(
+/* received */
+PK_BODY_t              /*body*/,        /* the body */
+/* returned */
+PK_BODY_type_t *const  /*body_type*/    /* the type of the body */
+);
+/*
+This function classifies the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_config
+(
+/* received */
+PK_BODY_t                /*body*/,         /* the body */
+/* returned */
+PK_BODY_config_t *const  /*body_config*/   /* the configuration of the body */
+);
+/*
+The function returns the body configuration, which is described in the
+documentation of PK_BODY_config_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_fix_blends
+(
+/* received */
+PK_BODY_t                      /*body*/,          /* edge to have blends fixed */
+const PK_BODY_fix_blends_o_t * /*options*/,       /* options structure */
+/* returned */
+int                    *const  /*n_blends*/,      /* number of blend faces */
+PK_FACE_t             **const  /*blends*/,        /* created blend faces */
+PK_FACE_array_t       **const  /*unders*/,        /* underlying topology/geometry */
+int                   **const  /*topols*/,        /* topols that have been replaced */
+PK_blend_fault_t       *const  /*fault*/,         /* status */
+PK_EDGE_t              *const  /*fault_edge*/,    /* first edge for which blend */
+PK_ENTITY_t            *const  /*fault_topol*/    /* topology associated with */
+);
+/*
+This function changes any edges of the given body which have had blends set on
+them by the PK_EDGE_set_blend_ functions, into faces with the appropriate
+surface geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_boolean
+(
+/* received */
+PK_BODY_t                   /*target*/,     /* body to receive message */
+int                         /*n_tools*/,    /* number of tool bodies */
+const PK_BODY_t             /*tools*/[],    /* tool bodies */
+const PK_BODY_boolean_o_t * /*options*/,    /* boolean options */
+/* returned */
+int                 *const  /*n_bodies*/,   /* number of resultant bodies */
+PK_BODY_t          **const  /*bodies*/      /* resultant bodies */
+);
+/*
+This function performs a boolean operation between the target body
+and the list of tool bodies.
+
+NOTE: This function is obsolete and has been superseded by PK_BODY_boolean_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_boolean_2
+(
+/* received */
+PK_BODY_t                       /*target*/,     /* target body */
+int                             /*n_tools*/,    /* number of tool bodies */
+const PK_BODY_t                 /*tools*/[],    /* tool bodies */
+const PK_BODY_boolean_o_t     * /*options*/,    /* boolean options */
+/* returned */
+PK_TOPOL_track_r_t      *const  /*tracking*/,   /* tracking information */
+PK_boolean_r_t          *const  /*results*/     /* boolean results */
+);
+/*
+This function performs a boolean operation between the target body
+and the list of tool bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_unite_bodies
+(
+/* received */
+PK_BODY_t                   /*target*/,     /* Body to receive message */
+int                         /*n_tools*/,    /* Number of tool bodies */
+const PK_BODY_t             /*tools*/[],    /* Tool bodies */
+/* returned */
+int                 *const  /*n_bodies*/,   /* Number of resultant bodies */
+PK_BODY_t          **const  /*bodies*/      /* Resultant bodies */
+);
+/*
+This function performs a boolean unite operation between the target
+body and the list of tool bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_subtract_bodies
+(
+/* received */
+PK_BODY_t                   /*target*/,     /* Body to receive message */
+int                         /*n_tools*/,    /* Number of tool bodies */
+const PK_BODY_t             /*tools*/[],    /* Tool bodies */
+/* returned */
+int                 *const  /*n_bodies*/,   /* Number of resultant bodies */
+PK_BODY_t          **const  /*bodies*/      /* Resultant bodies */
+);
+/*
+This function performs a boolean subtract operation between the target
+body and the list of tool bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_intersect_bodies
+(
+/* received */
+PK_BODY_t                   /*target*/,     /* Body to receive message */
+int                         /*n_tools*/,    /* Number of tool bodies */
+const PK_BODY_t             /*tools*/[],    /* Tool bodies */
+/* returned */
+int                 *const  /*n_bodies*/,   /* Number of resultant bodies */
+PK_BODY_t          **const  /*bodies*/      /* Resultant bodies */
+);
+/*
+This function performs a boolean intersect operation between the target
+body and the list of tool bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_check
+(
+/* received */
+PK_BODY_t                     /*body*/,          /* body to be checked */
+const PK_BODY_check_o_t     * /*options*/,       /* options structure */
+/* returned */
+int                   *const  /*n_faults*/,      /* number of faults */
+PK_check_fault_t     **const  /*faults*/         /* faults */
+);
+/*
+This function checks the given body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_minimum_topology
+(
+/* received */
+int                      /*n_topols*/,     /* number of topols */
+const PK_CLASS_t         /*classes*/[],    /* class of each topol */
+int                      /*n_relations*/,  /* number of relations */
+const int                /*parents*/[],    /* parents */
+const int                /*children*/[],   /* children */
+const PK_TOPOL_sense_t   /*senses*/[],     /* sense in which child used by parent */
+/* returned */
+PK_BODY_t        *const  /*body*/,         /* created body */
+PK_TOPOL_t       *const  /*topols*/,       /* created topols */
+PK_BODY_fault_t  *const  /*fault*/,        /* fault indicator */
+int              *const  /*fault_index*/   /* index of fault topol */
+);
+/*
+This function creates the topology of a minimum body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_sheet_circle
+(
+/* received */
+double                /*radius*/,        /* radius of circle (>0) */
+const PK_AXIS2_sf_t * /*basis_set*/,     /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/           /* sheet body returned */
+);
+/*
+This function creates a circular sheet.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_sheet_planar
+(
+/* received */
+int                                     /*n_vectors*/,   /* number of position */
+const PK_VECTOR_t                       /*vectors*/[],   /* position vectors */
+const PK_BODY_create_sheet_planar_o_t * /*options*/,     /* option structure */
+/* returned */
+PK_BODY_t                             *const  /*body*/   /* sheet body returned */
+);
+/*
+This function creates a planar sheet whose boundary is an irregular polygon.
+The option also exists to create irregular polygonal holes within this sheet.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_sheet_polygon
+(
+/* received */
+double                /*radius*/,        /* radius of polygon (>0) */
+int                   /*n_sides*/,       /* number of sides of polygon (>2) */
+const PK_AXIS2_sf_t * /*basis_set*/,     /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/           /* sheet body returned */
+);
+/*
+This function creates a polygonal sheet.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_sheet_rectangle
+(
+/* received */
+double                /*x*/,             /* x dimension of rectangle (>0) */
+double                /*y*/,             /* y dimension of rectangle (>0) */
+const PK_AXIS2_sf_t * /*basis_set*/,     /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/           /* sheet body returned */
+);
+/*
+This function creates a sheet rectangle.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_sheet_topology
+(
+/* received */
+int                      /*n_topols*/,     /* number of topols */
+const PK_CLASS_t         /*classes*/[],    /* class of each topol */
+int                      /*n_relations*/,  /* number of relations */
+const int                /*parents*/[],    /* parents */
+const int                /*children*/[],   /* children */
+const PK_TOPOL_sense_t   /*senses*/[],     /* sense in which child used by parent */
+/* returned */
+PK_BODY_t        *const  /*body*/,         /* created body */
+PK_TOPOL_t       *const  /*topols*/,       /* created topols */
+PK_BODY_fault_t  *const  /*fault*/,        /* fault indicator */
+int              *const  /*fault_index*/   /* index of fault topol */
+);
+/*
+This function creates the topology of a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_block
+(
+/* received */
+double                /*x*/,          /* block extent in local x direction (>0) */
+double                /*y*/,          /* block extent in local y direction (>0) */
+double                /*z*/,          /* block extent in local z direction (>0) */
+const PK_AXIS2_sf_t * /*basis_set*/,  /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid block.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_cone
+(
+/* received */
+double                /*radius*/,     /* cone radius (may be 0) */
+double                /*height*/,     /* cone height (>0) */
+double                /*semi_angle*/, /* semi-vertex angle (>0, <Pi/2) */
+const PK_AXIS2_sf_t * /*basis_set*/,  /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid cone.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_cyl
+(
+/* received */
+double                /*radius*/,     /* cylinder radius (>0) */
+double                /*height*/,     /* cylinder height (>0) */
+const PK_AXIS2_sf_t * /*basis_set*/,  /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid cylinder.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_prism
+(
+/* received */
+double                /*radius*/,     /* prism radius (>0) */
+double                /*height*/,     /* prism height (>0) */
+int                   /*n_sides*/,    /* number of sides (>2) */
+const PK_AXIS2_sf_t * /*basis_set*/,  /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid prism.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_sphere
+(
+/* received */
+double                /*radius*/,     /* sphere radius (>0) */
+const PK_AXIS2_sf_t * /*basis_set*/,  /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid sphere.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_topology
+(
+/* received */
+int                      /*n_topols*/,     /* number of topols */
+const PK_CLASS_t         /*classes*/[],    /* class of each topol */
+int                      /*n_relations*/,  /* number of relations */
+const int                /*parents*/[],    /* parents */
+const int                /*children*/[],   /* children */
+const PK_TOPOL_sense_t   /*senses*/[],     /* sense in which child used by parent */
+/* returned */
+PK_BODY_t        *const  /*body*/,         /* created body */
+PK_TOPOL_t       *const  /*topols*/,       /* created topols */
+PK_BODY_fault_t  *const  /*fault*/,        /* fault indicator */
+int              *const  /*fault_index*/   /* index of fault topol */
+);
+/*
+This function creates the topology of a solid body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_solid_torus
+(
+/* received */
+double                /*major_radius*/,  /* torus major radius */
+double                /*minor_radius*/,  /* torus minor radius (> 0) */
+const PK_AXIS2_sf_t * /*basis_set*/,     /* position and orientation (may be NULL) */
+/* returned */
+PK_BODY_t     *const  /*body*/           /* solid body returned */
+);
+/*
+This function creates a solid torus.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_wire_topology
+(
+/* received */
+int                      /*n_topols*/,     /* number of topols */
+const PK_CLASS_t         /*classes*/[],    /* class of each topol */
+int                      /*n_relations*/,  /* number of relations */
+const int                /*parents*/[],    /* parents */
+const int                /*children*/[],   /* children */
+const PK_TOPOL_sense_t   /*senses*/[],     /* sense in which child used by parent */
+/* returned */
+PK_BODY_t        *const  /*body*/,         /* created body */
+PK_TOPOL_t       *const  /*topols*/,       /* created topols */
+PK_BODY_fault_t  *const  /*fault*/,        /* fault indicator */
+int              *const  /*fault_index*/   /* index of fault topol */
+);
+/*
+This function creates the topology of a wire body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_embed_in_surf
+(
+/* received */
+PK_BODY_t          /*body*/,       /* sheet body to receive message */
+PK_SURF_t          /*surf*/,       /* new surface for sheet body */
+double             /*tolerance*/,  /* tolerance for SPCURVE generation */
+/* returned */
+int        *const  /*n_edges*/,    /* number of edges converted to SPCURVEs */
+PK_EDGE_t **const  /*edges*/       /* edges converted to SPCURVEs (optional) */
+);
+/*
+This function constructs the representation of a sheet body in the parameter
+space of its existing surface and embeds that in the parameter space of a
+new surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_emboss
+(
+/* received */
+PK_BODY_t                  /*target*/,            /* sheet or solid where emboss */
+PK_BODY_t                  /*profile*/,           /* sheet or closed wire defining */
+PK_BODY_t                  /*endcap*/,            /* sheet or solid providing */
+const PK_BODY_emboss_o_t * /*options*/,           /* options */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,          /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/            /* status information */
+);
+/*
+This function creates emboss features on the target body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_extend
+(
+/* received */
+PK_BODY_t                         /*body*/,              /* body */
+int                               /*n_boundary_edges*/,  /* number of boundary edges */
+const PK_EDGE_t                 * /*boundary_edges*/,    /* boundary edges */
+const PK_BODY_extend_o_t        * /*options*/,           /* options structure */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/,          /* tracking information */
+PK_TOPOL_local_r_t        *const  /*results*/            /* status information */
+);
+/*
+This function will extend a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_extrude
+(
+/* received */
+PK_BODY_t                   /*profile*/,      /* minimum, wire or sheet profile */
+PK_VECTOR1_t                /*path*/,         /* direction of linear extrusion */
+const PK_BODY_extrude_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_BODY_t           *const  /*body*/,         /* resulting extruded body */
+PK_TOPOL_track_r_t  *const  /*tracking*/,     /* tracking information */
+PK_TOPOL_local_r_t  *const  /*results*/       /* status information */
+);
+/*
+This function creates a new body by performing a linear extrusion of a given
+profile.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_fill_hole
+(
+/* received */
+PK_BODY_t                         /*target*/,          /* target body */
+int                               /*n_edges*/,         /* number of edges */
+const PK_EDGE_t                   /*edges*/[],         /* boundary edges of hole */
+double                            /*tolerance*/,       /* tolerance */
+const PK_BODY_fill_hole_o_t     * /*options*/,         /* options structure */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/,        /* tracking information */
+PK_fill_hole_fault_t      *const  /*fault*/,           /* status */
+int                       *const  /*n_fault_topols*/,  /* number of fault topologies */
+PK_TOPOL_t               **const  /*fault_topols*/     /* topologies associated */
+);
+/*
+This function will fill a hole in a body or collection of bodies with a
+set of faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_hollow
+(
+/* received */
+PK_BODY_t            /*body*/,               /* body to be hollowed */
+double               /*offset*/,             /* offset distance */
+double               /*tolerance*/,          /* tolerance */
+PK_LOGICAL_t         /*face_face_check*/,    /* do face face checks */
+/* returned */
+int          *const  /*n_faces*/,            /* number of faces */
+PK_FACE_t   **const  /*old_faces*/,          /* faces in original body (optional) */
+PK_FACE_t   **const  /*new_faces*/           /* new faces corresponding to */
+);
+/*
+This function hollows a solid body by offsetting all faces of the body
+by the given offset distance
+
+Note: This function is superseded by PK_BODY_hollow_2
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_hollow_2
+(
+/* received */
+PK_BODY_t                   /*body*/,               /* body to be hollowed */
+double                      /*offset*/,             /* offset distance */
+double                      /*tolerance*/,          /* tolerance */
+const PK_BODY_hollow_o_t  * /*options*/,            /* user options */
+/* returned */
+PK_TOPOL_track_r_t  *const  /*tracking*/,           /* tracking information */
+PK_TOPOL_local_r_t  *const  /*results*/             /* status information */
+);
+/*
+This function hollows a solid body by offsetting all faces of the body
+by the given offset distance
+
+NOTE : This function supersedes PK_BODY_hollow.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_identify_facesets_r_f
+(
+/* received */
+PK_identify_facesets_r_t *const  /*facesets*/
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_identify_facesets
+(
+/* received */
+PK_BODY_t                             /*target*/,             /* target body */
+PK_BODY_t                             /*tool*/,               /* tool body */
+int                                   /*n_edges*/,            /* number of common */
+const PK_EDGE_t                       /*target_edges*/[],     /* target edges */
+const PK_EDGE_t                       /*tool_edges*/[],       /* tool edges */
+int                                   /*n_vertices*/,         /* number of common */
+const PK_VERTEX_t                     /*target_vertices*/[],  /* target vertices */
+const PK_VERTEX_t                     /*tool_vertices*/[],    /* tool vertices */
+const PK_BODY_identify_facesets_o_t * /*options*/,            /* identify options */
+/* returned */
+PK_identify_facesets_r_t      *const  /*results*/             /* identify results */
+);
+/*
+
+This function identifies surviving facesets, given matching edges on
+the target and tool bodies.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_identify_details_r_f
+(
+/* received */
+PK_identify_details_r_t *const  /*facesets*/
+);
+/*
+This function frees the memory used by a PK_identify_details_r_t structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_identify_details
+(
+/* received */
+PK_BODY_t                            /*body*/,       /* body to search */
+int                                  /*n_details*/,  /* number of detail types */
+const PK_detail_t                    /*details*/[],  /* detail types */
+const PK_BODY_identify_details_o_t * /*options*/,    /* identify options */
+/* returned */
+PK_identify_details_r_t      *const  /*results*/     /* identify results */
+);
+/*
+This function identifies details in the given `body' of the types specified
+in `details'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_identify_general
+(
+/* received */
+PK_BODY_t                            /*body*/,      /* body to search */
+const PK_BODY_identify_general_o_t * /*options*/,   /* options */
+/* returned */
+PK_identify_general_r_t      *const  /*results*/     /* identify results */
+);
+/*
+This function identifies characteristics of a general body which require it to
+be of type PK_BODY_type_general_c.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_identify_general_r_f
+(
+/* received */
+PK_identify_general_r_t *const  /*topol*/
+);
+/*
+This function frees the memory used by a PK_identify_general_r_t structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_find_facesets_r_f
+(
+/* received */
+PK_BODY_find_facesets_r_t    *const  /*facesets*/     /* facesets to be deleted */
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_find_facesets
+(
+/* received */
+PK_BODY_t                            /*body*/,        /* body */
+int                                  /*n_edges*/,     /* no of bounding edges */
+const PK_EDGE_t                      /*edges*/[],     /* bounding edges from body */
+const PK_BODY_find_facesets_o_t    * /*options*/,     /* find options */
+/* returned */
+PK_BODY_find_facesets_r_t    *const  /*results*/      /* find results */
+);
+/*
+
+This function finds all the facesets on the body and splits those that are
+divided by the input edges into smaller facesets. It then returns the facesets
+that are selected by the options and, if requested, the input edges that
+bound each faceset.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_find_extreme
+(
+/* received */
+PK_BODY_t                          /*body*/,         /* body on which extreme sought */
+PK_VECTOR_t                        /*direction_1*/,  /* first direction */
+PK_VECTOR_t                        /*direction_2*/,  /* second direction */
+PK_VECTOR_t                        /*direction_3*/,  /* third direction */
+const PK_BODY_find_extreme_o_t   * /*options*/,      /* find extreme options */
+/* returned */
+PK_VECTOR_t                *const  /*extreme*/,      /* position of extreme point */
+PK_TOPOL_t                 *const  /*topol*/         /* topology on which extreme */
+);
+/*
+This function finds the extreme point on the given `body' in `direction_1'.
+If this extreme is not a single point, then  `direction_2' and `direction_3'
+are used successively to reduce the number of extreme points to one.
+
+Currently `options' is an empty option structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_plane
+(
+/* received */
+PK_BODY_t          /*body*/,          /* a body */
+PK_PLANE_t         /*plane*/,         /* plane */
+double             /*tol*/,           /* tolerance */
+/* returned */
+int        *const  /*n_edges*/,       /* number of edges imprinted */
+PK_EDGE_t **const  /*edges*/          /* imprinted edges */
+);
+/*
+This function imprints the given plane on the body.
+
+NOTE: This function is deprecated and has been superseded by
+PK_BODY_imprint_plane_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_plane_2
+(
+/* received */
+PK_BODY_t                         /*body*/,         /* target body */
+PK_PLANE_t                        /*plane*/,        /* tool plane */
+const PK_BODY_imprint_plane_o_t * /*options*/,      /* options */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/      /* tracking information */
+);
+/*
+This function imprints the given plane on the body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_faces_2
+(
+/* received */
+PK_BODY_t                         /*body*/,         /* a target body */
+int                               /*n_faces*/,      /* number of tool faces */
+const PK_FACE_t                   /*faces*/[],      /* tool faces */
+const PK_BODY_imprint_faces_o_t * /*options*/,      /* imprint options */
+/* returned */
+PK_imprint_r_t            *const  /*results*/,      /* imprint results */
+PK_TOPOL_track_r_t        *const  /*tracking*/      /* tracking information */
+);
+/*
+This function imprints edges on the given target body and tool faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_faces
+(
+/* received */
+PK_BODY_t          /*body*/,          /* a body */
+int                /*n_faces*/,       /* number of faces */
+const PK_FACE_t    /*faces*/[],       /* faces */
+double             /*tol*/,           /* tolerance */
+/* returned */
+int        *const  /*n_edges*/,       /* number of edges imprinted */
+PK_EDGE_t **const  /*edges*/          /* imprinted edges */
+);
+/*
+This function imprints the given faces on the body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_curve
+(
+/* received */
+PK_BODY_t            /*body*/,                   /* body */
+PK_CURVE_t           /*curve*/,                  /* curve */
+PK_INTERVAL_t        /*bounds*/,                 /* bounds of curve */
+/* returned */
+int                *const  /*n_new_edges*/,      /* number of new edges */
+PK_EDGE_t         **const  /*new_edges*/,        /* new edges (optional) */
+int                *const  /*n_new_faces*/,      /* number of new faces */
+PK_FACE_t         **const  /*new_faces*/         /* new faces (optional) */
+);
+/*
+This function imprints a curve onto a body, thereby creating a new edge or
+edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_curves_normal
+(
+/* received */
+PK_BODY_t          /*body*/,          /* a body */
+int                /*n_curves*/,      /* number of curves */
+const PK_CURVE_t   /*curves*/[],      /* curves */
+double             /*tol*/,           /* tolerance */
+/* returned */
+int        *const  /*n_edges*/,       /* number of edges imprinted */
+PK_EDGE_t **const  /*edges*/          /* imprinted edges */
+);
+/*
+This function imprints the given curves on the body by projecting them locally
+down face normals.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_curves_vector
+(
+/* received */
+PK_BODY_t          /*body*/,          /* a body */
+int                /*n_curves*/,      /* number of curves */
+const PK_CURVE_t   /*curves*/[],      /* curves */
+double             /*tol*/,           /* tolerance */
+PK_VECTOR_t        /*direction*/,     /* direction to project curves in */
+/* returned */
+int        *const  /*n_edges*/,       /* number of edges imprinted */
+PK_EDGE_t **const  /*edges*/          /* imprinted edges */
+);
+/*
+This function imprints the given curves on the body by projecting them in the
+given direction.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_cus_normal
+(
+/* received */
+PK_BODY_t                              /*body*/,          /* a body */
+int                                    /*n_curves*/,      /* number of curves */
+const PK_CURVE_t                       /*curves*/[],      /* curves */
+const PK_INTERVAL_t                    /*intervals*/[],   /* parametric intervals */
+double                                 /*tol*/,           /* tolerance */
+const PK_BODY_imprint_cus_normal_o_t * /*options*/,       /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/       /* tracking information */
+);
+/*
+This function imprints the given curves on the body by projecting them locally
+down face normals.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_cus_vector
+(
+/* received */
+PK_BODY_t                              /*body*/,          /* a body */
+int                                    /*n_curves*/,      /* number of curves */
+const PK_CURVE_t                       /*curves*/[],      /* curves */
+const PK_INTERVAL_t                    /*intervals*/[],   /* parametric intervals */
+double                                 /*tol*/,           /* tolerance */
+const PK_VECTOR_t                      /*direction*/,     /* direction to project */
+const PK_BODY_imprint_cus_vector_o_t * /*options*/,       /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/       /* tracking information */
+);
+/*
+This function imprints the given curves on the body by projecting them in the
+given direction.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_cus_vec
+(
+/* received */
+PK_BODY_t                            /*body*/,         /* a body */
+int                                  /*n_curves*/,     /* number of curves */
+const PK_CURVE_t                     /*curves*/[],     /* curves */
+const PK_INTERVAL_t                  /*intervals*/[],  /* parametric intervals */
+double                               /*tol*/,          /* tolerance */
+const PK_VECTOR_t                    /*direction*/,    /* direction to project */
+const PK_BODY_imprint_cus_vec_o_t  * /*options*/,      /* options */
+/* returned */
+PK_TOPOL_track_r_t           *const  /*tracking*/      /* tracking information */
+);
+/*
+This function imprints the given curves on the body by projecting them in the
+given direction.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_body
+(
+/* received */
+PK_BODY_t                     /*target*/,       /* target body */
+PK_BODY_t                     /*tool*/,         /* tool body */
+const PK_BODY_imprint_o_t   * /*options*/,      /* imprint options */
+/* returned */
+PK_imprint_r_t        *const  /*results*/       /* imprint results */
+);
+/*
+This function imprints edges on the given target and tool bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_imprint_cus_shadow
+(
+/* received */
+const int                               /*n_bodies*/,         /* number of bodies */
+const PK_BODY_t                         /*bodies*/[],         /* bodies */
+const PK_TRANSF_t                       /*transfs*/[],        /* body transformation */
+const PK_VECTOR1_t                      /*view_direction*/,   /* viewing direction */
+const PK_BODY_imprint_cus_shadow_o_t  * /*options*/,          /* option structure */
+/* returned */
+int                             *const  /*n_edges*/,          /* number of edges */
+PK_EDGE_t                      **const  /*edges*/,            /* new edges */
+int                             *const  /*n_visible_faces*/,  /* number of visible */
+PK_FACE_t                      **const  /*visible_faces*/     /* visible faces */
+);
+/*
+This function takes the given bodies and splits their faces into portions
+which are completely visible in the given view direction by imprinting the
+`shadow' curves cast by overlapping faces in front.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_tracked_loft_r_f
+(
+/* received */
+PK_BODY_tracked_loft_r_t *const  /*lofted_body*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_lofted_body
+(
+/* received */
+int                                  /*n_profiles*/,       /* number of profiles */
+const PK_BODY_t                      /*profiles*/[],       /* profiles to loft */
+const PK_VERTEX_t                    /*start_vertices*/[], /* start vertices */
+const PK_BODY_make_lofted_body_o_t * /*options*/,          /* options on lofting */
+/* returned */
+PK_BODY_tracked_loft_r_t     *const  /*lofted_body*/       /* result lofted body */
+);
+/*
+This function creates a sheet or solid body based on surfaces created by
+lofting through a set of sheet, wire or minimum body profiles.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_curves_outline
+(
+/* received */
+const int                               /*n_bodies*/,         /* number of bodies */
+const PK_BODY_t                         /*bodies*/[],         /* bodies */
+const PK_TRANSF_t                       /*transfs*/[],        /* body transformation */
+const PK_VECTOR1_t                      /*view_direction*/,   /* viewing direction */
+const PK_BODY_make_curves_outline_o_t * /*options*/,          /* option structure */
+/* returned */
+int                             *const  /*n_curves*/,         /* number of curves */
+PK_CURVE_t                     **const  /*curves*/,           /* boundary curves */
+PK_INTERVAL_t                  **const  /*intervals*/,        /* parametric */
+PK_TOPOL_t                     **const  /*topols*/,           /* edges/faces of */
+int                            **const  /*outlines*/,         /* indicates which */
+double                         **const  /*curve_tolerances*/, /* curve tolerance */
+double                          *const  /*max_separation*/    /* largest gap */
+);
+/*
+This function outputs one or more outlines of a body or bodies for a given
+view direction as a set of ordered curves together with their intervals.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_spun_outline
+(
+/* received */
+const int                               /*n_bodies*/,         /* number of bodies */
+const PK_BODY_t                         /*bodies*/[],         /* bodies */
+const PK_TRANSF_t                       /*transfs*/[],        /* body transformation */
+const PK_AXIS1_sf_t                   * /*spin_axis*/,        /* spin axis */
+const PK_BODY_make_spun_outline_o_t   * /*options*/,          /* option structure */
+/* returned */
+int                             *const  /*n_curves*/,         /* number of curves */
+PK_CURVE_t                     **const  /*curves*/,           /* boundary curves */
+PK_INTERVAL_t                  **const  /*intervals*/,        /* parametric */
+PK_TOPOL_t                     **const  /*topols*/,           /* edges/faces of */
+int                            **const  /*outlines*/,         /* indicates which */
+double                         **const  /*curve_tolerances*/, /* curve tolerance */
+double                          *const  /*max_separation*/    /* largest gap */
+);
+/*
+This function outputs one or more outlines of a body or bodies for a given
+spin axis as a set of ordered curves together with their intervals.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_taper
+(
+/* received */
+const PK_BODY_t               /*body*/,            /* body to be tapered */
+int                           /*n_refs_above*/,    /* number of reference */
+const PK_ENTITY_t             /*refs_above*/[],    /* reference entities */
+int                           /*n_refs_below*/,    /* number of reference */
+const PK_ENTITY_t             /*refs_below*/[],    /* reference entities */
+const PK_BODY_t               /*parting_body*/,    /* parting body */
+PK_VECTOR1_t                  /*direction*/,       /* draw direction */
+double                        /*angle_above*/,     /* taper angle above */
+double                        /*angle_below*/,     /* taper angle below */
+const PK_BODY_taper_o_t     * /*options*/,         /* options */
+/* returned */
+PK_TOPOL_track_r_t    *const  /*tracking*/,        /* tracking information */
+PK_TOPOL_local_r_t    *const  /*results*/          /* status information */
+);
+/*
+This function applies two-sided tapering to the `body' parted
+by the `parting_body'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_trim_neutral_sheets
+(
+/* received */
+PK_BODY_t                       /*body*/,              /* the target body */
+int                             /*n_pairs*/,           /* the number of pairs */
+const PK_FACE_set_pair_t        /*pairs*/[],           /* array of pairs */
+double                          /*tol*/,               /* tolerance for curves */
+/* returned */
+PK_BODY_t                       /*neutral_sheets*/[],  /* neutral sheets */
+PK_neutral_error_t              /*errors*/[],          /* status of neutral sheets */
+PK_FACE_neutral_causes_array_t  /*causes*/[]           /* tracking information */
+);
+/*
+This function trims the neutral sheets in accordance with their pairs
+of face sets.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_trim_neutral_sheets_2
+(
+/* received */
+PK_BODY_t                               /*body*/,              /* the target body */
+int                                     /*n_pairs*/,           /* number of pairs */
+const PK_FACE_set_pair_t                /*pairs*/[],           /* array of pairs */
+double                                  /*tol*/,               /* tolerance for */
+const PK_BODY_trim_neutral_sheets_o_t * /*options*/,           /* option structure */
+/* returned */
+PK_BODY_t                               /*neutral_sheets*/[],  /* neutral sheets */
+PK_neutral_error_t                      /*errors*/[],          /* status of neutral */
+PK_FACE_neutral_causes_array_t          /*causes*/[],          /* tracking */
+PK_TOPOL_track_r_t              *const  /*tracking*/           /* tracking */
+);
+/*
+This function trims the neutral sheets in accordance with their pairs
+of face sets.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_offset
+(
+/* received */
+PK_BODY_t            /*body*/,               /* body to be offset */
+double               /*offset*/,             /* offset distance */
+double               /*tolerance*/,          /* tolerance */
+PK_LOGICAL_t         /*face_face_check*/     /* do face face checks */
+/* returned */
+);
+/*
+Offsets faces of a solid or sheet body
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_offset_2
+(
+/* received */
+PK_BODY_t                    /*body*/,
+double                       /*offset*/,           /* offset for each face */
+double                       /*tolerance*/,        /* tolerance */
+const PK_BODY_offset_o_t   * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t   *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t   *const  /*results*/           /* status information */
+);
+/*
+This function offsets faces of a solid or sheet body.
+
+NOTE : This function supersedes PK_BODY_offset.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_offset_planar_wire
+(
+/* received */
+PK_BODY_t                              /*wire_body*/,    /* planar wire body */
+double                                 /*offset*/,       /* offset distance */
+PK_VECTOR1_t                           /*normal*/,       /* normal of the plane */
+PK_EDGE_t                              /*ref*/,          /* reference edge */
+const PK_BODY_offset_planar_wire_o_t * /*options*/,      /* options structure */
+/* returned */
+int                            *const  /*n_new_wires*/,  /* number of new wires */
+PK_BODY_t                     **const  /*new_wires*/,    /* new wires */
+PK_TOPOL_track_r_t             *const  /*tracking*/      /* tracking information */
+);
+/*
+This function offsets a planar wire body in the plane by a specified
+distance. Edges of the new offset wire bodies are paired with their
+originating edges or vertices in the tracking information.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_pick_topols_r_f
+(
+/* received */
+PK_BODY_pick_topols_r_t *const  /*picked*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_pick_topols
+(
+/* received */
+const int                        /*n_bodies*/,        /* number of bodies */
+const PK_PART_t                  /*bodies*/[],        /* body array */
+const PK_TRANSF_t              * /*body_transfs*/,    /* transformations */
+const PK_AXIS1_sf_t            * /*ray*/,             /* picking ray */
+const PK_BODY_pick_topols_o_t  * /*options*/,         /* control options */
+/* returned */
+PK_BODY_pick_topols_r_t *const  /*picked*/            /* picked entities */
+);
+/*
+Pick entities from an array of body instances by their proximity to a line
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_section_with_sheet
+(
+/* received */
+PK_BODY_t                   /*target*/,         /* Body to be sectioned by sheet */
+PK_BODY_t                   /*sheet*/,          /* Sectioning sheet body */
+const PK_BODY_section_o_t * /*options*/,        /* Sectioning options */
+/* returned */
+PK_section_r_t      *const  /*results*/         /* front/back faces/bodies */
+);
+/*
+This function sections the target body with the tool sheet body.
+
+NOTE: This function is obsolete and has been superseded
+by PK_BODY_section_with_sheet_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_section_with_sheet_2
+(
+/* received */
+PK_BODY_t                       /*target*/,     /* body to be sectioned by sheet */
+PK_BODY_t                       /*sheet*/,      /* sectioning sheet body */
+const PK_BODY_section_o_t     * /*options*/,    /* sectioning options */
+/* returned */
+PK_TOPOL_track_r_t      *const  /*tracking*/,   /* tracking information */
+PK_section_2_r_t        *const  /*results*/     /* front/back faces/bodies */
+);
+/*
+This function sections the target body with the tool sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_section_with_surf
+(
+/* received */
+PK_BODY_t                   /*target*/,         /* Body to be sectioned by surface */
+PK_SURF_t                   /*surface*/,        /* Sectioning surface */
+const PK_BODY_section_o_t * /*options*/,        /* Sectioning options */
+/* returned */
+PK_section_r_t      *const  /*results*/         /* front/back faces/bodies */
+);
+/*
+This function sections the target body with the tool surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_section
+(
+/* received */
+int                              /*n_targets*/,  /* number of target bodies */
+PK_BODY_t                        /*targets*/[],  /* target bodies */
+int                              /*n_tools*/,    /* number of tool bodies */
+PK_BODY_t                        /*tools*/[],    /* tool bodies */
+const PK_BODY_make_section_o_t * /*options*/,    /* Sectioning options */
+/* returned */
+PK_TOPOL_track_r_t       *const  /*tracking*/,   /* tracking information */
+PK_BODY_make_section_r_t *const  /*results*/     /* resultant bodies */
+);
+/*
+This function generates sections of target bodies using set of tool bodies.
+Target bodies remain unchanged.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_section_with_surfs
+(
+/* received */
+int                              /*n_targets*/,  /* number of target bodies */
+PK_BODY_t                        /*targets*/[],  /* target bodies */
+int                              /*n_tools*/,    /* number of tool surfaces */
+PK_SURF_t                        /*tools*/[],    /* tool surfaces */
+const PK_BODY_make_section_o_t * /*options*/,    /* Sectioning options */
+/* returned */
+PK_TOPOL_track_r_t       *const  /*tracking*/,   /* tracking information */
+PK_BODY_make_section_r_t *const  /*results*/     /* resultant bodies */
+);
+/*
+This function generates sections of target bodies using set of tool surfaces.
+Target bodies remain unchanged.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_sew_bodies
+(
+/* received */
+int                               /*n_bodies*/,         /* number of bodies to sew */
+const PK_BODY_t                   /*bodies*/[],         /* bodies to sew */
+double                            /*gap_width_bound*/,  /* lower bound on gap width */
+const PK_BODY_sew_bodies_o_t    * /*options*/,          /* options on sewing */
+/* returned */
+int                       *const  /*n_sewn_bodies*/,    /* number of sewn bodies */
+PK_BODY_t                **const  /*sewn_bodies*/,      /* bodies produced by sewing */
+int                       *const  /*n_unsewn_bodies*/,  /* number of input bodies */
+PK_BODY_t                **const  /*unsewn_bodies*/,    /* input bodies not sewn */
+int                       *const  /*n_problem_groups*/, /* number of problem */
+PK_BODY_problem_group_t  **const  /*problem_groups*/    /* problem edge groups */
+);
+/*
+This function attempts to sew the received bodies together where they have
+edges common to within a given tolerance upper bound.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_find_knit_pattern
+(
+/* received */
+int                                   /*n_bodies*/,           /* array of */
+const PK_BODY_t                       /*bodies*/[],           /* bodies between */
+const PK_BODY_find_knit_pattern_o_t * /*options*/,            /* options */
+/* returned */
+PK_BODY_knit_pattern_t        *const  /*knit_pattern*/,       /* knitting pattern */
+int                           *const  /*n_absent_bodies*/,    /* bodies not included */
+PK_BODY_t                    **const  /*absent_bodies*/       /* in pattern */
+);
+/*
+This function constructs a knitting pattern by matching and splitting
+coincident edges, then pairing them off into corresponding entries in
+two edge arrays.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_apply_knit_pattern
+(
+/* received */
+const PK_BODY_t                        /*body*/,          /* target body */
+const PK_BODY_knit_pattern_t         * /*knit_pattern*/,  /* knitting pattern */
+const PK_BODY_apply_knit_pattern_o_t * /*options*/,       /* options */
+/* returned */
+PK_BODY_knit_result_t          *const  /*knit_result*/    /* status, edges not knit */
+);
+/*
+This function assembles a composite sheet or solid body by merging paired edge
+in the knit pattern
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_knit
+(
+/* received */
+PK_BODY_t                           /*body*/,         /* target body */
+int                                 /*n_topols*/,     /* number of topols */
+const PK_TOPOL_t                    /*topols*/[],     /* topols */
+const PK_TOPOL_t                    /*matches*/[],    /* matched topols */
+PK_BODY_knit_o_t                  * /*options*/,      /* options */
+/* returned */
+PK_TOPOL_track_r_t          *const  /*tracking*/      /* tracking information */
+);
+/*
+This function assembles a body by merging paired topols from the `topols'
+and `matches' array.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_share_geom
+(
+/* received */
+PK_BODY_t        /*body*/,         /* body on which to attempt sharing */
+PK_LOGICAL_t     /*icurve_only*/,  /* only process intersection curves */
+/* returned */
+int      *const  /*n_geoms*/       /* number of geometries removed */
+);
+/*
+This function attempts to reduce the size of a part by sharing geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_spin
+(
+/* received */
+PK_BODY_t                /*body*/,           /* minimum, wire or sheet body */
+const PK_AXIS1_sf_t    * /*axis*/,           /* spin axis */
+double                   /*angle*/,          /* spin angle */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+int              *const  /*n_laterals*/,     /* number of laterals */
+PK_TOPOL_t      **const  /*laterals*/,       /* new edges of faces (may be NULL) */
+PK_TOPOL_t      **const  /*bases*/,          /* entities swept into laterals */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function spins a minimum body into a wire body, a wire body into a
+sheet body, a sheet body into a solid body or a general body into a general
+body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_tracked_sweep_r_f
+(
+/* received */
+PK_BODY_tracked_sweep_r_t *const  /*profile*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_tracked_sweep_2_r_f
+(
+/* received */
+PK_BODY_tracked_sweep_2_r_t *const  /*swept_body*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_sweep_tool_r_f
+(
+/* received */
+PK_BODY_sweep_tool_r_t *const  /*swept_body*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_swept_body
+(
+/* received */
+const PK_BODY_t                      /*profile*/,          /* profile to sweep */
+const PK_BODY_t                      /*path*/,             /* path of sweep */
+const PK_VERTEX_t                    /*path_start*/,       /* path start vertex */
+const PK_BODY_make_swept_body_o_t  * /*options*/,          /* options on sweeping */
+/* returned */
+PK_BODY_tracked_sweep_r_t    *const  /*swept_body*/        /* result swept body */
+);
+/*
+This function creates a sheet or solid body by sweeping a wire or sheet
+profile along a wire path.
+
+NOTE: This function is superseded by PK_BODY_make_swept_body_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_swept_body_2
+(
+/* received */
+int                                   /*n_profiles*/,         /* number of profiles */
+const PK_BODY_t                       /*profiles*/[],         /* profiles to sweep */
+const PK_BODY_t                       /*path*/,               /* path of sweep */
+const PK_VERTEX_t                     /*path_vertices*/[],    /* path vertices where */
+const PK_BODY_make_swept_body_2_o_t * /*options*/,            /* options on sweeping */
+/* returned */
+PK_BODY_tracked_sweep_2_r_t   *const  /*swept_body*/          /* result swept body */
+);
+/*
+This function creates a sheet or solid body by sweeping a set of
+wire or sheet profiles along a wire path.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_swept_profiles
+(
+/* received */
+const PK_BODY_t                          /*profile*/,       /* profile to sweep */
+const PK_BODY_t                          /*path*/,          /* path of sweep */
+const PK_VERTEX_t                        /*path_start*/,    /* path start vertex */
+const PK_BODY_make_swept_profiles_o_t  * /*options*/,       /* options on sweeping */
+/* returned */
+int                              *const  /*n_profiles*/,
+PK_BODY_tracked_sweep_r_t       **const  /*profiles*/        /* result profiles */
+);
+/*
+This function sweeps a given profile along the specified path to produce
+a set of profiles at each vertex of the path.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_make_swept_tool
+(
+/* received */
+const PK_BODY_t                     /*tool*/,            /* tool to sweep */
+const PK_AXIS1_sf_t               * /*tool_axis*/,       /* axis for tool */
+const PK_BODY_t                     /*path*/,            /* path of sweep */
+const PK_BODY_make_swept_tool_o_t * /*options*/,         /* options on sweeping */
+/* returned */
+PK_TOPOL_track_r_t          *const  /*tracking*/,        /* tracking information */
+PK_BODY_sweep_tool_r_t      *const  /*swept_tool*/       /* resulting swept tool */
+);
+/*
+This function creates a solid body by sweeping a solid tool body along a wire
+path.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_sweep
+(
+/* received */
+PK_BODY_t                /*body*/,           /* minimum, wire or sheet body */
+PK_VECTOR_t              /*path*/,           /* translation vector */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+int              *const  /*n_laterals*/,     /* number of laterals */
+PK_TOPOL_t      **const  /*laterals*/,       /* new edges or faces (may be NULL) */
+PK_TOPOL_t      **const  /*bases*/,          /* entities swept into laterals */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function sweeps a minimum body into a wire body, a wire body into a
+sheet body, a sheet body into a solid body or a general body into a general
+body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_thicken
+(
+/* received */
+PK_BODY_t            /*body*/,               /* sheet body to be thickened */
+double               /*front*/,              /* thickness on front of face */
+double               /*back*/,               /* thickness on back of face */
+double               /*tolerance*/,          /* tolerance for SP-curve conversion */
+PK_LOGICAL_t         /*face_face_check*/,    /* do face face checks */
+/* returned */
+int          *const  /*n_topols*/,           /* number of topols */
+PK_TOPOL_t  **const  /*old_topols*/,         /* original topology (optional) */
+PK_TOPOL_t  **const  /*new_topols*/          /* new topology      (optional) */
+);
+/*
+Thickens a sheet body into a solid
+
+NOTE: This function is obsolete and has been superseded by
+PK_BODY_thicken_2
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_thicken_2
+(
+/* received */
+PK_BODY_t                   /*body*/,             /* body to be thickened */
+double                      /*front_default*/,    /* default front offset */
+double                      /*back_default*/,     /* default back offset */
+double                      /*tolerance*/,        /* tolerance */
+const PK_BODY_thicken_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t  *const  /*tracking*/,         /* tracking information */
+PK_BODY_thicken_r_t *const  /*results*/           /* status information */
+);
+/*
+Thickens a sheet body into a solid
+
+NOTE: This function supersedes PK_BODY_thicken, which is now obsolete.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_thicken_3
+(
+/* received */
+PK_BODY_t                   /*body*/,             /* body to be thickened */
+double                      /*front_default*/,    /* default front offset */
+double                      /*back_default*/,     /* default back offset */
+double                      /*tolerance*/,        /* tolerance */
+const PK_BODY_thicken_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t  *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t  *const  /*results*/           /* status information */
+);
+/*
+This function thickens a sheet body into a solid body.
+
+NOTE: This function supersedes PK_BODY_thicken_2, which is now obsolete.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_transform
+(
+/* received */
+PK_BODY_t             /*body*/,           /* body to be transformed */
+PK_TRANSF_t           /*transf*/,         /* transformation */
+double                /*tolerance*/,      /* tolerance for replacement geometry */
+/* returned */
+int           *const  /*n_replaces*/,     /* number of geoms replaced */
+PK_GEOM_t    **const  /*replaces*/,       /* replaced geometry (optional) */
+PK_LOGICAL_t **const  /*exact*/           /* whether replaced geometry is exact */
+);
+/*
+This function transforms the given body by the given transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_transform_2
+(
+/* received */
+PK_BODY_t                     /*body*/,             /* body to be transformed */
+PK_TRANSF_t                   /*transf*/,           /* transformation */
+double                        /*tolerance*/,        /* tolerance */
+const PK_BODY_transform_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t    *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t    *const  /*results*/           /* status information */
+);
+/*
+This function transforms the given body by the given transformation.
+
+NOTE : This function supersedes PK_BODY_transform.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_trim
+(
+/* received */
+PK_BODY_t          /*body*/,          /* a body */
+int                /*n_edges*/,       /* number of edges */
+const PK_EDGE_t    /*edges*/[],       /* edges */
+int                /*n_faces*/,       /* number of faces */
+const PK_FACE_t    /*faces*/[],       /* faces */
+PK_LOGICAL_t       /*keep*/           /* Logical to determine whether we keep */
+);
+/*
+This function trims the `body' which must be a sheet.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_trim_gap_analysis
+(
+/* received */
+PK_BODY_t            /*body*/,        /* a body */
+int                  /*n_edges*/,     /* number of edges */
+const PK_EDGE_t      /*edges*/[],     /* edges */
+double               /*tol*/,         /* tolerance */
+/* returned */
+int          *const  /*n_vertices*/,  /* number of problem vertices */
+PK_VERTEX_t **const  /*vertices*/     /* problem vertices */
+);
+/*
+This function finds gaps in the edges supplied to a failed trim operation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_ask_topology
+(
+/* received */
+PK_BODY_t                        /*body*/,         /* body */
+const PK_BODY_ask_topology_o_t * /*options*/,      /* options */
+/* returned */
+int                      *const  /*n_topols*/,     /* number of topological */
+PK_TOPOL_t              **const  /*topols*/,       /* topological entities */
+PK_CLASS_t              **const  /*classes*/,      /* classes of topological */
+int                      *const  /*n_relations*/,  /* number of relations */
+int                     **const  /*parents*/,      /* parents in relations */
+int                     **const  /*children*/,     /* children in relations */
+PK_TOPOL_sense_t        **const  /*senses*/        /* senses in relations */
+);
+/*
+This function returns a definition of the topology of a body in a general
+topology representation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_topology
+(
+/* received */
+int                                 /*n_topols*/,     /* number of topols */
+const PK_CLASS_t                    /*classes*/[],    /* class of each topol */
+int                                 /*n_relations*/,  /* number of relations */
+const int                           /*parents*/[],    /* parents */
+const int                           /*children*/[],   /* children */
+const PK_TOPOL_sense_t              /*senses*/[],     /* sense in which child */
+const PK_BODY_create_topology_o_t * /*options*/,      /* options */
+/* returned */
+PK_BODY_t                   *const  /*body*/,         /* created body */
+PK_TOPOL_t                  *const  /*topols*/,       /* created topols */
+PK_BODY_fault_t             *const  /*fault*/,        /* fault indicator */
+int                         *const  /*fault_index*/   /* index of fault topol */
+);
+/*
+This function creates the topology of a general body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_topology_2
+(
+/* received */
+int                                   /*n_topols*/,     /* number of topols */
+const PK_CLASS_t                      /*classes*/[],    /* class of each topol */
+int                                   /*n_relations*/,  /* number of relations */
+const int                             /*parents*/[],    /* parents */
+const int                             /*children*/[],   /* children */
+const PK_TOPOL_sense_t                /*senses*/[],     /* sense in which child */
+const PK_BODY_create_topology_2_o_t * /*options*/,      /* options */
+/* returned */
+PK_BODY_create_topology_2_r_t *const  /*creation*/      /* result */
+);
+/*
+This function creates the topology of a general body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_create_topology_2_r_f
+(
+/* received */
+PK_BODY_create_topology_2_r_t *const  /*creation*/   /* structure to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BODY_set_type
+(
+/* received */
+PK_BODY_t                      /*body*/,          /* body to have its type changed */
+PK_BODY_type_t                 /*new_type*/,      /* type to change to (if possible) */
+const PK_BODY_set_type_o_t   * /*options*/        /* options structure */
+);
+/*
+This function tries to change the type of the body (e.g. from General to
+Solid). If the change is not possible, either a mild error is returned
+and the body is unchanged, or in specific cases a serious error is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_INSTANCE_create
+(
+/* received */
+const PK_INSTANCE_sf_t * /*instance_sf*/,   /* standard form of a instance */
+/* returned */
+PK_INSTANCE_t    *const  /*instance*/       /* the instance */
+);
+/*
+This function creates a instance from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_INSTANCE_ask
+(
+/* received */
+PK_INSTANCE_t            /*instance*/,      /* an instance */
+/* returned */
+PK_INSTANCE_sf_t *const  /*instance_sf*/    /* the standard form of the instance */
+);
+/*
+This function returns the standard form of the given instance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_INSTANCE_change_part
+(
+/* received */
+PK_INSTANCE_t            /*instance*/,      /* an instance */
+PK_PART_t                /*part*/           /* part to point to */
+);
+/*
+This function modifies the given instance so that it instances a different
+part.
+
+If this would cause the assembly graph to become cyclic, PK_ERROR_cyclic_assy
+will be returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_INSTANCE_transform
+(
+/* received */
+PK_INSTANCE_t       /*instance*/,     /* instance */
+PK_TRANSF_t         /*transf*/        /* transform (may be PK_ENTITY_null) */
+);
+/*
+This function transforms an instance by transforming its transform. The given
+transform must be a rigid motion. The null transform is treated as the
+identity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_INSTANCE_replace_transf
+(
+/* received */
+PK_INSTANCE_t       /*instance*/,     /* instance */
+PK_TRANSF_t         /*transf*/        /* replacement transform */
+);
+/*
+This function replaces the transform of an instance by the given one. Either
+(or both) of these transforms may be PK_ENTITY_null. The given transform must
+be a rigid motion, or PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_ask_body
+(
+/* received */
+PK_REGION_t       /*region*/,             /* a region */
+/* returned */
+PK_BODY_t *const  /*body*/                /* owning body */
+);
+/*
+This function returns the body containing the given region.
+
+If the region is contained within a compound body ( see PK_BODY_ask_config )
+then the child body to which the region belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_ask_shells
+(
+/* received */
+PK_REGION_t         /*region*/,           /* a region */
+/* returned */
+int         *const  /*n_shells*/,         /* number of shells (>= 0) */
+PK_SHELL_t **const  /*shells*/            /* shells (optional) */
+);
+/*
+This function returns the set of shells bounding the given region.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_is_solid
+(
+/* received */
+PK_REGION_t          /*region*/,     /* the region */
+/* returned */
+PK_LOGICAL_t *const  /*is_solid*/    /* whether region is solid or void */
+);
+/*
+This function returns PK_LOGICAL_true if the given region is solid and
+PK_LOGICAL_false if it is void.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_combine_bodies
+(
+/* received */
+PK_REGION_t      /*target_region*/,          /* a region of the first body */
+PK_BODY_t        /*tool_body*/               /* the second body */
+);
+/*
+This function combines two bodies into a single disconnected body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_make_void
+(
+/* received */
+PK_REGION_t      /*region*/      /* region to be made void */
+);
+/*
+This function sets the type of the given `region' to be void.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_make_solid
+(
+/* received */
+PK_REGION_t      /*region*/      /* region to be made solid */
+);
+/*
+This function sets the type of the given region to be solid.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_imprint_curve
+(
+/* received */
+PK_REGION_t          /*region*/,          /* region */
+PK_CURVE_t           /*curve*/,           /* curve */
+PK_INTERVAL_t        /*bounds*/,          /* bounds of curve */
+/* returned */
+int          *const  /*n_new_edges*/,     /* number of new edges */
+PK_EDGE_t   **const  /*new_edges*/,       /* new edges (optional) */
+int          *const  /*n_new_faces*/,     /* number of new faces */
+PK_FACE_t   **const  /*new_faces*/        /* new faces (optional) */
+);
+/*
+This function imprints a curve onto a region, thereby creating a new edge or
+edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_imprint_point
+(
+/* received */
+PK_REGION_t         /*region*/,       /* region */
+PK_POINT_t          /*point*/,        /* point to imprint onto region */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/    /* new vertex */
+);
+/*
+This function imprints a point onto a region, thereby creating a new acorn
+vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_REGION_ask_regions_adjacent
+(
+/* received */
+PK_REGION_t      /*region*/,              /* a region */
+/* returned */
+int            * /*n_regions_adjacent*/,  /* number of adjacent regions */
+PK_REGION_t   ** /*regions_adjacent*/     /* adjacent regions ( may be NULL ) */
+);
+/*
+This function returns all regions which are immediately adjacent to the given
+region.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_acorn_vertex
+(
+/* received */
+PK_SHELL_t          /*shell*/,        /* a shell */
+/* returned */
+PK_VERTEX_t *const  /*vertex*/        /* its acorn vertex (or PK_ENTITY_null) */
+);
+/*
+This function returns the single acorn vertex of the given shell if the shell
+is of type PK_SHELL_type_acorn_c, otherwise PK_ENTITY_null is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_body
+(
+/* received */
+PK_SHELL_t        /*shell*/,                  /* a shell */
+/* returned */
+PK_BODY_t *const  /*body*/                    /* owning body */
+);
+/*
+This function returns the body of the given shell.
+
+If the shell is contained within a compound body ( see PK_BODY_ask_config )
+then the child body to which the shell belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_oriented_faces
+(
+/* received */
+PK_SHELL_t            /*shell*/,              /* a shell */
+/* returned */
+int           *const  /*n_faces*/,            /* number of faces (>= 0) */
+PK_FACE_t    **const  /*faces*/,              /* faces (optional) */
+PK_LOGICAL_t **const  /*orients*/             /* orientations (optional) */
+);
+/*
+This function returns the list of faces in the given shell, together with their
+orientations with respect to the shell.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_region
+(
+/* received */
+PK_SHELL_t          /*shell*/,                /* a shell */
+/* returned */
+PK_REGION_t *const  /*region*/                /* owning region */
+);
+/*
+This function returns the region of the given shell.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_type
+(
+/* received */
+PK_SHELL_t              /*shell*/,        /* the shell */
+/* returned */
+PK_SHELL_type_t *const  /*shell_type*/    /* the type of the shell */
+);
+/*
+This function classifies the given shell according to the types of
+topological entities it contains.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_ask_wireframe_edges
+(
+/* received */
+PK_SHELL_t         /*shell*/,             /* a shell */
+/* returned */
+int        *const  /*n_edges*/,           /* number of wireframe edges (>= 0) */
+PK_EDGE_t **const  /*edges*/              /* wireframe edges (optional) */
+);
+/*
+This function returns the set of wireframe edges in the given shell.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SHELL_find_sign
+(
+/* received */
+PK_SHELL_t              /*shell*/,        /* a shell */
+/* returned */
+PK_SHELL_sign_t *const  /*shell_sign*/    /* the sign of the shell */
+);
+/*
+This function classifies the given shell according to whether it
+closes off a volume and, if it does, whether the volume inside the
+shell is finite or infinite.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_close_gaps
+(
+/* received */
+PK_FACE_t                      /*face*/,         /* face */
+const PK_FACE_close_gaps_o_t * /*options*/,      /* options on how to close loops */
+/* returned */
+int                    *const  /*n_vertices*/,   /* number of vertices where gaps */
+PK_VERTEX_t           **const  /*vertices*/      /* vertices where gaps remain */
+);
+/*
+This function closes gaps at tolerant vertices in the face loops by modifying
+the fin geometries of the loops. Where gaps cannot be closed the vertices at
+those gaps will be returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_contains_vectors
+(
+/* received */
+PK_FACE_t                      /*face*/,  /* face */
+PK_FACE_contains_vectors_o_t * /*options*/,
+/* returned */
+PK_TOPOL_t                     /*topologies*/[]
+);
+/*
+This function determines whether the points represented by the given vectors
+or parameters lie inside, outside or on the boundary of the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_is_uvbox
+(
+/* received */
+PK_FACE_t            /*face*/,        /* face for which uvbox required */
+/* returned */
+PK_LOGICAL_t *const  /*is_uvbox*/,    /* whether `face' is parametric rectangle */
+PK_UVBOX_t   *const  /*uvbox*/        /* `face's uvbox if `is_uvbox is */
+);
+/*
+This function detects whether a face is parametrically rectangular.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_is_periodic
+(
+/* received */
+PK_FACE_t                   /*face*/,         /* a face */
+/* returned */
+PK_PARAM_periodic_t *const  /*periodic_u*/,   /* periodicity in u */
+PK_PARAM_periodic_t *const  /*periodic_v*/    /* periodicity in v */
+);
+/*
+This function asks whether the face is periodic.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_sheet_body
+(
+/* received */
+int               /*n_faces*/,             /* number of faces */
+const PK_FACE_t   /*faces*/[],             /* array of faces */
+/* returned */
+PK_BODY_t *const  /*body*/                 /* sheet body */
+);
+/*
+This function creates a sheet body from a collection of faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_sheet_bodies
+(
+/* received */
+int                                    /*n_faces*/,   /* number of faces */
+const PK_FACE_t                        /*faces*/[],   /* array of faces */
+const PK_FACE_make_sheet_bodies_o_t  * /*options*/,   /* options structure */
+/* returned */
+int                            *const  /*n_bodies*/,  /* number of bodies */
+PK_BODY_t                     **const  /*bodies*/,    /* sheet bodies */
+PK_TOPOL_track_r_t             *const  /*tracking*/   /* tracking information */
+);
+/*
+This function creates sheet bodies from a collection of faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_solid_bodies
+(
+/* received */
+int                       /*n_faces*/,           /* number of faces */
+const PK_FACE_t           /*faces*/[],           /* faces */
+PK_FACE_heal_t            /*heal_action*/,       /* method for healing wounds */
+PK_LOGICAL_t              /*local_check*/,       /* whether to perform local check */
+/* returned */
+int               *const  /*n_bodies*/,
+PK_BODY_t        **const  /*bodies*/,            /* created solid bodies */
+PK_local_check_t **const  /*check_results*/      /* results of local check */
+);
+/*
+This function creates solid bodies from a collection of faces
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_neutral_sheet
+(
+/* received */
+PK_FACE_t         /*faces*/[2],       /* two faces */
+double            /*placement*/,      /* placement parameter */
+/* returned */
+PK_BODY_t *const  /*neutral_sheet*/   /* neutral sheet */
+);
+/*
+This function creates the neutral surface defined by the surfaces on the
+faces and returns it as a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_neutral_sheet_2
+(
+/* received */
+int                                    /*n_left_faces*/,    /* number of left faces */
+const PK_FACE_t                        /*left_faces*/[],    /* left faces */
+int                                    /*n_right_faces*/,   /* number of right faces */
+const PK_FACE_t                        /*right_faces*/[],   /* right faces */
+double                                 /*placement*/,       /* placement parameter */
+const PK_FACE_make_neutral_sheet_o_t * /*options*/,         /* options structure */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/         /* tracking information */
+);
+/*
+This function creates the neutral sheet defined by the surfaces on the
+faces and returns it as a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_valid_faces
+(
+/* received */
+PK_FACE_t            /*face*/,           /* face */
+/* returned */
+int          *const  /*n_faces*/,
+PK_FACE_t   **const  /*new_faces*/,
+PK_LOGICAL_t *const  /*succeeded*/
+);
+/*
+
+THIS IS ONLY AN INTERIM VERSION TO ALLOW TESTING - THE INTERFACE WILL
+CHANGE
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_repair
+(
+/* received */
+PK_FACE_t                   /*face*/,      /* face */
+const PK_FACE_repair_o_t  * /*options*/,   /* options structure */
+/* returned */
+PK_TOPOL_track_r_t  *const  /*tracking*/   /* tracking information */
+);
+/*
+This function attempts to repair an face, i.e. make it valid. The option
+structure determines which type of repair is attempted. At present there are
+two types of repair provided: splitting the face to remove G1 discontinuities
+in the surface, and splitting the face to remove areas of surface
+self-intersection which lie outside the face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_set_approx
+(
+/* received */
+int              /*n_faces*/,         /* number of faces to process (>0) */
+const PK_FACE_t  /*faces*/[]          /* faces for which approximations are required */
+);
+/*
+This function produces an approximate representation of the edges of the
+supplied faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_simplify_geom
+(
+/* received */
+int                                  /*n_faces*/,     /* number of faces */
+PK_FACE_t                            /*faces*/[],     /* faces */
+const PK_FACE_simplify_geom_o_t    * /*options*/,     /* options */
+/* returned */
+int                          *const  /*n_geoms*/,     /* number of geoms returned */
+PK_GEOM_t                   **const  /*geoms*/        /* new geoms (optional) */
+);
+/*
+This function simplifies the geometries of the supplied faces, where possible.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_unset_approx
+(
+/* received */
+int              /*n_faces*/,         /* number of faces to process (>0) */
+const PK_FACE_t  /*faces*/[]          /* faces to clear of approximations */
+);
+/*
+This function unsets the approximate representation of the edges of the
+supplied faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_reverse
+(
+/* received */
+int                         /*n_faces*/,     /* number of faces */
+const PK_FACE_t             /*faces*/[],     /* faces */
+const PK_FACE_reverse_o_t * /*options*/      /* options */
+);
+/*
+This function reverses the orientation of a given set of faces, but will
+not change any of their associated geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_body
+(
+/* received */
+PK_FACE_t         /*face*/,              /* a face */
+/* returned */
+PK_BODY_t *const  /*body*/               /* owning body */
+);
+/*
+This function returns the body which contains the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_shells
+(
+/* received */
+PK_FACE_t        /*face*/,               /* a face */
+/* returned */
+PK_SHELL_t       /*shells*/[2]           /* pair of shells */
+);
+/*
+This function returns the shells of the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_loops
+(
+/* received */
+PK_FACE_t          /*face*/,             /* a face */
+/* returned */
+int        *const  /*n_loops*/,          /* number of loops (>= 0) */
+PK_LOOP_t **const  /*loops*/             /* loops (optional) */
+);
+/*
+This function returns the set of loops bounding the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_edges
+(
+/* received */
+PK_FACE_t          /*face*/,             /* a face */
+/* returned */
+int        *const  /*n_edges*/,          /* number of edges (>= 0) */
+PK_EDGE_t **const  /*edges*/             /* edges (optional) */
+);
+/*
+This function returns the set of edges in the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_vertices
+(
+/* received */
+PK_FACE_t            /*face*/,           /* a face */
+/* returned */
+int          *const  /*n_vertices*/,     /* number of vertices (>= 0) */
+PK_VERTEX_t **const  /*vertices*/        /* vertices (optional) */
+);
+/*
+This function returns the set of vertices in the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_next_in_body
+(
+/* received */
+PK_FACE_t         /*face*/,           /* a face */
+/* returned */
+PK_FACE_t *const  /*next*/            /* the next face (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the next face in the body which contains the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_first_loop
+(
+/* received */
+PK_FACE_t         /*face*/,           /* a face */
+/* returned */
+PK_LOOP_t *const  /*first_loop*/      /* the first loop (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the first loop in the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_oriented_surf
+(
+/* received */
+PK_FACE_t            /*face*/,    /* a face */
+/* returned */
+PK_SURF_t    *const  /*surf*/,        /* the surface (possibly PK_ENTITY_null) */
+PK_LOGICAL_t *const  /*orientation*/  /* the face orientation with respect to its */
+);
+/*
+This function returns the surface and orientation of the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_surf
+(
+/* received */
+PK_FACE_t         /*face*/,                /* a face */
+
+/* returned */
+PK_SURF_t *const  /*surf*/                 /* its surface (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the surface of the given face, if there is one, otherwise
+PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_ask_faces_adjacent
+(
+/* received */
+int                                    /*n_faces*/,           /* number of faces */
+const PK_FACE_t                        /*faces*/[],           /* array of faces */
+const PK_FACE_ask_faces_adjacent_o_t * /*options*/,           /* options structure */
+/* returned */
+int                            *const  /*n_faces_adjacent*/,  /* number of adjacent */
+PK_FACE_t                     **const  /*faces_adjacent*/     /* adjacent faces */
+);
+/*
+This function returns all faces which are immediately adjacent to the given
+array of faces
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_attach_surf_fitting
+(
+/* received */
+PK_FACE_t                /*face*/,                 /* face */
+PK_LOGICAL_t             /*local_check*/,          /* whether to perform local check */
+/* returned */
+PK_local_check_t *const  /*local_check_result*/    /* result of local check */
+);
+/*
+This function creates a surface to fit and attach to face
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_attach_surfs
+(
+/* received */
+int                 /*n_faces*/,      /* number of faces */
+const PK_FACE_t     /*faces*/[],      /* faces to have surfaces attached */
+const PK_SURF_t     /*surfs*/[],      /* surfaces to be attached to faces */
+const PK_LOGICAL_t  /*senses*/[]      /* face senses */
+);
+/*
+This function attaches surfaces to faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_boolean
+(
+/* received */
+int                          /*n_targets*/,   /* number of target faces */
+const PK_FACE_t              /*targets*/[],   /* target faces */
+int                          /*n_tools*/,     /* number of tool faces */
+const PK_FACE_t              /*tools*/[],     /* tool faces */
+const PK_FACE_boolean_o_t  * /*options*/,     /* boolean options */
+/* returned */
+int                  *const  /*n_bodies*/,    /* number of resultant bodies */
+PK_BODY_t           **const  /*bodies*/       /* resultant bodies */
+);
+/*
+This function performs a boolean operation between the list of faces
+of a target body and the list of faces of a tool body.
+
+NOTE: This function is obsolete and has been superseded by PK_FACE_boolean_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_boolean_2
+(
+/* received */
+int                             /*n_targets*/,   /* number of target faces */
+const PK_FACE_t                 /*targets*/[],   /* target faces */
+int                             /*n_tools*/,     /* number of tool faces */
+const PK_FACE_t                 /*tools*/[],     /* tool faces */
+const PK_FACE_boolean_o_t     * /*options*/,     /* boolean options */
+/* returned */
+PK_TOPOL_track_r_t      *const  /*tracking*/,    /* tracking information */
+PK_boolean_r_t          *const  /*results*/      /* boolean results */
+);
+/*
+This function performs a boolean operation between the list of faces
+of a target body and the list of faces of a tool body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_check
+(
+/* received */
+PK_FACE_t                     /*face*/,          /* face to be checked */
+const PK_FACE_check_o_t     * /*options*/,       /* options structure */
+/* returned */
+int                   *const  /*n_faults*/,      /* number of faults */
+PK_check_fault_t     **const  /*faults*/         /* faults */
+);
+/*
+This function checks the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_check_pair
+(
+/* received */
+PK_FACE_t                       /*face_1*/,        /* face to be checked */
+PK_FACE_t                       /*face_2*/,        /* face to be checked */
+const PK_FACE_check_pair_o_t  * /*options*/,       /* options structure */
+/* returned */
+int                     *const  /*n_faults*/,      /* number of faults */
+PK_check_fault_t       **const  /*faults*/         /* faults */
+);
+/*
+This function checks the given pair of faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_2
+(
+/* received */
+int                        /*n_faces*/,           /* number of faces */
+const PK_FACE_t            /*faces*/[],           /* faces to delete */
+const PK_FACE_delete_o_t * /*options*/,           /* options structure */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/           /* tracking */
+);
+/*
+This function deletes the given faces from a solid or sheet body and repairs
+any resulting wounds.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete
+(
+/* received */
+int                       /*n_faces*/,           /* number of faces */
+const PK_FACE_t           /*faces*/[],           /* faces */
+PK_FACE_heal_t            /*heal_action*/,       /* method for healing wounds */
+PK_FACE_heal_loops_t      /*heal_loops*/,        /* how to process the loops of */
+PK_LOGICAL_t              /*local_check*/,       /* whether to perform local check */
+/* returned */
+int               *const  /*n_bodies*/,          /* number of bodies */
+PK_BODY_t        **const  /*bodies*/,            /* remaining bodies */
+PK_local_check_t **const  /*check_results*/      /* result of local check */
+);
+/*
+This function deletes the given faces from a solid or sheet body and repairs
+any resulting holes.
+
+Note: this function is superseded by the function PK_FACE_delete_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_from_sheet_body
+(
+/* received */
+PK_FACE_t        /*face*/           /* face */
+);
+/*
+This function removes a face from sheet.  This function is superseded by
+the function PK_FACE_delete_from_sheet.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_from_sheet
+(
+/* received */
+int                                   /*n_faces*/,  /* number of faces */
+const PK_FACE_t                       /*faces*/[],  /* array of faces */
+const PK_FACE_delete_from_sheet_o_t * /*options*/,  /* options structure */
+/* returned */
+int                           *const  /*n_bodies*/, /* number of bodies */
+PK_BODY_t                    **const  /*bodies*/    /* array of bodies */
+);
+/*
+This function removes the specified `faces' from a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_from_gen_body
+(
+/* received */
+int                  /*n_faces*/,            /* number of faces */
+const PK_FACE_t      /*faces*/[]             /* faces to delete */
+);
+/*
+This function deletes the given faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_blends
+(
+/* received */
+int                               /*n_faces*/,    /* number of faces */
+const PK_FACE_t                   /*faces*/[],    /* faces to delete */
+double                            /*tolerance*/,  /* tolerance */
+const PK_FACE_delete_blends_o_t * /*options*/,    /* options */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/,   /* tracking information */
+PK_TOPOL_local_r_t        *const  /*results*/     /* status information */
+);
+/*
+This function deletes the given faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_delete_facesets
+(
+/* received */
+int                                 /*n_facesets*/,   /* number of facesets */
+PK_FACE_array_t                     /*facesets*/[],   /* facesets */
+const PK_FACE_delete_facesets_o_t * /*options*/,      /* options structure */
+/* returned */
+int                         *const  /*n_bodies*/,     /* number of resulting bodies */
+PK_BODY_t                  **const  /*bodies*/,       /* resulting bodies */
+int                         *const  /*n_failed_facesets*/,
+int                        **const  /*failed_facesets_indices*/
+);
+/*
+This function deletes a collection of facesets from a body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_emboss
+(
+/* received */
+int                        /*n_faces*/,           /* number of target faces > 0 */
+const PK_FACE_t            /*faces*/[],           /* target faces upon which the */
+PK_BODY_t                  /*profile*/,           /* sheet or closed wire defining */
+PK_BODY_t                  /*endcap*/,            /* sheet or solid providing */
+const PK_FACE_emboss_o_t * /*options*/,           /* options */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,          /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/            /* status information */
+);
+/*
+This function creates emboss features on the target body over areas covered
+by the specified `faces'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_euler_unslit
+(
+/* received */
+PK_FACE_t        /*face*/,        /* Face to be unslit */
+PK_EDGE_t        /*surviving*/    /* Edge to survive the unslit */
+);
+/*
+This function replaces a 2-edge face with an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_euler_make_ring_face
+(
+/* received */
+PK_FACE_t         /*face*/,       /* Face to contain new face */
+/* returned */
+PK_FACE_t *const  /*new_face*/    /* New face created */
+);
+/*
+This function adds a new ring loop to a face, creating a new face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_euler_make_ring_loop
+(
+/* received */
+PK_FACE_t         /*face*/,       /* Face to contain new loop */
+/* returned */
+PK_LOOP_t *const  /*new_loop*/    /* One of the two loops created */
+);
+/*
+This function adds a new loop to a face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_euler_make_loop
+(
+/* received */
+PK_FACE_t         /*face*/,       /* Face to contain new loop */
+/* returned */
+PK_LOOP_t *const  /*new_loop*/    /* New loop created */
+);
+/*
+This function adds an isolated vertex and loop to a face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_edges_common
+(
+/* received */
+PK_FACE_t          /*face_1*/,       /* first face */
+PK_FACE_t          /*face_2*/,       /* second face */
+/* returned */
+int        *const  /*n_edges*/,     /* number of common edges */
+PK_EDGE_t **const  /*edges*/        /* common edges */
+);
+/*
+This function finds edges which are common to two faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_extreme
+(
+/* received */
+PK_FACE_t           /*face*/,             /* face on which extreme sought */
+PK_VECTOR_t         /*direction_1*/,      /* first direction */
+PK_VECTOR_t         /*direction_2*/,      /* second direction */
+PK_VECTOR_t         /*direction_3*/,      /* third direction */
+/* returned */
+PK_VECTOR_t *const  /*extreme*/,          /* position of extreme point */
+PK_TOPOL_t  *const  /*topol*/             /* topology on which extreme point lies */
+);
+/*
+This function finds the extreme point on the given `face' in `direction_1'.
+If this extreme is not a single point, the `direction_2' and `direction_3'
+are used successively to reduce the number of extreme points to one.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_uvbox
+(
+/* received */
+PK_FACE_t          /*face*/,           /* face for which uvbox required */
+/* returned */
+PK_UVBOX_t *const  /*uvbox*/           /* uvbox containing face */
+);
+/*
+This function finds a uvbox which bounds the given face in the parameter space
+of the face's surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_outer_loop
+(
+/* received */
+PK_FACE_t                           /*face*/,        /* face to find outer loop */
+const PK_FACE_find_outer_loop_o_t * /*options*/,     /* provided options */
+/* returned */
+PK_LOOP_t *const                    /*outer_loop*/   /* the outer loop returned */
+);
+/*
+The function returns the outer loop of the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_interior_vec
+(
+/* received */
+PK_FACE_t                               /*face*/,         /* face to find interior */
+const PK_FACE_find_interior_vec_o_t   * /*options*/,      /* options structure */
+/* returned */
+PK_VECTOR_t *const                      /*int_vec*/,      /* vector interior to face */
+PK_UV_t *const                          /*uv_params*/     /* surface parameters */
+);
+/*
+The function returns an arbitrary vector interior to the given face, and the
+surface u- and v-parameters of the vector. The returned vector will always lie
+in the interior of the given face, never on its boundary edges or vertices.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_hollow
+(
+/* received */
+int                  /*n_faces*/,            /* number of faces */
+PK_FACE_t            /*faces*/[],            /* faces to hollow */
+double               /*offsets*/[],          /* offset distance for each face */
+double               /*tolerance*/,          /* tolerance */
+PK_LOGICAL_t         /*face_face_check*/,    /* do face face checks */
+/* returned */
+PK_FACE_t    *const  /*new_faces*/           /* new faces */
+);
+/*
+This function hollows a solid body by offsetting the given `faces' by the
+given `offsets'.
+
+NOTE: this function is obsolete and has been superseded by PK_FACE_hollow_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_hollow_2
+(
+/* received */
+int                  /*n_faces*/,            /* number of faces */
+PK_FACE_t            /*faces*/[],            /* faces to hollow */
+double               /*offsets*/[],          /* offset distance for each face */
+double               /*tolerance*/,          /* tolerance */
+PK_LOGICAL_t         /*face_face_check*/,    /* do face face checks */
+/* returned */
+int          *const  /*n_new_faces*/,
+PK_FACE_t   **const  /*old_faces*/,          /* old faces ( optional ) */
+PK_FACE_t   **const  /*new_faces*/           /* new faces ( optional ) */
+);
+/*
+This function hollows a solid body by offsetting the given `faces' by the
+given `offsets'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_hollow_3
+(
+/* received */
+int                        /*n_faces*/,          /* number of faces */
+PK_FACE_t                  /*faces*/[],          /* faces to hollow */
+double                     /*offsets*/[],        /* offset distance for each face */
+double                     /*tolerance*/,        /* tolerance */
+
+const PK_FACE_hollow_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/           /* status information */
+);
+/*
+This function hollows a solid body by offsetting the given `faces' by the
+given `offsets'.
+
+NOTE : This function supersedes PK_FACE_hollow_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_identify_blends_r_f
+(
+/* received */
+PK_FACE_identify_blends_r_t *const  /*blend_returns*/
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_identify_blends
+(
+/* received */
+int                                 /*n_faces*/,      /* number of faces */
+const PK_FACE_t                     /*faces*/[],      /* faces */
+const PK_blend_identify_t           /*ident_type*/,   /* type of blend to identify */
+const PK_FACE_identify_blends_o_t * /*options*/,      /* options */
+/* returned */
+PK_FACE_identify_blends_r_t *const  /*results*/       /* results */
+);
+/*
+Given an array of `faces' (all belonging to the same body) and the type of
+blends that should be identified this function will return all constant radius
+rolling ball blends of the required `ident_type' which satisfy the `options'
+specified.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_blend_unders_r_f
+(
+/* received */
+PK_FACE_find_blend_unders_r_t *const  /*under_returns*/
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_find_blend_unders
+(
+/* received */
+PK_FACE_t                             /*face*/,         /* the face */
+const PK_FACE_find_blend_unders_o_t * /*options*/,      /* options */
+/* returned */
+PK_FACE_find_blend_unders_r_t *const  /*results*/       /* results */
+);
+/*
+Given a constant radius blended face this function will return all underlying
+faces associated with the blend face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_curve
+(
+/* received */
+PK_FACE_t          /*face*/,              /* face */
+PK_CURVE_t         /*curve*/,             /* curve */
+PK_INTERVAL_t      /*bounds*/,            /* bounds of curve */
+/* returned */
+int        *const  /*n_new_edges*/,       /* number of new edges */
+PK_EDGE_t **const  /*new_edges*/,         /* new edges (optional) */
+int        *const  /*n_new_faces*/,       /* number of new faces */
+PK_FACE_t **const  /*new_faces*/          /* new faces (optional) */
+);
+/*
+This function imprints a curve onto a face, thereby creating a new edge or
+edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_faces
+(
+/* received */
+int                         /*n_targets*/,    /* number of target faces */
+const PK_FACE_t             /*targets*/[],    /* target faces */
+int                         /*n_tools*/,      /* number of tool faces */
+const PK_FACE_t             /*tools*/[],      /* tool faces */
+const PK_FACE_imprint_o_t * /*options*/,      /* imprint options */
+/* returned */
+PK_imprint_r_t      *const  /*results*/       /* imprint results */
+);
+/*
+This function imprints edges on the given target and tool faces.
+
+
+NOTE: This function is deprecated and has been superseded by
+PK_FACE_imprint_faces_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_faces_2
+(
+/* received */
+int                               /*n_targets*/,    /* number of target faces */
+const PK_FACE_t                   /*targets*/[],    /* target faces */
+int                               /*n_tools*/,      /* number of tool faces */
+const PK_FACE_t                   /*tools*/[],      /* tool faces */
+const PK_FACE_imprint_faces_o_t * /*options*/,      /* imprint options */
+/* returned */
+PK_imprint_r_t            *const  /*results*/,      /* imprint results */
+PK_TOPOL_track_r_t        *const  /*tracking*/      /* imprint tracking */
+);
+/*
+This function imprints edges on the given target and tool faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_cus_normal
+(
+/* received */
+int                                    /*n_targets*/,      /* number of faces */
+const PK_FACE_t                        /*targets*/[],      /* array of faces */
+int                                    /*n_curves*/,       /* number of curves */
+const PK_CURVE_t                       /*curves*/[],       /* curves */
+PK_INTERVAL_t                          /*intervals*/[],    /* parametric intervals */
+double                                 /*tol*/,            /* tolerance */
+const PK_FACE_imprint_cus_normal_o_t * /*options*/,        /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/        /* tracking information */
+);
+/*
+This function imprints the given array of curves on the given array of faces
+( of the same body) by projecting them locally down the respective face
+normals.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_cus_vector
+(
+/* received */
+int                                    /*n_targets*/,    /* number of faces */
+const PK_FACE_t                        /*targets*/[],    /* array of faces */
+int                                    /*n_curves*/,     /* number of curves */
+const PK_CURVE_t                       /*curves*/[],     /* curves */
+PK_INTERVAL_t                          /*intervals*/[],  /* parametric intervals */
+PK_VECTOR_t                            /*direction*/,    /* direction to project */
+double                                 /*tol*/,          /* tolerance */
+const PK_FACE_imprint_cus_vector_o_t * /*options*/,      /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/      /* tracking information */
+);
+/*
+This function imprints the given array of curves on the given array of faces
+( of the same body ) by projecting them locally along the given vector
+direction.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_cus_vec
+(
+/* received */
+int                                    /*n_targets*/,    /* number of faces */
+const PK_FACE_t                        /*targets*/[],    /* array of faces */
+int                                    /*n_curves*/,     /* number of curves */
+const PK_CURVE_t                       /*curves*/[],     /* curves */
+PK_INTERVAL_t                          /*intervals*/[],  /* parametric intervals */
+double                                 /*tol*/,          /* tolerance */
+PK_VECTOR_t                            /*direction*/,    /* direction to project */
+const PK_FACE_imprint_cus_vec_o_t    * /*options*/,      /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/      /* tracking information */
+);
+/*
+This function imprints the given array of curves on the given array of faces
+by projecting them locally along the given vector direction. The faces must
+all belong to the same body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_point
+(
+/* received */
+PK_FACE_t           /*face*/,         /* face */
+PK_POINT_t          /*point*/,        /* point to imprint onto face */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/    /* new vertex */
+);
+/*
+This function imprints a point onto a face, thereby creating a new vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_inst_tools_r_f
+(
+/* received */
+PK_FACE_inst_tools_r_t *const  /*results*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_instance_tools
+(
+/* received */
+int                            /*n_target_faces*/,  /* number of target faces (>0) */
+const PK_FACE_t                /*target_faces*/[],  /* target faces */
+int                            /*n_tool_faces*/,    /* number of tool faces (>0) */
+const PK_FACE_t                /*tool_faces*/[],    /* tool faces to be instanced */
+int                            /*n_transforms*/,    /* number of transforms (>0) */
+const PK_TRANSF_t              /*transforms*/[],    /* instancing transforms */
+const PK_FACE_boolean_o_t    * /*options*/,
+/* returned */
+PK_FACE_inst_tools_r_t *const  /*optional_returns*/
+);
+/*
+This function instances (creates and then booleans transformed copies of...)
+a single tool body with a single target body, the boolean operation being a
+unite or subtract. The tool and target body are each identified by a subset of
+their faces, the subset being those faces which clash with the other body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_instance_bodies
+(
+/* received */
+int                                 /*n_target_faces*/,  /* number of target faces */
+const PK_FACE_t                     /*target_faces*/[],  /* target faces */
+int                                 /*n_tool_bodies*/,   /* number of tool bodies */
+const PK_BODY_t                     /*tool_bodies*/[],   /* tool bodies to be */
+const PK_TRANSF_array_t             /*transforms*/[],    /* instancing transforms */
+const PK_FACE_instance_bodies_o_t * /*options*/,
+/* returned */
+PK_TOPOL_track_r_t          *const  /*instance_tracking*/,
+PK_TOPOL_track_r_t          *const  /*tracking*/         /* tracking records */
+);
+/*
+
+This function instances (creates and then booleans transformed copies of...)
+tool bodies with a single target body.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_intersect_curve
+(
+/* received */
+PK_FACE_t                  /*face*/,            /* face */
+PK_CURVE_t                 /*curve*/,           /* curve */
+PK_INTERVAL_t              /*bounds*/,          /* bounds of curve */
+/* returned */
+int                *const  /*n_vectors*/,       /* number of intersections */
+PK_VECTOR_t       **const  /*vectors*/,         /* positions of intersections */
+PK_UV_t           **const  /*uvs*/,             /* parameters on face's surface */
+double            **const  /*ts*/,              /* parameters on curve */
+PK_TOPOL_t        **const  /*topols*/,          /* topological entities intersected */
+PK_intersect_fc_t **const  /*types*/            /* types of intersections */
+);
+/*
+PK_FACE_intersect_curve finds the intersections between a face and the
+specified region of a curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_intersect_face
+(
+/* received */
+PK_FACE_t                          /*face_1*/,      /* first face */
+PK_FACE_t                          /*face_2*/,      /* second face */
+const PK_FACE_intersect_face_o_t * /*options*/,     /* options structure */
+/* returned */
+int                        *const  /*n_vectors*/,   /* number of point intersections */
+PK_VECTOR_t               **const  /*vectors*/,     /* posns of point intersections */
+int                        *const  /*n_curves*/,    /* number of intersection curves */
+PK_CURVE_t                **const  /*curves*/,      /* intersection curves */
+PK_INTERVAL_t             **const  /*bounds*/,      /* bounds of curves */
+PK_intersect_curve_t      **const  /*types*/        /* types of intersections */
+);
+/*
+PK_FACE_intersect_face finds the intersections between two faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_intersect_surf
+(
+/* received */
+PK_FACE_t                          /*face*/,        /* face */
+PK_SURF_t                          /*surf*/,        /* surface */
+const PK_FACE_intersect_surf_o_t * /*options*/,     /* options structure */
+/* returned */
+int                        *const  /*n_vectors*/,   /* number of point intersections */
+PK_VECTOR_t               **const  /*vectors*/,     /* posns of point intersections */
+int                        *const  /*n_curves*/,    /* number of intersection curves */
+PK_CURVE_t                **const  /*curves*/,      /* intersection curves */
+PK_INTERVAL_t             **const  /*bounds*/,      /* bounds of curves */
+PK_intersect_curve_t      **const  /*types*/        /* types of intersections */
+);
+/*
+PK_FACE_intersect_surf finds the intersections between a face and a surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_is_coincident
+(
+/* received */
+PK_FACE_t                         /*face1*/,          /* first face */
+PK_FACE_t                         /*face2*/,          /* second face */
+double                            /*tol*/,            /* distance tolerance */
+const PK_FACE_is_coincident_o_t * /*options*/,        /* option structure */
+/* returned */
+PK_FACE_coi_t             *const  /*result*/,         /* coincidence information */
+PK_VECTOR_t               *const  /*point*/           /* non-coincidence point */
+);
+/*
+This function checks if two faces, possibly under transformation,  are
+coincident to tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_3_face_blend_r_f
+(
+/* received */
+PK_FACE_make_3_face_blend_r_t *const  /*results*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_3_face_blend
+(
+/* received */
+int                                   /*n_left_wall_faces*/,    /* number of faces */
+const PK_FACE_t                       /*left_wall_faces*/[],    /* left wall faces */
+int                                   /*n_right_wall_faces*/,   /* number of faces */
+const PK_FACE_t                       /*right_wall_faces*/[],   /* right wall faces */
+int                                   /*n_centre_wall_faces*/,  /* number of faces */
+const PK_FACE_t                       /*centre_wall_faces*/[],  /* centre wall faces */
+PK_BODY_t                             /*guide*/,                /* wire body for */
+const PK_FACE_make_3_face_blend_o_t * /*options*/,              /* options structure */
+/* returned */
+PK_FACE_make_3_face_blend_r_t *const  /*results*/,              /* results of blend */
+PK_TOPOL_track_r_t            *const  /*tracking*/              /* tracking */
+);
+/*
+This function makes a three-face blend from the given faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_blend
+(
+/* received */
+int                             /*n_left_wall_faces*/,    /* number of faces in */
+const PK_FACE_t                 /*left_wall_faces*/[],    /* faces in left wall */
+int                             /*n_right_wall_faces*/,   /* number of faces in */
+const PK_FACE_t                 /*right_wall_faces*/[],   /* faces in right wall */
+PK_LOGICAL_t                    /*left_sense*/,           /* blend direction */
+PK_LOGICAL_t                    /*right_sense*/,          /* blend direction */
+const PK_FACE_make_blend_o_t  * /*options*/,              /* options structure */
+/* returned */
+int                     *const  /*n_sheet_bodies*/,       /* number of sheet bodies */
+PK_BODY_t              **const  /*sheet_bodies*/,         /* sheet bodies */
+int                     *const  /*n_blend_topols*/,       /* number of blend */
+PK_TOPOL_t             **const  /*blend_topols*/,         /* blend topologies */
+PK_TOPOL_array_t       **const  /*unders*/,               /* originating topology */
+PK_blend_rib_r_t        *const  /*ribs*/,                 /* ribs returned (if any) */
+PK_fxf_error_t          *const  /*fault*/                 /* fault found (if any) */
+);
+/*
+This function makes a blend of the given faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_blend_rib_r_f
+(
+/* received */
+PK_blend_rib_r_t *const  /*ribs*/
+);
+/*
+Frees the memory associated with the blend_rib return structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_install_surfs_isocline
+(
+/* received */
+int                /*n_faces*/,           /* number of target faces (>0) */
+const PK_FACE_t    /*faces*/[],           /* faces to be drafted */
+const PK_ENTITY_t  /*references*/[],      /* reference entities */
+PK_VECTOR1_t       /*direction*/,         /* isocline direction */
+double             /*angle*/,             /* isocline angle */
+double             /*tolerance*/,         /* max tol for applying surfs */
+PK_LOGICAL_t       /*face_face_check*/    /* do face face checks */
+);
+/*
+This function replaces the surfaces of given faces with isocline surfaces.
+It has been superseded by PK_FACE_taper.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_curves_isocline
+(
+/* received */
+int                   /*n_rec_faces*/,    /* number of received faces (>0) */
+const PK_FACE_t       /*rec_faces*/[],    /* received faces */
+PK_VECTOR1_t          /*direction*/,      /* isocline direction */
+double                /*angle*/,          /* isocline angle */
+double                /*tolerance*/,      /* max tol for applying surfs */
+/* returned */
+int           *const  /*n_ret_faces*/,    /* number of returned faces (>=0) */
+PK_FACE_t    **const  /*ret_faces*/,      /* returned faces           (optional) */
+PK_LOGICAL_t **const  /*is_steep*/,       /* whether faces are steep  (optional) */
+int           *const  /*n_edges*/,        /* number of new edges      (>=0) */
+PK_EDGE_t    **const  /*edges*/           /* new edges                (optional) */
+);
+/*
+This function creates and imprints isocline curves on a given set of faces.
+
+NOTE: This function is obsolete and has been superseded
+by PK_FACE_imprint_cus_isoclin
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_imprint_cus_isoclin
+(
+/* received */
+int                                     /*n_rec_faces*/, /* number of received faces */
+const PK_FACE_t                         /*rec_faces*/[], /* received faces */
+PK_VECTOR1_t                            /*direction*/,   /* isocline direction */
+double                                  /*angle*/,       /* isocline angle */
+double                                  /*tolerance*/,   /* max tol for applying */
+const PK_FACE_imprint_cus_isoclin_o_t * /*options*/,     /* options structure */
+/* returned */
+int                             *const  /*n_ret_faces*/, /* number of returned faces */
+PK_FACE_t                      **const  /*ret_faces*/,   /* returned faces */
+PK_LOGICAL_t                   **const  /*is_steep*/,    /* whether faces are steep */
+int                             *const  /*n_edges*/,     /* number of new edges */
+PK_EDGE_t                      **const  /*edges*/        /* new edges */
+);
+/*
+This function creates and imprints isocline curves on a given set of faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_taper
+(
+/* received */
+int                        /*n_faces*/,         /* number of target faces (>0) */
+const PK_FACE_t            /*faces*/[],         /* faces to be drafted */
+const PK_ENTITY_t          /*references*/[],    /* reference entities */
+PK_VECTOR1_t               /*direction*/,       /* taper direction */
+double                     /*angle*/,           /* taper angle */
+double                     /*tolerance*/,       /* max. tol. for applying surfaces */
+const PK_FACE_taper_o_t  * /*options*/,         /* options */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,        /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/          /* status information */
+);
+/*
+This function applies tapering to the given `faces' by replacing their
+geometry with taper surfaces.
+
+NOTE : This function supersedes PK_FACE_install_surfs_isocline.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_offset
+(
+/* received */
+int                  /*n_faces*/,            /* number of faces > 0 */
+const PK_FACE_t      /*faces*/[],            /* faces to offset */
+const double         /*offsets*/[],          /* offset for each face */
+double               /*tolerance*/,          /* tolerance */
+PK_LOGICAL_t         /*face_face_check*/     /* do face face checks */
+/* returned */
+);
+/*
+Offsets faces of a solid or sheet body
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_offset_2
+(
+/* received */
+int                        /*n_faces*/,          /* number of faces > 0 */
+const PK_FACE_t            /*faces*/[],          /* faces to offset */
+const double               /*offsets*/[],        /* offset for each face */
+double                     /*tolerance*/,        /* tolerance */
+const PK_FACE_offset_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/           /* status information */
+);
+/*
+This function offsets faces of a solid or sheet body.
+
+NOTE : This function supersedes PK_FACE_offset.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_output_surf_trimmed
+(
+/* received */
+PK_FACE_t                               /*face*/,          /* face */
+const PK_FACE_output_surf_trimmed_o_t * /*options*/,       /* options structure */
+/* returned */
+PK_SURF_t                       *const  /*surf*/,          /* surface */
+PK_LOGICAL_t                    *const  /*sense*/,         /* which side of surface */
+PK_SURF_trim_data_t             *const  /*trim_data*/,     /* trim data */
+PK_GEOM_t                      **const  /*geoms*/,         /* points and curves */
+PK_INTERVAL_t                  **const  /*intervals*/,     /* geom intervals */
+PK_TOPOL_t                     **const  /*topols*/         /* topologies */
+);
+/*
+This function returns a trimmed surface representation of the given face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_pattern
+(
+/* received */
+int                         /*n_pattern_faces*/,   /* number of pattern faces (>0) */
+const PK_FACE_t             /*pattern_faces*/[],   /* pattern faces */
+int                         /*n_transforms*/,      /* number of transforms (>0) */
+const PK_TRANSF_t           /*transforms*/[],      /* pattern transformations */
+const PK_FACE_pattern_o_t * /*options*/,           /* pattern options */
+/* returned */
+PK_FACE_pattern_r_t *const  /*pattern_results*/    /* status and tracking info */
+);
+/*
+This function creates a pattern of a feature on the target body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_pattern_r_f
+(
+/* received */
+PK_FACE_pattern_r_t *const  /*pattern_results*/    /* status and tracking info */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_remove_to_solid_bodies
+(
+/* received */
+int                       /*n_faces*/,              /* number of faces */
+const PK_FACE_t           /*faces*/[],              /* faces */
+PK_FACE_heal_t            /*parent_heal_action*/,   /* method for healing wounds */
+PK_FACE_heal_t            /*child_heal_action*/,    /* method for healing wounds */
+PK_LOGICAL_t              /*local_check*/,          /* whether to do local check */
+/* returned */
+int               *const  /*n_parent_bodies*/,      /* number of parent bpdies */
+PK_BODY_t        **const  /*parent_bodies*/,        /* parent bodies */
+PK_local_check_t **const  /*parent_check_results*/, /* results of local check */
+int               *const  /*n_child_bodies*/,       /* number of child bodies */
+PK_BODY_t        **const  /*child_bodies*/,         /* child bodies */
+PK_local_check_t **const  /*child_check_results*/   /* results of local check */
+);
+/*
+This function separates a body into two or more bodies by selecting which
+faces are to be removed into new bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_replace_surfs
+(
+/* received */
+int                      /*n_faces*/,        /* number of faces */
+const PK_FACE_t          /*faces*/[],        /* faces */
+const PK_SURF_t          /*surfs*/[],        /* replacement surfaces */
+double                   /*tolerance*/,      /* tolerance for replacement geometry */
+PK_LOGICAL_t             /*local_check*/,    /* whether to perform local check */
+/* returned */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function replaces the geometry of the given faces with the
+supplied surfaces.
+
+NOTE: This functions is obsolete and has been superseded by
+PK_FACE_replace_surfs_2
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_replace_surfs_2
+(
+/* received */
+int                               /*n_faces*/,         /* number of faces */
+const PK_FACE_t                   /*faces*/[],         /* faces */
+const PK_SURF_t                   /*surfs*/[],         /* replacement surfaces */
+const PK_LOGICAL_t                /*senses*/[],        /* surface orientation */
+double                            /*tolerance*/,       /* tolerance for operation */
+const PK_FACE_replace_surfs_o_t * /*options*/,         /* options */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/,        /* tracking information */
+PK_FACE_replace_surfs_r_t *const  /*results*/          /* status information */
+);
+/*
+This function replaces the geometry of the given faces with the
+supplied surfaces.
+
+NOTE: This function supersedes PK_FACE_replace_surfs, which is now obsolete.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_replace_surfs_3
+(
+/* received */
+int                               /*n_faces*/,         /* number of faces */
+const PK_FACE_t                   /*faces*/[],         /* faces */
+const PK_SURF_t                   /*surfs*/[],         /* replacement surfaces */
+const PK_LOGICAL_t                /*senses*/[],        /* surface orientation */
+double                            /*tolerance*/,       /* tolerance for operation */
+const PK_FACE_replace_surfs_o_t * /*options*/,         /* options */
+/* returned */
+PK_TOPOL_track_r_t        *const  /*tracking*/,        /* tracking information */
+PK_TOPOL_local_r_t        *const  /*results*/          /* status information */
+);
+/*
+This function replaces the geometry of the given faces with the
+supplied surfaces.
+
+NOTE: This function supersedes PK_FACE_replace_surfs_2, which is
+now obsolete.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_replace_with_sheet
+(
+/* received */
+int                                    /*n_faces*/,    /* number of faces */
+const PK_FACE_t                        /*faces*/[],    /* target faces to replace */
+const PK_BODY_t                        /*sheet*/,      /* replacement sheet */
+const PK_FACE_replace_with_sheet_o_t * /*options*/,    /* options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/,   /* tracking information */
+PK_TOPOL_local_r_t             *const  /*results*/     /* status information */
+);
+/*
+This function replaces a set of faces on a target body with a
+set of faces from a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_cover
+(
+/* received */
+int                         /*n_faces*/,         /* number of faces */
+const PK_FACE_t             /*faces*/[],         /* target faces to cover */
+const PK_FACE_cover_o_t   * /*options*/,         /* options */
+/* returned */
+PK_ENTITY_track_r_t *const  /*tracking*/         /* tracking information */
+);
+/*
+This function creates a single face covering a set of input faces, which can
+then be used to replace the original faces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_change
+(
+/* received */
+int                           /*n_faces*/,          /* number of faces */
+const PK_FACE_t               /*faces*/[],          /* faces to change */
+const int                     /*mapping*/[],        /* face-operation mapping */
+int                           /*n_operations*/,     /* number of operations */
+PK_FACE_change_t              /*operations*/[],     /* change operations to apply */
+double                        /*tolerance*/,        /* tolerance */
+const PK_FACE_change_o_t    * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t    *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t    *const  /*results*/           /* status information */
+);
+/*
+This function changes the given faces by applying the related given operation
+to each of them.
+This function combines the features of : PK_FACE_offset_2, PK_FACE_taper,
+PK_FACE_transform_2, PK_FACE_replace_surfs_3 and some of PK_FACE_make_blend.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_section_with_sheet
+(
+/* received */
+int                         /*n_targets*/,      /* Number of target faces */
+const PK_FACE_t             /*targets*/[],      /* Target faces */
+int                         /*n_tools*/,        /* Number of tool faces */
+const PK_FACE_t             /*tools*/[],        /* Tool faces */
+const PK_FACE_section_o_t * /*options*/,        /* Sectioning options */
+/* returned */
+PK_section_r_t      *const  /*results*/         /* front/back faces/bodies */
+);
+/*
+This function sections selected regions of the target body with
+selected regions of the tool sheet body.
+
+NOTE: This function is obsolete and has been superseded
+by PK_FACE_section_with_sheet_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_section_with_sheet_2
+(
+/* received */
+int                             /*n_targets*/,   /* number of target faces */
+const PK_FACE_t                 /*targets*/[],   /* target faces */
+int                             /*n_tools*/,     /* number of tool faces */
+const PK_FACE_t                 /*tools*/[],     /* tool faces */
+const PK_FACE_section_o_t     * /*options*/,     /* sectioning options */
+/* returned */
+PK_TOPOL_track_r_t      *const  /*tracking*/,    /* tracking information */
+PK_section_2_r_t        *const  /*results*/      /* front/back faces/bodies */
+);
+/*
+This function sections selected regions of the target body with
+selected regions of the tool sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_make_sect_with_sfs
+(
+/* received */
+int                                    /*n_targets*/,  /* Number of target faces */
+PK_FACE_t                              /*targets*/[],  /* Target faces */
+int                                    /*n_tools*/,    /* Number of tool surfaces */
+PK_SURF_t                              /*tools*/[],    /* Tool surfaces */
+const PK_FACE_make_sect_with_sfs_o_t * /*options*/,    /* Sectioning options */
+/* returned */
+PK_TOPOL_track_r_t             *const  /*tracking*/,   /* Tracking information */
+PK_FACE_make_sect_with_sfs_r_t *const  /*results*/     /* Resultant bodies */
+);
+/*
+This function sections selected regions of the target body with
+tool surfaces. Target body remains unchanged.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_spin
+(
+/* received */
+int                      /*n_faces*/,        /* number of faces */
+const PK_FACE_t          /*faces*/[],        /* faces */
+const PK_AXIS1_sf_t    * /*axis*/,           /* spin axis */
+double                   /*angle*/,          /* spin angle */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+int              *const  /*n_laterals*/,     /* number of laterals */
+PK_FACE_t       **const  /*laterals*/,       /* new faces (may be NULL) */
+PK_EDGE_t       **const  /*bases*/,          /* edges swept into laterals */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function spins one or more faces of a solid or sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_sweep
+(
+/* received */
+int                      /*n_faces*/,        /* number of faces */
+const PK_FACE_t          /*faces*/[],        /* faces */
+PK_VECTOR_t              /*path*/,           /* translation vector */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+int              *const  /*n_laterals*/,     /* number of laterals */
+PK_FACE_t       **const  /*laterals*/,       /* new faces (may be NULL) */
+PK_EDGE_t       **const  /*bases*/,          /* edges swept into laterals */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function sweeps one or more faces of a solid or sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_transform
+(
+/* received */
+int                      /*n_faces*/,        /* number of faces */
+const PK_FACE_t          /*faces*/[],        /* faces */
+const PK_TRANSF_t        /*transfs*/[],      /* face transformations */
+double                   /*tolerance*/,      /* tolerance for replacement geometry */
+PK_LOGICAL_t             /*local_check*/,    /* whether to perform local check */
+/* returned */
+int              *const  /*n_replaces*/,     /* number of replaced geometry */
+PK_GEOM_t       **const  /*replaces*/,       /* replaced geometry (optional) */
+PK_LOGICAL_t    **const  /*exact*/,          /* whether replaced geometry is exact */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function transforms the given faces by the given transformations.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_transform_2
+(
+/* received */
+int                           /*n_faces*/,          /* number of faces > 0 */
+const PK_FACE_t               /*faces*/[],          /* faces to transform */
+const PK_TRANSF_t             /*transfs*/[],        /* face transformations */
+double                        /*tolerance*/,        /* tolerance */
+
+const PK_FACE_transform_o_t * /*options*/,          /* options */
+/* returned */
+PK_TOPOL_track_r_t    *const  /*tracking*/,         /* tracking information */
+PK_TOPOL_local_r_t    *const  /*results*/           /* status information */
+);
+/*
+This function transforms the given faces by the given transformations.
+
+NOTE : This function supersedes PK_FACE_transform.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_classify_details_r_f
+(
+/* received */
+PK_FACE_classify_details_r_t *const  /*results*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_classify_details
+(
+/* received */
+int                                  /*n_facesets*/,   /* number of facesets */
+PK_FACE_array_t                      /*facesets*/[],   /* facesets */
+PK_detail_t                          /*details*/[],    /* details */
+const PK_FACE_classify_details_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_FACE_classify_details_r_t *const  /*results*/       /* results */
+);
+/*
+This function classifies the given faceset as details of some type.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_body
+(
+/* received */
+PK_LOOP_t         /*loop*/,               /* a loop */
+/* returned */
+PK_BODY_t *const  /*body*/                /* owning body */
+);
+/*
+This function returns the body containing the given loop.
+
+If the loop is contained within a compound body ( see PK_BODY_ask_config ) then
+the child body to which the loop belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_edges
+(
+/* received */
+PK_LOOP_t          /*loop*/,              /* a loop */
+/* returned */
+int        *const  /*n_edges*/,           /* number of edges (>= 0) */
+PK_EDGE_t **const  /*edges*/              /* edges (optional) */
+);
+/*
+This function returns a set of edges in the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_face
+(
+/* received */
+PK_LOOP_t         /*loop*/,               /* a loop */
+/* returned */
+PK_FACE_t *const  /*face*/                /* owning face */
+);
+/*
+This function returns the face containing the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_fins
+(
+/* received */
+PK_LOOP_t         /*loop*/,               /* a loop */
+/* returned */
+int       *const  /*n_fins*/,             /* number of fins (>= 0) */
+PK_FIN_t **const  /*fins*/                /* fins (optional) */
+);
+/*
+This function returns an ordered list of fins around the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_first_fin
+(
+/* received */
+PK_LOOP_t        /*loop*/,         /* a loop */
+/* returned */
+PK_FIN_t *const  /*first_fin*/     /* the first fin (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the first fin in the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_next_in_face
+(
+/* received */
+PK_LOOP_t         /*loop*/,              /* a loop */
+/* returned */
+PK_LOOP_t *const  /*next*/               /* the next loop (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the next loop in the face containing the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_type
+(
+/* received */
+PK_LOOP_t              /*loop*/,       /* the loop */
+/* returned */
+PK_LOOP_type_t *const  /*loop_type*/  /* the type of the loop */
+);
+/*
+This function classifies the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_ask_vertices
+(
+/* received */
+PK_LOOP_t            /*loop*/,               /* a loop */
+/* returned */
+int          *const  /*n_vertices*/,         /* number of vertices (>= 0) */
+PK_VERTEX_t **const  /*vertices*/            /* vertices (optional) */
+);
+/*
+This function returns an ordered list of vertices around the given loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_is_isolated
+(
+/* received */
+PK_LOOP_t            /*loop*/,        /* a loop */
+/* returned */
+PK_LOGICAL_t *const  /*is_isolated*/  /* whether loop is isolated or not */
+);
+/*
+This function returns whether the given loop is isolated.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_close_gaps
+(
+/* received */
+PK_LOOP_t                      /*loop*/,        /* loop */
+const PK_LOOP_close_gaps_o_t * /*options*/,     /* options on how to close loops */
+/* returned */
+int                    *const  /*n_vertices*/,  /* number of vertices where gaps */
+PK_VERTEX_t           **const  /*vertices*/     /* vertices where gaps remain */
+);
+/*
+This function closes gaps at tolerant vertices in the loop by modifying the
+edge/fin geometry. Where gaps cannot be closed the vertices at those gaps will
+be returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_delete_from_sheet_body
+(
+/* received */
+int              /*n_loops*/,    /* number of loops to be deleted */
+const PK_LOOP_t  /*loops*/[]     /* loops to be deleted */
+);
+/*
+This function deletes interior loops from a sheet body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_transfer
+(
+/* received */
+PK_LOOP_t        /*loop*/,     /* loop to transfer */
+PK_FACE_t        /*face*/      /* destination face */
+);
+/*
+This function transfers a loop from one face to another.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_make_edge_face
+(
+/* received */
+PK_LOOP_t         /*loop*/,       /* Loop of face */
+PK_FIN_t          /*fin1*/,       /* Fin at first vertex to join */
+PK_FIN_t          /*fin2*/,       /* Fin at second vertex to join */
+/* returned */
+PK_FACE_t *const  /*new_face*/,   /* New face created */
+PK_EDGE_t *const  /*new_edge*/    /* New edge created */
+);
+/*
+This function joins two vertices in the same loop, creating a new face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_make_edge_loop
+(
+/* received */
+PK_LOOP_t         /*loop*/,       /* Loop of face */
+PK_FIN_t          /*fin1*/,       /* Fin at first vertex to join */
+PK_FIN_t          /*fin2*/,       /* Fin at second vertex to join */
+/* returned */
+PK_LOOP_t *const  /*new_loop*/    /* New loop created */
+);
+/*
+This function joins two vertices in the same loop of a face, creating a new
+loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_delete_make_edge
+(
+/* received */
+PK_LOOP_t         /*loop1*/,  /* Loop of fin1 */
+PK_FIN_t          /*fin1*/,   /* Fin at first vertex to join */
+PK_LOOP_t         /*loop2*/,  /* Loop of fin2 */
+PK_FIN_t          /*fin2*/,   /* Fin at second vertex to join */
+/* returned */
+PK_EDGE_t *const  /*new_edge*/
+);
+/*
+This function merges two loops in the same face into one by joining their
+vertices with an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_make_edge
+(
+/* received */
+PK_LOOP_t           /*loop*/,         /* Loop in which to create the edge */
+PK_FIN_t            /*fin*/,          /* Fin to create edge at */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* New vertex created */
+PK_EDGE_t   *const  /*new_edge*/      /* New edge created */
+);
+/*
+This function adds a new edge to a loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_create_edge
+(
+/* received */
+PK_LOOP_t           /*loop*/,         /* Loop in which to create the edge */
+PK_FIN_t            /*fin*/,          /* Fin to create edge at */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* New vertex created */
+PK_EDGE_t   *const  /*new_edge*/      /* New edge created */
+);
+/*
+This function is obsolete.
+
+See documentation for PK_LOOP_euler_make_edge
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_euler_delete_isolated
+(
+/* received */
+PK_LOOP_t        /*loop*/     /* Loop to delete */
+);
+/*
+This function deletes an isolated vertex and loop from a face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LOOP_offset_planar
+(
+/* received */
+PK_LOOP_t                         /*planar_loop*/,    /* input planar loop */
+double                            /*offset*/,         /* input offset distance */
+const PK_LOOP_offset_planar_o_t * /*options*/,        /* options structure */
+/* returned */
+int                       *const  /*n_new_loops*/,    /* number of new loops */
+PK_LOOP_t                **const  /*new_loops*/,      /* array of new loops */
+PK_TOPOL_track_r_t        *const  /*track_records*/   /* array of track records */
+);
+/*
+This function offsets an input loop of a planar face by a specified distance.
+Edges of the new offset loop/loops are paired with their originating edges or
+vertices of the input loop. These corresponding new and old topologies are
+returned in the form of PK topology track records.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_body
+(
+/* received */
+PK_FIN_t          /*fin*/,                /* a fin */
+/* returned */
+PK_BODY_t *const  /*body*/                /* owning body */
+);
+/*
+This function returns the body of the given fin.
+
+If the fin is contained within a compound body ( see PK_BODY_ask_config ) then
+the child body to which the fin belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_loop
+(
+/* received */
+PK_FIN_t          /*fin*/,                /* a fin */
+/* returned */
+PK_LOOP_t *const  /*loop*/                /* owning loop */
+);
+/*
+This function returns the loop of the given fin.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_face
+(
+/* received */
+PK_FIN_t          /*fin*/,                /* a fin */
+/* returned */
+PK_FACE_t *const  /*face*/                /* owning face */
+);
+/*
+This function returns the face of the given fin.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_edge
+(
+/* received */
+PK_FIN_t          /*fin*/,                /* a fin */
+/* returned */
+PK_EDGE_t *const  /*edge*/                /* owning edge */
+);
+/*
+This function returns the edge of the given fin.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_next_in_loop
+(
+/* received */
+PK_FIN_t         /*fin*/,                /* a fin */
+/* returned */
+PK_FIN_t *const  /*next*/                /* the next fin around the loop */
+);
+/*
+This function returns the next fin in order around the given fin's loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_previous_in_loop
+(
+/* received */
+PK_FIN_t         /*fin*/,                /* a fin */
+/* returned */
+PK_FIN_t *const  /*previous*/            /* the previous fin around the loop */
+);
+/*
+This function returns the previous fin in order around the given fin's loop.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_next_of_edge
+(
+/* received */
+PK_FIN_t         /*fin*/,                /* a fin */
+/* returned */
+PK_FIN_t *const  /*next*/                /* the next fin around the edge */
+);
+/*
+This function returns the next fin in order around the given fin's edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_previous_of_edge
+(
+/* received */
+PK_FIN_t         /*fin*/,                /* a fin */
+/* returned */
+PK_FIN_t *const  /*previous*/            /* the previous fin around the edge */
+);
+/*
+This function returns the previous fin in order around the given fin's edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_type
+(
+/* received */
+PK_FIN_t              /*fin*/,        /* a fin */
+/* returned */
+PK_FIN_type_t *const  /*fin_type*/    /* the type of the fin */
+);
+/*
+This function classifies the given fin according to the relationship
+between its edge and its face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_oriented_curve
+(
+/* received */
+PK_FIN_t             /*fin*/,           /* a fin */
+/* returned */
+PK_CURVE_t   *const  /*curve*/,         /* the curve (possibly PK_ENTITY_null) */
+PK_LOGICAL_t *const  /*orientation*/    /* the fin orientation with respect to its */
+);
+/*
+This function returns the curve and orientation of the given fin, if any.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_curve
+(
+/* received */
+PK_FIN_t           /*fin*/,               /* a fin */
+
+/* returned */
+PK_CURVE_t *const  /*curve*/              /* its curve (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the curve attached to the given fin, if there is one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_ask_geometry
+(
+/* received */
+PK_FIN_t              /*fin*/,            /* fin for which geometry is required */
+PK_LOGICAL_t          /*want_interval*/,  /* whether parametric interval required */
+/* returned */
+PK_CURVE_t    *const  /*curve*/,          /* curve of fin (may be PK_ENTITY_null) */
+PK_CLASS_t    *const  /*class*/,          /* class of curve */
+PK_VECTOR_t           /*ends*/[2],        /* positions at ends of fin */
+PK_INTERVAL_t *const  /*t_int*/,          /* parametric interval of fin */
+PK_LOGICAL_t  *const  /*sense*/           /* whether curve in same direction as fin */
+);
+/*
+This function returns the geometry of a fin
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_attach_curves
+(
+/* received */
+int                  /*n_fins*/,        /* number of fins */
+const PK_FIN_t       /*fins*/[],        /* fins to have curves attached */
+const PK_CURVE_t     /*curves*/[],      /* curves to be attached to fins */
+const PK_INTERVAL_t  /*intervals*/[]    /* parametric bounds of each curve */
+/* returned */
+);
+/*
+This function attaches curves to fins.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_find_curve_parameter
+(
+/* received */
+PK_FIN_t         /*fin*/,         /* fin */
+PK_UV_t          /*parms*/,       /* u,v parameters of surface attached to `fin' */
+PK_LOGICAL_t     /*estimate*/,    /* whether `t_est' is supplied */
+double           /*t_est*/,       /* estimate of parameter point `t' */
+/* returned */
+double   *const  /*t*/            /* t parameter on curve attached to `fin' */
+);
+/*
+This function computes the fin curve parameter corresponding to the given
+surface parameters.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_find_surf_parameters
+(
+/* received */
+PK_FIN_t         /*fin*/,           /* fin */
+double           /*t*/,             /* t parameter on curve attached to `fin' */
+PK_LOGICAL_t     /*estimate*/,      /* whether `parms_est' is supplied */
+PK_UV_t          /*parms_est*/,     /* estimate of u,v parameters */
+/* returned */
+PK_UV_t  *const  /*parms*/          /* u,v parameters on surface attached to `fin' */
+);
+/*
+This function computes fin surface parameters corresponding to the given
+curve parameter.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_find_interval
+(
+/* received */
+PK_FIN_t              /*fin*/,            /* fin */
+/* returned */
+PK_INTERVAL_t *const  /*t_int*/           /* interval */
+);
+/*
+This function computes the parameter interval of the curve, to which the fin
+corresponds.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_find_uvbox
+(
+/* received */
+PK_FIN_t          /*fin*/,           /* fin for which uvbox required */
+/* returned */
+PK_UVBOX_t *const  /*uvbox*/         /* uvbox containing fin */
+);
+/*
+This function finds a uvbox which bounds the given fin in the parameter space
+of the fin's owning face's surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_is_positive
+(
+/* received */
+PK_FIN_t             /*fin*/,         /* a fin */
+/* returned */
+PK_LOGICAL_t *const  /*is_positive*/  /* whether fin is positive or negative */
+);
+/*
+This function returns whether the given fin goes in the same direction as
+its owning edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FIN_euler_glue
+(
+/* received */
+int              /*n_fins*/,      /* number of fins */
+const PK_FIN_t   /*fins*/[],      /* fins to glue */
+PK_LOGICAL_t     /*same_dir*/     /* orientation of fins belonging to second edge */
+);
+/*
+This function glues fins from two edges in the order indicated so that in the
+result the fins all belong to one edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_blend
+(
+/* received */
+PK_EDGE_t                      /*edge*/,            /* an edge */
+/* returned */
+PK_blend_type_t        *const  /*type*/,            /* type of blend */
+PK_FACE_t              *const  /*left_face*/,       /* face to left of edge */
+PK_FACE_t              *const  /*right_face*/,      /* face to right of edge */
+PK_blend_edge_shape_t  *const  /*edge_shape*/,      /* shape of blend */
+PK_blend_properties_t  *const  /*properties*/,      /* blend properties */
+PK_EDGE_t              *const  /*cliff_edge*/       /* cliff edge */
+);
+/*
+This function returns information about the blend on a given edge if any.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_body
+(
+/* received */
+PK_EDGE_t         /*edge*/,               /* an edge */
+/* returned */
+PK_BODY_t *const  /*body*/                /* owning body */
+);
+/*
+This function returns the body which contains the given edge.
+
+If the edge is contained within a compound body ( see PK_BODY_ask_config ) then
+the child body to which the edge belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_curve
+(
+/* received */
+PK_EDGE_t          /*edge*/,              /* an edge */
+/* returned */
+PK_CURVE_t *const  /*curve*/              /* its curve (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the curve of the given edge, if it has one, otherwise
+PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_curve_nmnl
+(
+/* received */
+PK_EDGE_t          /*edge*/,              /* an edge */
+/* returned */
+PK_CURVE_t *const  /*curve*/              /* its curve (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the nominal curve of the given `edge', if it has one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_faces
+(
+/* received */
+PK_EDGE_t          /*edge*/,               /* an edge */
+/* returned */
+int        *const  /*n_faces*/,            /* number of faces (>= 0) */
+PK_FACE_t **const  /*faces*/               /* faces (optional) */
+);
+/*
+This function returns the set of faces which contain the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_fins
+(
+/* received */
+PK_EDGE_t         /*edge*/,               /* an edge */
+/* returned */
+int       *const  /*n_fins*/,             /* number of fins (>= 0) */
+PK_FIN_t **const  /*fins*/                /* fins (optional) */
+);
+/*
+This function returns an ordered list of fins connected to the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_first_fin
+(
+/* received */
+PK_EDGE_t        /*edge*/,               /* an edge */
+/* returned */
+PK_FIN_t *const  /*first_fin*/           /* the first fin (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the first fin belonging to the given edge.
+
+If the edge is wireframe and so has no fins, then PK_ENTITY_null will be
+returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_geometry
+(
+/* received */
+PK_EDGE_t             /*edge*/,           /* edge for which geometry is required */
+PK_LOGICAL_t          /*want_interval*/,  /* whether parametric interval required */
+/* returned */
+PK_CURVE_t    *const  /*curve*/,          /* curve of edge (may be PK_ENTITY_null) */
+PK_CLASS_t    *const  /*class*/,          /* class of curve */
+PK_VECTOR_t           /*ends*/[2],        /* positions at ends of edge */
+PK_INTERVAL_t *const  /*t_int*/,          /* parametric interval of edge */
+PK_LOGICAL_t  *const  /*sense*/           /* whether curve in same direction as edge */
+);
+/*
+This function returns the geometry of an edge
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_geometry_nmnl
+(
+/* received */
+PK_EDGE_t             /*edge*/,           /* edge for which geometry is required */
+PK_LOGICAL_t          /*want_interval*/,  /* whether parametric interval required */
+/* returned */
+PK_CURVE_t    *const  /*curve*/,          /* curve of edge (may be PK_ENTITY_null) */
+PK_CLASS_t    *const  /*class*/,          /* class of curve */
+PK_VECTOR_t           /*ends*/[2],        /* positions at ends of edge */
+PK_INTERVAL_t *const  /*t_int*/,          /* parametric interval of edge */
+PK_LOGICAL_t  *const  /*sense*/           /* whether curve in same direction as edge */
+);
+/*
+This function returns the nominal geometry of an edge, if present.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_next_in_body
+(
+/* received */
+PK_EDGE_t         /*edge*/,           /* an edge */
+/* returned */
+PK_EDGE_t *const  /*next*/            /* the next edge (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the next edge in the body which contains the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_oriented_curve
+(
+/* received */
+PK_EDGE_t            /*edge*/,          /* an edge */
+/* returned */
+PK_CURVE_t   *const  /*curve*/,         /* the curve (possibly PK_ENTITY_null) */
+PK_LOGICAL_t *const  /*orientation*/    /* the edge orientation with respect to its */
+);
+/*
+This function returns the curve and orientation of the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_precision
+(
+/* received */
+PK_EDGE_t        /*edge*/,       /* edge */
+/* returned */
+double   *const  /*precision*/   /* precision */
+);
+/*
+This function returns the `precision' of the given `edge'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_shells
+(
+/* received */
+PK_EDGE_t           /*edge*/,               /* an edge */
+/* returned */
+int         *const  /*n_shells*/,           /* number of shells (>= 1) */
+PK_SHELL_t **const  /*shells*/              /* shells (optional) */
+);
+/*
+This function returns the set of shells which contain the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_type
+(
+/* received */
+PK_EDGE_t                  /*edge*/,         /* the edge */
+/* returned */
+PK_EDGE_ask_type_t *const  /*edge_types*/    /* edge types structure */
+);
+/*
+This function classifies the given edge according to whether it is
+(a)     open, closed, or a ring.
+(b)     surrounded by solid regions, by void regions, or by both.
+(c)     wireframe, laminar, normal, or general.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_vertices
+(
+/* received */
+PK_EDGE_t        /*edge*/,               /* an edge */
+/* returned */
+PK_VERTEX_t      /*vertices*/[2]         /* vertices (possibly both PK_ENTITY_null) */
+);
+/*
+This function returns the vertices bounding the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_ask_convexity
+(
+/* received */
+PK_EDGE_t                         /*edge*/,
+const PK_EDGE_ask_convexity_o_t * /*options*/,
+/* returned */
+PK_EDGE_convexity_t             * /*convexity*/
+);
+/*
+The function returns the convexity of the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_attach_curves
+(
+/* received */
+int               /*n_edges*/,      /* number of edges */
+const PK_EDGE_t   /*edges*/[],      /* edges to have curves attached */
+const PK_CURVE_t  /*curves*/[]      /* curves to be attached to edges */
+);
+/*
+This function attaches curves to edges.
+
+Note: this function is deprecated and has been superseded by
+PK_EDGE_attach_curves_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_attach_curves_2
+(
+/* received */
+int                               /*n_edges*/,   /* number of edges */
+const PK_EDGE_t                   /*edges*/[],   /* edges to have curves attached */
+const PK_CURVE_t                  /*curves*/[],  /* curves to attach to edges */
+const PK_EDGE_attach_curves_o_t * /*options*/,   /* options structure */
+/* returned */
+PK_ENTITY_track_r_t       *const  /*tracking*/   /* tracking information */
+);
+/*
+This function attaches curves to edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_attach_curve_nmnl
+(
+/* received */
+PK_EDGE_t                             /*edge*/,       /* edge to which 'curve' */
+PK_CURVE_t                            /*curve*/,      /* curve of edge */
+const PK_EDGE_attach_curve_nmnl_o_t * /*options*/     /* option structure */
+);
+/*
+This function attaches the `curve' provided to the `edge' as a nominal curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_contains_vector
+(
+/* received */
+PK_EDGE_t              /*edge*/,       /* the edge */
+PK_VECTOR_t            /*vector*/,     /* the position vector */
+/* returned */
+PK_TOPOL_t     *const  /*topol*/       /* topology coincident with vector if any */
+);
+/*
+This function determines whether the given position vector coincides with
+the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_delete
+(
+/* received */
+int                        /*n_edges*/,   /* number of edges */
+const PK_EDGE_t            /*edges*/[],   /* edges to be deleted */
+const PK_EDGE_delete_o_t * /*options*/,   /* options structure */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/,  /* tracking information */
+PK_TOPOL_local_r_t *const  /*results*/    /* status information */
+);
+/*
+This function deletes the given set of edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_delete_wireframe
+(
+/* received */
+int                  /*n_edges*/,            /* number of edges */
+const PK_EDGE_t      /*edges*/[]             /* wireframe edges to delete */
+);
+/*
+This function deletes the given wireframe edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_detach_curve_nmnl
+(
+/* received */
+PK_EDGE_t        /*edge*/  /* edge from which nominal curve is to be detached */
+/* returned */
+);
+/*
+This function detaches the nominal curve from a tolerant `edge' if it has one.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_blend_topol
+(
+/* received */
+PK_EDGE_t            /*edge*/,            /* edge on which to */
+/* returned */
+int                *const  /*n_edges*/,   /* number of affected edges */
+PK_EDGE_t         **const  /*edges*/,     /* affected edges */
+int                *const  /*n_faces*/,   /* number of affected faces */
+PK_FACE_t         **const  /*faces*/      /* affected faces */
+);
+/*
+This function finds the edges and faces affected by the blend on
+the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_interval
+(
+/* received */
+PK_EDGE_t             /*edge*/,
+/* returned */
+PK_INTERVAL_t *const  /*t_int*/
+);
+/*
+This function computes the parameter interval of the curve, to which the edge
+corresponds.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_end_tangents
+(
+/* received */
+PK_EDGE_t             /*edge*/,                /* edge */
+/* returned */
+PK_VECTOR_t   *const  /*start*/,               /* start position of edge */
+PK_VECTOR_t   *const  /*start_tangent*/,       /* tangent at start position */
+PK_VECTOR_t   *const  /*end*/,                 /* end position of edge */
+PK_VECTOR_t   *const  /*end_tangent*/          /* tangent at end position */
+);
+/*
+This function finds the end positions of an edge and the edge tangents at
+those positions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_extreme
+(
+/* received */
+PK_EDGE_t           /*edge*/,         /* edge on which extreme sought */
+PK_VECTOR_t         /*direction_1*/,  /* first direction */
+PK_VECTOR_t         /*direction_2*/,  /* second direction */
+PK_VECTOR_t         /*direction_3*/,  /* third direction */
+/* returned */
+PK_VECTOR_t *const  /*extreme*/,      /* position of extreme point */
+PK_TOPOL_t  *const  /*topol*/         /* topology on which extreme point lies */
+);
+/*
+This function finds the extreme point on the given `edge' in `direction_1'.
+If this extreme is not a single point, then `direction_2' and `direction_3'
+are used successively to reduce the number of extreme points to one.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_deviation
+(
+/* received */
+PK_EDGE_t            /*edge1*/,              /* edge from which to find distances */
+PK_EDGE_t            /*edge2*/,              /* edge to which to find distance */
+int                  /*how_many*/,           /* how many distances to find */
+/* returned */
+int          *const  /*n_distances*/,        /* number of distances returned */
+double      **const  /*distances*/,          /* distances */
+PK_VECTOR_t **const  /*edge1_vecs*/,         /* points on edge1 */
+PK_VECTOR_t **const  /*edge2_vecs*/          /* corresponding points on edge2 */
+);
+/*
+NOTE:This function has been superseded by PK_EDGE_find_deviation_2.
+
+This function computes distances from edge1 to edge2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_deviation_2
+(
+/* received */
+PK_EDGE_t                            /*edge1*/,       /* First edge */
+
+PK_EDGE_t                            /*edge2*/,       /* Second edge */
+
+const PK_EDGE_find_deviation_o_t   * /*options*/,     /* Option structure */
+/* returned */
+PK_EDGE_find_deviation_r_t  *const   /*result*/       /* Results */
+);
+/*
+This function finds distance samples between the two edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_deviation_r_f
+(
+/* received */
+PK_EDGE_find_deviation_r_t *const  /*results*/
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_find_g1_edges
+(
+/* received */
+PK_EDGE_t          /*edge*/,          /* starting edge */
+double             /*tolerance*/,     /* angular tolerance on tangency */
+PK_LOGICAL_t       /*convexity*/,     /* convexity checking switch */
+/* returned */
+int        *const  /*n_edges*/,       /* number of edges (>= 1) */
+PK_EDGE_t **const  /*edges*/          /* received edge and tangent edges */
+);
+/*
+This function returns the set of tangent edges for a given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_imprint_point
+(
+/* received */
+PK_EDGE_t           /*edge*/,         /* edge to be imprinted onto */
+PK_POINT_t          /*point*/,        /* point to imprint */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* new vertex */
+PK_EDGE_t   *const  /*new_edge*/      /* new edge   (may be PK_ENTITY_null) */
+);
+/*
+This function imprints a point onto an edge, thereby creating a
+new vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_is_planar
+(
+/* received */
+PK_EDGE_t             /*edge*/,        /* edge */
+PK_LOGICAL_t          /*want_plane*/,  /* whether plane is wanted */
+/* returned */
+PK_LOGICAL_t *const  /*is_planar*/,    /* whether `edge' is planar */
+PK_PLANE_t   *const  /*plane*/         /* plane if `is_planar' and `want_plane' */
+);
+/*
+This function detects whether an edge lies in a plane.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_is_smooth
+(
+/* received */
+PK_EDGE_t            /*edge*/,        /* edge to test */
+double               /*max_angle*/,   /* maximum angle between face normals */
+/* returned */
+PK_LOGICAL_t *const  /*is_smooth*/    /* whether the edge is smooth */
+);
+/*
+This function checks whether the edge passed to it in `edge' is smooth
+according to the angular criterion passed in `max_angle'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_offset_on_body_r_f
+(
+/* received */
+PK_EDGE_offset_on_body_r_t *const  /*results*/
+);
+/*
+Free the memory associated with the given structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_offset_on_body
+(
+/* received */
+int                                /*n_edges*/,      /* number of edges */
+const PK_EDGE_t                    /*edges*/[],      /* edges */
+PK_HAND_t                          /*direction*/,    /* direction for offset */
+const PK_EDGE_offset_on_body_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_EDGE_offset_on_body_r_t *const  /*results*/,      /* status and error information */
+PK_TOPOL_track_r_t         *const  /*tracking*/      /* tracking information */
+);
+/*
+This function offsets a set of edges in the faces of their body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_optimise
+(
+/* received */
+PK_EDGE_t                           /*edge*/,                 /* edge to be */
+const PK_EDGE_optimise_o_t        * /*options*/,              /* option structure */
+/* returned */
+PK_EDGE_optimise_result_t   *const  /*result*/,               /* whether the edge */
+double                      *const  /*achieved_deviation*/    /* maximum measured */
+);
+/*
+Given a tolerant edge, this function attempts to set a tolerance on
+the edge that lies between the maximum deviation and the desired upper bound.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_remove_blend
+(
+/* received */
+PK_EDGE_t        /*edge*/         /* edge from which to remove blend */
+/* returned */
+);
+/*
+This function removes an unfixed blend from the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_remove_to_bodies
+(
+/* received */
+int                                        /*n_edges*/,          /* no. of edges */
+const PK_EDGE_t                            /*edges*/[],          /* edges */
+const PK_EDGE_remove_to_bodies_o_t       * /*options*/,          /* options */
+/* returned */
+int                                *const  /*n_parent_bodies*/,  /* no. of parent */
+PK_BODY_t                         **const  /*parent_bodies*/,    /* parent bodies */
+int                                *const  /*n_child_bodies*/,   /* no. of child */
+PK_BODY_t                         **const  /*child_bodies*/,     /* child bodies */
+PK_TOPOL_track_r_t                 *const  /*tracking*/          /* tracking */
+);
+/*
+This function separates a body into two or more bodies by selecting
+wire edges which are to be removed into new bodies
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_repair
+(
+/* received */
+int                        /*n_edges*/,   /* number of edges (may be zero) */
+const PK_EDGE_t            /*edges*/[],   /* edges */
+const PK_EDGE_repair_o_t * /*options*/,   /* options structure */
+/* returned */
+PK_TOPOL_track_r_t *const  /*tracking*/   /* tracking information */
+);
+/*
+This function attempts to repair an array of edges, i.e. make them valid.
+The option structure determines which type of repair is attempted.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_reset_precision
+(
+/* received */
+PK_EDGE_t               /*edge*/,       /* edge */
+/* returned */
+PK_reset_prec_t *const  /*result*/
+);
+/*
+NOTE: This function has been superseded by PK_EDGE_reset_precision_2.
+
+This function attempts to reset the precision of the given `edge' to the
+session precision: that is to make Parasolid regard the edge as exact.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_reset_precision_2
+(
+/* received */
+PK_EDGE_t                           /*edge*/,     /* edge */
+const PK_EDGE_reset_precision_o_t * /*options*/,  /* options */
+/* returned */
+PK_reset_prec_t             *const  /*result*/
+);
+/*
+This function attempts to reset the precision of the given `edge' to the
+session precision: that is to make Parasolid regard the edge as exact.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_reverse
+(
+/* received */
+PK_EDGE_t        /*edge*/   /* edge to reverse */
+);
+/*
+This function reverses the given edge and its associated geometry.
+
+NOTE: This function is deprecated and has been superseded by PK_EDGE_reverse_2.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_propagate_orientation
+(
+/* received */
+PK_EDGE_t        /*edge*/   /* orientation edge */
+);
+/*
+This function orientates the edges of a wire body to be in the same direction
+as the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_reverse_2
+(
+/* received */
+int                           /*n_edges*/,    /* number of edges */
+const PK_EDGE_t               /*edges*/[],    /* edges to be reversed */
+const PK_EDGE_reverse_2_o_t * /*options*/     /* option structure */
+);
+/*
+This function reverses the given edges and their associated geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_set_precision
+(
+/* received */
+PK_EDGE_t          /*edge*/,         /* edge */
+double             /*precision*/,    /* required precision */
+/* returned */
+int        *const  /*n_new_edges*/,  /* number of new edges */
+PK_EDGE_t **const  /*new_edges*/     /* new edges */
+);
+/*
+This function sets the `precision' of the given `edge'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_set_precision_2
+(
+/* received */
+PK_EDGE_t                         /*edge*/,         /* edge */
+double                            /*precision*/,    /* required precision */
+const PK_EDGE_set_precision_o_t * /*options*/,      /* options */
+/* returned */
+int                       *const  /*n_new_edges*/,  /* number of new edges */
+PK_EDGE_t                **const  /*new_edges*/     /* new edges */
+);
+/*
+This function sets the `precision' of the given `edge'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_check
+(
+/* received */
+PK_EDGE_t                     /*edge*/,          /* edge to be checked */
+const PK_EDGE_check_o_t     * /*options*/,       /* options structure */
+/* returned */
+int                   *const  /*n_faults*/,      /* number of faults */
+PK_check_fault_t     **const  /*faults*/         /* faults */
+);
+/*
+This function checks the given edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_check_blends
+(
+/* received */
+int                  /*n_edges*/,         /* number of edges */
+const PK_EDGE_t      /*edges*/[],         /* edges to have blends checked */
+PK_blend_check_t     /*level*/,           /* level of checking required */
+/* returned */
+PK_blend_fault_t     /*faults*/[],        /* result of check */
+PK_TOPOL_t           /*fault_topols*/[]   /* topology associated with fault */
+);
+/*
+This function checks the unfixed blends on the given edges.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_make_faces_from_wire
+(
+/* received */
+int                  /*n_edges*/,            /* number of edges */
+const PK_EDGE_t      /*edges*/[],            /* initial wireframe edges */
+const PK_LOGICAL_t   /*senses*/[],           /* senses of initial fins */
+const int            /*shared_loop*/[],      /* mapping from loops to faces */
+/* returned */
+PK_FACE_t            /*new_faces*/[]         /* new faces created */
+);
+/*
+This function attaches faces to closed loops of wireframe edges in a body.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_make_wire_body
+(
+/* received */
+int                                /*n_edges*/,   /* number of edges */
+const PK_EDGE_t                    /*edges*/[],   /* edges */
+const PK_EDGE_make_wire_body_o_t * /*options*/,   /* options */
+/* returned */
+PK_BODY_t                  *const  /*body*/,      /* created body */
+PK_TOPOL_track_r_t         *const  /*tracking*/   /* tracking */
+);
+/*
+This function creates a wire body from a collection of existing edges. The
+edges may come from different bodies.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_make_curve
+(
+/* received */
+
+int                              /*n_edges*/,        /* number of edges */
+const PK_EDGE_t                  /*edges*/[],        /* edge chain to make curve */
+double                           /*tolerance*/,      /* tolerance */
+const PK_EDGE_make_curve_o_t   * /*options*/,        /* options structure */
+
+/* returned */
+
+PK_ENTITY_track_r_t      *const  /*tracking*/        /* tracking information */
+
+);
+/*
+This function makes a single continuous curve from a set of edges to a given
+tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_set_blend_chamfer
+(
+/* received */
+int                                    /*n_edges*/,         /* no. of edges to blend */
+const PK_EDGE_t                        /*edges*/[],         /* edges to have */
+double                                 /*range_2*/,         /* offset of face */
+double                                 /*range_1*/,         /* offset of first face */
+const PK_FACE_t                        /*faces*/[],         /* faces of first range */
+const PK_EDGE_set_blend_chamfer_o_t  * /*options*/,         /* options structure */
+/* returned */
+int                            *const  /*n_blend_edges*/,   /* number of edges with */
+PK_EDGE_t                     **const  /*blend_edges*/      /* edges with blends */
+);
+/*
+This function sets edges to have a chamfer blend.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_set_blend_constant
+(
+/* received */
+int                                    /*n_edges*/,         /* no. of edges to blend */
+const PK_EDGE_t                        /*edges*/[],         /* edges to have */
+double                                 /*radius*/,          /* blend radius */
+const PK_EDGE_set_blend_constant_o_t * /*options*/,         /* options structure */
+/* returned */
+int                            *const  /*n_blend_edges*/,   /* number of edges with */
+PK_EDGE_t                     **const  /*blend_edges*/      /* edges with blends */
+);
+/*
+This function sets edges to have a constant `radius' blend.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_set_blend_variable
+(
+/* received */
+PK_EDGE_t                              /*edge*/,            /* edge to have */
+PK_blend_edge_shape_t                  /*edge_shape*/,      /* shape of blend */
+const PK_EDGE_set_blend_variable_o_t * /*options*/,         /* options structure */
+/* returned */
+int                            *const  /*n_blend_edges*/,   /* number of edges with */
+PK_EDGE_t                     **const  /*blend_edges*/      /* edges with blends */
+);
+/*
+This function sets edges to have a variable `radius' blend.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_merge_vertices
+(
+/* received */
+PK_EDGE_t        /*edge*/,    /* Edge to delete */
+PK_VERTEX_t      /*vertex*/   /* Vertex to delete */
+);
+/*
+This function deletes an edge by merging its vertices.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_close_zip
+(
+/* received */
+PK_EDGE_t        /*edge1*/,   /* Edge to zip */
+PK_EDGE_t        /*edge2*/    /* Edge to delete */
+);
+/*
+This function "zips" two edges together by merging the vertices at either end.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_open_zip
+(
+/* received */
+PK_EDGE_t           /*edge*/,         /* Edge to split */
+PK_FIN_t            /*fin*/,          /* Fin at vertex to split */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* New vertex created */
+PK_EDGE_t   *const  /*new_edge*/      /* New edge created */
+);
+/*
+This function splits an edge lengthwise, replacing it with two edges
+joined at one end.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_slit
+(
+/* received */
+PK_EDGE_t         /*edge*/,       /* Edge to be slit */
+PK_LOGICAL_t      /*on_left*/,    /* New face is on left of edge */
+/* returned */
+PK_FACE_t *const  /*new_face*/,   /* New face created by slit */
+PK_EDGE_t *const  /*new_edge*/    /* New edge created by slit */
+);
+/*
+This function replaces an edge by a 2-edge face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_delete_with_face
+(
+/* received */
+PK_EDGE_t        /*edge*/,    /* Edge to be deleted */
+PK_LOGICAL_t     /*on_left*/  /* Face to delete is on left of edge */
+);
+/*
+This function deletes an edge and merges two faces and loops into one.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_delete_with_loop
+(
+/* received */
+PK_EDGE_t        /*edge*/,    /* Edge to be deleted */
+PK_LOGICAL_t     /*on_left*/  /* Loop to delete is on left of edge */
+);
+/*
+This function deletes an edge and merges loops of the same face into one.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_split
+(
+/* received */
+PK_EDGE_t           /*edge*/,         /* Edge to be split */
+PK_LOGICAL_t        /*forward*/,      /* New vertex is forward vertex */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* New vertex create by split */
+PK_EDGE_t   *const  /*new_edge*/      /* New edge created by split */
+);
+/*
+This function splits an edge by adding a vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_delete_make_loop
+(
+/* received */
+PK_EDGE_t         /*edge*/,       /* Edge to be deleted */
+PK_LOGICAL_t      /*forward*/,    /* Forward vertex connects to new loop */
+/* returned */
+PK_LOOP_t *const  /*new_loop*/    /* New loop created */
+);
+/*
+This function deletes an edge from a loop splitting it into two loops.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_delete_ring_face
+(
+/* received */
+PK_EDGE_t        /*edge*/,    /* Edge to be deleted */
+PK_LOGICAL_t     /*on_left*/  /* Face on the left is to be deleted */
+);
+/*
+This function deletes a ring edge and a face.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_euler_delete_ring_loop
+(
+/* received */
+PK_EDGE_t        /*edge*/     /* Edge to be deleted */
+);
+/*
+This function deletes a bi-wire ring edge and its loops.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_delete_acorn
+(
+/* received */
+int                /*n_vertices*/,          /* number of vertices */
+const PK_VERTEX_t  /*vertices*/[]           /* acorn vertices to delete */
+);
+/*
+This function deletes the given acorn vertices.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_remove_edge
+(
+/* received */
+PK_VERTEX_t         /*vertex*/,      /* vertex to split */
+PK_EDGE_t           /*edge*/,        /* wireframe edge incident with vertex */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/   /* new vertex */
+);
+/*
+This function cuts a body at a given vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_set_precision
+(
+/* received */
+PK_VERTEX_t      /*vertex*/,       /* vertex */
+double           /*precision*/     /* required precision */
+/* returned */
+);
+/*
+This function sets the `precision' of the given `vertex'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_body
+(
+/* received */
+PK_VERTEX_t       /*vertex*/,             /* a vertex */
+/* returned */
+PK_BODY_t *const  /*body*/                /* owning body */
+);
+/*
+This function returns the body of the given vertex.
+
+If the vertex is contained within a compound body ( see PK_BODY_ask_config )
+then the child body to which the vertex belongs is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_faces
+(
+/* received */
+PK_VERTEX_t        /*vertex*/,             /* a vertex */
+/* returned */
+int        *const  /*n_faces*/,            /* number of faces (>= 0) */
+PK_FACE_t **const  /*faces*/               /* faces (optional) */
+);
+/*
+This function returns the set of faces at the given vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_isolated_loops
+(
+/* received */
+PK_VERTEX_t        /*vertex*/,             /* a vertex */
+/* returned */
+int        *const  /*n_loops*/,            /* number of isolated loops (>= 0) */
+PK_LOOP_t **const  /*loops*/               /* isolated loops (optional) */
+);
+/*
+This function returns the set of isolated loops at the given vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_oriented_edges
+(
+/* received */
+PK_VERTEX_t           /*vertex*/,             /* a vertex */
+/* returned */
+int           *const  /*n_edges*/,            /* number of edges (>= 0) */
+PK_EDGE_t    **const  /*edges*/,              /* edges (optional) */
+PK_LOGICAL_t **const  /*orients*/             /* edge orientations (optional) */
+);
+/*
+This function returns the list of edges at the given vertex, together with
+their orientations.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_point
+(
+/* received */
+PK_VERTEX_t        /*vertex*/,             /* a vertex */
+/* returned */
+PK_POINT_t *const  /*point*/               /* its point (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the point at the given vertex, if one exists, otherwise
+PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_precision
+(
+/* received */
+PK_VERTEX_t      /*vertex*/,       /* vertex */
+/* returned */
+double   *const  /*precision*/     /* precision */
+);
+/*
+This function returns the `precision' of the given `vertex'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_shells
+(
+/* received */
+PK_VERTEX_t         /*vertex*/,             /* a vertex */
+/* returned */
+int         *const  /*n_shells*/,           /* number of shells (>= 1) */
+PK_SHELL_t **const  /*shells*/              /* shells (optional) */
+);
+/*
+This function returns the set of shells at the given vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_ask_type
+(
+/* received */
+PK_VERTEX_t              /*vertex*/,        /* the vertex */
+/* returned */
+PK_VERTEX_type_t *const  /*vertex_type*/    /* the type of the vertex */
+);
+/*
+This function classifies the given vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_attach_points
+(
+/* received */
+int                /*n_vertices*/,      /* number of vertices */
+const PK_VERTEX_t  /*vertices*/[],      /* vertices to have points attached */
+const PK_POINT_t   /*points*/[]         /* points to be attached to vertices */
+);
+/*
+This function attaches points to vertices.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_euler_split
+(
+/* received */
+PK_VERTEX_t         /*vertex*/,       /* Vertex to be split */
+PK_FIN_t            /*fin1*/,         /* First fin at vertex */
+PK_FIN_t            /*fin2*/,         /* Second fin at vertex */
+/* returned */
+PK_VERTEX_t *const  /*new_vertex*/,   /* New vertex created */
+PK_EDGE_t   *const  /*new_edge*/      /* New edge created */
+);
+/*
+This function splits a vertex, replacing it with an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_euler_merge_edges
+(
+/* received */
+PK_VERTEX_t      /*vertex*/,  /* Vertex to be deleted */
+PK_EDGE_t        /*edge*/     /* Edge to survive */
+);
+/*
+This function deletes a vertex from an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_euler_delete
+(
+/* received */
+PK_VERTEX_t      /*vertex*/   /* Vertex to be deleted */
+);
+/*
+This function deletes a vertex and its edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_make_blend
+(
+/* received */
+PK_VERTEX_t       /*vertex*/,         /* vertex to be blended */
+double            /*radius*/,         /* blend radius */
+PK_LOGICAL_t      /*local_check*/,    /* whether local checking required */
+/* returned */
+PK_EDGE_t *const  /*edge*/,           /* new edge */
+PK_VERTEX_t       /*vertices*/[2]     /* new vertices */
+);
+/*
+The given `vertex' of a sheet or wire body is replaced by a circular blend
+producing one new `edge' and two new `vertices'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_optimise
+(
+/* received */
+PK_VERTEX_t                         /*vertex*/,               /* vertex to be */
+const PK_VERTEX_optimise_o_t      * /*options*/,              /* option structure */
+/* returned */
+PK_VERTEX_optimise_result_t *const  /*result*/,               /* whether the vertex */
+double                      *const  /*achieved_deviation*/    /* best measured */
+);
+/*
+Given a tolerant vertex, this function attempts to modify the position of
+the vertex and the end points of any trimmed curves, such that the maximum
+deviation falls within the given target value. It is also possible the vertex
+tolerance will be modified or set to the optimised maximum deviation.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_spin
+(
+/* received */
+PK_VERTEX_t              /*vertex*/,         /* end vertex of wire body */
+const PK_AXIS1_sf_t    * /*axis*/,           /* spin axis */
+double                   /*angle*/,          /* spin angle */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+PK_EDGE_t        *const  /*lateral*/,        /* new edge */
+PK_VERTEX_t      *const  /*base*/,           /* swept vertex */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function spins an end vertex of a wire body or the sole vertex of a
+minimum body into an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VERTEX_sweep
+(
+/* received */
+PK_VERTEX_t              /*vertex*/,         /* end vertex of wire body */
+PK_VECTOR_t              /*path*/,           /* translation vector */
+PK_LOGICAL_t             /*local_check*/,    /* whether local checking will be done */
+/* returned */
+PK_EDGE_t        *const  /*lateral*/,        /* new edge */
+PK_VERTEX_t      *const  /*base*/,           /* swept vertex */
+PK_local_check_t *const  /*check_result*/    /* result of local check */
+);
+/*
+This function sweeps an end vertex of a wire body or the sole vertex of a
+minimum body into an edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FACE_split_at_param
+(
+/* received */
+PK_FACE_t                            /*face*/,         /* Target face */
+double                               /*param*/,        /* parameter to split */
+PK_PARAM_direction_t                 /*param_dir*/,    /* direction u or v */
+const PK_FACE_split_at_param_o_t   * /*options*/,      /* options */
+/* returned */
+int                          *const  /*n_new_edges*/,  /* number of new edges */
+PK_EDGE_t                   **const  /*new_edges*/,    /* new edges */
+int                          *const  /*n_new_faces*/,  /* number of new faces */
+PK_FACE_t                   **const  /*new_faces*/     /* new faces */
+);
+/*
+This function splits a face along constant parameter line
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_EDGE_split_at_param
+(
+/* received */
+PK_EDGE_t             /*edge*/,           /* Target edge */
+double                /*param*/,          /* parameter to split at */
+/* returned */
+PK_VERTEX_t   *const  /*new_vertex*/,     /* new vertex */
+PK_EDGE_t     *const  /*new_edge*/        /* new edge (may be null) */
+);
+/*
+This function splits an edge at the given parameter.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_ask_dependents
+(
+/* received */
+PK_GEOM_t          /*geom*/,              /* a geometric entity */
+/* returned */
+int        *const  /*n_dependents*/,      /* number of dependents (>= 0) */
+PK_GEOM_t **const  /*dependents*/         /* dependents (optional) */
+);
+/*
+This function returns the set of geometric dependents of the given geometric
+entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_ask_geom_owners
+(
+/* received */
+PK_GEOM_t          /*geom*/,              /* a geometric entity */
+/* returned */
+int        *const  /*n_owners*/,          /* number of geometric owners (>= 0) */
+PK_GEOM_t **const  /*owners*/             /* geometric owners (optional) */
+);
+/*
+This function returns the set of geometric owners of the given geometric
+entity.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_check
+(
+/* received */
+PK_GEOM_t                     /*geom*/,          /* geometry to be checked */
+const PK_GEOM_check_o_t     * /*options*/,       /* options structure */
+/* returned */
+int                   *const  /*n_faults*/,      /* number of faults */
+PK_check_fault_t     **const  /*faults*/         /* faults */
+);
+/*
+This function checks the given geometry.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_delete_single
+(
+/* received */
+PK_GEOM_t        /*geom*/       /* geometry to delete */
+);
+/*
+This function deletes a single geometric entity
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_is_coincident
+(
+/* received */
+PK_GEOM_t            /*geom_1*/,          /* first geometric entity */
+PK_GEOM_t            /*geom_2*/,          /* second geometric entity */
+/* returned */
+PK_LOGICAL_t *const  /*is_coincident*/    /* whether coincident */
+);
+/*
+This function will compare two geometric entities to detect whether they
+occupy the same position(s) in space.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_copy
+(
+/* received */
+int                      /*n_geoms*/,
+const PK_GEOM_t          /*geoms*/[],
+const PK_GEOM_copy_o_t * /*options*/,
+/* returned */
+PK_GEOM_copy_r_t *const  /*copies*/
+);
+/*
+This function copies the given geometries while preserving the geometric
+dependencies amongst them.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_copy_r_f
+(
+/* received */
+PK_GEOM_copy_r_t *const  /*copies*/   /* structure to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range
+(
+/* received */
+PK_GEOM_t                    /*geom_1*/,          /* first geometrical entity */
+PK_GEOM_t                    /*geom_2*/,          /* second geometrical entity */
+const PK_GEOM_range_o_t    * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t    *const  /*range_result*/,    /* whether range data returned */
+PK_range_2_r_t       *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum/maximum separation between two
+geometrical entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_local
+(
+/* received */
+PK_GEOM_t                       /*geom_1*/,          /* first geometrical entity */
+PK_GEOM_t                       /*geom_2*/,          /* second geometrical entity */
+const PK_GEOM_range_local_o_t * /*options*/,         /* options structure */
+/* returned */
+int                     *const  /*n_ranges*/,        /* no. local minima */
+PK_range_2_r_t         **const  /*ranges*/           /* range data */
+);
+/*
+This function finds the local minimum separations between two geometrical
+entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_array
+(
+/* received */
+int                              /*n_geoms_1*/,       /* no. entities in 1st array */
+const PK_GEOM_t                  /*geoms_1*/[],       /* first geometrical array */
+int                              /*n_geoms_2*/,       /* no. entities in 2nd array */
+const PK_GEOM_t                  /*geoms_2*/[],       /* second geometrical array */
+const PK_GEOM_range_array_o_t  * /*options*/,         /* options structure */
+/* returned */
+PK_range_result_t        *const  /*range_result*/,    /* if range data returned */
+PK_range_2_r_t           *const  /*range*/            /* range data */
+);
+/*
+This function finds the global minimum/maximum separation between two arrays
+of geometrical entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_vector
+(
+/* received */
+PK_GEOM_t                          /*geom*/,           /* geometrical entity */
+PK_VECTOR_t                        /*vector*/,         /* position vector */
+const PK_GEOM_range_vector_o_t   * /*options*/,        /* options structure */
+/* returned */
+PK_range_result_t          *const  /*range_result*/,   /* if range data returned */
+PK_range_1_r_t             *const  /*range*/           /* range data */
+);
+/*
+This function finds the global minimum separation between a geometrical
+entity and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_local_vector
+(
+/* received */
+PK_GEOM_t                               /*geom*/,            /* geometrical entity */
+PK_VECTOR_t                             /*vector*/,          /* position vector */
+const PK_GEOM_range_local_vector_o_t  * /*options*/,         /* options structure */
+/* returned */
+int                             *const  /*n_ranges*/,        /* no. local minima */
+PK_range_1_r_t                 **const  /*ranges*/           /* range data */
+);
+/*
+This function finds the local minimum separations between a geometrical
+entity and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_array_vector
+(
+/* received */
+int                                     /*n_geoms*/,        /* no. geometries */
+const PK_GEOM_t                         /*geoms*/[],        /* geometrical array */
+PK_VECTOR_t                             /*vector*/,         /* position vector */
+const PK_GEOM_range_array_vector_o_t  * /*options*/,        /* options structure */
+/* returned */
+PK_range_result_t               *const  /*range_result*/,   /* whether range data */
+PK_range_1_r_t                  *const  /*range*/           /* range data */
+);
+/*
+This function finds the global minimum separation between an array
+of geometrical entities and a position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_range_vector_many
+(
+/* received */
+PK_GEOM_t                             /*geom*/,             /* geometrical entity */
+int                                   /*n_vectors*/,        /* number of positions */
+const PK_VECTOR_t                     /*vectors*/[],        /* position array */
+const PK_GEOM_range_vector_many_o_t * /*options*/,          /* options structure */
+/* returned */
+PK_range_result_t                     /*range_results*/[],  /* range status array */
+PK_range_1_r_t                        /*ranges*/[]          /* range data array */
+);
+/*
+This function finds the global minimum separations for each pairing of
+the geometrical entity with one of the positions supplied.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_render_line
+(
+/* received */
+const int                       /*n_geoms*/,  /* number of entities to be rendered */
+const PK_GEOM_t                 /*geoms*/[],  /* geometric entities to be rendered */
+const PK_TRANSF_t               /*geom_transfs*/[],
+const PK_GEOM_render_line_o_t * /*options*/   /* options structure */
+);
+/*
+Render a geometric entity through GO as a view independent wire frame drawing.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_transform
+(
+/* received */
+PK_GEOM_t            /*in_geom*/,    /* geometric entity to be transformed */
+PK_TRANSF_t          /*transf*/,     /* transformation */
+double               /*tolerance*/,  /* precision for replacing geometry */
+/* returned */
+PK_GEOM_t    *const  /*out_geom*/,   /* transformed entity */
+PK_LOGICAL_t *const  /*exact*/       /* whether result is exact */
+);
+/*
+This function transforms the given geometric entity by the given
+transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_GEOM_transform_2
+(
+/* received */
+int                           /*n_geoms*/,      /* number of geometry entities */
+const PK_GEOM_t               /*in_geoms*/[],   /* geometric entities to be */
+PK_TRANSF_t                   /*transf*/,       /* transformation */
+const PK_GEOM_transform_o_t * /*options*/,      /* options structure */
+/* returned */
+PK_GEOM_t                     /*out_geoms*/[],  /* transformed geometric entities */
+PK_LOGICAL_t                  /*exact*/[]       /* whether result is exact */
+);
+/*
+This function transforms the array of given geometric entities by the given
+transformation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_curves_common
+(
+/* received */
+PK_SURF_t           /*surf_1*/,       /* first surface */
+PK_SURF_t           /*surf_2*/,       /* second surface */
+/* returned */
+int         *const  /*n_curves*/,     /* number of common curves */
+PK_CURVE_t **const  /*curves*/        /* common curves */
+);
+/*
+This function finds curves which are common to two surfaces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_discontinuity
+(
+/* received */
+PK_SURF_t                              /*surface*/,      /* query surface */
+const PK_SURF_find_discontinuity_o_t * /*options*/,      /* options */
+/* returned */
+int                            *const  /*n_params*/,    /* number of discontinuities */
+double                        **const  /*params*/,      /* discontinuous parameters */
+PK_PARAM_direction_t          **const  /*direction*/,   /* in U or V direction */
+PK_continuity_t               **const  /*orders*/       /* order and type of each */
+);
+/*
+This interface function permits a user to query any standard surface type for
+either analytic or geometric discontinuities of levels 1 through 3. The query
+can be limited to a sub-domain of the parameter space of the surface by
+specifying a uv-box.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_min_radii
+(
+/* received */
+PK_SURF_t        /*surf*/,            /* surface */
+PK_UVBOX_t       /*uv_box*/,          /* u,v box */
+/* returned */
+int      *const  /*n_radii*/,         /* number of radii returned */
+double           /*radii*/[2],        /* min radii of curvature */
+PK_VECTOR_t      /*positions*/[2],    /* position vectors where minima occur */
+PK_UV_t          /*parms*/[2]         /* u,v parameters */
+);
+/*
+This function finds the minimum radius of curvature on each side of the given
+surface, and its position and u-v parameters. The user passes in the u-v box
+required and the search is confined to that part of the surface lying inside
+it. To find the u-v box for the whole surface(if unknown) the function
+PK_SURF_ask_uvbox should be used.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_non_aligned_box
+(
+/* received */
+PK_SURF_t           /*surf*/,           /* surface */
+PK_UVBOX_t          /*parms*/,          /* parameter range */
+/* returned */
+PK_VECTOR_t *const  /*centre*/,         /* box centre */
+PK_VECTOR_t         /*axes*/[3],        /* box axes */
+double              /*widths*/[3],      /* box width in each axis direction */
+int         *const  /*dimension*/       /* box dimension */
+);
+/*
+This function computes a non axis-aligned box bounding a portion of the given
+surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_self_ints_f
+(
+/* received */
+PK_SURF_self_ints_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_self_int
+(
+/* received */
+PK_SURF_t                         /*surf*/,        /* surface to be checked */
+const PK_SURF_find_self_int_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_SURF_self_ints_t       *const  /*results*/      /* results */
+);
+/*
+This function finds self-intersections in the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_fix_self_int_r_f
+(
+/* received */
+PK_SURF_fix_self_int_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_fix_self_int
+(
+/* received */
+PK_SURF_t                        /*surf*/,        /* surface to be fixed */
+const PK_SURF_self_ints_t      * /*self_ints*/,   /* self intersections */
+const PK_SURF_fix_self_int_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_SURF_fix_self_int_r_t *const  /*results*/      /* results */
+);
+/*
+This function attempts to fix self-intersections in the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_degens_f
+(
+/* received */
+PK_SURF_degens_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_find_degens
+(
+/* received */
+PK_SURF_t                       /*surf*/,        /* surface to be checked */
+const PK_SURF_find_degens_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_SURF_degens_t        *const  /*results*/      /* results */
+);
+/*
+This function finds degeneracies in the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_fix_degens
+(
+/* received */
+PK_SURF_t                      /*surf*/,        /* surface to be fixed */
+const PK_SURF_degens_t       * /*degens*/,      /* degeneracies */
+const PK_SURF_fix_degens_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_SURF_fix_degens_r_t *const  /*results*/      /* results */
+);
+/*
+This function attempts to fix degeneracies in the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_offset
+(
+/* received */
+PK_SURF_t         /*underlying_surf*/,    /* underlying surface */
+double            /*offset_distance*/,    /* offset distance */
+/* returned */
+PK_SURF_t *const  /*surf*/                /* surface returned */
+);
+/*
+This function creates a surface offset from the `underlying_surf' by
+`offset_distance'.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_parameterise_vector
+(
+/* received */
+PK_SURF_t          /*surf*/,            /* a surf */
+PK_VECTOR_t        /*position*/,        /* position on surf */
+/* returned */
+PK_UV_t    *const  /*uv*/               /* parameters of position on surf */
+);
+/*
+Find parameters of a point on a surface
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_ask_faces
+(
+/* received */
+PK_SURF_t          /*surf*/,              /* a surface */
+/* returned */
+int        *const  /*n_faces*/,           /* number of faces (>= 0) */
+PK_FACE_t **const  /*faces*/              /* faces (optional) */
+);
+/*
+This function returns the set of faces to which the given surface is attached.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_ask_params
+(
+/* received */
+PK_SURF_t          /*surf*/,      /* surface */
+/* returned */
+PK_PARAM_sf_t      /*param*/[2]   /* standard form of parameterisation of surface */
+);
+/*
+This function returns information about the parameterisation of the
+given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_ask_part
+(
+/* received */
+PK_SURF_t         /*surf*/,               /* a surface */
+/* returned */
+PK_PART_t *const  /*part*/                /* owning part (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the part which owns the given surface, if there is one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_ask_uvbox
+(
+/* received */
+PK_SURF_t          /*surf*/,      /* a surface */
+/* returned */
+PK_UVBOX_t *const  /*uvbox*/      /* parametric bounds of the surf */
+);
+/*
+This function returns a uvbox indicating the parametric bounds of the
+given surface.  If the surface has an infinite parameter range,  then for that
+parameter, a finite range will be returned which is sufficient to contain
+that part of the surface inside the size box.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_create_blend
+(
+/* received */
+PK_GEOM_t                        /*geom1*/,       /* first underlying geometry */
+double                           /*range1*/,      /* offset from `geom1' */
+PK_GEOM_t                        /*geom2*/,       /* first underlying geometry */
+double                           /*range2*/,      /* offset from `geom2' */
+PK_VECTOR_t                      /*start*/,       /* help point for start */
+PK_VECTOR_t                      /*end*/,         /* help point for end */
+const PK_SURF_create_blend_o_t * /*options*/,
+/* returned */
+PK_SURF_t                *const  /*blend_surf*/   /* blend surface */
+);
+/*
+This function creates a surface, representing a constant radius rolling ball
+blend upon the supplied geometry
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval
+(
+/* received */
+PK_SURF_t        /*surf*/,        /* surface */
+PK_UV_t          /*uv*/,          /* u and v parameter pair */
+int              /*n_u_derivs*/,  /* number of u derivatives */
+int              /*n_v_derivs*/,  /* number of v derivatives */
+PK_LOGICAL_t     /*triangular*/,  /* triangular derivative array required */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives */
+);
+/*
+This function evaluates a point and derivatives at a parameter pair on
+the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_handed
+(
+/* received */
+PK_SURF_t        /*surf*/,        /* surface */
+PK_UV_t          /*uv*/,          /* u and v parameter pair */
+int              /*n_u_derivs*/,  /* number of u derivatives */
+int              /*n_v_derivs*/,  /* number of v derivatives */
+PK_LOGICAL_t     /*triangular*/,  /* triangular derivative array required */
+PK_HAND_t        /*u_hand_dir*/,  /* evaluate u as limit from left or right */
+PK_HAND_t        /*v_hand_dir*/,  /* evaluate v as limit from left or right */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives */
+);
+/*
+This function behaves like PK_SURF_eval, but takes additional arguments
+( u_hand_dir and v_hand_dir ) as input.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_grid
+(
+/* received */
+PK_SURF_t        /*surf*/,         /* surface */
+int              /*n_u*/,          /* number of u parameters */
+const double     /*u*/[],          /* u paramters */
+int              /*n_v*/,          /* number of v parameters */
+const double     /*v*/[],          /* v parameters */
+int              /*n_u_derivs*/,   /* number of u derivatives */
+int              /*n_v_derivs*/,   /* number of v derivatives */
+PK_LOGICAL_t     /*triangular*/,   /* triangular derivative array required */
+/* returned */
+PK_VECTOR_t      /*p*/[]           /* points */
+);
+/*
+This function evaluates points on a rectangular grid of parameters on the given
+surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_curvature
+(
+/* received */
+PK_SURF_t            /*surf*/,                   /* surface */
+PK_UV_t              /*uv*/,                     /* parametric position */
+/* returned */
+PK_VECTOR1_t *const  /*normal*/,                 /* surface normal */
+PK_VECTOR1_t *const  /*principal_direction_1*/,  /* principal direction 1 */
+PK_VECTOR1_t *const  /*principal_direction_2*/,  /* principal direction 2 */
+double       *const  /*principal_curvature_1*/,  /* principal curvature 1 */
+double       *const  /*principal_curvature_2*/   /* principal curvature 2 */
+);
+/*
+This function calculates the normal, principal directions and principal
+curvatures of a surface at a given parametric position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_curvature_handed
+(
+/* received */
+PK_SURF_t     /*surf*/,                           /* surface */
+PK_UV_t       /*uv*/,                             /* parametric position */
+PK_HAND_t     /*u_hand_dir*/,                     /* evaluate u from left or right */
+PK_HAND_t     /*v_hand_dir*/,                     /* evaluate v from left or right */
+/* returned */
+PK_VECTOR1_t *const  /*normal*/,                 /* surface normal */
+PK_VECTOR1_t *const  /*principal_direction_1*/,  /* principal direction 1 */
+PK_VECTOR1_t *const  /*principal_direction_2*/,  /* principal direction 2 */
+double       *const  /*principal_curvature_1*/,  /* principal curvature 1 */
+double       *const  /*principal_curvature_2*/   /* principal curvature 2 */
+);
+/*
+This function behaves like PK_SURF_eval_curvature but takes additional
+arguments ( u_hand_dir and v_hand_dir ) as the input.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_with_normal
+(
+/* received */
+PK_SURF_t           /*surf*/,         /* surf */
+PK_UV_t             /*uv*/,           /* surf u and v parameter pair */
+int                 /*n_u_derivs*/,   /* number of u derivatives */
+int                 /*n_v_derivs*/,   /* number of v derivatives */
+PK_LOGICAL_t        /*triangular*/,   /* triangular derivative array required */
+/* returned */
+PK_VECTOR_t         /*p*/[],      /* point and derivatives */
+PK_VECTOR_t *const  /*normal*/    /* surface normal */
+);
+/*
+This function evaluates a point, derivatives and normal at a parameter pair
+on the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_eval_with_normal_handed
+(
+/* received */
+PK_SURF_t           /*surf*/,         /* surf */
+PK_UV_t             /*uv*/,           /* surf u and v parameter pair */
+int                 /*n_u_derivs*/,   /* number of u derivatives */
+int                 /*n_v_derivs*/,   /* number of v derivatives */
+PK_LOGICAL_t        /*triangular*/,   /* triangular derivative array required */
+PK_HAND_t           /*u_hand_dir*/,   /* evaluate u as limit from left or right */
+PK_HAND_t           /*v_hand_dir*/,   /* evaluate v as limit from left or right */
+/* returned */
+PK_VECTOR_t         /*p*/[],          /* point and derivatives */
+PK_VECTOR_t *const  /*normal*/        /* surface normal */
+);
+/*
+This function behaves like PK_SURF_eval_with_normal, but takes additional
+arguments ( u_hand_dir and v_hand_dir ) as input.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_extend
+(
+/* received */
+PK_SURF_t                       /*surf*/,         /* surface */
+const PK_SURF_extend_o_t      * /*options*/,      /* options structure */
+/* returned */
+PK_SURF_extend_status_t *const  /*status*/        /* status */
+);
+/*
+This function extends a surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_intersect_curve
+(
+/* received */
+PK_SURF_t                           /*surf*/,        /* surface */
+PK_CURVE_t                          /*curve*/,       /* curve */
+PK_INTERVAL_t                       /*bounds*/,      /* interval */
+const PK_SURF_intersect_curve_o_t * /*options*/,     /* options structure */
+/* returned */
+int                         *const  /*n_vectors*/,   /* number of intersections */
+PK_VECTOR_t                **const  /*vectors*/,     /* positions of intersections */
+PK_UV_t                    **const  /*uvs*/,         /* parameters on surface */
+double                     **const  /*ts*/,          /* parameters on curve */
+PK_intersect_vector_t      **const  /*types*/        /* types of intersections */
+);
+/*
+PK_SURF_intersect_curve finds the intersections between a surface and
+a curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_intersect_surf
+(
+/* received */
+PK_SURF_t                          /*surf_1*/,        /* surface_1 */
+PK_SURF_t                          /*surf_2*/,        /* surface_2 */
+const PK_SURF_intersect_surf_o_t * /*options*/,       /* options structure */
+/* returned */
+int                        *const  /*n_vectors*/,   /* number of point intersections */
+PK_VECTOR_t               **const  /*vectors*/,     /* posns of point intersections */
+int                        *const  /*n_curves*/,    /* number of intersection curves */
+PK_CURVE_t                **const  /*curves*/,      /* intersection basis curves */
+PK_INTERVAL_t             **const  /*bounds*/,      /* bounds of curves */
+PK_intersect_curve_t      **const  /*types*/        /* types of intersections */
+);
+/*
+PK_SURF_intersect_surf finds the intersections between two surfaces.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_bsurf
+(
+/* received */
+PK_SURF_t            /*surf*/,            /* surface */
+PK_UVBOX_t           /*uvbox*/,           /* parameter bounds: required part of surf */
+PK_LOGICAL_t         /*cubic*/,           /* force cubic BCURVE */
+PK_LOGICAL_t         /*non_rational*/,    /* force non_rational BCURVE */
+double               /*tolerance*/,       /* for approximate result */
+/* returned */
+PK_BSURF_t   *const  /*b_surf*/,          /* created BSURF */
+PK_LOGICAL_t *const  /*exact*/            /* whether b_surf is exact */
+);
+/*
+This function creates a bsurf which is coincident with the given parametric
+`uvbox' of the given `surf'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_bsurf_2
+(
+/* received */
+PK_SURF_t                    /*surf*/,          /* surface */
+PK_UVBOX_t                   /*uvbox*/,         /* required parameter bounds of surf */
+PK_SURF_make_bsurf_o_t     * /*options*/,       /* options */
+/* returned */
+PK_SURF_make_bsurf_t *const  /*status*/,        /* status */
+PK_BSURF_t           *const  /*bsurf*/,         /* created BSURF */
+double               *const  /*achieved_tol*/,  /* achieved tolerance */
+PK_achieved_cont_t   *const  /*achieved_cont*/  /* achieved continuity */
+);
+/*
+This function creates a `bsurf' which is coincident with the given parametric
+`uvbox' of the given `surf'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_sheet_body
+(
+/* received */
+PK_SURF_t         /*surf*/,       /* surf */
+PK_UVBOX_t        /*uv_box*/,     /* extent of surf */
+/* returned */
+PK_BODY_t *const  /*body*/        /* sheet body returned */
+);
+/*
+This function creates a sheet body from a surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_sheet_trimmed
+(
+/* received */
+PK_SURF_t                              /*surf*/,          /* surface */
+PK_SURF_trim_data_t                    /*trim_data*/,     /* trim data */
+double                                 /*precision*/,     /* precision for each edge */
+const PK_SURF_make_sheet_trimmed_o_t * /*options*/,       /* options structure */
+/* returned */
+PK_BODY_t                      *const  /*body*/,          /* sheet body */
+PK_check_state_t               *const  /*state*/          /* state of body */
+);
+/*
+Creates a sheet body given surface and trimmed curve data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_curve_u_isoparam
+(
+/* received */
+const PK_SURF_t      /*surf*/,            /* surface */
+const double         /*param*/,           /* u parameter */
+/* returned */
+PK_CURVE_t   *const  /*curve*/            /* analytic or SP curve */
+);
+/*
+This constructs a curve which is coincident with a constant 'u' parameter
+line defined along the whole of the 'v' parameter interval of the surface.
+
+NOTE: this function is deprecated and has been superseded by
+PK_SURF_make_curve_isoparam.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_curve_v_isoparam
+(
+/* received */
+const PK_SURF_t      /*surf*/,            /* surface */
+const double         /*param*/,           /* v parameter */
+/* returned */
+PK_CURVE_t   *const  /*curve*/            /* analytic or SP curve */
+);
+/*
+This constructs a curve which is coincident with a constant 'v' parameter
+line defined along the whole of the 'u' parameter interval of the surface.
+
+NOTE: this function is deprecated and has been superseded by
+PK_SURF_make_curve_isoparam.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_curve_isoparam
+(
+/* received */
+PK_SURF_t                               /*surf*/,     /* surface */
+double                                  /*param*/,    /* parameter */
+PK_PARAM_direction_t                    /*u_or_v*/,   /* which direction */
+const PK_SURF_make_curve_isoparam_o_t * /*options*/,  /* option structure */
+/* returned */
+PK_CURVE_t                      *const  /*curve*/,    /* curve */
+PK_INTERVAL_t                   *const  /*interval*/  /* portion of curve */
+);
+/*
+This function constructs a curve as the constant parameter line of `surf'
+specified by `param' and `u_or_v'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_cus_isocline
+(
+/* received */
+PK_SURF_t              /*surf*/,             /* surf to search for isoclines */
+PK_UVBOX_t             /*uvbox*/,            /* surf parameter box */
+PK_VECTOR1_t           /*direction*/,        /* isocline direction */
+double                 /*angle*/,            /* isocline angle */
+double                 /*tolerance*/,        /* accuracy for representing curves */
+const PK_SURF_make_cus_isocline_o_t * /*options*/,
+/* returned */
+int            *const  /*n_curves*/,         /* number of isocline curves (>= 0) */
+PK_CURVE_t    **const  /*curves*/,           /* isocline curves */
+PK_INTERVAL_t **const  /*bounds*/            /* bounds of curves */
+);
+/*
+This function creates isocline curves on the given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SURF_make_curves_isocline
+(
+/* received */
+PK_SURF_t            /*surf*/,             /* surf to search for isoclines */
+PK_UVBOX_t           /*uvbox*/,            /* surf parameter box */
+PK_VECTOR1_t         /*direction*/,        /* isocline direction */
+double               /*angle*/,            /* isocline angle */
+double               /*tolerance*/,        /* accuracy for representing curves */
+/* returned */
+int          *const  /*n_curves*/,         /* number of isocline curves (>= 0) */
+PK_CURVE_t  **const  /*curves*/            /* isocline curves */
+);
+/*
+This function creates isocline curves on the given surface.
+
+NOTE: This function is obsolete and has been superseded
+by PK_SURF_make_cus_isocline
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_add_u_knot
+(
+/* received */
+PK_BSURF_t       /*bsurf*/,       /* bsurf */
+double           /*u*/            /* U split parameter */
+/* returned */
+);
+/*
+This modifies the given `bsurf' by inserting a knot at the given `u' split
+parameter.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_add_v_knot
+(
+/* received */
+PK_BSURF_t       /*bsurf*/,       /* bsurf */
+double           /*v*/            /* V split parameter */
+/* returned */
+);
+/*
+This modifies the given `bsurf' by inserting a knot at the given `v' split
+parameter.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_clamp_knots
+(
+/* received */
+PK_BSURF_t                       /*bsurf*/,        /* bsurf */
+const PK_BSURF_clamp_knots_o_t * /*options*/       /* options */
+);
+/*
+This function modifies the given `bsurf' by clamping its knotset to
+have bezier end conditions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_eval_approx
+(
+/* received */
+PK_BSURF_t       /*bsurf*/,       /* bsurf */
+PK_UV_t          /*uv*/,          /* u and v parameter pair */
+int              /*n_u_derivs*/,  /* number of u derivatives (>=0) */
+int              /*n_v_derivs*/,  /* number of v derivatives (>=0) */
+PK_LOGICAL_t     /*triangular*/,  /* triangular derivative array required */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives */
+);
+/*
+This function performs an approximate evaluation of a point and derivatives at
+a parameter pair on the given bsurf.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_find_g1_discontinuity
+(
+/* received */
+PK_BSURF_t       /*bsurf*/,        /* bsurf */
+/* returned */
+int      *const  /*n_u_discs*/,    /* number of U discontinuities */
+double  **const  /*u_discs*/,      /* surf U parameter values at */
+int      *const  /*n_v_discs*/,    /* number of V discontinuities */
+double  **const  /*v_discs*/       /* surf V parameter values at */
+);
+/*
+This function finds G1 discontinuities on a B-surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_make_bcurve_u_isoparam
+(
+/* received */
+const PK_BSURF_t       /*bsurf*/,     /* b-surface */
+const double           /*param*/,     /* u parameter */
+/* returned */
+PK_BCURVE_t    *const  /*bcurve*/     /* b-curve */
+);
+/*
+This constructs a b-curve along a constant 'u' parameter
+line using the 'v' parameter interval of the b-surface.
+
+NOTE: this function is deprecated and has been superseded by
+PK_SURF_make_curve_isoparam.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_make_bcurve_v_isoparam
+(
+/* received */
+const PK_BSURF_t       /*bsurf*/,     /* b-surface */
+const double           /*param*/,     /* v parameter */
+/* returned */
+PK_BCURVE_t    *const  /*bcurve*/     /* b-curve */
+);
+/*
+This constructs a b-curve along a constant 'v' parameter
+line using the 'u' parameter interval of the b-surface.
+
+NOTE: this function is deprecated and has been superseded by
+PK_SURF_make_curve_isoparam.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_set_approx
+(
+/* received */
+PK_BSURF_t       /*bsurf*/,       /* bsurf for which approximations is required */
+int              /*n_patches*/,   /* number of patches in approximation (>0) */
+int              /*n_derivs*/,    /* order of derivatives to be approximated */
+PK_LOGICAL_t     /*triangular*/   /* triangular derivative array required */
+);
+/*
+This function allocates the data structures required for use with the
+approximate bsurf evaluator.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_unset_approx
+(
+/* received */
+PK_BSURF_t       /*bsurf*/    /* bsurf for which approximations are to be unset */
+);
+/*
+This function unsets the data structures used by the approximate bsurf
+evaluator.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_lower_degree
+(
+/* received */
+PK_BSURF_t                        /*bsurf*/,         /* b-surf */
+PK_PARAM_direction_t              /*u_or_v*/,        /* the direction in which to */
+int                               /*decrement*/,     /* amount to reduce by */
+const PK_BSURF_lower_degree_o_t * /*options*/        /* options */
+);
+/*
+This function modifies the given `bsurf' by reducing its `u_or_v' degree
+by `decrement'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_raise_degree
+(
+/* received */
+PK_BSURF_t                        /*bsurf*/,         /* b-surf */
+PK_PARAM_direction_t              /*u_or_v*/,        /* which degree to raise */
+int                               /*increment*/,     /* how much to raise by */
+const PK_BSURF_raise_degree_o_t * /*options*/        /* options */
+);
+/*
+This function modifies the given `bsurf' by raising its `u_or_v' degree
+by `increment'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_remove_knots
+(
+/* received */
+PK_BSURF_t                         /*bsurf*/,             /* b-surface */
+PK_PARAM_direction_t               /*u_or_v*/,            /* which knot direction */
+const PK_BSURF_remove_knots_o_t  * /*options*/,           /* options */
+/* returned */
+int                        *const  /*n_knots_removed*/,   /* number of knots removed */
+double                    **const  /*knots_removed*/,     /* the knots removed */
+int                       **const  /*multiplicities*/     /* the number of times */
+);
+/*
+This function modifies the given `bsurf' by removing knots in the parameter
+direction given by `u_or_v'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_reparameterise
+(
+/* received */
+PK_BSURF_t                             /*bsurf*/,        /* bsurf to reparameterise */
+const PK_BSURF_reparameterise_o_t    * /*options*/       /* option structure */
+);
+/*
+This function performs a general U,V reparameterisation of the received
+`bsurf', including options to transpose, reverse or rescale the U,V
+directions. The `bsurf' remains geometrically unaltered.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_ask
+(
+/* received */
+PK_BSURF_t            /*bsurf*/,    /* b-surface */
+/* returned */
+PK_BSURF_sf_t *const  /*bsurf_sf*/  /* b-surface standard form */
+);
+/*
+This function returns the standard form for a b_surface
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_create
+(
+/* received */
+const PK_BSURF_sf_t * /*bsurf_sf*/,  /* b-surface standard form */
+/* returned */
+PK_BSURF_t    *const  /*bsurf*/      /* b-surface */
+);
+/*
+This function creates a b-surface from the standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_ask_knots
+(
+/* received */
+PK_BSURF_t                      /*bsurf*/,          /* Query surface */
+PK_PARAM_direction_t            /*u_or_v*/,         /* which knot vector to return */
+const PK_BSURF_ask_knots_o_t  * /*options*/,        /* Option structure */
+/* returned */
+int                    *const   /*n_knots*/,        /* number of knots */
+double                **const   /*knots*/,          /* knot values */
+int                   **const   /*multiplicities*/  /* corresponding multiplicities */
+);
+/*
+This function returns the unique knots and the multiplicities of
+a given B-surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_create_fitted
+(
+/* received */
+const PK_BSURF_create_fitted_o_t  * /*options*/,        /* options for fit */
+/* returned */
+PK_BSURF_t                  *const  /*bsurf*/,          /* fitted B-surface */
+PK_BSURF_fitted_fault_t     *const  /*fault*/           /* any faults found */
+);
+/*
+This function creates a B-surface by fitting an input surface to within
+a tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_ask_piecewise
+(
+/* received */
+PK_BSURF_t                      /*bsurf*/,    /* b-surface */
+PK_piecewise_rep_t              /*rep*/,      /* piecewise representation required */
+/* returned */
+PK_BSURF_piecewise_sf_t *const  /*bsurf_piecewise_sf*/  /* b-surface standard form */
+);
+/*
+This function returns the piecewise standard form for a b-surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_create_piecewise
+(
+/* received */
+const PK_BSURF_piecewise_sf_t * /*bsurf_piecewise_sf*/,  /* b-surface standard form */
+/* returned */
+PK_BSURF_t              *const  /*bsurf*/      /* b-surface */
+);
+/*
+This function creates a b-surface from a piecewise standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_ask_splinewise
+(
+/* received */
+PK_BSURF_t                       /*bsurf*/,               /* b-surface */
+/* returned */
+PK_BSURF_splinewise_sf_t *const  /*bsurf_splinewise_sf*/  /* b-surface standard form */
+);
+/*
+This function returns the splinewise standard form of a b-surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_create_splinewise
+(
+/* received */
+const PK_BSURF_splinewise_sf_t * /*bsurf_splinewise_sf*/,  /* bsurf standard form */
+/* returned */
+PK_BSURF_t               *const  /*bsurf*/                 /* b-surface */
+);
+/*
+This function creates a b-surface from its splinewise standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BSURF_create_constrained
+(
+/* received */
+const PK_BSURF_create_constrained_o_t  * /*options*/,     /* options */
+/* returned */
+PK_BSURF_t                       *const  /*bsurf*/,       /* constrained B-surface */
+PK_BSURF_constrained_fault_t     *const  /*fault*/        /* fault data */
+);
+/*
+This function creates a constrained B-surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PLANE_create
+(
+/* received */
+const PK_PLANE_sf_t * /*plane_sf*/,   /* standard form of a plane */
+/* returned */
+PK_PLANE_t    *const  /*plane*/       /* the plane */
+);
+/*
+This function creates a plane from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PLANE_ask
+(
+/* received */
+PK_PLANE_t            /*plane*/,      /* a plane */
+/* returned */
+PK_PLANE_sf_t *const  /*plane_sf*/    /* the standard form of the plane */
+);
+/*
+This function returns the standard form of the given plane.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CYL_create
+(
+/* received */
+const PK_CYL_sf_t * /*cylinder_sf*/,      /* standard form of a cylinder */
+/* returned */
+PK_CYL_t    *const  /*cylinder*/          /* the cylinder */
+);
+/*
+This function creates a cylinder from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CYL_ask
+(
+/* received */
+PK_CYL_t            /*cylinder*/,         /* a cylinder */
+/* returned */
+PK_CYL_sf_t *const  /*cylinder_sf*/       /* the standard form of the cylinder */
+);
+/*
+This function returns the standard form of the given cylinder.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CYL_make_solid_body
+(
+/* received */
+PK_CYL_t          /*cyl*/,        /* cylindrical surface */
+PK_INTERVAL_t     /*range*/,      /* extent of cylindrical solid along its axis */
+/* returned */
+PK_BODY_t *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid body from a cylindrical surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CONE_create
+(
+/* received */
+const PK_CONE_sf_t * /*cone_sf*/,      /* standard form of a cone */
+/* returned */
+PK_CONE_t    *const  /*cone*/          /* the cone */
+);
+/*
+This function creates a cone from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CONE_ask
+(
+/* received */
+PK_CONE_t            /*cone*/,         /* a cone */
+/* returned */
+PK_CONE_sf_t *const  /*cone_sf*/       /* the standard form of the cone */
+);
+/*
+This function returns the standard form of the given cone.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CONE_make_solid_body
+(
+/* received */
+PK_CONE_t         /*cone*/,       /* conical surface */
+PK_INTERVAL_t     /*range*/,      /* extent of conical solid along its axis */
+/* returned */
+PK_BODY_t *const  /*body*/        /* solid body returned */
+);
+/*
+This function creates a solid body from a conical surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPHERE_create
+(
+/* received */
+const PK_SPHERE_sf_t * /*sphere_sf*/,     /* sphere standard form */
+/* returned */
+PK_SPHERE_t    *const  /*sphere*/         /* sphere */
+);
+/*
+This function creates a sphere from the given standard form.  See
+documentation for PK_SPHERE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPHERE_ask
+(
+/* received */
+PK_SPHERE_t            /*sphere*/,        /* sphere */
+/* returned */
+PK_SPHERE_sf_t *const  /*sphere_sf*/      /* sphere standard form */
+);
+/*
+This function writes the standard form of a sphere at the given address.  The
+application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_SPHERE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPHERE_make_solid_body
+(
+/* received */
+PK_SPHERE_t       /*sphere*/,             /* spherical surface */
+/* returned */
+PK_BODY_t *const  /*body*/                /* body */
+);
+/*
+This function creates a solid body from a sphere.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TORUS_create
+(
+/* received */
+const PK_TORUS_sf_t * /*torus_sf*/,   /* torus standard form */
+/* returned */
+PK_TORUS_t    *const  /*torus*/       /* created torus */
+);
+/*
+This function creates a torus from the given standard form.  See
+documentation for PK_TORUS_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TORUS_ask
+(
+/* received */
+PK_TORUS_t            /*torus*/,      /* torus */
+/* returned */
+PK_TORUS_sf_t *const  /*torus_sf*/    /* torus standard form */
+);
+/*
+This function writes the standard form of a torus at the given address.  The
+application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_TORUS_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TORUS_make_solid_body
+(
+/* received */
+PK_TORUS_t        /*torus*/,          /* torus */
+/* returned */
+PK_BODY_t *const  /*body*/      /* solid body */
+);
+/*
+This function creates a solid body from a torus.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_OFFSET_create
+(
+/* received */
+const PK_OFFSET_sf_t * /*offset_sf*/,     /* offset surf standard form */
+/* returned */
+PK_OFFSET_t    *const  /*offset*/         /* offset surf */
+);
+/*
+The function creates an offset surface from the given standard form.  See
+documentation for PK_OFFSET_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_OFFSET_ask
+(
+/* received */
+PK_OFFSET_t            /*offset*/,        /* offset surface */
+/* returned */
+PK_OFFSET_sf_t *const  /*offset_sf*/      /* sf for an offset surface */
+);
+/*
+This function writes the standard form of an offset surface at the given
+address.  The application is responsible for allocating the standard form, but
+need not initialise any of the fields.  See documentation for PK_OFFSET_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SWEPT_create
+(
+/* received */
+const PK_SWEPT_sf_t * /*swept_sf*/,   /* swept surf standard form */
+/* returned */
+PK_SWEPT_t    *const  /*swept*/       /* swept surf */
+);
+/*
+This function creates a swept surface from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SWEPT_ask
+(
+/* received */
+PK_SWEPT_t            /*swept*/,      /* swept surface */
+/* returned */
+PK_SWEPT_sf_t *const  /*swept_sf*/    /* sf for a swept surface */
+);
+/*
+This function writes the standard form of a swept surface at the given address.
+The application is responsible for allocating the standard form but need not
+initialise any fields.  See documentation for PK_SWEPT_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPUN_create
+(
+/* received */
+const PK_SPUN_sf_t * /*spun_sf*/,     /* spun surf standard form */
+/* returned */
+PK_SPUN_t    *const  /*spun*/         /* spun surf */
+);
+/*
+This function creates a spun surface from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPUN_ask
+(
+/* received */
+PK_SPUN_t            /*spun*/,        /* spun surface */
+/* returned */
+PK_SPUN_sf_t *const  /*spun_sf*/      /* sf for an spun surface */
+);
+/*
+This function writes the standard form of a spun surface at the given address.
+The application is responsible for allocating the standard form but need not
+initialise any fields.  See documentation for PK_SPUN_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BLENDSF_ask
+(
+/* received */
+PK_BLENDSF_t            /*blendsf*/,       /* blendsf */
+/* returned */
+PK_BLENDSF_sf_t *const  /*blendsf_sf*/     /* standard form of blendsf */
+);
+/*
+This function returns the standard form of a rolling ball blend surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FSURF_ask
+(
+/* received */
+PK_FSURF_t            /*fsurf*/,       /* fsurf to receive message */
+/* returned */
+PK_FSURF_sf_t *const  /*fsurf_sf*/     /* standard form of fsurf */
+);
+/*
+This function returns the standard form of a foreign surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FSURF_create
+(
+/* received */
+const PK_FSURF_sf_t * /*fsurf_sf*/,       /* standard form of fsurf */
+/* returned */
+PK_FSURF_t *const     /*fsurf*/           /* created fsurf */
+);
+/*
+This function creates a foreign surface from its standard form
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_edges
+(
+/* received */
+PK_CURVE_t         /*curve*/,             /* a curve */
+/* returned */
+int        *const  /*n_edges*/,           /* number of edges (>= 0) */
+PK_EDGE_t **const  /*edges*/              /* edges (optional) */
+);
+/*
+This function returns the set of accurate edges to which the given curve is
+attached.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_edges_nmnl
+(
+/* received */
+PK_CURVE_t         /*curve*/,             /* a curve */
+/* returned */
+int        *const  /*n_edges*/,           /* number of edges (>= 0) */
+PK_EDGE_t **const  /*edges*/              /* edges (optional) */
+);
+/*
+This function returns the set of edges to which the given curve is attached,
+either as the curve of an accurate edge or as the nominal curve of a tolerant
+edge.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_fin
+(
+/* received */
+PK_CURVE_t       /*curve*/,               /* a curve */
+/* returned */
+PK_FIN_t *const  /*fin*/                  /* owning fin (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the fin to which the given curve is attached,
+if there is one, otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_parm_different
+(
+/* received */
+PK_CURVE_t           /*curve*/,        /* curve */
+/* returned */
+PK_LOGICAL_t *const  /*different*/     /* true if pk and ki parametrisations differ */
+);
+/*
+This function returns true if the curve has a different parametrisation at the
+PK than at the KI. This will be true for curves with negative internal sense,
+and for Trimmed Curves.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_part
+(
+/* received */
+PK_CURVE_t        /*curve*/,               /* a curve */
+/* returned */
+PK_PART_t *const  /*part*/                 /* owning part (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the part which owns the given curve, if there is one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_approx
+(
+/* received */
+PK_CURVE_t                       /*curve*/,           /* Original curve */
+PK_INTERVAL_t                    /*curve_interval*/,  /* interval on the curve */
+const PK_CURVE_make_approx_o_t * /*options*/,         /* options */
+/* returned */
+PK_CURVE_t               *const  /*new_curve*/,       /* new curve */
+PK_INTERVAL_t            *const  /*new_interval*/,    /* new interval */
+PK_LOGICAL_t             *const  /*exact*/            /* if returned curve is exact */
+);
+/*
+This function creates a curve which is an arc length parametrised
+approximation to a supplied curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_convert_parm_to_ki
+(
+/* received */
+PK_CURVE_t       /*curve*/,        /* curve */
+double           /*pk_t*/,         /* pk parameter on curve */
+/* returned */
+double   *const  /*ki_t*/          /* ki parameter on curve */
+);
+/*
+This function converts pk parameters on the given curve, to ki parameters. For
+certain curves these will be different, in which case parameters output by PK
+functions will need to be converted before passing to KI functions, and vice
+versa.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_convert_parm_to_pk
+(
+/* received */
+PK_CURVE_t       /*curve*/,        /* curve */
+double           /*ki_t*/,         /* ki parameter on curve */
+/* returned */
+double   *const  /*pk_t*/          /* pk parameter on curve */
+);
+/*
+This function converts ki parameters on the given curve, to pk parameters. For
+certain curves these will be different, in which case parameters output by KI
+functions will need to be converted before passing to PK functions, and vice
+versa.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_embed_in_surf
+(
+/* received */
+PK_CURVE_t            /*curve*/,         /* curve */
+PK_SURF_t             /*surf*/,          /* surface */
+/* returned */
+int           *const  /*n_spcurves*/,    /* no. spcurves returned */
+PK_SPCURVE_t **const  /*spcurves*/       /* spcurves */
+);
+/*
+This function creates one or more spcurves by embedding a given curve in the
+parameter space of a given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_embed_in_surf_2
+(
+/* received */
+PK_CURVE_t                         /*curve*/,         /* curve */
+PK_SURF_t                          /*surf*/,          /* surface */
+const PK_CURVE_embed_in_surf_o_t * /*options*/,       /* options */
+/* returned */
+int                        *const  /*n_spcurves*/,    /* no. spcurves returned */
+PK_SPCURVE_t              **const  /*spcurves*/       /* spcurves */
+);
+/*
+This function creates one or more spcurves by embedding a b-spline
+representation of a specified section of a curve in parameter space
+(or the Z=0 plane) into the parameter space of a given surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval
+(
+/* received */
+PK_CURVE_t       /*curve*/,       /* curve */
+double           /*t*/,           /* curve parameter */
+int              /*n_derivs*/,    /* number of derivatives */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives. */
+);
+/*
+This function evaluates a point and derivatives at a given parameter on the
+given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval_handed
+(
+/* received */
+PK_CURVE_t       /*curve*/,               /* curve */
+double           /*t*/,                   /* curve parameter */
+int              /*n_derivs*/,            /* number of derivatives */
+PK_HAND_t        /*hand_direction*/,      /* evaluation direction */
+/* returned */
+PK_VECTOR_t      /*p*/[]                  /* point and derivatives. */
+);
+/*
+The function behaves like PK_CURVE_eval but takes an additional argument to
+control the direction of the evaluation.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval_curvature
+(
+/* received */
+PK_CURVE_t           /*curve*/,             /* curve to receive message */
+double               /*t*/,                 /* parametric position on curve */
+/* returned */
+PK_VECTOR1_t *const  /*tangent*/,           /* tangent */
+PK_VECTOR1_t *const  /*principal_normal*/,  /* principal normal */
+PK_VECTOR1_t *const  /*binormal*/,          /* binormal */
+double       *const  /*curvature*/          /* curvature */
+);
+/*
+This function calculates the tangent, principal normal, binormal and
+curvature of a `curve' at the given parametric position.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval_curvature_handed
+(
+/* received */
+PK_CURVE_t           /*curve*/,             /* curve to receive message */
+double               /*t*/,                 /* parametric position on curve */
+PK_HAND_t            /*hand_direction*/,    /* evaluation direction */
+/* returned */
+PK_VECTOR1_t *const  /*tangent*/,           /* tangent */
+PK_VECTOR1_t *const  /*principal_normal*/,  /* principal normal */
+PK_VECTOR1_t *const  /*binormal*/,          /* binormal */
+double       *const  /*curvature*/          /* curvature */
+);
+/*
+This function behaves like PK_CURVE_eval_curvature but takes an
+additional direction argument.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval_with_tangent
+(
+/* received */
+PK_CURVE_t          /*curve*/,       /* curve */
+double              /*t*/,           /* curve parameter */
+int                 /*n_derivs*/,    /* number of derivatives */
+/* returned */
+PK_VECTOR_t         /*p*/[],         /* point and derivatives. */
+PK_VECTOR_t *const  /*tangent*/      /* curve tangent */
+);
+/*
+This function evaluates a point, derivatives and tangent at a given parameter
+on the given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_eval_with_tan_handed
+(
+/* received */
+PK_CURVE_t          /*curve*/,            /* curve */
+double              /*t*/,                /* curve parameter */
+int                 /*n_derivs*/,         /* number of derivatives */
+PK_HAND_t           /*hand_direction*/,   /* evaluation direction */
+/* returned */
+PK_VECTOR_t         /*p*/[],              /* point and derivatives. */
+PK_VECTOR_t *const  /*tangent*/           /* curve tangent */
+);
+/*
+This function behaves like PK_CURVE_eval_with_tangent but takes an additional
+direction argument.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_discontinuity
+(
+/* received */
+PK_CURVE_t                              /*curve*/,     /* Query curve */
+const PK_CURVE_find_discontinuity_o_t * /*options*/,   /* option structure */
+/* returned */
+int                             *const  /*n_params*/,  /* number of discontinuities */
+double                         **const  /*params*/,    /* parameter values of each */
+PK_continuity_t                **const  /*orders*/     /* order of the discontinuity */
+
+);
+/*
+This interface function permits a user to query any standard curve type for
+either analytic or geometric discontinuities of levels 1 through 3.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_length
+(
+/* received */
+PK_CURVE_t            /*curve*/,       /* curve to find length of */
+PK_INTERVAL_t         /*interval*/,    /* parametric interval of curve */
+/* returned */
+double        *const  /*length*/,      /* nominal arc length of curve */
+PK_INTERVAL_t *const  /*range*/        /* range bounding actual arc length */
+);
+/*
+This function evaluates the arc length of that part of the given curve
+specified by the given parametric interval.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_min_radius
+(
+/* received */
+PK_CURVE_t          /*curve*/,        /* curve */
+PK_INTERVAL_t       /*t_int*/,        /* parameter interval */
+/* returned */
+int         *const  /*n_radii*/,      /* number of radii returned */
+double      *const  /*radius*/,       /* min radius of curvature */
+PK_VECTOR_t *const  /*position*/,     /* position vector where minimum occurs */
+double      *const  /*param*/         /* parameter for curve */
+);
+/*
+This function finds the minimum radius of curvature of the given curve, its
+position and parameter. The user passes in the parameter interval required and
+the search is confined to that part of the curve lying inside it. To find the
+interval for the whole curve (if unknown) the function PK_CURVE_ask_interval
+should be used.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_non_aligned_box
+(
+/* received */
+PK_CURVE_t          /*curve*/,           /* curve */
+PK_INTERVAL_t       /*t_int*/,           /* t parameter range */
+/* returned */
+PK_VECTOR_t *const  /*centre*/,          /* box centre */
+PK_VECTOR_t         /*axes*/[3],         /* box axes */
+double              /*widths*/[3],       /* box width in each axis direction */
+int         *const  /*dimension*/        /* box dimension */
+);
+/*
+This function computes a non axis-aligned box bounding a portion of the
+given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_vectors
+(
+/* received */
+PK_CURVE_t                             /*curve*/,         /* curve */
+PK_INTERVAL_t                          /*t_int*/,         /* interval */
+double                                 /*tolerance*/,     /* tolerance */
+const PK_CURVE_find_vectors_o_t      * /*options*/,       /* options */
+/* returned */
+PK_CURVE_find_vectors_r_t      *const  /*found_vectors*/  /* result */
+);
+/*
+This function returns position vectors on the supplied curve given measurements
+in 3-space.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_vectors_r_f
+(
+/* received */
+PK_CURVE_find_vectors_r_t *const  /*found_vectors*/   /* structure to free */
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_degens_f
+(
+/* received */
+PK_CURVE_degens_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_degens
+(
+/* received */
+PK_CURVE_t                       /*curve*/,       /* curve to be checked */
+const PK_CURVE_find_degens_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_CURVE_degens_t        *const  /*results*/      /* results */
+);
+/*
+This function finds degeneracies on the given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_fix_degens_r_f
+(
+/* received */
+PK_CURVE_fix_degens_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_fix_degens
+(
+/* received */
+PK_CURVE_t                      /*curve*/,       /* curve to be fixed */
+const PK_CURVE_degens_t       * /*degens*/,      /* degeneracies */
+const PK_CURVE_fix_degens_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_CURVE_fix_degens_r_t *const  /*results*/      /* results */
+);
+/*
+This function attempts to fix degeneracies on the given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_self_ints_f
+(
+/* received */
+PK_CURVE_self_ints_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_self_int
+(
+/* received */
+PK_CURVE_t                         /*curve*/,       /* curve to be checked */
+const PK_CURVE_find_self_int_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_CURVE_self_ints_t       *const  /*results*/      /* results */
+);
+/*
+This function finds self-intersections in the given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_fix_self_int_r_f
+(
+/* received */
+PK_CURVE_fix_self_int_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_fix_self_int
+(
+/* received */
+PK_CURVE_t                        /*curve*/,       /* curve to be checked */
+const PK_CURVE_self_ints_t      * /*self_ints*/,   /* self intersections */
+const PK_CURVE_fix_self_int_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_CURVE_fix_self_int_r_t       * /*results*/      /* results */
+);
+/*
+This function attempts to fix self-intersections in the given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_surfs_common
+(
+/* received */
+PK_CURVE_t         /*curve*/,        /* curve */
+/* returned */
+int        *const  /*n_surfs*/,     /* number of common surfs */
+PK_SURF_t **const  /*surfs*/        /* common surfs */
+);
+/*
+This function finds pairs of surfaces which have the given curve in common.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_find_vector_interval
+(
+/* received */
+PK_CURVE_t            /*curve*/,      /* curve */
+PK_VECTOR_t           /*vector_1*/,   /* first position vector */
+PK_VECTOR_t           /*vector_2*/,   /* second position vector */
+/* returned */
+PK_INTERVAL_t *const  /*interval*/    /* parameter interval bounded by vectors */
+);
+/*
+This function returns the parameter interval of a curve bounded by two
+position vectors lying on the curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_intersect_curve
+(
+/* received */
+PK_CURVE_t                           /*curve_1*/,     /* first curve */
+PK_INTERVAL_t                        /*interval_1*/,  /* first interval */
+PK_CURVE_t                           /*curve_2*/,     /* second curve */
+PK_INTERVAL_t                        /*interval_2*/,  /* second interval */
+const PK_CURVE_intersect_curve_o_t * /*options*/,     /* options structure */
+/* returned */
+int                          *const  /*n_vectors*/,   /* number of intersections */
+PK_VECTOR_t                 **const  /*vectors*/,     /* positions of intersections */
+double                      **const  /*ts_1*/,        /* parameters on curve_1 */
+double                      **const  /*ts_2*/,        /* parameters on curve_2 */
+PK_intersect_vector_t       **const  /*types*/        /* types of intersections */
+);
+/*
+PK_CURVE_intersect_curve finds the intersections between specified regions of
+two curves.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_bcurve
+(
+/* received */
+PK_CURVE_t           /*curve*/,          /* curve */
+PK_INTERVAL_t        /*range*/,          /* parameter bounds: required part of curve */
+PK_LOGICAL_t         /*cubic*/,          /* force cubic BCURVE */
+PK_LOGICAL_t         /*non_rational*/,   /* force non_rational BCURVE */
+double               /*tolerance*/,      /* for approximate result */
+/* returned */
+PK_BCURVE_t  *const  /*b_curve*/,        /* created BCURVE */
+PK_LOGICAL_t *const  /*exact*/           /* whether b_curve is exact */
+);
+/*
+This function creates a bcurve which is coincident with the given parametric
+`interval' of the given `curve'.
+
+NOTE: This function is deprecated and has been superseded by
+PK_CURVE_make_bcurve_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_bcurve_2
+(
+/* received */
+PK_CURVE_t                       /*curve*/,          /* curve */
+PK_INTERVAL_t                    /*range*/,          /* curve interval */
+const PK_CURVE_make_bcurve_o_t * /*options*/,        /* option structure */
+/* returned */
+PK_CURVE_make_bcurve_t   *const  /*status*/,         /* status */
+PK_BCURVE_t              *const  /*bcurve*/,         /* created BCURVE */
+double                   *const  /*achieved_tol*/,   /* achieved tolerance */
+PK_achieved_cont_t       *const  /*achieved_cont*/   /* achieved continuity */
+);
+/*
+This function creates a B-curve which is coincident with the given parametric
+`range' of the given `curve'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_curve_reversed
+(
+/* received */
+PK_CURVE_t         /*curve*/,         /* curve */
+/* returned */
+PK_CURVE_t *const  /*reverse*/        /* reversed curve */
+);
+/*
+This function makes a new curve which is coincident with the given `curve'
+but whose parameter increases in the opposite direction along the curve.
+It does not support reversal of foreign geometry curves.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_helical_surf
+(
+/* received */
+PK_CURVE_t               /*curve*/,           /* curve */
+PK_INTERVAL_t            /*curve_interval*/,  /* curve interval */
+const PK_AXIS1_sf_t    * /*axis*/,            /* axis */
+PK_HAND_t                /*hand*/,            /* handedness */
+PK_INTERVAL_t            /*turns*/,           /* range of turns */
+double                   /*helical_pitch*/,   /* height of a single turn */
+double                   /*spiral_pitch*/,    /* increase in radius of a single turn */
+double                   /*tolerance*/,       /* used in approximations */
+/* returned */
+PK_SURF_t        *const  /*surface*/          /* created surface */
+);
+/*
+This function creates a helix, tapered helix or spiral surface by sweeping a
+part of a curve about an axis. The surface will be created as a b_surface to
+a tolerance supplied by the user.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_spcurves
+(
+/* received */
+PK_CURVE_t            /*curve*/,        /* curve */
+PK_INTERVAL_t         /*range*/,        /* parameter bounds of reqd part of curve */
+PK_SURF_t             /*surf*/,         /* surface on which curve lies */
+PK_LOGICAL_t          /*degenerate*/,   /* create degenerate spcurves */
+PK_LOGICAL_t          /*sense*/,        /* spcurves in same dirn. as `curve' */
+double                /*tolerance*/,    /* required accuracy if soln. is approx */
+/* returned */
+int           *const  /*n_spcurves*/,   /* no. spcurves produced */
+PK_SPCURVE_t **const  /*spcurves*/      /* spcurves */
+);
+/*
+This function creates an SPCURVE representation of a curve which lies,
+possibly approximately, in a surface.
+
+NOTE: This function has been superseded by PK_CURVE_make_spcurves_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_spcurves_2
+(
+/* received */
+PK_CURVE_t                         /*curve*/,        /* curve */
+PK_INTERVAL_t                      /*range*/,        /* parameter bounds of required */
+PK_SURF_t                          /*surf*/,         /* surface on which curve lies */
+double                             /*tolerance*/,    /* required accuracy if */
+const PK_CURVE_make_spcurves_o_t * /*options*/,      /* options structure */
+/* returned */
+int                        *const  /*n_spcurves*/,   /* number of SP-curves produced */
+PK_SPCURVE_t              **const  /*spcurves*/      /* SP-curves produced */
+);
+/*
+This function creates an SP-curve representation of a curve which lies,
+possibly approximately, in a surface.
+
+NOTE: This function supersedes PK_CURVE_make_spcurves.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_wire_body
+(
+/* received */
+PK_CURVE_t        /*curve*/,      /* curve */
+PK_INTERVAL_t     /*range*/,      /* extent of curve */
+/* returned */
+PK_BODY_t *const  /*body*/        /* wire body returned */
+);
+/*
+This function creates a wire body from a curve.
+
+NOTE: This function is obsolete and has been superseded by
+PK_CURVE_make_wire_body_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_wire_body_2
+(
+/* received */
+int                                   /*n_curves*/,     /* number of curves (ie, */
+const PK_CURVE_t                      /*curves*/[],     /* curves to create a wire */
+const PK_INTERVAL_t                   /*bounds*/[],     /* bounds of each curve */
+const PK_CURVE_make_wire_body_o_t   * /*options*/,      /* options structure */
+/* returned */
+PK_BODY_t                     *const  /*body*/,         /* the created wire body */
+int                           *const  /*n_new_edges*/,  /* number of new edges */
+PK_EDGE_t                    **const  /*new_edges*/,    /* new edges */
+int                          **const  /*edge_index*/    /* pos in original array */
+);
+/*
+This function creates a wire body from an array of curves and intervals. The
+curves do not need to be ordered (unless specified otherwise) or directed.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_make_surf_isocline
+(
+/* received */
+PK_CURVE_t        /*curve*/,         /* curve through which isocline surf passes */
+PK_INTERVAL_t     /*t_interval*/,    /* curve parameter range for which surf reqd */
+PK_VECTOR1_t      /*direction*/,     /* isocline direction */
+double            /*angle*/,         /* isocline angle */
+PK_HAND_t         /*which*/,         /* left or right hand isocline surf */
+PK_INTERVAL_t     /*range*/,         /* required extent of surface */
+double            /*tolerance*/,     /* tolerance for fitting surf through curve */
+/* returned */
+PK_SURF_t *const  /*surf*/           /* the isocline surface */
+);
+/*
+This function makes an isocline surface `surf' which passes through the
+given `t_interval' of the given `curve'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_output_vectors
+(
+/* received */
+PK_CURVE_t           /*curve*/,            /* curve */
+PK_INTERVAL_t        /*interval*/,         /* parametric curve bounds */
+PK_LOGICAL_t         /*want_ts*/,          /* whether curve parameters required */
+double               /*curve_chord_tol*/,  /* maximum chordal error */
+double               /*curve_chord_ang*/,  /* maximum angular error */
+double               /*curve_chord_max*/,  /* maximum step length */
+/* returned */
+int          *const  /*n_vectors*/,        /* number of position vectors */
+PK_VECTOR_t **const  /*vectors*/,          /* position vectors */
+double      **const  /*ts*/                /* corresponding curve parameters */
+);
+/*
+This function outputs position vectors along a curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_interval
+(
+/* received */
+PK_CURVE_t            /*curve*/,        /* a curve */
+/* returned */
+PK_INTERVAL_t *const  /*interval*/      /* parametric bounds of the curve */
+);
+/*
+This function returns an interval indicating the parametric bounds of the
+given curve.  If the curve is infinite, then a finite interval will be
+returned which is sufficient to contain that part of the curve inside the
+size box.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_ask_param
+(
+/* received */
+PK_CURVE_t            /*curve*/,     /* curve */
+/* returned */
+PK_PARAM_sf_t *const  /*param*/      /* standard form of parameterisation of curve */
+);
+/*
+This function returns information about the parameterisation of the
+given curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_is_isoparam
+(
+/* received */
+PK_CURVE_t                       /*curve*/,           /* curve to test */
+PK_INTERVAL_t                    /*bounds*/,          /* range to bound the curve */
+PK_SURF_t                        /*surf*/,            /* embedding surface */
+const PK_CURVE_is_isoparam_o_t * /*options*/,         /* options structure */
+/* returned */
+PK_CURVE_is_isoparam_t   *const  /*is_isoparam*/,     /* whether given curve is an */
+double                   *const  /*iso_value*/,       /* value of the constant */
+PK_PARAM_direction_t     *const  /*iso_direction*/,   /* which surface parameter */
+PK_INTERVAL_t            *const  /*param_interval*/,  /* interval in the surface's */
+PK_isoparam_alignment_t  *const  /*param_alignment*/  /* how the the surface's non- */
+);
+/*
+Tests whether a bounded curve lying within a surface is a constant-parameter
+curve (i.e., an isoparameter) for that surface.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_parameterise_vector
+(
+/* received */
+PK_CURVE_t            /*curve*/,           /* a curve */
+PK_VECTOR_t           /*position*/,        /* position on curve */
+/* returned */
+double        *const  /*t*/                /* parameter of position on curve */
+);
+/*
+Find parameter of point on curve
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_project_r_f
+(
+/* received */
+PK_CURVE_project_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_project
+(
+/* received */
+int                           /*n_curves*/,        /* number of tool curves */
+const PK_CURVE_t              /*curves*/[],        /* array of tool curves */
+const PK_INTERVAL_t           /*intervals*/[],     /* array of curve intervals */
+int                           /*n_targets*/,       /* number of target entities */
+const PK_ENTITY_t             /*targets*/[],       /* array of target entities */
+const PK_CURVE_project_o_t  * /*options*/,         /* options structure */
+/* returned */
+PK_CURVE_project_r_t  *const  /*results*/,         /* results structure */
+PK_ENTITY_track_r_t   *const  /*tracking*/         /* tracking information */
+);
+/*
+This function projects and/or imprints the supplied curves onto the
+given target entities.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_spin
+(
+/* received */
+PK_CURVE_t            /*curve*/,       /* curve to spin */
+const PK_AXIS1_sf_t * /*axis*/,        /* axis around which to spin curve */
+/* returned */
+PK_SURF_t     *const  /*surf*/         /* spun surface */
+);
+/*
+This function spins a curve to form a surface.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_spin_2
+(
+/* received */
+PK_CURVE_t                   /*curve*/,       /* curve to spin */
+const PK_AXIS1_sf_t        * /*axis*/,        /* axis around which to spin curve */
+const PK_CURVE_spin_o_t    * /*options*/,     /* options */
+/* returned */
+PK_SURF_t            *const  /*surf*/         /* spun surface */
+);
+/*
+This function spins a curve to form a surface. The function allows spinning
+of sections of axis crossing curves to produce non self intersecting subsets
+of the surface that would be generated by spinning the whole curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CURVE_sweep
+(
+/* received */
+PK_CURVE_t        /*curve*/,          /* curve to sweep */
+PK_VECTOR1_t      /*direction*/,      /* sweep direction */
+/* returned */
+PK_SURF_t *const  /*surf*/            /* swept surface */
+);
+/*
+This function sweeps a curve to form a surface.
+
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_clamp_knots
+(
+/* received */
+PK_BCURVE_t                       /*bcurve*/,        /* bcurve */
+const PK_BCURVE_clamp_knots_o_t * /*options*/        /* options */
+);
+/*
+This function modifies the given `bcurve' by clamping its knotset to
+have bezier end conditions.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_combine
+(
+/* received */
+int                 /*n_bcurves*/,    /* number of bcurves ( >=2 ) */
+const PK_BCURVE_t   /*bcurves*/[],    /* bcurves */
+/* returned */
+PK_BCURVE_t *const  /*bcurve*/        /* resulting bcurve */
+);
+/*
+This function creates a new `bcurve' by joining together a sequence of
+`bcurves'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_eval_approx
+(
+/* received */
+PK_BCURVE_t      /*bcurve*/,      /* bcurve */
+double           /*t*/,           /* bcurve parameter */
+int              /*n_derivs*/,    /* number of derivatives (>=0) */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives */
+);
+/*
+This function performs an approximate evaluation of a point and derivatives at
+a given parameter on the given bcurve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_join
+(
+/* received */
+int                        /*n_bcurves*/,       /* number of bcurves ( >=2 ) */
+const PK_BCURVE_t          /*bcurves*/[],       /* bcurves */
+const PK_BCURVE_join_o_t * /*options*/,         /* options on matching */
+/* returned */
+PK_BCURVE_t        *const  /*bcurve*/,            /* resulting bcurve */
+int                      * /*n_knot_values*/,     /* number of knot values */
+double            **const  /*knot_values*/        /* amalgamated knot values */
+);
+/*
+This function creates a new `bcurve' by joining together a sequence of
+`bcurves'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_lower_degree
+(
+/* received */
+PK_BCURVE_t                        /*bcurve*/,        /* bcurve */
+int                                /*decrement*/,     /* amount to reduce by */
+const PK_BCURVE_lower_degree_o_t * /*options*/        /* options */
+);
+/*
+This function modifies the given `bcurve' by reducing its degree by the
+specified `decrement'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_raise_degree
+(
+/* received */
+PK_BCURVE_t                        /*bcurve*/,        /* b-curve */
+int                                /*increment*/,     /* how much to raise by */
+const PK_BCURVE_raise_degree_o_t * /*options*/        /* options */
+);
+/*
+This function modifies the given `bcurve' by raising its degree by `increment'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_reparameterise
+(
+/* received */
+PK_BCURVE_t                             /*bcurve*/,     /* Query curve */
+PK_INTERVAL_t                           /*interval*/,   /* new parameter interval */
+const PK_BCURVE_reparameterise_o_t    * /*options*/     /* option structure */
+);
+/*
+This function performs a rescaling and translation of the knot vector
+of the B-curve. The curve remains geometrically unaltered.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_remove_knots
+(
+/* received */
+PK_BCURVE_t                        /*bcurve*/,            /* b-curve */
+const PK_BCURVE_remove_knots_o_t * /*options*/,           /* options */
+/* returned */
+int                        *const  /*n_knots_removed*/,   /* number of knots removed */
+double                    **const  /*knots_removed*/,     /* the knots removed */
+int                       **const  /*multiplicities*/     /* the number of times */
+);
+/*
+This function modifies the given `bcurve' by removing knots.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_set_approx
+(
+/* received */
+PK_BCURVE_t      /*bcurve*/,      /* bcurve for which approximations is required */
+int              /*n_segments*/,  /* number of segments in approximation (>0) */
+int              /*n_derivs*/     /* order of derivatives to be approximated */
+);
+/*
+This function allocates the data structures required for use with the
+approximate bcurve evaluator.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_spin
+(
+/* received */
+PK_BCURVE_t           /*bcurve*/,       /* bcurve */
+const PK_AXIS1_sf_t * /*axis*/,         /* axis around which to spin bcurve */
+double                /*angle*/,        /* angle of spin */
+/* returned */
+PK_BSURF_t    *const  /*bsurf*/         /* resulting bsurf */
+);
+/*
+This function spins a `bcurve' into a `bsurf'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_sweep
+(
+/* received */
+PK_BCURVE_t        /*bcurve*/,       /* bcurve */
+PK_VECTOR_t        /*path*/,         /* translation vector */
+/* returned */
+PK_BSURF_t *const  /*bsurf*/         /* resulting bsurf */
+);
+/*
+This function sweeps a `bcurve' into a `bsurf'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_unset_approx
+(
+/* received */
+PK_BCURVE_t      /*bcurve*/   /* bcurve for which approximations are to be unset */
+);
+/*
+This function unsets the data structures used by the approximate bcurve
+evaluator.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_extend_r_f
+(
+/* received */
+PK_BCURVE_extend_r_t *const  /*loc*/
+);
+/*
+Frees the memory associated with the PK_BCURVE_extend return structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_extend
+(
+/* received */
+PK_BCURVE_t                  /*bcurve*/,     /* bcurve to extend */
+const PK_BCURVE_extend_o_t * /*options*/,    /* options structure */
+/* returned */
+PK_BCURVE_extend_r_t *const  /*results*/     /* results */
+);
+/*
+This function extends a bcurve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_by_fitting
+(
+/* received */
+const PK_BCURVE_create_by_fitting_o_t * /*options*/,   /* options for fitting */
+/* returned */
+PK_BCURVE_t                             /*bcurves*/[], /* array of b-curves, some */
+PK_BCURVE_fit_fault_t           *const  /*fault*/      /* any faults found */
+);
+/*
+This function creates a set of bcurves by curve-fitting to within a tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_fitted
+(
+/* received */
+const PK_BCURVE_create_fitted_o_t  * /*options*/,   /* options for fit */
+/* returned */
+PK_BCURVE_t                  *const  /*bcurve*/,    /* b-curve fit to input */
+PK_BCURVE_fitted_fault_t     *const  /*fault*/      /* any faults found */
+);
+/*
+This function creates a B-curve by fitting a curve to within a tolerance.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_make_bsurf_lofted
+(
+/* received */
+int                                     /*n_bcurves*/,   /* number of bcurves */
+const PK_BCURVE_t                       /*bcurves*/[],   /* bcurves */
+const PK_BCURVE_make_bsurf_lofted_o_t * /*options*/,     /* options structure */
+/* returned */
+PK_BSURF_t                      *const  /*bsurf*/        /* lofted surface */
+);
+/*
+This function creates a bsurf by lofting through a set of bcurves.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_make_matched
+(
+/* received */
+int                                  /*n_bcurves*/,   /* number of bcurves ( >=2 ) */
+const PK_BCURVE_t                    /*bcurves*/[],   /* unmatched bcurves */
+const PK_BCURVE_make_matched_o_t   * /*options*/,     /* options on matching */
+/* returned */
+PK_BCURVE_t                          /*matched*/[]    /* b-curves output */
+);
+/*
+This function takes `bcurves' and creates a new set of curves `matched' which
+are identical in shape to the original curves, but whose knot sets are all the
+same as each other.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_add_knot
+(
+/* received */
+PK_BCURVE_t      /*bcurve*/,       /* bcurve */
+double           /*t*/             /* split parameter */
+);
+/*
+This function modifies the given `bcurve' by inserting a knot at the given
+split parameter.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_find_g1_discontinuity
+(
+/* received */
+PK_BCURVE_t      /*bcurve*/,       /* bcurve */
+/* returned */
+int      *const  /*n_discs*/,      /* number of discontinuities */
+double  **const  /*discs*/         /* curve parameter values at discontinuities */
+);
+/*
+This function finds G1 discontinuities on a B-curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_ask
+(
+/* received */
+PK_BCURVE_t            /*bcurve*/,    /* b-curve */
+/* returned */
+PK_BCURVE_sf_t *const  /*bcurve_sf*/  /* b-curve standard form */
+);
+/*
+This function returns the standard form for a b-curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create
+(
+/* received */
+const PK_BCURVE_sf_t * /*bcurve_sf*/,  /* b-curve standard form */
+/* returned */
+PK_BCURVE_t    *const  /*bcurve*/      /* b-curve */
+);
+/*
+This function creates a b-curve from the standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_ask_knots
+(
+/* received */
+PK_BCURVE_t                     /*bcurve*/,         /* b-curve to query */
+const PK_BCURVE_ask_knots_o_t * /*options*/,        /* Option structure */
+/* returned */
+int                     *const  /*n_knots*/,        /* number of knots */
+double                 **const  /*knots*/,          /* knot values */
+int                    **const  /*multiplicities*/  /* corresponding multiplicities */
+);
+/*
+This function returns the uniques knots and the multiplicities of
+a given B-curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_ask_piecewise
+(
+/* received */
+PK_BCURVE_t                      /*bcurve*/,    /* b-curve */
+PK_piecewise_rep_t               /*rep*/,       /* piecewise representation */
+/* returned */
+PK_BCURVE_piecewise_sf_t *const  /*bcurve_piecewise_sf*/
+);
+/*
+This function returns the piecewise standard form for a b-curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_piecewise
+(
+/* received */
+const PK_BCURVE_piecewise_sf_t * /*bcurve_piecewise_sf*/,
+/* returned */
+PK_BCURVE_t              *const  /*bcurve*/    /* b-curve */
+);
+/*
+This function creates a b-curve from its piecewise standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_ask_splinewise
+(
+/* received */
+PK_BCURVE_t                       /*bcurve*/,   /* b-curve */
+/* returned */
+PK_BCURVE_splinewise_sf_t *const  /*bcurve_splinewise_sf*/
+);
+/*
+This function returns the splinewise standard form of a b-curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_splinewise
+(
+/* received */
+const PK_BCURVE_splinewise_sf_t * /*bcurve_splinewise_sf*/,
+/* returned */
+PK_BCURVE_t                     *const  /*bcurve*/
+);
+/*
+This function creates a b-curve from its splinewise standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_spline
+(
+/* received */
+int                                 /*n_positions*/,      /* number of positions */
+const PK_VECTOR_t                 * /*positions*/,        /* positions to spline */
+const PK_BCURVE_create_spline_o_t * /*options*/,          /* options */
+/* returned */
+PK_BCURVE_t                 *const  /*bcurve*/,           /* B-curve */
+PK_BCURVE_spline_t          *const  /*status*/,           /* status */
+int                         *const  /*n_fault_values*/,   /* number of fault_values */
+int                        **const  /*fault_values*/      /* fault values */
+);
+/*
+This function creates a B-curve by splining through a set of positions, with
+optional parameters and derivatives.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_spline_r_f
+(
+/* received */
+PK_BCURVE_spline_r_t *const  /*result*/
+);
+/*
+This function frees the PK memory referenced by the structure.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_BCURVE_create_spline_2
+(
+/* received */
+int                                   /*n_positions*/,      /* number of positions */
+const PK_VECTOR_t                   * /*positions*/,        /* positions to spline */
+const PK_BCURVE_create_spline_2_o_t * /*options*/,          /* options */
+/* returned */
+PK_BCURVE_spline_r_t          *const  /*results*/           /* results */
+);
+/*
+This function creates one or more B-curves by splining through a set of
+positions, with optional parameters and derivatives.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LINE_create
+(
+/* received */
+const PK_LINE_sf_t * /*line_sf*/,     /* line standard form */
+/* returned */
+PK_LINE_t    *const  /*line*/         /* line */
+);
+/*
+This function creates a line from the given standard form.  See documentation
+for PK_LINE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_LINE_ask
+(
+/* received */
+PK_LINE_t            /*line*/,        /* line */
+/* returned */
+PK_LINE_sf_t *const  /*line_sf*/      /* line standard form */
+);
+/*
+This function writes the standard form of a line at the given address.  The
+application is responsible for allocating the standard form but need not
+initialise any of the fields.  See documentation for PK_LINE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CIRCLE_create
+(
+/* received */
+const PK_CIRCLE_sf_t * /*circle_sf*/,     /* circle standard form */
+/* returned */
+PK_CIRCLE_t    *const  /*circle*/         /* circle */
+);
+/*
+This function creates a circle from the given standard form.  See
+documentation for PK_CIRCLE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_CIRCLE_ask
+(
+/* received */
+PK_CIRCLE_t            /*circle*/,        /* circle */
+/* returned */
+PK_CIRCLE_sf_t *const  /*circle_sf*/      /* circle standard form */
+);
+/*
+This function writes the standard form of a circle at the given address.  The
+application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_CIRCLE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ELLIPSE_create
+(
+/* received */
+const PK_ELLIPSE_sf_t * /*ellipse_sf*/,   /* ellipse standard form */
+/* returned */
+PK_ELLIPSE_t    *const  /*ellipse*/       /* ellipse */
+);
+/*
+This function creates an ellipse from the given standard form.  See
+documentation for PK_ELLIPSE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_ELLIPSE_ask
+(
+/* received */
+PK_ELLIPSE_t            /*ellipse*/,      /* ellipse */
+/* returned */
+PK_ELLIPSE_sf_t *const  /*ellipse_sf*/    /* ellipse standard form */
+);
+/*
+This function writes the standard form of an ellipse at the given address.
+The application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_ELLIPSE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPCURVE_create
+(
+/* received */
+const PK_SPCURVE_sf_t * /*spcurve_sf*/,   /* spcurve standard form */
+/* returned */
+PK_SPCURVE_t    *const  /*spcurve*/       /* spcurve */
+);
+/*
+This function creates an spcurve from the given standard form.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPCURVE_ask
+(
+/* received */
+PK_SPCURVE_t            /*spcurve*/,      /* spcurve */
+/* returned */
+PK_SPCURVE_sf_t *const  /*spcurve_sf*/    /* sf for an spcurve */
+);
+/*
+This function writes the standard form of an `spcurve' at the given address.
+The application is responsible for allocating the standard form but need not
+initialise any fields.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_SPCURVE_eval_approx
+(
+/* received */
+PK_SPCURVE_t     /*spcurve*/,     /* spcurve */
+double           /*t*/,           /* spcurve parameter */
+int              /*n_derivs*/,    /* number of derivatives (>=0) */
+/* returned */
+PK_VECTOR_t      /*p*/[]          /* point and derivatives */
+);
+/*
+This function performs an approximate evaluation of a point and derivatives at
+a given parameter on the given spcurve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FCURVE_ask
+(
+/* received */
+PK_FCURVE_t            /*fcurve*/,       /* fcurve to receive message */
+/* returned */
+PK_FCURVE_sf_t *const  /*fcurve_sf*/     /* standard form of fcurve */
+);
+/*
+This function returns the standard form of a foreign curve.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FCURVE_create
+(
+/* received */
+const PK_FCURVE_sf_t * /*fcurve_sf*/,       /* standard form of fcurve */
+/* returned */
+PK_FCURVE_t *const     /*fcurve*/           /* created fcurve */
+);
+/*
+This function creates a foreign curve from its standard form
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_create
+(
+/* received */
+const PK_POINT_sf_t * /*point_sf*/,   /* point standard form */
+/* returned */
+PK_POINT_t    *const  /*point*/       /* created point */
+);
+/*
+This function creates a point from the given standard form.  See
+documentation for PK_POINT_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_make_minimum_body
+(
+/* received */
+PK_POINT_t        /*point*/,      /* point */
+/* returned */
+PK_BODY_t *const  /*body*/        /* created body */
+);
+/*
+This function creates a minimum body whose single vertex is located at the
+given `point'.
+
+If the `point' is an orphan, then it will be attached to the vertex of the
+minimum body, otherwise a copy of it will be attached to the vertex.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_ask
+(
+/* received */
+PK_POINT_t            /*point*/,      /* point */
+/* returned */
+PK_POINT_sf_t *const  /*point_sf*/    /* point standard form */
+);
+/*
+This function returns the standard form of the given point.
+The application is responsible for allocating the standard form, but need not
+initialise any of the fields.  See documentation for PK_POINT_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_ask_part
+(
+/* received */
+PK_POINT_t        /*point*/,             /* a point */
+/* returned */
+PK_PART_t *const  /*part*/               /* owning part (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the part which owns the given point, if there is one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_ask_vertex
+(
+/* received */
+PK_POINT_t          /*point*/,           /* a point */
+/* returned */
+PK_VERTEX_t *const  /*vertex*/           /* owning vertex (possibly PK_ENTITY_null) */
+);
+/*
+This function returns the vertex connected to the given point, if there is one,
+otherwise PK_ENTITY_null.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_POINT_make_helical_curve
+(
+/* received */
+PK_POINT_t               /*point*/,           /* point */
+const PK_AXIS1_sf_t    * /*axis*/,            /* axis */
+PK_HAND_t                /*hand*/,            /* handedness */
+PK_INTERVAL_t            /*turns*/,           /* range of turns */
+double                   /*helical_pitch*/,   /* height of a single turn */
+double                   /*spiral_pitch*/,    /* increase in radius of a single turn */
+double                   /*tolerance*/,       /* used in approximations */
+/* returned */
+PK_CURVE_t       *const  /*curve*/            /* created bcurve */
+);
+/*
+This function creates a helix, tapered helix or spiral by sweeping a point
+about an axis. The curve will be created as a b_curve to a tolerance supplied
+by the user.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_TRCURVE_ask
+(
+/* received */
+PK_TRCURVE_t            /*trcurve*/,         /* trcurve */
+/* returned */
+PK_TRCURVE_sf_t *const  /*trcurve_sf*/       /* trcurve standard form */
+);
+/*
+This function writes the standard form of a trcurve at the given address.  The
+application is responsible for allocating the standard form but need not
+initialise any of the fields.  See documentation for PK_TRCURVE_sf_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_advance_pmark
+(
+/* received */
+PK_PARTITION_t                         /*partition*/,  /* partition */
+const PK_PARTITION_advance_pmark_o_t * /*options*/,    /* advance pmark options */
+/* returned */
+PK_PMARK_t                     *const  /*pmark*/       /* partition mark */
+);
+/*
+This function advances the current partition mark in the given `partition'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_appitems
+(
+/* received */
+PK_PARTITION_t         /*partition*/,     /* a partition */
+/* returned */
+int            *const  /*n_appitems*/,    /* number of appitems (>= 0) */
+PK_APPITEM_t  **const  /*appitems*/       /* appitems (optional) */
+);
+/*
+This function returns the set of appitems in the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_assemblies
+(
+/* received */
+PK_PARTITION_t         /*partition*/,     /* a partition */
+/* returned */
+int            *const  /*n_assemblies*/,  /* number of assemblies (>= 0) */
+PK_ASSEMBLY_t **const  /*assemblies*/     /* assemblies (optional) */
+);
+/*
+This function returns the set of assemblies in the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_bodies
+(
+/* received */
+PK_PARTITION_t     /*partition*/,         /* a partition */
+/* returned */
+int        *const  /*n_bodies*/,          /* number of bodies (>= 0) */
+PK_BODY_t **const  /*bodies*/             /* bodies (optional) */
+);
+/*
+This function returns the set of bodies in the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_geoms
+(
+/* received */
+PK_PARTITION_t     /*partition*/,         /* a partition */
+/* returned */
+int        *const  /*n_geoms*/,           /* number of geoms (>= 0) */
+PK_GEOM_t **const  /*geoms*/              /* geoms (optional) */
+);
+/*
+This function returns the set of geometric entities (points, curves and
+surfaces) in the given partition which are not contained within a part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_initial_pmark
+(
+/* received */
+PK_PARTITION_t     /*partition*/,         /* partition */
+/* returned */
+PK_PMARK_t *const  /*pmark*/              /* initial partition mark */
+);
+/*
+This function returns the initial partition mark of the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_ki_lists
+(
+/* received */
+PK_PARTITION_t        /*partition*/,      /* a partition */
+/* returned */
+int           *const  /*n_lists*/,        /* number of lists (>= 0) */
+PK_KI_LIST_t **const  /*lists*/           /* lists (optional) */
+);
+/*
+This function returns the set of ki lists in the given partition, which are
+not contained within a part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_pmark
+(
+/* received */
+PK_PARTITION_t       /*partition*/,       /* partition */
+/* returned */
+PK_PMARK_t   *const  /*pmark*/,           /* current pmark */
+PK_LOGICAL_t *const  /*is_at_pmark*/      /* whether partition is at this pmark */
+);
+/*
+This function returns the current pmark of the given partition, i.e. the
+pmark most recently set or rolled to. It also returns whether the partition
+is at that pmark, or has been modified since the pmark was set or rolled to.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_pmark_size
+(
+/* received */
+PK_PARTITION_t   /*partition*/,           /* partition */
+/* returned */
+int      *const  /*n_bytes*/              /* size of pmark file */
+);
+/*
+This function returns the number of bytes of roll 'file' which would be
+passed to the Frustrum if a partition mark were to be set in the given
+partition. This is so that an application can ensure that enough space is
+available before setting the mark.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_pmarks
+(
+/* received */
+PK_PARTITION_t      /*partition*/,        /* partition */
+/* returned */
+int         *const  /*n_pmarks*/,         /* number of pmarks (>= 1) */
+PK_PMARK_t **const  /*pmarks*/            /* pmarks (optional) */
+);
+/*
+This function returns the set of pmarks in the partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_transfs
+(
+/* received */
+PK_PARTITION_t       /*partition*/,       /* a partition */
+/* returned */
+int          *const  /*n_transfs*/,       /* number of transforms (>= 0) */
+PK_TRANSF_t **const  /*transfs*/          /* transforms (optional) */
+);
+/*
+This function returns the set of transforms in the given partition, which are
+not contained within a part.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_ask_type
+(
+/* received */
+PK_PARTITION_t              /*partition*/,       /* a partition */
+/* returned */
+PK_PARTITION_type_t *const  /*partition_type*/   /* type of partition */
+);
+/*
+This function returns the type of the given `partition'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_copy
+(
+/* received */
+PK_PARTITION_t                /*partition*/,      /* partition */
+const PK_PARTITION_copy_o_t * /*options*/,        /* copy options */
+/* returned */
+PK_PARTITION_t        *const  /*partition_copy*/  /* copy of partition */
+);
+/*
+This function produces a new `partition_copy' which is a copy of the given
+`partition'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_create_empty
+(
+/* returned */
+PK_PARTITION_t *const  /*partition*/      /* new partition */
+);
+/*
+This function creates a partition. It does not make it current - the current
+partition is unchanged.
+
+The partition is created with only its initial pmark, which it is not at.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_delete
+(
+/* received */
+PK_PARTITION_t                  /*partition*/,    /* partition */
+const PK_PARTITION_delete_o_t * /*options*/       /* deletion options */
+);
+/*
+This function deletes the given `partition' and all data within it.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_find_pmark_by_id
+(
+/* received */
+PK_PARTITION_t       /*partition*/,       /* partition */
+int                  /*identifier*/,      /* identifier of pmark */
+/* returned */
+PK_PMARK_t   *const  /*pmark*/            /* pmark (may be PK_PMARK_null) */
+);
+/*
+This function searches the given `partition' for a `pmark' with the given
+`identifier'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_is
+(
+/* received */
+int                  /*may_be_partition*/,  /* a potential partition */
+/* returned */
+PK_LOGICAL_t *const  /*is_partition*/       /* whether it is a partition */
+);
+/*
+This function returns PK_LOGICAL_true if its argument is a partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_make_pmark
+(
+/* received */
+PK_PARTITION_t     /*partition*/,         /* partition */
+/* returned */
+PK_PMARK_t *const  /*pmark*/              /* partition mark */
+);
+/*
+This function creates a partition mark in the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_make_pmark_2
+(
+/* received */
+PK_PARTITION_t                      /*partition*/,
+const PK_PARTITION_make_pmark_o_t * /*options*/,
+/* returned */
+PK_PMARK_t                  *const  /*pmark*/,
+int                         *const  /*n_new*/,
+PK_ENTITY_t                **const  /*new_entities*/,
+int                         *const  /*n_mod*/,
+PK_ENTITY_t                **const  /*mod_entities*/,
+int                         *const  /*n_del*/,
+int                        **const  /*del_entities*/
+);
+/*
+This function creates a partition mark in the given partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_merge
+(
+/* received */
+int                            /*n_partitions*/,  /* number of partitions */
+const PK_PARTITION_t           /*partitions*/[],  /* partitions */
+int                            /*n_pmarks*/,      /* number of partition marks */
+const PK_PMARK_t               /*pmarks*/[],      /* partition marks */
+const PK_PARTITION_merge_o_t * /*options*/        /* merge options */
+);
+/*
+This function merges the given `partitions' by combining their model data and
+interleaving their pmark deltas into a single partition using the given
+`pmarks'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_set_current
+(
+/* received */
+PK_PARTITION_t   /*partition*/            /* partition */
+);
+/*
+This function makes the given partition the current partition.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_set_type
+(
+/* received */
+PK_PARTITION_t       /*partition*/,       /* a partition */
+PK_PARTITION_type_t  /*partition_type*/   /* type of partition */
+);
+/*
+This function sets the type of the given `partition'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive
+(
+/* received */
+const char                      * /*key*/,          /* key string */
+const PK_PARTITION_receive_o_t  * /*options*/,      /* receive options */
+/* returned */
+PK_PARTITION_t            *const  /*partition*/     /* partition */
+);
+/*
+This function receives a partition from the given 'file' key.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_b
+(
+/* received */
+PK_MEMORY_block_t                /*block*/,
+const PK_PARTITION_receive_o_t * /*options*/,      /* receive options */
+/* returned */
+PK_PARTITION_t           *const  /*partition*/     /* partition */
+);
+/*
+This function receives a partition directly from application memory.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_u
+(
+/* received */
+const PK_UCHAR_t                * /*key*/,          /* key string */
+const PK_PARTITION_receive_o_t  * /*options*/,      /* receive options */
+/* returned */
+PK_PARTITION_t            *const  /*partition*/     /* partition */
+);
+/*
+This function receives a partition from the given Unicode 'file' key.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_deltas
+(
+/* received */
+PK_PARTITION_t   /*partition*/    /* partition */
+);
+/*
+This function receives the deltas for the given `partition' from a file.
+
+NOTE: This function is obsolete and has been superseded
+by PK_PARTITION_receive_deltas_2.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_deltas_2
+(
+/* received */
+PK_PARTITION_t                          /*partition*/,    /* partition */
+const PK_PARTITION_receive_deltas_o_t * /*options*/       /* receive options */
+);
+/*
+This function receives the deltas for the given `partition' from a file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_version
+(
+/* received */
+const char                        * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a partition transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_version_b
+(
+/* received */
+PK_MEMORY_block_t                   /*block*/,
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+partition transmit data.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_receive_version_u
+(
+/* received */
+const PK_UCHAR_t                  * /*key*/,              /* key string */
+PK_transmit_format_t                /*transmit_format*/,  /* file format */
+/* returned */
+PK_SESSION_kernel_version_t *const  /*version*/           /* version */
+);
+/*
+This function returns information about the version of Parasolid used to create
+a partition transmit file.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_transmit
+(
+/* received */
+PK_PARTITION_t                    /*partition*/,    /* partition */
+const char                      * /*key*/,          /* key string */
+const PK_PARTITION_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the given `partition' to the given 'file' `key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_transmit_b
+(
+/* received */
+PK_PARTITION_t                    /*partition*/,    /* partition */
+const PK_PARTITION_transmit_o_t * /*options*/,      /* transmit options */
+/* returned */
+PK_MEMORY_block_t         *const  /*block*/,        /* XT partition */
+PK_MEMORY_block_t         *const  /*deltas*/        /* XT deltas (optional) */
+);
+/*
+This function transmits the given `partition' directly to application memory.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_transmit_u
+(
+/* received */
+PK_PARTITION_t                    /*partition*/,    /* partition */
+const PK_UCHAR_t                * /*key*/,          /* key string */
+const PK_PARTITION_transmit_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the given `partition' to the given Unicode 'file'
+`key'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_PARTITION_transmit_delta
+(
+/* received */
+PK_PARTITION_t                          /*partition*/,    /* partition */
+const PK_PARTITION_transmit_delta_o_t * /*options*/       /* transmit options */
+);
+/*
+This function transmits the deltas of the given `partition'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_APPITEM_create
+(
+/* received */
+int                  /*n_pointers*/,    /* number of application pointers */
+const PK_POINTER_t   /*pointers*/[],
+/* returned */
+PK_APPITEM_t         /*appitems*/[]
+);
+/*
+This function creates `appitems' to refer to the given `pointers'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_APPITEM_ask
+(
+/* received */
+int                  /*n_appitems*/,       /* number of appitems */
+const PK_APPITEM_t   /*appitems*/[],       /* appitems */
+/* returned */
+PK_POINTER_t         /*pointers*/[]
+);
+/*
+This function returns the `pointers' referred to by the given `appitems'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_APPITEM_is
+(
+/* received */
+int                  /*may_be_appitem*/,      /* potential appitem */
+/* returned */
+PK_LOGICAL_t *const  /*is_appitem*/
+);
+/*
+This function returns PK_LOGICAL_true if its argument is an appitem.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_APPITEM_delete
+(
+/* received */
+int                  /*n_appitems*/,    /* number of appitems */
+const PK_APPITEM_t   /*appitems*/[]     /* appitem to receive message */
+);
+/*
+This function deletes the given `appitems'.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_perpendicular
+(
+/* received */
+PK_VECTOR1_t         /*vector1*/,                /* vector(normalised) */
+PK_VECTOR_t          /*vector2*/,                /* vector */
+/* returned */
+PK_VECTOR1_t *const  /*perpendicular_vector*/    /* vector address */
+);
+/*
+This function accepts a PK_VECTOR1_t and a PK_VECTOR_t and returns a
+pointer to a PK_VECTOR1_t.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_make_view_transf
+(
+/* received */
+PK_VECTOR1_t        /*direct*/,                 /* direction(normalised) */
+/* returned */
+PK_TRANSF_t *const  /*transf*/                  /* viewing transformation */
+);
+/*
+This function accepts a PK_VECTOR1_t view direction and returns a viewing
+transform entity which incorporates this direction.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_normalise
+(
+/* received */
+PK_VECTOR_t          /*vec*/,     /* direction vector */
+/* returned */
+PK_VECTOR1_t *const  /*uvec*/     /* unit-magnitude result, or {0,0,0} */
+);
+/*
+The argument vector is normalised, unless the magnitude of the vector
+is strictly equal to 0.0 (ie, | vec | == 0.0). In the latter case the
+zero vector {0,0,0} is returned.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_transform
+(
+/* received */
+PK_VECTOR_t         /*p*/,       /* original point */
+PK_TRANSF_t         /*transf*/,  /* transformation to apply */
+/* returned */
+PK_VECTOR_t *const  /*ptrans*/   /* new position */
+);
+/*
+This function applies the given transform to the position vector and
+returns the result.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_is_equal
+(
+/* received */
+PK_VECTOR_t          /*v1*/,
+PK_VECTOR_t          /*v2*/,
+/* returned */
+PK_LOGICAL_t *const  /*is_equal*/
+);
+/*
+This function tests whether the two vectors are equal within the current
+session precision. If they are, `is_equal' is set to PK_LOGICAL_true,
+otherwise to PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_is_parallel
+(
+/* received */
+PK_VECTOR_t          /*v1*/,
+PK_VECTOR_t          /*v2*/,
+/* returned */
+PK_LOGICAL_t *const  /*is_parallel*/
+);
+/*
+This function tests whether the two vectors are parallel within the
+current session angle precision. If they are, `is_parallel' is set
+to PK_LOGICAL_true, otherwise to PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_is_zero
+(
+/* received */
+PK_VECTOR_t          /*vec*/,
+/* returned */
+PK_LOGICAL_t *const  /*is_zero*/
+);
+/*
+This function tests whether the given vector `vec' is zero within the
+current session precision. If it is, `is_zero' is set to PK_LOGICAL_true,
+otherwise to PK_LOGICAL_false.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_VECTOR_make_lsq_plane
+(
+/* received */
+int                                  /*n_positions*/,  /* number of positions */
+const PK_VECTOR_t                  * /*positions*/,    /* positions to fit to */
+const PK_VECTOR_make_lsq_plane_o_t * /*options*/,      /* options */
+/* returned */
+PK_PLANE_t                   *const  /*plane*/         /* the plane */
+);
+/*
+This function creates a plane by least-squares fitting to a set of
+position vectors.
+*/
+
+PK_linkage_m PK_ERROR_code_t PK_FUNCTION_find
+(
+/* received */
+int                          /*n_function_names*/,  /* number of names */
+const char *const            /*function_names*/[],  /* function names */
+const PK_FUNCTION_find_o_t * /*options*/,           /* option structure */
+/* returned */
+PK_FUNCTION_t                /*functions*/[]        /* functions */
+);
+/*
+This function returns the functions that have the given names.
+*/
+
+
+
+#undef PK_linkage_m
+
+
+#endif /* PARASOLID_KERNEL_H_INCLUDED */
+
+
diff --git a/contrib/Parasolid/interface_parasolid/include/parasolid_tokens.h b/contrib/Parasolid/interface_parasolid/include/parasolid_tokens.h
new file mode 100644
index 0000000..08c2f02
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/parasolid_tokens.h
@@ -0,0 +1,737 @@
+/*
+  Parasolid Tokens
+
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+
+*/
+
+#ifndef PARASOLID_TOKENS_H_INCLUDED
+#define PARASOLID_TOKENS_H_INCLUDED
+
+#define NULTAG    0 /* value for a null tag */
+
+#define KI_TRUE   1 /* KI_cod_logical value for true */
+#define KI_FALSE  0 /* KI_cod_logical value for false */
+
+#define TYEN00   1000 /* entity type <base> */
+#define TYENGE   1001 /* geometry entity */
+#define TYENTO   1002 /* topology entity */
+#define TYENAD   1003 /* assoc data entity */
+#define TYGE00   2000 /* geometry type <base> */
+#define TYGEPT   2001 /* point */
+#define TYGECU   2002 /* curve */
+#define TYGESU   2003 /* surface */
+#define TYGETF   2004 /* transform */
+#define TYPT00   2500 /* point type <base> */
+#define TYPTCA   2501 /* cartesian point */
+#define TYCU00   3000 /* curve type <base> */
+#define TYCUST   3001 /* straight */
+#define TYCUCI   3002 /* circle */
+#define TYCUEL   3003 /* ellipse */
+#define TYCUIN   3004 /* intersection-curve */
+#define TYCUPA   3005 /* parametric-curve */
+#define TYCUSP   3006 /* sp-curve */
+#define TYCUFG   3007 /* foreign curve */
+#define TYCUCP   3008 /* constant parm curve */
+#define TYCUTR   3009 /* trimmed curve */
+#define TYSU00   4000 /* surface type <base> */
+#define TYSUPL   4001 /* plane */
+#define TYSUCY   4002 /* cylinder */
+#define TYSUCO   4003 /* cone */
+#define TYSUSP   4004 /* sphere */
+#define TYSUTO   4005 /* torus */
+#define TYSUPA   4006 /* parametric-surface */
+#define TYSUBL   4007 /* blending-surface */
+#define TYSUOF   4008 /* offset-surface */
+#define TYSUSE   4009 /* swept-surface */
+#define TYSUSU   4010 /* swung-surface */
+#define TYSUFG   4011 /* foreign surface */
+#define TYBL00   4600 /* blending sub types <base> */
+#define TYBL1B   4601 /* non_overlapped */
+#define TYBL2S   4602 /* 2 overlapping same sense */
+#define TYBL2D   4603 /* 2 overlapping different sense */
+#define TYBL3S   4604 /* 3 overlapping same sense */
+#define TYBL3D   4605 /* 3 overlapping different sense */
+#define TYTO00   5000 /* topology type <base> */
+#define TYTOVX   5001 /* vertex */
+#define TYTOED   5002 /* edge */
+#define TYTOLO   5003 /* loop */
+#define TYTOFA   5004 /* face */
+#define TYTOSH   5005 /* shell */
+#define TYTOBY   5006 /* body */
+#define TYTOIN   5007 /* instance */
+#define TYTOAS   5008 /* assembly */
+#define TYTOWO   5009 /* world */
+#define TYTOFN   5010 /* fin */
+#define TYTORG   5011 /* region */
+#define TYAS00   5050 /* assembly type <base> */
+#define TYASCL   5051 /* collective assembly */
+#define TYIN00   5070 /* instance type <base> */
+#define TYINPS   5071 /* positive instance */
+#define TYAD00   6000 /* assoc data type <base> */
+#define TYADAT   6001 /* attribute */
+#define TYADLI   6002 /* list */
+#define TYADAD   6003 /* attribute definition */
+#define TYADFE   6005 /* feature */
+#define TYAT00   7000 /* attribute type <base> */
+#define TYATSY   7001 /* system attribute */
+#define TYATUS   7002 /* user attribute */
+#define TYFE00  12000 /* feature type <base> */
+#define TYFEFA  12001 /* face feature */
+#define TYFEED  12002 /* edge feature */
+#define TYFEVX  12003 /* vertex feature */
+#define TYFESU  12004 /* surface feature */
+#define TYFECU  12005 /* curve feature */
+#define TYFEPT  12006 /* point feature */
+#define TYFEMX  12007 /* mixed feature */
+#define TYFEIN  12008 /* instance feature */
+#define TYFERG  12009 /* region feature */
+#define TYSA00   8000 /* system attribute type <base> */
+#define TYSACO   8001 /* colour attribute */
+#define TYSABL   8002 /* blend attribute */
+#define TYSAHA   8003 /* hatch attribute */
+#define TYSADN   8004 /* density attribute */
+#define TYSAPL   8005 /* plines attribute */
+#define TYSAHU   8006 /* Bezier hull attribute */
+#define TYSARG   8013 /* regions attribute */
+#define TYSARF   8014 /* reflectivity attribute */
+#define TYSATR   8015 /* translucency attribute */
+#define TYSANM   8017 /* name */
+#define TYSABE   8018 /* V5 blend attribute */
+#define TYSAFG   8019 /* FG not found attribute */
+#define TYSADF   8020 /* Deleted rubber faces */
+#define TYSAPH   8021 /* Planar hatch attribute */
+#define TYSABN   8022 /* V9 blend attribute */
+#define TYSARD   8023 /* Region density */
+#define TYSAFD   8024 /* Face density */
+#define TYSAED   8025 /* Edge density */
+#define TYSAVD   8026 /* Vertex density */
+#define TYSARH   8027 /* Radial hatch attribute */
+#define TYSAUH   8028 /* Parametric hatch attribute */
+#define TYSATY   8029 /* transparency attribute */
+#define TYSAIF   8030 /* incremental facetting attribute */
+#define TYSAFV   8031 /* facet vertex data attribute */
+#define TYSAEN   8032 /* edge no merge attribute */
+#define TYSAPF   8033 /* polygonal face attribute */
+#define TYSAPE   8034 /* polygonal edge attribute */
+#define TYSAFE   8035 /* facet vertex edge data attribute */
+#define TYSAFF   8036 /* facet vertex fin data attribute */
+#define TYSAGM   8037 /* group merge attribute */
+#define TYSAUN   8038 /* Unicode name attribute */
+#define TYSAGC   8039 /* group control attribute */
+#define TYSAC2   8040 /* colour 2 attribute */
+#define TYSAT2   8041 /* translucency 2 attribute */
+#define TYSALA   8042 /* layer attribute */
+#define TYSAIV   8043 /* invisible attribute */
+#define TYSABI   8044 /* blend identification attribute */
+#define TYUA00   9000 /* user attribute type <base> */
+#define TYLI00  10000 /* list type <base> */
+#define TYLIIN  10001 /* integer list */
+#define TYLIRL  10002 /* real list */
+#define TYLITG  10003 /* tag list */
+#define TYOWNR  13000 /* pseudo-type owner <base> */
+#define RQAC00   5800 /* attribute class <base> */
+#define RQAC01   5801 /* attribute class 1 */
+#define RQAC02   5802 /* attribute class 2 */
+#define RQAC03   5803 /* attribute class 3 */
+#define RQAC04   5804 /* attribute class 4 */
+#define RQAC05   5805 /* attribute class 5 */
+#define RQAC06   5806 /* attribute class 6 */
+#define RQAC07   5807 /* attribute class 7 */
+#define RQAP00   5900 /* attribute property <base> */
+#define RQAPIN   5901 /* integer property */
+#define RQAPRL   5902 /* real property */
+#define RQAPCS   5903 /* character property */
+#define RQAPVC   5904 /* vector property */
+#define RQAPCO   5905 /* coordinate property */
+#define RQAPDR   5906 /* direction property */
+#define RQAPAX   5907 /* axis property */
+#define ENVE00   5100 /* vertex property <base> */
+#define ENVEIS   5101 /* isolated vertex */
+#define ENVESP   5102 /* spur vertex */
+#define ENVEWR   5103 /* wire vertex */
+#define ENVENO   5104 /* normal vertex */
+#define ENED00   5300 /* edge property <base> */
+#define ENEDOW   5301 /* open wire edge */
+#define ENEDON   5302 /* open normal edge */
+#define ENEDCN   5303 /* closed normal edge */
+#define ENEDCW   5304 /* closed wire edge */
+#define ENEDRN   5305 /* ring normal edge */
+#define ENEDOB   5306 /* open biwire edge */
+#define ENEDCB   5307 /* closed biwire edge */
+#define ENEDRB   5308 /* ring biwire edge */
+#define ENLO00   5400 /* loop property <base> */
+#define ENLOHO   5401 /* hole loop */
+#define ENLOPE   5402 /* peripheral loop */
+#define ENLONA   5403 /* loop not hole or peripheral */
+#define ENSH00   5500 /* shell property <base> */
+#define ENSHSO   5501 /* solid shell */
+#define ENSHVO   5502 /* void shell */
+#define ENSHSH   5503 /* sheet shell */
+#define ENSHWR   5504 /* wire shell */
+#define ENBY00   5600 /* body property <base> */
+#define ENBYSO   5601 /* solid body */
+#define ENBYSH   5602 /* sheet body */
+#define ENBYMN   5603 /* minimum body */
+#define ENBYWR   5604 /* wire body */
+#define ENBYGN   5605 /* general body */
+#define ENWR00   5620 /* wire property <base> */
+#define ENWRGN   5621 /* general wire */
+#define ENWRPA   5622 /* parametric wire */
+#define ENSE00   5640 /* sheet property <base> */
+#define ENSEGN   5641 /* general sheet */
+#define ENSEPA   5642 /* parametric sheet */
+#define ENST00   5660 /* part state <base> */
+#define ENSTST   5661 /* stored part */
+#define ENSTMD   5662 /* modified part */
+#define ENSTNW   5663 /* new part */
+#define ENSTAN   5664 /* anonymous part */
+#define ENSTUN   5665 /* unloaded part */
+#define ENCL00   5700 /* enclosure <base> */
+#define ENCLIN   5701 /* inside */
+#define ENCLOU   5702 /* outside */
+#define ENCLON   5703 /* on (the limits of) */
+#define SLIP00      0 /* interface parameter <base> */
+#define SLIPCH      1 /* argument checking */
+#define SLIPJO      2 /* journalling */
+#define SLIPBB      3 /* bulletin board */
+#define SLIPRB      5 /* rollback */
+#define SLIPBT      6 /* binary transmit/receive */
+#define SLIPLC      7 /* local checking */
+#define SLIPUF      8 /* receive user-fields */
+#define SLIPSN      9 /* binary snapshot */
+#define SLIPSI     10 /* self intersection checking */
+#define SLIPCG     11 /* obsolete */
+#define SLIPCO     12 /* continuity checking */
+#define SLIPPA     13 /* obsolete */
+#define SLIPDC     14 /* data checking */
+#define SLIPTL     15 /* tag limit */
+#define SLIPGS     16 /* create generated surfaces */
+#define SLIPRF     17 /* roll forward */
+#define SLIPGT     18 /* create generalised topology */
+#define SLMP00      0 /* modelling parameter <base> */
+#define SLMPLP      1 /* linear precision */
+#define SLMPAP      2 /* angular precision */
+#define SLAB00      0 /* reason for abort <base> */
+#define SLABUI      1 /* user interrupt */
+#define SLABRE      2 /* run-time error */
+#define SLABFE      3 /* Frustrum error */
+#define SLER00  13100 /* error enquiry <base> */
+#define SLERRO  13101 /* routine */
+#define SLEREC  13102 /* error code */
+#define SLEREX  13103 /* explanation */
+#define SLERAR  13104 /* argument */
+#define SLERAI  13105 /* array index */
+#define SLERLE  13106 /* list entry */
+#define SLERTG  13107 /* tag */
+#define SLST00  13200 /* state enquiry <base> */
+#define SLSTAR  13201 /* at rollmark */
+#define SLSTNF  13202 /* nsteps forward */
+#define SLSTNB  13203 /* nsteps back */
+#define SLSTVM  13204 /* virtual memory */
+#define SLSTFS  13205 /* free space */
+#define SLSTMT  13206 /* max tag */
+#define SLLO00  13300 /* local op. action <base> */
+#define SLLOCP  13301 /* cap */
+#define SLLOGR  13302 /* grow */
+#define SLLOGP  13303 /* grow from parent */
+#define SLLORB  13304 /* leave rubber */
+#define SLLOGS  13305 /* grow or shrink */
+#define SLLOLI  13306 /* Heal loops independently */
+#define SLLOLT  13307 /* Heal loops together */
+#define RTLO00  13400 /* local op. return <base> */
+#define RTLOOK  13401 /* body is ok */
+#define RTLONG  13402 /* body was negative */
+#define RTLOSX  13403 /* self-intersecting */
+#define SLFI00  13500 /* file enquiry <base> */
+#define SLFIVN  13501 /* modeller version */
+#define SLCP00  13600 /* control point type <base> */
+#define SLCPBS  13601 /* bspline */
+#define SLCPBZ  13602 /* bezier */
+#define SLCPSP  13603 /* spline */
+#define SLBA00  13650 /* parametric basis <base> */
+#define SLBAHE  13651 /* hermite */
+#define SLBABZ  13652 /* bezier */
+#define SLBAPY  13653 /* polynomial */
+#define SLBATA  13654 /* taylor series */
+#define SLLE00  13680 /* simplification level <base> */
+#define SLLEGL  13681 /* global simplification */
+#define SLLELO  13682 /* local simplification */
+#define SLPK00  13690 /* pick return <base> */
+#define SLPKIR  13691 /* pick along infinite ray */
+#define SLPKSR  13692 /* pick along semi infinite ray */
+#define RROP00      0 /* rendering option <base> */
+#define RROPED      1 /* render edges */
+#define RROPRH      2 /* render radial hatch */
+#define RROPPH      3 /* render planar hatch */
+#define RROPUB      4 /* render unfixed blends */
+#define RROPSI      5 /* render silhouettes */
+#define RROPIV      6 /* render invisible lines */
+#define RROPTR      7 /* render transformed entities */
+#define RROPPS      8 /* perspective view */
+#define RROPSM      9 /* distinguish smooth edges */
+#define RROPSF     11 /* surface reflectivity */
+#define RROPBK     12 /* background */
+#define RROPFC     13 /* face colour */
+#define RROPAN     15 /* anti-alias */
+#define RROPDM     18 /* depth modulation */
+#define RROPRG     19 /* regions */
+#define RROPRA     20 /* regions by attribute */
+#define RROPIS     21 /* distinguish image smoothness */
+#define RROPPA     22 /* render parametric hatch */
+#define RROPTL     23 /* render translucent faces */
+#define RROPCT     24 /* curve tolerances */
+#define RROPCV     25 /* polygon convexity */
+#define RROPFS     26 /* facet size */
+#define RROPHO     27 /* holes permitted  */
+#define RROPNF     28 /* no fitting */
+#define RROPPT     29 /* planarity tolerances */
+#define RROPST     30 /* surface tolerances */
+#define RROPVN     31 /* output vertex normals */
+#define RROPET     32 /* output edge tags */
+#define RROPIE     33 /* render internal edges */
+#define RROPIN     34 /* distinguish internal edges */
+#define RROPPC     35 /* render parametric curves */
+#define RROPVM     36 /* match facet vertices */
+#define RROPDR     37 /* render drafting lines */
+#define RROPHR     38 /* hierarchical output */
+#define RROPHN     39 /* hierarchical output no geometry */
+#define RROPFI     40 /* facet with infinite view dependency */
+#define RROPFP     41 /* facet with perspective view dependency */
+#define RROPTS     42 /* facet strips */
+#define RROPNC     43 /* render nurbs curves */
+#define RROPMF     44 /* minimum facet size */
+#define RROPPI     45 /* parameter information */
+#define RROPDS     46 /* drafting / smooth edges behaviour */
+#define RROPHP     47 /* hierarchical output parametrised */
+#define RROPVP     48 /* use viewport */
+#define RROPAS     49 /* analytic silhouettes */
+#define RROPD1     50 /* first derivatives at facet vertices */
+#define RROPD2     51 /* first and second derivatives at facet vertices */
+#define RROPIL     52 /* ignore loops */
+#define RROPSD     53 /* silhouette density */
+#define PAPR00  13700 /* parametric prop <base> */
+#define PAPRPE  13701 /* periodic */
+#define PAPRNP  13702 /* non periodic */
+#define PAPRCS  13703 /* clamped start */
+#define PAPRCE  13704 /* clamped end */
+#define PAPRTL  13705 /* clamped top left twist vec */
+#define PAPRTR  13706 /* clamped top right twist vec */
+#define PAPRBL  13707 /* clamped bottom left twist */
+#define PAPRBR  13708 /* clamped bottom right twist */
+#define PAPRDS  13709 /* degenerate start */
+#define PAPRDE  13710 /* degenerate end */
+#define PAPRAM  13711 /* amalgamate knot vectors */
+#define PAPRKT  13712 /* knot vector supplied */
+#define PAPRNS  13713 /* natural start */
+#define PAPRNE  13714 /* natural end */
+#define PAPRUP  13715 /* u-parameter */
+#define PAPRVP  13716 /* v-parameter */
+#define PAPRPU  13717 /* periodic in u */
+#define PAPRPV  13718 /* periodic in v */
+#define PAPRIS  13719 /* insert null seg in start cu */
+#define PAPRIE  13720 /* insert null seg in end cu */
+#define PAPRCU  13721 /* force cubic lofting */
+#define PAPREX  13722 /* exact representation */
+#define PAPRNB  13723 /* natural bottom */
+#define PAPRNT  13724 /* natural top */
+#define PAPRNL  13725 /* natural left */
+#define PAPRNR  13726 /* natural right */
+#define PAPRCB  13727 /* clamped bottom */
+#define PAPRCT  13728 /* clamped top */
+#define PAPRCL  13729 /* clamped left */
+#define PAPRCR  13730 /* clamped right */
+#define PAPRKU  13731 /* u knot vector supplied */
+#define PAPRKV  13732 /* v knot vector supplied */
+#define PAPRIF  13733 /* infinite */
+#define PAPRXT  13734 /* extendable */
+#define PAPRNX  13735 /* not extendable */
+#define PAPRDP  13736 /* periodic not cont. diff */
+#define PAPRCN  13737 /* continuous */
+#define PAPRDC  13738 /* discontinuous */
+#define PAPRLI  13739 /* linear */
+#define PAPRCI  13740 /* circular */
+#define PAPRDG  13741 /* degenerate */
+#define PAPRSD  13742 /* derv. start curve supplied */
+#define PAPRED  13743 /* derv. end curve supplied */
+#define PAPRSW  13744 /* degen. start curve supplied */
+#define PAPREW  13745 /* degen. end curve supplied */
+#define PAPRBC  13746 /* bounds coincident */
+#define RTST00  13800 /* return state <base> */
+#define RTSTNG  13801 /* body is inside out */
+#define RTSTCR  13802 /* data structure corrupt */
+#define RTSTMG  13803 /* missing geometry */
+#define RTSTSX  13804 /* self-intersecting topology */
+#define RTSTGX  13805 /* self-intersecting geometry */
+#define RTSTDG  13806 /* degenerate geometry */
+#define RTSTIN  13807 /* inconsistent geom & topol */
+#define RTSTIG  13808 /* invalid geometry */
+#define RTSTSZ  13809 /* size settings differ */
+#define RTSTBX  13810 /* size box violation */
+#define RTSTCF  13812 /* failure in checking attempt */
+#define RTSTWG  13813 /* withdrawn geometry types */
+#define RTSTMD  13814 /* consistency mending enacted */
+#define RTSTIO  13815 /* body was inside out */
+#define RTSTFF  13816 /* face-face inconsistency */
+#define RTSTOC  13817 /* open curve on ring edge */
+#define RTSTVC  13818 /* vertex not on curve */
+#define RTSTER  13819 /* edge reversed */
+#define RTSTSP  13820 /* SP-curves of edge not within edge tolerance */
+#define RTSTVT  13821 /* vertices touch */
+#define RTSTVS  13822 /* vertex not on surface */
+#define RTSTES  13823 /* edge not on surface */
+#define RTSTEO  13824 /* edges incorrectly ordered at vertex */
+#define RTSTMV  13825 /* missing vertex at surface singularity */
+#define RTSTLC  13826 /* loops inconsistent */
+#define RTSTGC  13827 /* geometry not G1-continuous */
+#define RTSTSH  13828 /* inconsistent shells */
+#define RTSTFC  13829 /* checker failure during face-face check */
+#define RTSTEF  13830 /* illegal edge-face intersection */
+#define RTSTEE  13831 /* illegal edge-edge intersection */
+#define RTSTFO  13832 /* faces out of order around edge */
+#define RTSTSG  13833 /* shell geometry and topology inconsistent */
+#define RTSTAC  13834 /* acorn shell clashes with another shell */
+#define RTSTRS  13835 /* regions of body are inconsistent */
+#define RTSTID  13836 /* invalid or duplicate identifiers */
+#define RTSTON  13837 /* open nominal geometry on ring edge */
+#define RTSTVN  13838 /* vertex not on nominal geometry */
+#define RTSTSN  13839 /* SP curves of edge not within tolerance of nominal geometry */
+#define RTSTRN  13840 /* nominal geometry in wrong direction for edge */
+#define RTSTAN  13841 /* attribute definition has illegal name */
+#define RTSTAS  13842 /* attribute has illegal string field */
+#define RTSTAT  13843 /* attribute is invalid */
+#define RTSTDL  13844 /* attribute has field of bad length */
+#define RTSTBU  13845 /* attribute has illegal Unicode string field */
+#define RTSTBB  13846 /* attribute has out of range byte field */
+#define RTSTEM  13847 /* attribute has empty required field */
+#define RTSTBI  13848 /* attribute has out of range integer field */
+#define RTSTNU  13849 /* attribute has non unit vector where one is required */
+#define RTSTBR  13850 /* attribute has out of range real field */
+#define RTSTSB  13851 /* attribute has out of range short field */
+#define RTSTPV  13852 /* attribute has out of range position vector */
+#define SROP00  13900 /* standard rep opt <base> */
+#define SROPCU  13901 /* output cubics */
+#define SROPNR  13902 /* output non-rationals */
+#define SROPBS  13903 /* use a B-spline sf approx */
+#define SROPCT  13904 /* supply curve tolerance */
+#define SROPCN  13905 /* loops unconfined and not continuous */
+#define SROPCY  13906 /* loops confined and not continuous */
+#define SROPCC  13907 /* loops confined, continuous, closed */
+#define SROPCP  13908 /* loops confined, continuous, closed, exactly one periphery */
+#define SROPID  13909 /* include degeneracies in trim curves */
+#define SROPED  13910 /* exclude degeneracies from trim curves */
+#define SROPNG  13911 /* output associated geometry */
+#define SROPNT  13912 /* output associated topology */
+#define SROPNE  13913 /* don't extend surface to fit SP-curves */
+#define MAOP00  14000 /* masspr option <base> */
+#define MAOPNA  14001 /* no amount properties */
+#define MAOPAM  14002 /* amount and mass */
+#define MAOPCG  14003 /* centre of gravity */
+#define MAOPIN  14004 /* moment of inertia */
+#define MAOPNP  14005 /* no periphery data */
+#define MAOPPE  14006 /* periphery required */
+#define MAOPNE  14007 /* no error estimates */
+#define MAOPEM  14008 /* modulus of errors given */
+#define MAOPEI  14009 /* error intervals given */
+#define MAOPCS  14010 /* treat entity members as complete solid */
+#define OUFO00  14100 /* output format <base> */
+#define OUFOPV  14101 /* position vector */
+#define OUFODR  14102 /* unit direction  */
+#define OUFOAX  14103 /* axis: base + direction */
+#define OUFONP  14104 /* null position */
+#define OUFOCU  14120 /* curve pointer */
+#define OUFOSU  14121 /* surface pointer */
+#define ATOP00  14200 /* attribute definition options <base> */
+#define ATOPOW  14201 /* legal owner type codes */
+#define ATOPFL  14202 /* field types */
+#define ATOPCL  14203 /* class code */
+#define MDOP00  14300 /* mending option <base> */
+#define MDOPMD  14301 /* consistency mend */
+#define MDOPRB  14302 /* rubberize stranded topology */
+#define MDOPNG  14304 /* negate inside-out bodies */
+#define BBEV00  14400 /* bulletin board event <base> */
+#define BBEVCR  14401 /* create event */
+#define BBEVDE  14402 /* delete event */
+#define BBEVCH  14403 /* change event */
+#define BBEVSP  14404 /* split event */
+#define BBEVME  14405 /* merge event */
+#define BBEVTR  14406 /* transfer event */
+#define BBEVCO  14407 /* copy event */
+#define BBEVTF  14408 /* transform event */
+#define BBEVAC  14409 /* attribute change event */
+#define BBOP00  14500 /* bulletin board option <base> */
+#define BBOPOF  14501 /* switch off */
+#define BBOPON  14502 /* switch on for tags */
+#define BBOPUF  14503 /* switch on for tags and user fields */
+#define CICL00  14610 /* curve intersect classification <base> */
+#define CICLSI  14611 /* simple intersection */
+#define CICLTG  14612 /* tangency */
+#define CICLSC  14613 /* start of coincidence */
+#define CICLEC  14614 /* end of coincidence */
+#define CLOP00  14700 /* closest approach option <base> */
+#define CLOPPT  14701 /* specify point close to solution */
+#define CLOPPR  14702 /* specify parameter estimates */
+#define CLOPUP  14703 /* specify upper distance bound */
+#define CLOPLW  14704 /* specify lower distance bound */
+#define CLOPTL  14705 /* specify distance tolerance */
+#define CLOPB1  14706 /* supply parameter box - 1st entity */
+#define CLOPB2  14707 /* supply parameter box - 2nd entity */
+#define CLOPP1  14708 /* supply parameter estimate - 1st entity */
+#define CLOPP2  14709 /* supply parameter estimate - 2nd entity */
+#define CLOPFA  14710 /* find all local minima */
+#define CFCL00  14800 /* curve face classification <base> */
+#define CFCLSI  14801 /* simple intersection */
+#define CFCLTG  14802 /* touch intersection */
+#define CFCLEF  14803 /* curve entering face */
+#define CFCLLF  14804 /* curve leaving face */
+#define CFCLEB  14805 /* curve entering boundary */
+#define CFCLLB  14806 /* curve leaving boundary */
+#define CFCLEI  14807 /* curve entering interior */
+#define CFCLLI  14808 /* curve leaving interior */
+#define CFCLTI  14809 /* tangent to inside of edge */
+#define CFCLTO  14810 /* tangent to outside of edge */
+#define CFCLUC  14811 /* unclassified */
+#define CFCLSC  14812 /* curve enters at start of coi */
+#define CFCLEC  14813 /* curve leaves at end of coi */
+#define IMOP00  14900 /* imprinting opt <base> */
+#define IMOPNT  14901 /* no imprinting on tool */
+#define IMOPOA  14902 /* imprint bounds of overlap */
+#define IMOPEF  14903 /* extend face list on target */
+#define IDOP00  15000 /* identify region option <base> */
+#define IDOPUN  15001 /* simulated unite */
+#define IDOPIN  15002 /* simulated intersect */
+#define IDOPSU  15003 /* simulated subtract */
+#define IDOPFS  15004 /* selected facesets */
+#define RTTO00  15100 /* CRTOBY returns <base> */
+#define RTTOOK  15101 /* input is ok */
+#define RTTOBB  15102 /* bad body id */
+#define RTTODE  15103 /* duplicate entry */
+#define RTTOUC  15104 /* undefined child */
+#define RTTODC  15105 /* duplicate child */
+#define RTTOWC  15106 /* wrong type of child */
+#define RTTOFC  15107 /* too few children */
+#define RTTOMC  15108 /* too many children */
+#define RTTOWP  15109 /* wrong type of parents */
+#define RTTOFP  15110 /* too few parents */
+#define RTTOMP  15111 /* too many parents */
+#define RTTODW  15112 /* disconnected wire */
+#define RTTOIL  15113 /* invalid loop */
+#define RTTOCS  15114 /* connected shells */
+#define RTTODS  15115 /* disjoint shell */
+#define RTTONM  15116 /* non-manifold vertex */
+#define BYTY00  15200 /* body types <base> */
+#define BYTYSO  15201 /* solid body */
+#define BYTYSH  15202 /* sheet body */
+#define BYTYWR  15203 /* wire body */
+#define BYTYMN  15204 /* minimal body */
+#define BYTYSS  15205 /* solid or sheet body */
+#define PADI00  15300 /* parametric discontinuties <base> */
+#define PADIG1  15301 /* G1 discontinuities */
+#define RTCL00  15400 /* closest approach return <base> */
+#define RTCLNO  15401 /* non-orthogonal to entity */
+#define RTCLPD  15402 /* positive distance from entity */
+#define RTCLND  15403 /* negative distance from entity */
+#define RTCLON  15404 /* on entity - zero distance */
+#define RTCLRS  15405 /* regional (non-unique) solution */
+#define RTCLLB  15406 /* distance less than lower bound */
+#define RTCLUB  15407 /* distance greater than upper bound */
+#define RTMD00  15500 /* mending return <base> */
+#define RTMDMS  15501 /* mend successful */
+#define RTMDMF  15502 /* mend failed */
+#define MDFA00  15600 /* mending return <base> */
+#define MDFAFE  15601 /* faulty edge */
+#define MDFANI  15602 /* non-intersecting geometry */
+#define MDFAFM  15603 /* failure during mend */
+#define MDFARF  15604 /* rubber face */
+#define MDFACS  15605 /* coincident surfaces */
+#define MDFANS  15606 /* non-intersecting surfaces */
+#define RTKN00  15700 /* knitting return <base> */
+#define RTKNOK  15701 /* knit successful */
+#define RTKNIN  15702 /* knit incomplete */
+#define CBOP00  15800 /* crbyge option <base> */
+#define CBOPUR  15801 /* U parameter range */
+#define CBOPVR  15802 /* V parameter range */
+#define BOOP00  15900 /* bopbys option <base> */
+#define BOOPIN  15901 /* intersect */
+#define BOOPSU  15902 /* subtract */
+#define BOOPUN  15903 /* unite */
+#define BOOPEF  15904 /* extend facelist */
+#define BOOPEC  15905 /* exclude boundary facesets */
+#define BOOPIC  15906 /* include boundary facesets */
+#define BOOPME  15907 /* merge */
+#define BOOPSX  15908 /* stop self-intersections */
+#define BOOPTS  15909 /* trim with sheet */
+#define BOOCSH  15910 /* none of the instanced tools clash with each other */
+#define BOOINF  15911 /* none of the instanced tools clash with outer loop of target face */
+#define BOOCLP  15912 /* list of loops on target face that need to be tested */
+#define BOOPPS  15913 /* prune solid regions of the result */
+#define BOOPPV  15914 /* prune void regions of the result */
+#define BOOPPU  15915 /* punch sheet */
+#define BLEC00  16000 /* blecre option <base> */
+#define BLECRI  16001 /* draw ribs */
+#define BLECDF  16002 /* draw/fix  */
+#define BLECPR  16003 /* propagate */
+#define BLECTL  16004 /* set tolerance */
+#define BLECLI  16005 /* linear radius variation */
+#define BLECSM  16006 /* smooth */
+#define BLECCL  16007 /* cliff_edge */
+#define BLECCR  16008 /* circular crossection */
+#define BLECCH  16009 /* linear crossection */
+#define BLECSC  16010 /* same convexity cliff overflow */
+#define BLECEC  16011 /* end of edge cliff overflows */
+#define BLECNS  16012 /* no smooth overflows */
+#define BLECNC  16013 /* no cliff edge overflows  */
+#define BLECNN  16014 /* no notch overflows */
+#define BLCC00  16050 /* blechk option <base> */
+#define BLCCSN  16051 /* ends at singularity */
+#define BLCCOT  16052 /* unsupported old type */
+#define BLCCMX  16053 /* vertex too complex */
+#define BLCCRS  16054 /* adjoining face is rubber */
+#define BLCCRE  16055 /* truncating face is rubber */
+#define BLCCTV  16056 /* illegal two edge vertex */
+#define BLCCHM  16057 /* edge unsuitable for chamfer */
+#define BLCCXT  16058 /* require extension of B-surf */
+#define BLCCIR  16059 /* inconsistent ranges */
+#define BLCCIT  16060 /* inconsistent types */
+#define BLCCAB  16061 /* adjoining edge not blended */
+#define BLCCOL  16062 /* completely overlaps edge loop */
+#define BLCCOB  16063 /* overlapping blends */
+#define BLCCOU  16064 /* overlaps unblended edge */
+#define BLCCUN  16065 /* unspecified numerical problem */
+#define BLCCUE  16066 /* unspecified problem at end */
+#define BLCCRL  16067 /* range too large */
+#define BLCCOE  16068 /* illegal overlap at end */
+#define BLCCIE  16069 /* illegal end boundary */
+#define BLCCIX  16070 /* cannot intersect chamfers */
+#define BLCCEX  16071 /* end overlaps unblended edge */
+#define BLCCOI  16072 /* illegal blend on another edge */
+#define BLCCTN  16073 /* on tangent edge */
+#define BLCCIP  16074 /* inconsistent cliffedge parameters */
+#define INOP00  16100 /* insusu option <base> */
+#define INOPBX  16101 /* Box of intersection supplied */
+#define INOPPF  16102 /* Parameter box of intersection supplied for surface/face 1 */
+#define INOPPS  16103 /* Box of intersection supplied for surface/face 2 */
+#define INOPSI  16104 /* Return all intersections through given point */
+#define INOPBP  16105 /* Return single intersection between given 2 points */
+#define CROP00  16200 /* crrvsu option <base> */
+#define CROPPR  16201 /* supply parameter range */
+#define CROPSI  16202 /* Simplify surface */
+#define SICL00  14650 /* surface intersect classification <base> */
+#define SICLSI  14651 /* simple intersection */
+#define SICLTG  14652 /* tangency */
+#define SICLBC  14653 /* boundary of region of coincidence */
+#define TSOP00  16300 /* trimmed surface check option <base> */
+#define TSOPWR  16301 /* check for wire topology */
+#define TSOPSX  16302 /* check for self-intersections */
+#define TSOPLC  16303 /* check loops for consistency */
+#define RTTS00  16400 /* trimmed surface state code <base> */
+#define RTTSOK  16401 /* all checks successful */
+#define RTTSFR  16402 /* redundant face with respect to tolerances */
+#define RTTSCI  16403 /* loops of curves inconsistent directions */
+#define RTTSSX  16404 /* edges intersect at position other than vertex */
+#define RTTSLI  16405 /* invalid loop combination for surface type */
+#define RTTSEO  16406 /* edges incorrectly ordered at vertex */
+#define IDTY00  16500 /* common connection type <base> */
+#define IDTYCS  16501 /* common curves of surfaces */
+#define IDTYSC  16502 /* common surfaces of curve */
+#define IDTYEF  16503 /* common edges of faces */
+#define CHOP00  16600 /* chcken option <base> */
+#define CHOPCR  16601 /* check for corrupt datastructure */
+#define CHOPIG  16602 /* check for invalid or self-intersecting geometry */
+#define CHOPED  16603 /* check for inconsistencies in edges */
+#define CHOPFA  16604 /* check for inconsistencies in faces */
+#define CHOPSX  16605 /* check for self-intersecting faces */
+#define CHOPLC  16606 /* check for loop consistency of faces */
+#define CHOPBX  16607 /* check for size-box violations */
+#define CHOPFF  16608 /* check for face-face inconsistencies */
+#define CHOPSH  16609 /* check for inside-out or inconsistent shells */
+#define CHOPPV  16610 /* force self-intersection tests on Pre-V5 b-geometry */
+#define CHOPNO  16611 /* no options, force all appropriate checks to the geometry */
+#define SLTR00  16700 /* trimsh option <base> */
+#define SLTRKE  16701 /* select regions to remain on the sheet */
+#define SLTRRE  16702 /* select regions to be deleted from the sheet */
+#define SLTRTL  16703 /* enable closing of loop gaps to optional tolerance */
+#define SHOP00  16800 /* sharen option <base> */
+#define SHOPIC  16801 /* only process local intersection curve relationships */
+#define LOCH00  16900 /* local checking level <base> */
+#define LOCHNC  16901 /* no local checking */
+#define LOCHFA  16902 /* local face checking only */
+#define LOCHFC  16903 /* full local checking including face-face checking */
+#define RTOF00  17000 /* offset operations return <base> */
+#define RTOFOK  17001 /* body is ok */
+#define RTOFSO  17002 /* surface failed to offset */
+#define RTOFVM  17003 /* failed to find geometry for new vertex */
+#define RTOFEM  17004 /* failed to find geometry for new edge */
+#define RTOFTL  17005 /* supplied edge tolerance too large */
+#define RTOFVT  17009 /* edge should have disappeared */
+#define RTOFNG  17013 /* offset body was negative */
+#define RTOFFA  17014 /* face checking failed */
+#define RTOFSX  17015 /* self-intersecting, face-face checking failed */
+#define RTOFED  17016 /* edge degenerates */
+#define RTOFSS  17017 /* failed to find side surface */
+#define RTOFSC  17018 /* failed to find side curve */
+#define PFOP00  17100 /* enpifa option <base> */
+#define PFOPLO  17101 /* only consider specified loops */
+#define RTTL00  17200 /* retlen status <base> */
+#define RTTLOK  17201 /* replace tolerance successful */
+#define RTTLNT  17202 /* tolerance not altered at near tangency */
+#define RTTLMG  17203 /* could not replace tol due to missing geometry */
+#define RTTLRF  17204 /* tolerance replacement by re-intersection failed */
+#define TRSH00  17300 /* trshcu option <base> */
+#define TRSHPD  17301 /* project curves in given direction */
+#define TRSHTR  17302 /* trim as well as imprint */
+#define TRSHLC  17303 /* keep region to left of first curve */
+#define TRSHRC  17304 /* keep region to right of first curve */
+#define TRSHIL  17305 /* keep region inside closed loop */
+#define TRSHOL  17306 /* keep region outside closed loop */
+#define FXFT00  17400 /* blefxf option <base> */
+#define FXFTNT  17401 /* do not trim blend */
+#define FXFTTB  17402 /* trim blend to walls */
+#define FXFTTW  17403 /* trim blend and walls */
+#define FXFTAT  17404 /* trim blend and walls and attach blend */
+#define FXFTCB  17405 /* constant radius rolling ball blend */
+#define FXFTVB  17406 /* variable radius rolling ball blend */
+#define FXFTHL  17407 /* blend constrained by tangent hold lines  */
+#define FXFTCE  17408 /* blend constrained by cliffedges  */
+#define FXFTHP  17409 /* help point provided for blend */
+#define FXFTLP  17410 /* limit point provided for blend */
+#define FXFTPR  17411 /* blend may propagate outside walls */
+#define FXFTMS  17412 /* create multiple blends if possible */
+#define FXFTTL  17413 /* tolerance associated with blend */
+#define FXFTRC  17414 /* get rho values from law curve */
+#define FXFTEO  17415 /* allow notching */
+#define FXFTCL  17416 /* blend constrained by conic hold lines */
+#define FXFTSO  17417 /* create solid body if possible */
+#define FXFTCC  17418 /* blend curvature continuous at hold lines */
+#define FXFTDB  17419 /* disc blend */
+#define FXFTST  17420 /* short trim blend to walls */
+#define FXFTLT  17421 /* long trim blend to walls */
+#define FXFE00  17450 /* blefxf error <base> */
+#define FXFEOK  17451 /* face face blend succeeded */
+#define FXFEST  17452 /* failed to attach blend */
+#define FXFEER  17453 /* failed to create blend */
+#define FXFEID  17454 /* insufficient data to create blend */
+#define FXFEXD  17455 /* inconsistent blend data */
+#define FXFEIF  17456 /* invalid side wall */
+#define FXFEIR  17457 /* invalid blend radius definition */
+#define FXFEIH  17458 /* invalid tangent hold line data */
+#define FXFEIC  17459 /* invalid cliffedge data */
+#define FXFEFC  17460 /* face too tightly curved */
+#define FXFERS  17461 /* blend radius is too small */
+#define FXFERL  17462 /* blend radius is too large */
+#define FXFELN  17463 /* left wall normal is wrong */
+#define FXFERN  17464 /* right wall normal is wrong */
+#define FXFEBN  17465 /* both wall normals are wrong */
+#define FXFESC  17466 /* blend sheets intersect */
+#define FXFEWC  17467 /* walls clash */
+#define FXFEGX  17468 /* blend face has self-intersecting geometry */
+#define FXFEFF  17469 /* blend has resulted in face-face inconsistency */
+#define FXFERV  17470 /* invalid rho values in law curve */
+#define FXFEAR  17471 /* ranges too asymmetric for geometry */
+#define FXFECL  17472 /* invalid conic hold line data */
+#define FXFEIS  17473 /* invalid spine data */
+
+#endif /* PARASOLID_TOKENS_H_INCLUDED */
+
diff --git a/contrib/Parasolid/interface_parasolid/include/parasolid_typedefs.h b/contrib/Parasolid/interface_parasolid/include/parasolid_typedefs.h
new file mode 100644
index 0000000..5a7f57a
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/include/parasolid_typedefs.h
@@ -0,0 +1,181 @@
+/*
+  Parasolid Typedefs
+
+  Copyright 2013 Siemens Product Lifecycle Management Software Inc. All rights reserved.
+  This software and related documentation are proprietary to 
+  Siemens Product Lifecycle Management Software Inc.
+
+*/
+
+#ifndef PARASOLID_TYPEDEFS_H_INCLUDED
+#define PARASOLID_TYPEDEFS_H_INCLUDED
+
+typedef int
+
+    KI_cod_error,
+    KI_cod_logical,
+
+    KI_cod_ty,
+    KI_cod_tyen,
+    KI_cod_tyge,
+    KI_cod_typt,
+    KI_cod_tycu,
+    KI_cod_tysu,
+    KI_cod_tybl,
+    KI_cod_tyto,
+    KI_cod_tyas,
+    KI_cod_tyin,
+    KI_cod_tyad,
+    KI_cod_tyat,
+    KI_cod_tyfe,
+    KI_cod_tysa,
+    KI_cod_tyua,
+    KI_cod_tyli,
+    KI_cod_rq,
+    KI_cod_rqac,
+    KI_cod_rqap,
+    KI_cod_en,
+    KI_cod_enve,
+    KI_cod_ened,
+    KI_cod_enlo,
+    KI_cod_ensh,
+    KI_cod_enby,
+    KI_cod_enwr,
+    KI_cod_ense,
+    KI_cod_enst,
+    KI_cod_encl,
+    KI_cod_slip,
+    KI_cod_slmp,
+    KI_cod_slab,
+    KI_cod_sler,
+    KI_cod_slst,
+    KI_cod_sllo,
+    KI_cod_rtlo,
+    KI_cod_slfi,
+    KI_cod_slcp,
+    KI_cod_slba,
+    KI_cod_slle,
+    KI_cod_slpk,
+    KI_cod_rrop,
+    KI_cod_papr,
+    KI_cod_rtst,
+    KI_cod_srop,
+    KI_cod_maop,
+    KI_cod_oufo,
+    KI_cod_atop,
+    KI_cod_mdop,
+    KI_cod_bbev,
+    KI_cod_bbop,
+    KI_cod_cicl,
+    KI_cod_clop,
+    KI_cod_cfcl,
+    KI_cod_imop,
+    KI_cod_idop,
+    KI_cod_rtto,
+    KI_cod_byty,
+    KI_cod_padi,
+    KI_cod_rtcl,
+    KI_cod_rtmd,
+    KI_cod_mdfa,
+    KI_cod_rtkn,
+    KI_cod_cbop,
+    KI_cod_boop,
+    KI_cod_blec,
+    KI_cod_blcc,
+    KI_cod_inop,
+    KI_cod_crop,
+    KI_cod_sicl,
+    KI_cod_tsop,
+    KI_cod_rtts,
+    KI_cod_idty,
+    KI_cod_chop,
+    KI_cod_sltr,
+    KI_cod_shop,
+    KI_cod_loch,
+    KI_cod_rtof,
+    KI_cod_pfop,
+    KI_cod_rttl,
+    KI_cod_trsh,
+    KI_cod_fxft,
+    KI_cod_fxfe,
+    KI_cod;
+
+typedef char
+
+    KI_chr_key,
+    KI_chr_name,
+    KI_chr_filename,
+    KI_chr_string,
+    KI_chr;
+
+typedef double
+
+    KI_dbl_angle,
+    KI_dbl_box,
+    KI_dbl_coefficients,
+    KI_dbl_curvature,
+    KI_dbl_distance,
+    KI_dbl_knots,
+    KI_dbl_parameter,
+    KI_dbl_radius,
+    KI_dbl_sc_fact,
+    KI_dbl_tensor,
+    KI_dbl_transf_mx,
+    KI_dbl_view_mx,
+    KI_dbl;
+
+typedef int
+
+    KI_int_bbitem,
+    KI_int_dimension,
+    KI_int_id,
+    KI_int_index,
+    KI_int_nchars,
+    KI_int_nitems,
+    KI_int_order,
+    KI_int_ufdval,
+    KI_int;
+
+typedef int
+
+    KI_tag_assembly,             KI_tag_list_assembly,
+    KI_tag_attribute,            KI_tag_list_attribute,
+    KI_tag_attrib_def,           KI_tag_list_attrib_def,
+    KI_tag_b_curve,              KI_tag_list_b_curve,
+    KI_tag_b_surface,            KI_tag_list_b_surface,
+    KI_tag_body,                 KI_tag_list_body,
+    KI_tag_curve,                KI_tag_list_curve,
+    KI_tag_edge,                 KI_tag_list_edge,
+    KI_tag_entity,               KI_tag_list_entity,
+    KI_tag_face,                 KI_tag_list_face,
+    KI_tag_feature,              KI_tag_list_feature,
+    KI_tag_geometry,             KI_tag_list_geometry,
+    KI_tag_instance,             KI_tag_list_instance,
+    KI_tag_list,                 KI_tag_list_list,
+    KI_tag_loop,                 KI_tag_list_loop,
+    KI_tag_paracurve,            KI_tag_list_paracurve,
+    KI_tag_parasurf,             KI_tag_list_parasurf,
+    KI_tag_part,                 KI_tag_list_part,
+    KI_tag_point,                KI_tag_list_point,
+    KI_tag_shell,                KI_tag_list_shell,
+    KI_tag_sp_curve,             KI_tag_list_sp_curve,
+    KI_tag_surface,              KI_tag_list_surface,
+    KI_tag_topology,             KI_tag_list_topology,
+    KI_tag_transform,            KI_tag_list_transform,
+    KI_tag_vertex,               KI_tag_list_vertex,
+    KI_tag_list_int,             KI_tag_list_dbl,
+    KI_tag,                      KI_tag_list_tag;
+
+typedef double KI_vector[3];
+typedef KI_vector
+
+    KI_vec_axis,
+    KI_vec_direction,
+    KI_vec_normal,
+    KI_vec_displacement,
+    KI_vec_position,
+    KI_vec_derivatives,
+    KI_vec_centre,
+    KI_vec;
+
+#endif /* PARASOLID_TYPEDEFS_H_INCLUDED */
diff --git a/contrib/Parasolid/interface_parasolid/main.c b/contrib/Parasolid/interface_parasolid/main.c
new file mode 100644
index 0000000..f279b27
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/main.c
@@ -0,0 +1,386 @@
+#include <stdio.h>
+#include "parasolid_kernel.h"
+#include "kernel_interface.h"
+#include "string.h"
+
+#include <stdlib.h>
+
+#include <iostream>
+
+#include <vector>
+
+#include "ParasolidDataBase.h"
+#include "ParasolidGModelBuilder.h"
+
+#include "callbacks.h"
+
+using namespace std;
+
+
+int main(int argc, char *argv[]){
+  string inputfilename;
+  if (argc<=2){
+    // WARNING: extension should be xmt_txt on unix, x_t on ntfs stuff ?!?
+    cout << "usage: ./testPS filename(without extension)  dim_mesh  mesh_size" << endl;
+    return 1;
+  }
+
+  inputfilename.assign(argv[1]);
+  int dim_mesh = atoi(argv[2]);
+
+  constant_meshsize_data::set_mesh_size((double)(atof(argv[3])));
+
+
+  // TODO: this needs to be done automatically...
+  string schemapath("/home/bernard/devel/gmsh/contrib/Parasolid/interface_parasolid/schema");
+  string filepath("/home/bernard/devel/gmsh/contrib/Parasolid/interface_parasolid/");
+
+
+  // ------------------------------ READING FILE, STORING PK INFO
+  ParasolidDataBase db(schemapath);
+
+  // error tags for reading:
+  // KO, error 970 (schemas) :
+  // KO, error 58 (Key not found)
+  
+
+  //  // creating simple bodies and saving to files
+  //  db.erase_all_parts();
+  //  db.createCylinder();
+  //  db.transmit("Cylinder");
+  //  db.erase_all_parts();
+  //  db.createBlock();
+  //  db.transmit("Block");
+  //  db.erase_all_parts();
+  //  db.createSphere();
+  //  db.transmit("Sphere");
+  //  db.erase_all_parts();
+  //  db.createCone();
+  //  db.transmit("Cone");
+  //  db.erase_all_parts();
+  //  db.createTorus();
+  //  db.transmit("Torus");
+  //  db.erase_all_parts();
+  // return;
+  //  //end simple bodies
+
+
+  db.readFile(filepath,inputfilename.c_str());
+
+  // ------------------------------ CREATING GMODEL
+  ParasolidGModelBuilder mb(&db);
+  mb.buildGModel();
+
+
+  // to do a more or less exhaustive test of all entities callbacks before calling gmsh for meshing
+  //mb.test();
+
+
+  // possible to set compound stuff:
+  //mb.set_alternative_tag(171,123456);
+  //mb.set_alternative_tag(181,123456);
+
+
+  // possible size fields:
+  //mb.setMeshSizeFields();
+
+
+  // ------------------------------ MESHING
+  if (dim_mesh)
+    mb.mesh(dim_mesh);
+
+
+  cout << "main: done :) " << endl;
+
+  return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+// *********************************************
+//             TESTING MESHING  
+// *********************************************
+
+// ----------- OK (= no error and mesh looks ok) ---------------
+//  db.readFile(filepath,"Work-piece");
+//  db.readFile(filepath,"instance_sheet_body");
+//  db.readFile(filepath,"instance_prism_tool");
+//  db.readFile(filepath,"instance_multi_level");
+//  db.readFile(filepath,"instance_h_shape");
+//  db.readFile(filepath,"instance_cuboid_tool");
+//  db.readFile(filepath,"instance_cuboid_tool2");
+//  db.readFile(filepath,"instance_block");
+//  db.readFile(filepath,"instance_block_tool");
+//  db.readFile(filepath,"3D\ solid-Z-Y\ plane");
+//  db.readFile(filepath,"3D\ solid-X-Y\ plane");
+//  db.readFile(filepath,"blend3");
+//  db.readFile(filepath,"bsurf");
+//  db.readFile(filepath,"Cutting-punch");
+//  db.readFile(filepath,"Cutting-punch2");
+//  db.readFile(filepath,"B2");
+//  db.readFile(filepath,"B1");
+//  db.readFile(filepath,"Work-piece");
+//  db.readFile(filepath,"instance_block_inscribed");
+//  db.readFile(filepath,"B3");
+
+
+
+
+// -------------------------------------------------------------
+// OK since fin direction in edge_reparamOnFace bug fixed :
+// -------------------------------------------------------------
+//    IN 2D  IN 2D  IN 2D  IN 2D  IN 2D db.readFile(filepath,"twoplates"); IN 2D  IN 2D  IN 2D  IN 2D 
+
+// -------------------------------------------------------------
+// OK since edge/curve direction issue fixed in edge_reparamOnFace :
+// -------------------------------------------------------------
+//Error   : Unable to recover an edge 5.85167e-11 0.01 && 2.92584e-11 0.01 (28/31)
+//Warning : :-( There are 2 intersections in the 1D mesh (curves 30 36)
+//Warning : 8-| Gmsh splits those edges and tries again
+//Info    : 0 points 0 edges and 0 faces in the initial mesh
+//Error   : No tetrahedra in region 18 0
+//    db.readFile(filepath,"B4");
+//    db.readFile(filepath,"blend1");  // SAUF LE CYLINDER !!!
+//    db.readFile(filepath,"blend2");  /// SAUF LE CYLINDER !!!
+
+//Error   : Unable to recover an edge 1.69735 1.20627 && 0.102338 1.20627 (0/16)
+//Error   : Unable to recover an edge -0.497351 1.00127 && -0.497351 0.505433 (0/5)
+//Error   : Unable to recover an edge -0.497351 1.10627 && -0.497351 -0.393734 (15/15)
+//    db.readFile(filepath,"test-sim-Erwan-Combine");
+//                          AVEC *size = 0.02;, c'est un peu cossu :)
+
+// -------------------------------------------------------------
+// OK since periodic issue fixed :
+// -------------------------------------------------------------
+
+//Warning : :-( There are 4 intersections in the 1D mesh (curves 25 32 25 46)
+//Warning : 8-| Gmsh splits those edges and tries again
+//Jettisoning redundant points.
+//Info    : 0 points 0 edges and 0 faces in the initial mesh
+//Error   : No tetrahedra in region 21 0
+//    db.readFile(filepath,"Hole\ CAD\ model");
+//db.readFile(filepath,"RVE4_RVE1_Phase1");
+
+
+
+
+
+
+
+
+// ----------- KO ---------------
+
+
+// CURIEUX: PASSE OK, EN 2d/3d, MAIS AFFICHE:
+//  Error   : GenericFace::ERROR from FaceXYZFromUV !
+//db.readFile(filepath,"RVE4_RVE1_Phase1");// SPHERES !!!!!
+
+
+
+//Error   : GenericFace::ERROR from FaceUVFromXYZ ! 
+// CRASH LE PC, MEM SWAP AVEC SIZE=0.1, SEGFAULT AVEC 0.125 !!???????
+//  db.readFile(filepath,"TRVx_b2");
+
+
+
+
+
+// BOXON BOXON BOXON !!!!!!!!
+//Warning : Treating face 5763
+//Warning : :-( There are 2 intersections in the 1D mesh (curves 7019 7030), face 5763
+//Warning : 8-| Gmsh splits those edges and tries again
+//Error   : GenericFace::ERROR from FaceUVFromXYZ ! 
+//
+//MVertex (3.70327,-0.287295,1.13844)
+//coucou v on dim 1
+//   getParameter -> 49.5434
+//edge_reparamOnFace:: Debug : reversing parameter, fin_is_positive=no dir=1
+//error from PK_FIN_find_surf_parameters : 120
+//edge bounds :0 65.978   fin bounds = 0  1     param = 49.5434 param_to_use -48.5434
+//edge_reparamOnFace::PK_FIN_find_surf_parameters error = 120 , given parameter coord is out of range  
+//GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 109373
+//reparamOnFace, param (0,0)
+//returning true
+//
+//MVertex (3.71574,-0.314919,1.12607)
+//coucou v on dim 0
+//coucou 2
+//PK_ERROR_not_on_surface
+//reparamOnFace, param (13.8284,3.49907e-05)
+//returning true
+//
+//Warning : Treating face 5763
+//Warning : :-) Gmsh was able to recover all edges after 7 iterations
+//Error   : GenericFace::ERROR from FaceUVFromXYZ ! 
+//returning true
+//Debug   : Delaunization of the initial mesh done (0 swaps)
+//Debug   :      39 points created -- Worst tri radius is 1171.942
+//Debug   : Point 10.9748 0.00623589 cannot be inserted because 1
+//Debug   : Point 14.7181 0.315803 cannot be inserted because 1
+//Debug   : Point 10.9431 0.0053515 cannot be inserted because 1
+//Debug   : Point 14.7181 0.320502 cannot be inserted because 1
+//Debug   : Point 14.719 0.313278 cannot be inserted because 1
+//Debug   : Point 14.6976 0.33995 cannot be inserted because 1
+//Debug   : Point 14.7183 0.308583 cannot be inserted because 1
+//Debug   : Point 14.7183 0.300861 cannot be inserted because 1
+//Debug   : Point 14.4506 0.0114194 cannot be inserted because 1
+//Debug   : Point 14.7181 0.321306 cannot be inserted because 1
+//Erreur de segmentation
+//    db.readFile(filepath,"work_Syusei");
+
+
+
+
+
+
+
+
+
+
+
+
+//Warning : GenericEdge::geomType:: unknown type from callback:
+//Error   : Unable to recover an edge 0.0475703 -0.0232957 && 0.0475703 -0.0232957 (34/38)
+//face bounds u:0.812732 1.5708
+//face bounds v:-0.01 1.21514e-13
+//uv = 2.13943 -0.952663
+//face_XYZFromUV::PK_SURF_eval error = 120 , given uv coords are out of range  
+//Error   : GenericFace::ERROR from FaceXYZFromUV ! 
+//Delaunizing vertices...
+//Warning:  Point 133 is replaced by point 135.
+//  Avoid creating a very short edge (len = 0) (< 3.58039e-08).
+//  You may try a smaller tolerance (-T) (current is 1e-08)
+//  or use the option -M0/1 to avoid such replacement.
+//The dihedral angle between them is 4.13353e-05 degree.
+//Hint:  You may use -p/# to decrease the dihedral angle  tolerance 0.1 (degree).
+//Error   : Self intersecting surface mesh, computing intersections (this could take a while)
+//Info    : 0 points 0 edges and 0 faces in the initial mesh
+//Error   : No tetrahedra in region 487 0
+//Info    : 0 points 0 edges and 0 faces in the initial mesh
+//Error   : No tetrahedra in region 488 0
+//    db.readFile(filepath,"United131798_part\(131798\)");
+
+
+
+
+
+
+
+//Warning : Treating face 2713
+//Error   : GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 28259
+//Warning : Treating face 2714
+//Error   : Unable to recover an edge -1.61873 0.270748 -0.0035 && -1.61873 0.341748 -0.0035 (0/2)
+//Error   : GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 28190
+//Warning : Treating face 2715
+//MVertex (-1.30996,0.358578,-0.037)
+//coucou v on dim 1
+//   getParameter -> -121.67
+//edge_reparamOnFace:: Debug : reversing parameter, fin_is_positive=no dir=1
+//error from PK_FIN_find_surf_parameters : 120
+//edge bounds :-211.939 -31.4011   fin bounds = -90.2689  90.2689     param = -121.67 param_to_use 121.67
+//edge_reparamOnFace::PK_FIN_find_surf_parameters error = 120 , given parameter coord is out of range
+//Error   : GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 28190
+//Debug   : Delaunization of the initial mesh done (1 swaps)
+//Debug   :      21 points created -- Worst tri radius is 312427908267292.312
+//Debug   : Point 0.0203402 -2.2915 cannot be inserted because 1
+//Erreur de segmentation
+//    db.readFile(filepath,"Imprinted1_part\(255902\)");
+
+
+
+//  face parbounds = [0,0.281927] [-0.170298,-0.169998]
+//MVertex (-0.621457,0.18,-0.1677)
+//coucou v on dim 0
+//coucou 2
+//PK_ERROR_not_on_surface
+//reparamOnFace, param (0.281927,-0.169998)
+//returning true
+//MVertex (-0.640583,0.0909017,-0.1677)
+//coucou v on dim 1
+//   getParameter -> 0.135104
+//edge_reparamOnFace:: Debug : reversing parameter, fin_is_positive=no dir=1
+//error from PK_FIN_find_surf_parameters : 120
+//edge bounds :0 0.270208   fin bounds = 0.729791  1     param = 0.135104 param_to_use 1.59469
+//edge_reparamOnFace::PK_FIN_find_surf_parameters error = 120 , given parameter coord is out of range  
+//GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 15392
+//Error   : GenericFace::ERROR from FaceUVFromXYZ ! 
+//Error   : GenericEdge::ERROR from EdgeReparamOnFace ! Edge Native id 15392
+//Erreur de segmentation
+//    db.readFile(filepath,"Stator_part\(43\)");
+
+
+
+
+// BOXON TOTAL !!!!!!!!
+//db.readFile(filepath,"fmdAllMergedBut2");
+
+
+
+
+//Error   : Unable to recover an edge 0.0547786 0.00493016 && 0.0547786 -0.00493016 (17/34)
+//Error   : Unable to recover an edge 0.0147219 -0.00946121 && 0.0175 0 (10/10)
+//    db.readFile(filepath,"1.120.15\ B");  //// 2 CYLINDRES !!!!!!!
+
+
+
+
+
+
+
+
+//Error   : GenericFace::ERROR from FaceXYZFromUV ! 
+//(because asking for uv coord out of range ! )
+//Error   : Unable to recover an edge 0.0060325 0 && 1.64432e-17 -0.0060325 (0/3)
+//Warning : :-( There are 2 intersections in the 1D mesh (curves 120 117)
+//Warning : 8-| Gmsh splits those edges and tries again
+//    db.readFile(filepath,"Morse\ cone");// CYLINDRE ISSUE
+
+
+
+
+
+
+
+
+//  Error   : Unable to recover an edge -0.00795619 0.017681 0.084925 && -0.0112517 0.0256372 0.084925 (3/7)
+//    db.readFile(filepath,"blend1");  /// CYLINDER !!!
+//    db.readFile(filepath,"blend2");  /// CYLINDER !!!
+
+
+//Warning : :-( There are 2 intersections in the 1D mesh (curves 236 235)
+//Warning : 8-| Gmsh splits those edges and tries again
+//Error   : Unable to recover an edge -0.025 0.0015 && -0.00833333 0.0015 (0/2)
+//Info    : 0 points 0 edges and 0 faces in the initial mesh
+//    db.readFile(filepath,"fan");  /// CYLINDER ??????????
+
+
+
+
+
+// OK in 2D, STILL NEED TO FIND WHY WEIRD 1D POINTS ARE ADDED... !!!???
+// in 3D : 
+//  Error   : Cannot build pyramids on non manifold faces
+//  Error   : Cannot build pyramids on non manifold faces
+//    db.readFile(filepath,"twoplates");
+
+
+
+
+
+
+
+
+// ++++ Error:  The point set is trivial.
+// Error   : Surface mesh is wrong, cannot do the 3D mesh
+// db.readFile(filepath,"instance_solid_cyl");
+//  db.readFile(filepath,"instance_solid_cyl2");
+
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_0_15.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_0_15.sch_txt
new file mode 100644
index 0000000..f389fd2
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_0_15.sch_txt
@@ -0,0 +1,584 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_0_15;FILE=P_SCHEMA:SCH_0_15.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 0/15; 
+120 68 503 7041 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_0_15 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_10002.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_10002.sch_txt
new file mode 100644
index 0000000..19173c2
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_10002.sch_txt
@@ -0,0 +1,1236 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=SHAPEN;OS=vms;OS_RELEASE=V6.2;FRU=sdl_paraso
+lid_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE
+=schema;KEY=SCH_10002;FILE=P_SCHEMA:SCH_10002.SCH_TXT;DATE=15-apr-1998;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1000102/10002; 
+184 136 1087 15914 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+extended_chart_count; n; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+**************** end of schema SCH_1000102_10002 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_10004.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_10004.sch_txt
new file mode 100644
index 0000000..72df507
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_10004.sch_txt
@@ -0,0 +1,1238 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF3;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text;GUISE=sc
+hema;KEY=SCH_10004;FILE=P_SCHEMA:SCH_10004.SCH_TXT;DATE=15-jun-1998;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1000149/10004; 
+184 136 1089 15952 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+extended_chart_count; n; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+**************** end of schema SCH_1000149_10004 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_100_1000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_100_1000.sch_txt
new file mode 100644
index 0000000..de4ef73
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_100_1000.sch_txt
@@ -0,0 +1,586 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_100_1000;FILE=P_SCHEMA:SCH_100_1000.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 100/1000; 
+120 68 504 7052 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_100_1000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_10100.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_10100.sch_txt
new file mode 100644
index 0000000..dac96d3
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_10100.sch_txt
@@ -0,0 +1,1252 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF1;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_10100;FILE=P_SCHEMA:SCH_10100.SCH_TXT;DATE=8-aug-1998;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1001026/10100; 
+184 137 1102 16143 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+extended_chart_count; n; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 12 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 7 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+**************** end of schema SCH_1001026_10100 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_1022.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_1022.sch_txt
new file mode 100644
index 0000000..d9a3752
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_1022.sch_txt
@@ -0,0 +1,738 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_1022;FILE=P_SCHEMA:SCH_1022.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 300000/1022; 
+120 85 640 9044 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+const_param; c; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 24 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_300000_1022 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_11003.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_11003.sch_txt
new file mode 100644
index 0000000..8e57972
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_11003.sch_txt
@@ -0,0 +1,1254 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF7;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_11003;FILE=P_SCHEMA:SCH_11003.SCH_TXT;DATE=6-feb-1999;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1100071/11003; 
+184 137 1104 16191 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 12 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 7 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+**************** end of schema SCH_1100071_11003 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_11004.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_11004.sch_txt
new file mode 100644
index 0000000..d75fe93
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_11004.sch_txt
@@ -0,0 +1,1254 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF7;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_11004;FILE=P_SCHEMA:SCH_11004.SCH_TXT;DATE=2-apr-1999;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1100100/11004; 
+184 137 1104 16191 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 12 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 7 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+**************** end of schema SCH_1100100_11004 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_110_0.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_110_0.sch_txt
new file mode 100644
index 0000000..abb7ba8
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_110_0.sch_txt
@@ -0,0 +1,586 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_110_0;FILE=P_SCHEMA:SCH_110_0.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 110/0; 
+120 68 505 7067 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_110_0 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_12006.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_12006.sch_txt
new file mode 100644
index 0000000..e4a6bab
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_12006.sch_txt
@@ -0,0 +1,1274 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF5;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text;GUISE=sc
+hema;KEY=SCH_12006;FILE=P_SCHEMA:SCH_12006.SCH_TXT;DATE=16-feb-2000;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1200118/12006; 
+185 140 1121 16432 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 7 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1200118_12006 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_120_0.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_120_0.sch_txt
new file mode 100644
index 0000000..d7fdd9e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_120_0.sch_txt
@@ -0,0 +1,586 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_120_0;FILE=P_SCHEMA:SCH_120_0.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 120/0; 
+120 68 505 7067 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_120_0 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_12102.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_12102.sch_txt
new file mode 100644
index 0000000..3b63bf0
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_12102.sch_txt
@@ -0,0 +1,1276 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_12102;FILE=P_SCHEMA:SCH_12102.SCH_TXT;DATE=17-jun-2000;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1201050/12102; 
+185 141 1122 16471 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 7 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1201050_12102 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_12103.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_12103.sch_txt
new file mode 100644
index 0000000..f360a51
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_12103.sch_txt
@@ -0,0 +1,1279 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF13;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_12103;FILE=P_SCHEMA:SCH_12103.SCH_TXT;DATE=30-oct-2000;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1201142/12103; 
+185 142 1124 16526 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1201142_12103 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_13005.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_13005.sch_txt
new file mode 100644
index 0000000..7d4b799
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_13005.sch_txt
@@ -0,0 +1,1279 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text;GUISE=s
+chema;KEY=SCH_13005;FILE=P_SCHEMA:SCH_13005.SCH_TXT;DATE=23-nov-2000;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1300033/13005; 
+185 142 1124 16526 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1300033_13005 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_13006.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_13006.sch_txt
new file mode 100644
index 0000000..8a102c6
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_13006.sch_txt
@@ -0,0 +1,1280 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=SHAPEN;OS=vms;OS_RELEASE=V6.2;FRU=sdl_paraso
+lid_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE
+=schema;KEY=SCH_13006;FILE=P_SCHEMA:SCH_13006.SCH_TXT;DATE=24-mar-2001;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1300120/13006; 
+185 142 1125 16535 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 4096 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1300120_13006 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_130_0.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_130_0.sch_txt
new file mode 100644
index 0000000..65fb352
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_130_0.sch_txt
@@ -0,0 +1,586 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_130_0;FILE=P_SCHEMA:SCH_130_0.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 130/0; 
+120 68 505 7067 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_130_0 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_14000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_14000.sch_txt
new file mode 100644
index 0000000..0339afe
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_14000.sch_txt
@@ -0,0 +1,1281 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf2;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_14000;FILE=/Parasolid/vanilla/schemas/sch_14000.sch_txt;DAT
+E=31-dec-2001;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1400043/14000; 
+185 142 1125 16535 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 4096 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1400043_14000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_140_0.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_140_0.sch_txt
new file mode 100644
index 0000000..6da6c13
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_140_0.sch_txt
@@ -0,0 +1,586 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_140_0;FILE=P_SCHEMA:SCH_140_0.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 140/0; 
+120 68 505 7067 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 5 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 36 0 
+36 CPC; Composite paracurve; 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 42 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 SEGMENT; segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 62 0 
+62 CPS; Composite parasurf; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 64 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 PATCH; Patch of CPS; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_140_0 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_15003.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_15003.sch_txt
new file mode 100644
index 0000000..850e8b7
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_15003.sch_txt
@@ -0,0 +1,1286 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_15003;FILE=/tmp/dev_schema_28148/sch_15003.sch_txt;DATE=15-
+mar-2003;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1500084/15003; 
+185 143 1129 16602 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1500084_15003 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_15102.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_15102.sch_txt
new file mode 100644
index 0000000..2e6fda5
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_15102.sch_txt
@@ -0,0 +1,1298 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_15102;FILE=/tmp/dev_schema_25431/sch_15102.sch_txt;DATE=18-
+oct-2003;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1501143/15102; 
+185 145 1139 16747 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 13 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+119 POLYLINE; Polyline; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; APPITEM; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1501143_15102 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_16002.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_16002.sch_txt
new file mode 100644
index 0000000..6b417e4
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_16002.sch_txt
@@ -0,0 +1,1302 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_16002;FILE=/tmp/dev_schema_13962/sch_16002.sch_txt;DATE=14-
+feb-2004;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1600065/16002; 
+185 146 1142 16793 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 13 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+119 POLYLINE; Polyline; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; APPITEM; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1600065_16002 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_16003.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_16003.sch_txt
new file mode 100644
index 0000000..4c97ee2
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_16003.sch_txt
@@ -0,0 +1,1303 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_16003;FILE=/tmp/dev_schema_10090/sch_16003.sch_txt;DATE=20-
+mar-2004;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1600090/16003; 
+185 146 1143 16807 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+119 POLYLINE; Polyline; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; APPITEM; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1600090_16003 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_16004.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_16004.sch_txt
new file mode 100644
index 0000000..eca220f
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_16004.sch_txt
@@ -0,0 +1,1306 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_16004;FILE=/tmp/dev_schema_3898/sch_16004.sch_txt;DATE=24-a
+pr-2004;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1601018/16004; 
+185 146 1146 16853 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+119 POLYLINE; Polyline; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; APPITEM; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+**************** end of schema SCH_1601018_16004 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_16100.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_16100.sch_txt
new file mode 100644
index 0000000..53a579e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_16100.sch_txt
@@ -0,0 +1,1313 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=hppa;MC_MODEL=9000/785;MC_ID=cbrhpp11.2012650644;OS=HP-UX;OS_RELEASE=
+B.11.00;FRU=sdl_parasolid_test_hppa;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=un
+known;FORMAT=text;GUISE=schema;KEY=SCH_16100;FILE=/tmp/dev_schema_8932/sch_16100
+.sch_txt;DATE=25-sep-2004;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1601133/16100; 
+186 147 1152 16937 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 26 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; attribute field name; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+119 POLYLINE; Polyline; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 0 185 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; helix_su_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session Switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; APPITEM; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; array of hvecs; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; helix_cu_form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; data for polyline; 0 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 83 0 
+**************** end of schema SCH_1601133_16100 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_17104.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_17104.sch_txt
new file mode 100644
index 0000000..3cd1af3
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_17104.sch_txt
@@ -0,0 +1,1342 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=hppa;MC_MODEL=9000/785;MC_ID=cbrhpp11.2012650644;OS=HP-UX;OS_RELEASE=
+B.11.00;FRU=sdl_parasolid_test_hppa;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=un
+known;FORMAT=text;GUISE=schema;KEY=SCH_17104;FILE=/tmp/dev_schema_2449/sch_17104
+.sch_txt;DATE=24-sep-2005;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1701146/17104; 
+186 153 1175 17277 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 28 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_pline; p; 1 1008 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+113 OBB_SUBENTITIES; E-teeth; 0 2 1 
+n_used; d; 1 0 0 
+data; u; 1 0 1 
+114 OBB_ENTITIES; E-spine; 0 2 1 
+n_used; d; 1 0 0 
+elems; p; 1 113 1 
+115 OBB_SUBNODES; N-teeth; 0 2 1 
+n_used; d; 1 0 0 
+data; u; 1 0 1 
+116 OBB_NODES; N-spine; 0 2 1 
+n_used; d; 1 0 0 
+nodes; p; 1 115 1 
+117 OBB_TREE; OBB tree; 0 4 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 116 0 
+entities; p; 1 114 0 
+min_entity_count; d; 1 0 0 
+118 MESH; Mesh; 0 8 0 
+node_id; d; 1 0 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 83 0 
+**************** end of schema SCH_1701146_17104 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_17105.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_17105.sch_txt
new file mode 100644
index 0000000..401069e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_17105.sch_txt
@@ -0,0 +1,1357 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=hppa;MC_MODEL=9000/785;MC_ID=cbrhpp12.2013768084;OS=HP-UX;OS_RELEASE=
+B.11.00;FRU=sdl_parasolid_test_hppa;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=un
+known;FORMAT=text;GUISE=schema;KEY=SCH_17105;FILE=/tmp/t171_schema_15111/sch_171
+05.sch_txt;DATE=15-oct-2005;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1701154/17105; 
+186 154 1189 17438 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 28 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_pline; p; 1 1008 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+113 OBB_SUBENTITIES; E-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+114 OBB_ENTITIES; E-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+elems; p; 1 113 1 
+115 OBB_SUBNODES; N-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+116 OBB_NODES; N-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 115 1 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 116 0 
+entities; p; 1 114 0 
+min_entity_count; d; 1 0 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 12 0 
+node_id; d; 1 0 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1701154_17105 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_17106.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_17106.sch_txt
new file mode 100644
index 0000000..4c0b651
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_17106.sch_txt
@@ -0,0 +1,1355 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf4;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=alans;FORMAT=text;G
+UISE=schema;KEY=SCH_17106;FILE=./sch_17106.sch_txt;DATE=10-nov-2005;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1701165/17106; 
+186 154 1188 17421 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 27 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 14 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+113 OBB_SUBENTITIES; E-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+114 OBB_ENTITIES; E-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+elems; p; 1 113 1 
+115 OBB_SUBNODES; N-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+116 OBB_NODES; N-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 115 1 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 116 0 
+entities; p; 1 114 0 
+min_entity_count; d; 1 0 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 12 0 
+node_id; d; 1 0 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1701165_17106 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_18005.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_18005.sch_txt
new file mode 100644
index 0000000..1256b69
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_18005.sch_txt
@@ -0,0 +1,1369 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf6;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_pa
+rasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=kerman;FORMAT=text;
+GUISE=schema;KEY=SCH_18005;FILE=/tmp/dev_schema_6748/sch_18005.sch_txt;DATE=14-j
+an-2006;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1800075/18005; 
+186 154 1201 17589 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 27 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 15 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+113 OBB_SUBENTITIES; E-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+114 OBB_ENTITIES; E-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+elems; p; 1 113 1 
+115 OBB_SUBNODES; N-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+116 OBB_NODES; N-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 115 1 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 116 0 
+entities; p; 1 114 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 14 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1800075_18005 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_18007.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_18007.sch_txt
new file mode 100644
index 0000000..c653bee
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_18007.sch_txt
@@ -0,0 +1,1389 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=hppa;MC_MODEL=9000/785;MC_ID=cbrhpp11.2012650644;OS=HP-UX;OS_RELEASE=
+B.11.00;FRU=sdl_parasolid_test_hppa;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=un
+known;FORMAT=text;GUISE=schema;KEY=SCH_18007;FILE=/tmp/dev_schema_28998/sch_1800
+7.sch_txt;DATE=11-mar-2006;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1800117/18007; 
+186 157 1218 17854 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 21 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 27 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 15 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+113 OBB_SUBENTITIES; E-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+114 OBB_ENTITIES; E-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+elems; p; 1 113 1 
+115 OBB_SUBNODES; N-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+116 OBB_NODES; N-spine; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 115 1 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 116 0 
+entities; p; 1 114 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 8 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 15 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1800117_18007 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_18106.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_18106.sch_txt
new file mode 100644
index 0000000..439c90b
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_18106.sch_txt
@@ -0,0 +1,1381 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=hppa;MC_MODEL=9000/785;MC_ID=cbrhpp11.2012650644;OS=HP-UX;OS_RELEASE=
+B.11.00;FRU=sdl_parasolid_test_hppa;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=un
+known;FORMAT=text;GUISE=schema;KEY=SCH_18106;FILE=/tmp/dev_schema_27263/sch_1810
+6.sch_txt;DATE=20-may-2006;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1801039/18106; 
+186 153 1214 17793 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 23 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 27 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 15 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 11 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1801039_18106 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_19002.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_19002.sch_txt
new file mode 100644
index 0000000..10c1f6e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_19002.sch_txt
@@ -0,0 +1,1386 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64a3;OS=Linux;OS_RELEASE=2.6.5-7.97-s
+mp;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=unknown
+;FORMAT=text;GUISE=schema;KEY=SCH_19002;FILE=/tmp/dev_schema_3404/sch_19002.sch_
+txt;DATE=23-mar-2007;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1900134/19002; 
+186 153 1219 17879 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 23 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 31 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 15 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1900134_19002 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_19007.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_19007.sch_txt
new file mode 100644
index 0000000..e39c171
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_19007.sch_txt
@@ -0,0 +1,1399 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64a3;OS=Linux;OS_RELEASE=2.6.5-7.97-s
+mp;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=unknown
+;FORMAT=text;GUISE=schema;KEY=SCH_19007;FILE=/tmp/dev_schema_23291/sch_19007.sch
+_txt;DATE=13-apr-2007;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1900149/19007; 
+186 154 1231 18101 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 26 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 31 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 15 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1900149_19007 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_19008.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_19008.sch_txt
new file mode 100644
index 0000000..6503c49
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_19008.sch_txt
@@ -0,0 +1,1398 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=sdlosf10;OS=OSF1;OS_RELEASE=V4.0;FRU=sdl_p
+arasolid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=alans;FORMAT=text;
+GUISE=schema;KEY=SCH_19008;FILE=./sch_19008.sch_txt;DATE=27-apr-2007;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 1900157/19008; 
+186 154 1231 18101 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 23 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 31 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 13 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_1900157_19008 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_20000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_20000.sch_txt
new file mode 100644
index 0000000..19ace48
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_20000.sch_txt
@@ -0,0 +1,1407 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i15;OS=Linux;OS_RELEASE=2.6.16.46-0
+.12-smp;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ke
+rman;FORMAT=text;GUISE=schema;KEY=SCH_20000;FILE=/tmp/dev_schema_27367/sch_20000
+.sch_txt;DATE=28-mar-2008;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2000107/20000; 
+186 155 1238 18205 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 23 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 31 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 19 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 15 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 147 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_SUBNODES; C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_NODES; C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 146 0 
+normal_pool; p; 1 146 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+**************** end of schema SCH_2000107_20000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_200_1009.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_200_1009.sch_txt
new file mode 100644
index 0000000..9a89b24
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_200_1009.sch_txt
@@ -0,0 +1,691 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_200_1009;FILE=P_SCHEMA:SCH_200_1009.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 200/1009; 
+120 81 596 8510 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; n; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 3 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 0 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 0 0 0 
+x_axis; v; 0 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 27 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 4 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_200_1009 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_200_1010.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_200_1010.sch_txt
new file mode 100644
index 0000000..71fc3b1
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_200_1010.sch_txt
@@ -0,0 +1,693 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_200_1010;FILE=P_SCHEMA:SCH_200_1010.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 200/1010; 
+120 81 598 8524 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 3 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 0 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 0 0 0 
+x_axis; v; 0 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 27 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 4 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_200_1010 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_200_1011.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_200_1011.sch_txt
new file mode 100644
index 0000000..d74d4dd
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_200_1011.sch_txt
@@ -0,0 +1,696 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_200_1011;FILE=P_SCHEMA:SCH_200_1011.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 200/1011; 
+120 81 601 8557 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 0 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 0 0 0 
+x_axis; v; 0 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 27 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_200_1011 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_200_1012.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_200_1012.sch_txt
new file mode 100644
index 0000000..ce1eb39
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_200_1012.sch_txt
@@ -0,0 +1,696 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_200_1012;FILE=P_SCHEMA:SCH_200_1012.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 200/1012; 
+120 81 601 8557 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 0 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 0 0 0 
+x_axis; v; 0 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 27 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_200_1012 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_210_1012.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_210_1012.sch_txt
new file mode 100644
index 0000000..2735e54
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_210_1012.sch_txt
@@ -0,0 +1,696 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_210_1012;FILE=P_SCHEMA:SCH_210_1012.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 210/1012; 
+120 81 601 8557 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 0 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 0 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 0 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 0 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 0 0 0 
+x_axis; v; 0 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 0 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 5 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 27 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+bb_created_list; p; 1 70 0 
+bb_changed_list; p; 1 70 0 
+bb_deleted_list; p; 1 70 0 
+bb_deleted_ufd_list; p; 1 70 0 
+bb_deleted_nt_list; p; 1 70 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_210_1012 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_25000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_25000.sch_txt
new file mode 100644
index 0000000..0ceba39
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_25000.sch_txt
@@ -0,0 +1,1439 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i55;OS=Linux;OS_RELEASE=2.6.32.12-0
+.7-default;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER
+=kerman;FORMAT=text;GUISE=schema;KEY=SCH_25000;FILE=/tmp/dev_schema_16978/sch_25
+000.sch_txt;DATE=30-sep-2011;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2500005/25000; 
+189 158 1267 18695 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 24 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+n_nodes_at_pmark; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 33 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 1040 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+child; p; 1 12 0 
+lowest_node_id; d; 1 0 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+owner; p; 1 12 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 25 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_usr_fn; q; 1 0 0 
+merge_usr_fn; q; 1 0 0 
+delete_usr_fn; q; 1 0 0 
+copy_usr_fn; q; 1 0 0 
+transmit_usr_fn; q; 1 0 0 
+receive_usr_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+117 OBB_TREE; OBB tree; 0 19 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash_version; d; 1 0 0 
+obb_version; d; 1 0 0 
+prism_version; d; 1 0 0 
+ray_version; d; 1 0 0 
+subdivide_version; d; 1 0 0 
+clash_name; p; 1 102 0 
+obb_name; p; 1 102 0 
+prism_name; p; 1 102 0 
+ray_name; p; 1 102 0 
+subdivide_name; p; 1 102 0 
+clash_cb; q; 1 0 0 
+obb_cb; q; 1 0 0 
+prism_cb; q; 1 0 0 
+ray_cb; q; 1 0 0 
+subdivide_cb; q; 1 0 0 
+118 MESH; Mesh; 0 16 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 188 0 
+top_mesh; p; 1 118 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_INT_SUBNODES; integer C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_INT_NODES; integer C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 OBSOLETE_PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 149 0 
+normal_pool; p; 1 149 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+148 COMB_REAL_SUBNODES; double C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; f; 1 0 1 
+149 COMB_REAL_NODES; double C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 148 1 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+188 PFF_MESH; PFF Mesh; 0 10 0 
+version; d; 1 0 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 1039 0 
+normal_pool; p; 1 1039 0 
+**************** end of schema SCH_2500005_25000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_25001.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_25001.sch_txt
new file mode 100644
index 0000000..418fc5f
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_25001.sch_txt
@@ -0,0 +1,1434 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i29;OS=Linux;OS_RELEASE=2.6.32.12-0
+.7-default;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER
+=kerman;FORMAT=text;GUISE=schema;KEY=SCH_25001;FILE=/tmp/dev_test_schema_680/sch
+_25001.sch_txt;DATE=9-mar-2012;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2500120/25001; 
+189 159 1261 18592 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 24 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+n_nodes_at_pmark; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 12 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 33 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 1040 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+child; p; 1 12 0 
+lowest_node_id; d; 1 0 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+owner; p; 1 12 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 25 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_usr_fn; q; 1 0 0 
+merge_usr_fn; q; 1 0 0 
+delete_usr_fn; q; 1 0 0 
+copy_usr_fn; q; 1 0 0 
+transmit_usr_fn; q; 1 0 0 
+receive_usr_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+116 OBB_TREE_CB; OBB tree cb; 0 4 0 
+version; d; 1 0 0 
+name; p; 1 102 0 
+cb; q; 1 0 0 
+internal; l; 1 0 0 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash; p; 1 116 0 
+obb; p; 1 116 0 
+prism; p; 1 116 0 
+ray; p; 1 116 0 
+subdivide; p; 1 116 0 
+118 MESH; Mesh; 0 16 0 
+node_id; d; 1 0 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+imesh; q; 1 0 0 
+sense; c; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 188 0 
+top_mesh; p; 1 118 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_INT_SUBNODES; integer C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_INT_NODES; integer C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 OBSOLETE_PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 149 0 
+normal_pool; p; 1 149 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+148 COMB_REAL_SUBNODES; double C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; f; 1 0 1 
+149 COMB_REAL_NODES; double C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 148 1 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+188 PFF_MESH; PFF Mesh; 0 10 0 
+version; d; 1 0 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 1039 0 
+normal_pool; p; 1 1039 0 
+**************** end of schema SCH_2500120_25001 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_26102.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_26102.sch_txt
new file mode 100644
index 0000000..95fbe0f
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_26102.sch_txt
@@ -0,0 +1,1470 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i55;OS=Linux;OS_RELEASE=2.6.32.12-0
+.7-default;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER
+=kerman;FORMAT=text;GUISE=schema;KEY=SCH_26102;FILE=/tmp/dev_schema_19248/sch_26
+102.sch_txt;DATE=30-aug-2013;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2601118/26102; 
+194 164 1292 19126 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 24 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+n_nodes_at_pmark; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+del_nolog; p; 0 168 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 8 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+new_nolog; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 33 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 1040 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+child; p; 1 12 0 
+lowest_node_id; d; 1 0 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+owner; p; 1 12 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 25 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_usr_fn; q; 1 0 0 
+merge_usr_fn; q; 1 0 0 
+delete_usr_fn; q; 1 0 0 
+copy_usr_fn; q; 1 0 0 
+transmit_usr_fn; q; 1 0 0 
+receive_usr_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 118 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+116 OBB_TREE_CB; OBB tree cb; 0 4 0 
+version; d; 1 0 0 
+name; p; 1 102 0 
+cb; q; 1 0 0 
+internal; l; 1 0 0 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash; p; 1 116 0 
+obb; p; 1 116 0 
+prism; p; 1 116 0 
+ray; p; 1 116 0 
+subdivide; p; 1 116 0 
+118 MESH; Mesh; 0 24 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 118 0 
+previous; p; 1 118 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+imesh; q; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+ukey; p; 1 1041 0 
+file_format; d; 1 0 0 
+index_in_file; d; 1 0 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 188 0 
+top_mesh; p; 1 118 0 
+non_manifold_vxs; c; 1 0 0 
+mesh_state; c; 1 0 0 
+psm_imesh; p; 1 189 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_INT_SUBNODES; integer C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_INT_NODES; integer C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 OBSOLETE_PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 149 0 
+normal_pool; p; 1 149 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+148 COMB_REAL_SUBNODES; double C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; f; 1 0 1 
+149 COMB_REAL_NODES; double C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 148 1 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+188 PFF_MESH; PFF Mesh; 0 10 0 
+version; d; 1 0 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 1039 0 
+normal_pool; p; 1 1039 0 
+189 PSM_MESH; PSM Mesh; 1 8 0 
+precision; u; 1 0 0 
+use_count; d; 0 0 0 
+position_pool; p; 1 193 0 
+normal_pool; p; 1 193 0 
+position_indices; p; 1 191 0 
+normal_type; u; 1 0 0 
+normal_indices; p; 1 191 0 
+adjacency; p; 1 191 0 
+190 INTEGER_TOOTH; Integer Tooth; 1 1 1 
+values; d; 1 0 1 
+191 INTEGER_COMB; Integer Comb; 1 6 1 
+encoding; u; 1 0 0 
+n_integers; d; 1 0 0 
+n_max_integers; d; 1 0 0 
+n_bits_per_integer; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 190 1 
+192 VECTOR_TOOTH; Vector Tooth; 1 1 1 
+values; f; 1 0 1 
+193 VECTOR_COMB; Vector Comb; 1 5 1 
+encoding; u; 1 0 0 
+n_vectors; d; 1 0 0 
+n_max_vectors; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 192 1 
+**************** end of schema SCH_2601118_26102 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_26104.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_26104.sch_txt
new file mode 100644
index 0000000..c6894f9
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_26104.sch_txt
@@ -0,0 +1,1471 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i55;OS=Linux;OS_RELEASE=2.6.32.12-0
+.7-default;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER
+=kerman;FORMAT=text;GUISE=schema;KEY=SCH_26104;FILE=/tmp/dev_schema_21378/sch_26
+104.sch_txt;DATE=24-sep-2013;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2601134/26104; 
+194 164 1293 19134 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 24 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+n_nodes_at_pmark; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+del_nolog; p; 0 168 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 8 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+new_nolog; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 33 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 1040 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 0 1006 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+child; p; 1 12 0 
+lowest_node_id; d; 1 0 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+owner; p; 1 12 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 25 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_usr_fn; q; 1 0 0 
+merge_usr_fn; q; 1 0 0 
+delete_usr_fn; q; 1 0 0 
+copy_usr_fn; q; 1 0 0 
+transmit_usr_fn; q; 1 0 0 
+receive_usr_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 0 1006 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+116 OBB_TREE_CB; OBB tree cb; 0 4 0 
+version; d; 1 0 0 
+name; p; 1 102 0 
+cb; q; 1 0 0 
+internal; l; 1 0 0 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash; p; 1 116 0 
+obb; p; 1 116 0 
+prism; p; 1 116 0 
+ray; p; 1 116 0 
+subdivide; p; 1 116 0 
+118 MESH; Mesh; 0 24 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+imesh; q; 1 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+ukey; p; 1 1041 0 
+file_format; d; 1 0 0 
+index_in_file; d; 1 0 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 1 117 0 
+user_tree; p; 1 117 0 
+hash_list; p; 1 70 0 
+tolerance; f; 1 0 0 
+pff_imesh; p; 1 188 0 
+top_mesh; p; 1 118 0 
+non_manifold_vxs; c; 1 0 0 
+mesh_state; c; 1 0 0 
+psm_imesh; p; 1 189 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_INT_SUBNODES; integer C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_INT_NODES; integer C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 OBSOLETE_PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 149 0 
+normal_pool; p; 1 149 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+148 COMB_REAL_SUBNODES; double C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; f; 1 0 1 
+149 COMB_REAL_NODES; double C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 148 1 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+188 PFF_MESH; PFF Mesh; 0 10 0 
+version; d; 1 0 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 1039 0 
+normal_pool; p; 1 1039 0 
+189 PSM_MESH; PSM Mesh; 1 9 1 
+precision; u; 1 0 0 
+use_count; d; 0 0 0 
+position_pool; p; 1 193 0 
+normal_pool; p; 1 193 0 
+position_indices; p; 1 191 0 
+normal_type; u; 1 0 0 
+normal_indices; p; 1 191 0 
+adjacency; p; 1 191 0 
+combs; p; 1 1042 1 
+190 INTEGER_TOOTH; Integer Tooth; 1 1 1 
+values; d; 1 0 1 
+191 INTEGER_COMB; Integer Comb; 1 6 1 
+encoding; u; 1 0 0 
+n_integers; d; 1 0 0 
+n_max_integers; d; 1 0 0 
+n_bits_per_integer; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 190 1 
+192 VECTOR_TOOTH; Vector Tooth; 1 1 1 
+values; f; 1 0 1 
+193 VECTOR_COMB; Vector Comb; 1 5 1 
+encoding; u; 1 0 0 
+n_vectors; d; 1 0 0 
+n_max_vectors; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 192 1 
+**************** end of schema SCH_2601134_26104 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_26105.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_26105.sch_txt
new file mode 100644
index 0000000..296e087
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_26105.sch_txt
@@ -0,0 +1,1472 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=lx86;MC_MODEL=x86_64;MC_ID=cbrlx64i55;OS=Linux;OS_RELEASE=2.6.32.12-0
+.7-default;FRU=sdl_parasolid_test_lx86;APPL=unknown;SITE=sdl-cambridge-u.k.;USER
+=kerman;FORMAT=text;GUISE=schema;KEY=SCH_26105;FILE=/tmp/dev_schema_7359/sch_261
+05.sch_txt;DATE=9-oct-2013;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 2700008/26105; 
+194 164 1294 19142 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 24 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+n_nodes_at_pmark; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+n_pmarks; d; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 1038 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+rcv_attrib_def; p; 0 80 0 
+rcv_attdef_list; p; 0 95 0 
+xmt_pmark; p; 0 4 0 
+xmt_version; d; 0 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+del_nolog; p; 0 168 0 
+mark_use_count; d; 0 0 0 
+new_at_mark; t; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 8 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+new_nolog; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf tag table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch tag table; 0 2 0 
+leaf; p; 1 6 1024 
+n_live; d; 1 0 0 
+8 ROOT_TAG_TABLE; Root tag table; 0 6 0 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+branch; p; 1 7 8192 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 33 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 1040 0 
+body_type; u; 1 0 0 
+nom_geom_state; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+boundary_mesh; p; 1 1006 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+node_id_index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+child; p; 1 12 0 
+lowest_node_id; d; 1 0 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+node_id; d; 0 0 0 
+attributes_features; p; 1 1019 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+owner; p; 1 12 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; d; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 10 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; d; 1 0 0 
+extended_chart_count; d; 0 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+extra_hvecs; p; 0 182 0 
+extended_chart_order; p; 0 183 0 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; Basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; d; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; d; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; Super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; d; 1 0 0 
+row; d; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic patch of CPS; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List header; 1 12 0 
+node_id; d; 1 0 0 
+list_type; u; 1 0 0 
+notransmit; l; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 0 0 0 
+finger_index; d; 1 0 0 
+finger_block; p; 1 1012 0 
+list_block; p; 1 1012 0 
+71 REAL_LIS_BLOCK; Real list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag list; 0 4 1 
+n_entries; d; 1 0 0 
+dummy_map_offset; d; 0 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer list; 1 4 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+78 ATTRIB_CALLBACKS; Attribute callbacks; 0 25 0 
+split_fn; q; 1 0 0 
+merge_fn; q; 1 0 0 
+delete_fn; q; 1 0 0 
+copy_fn; q; 1 0 0 
+transmit_fn; q; 1 0 0 
+receive_fn; q; 1 0 0 
+split_usr_fn; q; 1 0 0 
+merge_usr_fn; q; 1 0 0 
+delete_usr_fn; q; 1 0 0 
+copy_usr_fn; q; 1 0 0 
+transmit_usr_fn; q; 1 0 0 
+receive_usr_fn; q; 1 0 0 
+split_cx; q; 1 0 0 
+merge_cx; q; 1 0 0 
+delete_cx; q; 1 0 0 
+copy_cx; q; 1 0 0 
+transmit_cx; q; 1 0 0 
+receive_cx; q; 1 0 0 
+split_on; l; 1 0 0 
+merge_on; l; 1 0 0 
+delete_on; l; 1 0 0 
+copy_on; l; 1 0 0 
+transmit_on; l; 1 0 0 
+receive_on; l; 1 0 0 
+callback_type; c; 1 0 0 
+79 ATT_DEF_ID; Attrib def name; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; Attribute definition; 1 8 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+callbacks; p; 0 78 0 
+field_names; p; 1 99 0 
+legal_owners; l; 1 0 14 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+94 PARM_VALUES; Parm values; 0 1 1 
+values; f; 0 0 1 
+95 POINTER_VALUES; Pointer values; 0 1 1 
+values; q; 0 0 1 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+98 UNICODE_VALUES; Unicode values; 1 1 1 
+values; w; 1 0 1 
+99 FIELD_NAMES; Attrib field names; 1 1 1 
+names; p; 1 1037 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 18 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+attdef_list; p; 1 74 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+appitem; p; 0 174 0 
+mesh; p; 1 1006 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; d; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; d; 1 0 0 
+row_count; d; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; Super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; Unsanitised patch array; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; Parameter box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set element tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+116 OBB_TREE_CB; OBB tree cb; 0 4 0 
+version; d; 1 0 0 
+name; p; 1 102 0 
+cb; q; 1 0 0 
+internal; l; 1 0 0 
+117 OBB_TREE; OBB tree; 0 9 0 
+n_nodes; d; 1 0 0 
+nodes; p; 1 146 0 
+entities; p; 1 146 0 
+min_entity_count; d; 1 0 0 
+clash; p; 1 116 0 
+obb; p; 1 116 0 
+prism; p; 1 116 0 
+ray; p; 1 116 0 
+subdivide; p; 1 116 0 
+118 MESH; Mesh; 1 24 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+imesh; q; 0 0 0 
+frustrum; d; 1 0 0 
+key; p; 1 102 0 
+ukey; p; 1 1041 0 
+file_format; d; 1 0 0 
+index_in_file; d; 1 0 0 
+transform; p; 1 100 0 
+attr; p; 1 81 0 
+internal_tree; p; 0 117 0 
+user_tree; p; 0 117 0 
+hash_list; p; 0 70 0 
+tolerance; f; 0 0 0 
+pff_imesh; p; 1 188 0 
+top_mesh; p; 0 118 0 
+non_manifold_vxs; c; 0 0 0 
+mesh_state; c; 0 0 0 
+psm_imesh; p; 1 189 0 
+119 POLYLINE; Polyline; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+data; p; 1 185 0 
+attr; p; 1 81 0 
+120 PE_SURF; PE surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; Int PE data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; Ext PE data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; Su param props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; d; 1 0 0 
+n_v_vertices; d; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; d; 1 0 0 
+n_v_knots; d; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; Knot mult sum; 0 1 1 
+mult; d; 1 0 1 
+130 PE_CURVE; PE curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; Cu param props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General B-spline SP curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+analytic_form; p; 1 1036 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; d; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 5 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+chordal_error_2d; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; Cu tree; 0 11 0 
+n_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; Geometric owner; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+145 COMB_INT_SUBNODES; integer C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; d; 1 0 1 
+146 COMB_INT_NODES; integer C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 145 1 
+147 OBSOLETE_PFF_MESH; PFF Mesh; 0 12 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 149 0 
+normal_pool; p; 1 149 0 
+unused_facets; p; 1 70 0 
+unused_fins; p; 1 70 0 
+unused_verts; p; 1 70 0 
+148 COMB_REAL_SUBNODES; double C-teeth; 0 3 1 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+data; f; 1 0 1 
+149 COMB_REAL_NODES; double C-spine; 0 5 1 
+len_shft; d; 1 0 0 
+node_size; d; 1 0 0 
+n_max; d; 1 0 0 
+n_used; d; 1 0 0 
+nodes; p; 1 148 1 
+150 PLANE_FORM; Plane form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; Cylinder form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; Cone form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; Sphere form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; Torus form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; Swept form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; Swept UV form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; Spun form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; Var radius pipe form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; Su degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; Su tree; 0 25 0 
+n_u_pvecs; d; 1 0 0 
+n_v_pvecs; d; 1 0 0 
+n_branches; d; 1 0 0 
+n_leaves; d; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; Polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; Polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; d; 1 0 0 
+v_knot_index; d; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+163 HELIX_SU_FORM; Helix su form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+gap; f; 1 0 0 
+tol; f; 1 0 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll data; 0 16 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+session_switch; p; 1 173 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+keep_edge_curve_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session data; 0 8 0 
+attrib_def; p; 1 80 0 
+session_switch; p; 1 173 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+173 SESSION_SWITCH; Session switch; 0 3 0 
+next; p; 1 173 0 
+id; d; 1 0 0 
+value; d; 1 0 0 
+174 APPITEM; Application item; 0 2 0 
+pointer; q; 0 0 0 
+next; p; 0 174 0 
+175 DEFER_DELTAS; Delta block; 0 3 0 
+next; q; 0 0 0 
+size; d; 0 0 0 
+data; q; 0 0 0 
+176 PART_XMT_BLOCK; ; 1 5 1 
+n_entries; d; 1 0 0 
+index_map_offset; d; 1 0 0 
+index_map; p; 1 82 0 
+schema_embedding_map; p; 1 82 0 
+entries; p; 1 1005 1 
+177 BYTE_VALUES; Byte values; 1 1 1 
+values; u; 1 0 1 
+180 POLYNOMIAL_SEGMENTS; Polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; Polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; d; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+182 HVEC_ARRAY; Hvec array; 0 1 1 
+hvec; h; 1 0 1 
+183 HVEC_ORDERING; Hvec ordering; 0 1 1 
+order; d; 1 0 1 
+184 HELIX_CU_FORM; Helix cu form; 1 7 0 
+axis_pt; v; 1 0 0 
+axis_dir; v; 1 0 0 
+point; v; 1 0 0 
+hand; c; 1 0 0 
+turns; i; 1 0 0 
+pitch; f; 1 0 0 
+tol; f; 1 0 0 
+185 POLYLINE_DATA; Polyline data; 1 5 0 
+n_pvecs; d; 1 0 0 
+closed; l; 1 0 0 
+base_parm; f; 1 0 0 
+pvec; p; 1 85 0 
+parm; p; 0 94 0 
+188 PFF_MESH; PFF Mesh; 0 10 0 
+version; d; 1 0 0 
+number_of_facets; d; 1 0 0 
+number_of_fins; d; 1 0 0 
+number_of_verts; d; 1 0 0 
+use_count; n; 1 0 0 
+facet_list; p; 1 146 0 
+fin_list; p; 1 146 0 
+vertex_list; p; 1 146 0 
+position_pool; p; 1 1039 0 
+normal_pool; p; 1 1039 0 
+189 PSM_MESH; PSM Mesh; 1 10 1 
+precision; u; 1 0 0 
+use_count; d; 0 0 0 
+owner; p; 1 118 0 
+position_pool; p; 1 193 0 
+normal_pool; p; 1 193 0 
+position_indices; p; 1 191 0 
+normal_type; u; 1 0 0 
+normal_indices; p; 1 191 0 
+adjacency; p; 1 191 0 
+combs; p; 1 1042 1 
+190 INTEGER_TOOTH; Integer Tooth; 1 1 1 
+values; d; 1 0 1 
+191 INTEGER_COMB; Integer Comb; 1 6 1 
+encoding; u; 1 0 0 
+n_integers; d; 1 0 0 
+n_max_integers; d; 1 0 0 
+n_bits_per_integer; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 190 1 
+192 VECTOR_TOOTH; Vector Tooth; 1 1 1 
+values; f; 1 0 1 
+193 VECTOR_COMB; Vector Comb; 1 5 1 
+encoding; u; 1 0 0 
+n_vectors; d; 1 0 0 
+n_max_vectors; d; 1 0 0 
+shift; d; 1 0 0 
+teeth; p; 1 192 1 
+**************** end of schema SCH_2700008_26105 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_3000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_3000.sch_txt
new file mode 100644
index 0000000..57e8970
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_3000.sch_txt
@@ -0,0 +1,738 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_3000;FILE=P_SCHEMA:SCH_3000.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 300000/3000; 
+120 85 640 9044 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+const_param; c; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 24 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_300000_3000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_300_1022.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_300_1022.sch_txt
new file mode 100644
index 0000000..2c49fa6
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_300_1022.sch_txt
@@ -0,0 +1,739 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_300_1022;FILE=P_SCHEMA:SCH_300_1022.SCH_TXT;DATE=23-aug-199
+1;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 300/1022; 
+120 85 640 9044 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 6 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+const_param; c; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 5 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 24 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+**************** end of schema SCH_300_1022 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4011.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4011.sch_txt
new file mode 100644
index 0000000..29c661c
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4011.sch_txt
@@ -0,0 +1,782 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_4011;FILE=P_SCHEMA:SCH_4011.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400000/4011; 
+140 89 680 9612 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+approx; p; 1 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 3 1 
+key; p; 1 102 0 
+geom_type; d; 1 0 0 
+data; f; 0 0 1 
+130 PE_CURVE; PE_curve; 1 14 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+approx; p; 1 1025 0 
+internal_geom; p; 1 1028 1 
+**************** end of schema SCH_400000_4011 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4022.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4022.sch_txt
new file mode 100644
index 0000000..af9802a
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4022.sch_txt
@@ -0,0 +1,837 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_4022;FILE=P_SCHEMA:SCH_4022.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400000/4022; 
+140 93 731 10272 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 0 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 26 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 7 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 1 6 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 1 3 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400000_4022 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4030.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4030.sch_txt
new file mode 100644
index 0000000..7393e94
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4030.sch_txt
@@ -0,0 +1,847 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_4030;FILE=P_SCHEMA:SCH_4030.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400023/4030; 
+140 94 740 10462 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+approx_geom_count; d; 1 0 0 
+sp_count; d; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 28 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+special_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 1 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 1 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 1 6 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 1 3 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400023_4030 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4031.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4031.sch_txt
new file mode 100644
index 0000000..7d98571
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4031.sch_txt
@@ -0,0 +1,847 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_4031;FILE=P_SCHEMA:SCH_4031.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400032/4031; 
+140 94 740 10459 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+approx_geom_count; d; 1 0 0 
+sp_count; d; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 28 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 1 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 1 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 1 6 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 1 3 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400032_4031 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4032.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4032.sch_txt
new file mode 100644
index 0000000..a24cd19
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4032.sch_txt
@@ -0,0 +1,847 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=SUE;FORMAT=text;
+GUISE=schema;KEY=SCH_4032;FILE=P_SCHEMA:SCH_4032.SCH_TXT;DATE=23-aug-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400041/4032; 
+140 94 740 10459 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+approx_geom_count; d; 1 0 0 
+sp_count; d; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 28 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400041_4032 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4035.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4035.sch_txt
new file mode 100644
index 0000000..1dcd187
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4035.sch_txt
@@ -0,0 +1,848 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=te
+xt;GUISE=schema;KEY=SCH_4035;FILE=P_SCHEMA:SCH_4035.SCH_TXT;DATE=11-nov-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 400050/4035; 
+140 94 741 10467 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 2 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+approx_geom_count; d; 1 0 0 
+sp_count; d; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 28 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400000_4035 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_4039.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_4039.sch_txt
new file mode 100644
index 0000000..0b01f68
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_4039.sch_txt
@@ -0,0 +1,851 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4200;MC_ID=SHAPEL:335544326;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=te
+xt;GUISE=schema;KEY=SCH_4039;FILE=P_SCHEMA:SCH_4039.SCH_TXT;DATE=11-nov-1991;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 401019/4039; 
+140 94 744 10503 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 17 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+tolerance; f; 1 0 0 
+approx_geom_count; d; 1 0 0 
+sp_count; d; 1 0 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+17 HALFEDGE; Halfedge; 1 7 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+18 VERTEX; Vertex; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+**************** end of schema SCH_400000_4039 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5015.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5015.sch_txt
new file mode 100644
index 0000000..23219d7
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5015.sch_txt
@@ -0,0 +1,958 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=3100;MC_ID=VAX18:167772164;OS=vms;OS_RELEASE=V5.4;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5015;FILE=P_SCHEMA:SCH_5015.SCH_TXT;DATE=28-may-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 500000/5015; 
+140 102 843 11919 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+13 SHELL; Shell; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+14 FACE; Face; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+isoparm_type; c; 1 0 0 
+isoparm_sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+assoc; p; 0 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+orig_uint; i; 1 0 0 
+orig_vint; i; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 21 0 
+construction; d; 1 0 0 
+convexity; d; 1 0 0 
+u_continuity; d; 1 0 0 
+v_continuity; d; 1 0 0 
+bx; b; 1 0 0 
+normal_bx; b; 1 0 0 
+associated_curve; p; 1 0 0 
+associated_surface; p; 1 0 0 
+u_span_index; d; 0 0 0 
+v_span_index; d; 0 0 0 
+matrix; p; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+u_deriv_angle_turned; f; 0 0 0 
+v_deriv_angle_turned; f; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 18 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+use_count; n; 1 0 0 
+sense; c; 1 0 0 
+periodic; l; 1 0 0 
+orig_tint; i; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 12 0 
+construction; d; 1 0 0 
+continuity; d; 1 0 0 
+bx; b; 1 0 0 
+associated_curve; p; 1 0 0 
+associated_surface; p; 1 0 0 
+span_index; d; 0 0 0 
+matrix; p; 0 0 0 
+parameter_scale; f; 0 0 0 
+t_int; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+deriv_angle_turned; f; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 11 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+**************** end of schema SCH_500000_5015 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5021.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5021.sch_txt
new file mode 100644
index 0000000..58d2e65
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5021.sch_txt
@@ -0,0 +1,1030 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=6310;MC_ID=SHAPEK:167772165;OS=vms;OS_RELEASE=V5.4;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=tex
+t;GUISE=schema;KEY=SCH_5021;FILE=P_SCHEMA:SCH_5021.SCH_TXT;DATE=9-jun-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T
+1
+: SCHEMA FILE created by modeller version 500000/5021;
+142 105 912 13107
+1 NULLP; Null; 1 0 0
+2 WORKSPACE; Workspace; 1 1 1
+ws; c; 1 0 1
+3 USFD_TABLE; Userfield Table; 1 1 1
+usfd; d; 1 0 1
+4 TAG_TABLE; Tag Table; 1 7 1
+level; d; 1 0 0
+access_mode; d; 1 0 0
+n_slots_total; d; 1 0 0
+first_free_slot; d; 1 0 0
+n_dead_tags; d; 1 0 0
+usfd_table; p; 1 3 0
+down; p; 1 1024 1
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0
+root_tag_table; p; 1 4 0
+max_tag; d; 1 0 0
+tag_limit; d; 1 0 0
+10 ASSEMBLY; Assembly; 1 18 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 1 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+assembly_box; b; 0 0 0
+assembly_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 10 0
+previous; p; 1 10 0
+type; d; 1 0 0
+sub_instance; p; 1 11 0
+11 INSTANCE; Instance; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+type; d; 1 0 0
+part; p; 1 1005 0
+transform; p; 1 100 0
+assembly; p; 1 10 0
+next_in_part; p; 1 11 0
+prev_in_part; p; 1 11 0
+next_of_part; p; 1 11 0
+prev_of_part; p; 1 11 0
+12 BODY; Body; 1 21 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 0 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+body_box; b; 0 0 0
+body_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 12 0
+previous; p; 1 12 0
+body_type; d; 1 0 0
+shell; p; 1 13 0
+boundary_surface; p; 1 1006 0
+boundary_curve; p; 1 1008 0
+boundary_point; p; 1 29 0
+13 SHELL; Shell; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+body; p; 1 12 0
+next; p; 1 13 0
+face; p; 1 14 0
+edge; p; 1 16 0
+vertex; p; 1 18 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+14 FACE; Face; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+face_box; b; 0 0 0
+face_box_tightness; c; 0 0 0
+next; p; 1 14 0
+previous; p; 1 14 0
+loop; p; 1 15 0
+shell; p; 1 13 0
+surface; p; 1 1006 0
+sense; c; 1 0 0
+type; c; 1 0 0
+tolerance; f; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_surface; p; 1 14 0
+previous_on_surface; p; 1 14 0
+15 LOOP; Loop; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+face; p; 1 14 0
+next; p; 1 15 0
+type; c; 0 0 0
+16 EDGE; Edge; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+edge_box; b; 0 0 0
+edge_box_tightness; c; 0 0 0
+halfedge; p; 1 17 0
+previous; p; 1 16 0
+next; p; 1 16 0
+curve; p; 1 1008 0
+tolerance; f; 1 0 0
+next_on_curve; p; 1 16 0
+previous_on_curve; p; 1 16 0
+17 HALFEDGE; Halfedge; 1 11 0
+loop; p; 1 15 0
+forward; p; 1 17 0
+backward; p; 1 17 0
+vertex; p; 1 18 0
+other; p; 1 17 0
+edge; p; 1 16 0
+curve; p; 1 1008 0
+isoparm_type; c; 1 0 0
+isoparm_sense; c; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+18 VERTEX; Vertex; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+previous; p; 1 18 0
+next; p; 1 18 0
+point; p; 1 29 0
+tolerance; f; 1 0 0
+29 POINT; Point; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1011 0
+next; p; 1 29 0
+previous; p; 1 29 0
+geometric_owner; p; 1 141 0
+pvec; v; 1 0 0
+30 LINE; Straight line; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+pvec; v; 1 0 0
+direction; v; 1 0 0
+31 CIRCLE; Circle; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+radius; f; 1 0 0
+32 ELLIPSE; Ellipse; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+33 PARABOLA; Parabola; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+focal_length; f; 1 0 0
+34 HYPERBOLA; Hyperbola; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+transverse_radius; f; 1 0 0
+conjugate_radius; f; 1 0 0
+35 PARACURVE; Parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+seg; n; 1 0 0
+cpc; p; 1 48 0
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+segment; p; 1 1025 1
+37 PATCH_BOUND; Patch boundary; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+boundary; c; 1 0 0
+lh_patch; p; 1 61 0
+rh_patch; p; 1 61 0
+38 INTERSECTION; Intersection; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 2
+chart; p; 1 40 0
+start; p; 1 41 0
+end; p; 1 41 0
+39 SILHOUETTE; Silhouette; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+analytic_root; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+start; p; 1 41 0
+end; p; 1 41 0
+40 CHART; Chart; 1 6 1
+base_parameter; f; 1 0 0
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parameter_error; f; 1 0 2
+hvec; h; 1 0 1
+41 LIMIT; Limit; 1 2 1
+type; c; 1 0 0
+hvec; h; 1 0 1
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1
+segment_box; b; 0 0 0
+t_length; f; 1 0 0
+hull; p; 0 65 0
+bezier_vertices; f; 1 0 1
+43 BSPLINE_CURVE; B-spline curve; 1 5 0
+knot_vector; p; 1 44 0
+vertex_dimension; n; 1 0 0
+vertex_count; n; 1 0 0
+order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+44 KNOT_VECTOR; Knot vector; 1 3 1
+periodic; l; 1 0 0
+knot_count; n; 1 0 0
+knots; f; 1 0 1
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1
+vertices; f; 1 0 1
+46 OFFSET_CURVE; Offset curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+offset; f; 1 0 0
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0
+split; f; 1 0 0
+first; p; 1 1025 0
+last; p; 1 1025 0
+t_length; f; 1 0 0
+48 CPC; Composite parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+bezier; p; 1 103 0
+bspline; p; 1 43 0
+49 OBSOLETE_SP_CURVE; SP curve; 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+const_param; l; 1 0 0
+surface; p; 1 1006 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+bezier_vertices; f; 1 0 1
+50 PLANE; Plane; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+51 CYLINDER; Cylinder; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+x_axis; v; 1 0 0
+52 CONE; Cone; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+sin_half_angle; f; 1 0 0
+cos_half_angle; f; 1 0 0
+x_axis; v; 1 0 0
+53 SPHERE; Sphere; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+radius; f; 1 0 0
+axis; v; 1 0 0
+x_axis; v; 1 0 0
+54 TORUS; Torus; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+x_axis; v; 1 0 0
+55 PIPE; Pipe; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+spine; p; 1 1008 0
+radius; f; 1 0 0
+56 BLENDED_EDGE; Blended edge; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+blend_type; c; 1 0 0
+surface; p; 1 1006 2
+range; f; 1 0 2
+thumb_weight; f; 1 0 2
+spine; p; 1 1008 0
+boundary; p; 1 1006 2
+start; p; 1 41 0
+end; p; 1 41 0
+57 BLENDED_VERTEX; Blended vertex; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 3
+sub_surface; p; 1 1006 3
+range; f; 1 0 3
+thumb_weight; f; 1 0 3
+blend_type; c; 1 0 0
+centre; v; 1 0 0
+boundary; p; 1 1006 3
+58 BLEND_OVERLAP; Blend overlap; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 2
+sub_surface; p; 1 1006 4
+range; f; 1 0 4
+thumb_weight; f; 1 0 4
+blend_type; c; 1 0 2
+overlap_type; c; 1 0 0
+swap_u_v; l; 1 0 0
+59 BLEND_BOUND; Blend boundary; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+boundary; n; 1 0 0
+blend; p; 1 1006 0
+60 OFFSET_SURF; Offset surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 0
+offset; f; 1 0 0
+true_offset; l; 1 0 0
+scale; f; 1 0 0
+check; c; 1 0 0
+61 PARASURF; Parametric surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+col; n; 1 0 0
+row; n; 1 0 0
+cps; p; 1 69 0
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+patch; p; 1 1026 1
+63 SILH_SURF; Silhouette surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+64 BASIC_PATCH; Basic Patch; 1 6 1
+patch_box; b; 0 0 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+hull; p; 0 65 0
+scale; f; 0 0 0
+bezier_vertices; f; 1 0 1
+65 HULL; Convex hull; 0 4 1
+dimension; n; 1 0 0
+plane_count; n; 1 0 0
+corner_count; n; 1 0 0
+vecs; v; 1 0 1
+66 BSPLINE_SURF; B-spline surface; 1 8 0
+row_knots; p; 1 44 0
+col_knots; p; 1 44 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+67 SWEPT_SURF; Swept surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+section; p; 1 1008 0
+sweep; v; 1 0 0
+scale; f; 1 0 0
+68 SPUN_SURF; Spun surface; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+profile; p; 1 1008 0
+base; v; 1 0 0
+axis; v; 1 0 0
+start; v; 1 0 0
+end; v; 1 0 0
+x_axis; v; 1 0 0
+scale; f; 1 0 0
+69 CPS; Composite parametric surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+bezier; p; 1 104 0
+bspline; p; 1 66 0
+props; p; 0 123 0
+70 LIST; List Header; 1 12 0
+node_id; d; 1 0 0
+owner; p; 1 1013 0
+next; p; 1 70 0
+previous; p; 1 70 0
+assoc; p; 0 70 0
+list_type; d; 1 0 0
+list_length; d; 1 0 0
+block_length; d; 1 0 0
+size_of_entry; d; 1 0 0
+list_block; p; 1 1012 0
+finger_block; p; 1 1012 0
+finger_index; d; 1 0 0
+71 REAL_LIS_BLOCK; Real List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 71 0
+entries; f; 1 0 1
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 72 0
+entries; d; 1 0 1
+73 TAG_LIS_BLOCK; Tag List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 73 0
+entries; d; 1 0 1
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 74 0
+entries; p; 1 1001 1
+75 CHAR_LIS_BLOCK; Character List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 75 0
+entries; c; 1 0 1
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1
+string; c; 1 0 1
+80 ATTRIB_DEF; attribute definition; 1 6 1
+next; p; 1 80 0
+type_id; d; 1 0 0
+identifier; p; 1 79 0
+actions; d; 1 0 8
+legal_owners; l; 1 0 12
+fields; d; 1 0 1
+81 ATTRIBUTE; Attribute; 1 8 1
+node_id; d; 1 0 0
+definition; p; 1 80 0
+owner; p; 1 1015 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_of_type; p; 1 81 0
+previous_of_type; p; 1 81 0
+fields; p; 1 1018 1
+82 INT_VALUES; Int values; 1 1 1
+values; d; 1 0 1
+83 REAL_VALUES; Real values; 1 1 1
+values; f; 1 0 1
+84 CHAR_VALUES; Character values; 1 1 1
+values; c; 1 0 1
+85 POINT_VALUES; Point values; 1 1 1
+values; v; 1 0 1
+86 VECTOR_VALUES; Vector values; 1 1 1
+values; v; 1 0 1
+87 AXIS_VALUES; Axis values; 1 1 1
+values; v; 1 0 1
+88 TAG_VALUES; Tag values; 1 1 1
+values; d; 1 0 1
+89 DIRECTION_VALUES; Direction values; 1 1 1
+values; v; 1 0 1
+90 FEATURE; Feature; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1005 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+type; d; 1 0 0
+first_member; p; 1 91 0
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0
+dummy_node_id; d; 1 0 0
+owning_feature; p; 1 90 0
+owner; p; 1 1017 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_member; p; 1 91 0
+previous_member; p; 1 91 0
+100 TRANSFORM; Transformation; 1 8 0
+node_id; d; 1 0 0
+owner; p; 1 1023 0
+next; p; 1 100 0
+previous; p; 1 100 0
+rotation_matrix; f; 1 0 9
+translation_vector; v; 1 0 0
+scale; f; 1 0 0
+flag; d; 1 0 0
+101 WORLD; World; 1 29 0
+assembly; p; 1 10 0
+attribute; p; 1 81 0
+body; p; 1 12 0
+attrib_def; p; 1 80 0
+list; p; 1 70 0
+transform; p; 1 100 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+tag_table; p; 1 4 0
+linear_prec; f; 1 0 0
+angular_prec; f; 1 0 0
+parameter_check_on; l; 1 0 0
+journal_open; d; 1 0 0
+journal_on; l; 1 0 0
+bulletin_board_on; d; 1 0 0
+empty_bulletin_board; l; 1 0 0
+rollback_size; d; 1 0 0
+binary_text; d; 1 0 0
+snapshot_binary_text; d; 1 0 0
+receive_user_fld; l; 1 0 0
+local_check_on; l; 1 0 0
+data_check_on; l; 1 0 0
+self_int_check_on; l; 1 0 0
+composite_geometry; d; 1 0 0
+continuity_check; d; 1 0 0
+parameterisation; d; 1 0 0
+tag_limit; d; 1 0 0
+bulletin_board; p; 1 107 0
+102 KEY; Key; 1 1 1
+string; c; 1 0 1
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+check; c; 1 0 0
+segment; p; 1 1025 1
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+check; c; 1 0 0
+unsanitised; p; 0 108 0
+patch; p; 1 1026 1
+105 SUPER_PATCH; super patch of CPS; 1 6 0
+split; f; 1 0 0
+split_dir; c; 1 0 0
+first; p; 1 1026 0
+last; p; 1 1026 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+106 EVENT_FILTER; Event Filter; 1 14 0
+face; l; 1 0 0
+edge; l; 1 0 0
+vertex; l; 1 0 0
+loop; l; 1 0 0
+shell; l; 1 0 0
+instance; l; 1 0 0
+body; l; 1 0 0
+assembly; l; 1 0 0
+point; l; 1 0 0
+curve; l; 1 0 0
+surface; l; 1 0 0
+transform; l; 1 0 0
+feature; l; 1 0 0
+att_def; l; 1 0 0
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0
+create; p; 1 106 0
+delete; p; 1 106 0
+change; p; 1 106 0
+transform; p; 1 106 0
+split; p; 1 106 0
+merge; p; 1 106 0
+copy; p; 1 106 0
+transfer; p; 1 106 0
+change_attribute; p; 1 106 0
+event; p; 1 70 0
+entities; p; 1 70 0
+n_entities; p; 1 70 0
+entity_nt; p; 1 70 0
+entity_usfld; p; 1 70 0
+dt_log; l; 1 0 0
+dt_event; p; 1 70 0
+dt_entities; p; 1 70 0
+dt_n_entities; p; 1 70 0
+dt_entity_nt; p; 1 70 0
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1
+bad_patch; p; 1 64 1
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0
+next; p; 1 110 0
+forward; p; 1 110 0
+backward; p; 1 110 0
+class; d; 1 0 0
+set; p; 1 1021 0
+node; p; 1 1022 0
+111 FACE_SET; Face Set; 1 5 0
+tag; p; 1 110 0
+next; p; 1 111 0
+class; d; 1 0 0
+he_set; p; 1 112 0
+surfaces; p; 1 1006 0
+112 HALFEDGE_SET; Halfedge Set; 1 6 0
+tag; p; 1 110 0
+next; p; 1 112 0
+previous; p; 1 112 0
+class; d; 1 0 0
+fa_set; p; 1 111 0
+co_he_set; p; 1 112 0
+120 PE_SURF; PE_surface; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 123 0
+approx; p; 0 1026 0
+internal_geom; p; 1 1028 1
+121 INT_PE_DATA; int_PE_data; 1 3 0
+geom_type; d; 1 0 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+122 EXT_PE_DATA; ext_pe_data; 1 4 1
+key; p; 1 102 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+data; f; 0 0 1
+123 SU_PARAM_PROPS; su_param_props; 0 6 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+124 B_SURFACE; B surface; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+u_periodic; l; 1 0 0
+v_periodic; l; 1 0 0
+orig_uint; i; 1 0 0
+orig_vint; i; 1 0 0
+nurbs; p; 1 126 0
+data; p; 1 125 0
+125 SURFACE_DATA; Surface data; 1 21 0
+construction; d; 1 0 0
+convexity; d; 1 0 0
+u_continuity; d; 1 0 0
+v_continuity; d; 1 0 0
+bx; b; 1 0 0
+normal_bx; b; 1 0 0
+associated_curve; p; 1 0 0
+associated_surface; p; 1 0 0
+u_span_index; d; 0 0 0
+v_span_index; d; 0 0 0
+matrix; p; 0 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+uint; i; 0 0 0
+vint; i; 0 0 0
+u_start; c; 0 0 0
+u_end; c; 0 0 0
+v_start; c; 0 0 0
+v_end; c; 0 0 0
+u_deriv_angle_turned; f; 0 0 0
+v_deriv_angle_turned; f; 0 0 0
+126 NURBS_SURF; NURBS surface; 1 18 0
+u_degree; n; 1 0 0
+v_degree; n; 1 0 0
+n_u_vertices; n; 1 0 0
+n_v_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+u_knot_type; d; 1 0 0
+v_knot_type; d; 1 0 0
+n_u_knots; n; 1 0 0
+n_v_knots; n; 1 0 0
+u_knot_mult; p; 1 127 0
+v_knot_mult; p; 1 127 0
+u_knots; p; 1 128 0
+v_knots; p; 1 128 0
+rational; l; 1 0 0
+u_closed; l; 1 0 0
+v_closed; l; 1 0 0
+surface_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+127 KNOT_MULT; Knot multiplicities; 1 1 1
+mult; n; 1 0 1
+128 KNOT_SET; Knot set; 1 1 1
+knots; f; 1 0 1
+130 PE_CURVE; PE_curve; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 131 0
+approx; p; 0 1025 0
+internal_geom; p; 1 1028 1
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+132 PCURVE; General Bspline SP-curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+bspline; p; 1 43 0
+bsp_parms; l; 1 0 0
+133 TRIMMED_CURVE; Trimmed Curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+basis_curve; p; 1 1008 0
+point_1; v; 1 0 0
+point_2; v; 1 0 0
+parm_1; f; 1 0 0
+parm_2; f; 1 0 0
+134 B_CURVE; B curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+periodic; l; 1 0 0
+orig_tint; i; 1 0 0
+nurbs; p; 1 136 0
+data; p; 1 135 0
+135 CURVE_DATA; Curve data; 1 12 0
+construction; d; 1 0 0
+continuity; d; 1 0 0
+bx; b; 1 0 0
+associated_curve; p; 1 0 0
+associated_surface; p; 1 0 0
+span_index; d; 0 0 0
+matrix; p; 0 0 0
+parameter_scale; f; 0 0 0
+t_int; i; 0 0 0
+t_start; c; 0 0 0
+t_end; c; 0 0 0
+deriv_angle_turned; f; 0 0 0
+136 NURBS_CURVE; NURBS curve; 1 11 0
+degree; n; 1 0 0
+n_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+knot_type; d; 1 0 0
+n_knots; n; 1 0 0
+knot_mult; p; 1 127 0
+knots; p; 1 128 0
+closed; l; 1 0 0
+rational; l; 1 0 0
+curve_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+137 SP_CURVE; SP curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+chart; p; 0 138 0
+surface; p; 1 1006 0
+b_curve; p; 1 134 0
+138 SP_CHART; SP curve chart; 1 4 1
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parm; f; 1 0 1
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0
+owner; p; 1 1003 0
+next; p; 1 141 0
+previous; p; 1 141 0
+shared_geometry; p; 1 1003 0
+**************** end of schema SCH_5021 ****************
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5030.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5030.sch_txt
new file mode 100644
index 0000000..47e0ef9
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5030.sch_txt
@@ -0,0 +1,1011 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=3100;MC_ID=VAX18:167772164;OS=vms;OS_RELEASE=A5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5030;FILE=P_SCHEMA:SCH_5030.SCH_TXT;DATE=31-jul-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T
+1
+: SCHEMA FILE created by modeller version 500000/5030;
+142 105 893 12898
+1 NULLP; Null; 1 0 0
+2 WORKSPACE; Workspace; 1 1 1
+ws; c; 1 0 1
+3 USFD_TABLE; Userfield Table; 1 1 1
+usfd; d; 1 0 1
+4 TAG_TABLE; Tag Table; 1 7 1
+level; d; 1 0 0
+access_mode; d; 1 0 0
+n_slots_total; d; 1 0 0
+first_free_slot; d; 1 0 0
+n_dead_tags; d; 1 0 0
+usfd_table; p; 1 3 0
+down; p; 1 1024 1
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0
+root_tag_table; p; 1 4 0
+max_tag; d; 1 0 0
+tag_limit; d; 1 0 0
+10 ASSEMBLY; Assembly; 1 18 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 1 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+assembly_box; b; 0 0 0
+assembly_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 10 0
+previous; p; 1 10 0
+type; d; 1 0 0
+sub_instance; p; 1 11 0
+11 INSTANCE; Instance; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+type; d; 1 0 0
+part; p; 1 1005 0
+transform; p; 1 100 0
+assembly; p; 1 10 0
+next_in_part; p; 1 11 0
+prev_in_part; p; 1 11 0
+next_of_part; p; 1 11 0
+prev_of_part; p; 1 11 0
+12 BODY; Body; 1 21 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 0 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+body_box; b; 0 0 0
+body_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 12 0
+previous; p; 1 12 0
+body_type; d; 1 0 0
+shell; p; 1 13 0
+boundary_surface; p; 1 1006 0
+boundary_curve; p; 1 1008 0
+boundary_point; p; 1 29 0
+13 SHELL; Shell; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+body; p; 1 12 0
+next; p; 1 13 0
+face; p; 1 14 0
+edge; p; 1 16 0
+vertex; p; 1 18 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+14 FACE; Face; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+face_box; b; 0 0 0
+face_box_tightness; c; 0 0 0
+next; p; 1 14 0
+previous; p; 1 14 0
+loop; p; 1 15 0
+shell; p; 1 13 0
+surface; p; 1 1006 0
+sense; c; 1 0 0
+type; c; 1 0 0
+tolerance; f; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_surface; p; 1 14 0
+previous_on_surface; p; 1 14 0
+15 LOOP; Loop; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+face; p; 1 14 0
+next; p; 1 15 0
+type; c; 0 0 0
+16 EDGE; Edge; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+edge_box; b; 0 0 0
+edge_box_tightness; c; 0 0 0
+halfedge; p; 1 17 0
+previous; p; 1 16 0
+next; p; 1 16 0
+curve; p; 1 1008 0
+tolerance; f; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+17 HALFEDGE; Halfedge; 1 13 0
+loop; p; 1 15 0
+forward; p; 1 17 0
+backward; p; 1 17 0
+vertex; p; 1 18 0
+other; p; 1 17 0
+edge; p; 1 16 0
+curve; p; 1 1008 0
+isoparm_type; c; 1 0 0
+isoparm_sense; c; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+18 VERTEX; Vertex; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+previous; p; 1 18 0
+next; p; 1 18 0
+point; p; 1 29 0
+tolerance; f; 1 0 0
+29 POINT; Point; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1011 0
+next; p; 1 29 0
+previous; p; 1 29 0
+pvec; v; 1 0 0
+30 LINE; Straight line; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+pvec; v; 1 0 0
+direction; v; 1 0 0
+31 CIRCLE; Circle; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+radius; f; 1 0 0
+32 ELLIPSE; Ellipse; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+33 PARABOLA; Parabola; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+focal_length; f; 1 0 0
+34 HYPERBOLA; Hyperbola; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+transverse_radius; f; 1 0 0
+conjugate_radius; f; 1 0 0
+35 PARACURVE; Parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+seg; n; 1 0 0
+cpc; p; 1 48 0
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+segment; p; 1 1025 1
+37 PATCH_BOUND; Patch boundary; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+boundary; c; 1 0 0
+lh_patch; p; 1 61 0
+rh_patch; p; 1 61 0
+38 INTERSECTION; Intersection; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 2
+chart; p; 1 40 0
+start; p; 1 41 0
+end; p; 1 41 0
+39 SILHOUETTE; Silhouette; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+analytic_root; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+start; p; 1 41 0
+end; p; 1 41 0
+40 CHART; Chart; 1 6 1
+base_parameter; f; 1 0 0
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parameter_error; f; 1 0 2
+hvec; h; 1 0 1
+41 LIMIT; Limit; 1 2 1
+type; c; 1 0 0
+hvec; h; 1 0 1
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1
+segment_box; b; 0 0 0
+t_length; f; 1 0 0
+hull; p; 0 65 0
+bezier_vertices; f; 1 0 1
+43 BSPLINE_CURVE; B-spline curve; 1 5 0
+knot_vector; p; 1 44 0
+vertex_dimension; n; 1 0 0
+vertex_count; n; 1 0 0
+order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+44 KNOT_VECTOR; Knot vector; 1 3 1
+periodic; l; 1 0 0
+knot_count; n; 1 0 0
+knots; f; 1 0 1
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1
+vertices; f; 1 0 1
+46 OFFSET_CURVE; Offset curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+offset; f; 1 0 0
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0
+split; f; 1 0 0
+first; p; 1 1025 0
+last; p; 1 1025 0
+t_length; f; 1 0 0
+48 CPC; Composite parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+bezier; p; 1 103 0
+bspline; p; 1 43 0
+49 OBSOLETE_SP_CURVE; SP curve; 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+const_param; l; 1 0 0
+surface; p; 1 1006 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+bezier_vertices; f; 1 0 1
+50 PLANE; Plane; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+51 CYLINDER; Cylinder; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+x_axis; v; 1 0 0
+52 CONE; Cone; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+sin_half_angle; f; 1 0 0
+cos_half_angle; f; 1 0 0
+x_axis; v; 1 0 0
+53 SPHERE; Sphere; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+radius; f; 1 0 0
+axis; v; 1 0 0
+x_axis; v; 1 0 0
+54 TORUS; Torus; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+x_axis; v; 1 0 0
+55 PIPE; Pipe; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+spine; p; 1 1008 0
+radius; f; 1 0 0
+56 BLENDED_EDGE; Blended edge; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+blend_type; c; 1 0 0
+surface; p; 1 1006 2
+range; f; 1 0 2
+thumb_weight; f; 1 0 2
+spine; p; 1 1008 0
+boundary; p; 1 1006 2
+start; p; 1 41 0
+end; p; 1 41 0
+57 BLENDED_VERTEX; Blended vertex; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 3
+sub_surface; p; 1 1006 3
+range; f; 1 0 3
+thumb_weight; f; 1 0 3
+blend_type; c; 1 0 0
+centre; v; 1 0 0
+boundary; p; 1 1006 3
+58 BLEND_OVERLAP; Blend overlap; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 2
+sub_surface; p; 1 1006 4
+range; f; 1 0 4
+thumb_weight; f; 1 0 4
+blend_type; c; 1 0 2
+overlap_type; c; 1 0 0
+swap_u_v; l; 1 0 0
+59 BLEND_BOUND; Blend boundary; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+boundary; n; 1 0 0
+blend; p; 1 1006 0
+60 OFFSET_SURF; Offset surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 0
+offset; f; 1 0 0
+true_offset; l; 1 0 0
+scale; f; 1 0 0
+check; c; 1 0 0
+61 PARASURF; Parametric surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+col; n; 1 0 0
+row; n; 1 0 0
+cps; p; 1 69 0
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+patch; p; 1 1026 1
+63 SILH_SURF; Silhouette surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+64 BASIC_PATCH; Basic Patch; 1 6 1
+patch_box; b; 0 0 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+hull; p; 0 65 0
+scale; f; 0 0 0
+bezier_vertices; f; 1 0 1
+65 HULL; Convex hull; 0 4 1
+dimension; n; 1 0 0
+plane_count; n; 1 0 0
+corner_count; n; 1 0 0
+vecs; v; 1 0 1
+66 BSPLINE_SURF; B-spline surface; 1 8 0
+row_knots; p; 1 44 0
+col_knots; p; 1 44 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+67 SWEPT_SURF; Swept surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+section; p; 1 1008 0
+sweep; v; 1 0 0
+scale; f; 1 0 0
+68 SPUN_SURF; Spun surface; 1 17 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+profile; p; 1 1008 0
+base; v; 1 0 0
+axis; v; 1 0 0
+start; v; 1 0 0
+end; v; 1 0 0
+start_param; f; 1 0 0
+end_param; f; 1 0 0
+x_axis; v; 1 0 0
+scale; f; 1 0 0
+69 CPS; Composite parametric surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+bezier; p; 1 104 0
+bspline; p; 1 66 0
+props; p; 0 123 0
+70 LIST; List Header; 1 11 0
+node_id; d; 1 0 0
+owner; p; 1 1013 0
+next; p; 1 70 0
+previous; p; 1 70 0
+list_type; d; 1 0 0
+list_length; d; 1 0 0
+block_length; d; 1 0 0
+size_of_entry; d; 1 0 0
+list_block; p; 1 1012 0
+finger_block; p; 1 1012 0
+finger_index; d; 1 0 0
+71 REAL_LIS_BLOCK; Real List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 71 0
+entries; f; 1 0 1
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 72 0
+entries; d; 1 0 1
+73 TAG_LIS_BLOCK; Tag List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 73 0
+entries; d; 1 0 1
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 74 0
+entries; p; 1 1001 1
+75 CHAR_LIS_BLOCK; Character List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 75 0
+entries; c; 1 0 1
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1
+string; c; 1 0 1
+80 ATTRIB_DEF; attribute definition; 1 6 1
+next; p; 1 80 0
+type_id; d; 1 0 0
+identifier; p; 1 79 0
+actions; d; 1 0 8
+legal_owners; l; 1 0 12
+fields; d; 1 0 1
+81 ATTRIBUTE; Attribute; 1 8 1
+node_id; d; 1 0 0
+definition; p; 1 80 0
+owner; p; 1 1015 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_of_type; p; 1 81 0
+previous_of_type; p; 1 81 0
+fields; p; 1 1018 1
+82 INT_VALUES; Int values; 1 1 1
+values; d; 1 0 1
+83 REAL_VALUES; Real values; 1 1 1
+values; f; 1 0 1
+84 CHAR_VALUES; Character values; 1 1 1
+values; c; 1 0 1
+85 POINT_VALUES; Point values; 1 1 1
+values; v; 1 0 1
+86 VECTOR_VALUES; Vector values; 1 1 1
+values; v; 1 0 1
+87 AXIS_VALUES; Axis values; 1 1 1
+values; v; 1 0 1
+88 TAG_VALUES; Tag values; 1 1 1
+values; d; 1 0 1
+89 DIRECTION_VALUES; Direction values; 1 1 1
+values; v; 1 0 1
+90 FEATURE; Feature; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1005 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+type; d; 1 0 0
+first_member; p; 1 91 0
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0
+dummy_node_id; d; 1 0 0
+owning_feature; p; 1 90 0
+owner; p; 1 1017 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_member; p; 1 91 0
+previous_member; p; 1 91 0
+100 TRANSFORM; Transformation; 1 8 0
+node_id; d; 1 0 0
+owner; p; 1 1023 0
+next; p; 1 100 0
+previous; p; 1 100 0
+rotation_matrix; f; 1 0 9
+translation_vector; v; 1 0 0
+scale; f; 1 0 0
+flag; d; 1 0 0
+101 WORLD; World; 1 29 0
+assembly; p; 1 10 0
+attribute; p; 1 81 0
+body; p; 1 12 0
+attrib_def; p; 1 80 0
+list; p; 1 70 0
+transform; p; 1 100 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+tag_table; p; 1 4 0
+linear_prec; f; 1 0 0
+angular_prec; f; 1 0 0
+parameter_check_on; l; 1 0 0
+journal_open; d; 1 0 0
+journal_on; l; 1 0 0
+bulletin_board_on; d; 1 0 0
+empty_bulletin_board; l; 1 0 0
+rollback_size; d; 1 0 0
+binary_text; d; 1 0 0
+snapshot_binary_text; d; 1 0 0
+receive_user_fld; l; 1 0 0
+local_check_on; l; 1 0 0
+data_check_on; l; 1 0 0
+self_int_check_on; l; 1 0 0
+composite_geometry; d; 1 0 0
+continuity_check; d; 1 0 0
+parameterisation; d; 1 0 0
+tag_limit; d; 1 0 0
+bulletin_board; p; 1 107 0
+102 KEY; Key; 1 1 1
+string; c; 1 0 1
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+check; c; 1 0 0
+segment; p; 1 1025 1
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+check; c; 1 0 0
+unsanitised; p; 0 108 0
+patch; p; 1 1026 1
+105 SUPER_PATCH; super patch of CPS; 1 6 0
+split; f; 1 0 0
+split_dir; c; 1 0 0
+first; p; 1 1026 0
+last; p; 1 1026 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+106 EVENT_FILTER; Event Filter; 1 14 0
+face; l; 1 0 0
+edge; l; 1 0 0
+vertex; l; 1 0 0
+loop; l; 1 0 0
+shell; l; 1 0 0
+instance; l; 1 0 0
+body; l; 1 0 0
+assembly; l; 1 0 0
+point; l; 1 0 0
+curve; l; 1 0 0
+surface; l; 1 0 0
+transform; l; 1 0 0
+feature; l; 1 0 0
+att_def; l; 1 0 0
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0
+create; p; 1 106 0
+delete; p; 1 106 0
+change; p; 1 106 0
+transform; p; 1 106 0
+split; p; 1 106 0
+merge; p; 1 106 0
+copy; p; 1 106 0
+transfer; p; 1 106 0
+change_attribute; p; 1 106 0
+event; p; 1 70 0
+entities; p; 1 70 0
+n_entities; p; 1 70 0
+entity_nt; p; 1 70 0
+entity_usfld; p; 1 70 0
+dt_log; l; 1 0 0
+dt_event; p; 1 70 0
+dt_entities; p; 1 70 0
+dt_n_entities; p; 1 70 0
+dt_entity_nt; p; 1 70 0
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1
+bad_patch; p; 1 64 1
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0
+next; p; 1 110 0
+forward; p; 1 110 0
+backward; p; 1 110 0
+class; d; 1 0 0
+set; p; 1 1021 0
+node; p; 1 1022 0
+111 FACE_SET; Face Set; 1 5 0
+tag; p; 1 110 0
+next; p; 1 111 0
+class; d; 1 0 0
+he_set; p; 1 112 0
+surfaces; p; 1 1006 0
+112 HALFEDGE_SET; Halfedge Set; 1 6 0
+tag; p; 1 110 0
+next; p; 1 112 0
+previous; p; 1 112 0
+class; d; 1 0 0
+fa_set; p; 1 111 0
+co_he_set; p; 1 112 0
+120 PE_SURF; PE_surface; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 123 0
+approx; p; 0 1026 0
+internal_geom; p; 1 1028 1
+121 INT_PE_DATA; int_PE_data; 1 3 0
+geom_type; d; 1 0 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+122 EXT_PE_DATA; ext_pe_data; 1 4 1
+key; p; 1 102 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+data; f; 0 0 1
+123 SU_PARAM_PROPS; su_param_props; 0 6 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+124 B_SURFACE; B surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+nurbs; p; 1 126 0
+data; p; 1 125 0
+125 SURFACE_DATA; Surface data; 1 8 0
+original_u_range; i; 1 0 0
+original_v_range; i; 1 0 0
+convexity; d; 1 0 0
+bx; b; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+u_tangent_half_angle; f; 0 0 0
+v_tangent_half_angle; f; 0 0 0
+126 NURBS_SURF; NURBS surface; 1 20 0
+u_periodic; l; 1 0 0
+v_periodic; l; 1 0 0
+u_degree; n; 1 0 0
+v_degree; n; 1 0 0
+n_u_vertices; n; 1 0 0
+n_v_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+u_knot_type; d; 1 0 0
+v_knot_type; d; 1 0 0
+n_u_knots; n; 1 0 0
+n_v_knots; n; 1 0 0
+u_knot_mult; p; 1 127 0
+v_knot_mult; p; 1 127 0
+u_knots; p; 1 128 0
+v_knots; p; 1 128 0
+rational; l; 1 0 0
+u_closed; l; 1 0 0
+v_closed; l; 1 0 0
+surface_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+127 KNOT_MULT; Knot multiplicities; 1 1 1
+mult; n; 1 0 1
+128 KNOT_SET; Knot set; 1 1 1
+knots; f; 1 0 1
+130 PE_CURVE; PE_curve; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 131 0
+approx; p; 0 1025 0
+internal_geom; p; 1 1028 1
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+132 PCURVE; General Bspline SP-curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+bspline; p; 1 43 0
+bsp_parms; l; 1 0 0
+133 TRIMMED_CURVE; Trimmed Curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+basis_curve; p; 1 1008 0
+point_1; v; 1 0 0
+point_2; v; 1 0 0
+parm_1; f; 1 0 0
+parm_2; f; 1 0 0
+134 B_CURVE; B curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 1 0 0
+nurbs; p; 1 136 0
+data; p; 1 135 0
+135 CURVE_DATA; Curve data; 1 4 0
+original_range; i; 1 0 0
+bx; b; 1 0 0
+parameter_scale; f; 0 0 0
+tangent_half_angle; f; 0 0 0
+136 NURBS_CURVE; NURBS curve; 1 12 0
+degree; n; 1 0 0
+n_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+knot_type; d; 1 0 0
+n_knots; n; 1 0 0
+knot_mult; p; 1 127 0
+knots; p; 1 128 0
+periodic; l; 1 0 0
+closed; l; 1 0 0
+rational; l; 1 0 0
+curve_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+137 SP_CURVE; SP curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+chart; p; 0 138 0
+surface; p; 1 1006 0
+b_curve; p; 1 134 0
+138 SP_CHART; SP curve chart; 1 4 1
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parm; f; 1 0 1
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0
+owner; p; 1 1003 0
+next; p; 1 141 0
+previous; p; 1 141 0
+shared_geometry; p; 1 1003 0
+**************** end of schema SCH_5030 ****************
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5031.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5031.sch_txt
new file mode 100644
index 0000000..bfd11ea
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5031.sch_txt
@@ -0,0 +1,1011 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=8530;MC_ID=SHAPEG:109072734;OS=vms;OS_RELEASE=A5.5;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=te
+xt;GUISE=schema;KEY=SCH_5031;FILE=P_SCHEMA:SCH_5031.SCH_TXT;DATE=11-sep-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T
+1
+: SCHEMA FILE created by modeller version 500000/5031;
+142 105 893 12898
+1 NULLP; Null; 1 0 0
+2 WORKSPACE; Workspace; 1 1 1
+ws; c; 1 0 1
+3 USFD_TABLE; Userfield Table; 1 1 1
+usfd; d; 1 0 1
+4 TAG_TABLE; Tag Table; 1 7 1
+level; d; 1 0 0
+access_mode; d; 1 0 0
+n_slots_total; d; 1 0 0
+first_free_slot; d; 1 0 0
+n_dead_tags; d; 1 0 0
+usfd_table; p; 1 3 0
+down; p; 1 1024 1
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0
+root_tag_table; p; 1 4 0
+max_tag; d; 1 0 0
+tag_limit; d; 1 0 0
+10 ASSEMBLY; Assembly; 1 18 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 1 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+assembly_box; b; 0 0 0
+assembly_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 10 0
+previous; p; 1 10 0
+type; d; 1 0 0
+sub_instance; p; 1 11 0
+11 INSTANCE; Instance; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+type; d; 1 0 0
+part; p; 1 1005 0
+transform; p; 1 100 0
+assembly; p; 1 10 0
+next_in_part; p; 1 11 0
+prev_in_part; p; 1 11 0
+next_of_part; p; 1 11 0
+prev_of_part; p; 1 11 0
+12 BODY; Body; 1 21 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 0 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+body_box; b; 0 0 0
+body_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 12 0
+previous; p; 1 12 0
+body_type; d; 1 0 0
+shell; p; 1 13 0
+boundary_surface; p; 1 1006 0
+boundary_curve; p; 1 1008 0
+boundary_point; p; 1 29 0
+13 SHELL; Shell; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+body; p; 1 12 0
+next; p; 1 13 0
+face; p; 1 14 0
+edge; p; 1 16 0
+vertex; p; 1 18 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+14 FACE; Face; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+face_box; b; 0 0 0
+face_box_tightness; c; 0 0 0
+next; p; 1 14 0
+previous; p; 1 14 0
+loop; p; 1 15 0
+shell; p; 1 13 0
+surface; p; 1 1006 0
+sense; c; 1 0 0
+type; c; 1 0 0
+tolerance; f; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_surface; p; 1 14 0
+previous_on_surface; p; 1 14 0
+15 LOOP; Loop; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+face; p; 1 14 0
+next; p; 1 15 0
+type; c; 0 0 0
+16 EDGE; Edge; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+edge_box; b; 0 0 0
+edge_box_tightness; c; 0 0 0
+halfedge; p; 1 17 0
+previous; p; 1 16 0
+next; p; 1 16 0
+curve; p; 1 1008 0
+tolerance; f; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+17 HALFEDGE; Halfedge; 1 13 0
+loop; p; 1 15 0
+forward; p; 1 17 0
+backward; p; 1 17 0
+vertex; p; 1 18 0
+other; p; 1 17 0
+edge; p; 1 16 0
+curve; p; 1 1008 0
+isoparm_type; c; 1 0 0
+isoparm_sense; c; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+18 VERTEX; Vertex; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+previous; p; 1 18 0
+next; p; 1 18 0
+point; p; 1 29 0
+tolerance; f; 1 0 0
+29 POINT; Point; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1011 0
+next; p; 1 29 0
+previous; p; 1 29 0
+pvec; v; 1 0 0
+30 LINE; Straight line; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+pvec; v; 1 0 0
+direction; v; 1 0 0
+31 CIRCLE; Circle; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+radius; f; 1 0 0
+32 ELLIPSE; Ellipse; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+33 PARABOLA; Parabola; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+focal_length; f; 1 0 0
+34 HYPERBOLA; Hyperbola; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+transverse_radius; f; 1 0 0
+conjugate_radius; f; 1 0 0
+35 PARACURVE; Parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+seg; n; 1 0 0
+cpc; p; 1 48 0
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+segment; p; 1 1025 1
+37 PATCH_BOUND; Patch boundary; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+boundary; c; 1 0 0
+lh_patch; p; 1 61 0
+rh_patch; p; 1 61 0
+38 INTERSECTION; Intersection; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 2
+chart; p; 1 40 0
+start; p; 1 41 0
+end; p; 1 41 0
+39 SILHOUETTE; Silhouette; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+analytic_root; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+start; p; 1 41 0
+end; p; 1 41 0
+40 CHART; Chart; 1 6 1
+base_parameter; f; 1 0 0
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parameter_error; f; 1 0 2
+hvec; h; 1 0 1
+41 LIMIT; Limit; 1 2 1
+type; c; 1 0 0
+hvec; h; 1 0 1
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1
+segment_box; b; 0 0 0
+t_length; f; 1 0 0
+hull; p; 0 65 0
+bezier_vertices; f; 1 0 1
+43 BSPLINE_CURVE; B-spline curve; 1 5 0
+knot_vector; p; 1 44 0
+vertex_dimension; n; 1 0 0
+vertex_count; n; 1 0 0
+order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+44 KNOT_VECTOR; Knot vector; 1 3 1
+periodic; l; 1 0 0
+knot_count; n; 1 0 0
+knots; f; 1 0 1
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1
+vertices; f; 1 0 1
+46 OFFSET_CURVE; Offset curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+offset; f; 1 0 0
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0
+split; f; 1 0 0
+first; p; 1 1025 0
+last; p; 1 1025 0
+t_length; f; 1 0 0
+48 CPC; Composite parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+bezier; p; 1 103 0
+bspline; p; 1 43 0
+49 OBSOLETE_SP_CURVE; SP curve; 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+const_param; l; 1 0 0
+surface; p; 1 1006 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+bezier_vertices; f; 1 0 1
+50 PLANE; Plane; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+51 CYLINDER; Cylinder; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+x_axis; v; 1 0 0
+52 CONE; Cone; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+sin_half_angle; f; 1 0 0
+cos_half_angle; f; 1 0 0
+x_axis; v; 1 0 0
+53 SPHERE; Sphere; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+radius; f; 1 0 0
+axis; v; 1 0 0
+x_axis; v; 1 0 0
+54 TORUS; Torus; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+x_axis; v; 1 0 0
+55 PIPE; Pipe; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+spine; p; 1 1008 0
+radius; f; 1 0 0
+56 BLENDED_EDGE; Blended edge; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+blend_type; c; 1 0 0
+surface; p; 1 1006 2
+range; f; 1 0 2
+thumb_weight; f; 1 0 2
+spine; p; 1 1008 0
+boundary; p; 1 1006 2
+start; p; 1 41 0
+end; p; 1 41 0
+57 BLENDED_VERTEX; Blended vertex; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 3
+sub_surface; p; 1 1006 3
+range; f; 1 0 3
+thumb_weight; f; 1 0 3
+blend_type; c; 1 0 0
+centre; v; 1 0 0
+boundary; p; 1 1006 3
+58 BLEND_OVERLAP; Blend overlap; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 2
+sub_surface; p; 1 1006 4
+range; f; 1 0 4
+thumb_weight; f; 1 0 4
+blend_type; c; 1 0 2
+overlap_type; c; 1 0 0
+swap_u_v; l; 1 0 0
+59 BLEND_BOUND; Blend boundary; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+boundary; n; 1 0 0
+blend; p; 1 1006 0
+60 OFFSET_SURF; Offset surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 0
+offset; f; 1 0 0
+true_offset; l; 1 0 0
+scale; f; 1 0 0
+check; c; 1 0 0
+61 PARASURF; Parametric surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+col; n; 1 0 0
+row; n; 1 0 0
+cps; p; 1 69 0
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+patch; p; 1 1026 1
+63 SILH_SURF; Silhouette surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+64 BASIC_PATCH; Basic Patch; 1 6 1
+patch_box; b; 0 0 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+hull; p; 0 65 0
+scale; f; 0 0 0
+bezier_vertices; f; 1 0 1
+65 HULL; Convex hull; 0 4 1
+dimension; n; 1 0 0
+plane_count; n; 1 0 0
+corner_count; n; 1 0 0
+vecs; v; 1 0 1
+66 BSPLINE_SURF; B-spline surface; 1 8 0
+row_knots; p; 1 44 0
+col_knots; p; 1 44 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+67 SWEPT_SURF; Swept surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+section; p; 1 1008 0
+sweep; v; 1 0 0
+scale; f; 1 0 0
+68 SPUN_SURF; Spun surface; 1 17 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+profile; p; 1 1008 0
+base; v; 1 0 0
+axis; v; 1 0 0
+start; v; 1 0 0
+end; v; 1 0 0
+start_param; f; 1 0 0
+end_param; f; 1 0 0
+x_axis; v; 1 0 0
+scale; f; 1 0 0
+69 CPS; Composite parametric surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+bezier; p; 1 104 0
+bspline; p; 1 66 0
+props; p; 0 123 0
+70 LIST; List Header; 1 11 0
+node_id; d; 1 0 0
+owner; p; 1 1013 0
+next; p; 1 70 0
+previous; p; 1 70 0
+list_type; d; 1 0 0
+list_length; d; 1 0 0
+block_length; d; 1 0 0
+size_of_entry; d; 1 0 0
+list_block; p; 1 1012 0
+finger_block; p; 1 1012 0
+finger_index; d; 1 0 0
+71 REAL_LIS_BLOCK; Real List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 71 0
+entries; f; 1 0 1
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 72 0
+entries; d; 1 0 1
+73 TAG_LIS_BLOCK; Tag List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 73 0
+entries; d; 1 0 1
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 74 0
+entries; p; 1 1001 1
+75 CHAR_LIS_BLOCK; Character List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 75 0
+entries; c; 1 0 1
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1
+string; c; 1 0 1
+80 ATTRIB_DEF; attribute definition; 1 6 1
+next; p; 1 80 0
+type_id; d; 1 0 0
+identifier; p; 1 79 0
+actions; d; 1 0 8
+legal_owners; l; 1 0 12
+fields; d; 1 0 1
+81 ATTRIBUTE; Attribute; 1 8 1
+node_id; d; 1 0 0
+definition; p; 1 80 0
+owner; p; 1 1015 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_of_type; p; 1 81 0
+previous_of_type; p; 1 81 0
+fields; p; 1 1018 1
+82 INT_VALUES; Int values; 1 1 1
+values; d; 1 0 1
+83 REAL_VALUES; Real values; 1 1 1
+values; f; 1 0 1
+84 CHAR_VALUES; Character values; 1 1 1
+values; c; 1 0 1
+85 POINT_VALUES; Point values; 1 1 1
+values; v; 1 0 1
+86 VECTOR_VALUES; Vector values; 1 1 1
+values; v; 1 0 1
+87 AXIS_VALUES; Axis values; 1 1 1
+values; v; 1 0 1
+88 TAG_VALUES; Tag values; 1 1 1
+values; d; 1 0 1
+89 DIRECTION_VALUES; Direction values; 1 1 1
+values; v; 1 0 1
+90 FEATURE; Feature; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1005 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+type; d; 1 0 0
+first_member; p; 1 91 0
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0
+dummy_node_id; d; 1 0 0
+owning_feature; p; 1 90 0
+owner; p; 1 1017 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_member; p; 1 91 0
+previous_member; p; 1 91 0
+100 TRANSFORM; Transformation; 1 8 0
+node_id; d; 1 0 0
+owner; p; 1 1023 0
+next; p; 1 100 0
+previous; p; 1 100 0
+rotation_matrix; f; 1 0 9
+translation_vector; v; 1 0 0
+scale; f; 1 0 0
+flag; d; 1 0 0
+101 WORLD; World; 1 29 0
+assembly; p; 1 10 0
+attribute; p; 1 81 0
+body; p; 1 12 0
+attrib_def; p; 1 80 0
+list; p; 1 70 0
+transform; p; 1 100 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+tag_table; p; 1 4 0
+linear_prec; f; 1 0 0
+angular_prec; f; 1 0 0
+parameter_check_on; l; 1 0 0
+journal_open; d; 1 0 0
+journal_on; l; 1 0 0
+bulletin_board_on; d; 1 0 0
+empty_bulletin_board; l; 1 0 0
+rollback_size; d; 1 0 0
+binary_text; d; 1 0 0
+snapshot_binary_text; d; 1 0 0
+receive_user_fld; l; 1 0 0
+local_check_on; l; 1 0 0
+data_check_on; l; 1 0 0
+self_int_check_on; l; 1 0 0
+composite_geometry; d; 1 0 0
+continuity_check; d; 1 0 0
+parameterisation; d; 1 0 0
+tag_limit; d; 1 0 0
+bulletin_board; p; 1 107 0
+102 KEY; Key; 1 1 1
+string; c; 1 0 1
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+check; c; 1 0 0
+segment; p; 1 1025 1
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+check; c; 1 0 0
+unsanitised; p; 0 108 0
+patch; p; 1 1026 1
+105 SUPER_PATCH; super patch of CPS; 1 6 0
+split; f; 1 0 0
+split_dir; c; 1 0 0
+first; p; 1 1026 0
+last; p; 1 1026 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+106 EVENT_FILTER; Event Filter; 1 14 0
+face; l; 1 0 0
+edge; l; 1 0 0
+vertex; l; 1 0 0
+loop; l; 1 0 0
+shell; l; 1 0 0
+instance; l; 1 0 0
+body; l; 1 0 0
+assembly; l; 1 0 0
+point; l; 1 0 0
+curve; l; 1 0 0
+surface; l; 1 0 0
+transform; l; 1 0 0
+feature; l; 1 0 0
+att_def; l; 1 0 0
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0
+create; p; 1 106 0
+delete; p; 1 106 0
+change; p; 1 106 0
+transform; p; 1 106 0
+split; p; 1 106 0
+merge; p; 1 106 0
+copy; p; 1 106 0
+transfer; p; 1 106 0
+change_attribute; p; 1 106 0
+event; p; 1 70 0
+entities; p; 1 70 0
+n_entities; p; 1 70 0
+entity_nt; p; 1 70 0
+entity_usfld; p; 1 70 0
+dt_log; l; 1 0 0
+dt_event; p; 1 70 0
+dt_entities; p; 1 70 0
+dt_n_entities; p; 1 70 0
+dt_entity_nt; p; 1 70 0
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1
+bad_patch; p; 1 64 1
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0
+next; p; 1 110 0
+forward; p; 1 110 0
+backward; p; 1 110 0
+class; d; 1 0 0
+set; p; 1 1021 0
+node; p; 1 1022 0
+111 FACE_SET; Face Set; 1 5 0
+tag; p; 1 110 0
+next; p; 1 111 0
+class; d; 1 0 0
+he_set; p; 1 112 0
+surfaces; p; 1 1006 0
+112 HALFEDGE_SET; Halfedge Set; 1 6 0
+tag; p; 1 110 0
+next; p; 1 112 0
+previous; p; 1 112 0
+class; d; 1 0 0
+fa_set; p; 1 111 0
+co_he_set; p; 1 112 0
+120 PE_SURF; PE_surface; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 123 0
+approx; p; 0 1026 0
+internal_geom; p; 1 1028 1
+121 INT_PE_DATA; int_PE_data; 1 3 0
+geom_type; d; 1 0 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+122 EXT_PE_DATA; ext_pe_data; 1 4 1
+key; p; 1 102 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+data; f; 0 0 1
+123 SU_PARAM_PROPS; su_param_props; 0 6 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+124 B_SURFACE; B surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+nurbs; p; 1 126 0
+data; p; 1 125 0
+125 SURFACE_DATA; Surface data; 1 8 0
+original_u_range; i; 1 0 0
+original_v_range; i; 1 0 0
+convexity; d; 1 0 0
+bx; b; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+u_tangent_half_angle; f; 0 0 0
+v_tangent_half_angle; f; 0 0 0
+126 NURBS_SURF; NURBS surface; 1 20 0
+u_periodic; l; 1 0 0
+v_periodic; l; 1 0 0
+u_degree; n; 1 0 0
+v_degree; n; 1 0 0
+n_u_vertices; n; 1 0 0
+n_v_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+u_knot_type; d; 1 0 0
+v_knot_type; d; 1 0 0
+n_u_knots; n; 1 0 0
+n_v_knots; n; 1 0 0
+u_knot_mult; p; 1 127 0
+v_knot_mult; p; 1 127 0
+u_knots; p; 1 128 0
+v_knots; p; 1 128 0
+rational; l; 1 0 0
+u_closed; l; 1 0 0
+v_closed; l; 1 0 0
+surface_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+127 KNOT_MULT; Knot multiplicities; 1 1 1
+mult; n; 1 0 1
+128 KNOT_SET; Knot set; 1 1 1
+knots; f; 1 0 1
+130 PE_CURVE; PE_curve; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 131 0
+approx; p; 0 1025 0
+internal_geom; p; 1 1028 1
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+132 PCURVE; General Bspline SP-curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+bspline; p; 1 43 0
+bsp_parms; l; 1 0 0
+133 TRIMMED_CURVE; Trimmed Curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+basis_curve; p; 1 1008 0
+point_1; v; 1 0 0
+point_2; v; 1 0 0
+parm_1; f; 1 0 0
+parm_2; f; 1 0 0
+134 B_CURVE; B curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 1 0 0
+nurbs; p; 1 136 0
+data; p; 1 135 0
+135 CURVE_DATA; Curve data; 1 4 0
+original_range; i; 1 0 0
+bx; b; 1 0 0
+parameter_scale; f; 0 0 0
+tangent_half_angle; f; 0 0 0
+136 NURBS_CURVE; NURBS curve; 1 12 0
+degree; n; 1 0 0
+n_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+knot_type; d; 1 0 0
+n_knots; n; 1 0 0
+knot_mult; p; 1 127 0
+knots; p; 1 128 0
+periodic; l; 1 0 0
+closed; l; 1 0 0
+rational; l; 1 0 0
+curve_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+137 SP_CURVE; SP curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+chart; p; 0 138 0
+surface; p; 1 1006 0
+b_curve; p; 1 134 0
+138 SP_CHART; SP curve chart; 1 4 1
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parm; f; 1 0 1
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0
+owner; p; 1 1003 0
+next; p; 1 141 0
+previous; p; 1 141 0
+shared_geometry; p; 1 1003 0
+**************** end of schema SCH_5031 ****************
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5032.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5032.sch_txt
new file mode 100644
index 0000000..eacb232
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5032.sch_txt
@@ -0,0 +1,1013 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=6310;MC_ID=SHAPEK:167772165;OS=vms;OS_RELEASE=A5.5;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=te
+xt;GUISE=schema;KEY=SCH_5032;FILE=P_SCHEMA:SCH_5032.SCH_TXT;DATE=12-oct-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T
+1
+: SCHEMA FILE created by modeller version 500000/5032;
+142 105 895 12902
+1 NULLP; Null; 1 0 0
+2 WORKSPACE; Workspace; 1 1 1
+ws; c; 1 0 1
+3 USFD_TABLE; Userfield Table; 1 1 1
+usfd; d; 1 0 1
+4 TAG_TABLE; Tag Table; 1 7 1
+level; d; 1 0 0
+access_mode; d; 1 0 0
+n_slots_total; d; 1 0 0
+first_free_slot; d; 1 0 0
+n_dead_tags; d; 1 0 0
+usfd_table; p; 1 3 0
+down; p; 1 1024 1
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0
+root_tag_table; p; 1 4 0
+max_tag; d; 1 0 0
+tag_limit; d; 1 0 0
+10 ASSEMBLY; Assembly; 1 18 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 1 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+assembly_box; b; 0 0 0
+assembly_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 10 0
+previous; p; 1 10 0
+type; d; 1 0 0
+sub_instance; p; 1 11 0
+11 INSTANCE; Instance; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+type; d; 1 0 0
+part; p; 1 1005 0
+transform; p; 1 100 0
+assembly; p; 1 10 0
+next_in_part; p; 1 11 0
+prev_in_part; p; 1 11 0
+next_of_part; p; 1 11 0
+prev_of_part; p; 1 11 0
+12 BODY; Body; 1 21 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 0 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+body_box; b; 0 0 0
+body_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 12 0
+previous; p; 1 12 0
+body_type; d; 1 0 0
+shell; p; 1 13 0
+boundary_surface; p; 1 1006 0
+boundary_curve; p; 1 1008 0
+boundary_point; p; 1 29 0
+13 SHELL; Shell; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+body; p; 1 12 0
+next; p; 1 13 0
+face; p; 1 14 0
+edge; p; 1 16 0
+vertex; p; 1 18 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+14 FACE; Face; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+face_box; b; 0 0 0
+face_box_tightness; c; 0 0 0
+next; p; 1 14 0
+previous; p; 1 14 0
+loop; p; 1 15 0
+shell; p; 1 13 0
+surface; p; 1 1006 0
+sense; c; 1 0 0
+type; c; 1 0 0
+tolerance; f; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_surface; p; 1 14 0
+previous_on_surface; p; 1 14 0
+15 LOOP; Loop; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+face; p; 1 14 0
+next; p; 1 15 0
+type; c; 0 0 0
+16 EDGE; Edge; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+edge_box; b; 0 0 0
+edge_box_tightness; c; 0 0 0
+halfedge; p; 1 17 0
+previous; p; 1 16 0
+next; p; 1 16 0
+curve; p; 1 1008 0
+tolerance; f; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+17 HALFEDGE; Halfedge; 1 13 0
+loop; p; 1 15 0
+forward; p; 1 17 0
+backward; p; 1 17 0
+vertex; p; 1 18 0
+other; p; 1 17 0
+edge; p; 1 16 0
+curve; p; 1 1008 0
+isoparm_type; c; 1 0 0
+isoparm_sense; c; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+18 VERTEX; Vertex; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+previous; p; 1 18 0
+next; p; 1 18 0
+point; p; 1 29 0
+tolerance; f; 1 0 0
+29 POINT; Point; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1011 0
+next; p; 1 29 0
+previous; p; 1 29 0
+pvec; v; 1 0 0
+30 LINE; Straight line; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+pvec; v; 1 0 0
+direction; v; 1 0 0
+31 CIRCLE; Circle; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+radius; f; 1 0 0
+32 ELLIPSE; Ellipse; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+33 PARABOLA; Parabola; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+focal_length; f; 1 0 0
+34 HYPERBOLA; Hyperbola; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+transverse_radius; f; 1 0 0
+conjugate_radius; f; 1 0 0
+35 PARACURVE; Parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+seg; n; 1 0 0
+cpc; p; 1 48 0
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+segment; p; 1 1025 1
+37 PATCH_BOUND; Patch boundary; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+boundary; c; 1 0 0
+lh_patch; p; 1 61 0
+rh_patch; p; 1 61 0
+38 INTERSECTION; Intersection; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 2
+chart; p; 1 40 0
+start; p; 1 41 0
+end; p; 1 41 0
+39 SILHOUETTE; Silhouette; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+analytic_root; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+start; p; 1 41 0
+end; p; 1 41 0
+40 CHART; Chart; 1 6 1
+base_parameter; f; 1 0 0
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parameter_error; f; 1 0 2
+hvec; h; 1 0 1
+41 LIMIT; Limit; 1 2 1
+type; c; 1 0 0
+hvec; h; 1 0 1
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1
+segment_box; b; 0 0 0
+t_length; f; 1 0 0
+hull; p; 0 65 0
+bezier_vertices; f; 1 0 1
+43 BSPLINE_CURVE; B-spline curve; 1 5 0
+knot_vector; p; 1 44 0
+vertex_dimension; n; 1 0 0
+vertex_count; n; 1 0 0
+order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+44 KNOT_VECTOR; Knot vector; 1 3 1
+periodic; l; 1 0 0
+knot_count; n; 1 0 0
+knots; f; 1 0 1
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1
+vertices; f; 1 0 1
+46 OFFSET_CURVE; Offset curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+offset; f; 1 0 0
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0
+split; f; 1 0 0
+first; p; 1 1025 0
+last; p; 1 1025 0
+t_length; f; 1 0 0
+48 CPC; Composite parametric curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+bezier; p; 1 103 0
+bspline; p; 1 43 0
+49 OBSOLETE_SP_CURVE; SP curve; 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+const_param; l; 1 0 0
+surface; p; 1 1006 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+bezier_vertices; f; 1 0 1
+50 PLANE; Plane; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+51 CYLINDER; Cylinder; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+x_axis; v; 1 0 0
+52 CONE; Cone; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+sin_half_angle; f; 1 0 0
+cos_half_angle; f; 1 0 0
+x_axis; v; 1 0 0
+53 SPHERE; Sphere; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+radius; f; 1 0 0
+axis; v; 1 0 0
+x_axis; v; 1 0 0
+54 TORUS; Torus; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+x_axis; v; 1 0 0
+55 PIPE; Pipe; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+spine; p; 1 1008 0
+radius; f; 1 0 0
+56 BLENDED_EDGE; Blended edge; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+blend_type; c; 1 0 0
+surface; p; 1 1006 2
+range; f; 1 0 2
+thumb_weight; f; 1 0 2
+spine; p; 1 1008 0
+boundary; p; 1 1006 2
+start; p; 1 41 0
+end; p; 1 41 0
+57 BLENDED_VERTEX; Blended vertex; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 3
+sub_surface; p; 1 1006 3
+range; f; 1 0 3
+thumb_weight; f; 1 0 3
+blend_type; c; 1 0 0
+centre; v; 1 0 0
+boundary; p; 1 1006 3
+58 BLEND_OVERLAP; Blend overlap; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 2
+sub_surface; p; 1 1006 4
+range; f; 1 0 4
+thumb_weight; f; 1 0 4
+blend_type; c; 1 0 2
+overlap_type; c; 1 0 0
+swap_u_v; l; 1 0 0
+59 BLEND_BOUND; Blend boundary; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+boundary; n; 1 0 0
+blend; p; 1 1006 0
+60 OFFSET_SURF; Offset surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+surface; p; 1 1006 0
+offset; f; 1 0 0
+true_offset; l; 1 0 0
+scale; f; 1 0 0
+check; c; 1 0 0
+61 PARASURF; Parametric surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+col; n; 1 0 0
+row; n; 1 0 0
+cps; p; 1 69 0
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 14 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+patch; p; 1 1026 1
+63 SILH_SURF; Silhouette surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+64 BASIC_PATCH; Basic Patch; 1 6 1
+patch_box; b; 0 0 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+hull; p; 0 65 0
+scale; f; 0 0 0
+bezier_vertices; f; 1 0 1
+65 HULL; Convex hull; 0 4 1
+dimension; n; 1 0 0
+plane_count; n; 1 0 0
+corner_count; n; 1 0 0
+vecs; v; 1 0 1
+66 BSPLINE_SURF; B-spline surface; 1 8 0
+row_knots; p; 1 44 0
+col_knots; p; 1 44 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+67 SWEPT_SURF; Swept surface; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+section; p; 1 1008 0
+sweep; v; 1 0 0
+scale; f; 1 0 0
+68 SPUN_SURF; Spun surface; 1 17 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+profile; p; 1 1008 0
+base; v; 1 0 0
+axis; v; 1 0 0
+start; v; 1 0 0
+end; v; 1 0 0
+start_param; f; 1 0 0
+end_param; f; 1 0 0
+x_axis; v; 1 0 0
+scale; f; 1 0 0
+69 CPS; Composite parametric surface; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+bezier; p; 1 104 0
+bspline; p; 1 66 0
+props; p; 0 123 0
+70 LIST; List Header; 1 11 0
+node_id; d; 1 0 0
+owner; p; 1 1013 0
+next; p; 1 70 0
+previous; p; 1 70 0
+list_type; d; 1 0 0
+list_length; d; 1 0 0
+block_length; d; 1 0 0
+size_of_entry; d; 1 0 0
+list_block; p; 1 1012 0
+finger_block; p; 1 1012 0
+finger_index; d; 1 0 0
+71 REAL_LIS_BLOCK; Real List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 71 0
+entries; f; 1 0 1
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 72 0
+entries; d; 1 0 1
+73 TAG_LIS_BLOCK; Tag List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 73 0
+entries; d; 1 0 1
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 74 0
+entries; p; 1 1001 1
+75 CHAR_LIS_BLOCK; Character List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 75 0
+entries; c; 1 0 1
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1
+string; c; 1 0 1
+80 ATTRIB_DEF; attribute definition; 1 6 1
+next; p; 1 80 0
+type_id; d; 1 0 0
+identifier; p; 1 79 0
+actions; d; 1 0 8
+legal_owners; l; 1 0 12
+fields; d; 1 0 1
+81 ATTRIBUTE; Attribute; 1 8 1
+node_id; d; 1 0 0
+definition; p; 1 80 0
+owner; p; 1 1015 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_of_type; p; 1 81 0
+previous_of_type; p; 1 81 0
+fields; p; 1 1018 1
+82 INT_VALUES; Int values; 1 1 1
+values; d; 1 0 1
+83 REAL_VALUES; Real values; 1 1 1
+values; f; 1 0 1
+84 CHAR_VALUES; Character values; 1 1 1
+values; c; 1 0 1
+85 POINT_VALUES; Point values; 1 1 1
+values; v; 1 0 1
+86 VECTOR_VALUES; Vector values; 1 1 1
+values; v; 1 0 1
+87 AXIS_VALUES; Axis values; 1 1 1
+values; v; 1 0 1
+88 TAG_VALUES; Tag values; 1 1 1
+values; d; 1 0 1
+89 DIRECTION_VALUES; Direction values; 1 1 1
+values; v; 1 0 1
+90 FEATURE; Feature; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1005 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+type; d; 1 0 0
+first_member; p; 1 91 0
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0
+dummy_node_id; d; 1 0 0
+owning_feature; p; 1 90 0
+owner; p; 1 1017 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_member; p; 1 91 0
+previous_member; p; 1 91 0
+100 TRANSFORM; Transformation; 1 8 0
+node_id; d; 1 0 0
+owner; p; 1 1023 0
+next; p; 1 100 0
+previous; p; 1 100 0
+rotation_matrix; f; 1 0 9
+translation_vector; v; 1 0 0
+scale; f; 1 0 0
+flag; d; 1 0 0
+101 WORLD; World; 1 29 0
+assembly; p; 1 10 0
+attribute; p; 1 81 0
+body; p; 1 12 0
+attrib_def; p; 1 80 0
+list; p; 1 70 0
+transform; p; 1 100 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+tag_table; p; 1 4 0
+linear_prec; f; 1 0 0
+angular_prec; f; 1 0 0
+parameter_check_on; l; 1 0 0
+journal_open; d; 1 0 0
+journal_on; l; 1 0 0
+bulletin_board_on; d; 1 0 0
+empty_bulletin_board; l; 1 0 0
+rollback_size; d; 1 0 0
+binary_text; d; 1 0 0
+snapshot_binary_text; d; 1 0 0
+receive_user_fld; l; 1 0 0
+local_check_on; l; 1 0 0
+data_check_on; l; 1 0 0
+self_int_check_on; l; 1 0 0
+composite_geometry; d; 1 0 0
+continuity_check; d; 1 0 0
+parameterisation; d; 1 0 0
+tag_limit; d; 1 0 0
+bulletin_board; p; 1 107 0
+102 KEY; Key; 1 1 1
+string; c; 1 0 1
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+check; c; 1 0 0
+segment; p; 1 1025 1
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+check; c; 1 0 0
+unsanitised; p; 0 108 0
+patch; p; 1 1026 1
+105 SUPER_PATCH; super patch of CPS; 1 6 0
+split; f; 1 0 0
+split_dir; c; 1 0 0
+first; p; 1 1026 0
+last; p; 1 1026 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+106 EVENT_FILTER; Event Filter; 1 14 0
+face; l; 1 0 0
+edge; l; 1 0 0
+vertex; l; 1 0 0
+loop; l; 1 0 0
+shell; l; 1 0 0
+instance; l; 1 0 0
+body; l; 1 0 0
+assembly; l; 1 0 0
+point; l; 1 0 0
+curve; l; 1 0 0
+surface; l; 1 0 0
+transform; l; 1 0 0
+feature; l; 1 0 0
+att_def; l; 1 0 0
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0
+create; p; 1 106 0
+delete; p; 1 106 0
+change; p; 1 106 0
+transform; p; 1 106 0
+split; p; 1 106 0
+merge; p; 1 106 0
+copy; p; 1 106 0
+transfer; p; 1 106 0
+change_attribute; p; 1 106 0
+event; p; 1 70 0
+entities; p; 1 70 0
+n_entities; p; 1 70 0
+entity_nt; p; 1 70 0
+entity_usfld; p; 1 70 0
+dt_log; l; 1 0 0
+dt_event; p; 1 70 0
+dt_entities; p; 1 70 0
+dt_n_entities; p; 1 70 0
+dt_entity_nt; p; 1 70 0
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1
+bad_patch; p; 1 64 1
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0
+next; p; 1 110 0
+forward; p; 1 110 0
+backward; p; 1 110 0
+class; d; 1 0 0
+set; p; 1 1021 0
+node; p; 1 1022 0
+111 FACE_SET; Face Set; 1 5 0
+tag; p; 1 110 0
+next; p; 1 111 0
+class; d; 1 0 0
+he_set; p; 1 112 0
+surfaces; p; 1 1006 0
+112 HALFEDGE_SET; Halfedge Set; 1 6 0
+tag; p; 1 110 0
+next; p; 1 112 0
+previous; p; 1 112 0
+class; d; 1 0 0
+fa_set; p; 1 111 0
+co_he_set; p; 1 112 0
+120 PE_SURF; PE_surface; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 123 0
+approx; p; 0 1026 0
+internal_geom; p; 1 1028 1
+121 INT_PE_DATA; int_PE_data; 1 3 0
+geom_type; d; 1 0 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+122 EXT_PE_DATA; ext_pe_data; 1 4 1
+key; p; 1 102 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+data; f; 0 0 1
+123 SU_PARAM_PROPS; su_param_props; 0 6 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+124 B_SURFACE; B surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+nurbs; p; 1 126 0
+data; p; 1 125 0
+125 SURFACE_DATA; Surface data; 1 9 0
+safe_u_range; i; 1 0 0
+safe_v_range; i; 1 0 0
+convexity; d; 1 0 0
+bx; b; 1 0 0
+scale; f; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+u_tangent_half_angle; f; 0 0 0
+v_tangent_half_angle; f; 0 0 0
+126 NURBS_SURF; NURBS surface; 1 20 0
+u_periodic; l; 1 0 0
+v_periodic; l; 1 0 0
+u_degree; n; 1 0 0
+v_degree; n; 1 0 0
+n_u_vertices; n; 1 0 0
+n_v_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+u_knot_type; d; 1 0 0
+v_knot_type; d; 1 0 0
+n_u_knots; n; 1 0 0
+n_v_knots; n; 1 0 0
+u_knot_mult; p; 1 127 0
+v_knot_mult; p; 1 127 0
+u_knots; p; 1 128 0
+v_knots; p; 1 128 0
+rational; l; 1 0 0
+u_closed; l; 1 0 0
+v_closed; l; 1 0 0
+surface_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+127 KNOT_MULT; Knot multiplicities; 1 1 1
+mult; n; 1 0 1
+128 KNOT_SET; Knot set; 1 1 1
+knots; f; 1 0 1
+130 PE_CURVE; PE_curve; 1 17 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 131 0
+approx; p; 0 1025 0
+internal_geom; p; 1 1028 1
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+132 PCURVE; General Bspline SP-curve; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+bspline; p; 1 43 0
+bsp_parms; l; 1 0 0
+133 TRIMMED_CURVE; Trimmed Curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+basis_curve; p; 1 1008 0
+point_1; v; 1 0 0
+point_2; v; 1 0 0
+parm_1; f; 1 0 0
+parm_2; f; 1 0 0
+134 B_CURVE; B curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 1 0 0
+nurbs; p; 1 136 0
+data; p; 1 135 0
+135 CURVE_DATA; Curve data; 1 5 0
+safe_range; i; 1 0 0
+bx; b; 1 0 0
+scale; f; 1 0 0
+parameter_scale; f; 0 0 0
+tangent_half_angle; f; 0 0 0
+136 NURBS_CURVE; NURBS curve; 1 12 0
+degree; n; 1 0 0
+n_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+knot_type; d; 1 0 0
+n_knots; n; 1 0 0
+knot_mult; p; 1 127 0
+knots; p; 1 128 0
+periodic; l; 1 0 0
+closed; l; 1 0 0
+rational; l; 1 0 0
+curve_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+137 SP_CURVE; SP curve; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+use_count; n; 1 0 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+chart; p; 0 138 0
+surface; p; 1 1006 0
+b_curve; p; 1 134 0
+138 SP_CHART; SP curve chart; 1 4 1
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parm; f; 1 0 1
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0
+owner; p; 1 1003 0
+next; p; 1 141 0
+previous; p; 1 141 0
+shared_geometry; p; 1 1003 0
+**************** end of schema SCH_5032 ****************
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5033.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5033.sch_txt
new file mode 100644
index 0000000..b427483
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5033.sch_txt
@@ -0,0 +1,973 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=3100;MC_ID=VAX18:167772164;OS=vms;OS_RELEASE=A5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5033;FILE=P_SCHEMA:SCH_5033.SCH_TXT;DATE=15-dec-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 500000/5033; 
+142 105 855 12432 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+isoparm_type; c; 1 0 0 
+isoparm_sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+dt_log; l; 1 0 0 
+dt_event; p; 1 70 0 
+dt_entities; p; 1 70 0 
+dt_n_entities; p; 1 70 0 
+dt_entity_nt; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; Surface data; 1 9 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; Curve data; 1 5 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5033 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5041.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5041.sch_txt
new file mode 100644
index 0000000..8936423
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5041.sch_txt
@@ -0,0 +1,986 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=3100;MC_ID=VAX18:167772164;OS=vms;OS_RELEASE=A5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5041;FILE=P_SCHEMA:SCH_5041.SCH_TXT;DATE=7-dec-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T
+1
+: SCHEMA FILE created by modeller version 500000/5041;
+142 105 868 12555
+1 NULLP; Null; 1 0 0
+2 WORKSPACE; Workspace; 1 1 1
+ws; c; 1 0 1
+3 USFD_TABLE; Userfield Table; 1 1 1
+usfd; d; 1 0 1
+4 TAG_TABLE; Tag Table; 1 7 1
+level; d; 1 0 0
+access_mode; d; 1 0 0
+n_slots_total; d; 1 0 0
+first_free_slot; d; 1 0 0
+n_dead_tags; d; 1 0 0
+usfd_table; p; 1 3 0
+down; p; 1 1024 1
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0
+root_tag_table; p; 1 4 0
+max_tag; d; 1 0 0
+tag_limit; d; 1 0 0
+10 ASSEMBLY; Assembly; 1 18 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 1 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+assembly_box; b; 0 0 0
+assembly_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 10 0
+previous; p; 1 10 0
+type; d; 1 0 0
+sub_instance; p; 1 11 0
+11 INSTANCE; Instance; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+type; d; 1 0 0
+part; p; 1 1005 0
+transform; p; 1 100 0
+assembly; p; 1 10 0
+next_in_part; p; 1 11 0
+prev_in_part; p; 1 11 0
+next_of_part; p; 1 11 0
+prev_of_part; p; 1 11 0
+12 BODY; Body; 1 21 0
+highest_node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+attribute_chains; p; 1 70 0
+list; p; 0 70 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+res_size; f; 1 0 0
+res_linear; f; 1 0 0
+body_box; b; 0 0 0
+body_box_tightness; c; 0 0 0
+key; p; 1 102 0
+state; d; 1 0 0
+ref_instance; p; 1 11 0
+next; p; 1 12 0
+previous; p; 1 12 0
+body_type; d; 1 0 0
+shell; p; 1 13 0
+boundary_surface; p; 1 1006 0
+boundary_curve; p; 1 1008 0
+boundary_point; p; 1 29 0
+13 SHELL; Shell; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+body; p; 1 12 0
+next; p; 1 13 0
+face; p; 1 14 0
+edge; p; 1 16 0
+vertex; p; 1 18 0
+14 FACE; Face; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+face_box; b; 0 0 0
+face_box_tightness; c; 0 0 0
+next; p; 1 14 0
+previous; p; 1 14 0
+loop; p; 1 15 0
+shell; p; 1 13 0
+surface; p; 1 1006 0
+sense; c; 1 0 0
+type; c; 1 0 0
+tolerance; f; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_surface; p; 1 14 0
+previous_on_surface; p; 1 14 0
+15 LOOP; Loop; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+face; p; 1 14 0
+next; p; 1 15 0
+type; c; 0 0 0
+16 EDGE; Edge; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+edge_box; b; 0 0 0
+edge_box_tightness; c; 0 0 0
+halfedge; p; 1 17 0
+previous; p; 1 16 0
+next; p; 1 16 0
+curve; p; 1 1008 0
+tolerance; f; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+17 HALFEDGE; Halfedge; 1 13 0
+loop; p; 1 15 0
+forward; p; 1 17 0
+backward; p; 1 17 0
+vertex; p; 1 18 0
+other; p; 1 17 0
+edge; p; 1 16 0
+curve; p; 1 1008 0
+isoparm_type; c; 1 0 0
+isoparm_sense; c; 1 0 0
+u_int; i; 1 0 0
+v_int; i; 1 0 0
+next_on_curve; p; 1 1010 0
+previous_on_curve; p; 1 1010 0
+18 VERTEX; Vertex; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+halfedge; p; 1 17 0
+previous; p; 1 18 0
+next; p; 1 18 0
+point; p; 1 29 0
+tolerance; f; 1 0 0
+29 POINT; Point; 1 6 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1011 0
+next; p; 1 29 0
+previous; p; 1 29 0
+pvec; v; 1 0 0
+30 LINE; Straight line; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+pvec; v; 1 0 0
+direction; v; 1 0 0
+31 CIRCLE; Circle; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+radius; f; 1 0 0
+32 ELLIPSE; Ellipse; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+centre; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+33 PARABOLA; Parabola; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+focal_length; f; 1 0 0
+34 HYPERBOLA; Hyperbola; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+origin; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+transverse_radius; f; 1 0 0
+conjugate_radius; f; 1 0 0
+35 PARACURVE; Parametric curve; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+seg; n; 1 0 0
+cpc; p; 1 48 0
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+segment; p; 1 1025 1
+37 PATCH_BOUND; Patch boundary; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+boundary; c; 1 0 0
+lh_patch; p; 1 61 0
+rh_patch; p; 1 61 0
+38 INTERSECTION; Intersection; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 2
+chart; p; 1 40 0
+start; p; 1 41 0
+end; p; 1 41 0
+39 SILHOUETTE; Silhouette; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+analytic_root; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+start; p; 1 41 0
+end; p; 1 41 0
+40 CHART; Chart; 1 6 1
+base_parameter; f; 1 0 0
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parameter_error; f; 1 0 2
+hvec; h; 1 0 1
+41 LIMIT; Limit; 1 2 1
+type; c; 1 0 0
+hvec; h; 1 0 1
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1
+segment_box; b; 0 0 0
+t_length; f; 1 0 0
+hull; p; 0 65 0
+bezier_vertices; f; 1 0 1
+43 BSPLINE_CURVE; B-spline curve; 1 5 0
+knot_vector; p; 1 44 0
+vertex_dimension; n; 1 0 0
+vertex_count; n; 1 0 0
+order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+44 KNOT_VECTOR; Knot vector; 1 3 1
+periodic; l; 1 0 0
+knot_count; n; 1 0 0
+knots; f; 1 0 1
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1
+vertices; f; 1 0 1
+46 OFFSET_CURVE; Offset curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+offset; f; 1 0 0
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0
+split; f; 1 0 0
+first; p; 1 1025 0
+last; p; 1 1025 0
+t_length; f; 1 0 0
+48 CPC; Composite parametric curve; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+bezier; p; 1 103 0
+bspline; p; 1 43 0
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+const_param; l; 1 0 0
+surface; p; 1 1006 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+bezier_vertices; f; 1 0 1
+50 PLANE; Plane; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+normal; v; 1 0 0
+x_axis; v; 1 0 0
+51 CYLINDER; Cylinder; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+x_axis; v; 1 0 0
+52 CONE; Cone; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+pvec; v; 1 0 0
+axis; v; 1 0 0
+radius; f; 1 0 0
+sin_half_angle; f; 1 0 0
+cos_half_angle; f; 1 0 0
+x_axis; v; 1 0 0
+53 SPHERE; Sphere; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+radius; f; 1 0 0
+axis; v; 1 0 0
+x_axis; v; 1 0 0
+54 TORUS; Torus; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+centre; v; 1 0 0
+axis; v; 1 0 0
+major_radius; f; 1 0 0
+minor_radius; f; 1 0 0
+x_axis; v; 1 0 0
+55 PIPE; Pipe; 1 9 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+spine; p; 1 1008 0
+radius; f; 1 0 0
+56 BLENDED_EDGE; Blended edge; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+blend_type; c; 1 0 0
+surface; p; 1 1006 2
+range; f; 1 0 2
+thumb_weight; f; 1 0 2
+spine; p; 1 1008 0
+boundary; p; 1 1006 2
+start; p; 1 41 0
+end; p; 1 41 0
+57 BLENDED_VERTEX; Blended vertex; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+surface; p; 1 1006 3
+sub_surface; p; 1 1006 3
+range; f; 1 0 3
+thumb_weight; f; 1 0 3
+blend_type; c; 1 0 0
+centre; v; 1 0 0
+boundary; p; 1 1006 3
+58 BLEND_OVERLAP; Blend overlap; 1 14 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+surface; p; 1 1006 2
+sub_surface; p; 1 1006 4
+range; f; 1 0 4
+thumb_weight; f; 1 0 4
+blend_type; c; 1 0 2
+overlap_type; c; 1 0 0
+swap_u_v; l; 1 0 0
+59 BLEND_BOUND; Blend boundary; 1 9 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+boundary; n; 1 0 0
+blend; p; 1 1006 0
+60 OFFSET_SURF; Offset surface; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+surface; p; 1 1006 0
+offset; f; 1 0 0
+true_offset; l; 1 0 0
+scale; f; 1 0 0
+check; c; 1 0 0
+61 PARASURF; Parametric surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+col; n; 1 0 0
+row; n; 1 0 0
+cps; p; 1 69 0
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+patch; p; 1 1026 1
+63 SILH_SURF; Silhouette surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+from_infinity; l; 1 0 0
+eye; v; 1 0 0
+surface; p; 1 1006 0
+64 BASIC_PATCH; Basic Patch; 1 6 1
+patch_box; b; 0 0 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+hull; p; 0 65 0
+scale; f; 0 0 0
+bezier_vertices; f; 1 0 1
+65 HULL; Convex hull; 0 4 1
+dimension; n; 1 0 0
+plane_count; n; 1 0 0
+corner_count; n; 1 0 0
+vecs; v; 1 0 1
+66 BSPLINE_SURF; B-spline surface; 1 8 0
+row_knots; p; 1 44 0
+col_knots; p; 1 44 0
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+bspline_vertices; p; 1 45 0
+67 SWEPT_SURF; Swept surface; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+section; p; 1 1008 0
+sweep; v; 1 0 0
+scale; f; 1 0 0
+68 SPUN_SURF; Spun surface; 1 16 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+profile; p; 1 1008 0
+base; v; 1 0 0
+axis; v; 1 0 0
+start; v; 1 0 0
+end; v; 1 0 0
+start_param; f; 1 0 0
+end_param; f; 1 0 0
+x_axis; v; 1 0 0
+scale; f; 1 0 0
+69 CPS; Composite parametric surface; 1 12 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+bezier; p; 1 104 0
+bspline; p; 1 66 0
+props; p; 0 123 0
+70 LIST; List Header; 1 11 0
+node_id; d; 1 0 0
+owner; p; 1 1013 0
+next; p; 1 70 0
+previous; p; 1 70 0
+list_type; d; 1 0 0
+list_length; d; 1 0 0
+block_length; d; 1 0 0
+size_of_entry; d; 1 0 0
+list_block; p; 1 1012 0
+finger_block; p; 1 1012 0
+finger_index; d; 1 0 0
+71 REAL_LIS_BLOCK; Real List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 71 0
+entries; f; 1 0 1
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 72 0
+entries; d; 1 0 1
+73 TAG_LIS_BLOCK; Tag List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 73 0
+entries; d; 1 0 1
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 74 0
+entries; p; 1 1001 1
+75 CHAR_LIS_BLOCK; Character List; 1 3 1
+n_entries; d; 1 0 0
+next_block; p; 1 75 0
+entries; c; 1 0 1
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1
+string; c; 1 0 1
+80 ATTRIB_DEF; attribute definition; 1 6 1
+next; p; 1 80 0
+type_id; d; 1 0 0
+identifier; p; 1 79 0
+actions; d; 1 0 8
+legal_owners; l; 1 0 12
+fields; d; 1 0 1
+81 ATTRIBUTE; Attribute; 1 8 1
+node_id; d; 1 0 0
+definition; p; 1 80 0
+owner; p; 1 1015 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_of_type; p; 1 81 0
+previous_of_type; p; 1 81 0
+fields; p; 1 1018 1
+82 INT_VALUES; Int values; 1 1 1
+values; d; 1 0 1
+83 REAL_VALUES; Real values; 1 1 1
+values; f; 1 0 1
+84 CHAR_VALUES; Character values; 1 1 1
+values; c; 1 0 1
+85 POINT_VALUES; Point values; 1 1 1
+values; v; 1 0 1
+86 VECTOR_VALUES; Vector values; 1 1 1
+values; v; 1 0 1
+87 AXIS_VALUES; Axis values; 1 1 1
+values; v; 1 0 1
+88 TAG_VALUES; Tag values; 1 1 1
+values; d; 1 0 1
+89 DIRECTION_VALUES; Direction values; 1 1 1
+values; v; 1 0 1
+90 FEATURE; Feature; 1 7 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1005 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+type; d; 1 0 0
+first_member; p; 1 91 0
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0
+dummy_node_id; d; 1 0 0
+owning_feature; p; 1 90 0
+owner; p; 1 1017 0
+next; p; 1 1019 0
+previous; p; 1 1019 0
+next_member; p; 1 91 0
+previous_member; p; 1 91 0
+100 TRANSFORM; Transformation; 1 8 0
+node_id; d; 1 0 0
+owner; p; 1 1023 0
+next; p; 1 100 0
+previous; p; 1 100 0
+rotation_matrix; f; 1 0 9
+translation_vector; v; 1 0 0
+scale; f; 1 0 0
+flag; d; 1 0 0
+101 WORLD; World; 1 29 0
+assembly; p; 1 10 0
+attribute; p; 1 81 0
+body; p; 1 12 0
+attrib_def; p; 1 80 0
+list; p; 1 70 0
+transform; p; 1 100 0
+surface; p; 1 1006 0
+curve; p; 1 1008 0
+point; p; 1 29 0
+tag_table; p; 1 4 0
+linear_prec; f; 1 0 0
+angular_prec; f; 1 0 0
+parameter_check_on; l; 1 0 0
+journal_open; d; 1 0 0
+journal_on; l; 1 0 0
+bulletin_board_on; d; 1 0 0
+empty_bulletin_board; l; 1 0 0
+rollback_size; d; 1 0 0
+binary_text; d; 1 0 0
+snapshot_binary_text; d; 1 0 0
+receive_user_fld; l; 1 0 0
+local_check_on; l; 1 0 0
+data_check_on; l; 1 0 0
+self_int_check_on; l; 1 0 0
+composite_geometry; d; 1 0 0
+continuity_check; d; 1 0 0
+parameterisation; d; 1 0 0
+tag_limit; d; 1 0 0
+bulletin_board; p; 1 107 0
+102 KEY; Key; 1 1 1
+string; c; 1 0 1
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1
+vertex_dimension; n; 1 0 0
+segment_count; n; 1 0 0
+order; n; 1 0 0
+check; c; 1 0 0
+segment; p; 1 1025 1
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1
+vertex_dimension; n; 1 0 0
+col_count; n; 1 0 0
+row_count; n; 1 0 0
+u_order; n; 1 0 0
+v_order; n; 1 0 0
+check; c; 1 0 0
+unsanitised; p; 0 108 0
+patch; p; 1 1026 1
+105 SUPER_PATCH; super patch of CPS; 1 6 0
+split; f; 1 0 0
+split_dir; c; 1 0 0
+first; p; 1 1026 0
+last; p; 1 1026 0
+u_length; f; 1 0 0
+v_length; f; 1 0 0
+106 EVENT_FILTER; Event Filter; 1 14 0
+face; l; 1 0 0
+edge; l; 1 0 0
+vertex; l; 1 0 0
+loop; l; 1 0 0
+shell; l; 1 0 0
+instance; l; 1 0 0
+body; l; 1 0 0
+assembly; l; 1 0 0
+point; l; 1 0 0
+curve; l; 1 0 0
+surface; l; 1 0 0
+transform; l; 1 0 0
+feature; l; 1 0 0
+att_def; l; 1 0 0
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0
+create; p; 1 106 0
+delete; p; 1 106 0
+change; p; 1 106 0
+transform; p; 1 106 0
+split; p; 1 106 0
+merge; p; 1 106 0
+copy; p; 1 106 0
+transfer; p; 1 106 0
+change_attribute; p; 1 106 0
+event; p; 1 70 0
+entities; p; 1 70 0
+n_entities; p; 1 70 0
+entity_nt; p; 1 70 0
+entity_usfld; p; 1 70 0
+dt_log; l; 1 0 0
+dt_event; p; 1 70 0
+dt_entities; p; 1 70 0
+dt_n_entities; p; 1 70 0
+dt_entity_nt; p; 1 70 0
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1
+bad_patch; p; 1 64 1
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0
+next; p; 1 110 0
+forward; p; 1 110 0
+backward; p; 1 110 0
+class; d; 1 0 0
+set; p; 1 1021 0
+node; p; 1 1022 0
+111 FACE_SET; Face Set; 1 5 0
+tag; p; 1 110 0
+next; p; 1 111 0
+class; d; 1 0 0
+he_set; p; 1 112 0
+surfaces; p; 1 1006 0
+112 HALFEDGE_SET; Halfedge Set; 1 6 0
+tag; p; 1 110 0
+next; p; 1 112 0
+previous; p; 1 112 0
+class; d; 1 0 0
+fa_set; p; 1 111 0
+co_he_set; p; 1 112 0
+120 PE_SURF; PE_surface; 1 16 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+type; c; 1 0 0
+min_radii_curvature; f; 0 0 2
+u_parameter_scale; f; 0 0 0
+v_parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 123 0
+approx; p; 0 1026 0
+internal_geom; p; 1 1028 1
+121 INT_PE_DATA; int_PE_data; 1 3 0
+geom_type; d; 1 0 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+122 EXT_PE_DATA; ext_pe_data; 1 4 1
+key; p; 1 102 0
+real_array; p; 1 83 0
+int_array; p; 1 82 0
+data; f; 0 0 1
+123 SU_PARAM_PROPS; su_param_props; 0 6 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+124 B_SURFACE; B surface; 1 9 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1007 0
+next; p; 1 1006 0
+previous; p; 1 1006 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+nurbs; p; 1 126 0
+data; p; 0 125 0
+125 SURFACE_DATA; surface_data; 0 16 0
+safe_u_range; i; 1 0 0
+safe_v_range; i; 1 0 0
+convexity; d; 1 0 0
+self_int; d; 1 0 0
+bx; b; 1 0 0
+scale; f; 1 0 0
+u_parameter_scale; f; 1 0 0
+v_parameter_scale; f; 1 0 0
+u_tangent_half_angle; f; 1 0 0
+v_tangent_half_angle; f; 1 0 0
+uint; i; 1 0 0
+vint; i; 1 0 0
+u_start; c; 1 0 0
+u_end; c; 1 0 0
+v_start; c; 1 0 0
+v_end; c; 1 0 0
+126 NURBS_SURF; NURBS surface; 1 20 0
+u_periodic; l; 1 0 0
+v_periodic; l; 1 0 0
+u_degree; n; 1 0 0
+v_degree; n; 1 0 0
+n_u_vertices; n; 1 0 0
+n_v_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+u_knot_type; d; 1 0 0
+v_knot_type; d; 1 0 0
+n_u_knots; n; 1 0 0
+n_v_knots; n; 1 0 0
+u_knot_mult; p; 1 127 0
+v_knot_mult; p; 1 127 0
+u_knots; p; 1 128 0
+v_knots; p; 1 128 0
+rational; l; 1 0 0
+u_closed; l; 1 0 0
+v_closed; l; 1 0 0
+surface_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+127 KNOT_MULT; Knot multiplicities; 1 1 1
+mult; n; 1 0 1
+128 KNOT_SET; Knot set; 1 1 1
+knots; f; 1 0 1
+130 PE_CURVE; PE_curve; 1 16 1
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+type; c; 1 0 0
+global_scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+data; p; 1 1027 0
+tf; p; 1 100 0
+props; p; 0 131 0
+approx; p; 0 1025 0
+internal_geom; p; 1 1028 1
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+132 PCURVE; General Bspline SP-curve; 1 11 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+surface; p; 1 1006 0
+bspline; p; 1 43 0
+bsp_parms; l; 1 0 0
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+basis_curve; p; 1 1008 0
+point_1; v; 1 0 0
+point_2; v; 1 0 0
+parm_1; f; 1 0 0
+parm_2; f; 1 0 0
+134 B_CURVE; B curve; 1 10 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 1 0 0
+nurbs; p; 1 136 0
+data; p; 0 135 0
+135 CURVE_DATA; curve_data; 0 9 0
+safe_range; i; 1 0 0
+bx; b; 1 0 0
+self_int; d; 1 0 0
+scale; f; 1 0 0
+parameter_scale; f; 1 0 0
+tangent_half_angle; f; 1 0 0
+tint; i; 1 0 0
+t_start; c; 1 0 0
+t_end; c; 1 0 0
+136 NURBS_CURVE; NURBS curve; 1 12 0
+degree; n; 1 0 0
+n_vertices; n; 1 0 0
+bspline_vertices; p; 1 45 0
+knot_type; d; 1 0 0
+n_knots; n; 1 0 0
+knot_mult; p; 1 127 0
+knots; p; 1 128 0
+periodic; l; 1 0 0
+closed; l; 1 0 0
+rational; l; 1 0 0
+curve_form; d; 1 0 0
+vertex_dim; n; 1 0 0
+137 SP_CURVE; SP curve; 1 15 0
+node_id; d; 1 0 0
+attributes_features; p; 1 1019 0
+owner; p; 1 1010 0
+next; p; 1 1008 0
+previous; p; 1 1008 0
+geometric_owner; p; 1 141 0
+sense; c; 1 0 0
+tolerance; f; 0 0 0
+scale; f; 0 0 0
+parameter_scale; f; 0 0 0
+periodic; d; 0 0 0
+class; d; 0 0 0
+chart; p; 0 138 0
+surface; p; 1 1006 0
+b_curve; p; 1 134 0
+138 SP_CHART; SP curve chart; 1 4 1
+chart_count; n; 1 0 0
+chordal_error; f; 1 0 0
+angular_error; f; 1 0 0
+parm; f; 1 0 1
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0
+owner; p; 1 1003 0
+next; p; 1 141 0
+previous; p; 1 141 0
+shared_geometry; p; 1 1003 0
+**************** end of schema SCH_5041 ****************
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5049.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5049.sch_txt
new file mode 100644
index 0000000..87d2e39
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5049.sch_txt
@@ -0,0 +1,986 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=3100;MC_ID=VAX18:167772164;OS=vms;OS_RELEASE=A5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5049;FILE=P_SCHEMA:SCH_5049.SCH_TXT;DATE=9-dec-1992;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 500000/5049; 
+142 105 868 12555 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+17 HALFEDGE; Halfedge; 1 13 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+isoparm_type; c; 1 0 0 
+isoparm_sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+dt_log; l; 1 0 0 
+dt_event; p; 1 70 0 
+dt_entities; p; 1 70 0 
+dt_n_entities; p; 1 70 0 
+dt_entity_nt; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 0 125 0 
+125 SURFACE_DATA; surface_data; 0 16 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+self_int; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+u_tangent_half_angle; f; 1 0 0 
+v_tangent_half_angle; f; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5049 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5050.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5050.sch_txt
new file mode 100644
index 0000000..496db39
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5050.sch_txt
@@ -0,0 +1,988 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5050;FILE=P_SCHEMA:SCH_5050.SCH_TXT;DATE=14-jan-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 501001/5050; 
+142 106 869 12565 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+17 HALFEDGE; Halfedge; 1 10 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 19 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+dt_log; l; 1 0 0 
+dt_event; p; 1 70 0 
+dt_entities; p; 1 70 0 
+dt_n_entities; p; 1 70 0 
+dt_entity_nt; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 0 125 0 
+125 SURFACE_DATA; surface_data; 0 16 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+self_int; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+u_tangent_half_angle; f; 1 0 0 
+v_tangent_half_angle; f; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5050 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5051.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5051.sch_txt
new file mode 100644
index 0000000..5432421
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5051.sch_txt
@@ -0,0 +1,983 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5051;FILE=P_SCHEMA:SCH_5051.SCH_TXT;DATE=28-jan-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 501014/5051; 
+142 106 864 12500 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+17 HALFEDGE; Halfedge; 1 10 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 29 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 0 125 0 
+125 SURFACE_DATA; surface_data; 0 16 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+self_int; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+u_tangent_half_angle; f; 1 0 0 
+v_tangent_half_angle; f; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5051 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5053.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5053.sch_txt
new file mode 100644
index 0000000..a587dce
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5053.sch_txt
@@ -0,0 +1,984 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5053;FILE=P_SCHEMA:SCH_5053.SCH_TXT;DATE=3-feb-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 501019/5053; 
+142 106 865 12521 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+17 HALFEDGE; Halfedge; 1 10 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_on_curve; p; 1 1010 0 
+previous_on_curve; p; 1 1010 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 0 125 0 
+125 SURFACE_DATA; surface_data; 0 16 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+self_int; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+u_tangent_half_angle; f; 1 0 0 
+v_tangent_half_angle; f; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5053 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5054.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5054.sch_txt
new file mode 100644
index 0000000..c7a918d
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5054.sch_txt
@@ -0,0 +1,982 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=8530;MC_ID=SHAPEG:109072734;OS=vms;OS_RELEASE=A5.5;FRU=s
+dl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=te
+xt;GUISE=schema;KEY=SCH_5054;FILE=P_SCHEMA:SCH_5054.SCH_TXT;DATE=18-mar-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 501046/5054; 
+142 106 863 12485 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+17 HALFEDGE; Halfedge; 1 8 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 0 125 0 
+125 SURFACE_DATA; surface_data; 0 16 0 
+safe_u_range; i; 1 0 0 
+safe_v_range; i; 1 0 0 
+convexity; d; 1 0 0 
+self_int; d; 1 0 0 
+bx; b; 1 0 0 
+scale; f; 1 0 0 
+u_parameter_scale; f; 1 0 0 
+v_parameter_scale; f; 1 0 0 
+u_tangent_half_angle; f; 1 0 0 
+v_tangent_half_angle; f; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5054 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5056.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5056.sch_txt
new file mode 100644
index 0000000..1c5caeb
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5056.sch_txt
@@ -0,0 +1,986 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=tex
+t;GUISE=schema;KEY=SCH_5056;FILE=P_SCHEMA:SCH_5056.SCH_TXT;DATE=14-apr-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 501247/5056; 
+142 106 867 12557 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+modeller_version; d; 0 0 0 
+schema_version; d; 0 0 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 23 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+modeller_version; d; 0 0 0 
+schema_version; d; 0 0 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+17 HALFEDGE; Halfedge; 1 8 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 16 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5056 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5057.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5057.sch_txt
new file mode 100644
index 0000000..78acee9
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5057.sch_txt
@@ -0,0 +1,986 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=tex
+t;GUISE=schema;KEY=SCH_5057;FILE=P_SCHEMA:SCH_5057.SCH_TXT;DATE=7-may-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 502013/5057; 
+142 106 867 12557 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 20 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+modeller_version; d; 0 0 0 
+schema_version; d; 0 0 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 23 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+modeller_version; d; 0 0 0 
+schema_version; d; 0 0 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+17 HALFEDGE; Halfedge; 1 8 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 16 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 0 135 0 
+135 CURVE_DATA; curve_data; 0 9 0 
+safe_range; i; 1 0 0 
+bx; b; 1 0 0 
+self_int; d; 1 0 0 
+scale; f; 1 0 0 
+parameter_scale; f; 1 0 0 
+tangent_half_angle; f; 1 0 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5057 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5058.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5058.sch_txt
new file mode 100644
index 0000000..a10d6e0
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5058.sch_txt
@@ -0,0 +1,982 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5058;FILE=P_SCHEMA:SCH_5058.SCH_TXT;DATE=17-jun-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 502063/5058; 
+142 106 863 12485 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+17 HALFEDGE; Halfedge; 1 8 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 16 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 9 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+self_int; d; 1 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 1 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5058 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_5059.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_5059.sch_txt
new file mode 100644
index 0000000..1d31332
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_5059.sch_txt
@@ -0,0 +1,982 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX58:318767618;OS=vms;OS_RELEASE=V5.5;FRU=sd
+l_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text
+;GUISE=schema;KEY=SCH_5059;FILE=P_SCHEMA:SCH_5059.SCH_TXT;DATE=13-jul-1993;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 502233/5059; 
+142 106 863 12485 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 USFD_TABLE; Userfield Table; 1 1 1 
+usfd; d; 1 0 1 
+4 TAG_TABLE; Tag Table; 1 7 1 
+level; d; 1 0 0 
+access_mode; d; 1 0 0 
+n_slots_total; d; 1 0 0 
+first_free_slot; d; 1 0 0 
+n_dead_tags; d; 1 0 0 
+usfd_table; p; 1 3 0 
+down; p; 1 1024 1 
+5 INTERNAL_DS_STATE; internal DS state; 1 3 0 
+root_tag_table; p; 1 4 0 
+max_tag; d; 1 0 0 
+tag_limit; d; 1 0 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 21 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+13 SHELL; Shell; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+14 FACE; Face; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+17 HALFEDGE; Halfedge; 1 8 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+18 VERTEX; Vertex; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 12 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 30 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+tag_table; p; 1 4 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 14 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 16 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+126 NURBS_SURF; NURBS surface; 1 20 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 9 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+self_int; d; 1 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 12 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+**************** end of schema SCH_5059 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_6020.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_6020.sch_txt
new file mode 100644
index 0000000..8951c91
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_6020.sch_txt
@@ -0,0 +1,1110 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V1.5;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_6020;FILE=P_SCHEMA:SCH_6020.SCH_TXT;DATE=6-mar-1994;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 600186/6020; 
+161 121 976 14232 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 10 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 6 1 
+base_parameter; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 31 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 9 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+self_int; d; 1 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+**************** end of schema SCH_600186_6020 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_6021.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_6021.sch_txt
new file mode 100644
index 0000000..2d4cf46
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_6021.sch_txt
@@ -0,0 +1,1111 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V1.5;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_6021;FILE=P_SCHEMA:SCH_6021.SCH_TXT;DATE=20-aug-1994;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 600343/6021; 
+161 121 977 14245 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+assembly_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+type; d; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; d; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+body_box_tightness; c; 0 0 0 
+key; p; 1 102 0 
+state; d; 1 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_type; d; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+face_box_tightness; c; 0 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+tolerance; f; 1 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+tolerance; f; 1 0 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 10 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+spine; p; 1 1008 0 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+blend_type; c; 1 0 0 
+centre; v; 1 0 0 
+boundary; p; 1 1006 3 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+true_offset; l; 1 0 0 
+scale; f; 1 0 0 
+check; c; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+eye; v; 1 0 0 
+surface; p; 1 1006 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+75 CHAR_LIS_BLOCK; Character List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 75 0 
+entries; c; 1 0 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+type_id; d; 1 0 0 
+identifier; p; 1 79 0 
+actions; d; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; d; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; d; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 31 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+convexity; d; 0 0 0 
+self_int; d; 1 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_type; d; 1 0 0 
+v_knot_type; d; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+type; c; 1 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 9 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+self_int; d; 1 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_type; d; 1 0 0 
+n_knots; n; 1 0 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; d; 1 0 0 
+vertex_dim; n; 1 0 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; d; 0 0 0 
+class; d; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+**************** end of schema SCH_600343_6021 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_7002.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_7002.sch_txt
new file mode 100644
index 0000000..cf236a6
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_7002.sch_txt
@@ -0,0 +1,1110 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF1;OS=vms;OS_RELEASE=V6.1;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text;GUISE=sc
+hema;KEY=SCH_7002;FILE=P_SCHEMA:SCH_7002.SCH_TXT;DATE=11-sep-1995;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 700043/7002; 
+161 120 977 14206 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+eye; v; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+offset; f; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+const_param; l; 1 0 0 
+surface; p; 1 1006 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Composite parametric surface; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 31 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+bsp_parms; l; 1 0 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+basis_curve; p; 1 1008 0 
+134 B_CURVE; B curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 9 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+tolerance; f; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+**************** end of schema SCH_700043_7002 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_7007.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_7007.sch_txt
new file mode 100644
index 0000000..fba4ad1
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_7007.sch_txt
@@ -0,0 +1,1103 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF3;OS=vms;OS_RELEASE=V6.1;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=ALANS;FORMAT=text;GUISE=sc
+hema;KEY=SCH_7007;FILE=P_SCHEMA:SCH_7007.SCH_TXT;DATE=7-oct-1995;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 700064/7007; 
+161 121 969 14126 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 31 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+**************** end of schema SCH_700064_7007 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_7014.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_7014.sch_txt
new file mode 100644
index 0000000..ad90060
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_7014.sch_txt
@@ -0,0 +1,1187 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=osf64;MC_MODEL=alpha;MC_ID=alf15;OS=OSF1;OS_RELEASE=V3.2;FRU=sdl_para
+solid_test_osf64;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=davidj;FORMAT=text;GU
+ISE=schema;KEY=SCH_7014;FILE=./sch_7014.sch_txt;DATE=23-nov-1995;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 701037/7014; 
+173 129 1045 15220 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 7 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+world; p; 1 101 0 
+current_state; p; 1 4 0 
+last_state; p; 1 4 0 
+current_sm_element; p; 1 172 0 
+spare; p; 1 2 0 
+4 STATE; State; 1 10 0 
+next; p; 1 4 0 
+previous; p; 1 4 0 
+in; p; 1 5 0 
+out; p; 1 5 0 
+partition; p; 1 3 0 
+sm1; p; 1 172 0 
+sm2; p; 1 172 0 
+fixed; l; 1 0 0 
+dead; l; 1 0 0 
+spare; p; 1 2 0 
+5 LINK; Link; 1 6 0 
+before; p; 1 4 0 
+after; p; 1 4 0 
+delta; p; 1 9 0 
+next_in_delta; p; 1 5 0 
+next_out; p; 1 5 0 
+spare; p; 1 2 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+9 DELTA; Delta; 1 12 0 
+link; p; 1 5 0 
+n_nodes; d; 1 0 5 
+n_bytes; d; 1 0 5 
+new; p; 1 2 0 
+n_dead_in_new; n; 1 0 0 
+n_live_in_new; n; 1 0 0 
+del; p; 1 2 0 
+copy; p; 1 2 0 
+n_dead_in_copy; n; 1 0 0 
+n_live_in_copy; n; 1 0 0 
+follow; l; 1 0 0 
+spare; p; 1 2 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 32 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 170 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+169 SM_DELTA; Sm_delta; 1 4 0 
+before; p; 1 171 0 
+after; p; 1 171 0 
+first_sm_element; p; 1 172 0 
+spare; p; 1 2 0 
+170 SESSION_DATA; Session Data; 1 22 0 
+attrib_def; p; 1 80 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+171 SMARK; Smark; 1 4 0 
+in; p; 1 169 0 
+out; p; 1 169 0 
+fixed; l; 1 0 0 
+spare; p; 1 2 0 
+172 SM_ELEMENT; Sm_element; 1 10 0 
+sm_delta; p; 1 169 0 
+state1; p; 1 4 0 
+state2; p; 1 4 0 
+next_in_delta; p; 1 172 0 
+prev_in_delta; p; 1 172 0 
+next_in_state1; p; 1 172 0 
+prev_in_state1; p; 1 172 0 
+next_in_state2; p; 1 172 0 
+prev_in_state2; p; 1 172 0 
+spare; p; 1 2 0 
+**************** end of schema SCH_701037_7014 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_7015.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_7015.sch_txt
new file mode 100644
index 0000000..a73346b
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_7015.sch_txt
@@ -0,0 +1,1180 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF3;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_7015;FILE=P_SCHEMA:SCH_7015.SCH_TXT;DATE=6-jan-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 701068/7015; 
+173 129 1038 15199 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+world; p; 1 101 0 
+current_state; p; 1 4 0 
+last_state; p; 1 4 0 
+current_sm_element; p; 1 172 0 
+new; p; 1 82 0 
+n_dead_in_new; n; 1 0 0 
+n_live_in_new; n; 1 0 0 
+del; p; 1 82 0 
+copy; p; 1 82 0 
+n_dead_in_copy; n; 1 0 0 
+n_live_in_copy; n; 1 0 0 
+4 STATE; State; 1 9 0 
+next; p; 1 4 0 
+previous; p; 1 4 0 
+in; p; 1 5 0 
+out; p; 1 5 0 
+partition; p; 1 3 0 
+sm1; p; 1 172 0 
+sm2; p; 1 172 0 
+n_nodes; d; 1 0 5 
+n_bytes; d; 1 0 5 
+5 LINK; Link; 1 5 0 
+before; p; 1 4 0 
+after; p; 1 4 0 
+next_in; p; 1 5 0 
+next_out; p; 1 5 0 
+follow; l; 1 0 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+9 SM_DELTA; Sm_delta; 1 3 0 
+before; p; 1 171 0 
+after; p; 1 171 0 
+first_sm_element; p; 1 172 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 32 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 170 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+169 UNIVERSE; Universe; 1 4 0 
+partition; p; 1 3 0 
+current_partition; p; 1 3 0 
+current_smark; p; 1 171 0 
+root_tag_table; p; 1 8 0 
+170 SESSION_DATA; Session Data; 1 22 0 
+attrib_def; p; 1 80 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+171 SMARK; Smark; 1 3 0 
+in; p; 1 9 0 
+out; p; 1 9 0 
+fixed; l; 1 0 0 
+172 SM_ELEMENT; Sm_element; 1 9 0 
+sm_delta; p; 1 9 0 
+state1; p; 1 4 0 
+state2; p; 1 4 0 
+next_in_delta; p; 1 172 0 
+prev_in_delta; p; 1 172 0 
+next_in_state1; p; 1 172 0 
+prev_in_state1; p; 1 172 0 
+next_in_state2; p; 1 172 0 
+prev_in_state2; p; 1 172 0 
+**************** end of schema SCH_701068_7015 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_7016.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_7016.sch_txt
new file mode 100644
index 0000000..dcbfd10
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_7016.sch_txt
@@ -0,0 +1,1163 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_7016;FILE=P_SCHEMA:SCH_7016.SCH_TXT;DATE=27-jan-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 701081/7016; 
+173 126 1024 15086 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+world; p; 1 101 0 
+current_pmark; p; 1 4 0 
+new; p; 1 82 0 
+del; p; 1 82 0 
+copy; p; 1 82 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+4 PMARK; Pmark; 1 8 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_nodes; d; 1 0 5 
+delta_is_forward; l; 1 0 0 
+created_by_mark; l; 1 0 0 
+5 UNIVERSE; Universe; 1 6 0 
+first_partition; p; 1 3 0 
+current_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 70 0 
+root_tag_table; p; 1 8 0 
+first_attrib_def; p; 1 80 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 70 0 
+pmarks_from_following; p; 1 70 0 
+10 ASSEMBLY; Assembly; 1 18 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 24 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 33 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+attrib_def; p; 1 80 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board; p; 1 107 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+172 SESSION_DATA; Session Data; 1 22 0 
+attrib_def; p; 1 80 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+parameter_check_on; l; 1 0 0 
+journal_open; d; 1 0 0 
+journal_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+empty_bulletin_board; l; 1 0 0 
+rollback_size; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+composite_geometry; d; 1 0 0 
+continuity_check; d; 1 0 0 
+parameterisation; d; 1 0 0 
+tag_limit; d; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+**************** end of schema SCH_701081_7016 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_8000.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_8000.sch_txt
new file mode 100644
index 0000000..3d8a88b
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_8000.sch_txt
@@ -0,0 +1,1147 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_8000;FILE=P_SCHEMA:SCH_8000.SCH_TXT;DATE=13-apr-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 800025/8000; 
+173 127 1007 14761 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+model_data; p; 1 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 1 82 0 
+del; p; 1 82 0 
+copy; p; 1 82 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+4 PMARK; Pmark; 1 14 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+created_by_mark; l; 1 0 0 
+5 UNIVERSE; Universe; 1 5 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 70 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 3 1 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+user_field; d; 1 0 1 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 4 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 70 0 
+pmarks_from_following; p; 1 70 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 8 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+101 WORLD; World; 1 10 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+roll_data; p; 1 171 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+171 ROLL_DATA; Roll Data; 1 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 1 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_800025_8000 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_8002.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_8002.sch_txt
new file mode 100644
index 0000000..b686a8c
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_8002.sch_txt
@@ -0,0 +1,1148 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_8002;FILE=P_SCHEMA:SCH_8002.SCH_TXT;DATE=10-may-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 800046/8002; 
+173 127 1008 14782 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+model_data; p; 1 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 1 82 0 
+del; p; 1 82 0 
+copy; p; 1 82 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+5 UNIVERSE; Universe; 1 5 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 70 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 70 0 
+pmarks_from_following; p; 1 70 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 9 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 21 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+171 ROLL_DATA; Roll Data; 1 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 1 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_800046_8002 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_8005.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_8005.sch_txt
new file mode 100644
index 0000000..af36c8e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_8005.sch_txt
@@ -0,0 +1,1152 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_8005;FILE=P_SCHEMA:SCH_8005.SCH_TXT;DATE=22-jun-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 800081/8005; 
+173 127 1012 14847 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+model_data; p; 1 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 1 82 0 
+del; p; 1 82 0 
+copy; p; 1 82 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+5 UNIVERSE; Universe; 1 5 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 70 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 70 0 
+pmarks_from_following; p; 1 70 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 23 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+171 ROLL_DATA; Roll Data; 1 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 1 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_800081_8005 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_8008.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_8008.sch_txt
new file mode 100644
index 0000000..62da197
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_8008.sch_txt
@@ -0,0 +1,1161 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_8008;FILE=P_SCHEMA:SCH_8008.SCH_TXT;DATE=13-jul-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 800097/8008; 
+173 130 1018 14982 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 13 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+model_data; p; 1 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+copy; p; 1 168 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+4 PMARK; Pmark; 1 13 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+5 UNIVERSE; Universe; 1 6 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 18 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 16 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 23 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 1 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 1 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 1 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 1 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 1 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_800097_8008 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_8101.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_8101.sch_txt
new file mode 100644
index 0000000..7a5b936
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_8101.sch_txt
@@ -0,0 +1,1172 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=sparc;MC_MODEL=sun4m;MC_ID=sdlln5;OS=SunOS;OS_RELEASE=5.5.1;FRU=sdl_p
+arasolid_test_sparc;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=alans;FORMAT=text;
+GUISE=schema;KEY=SCH_8101;FILE=./sch_8101.sch_txt;DATE=30-nov-1996;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 900080/8101; 
+173 130 1029 15112 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 16 0 
+next; p; 1 3 0 
+previous; p; 1 3 0 
+model_data; p; 1 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+copy; p; 1 168 0 
+n_live_in_new; d; 1 0 0 
+n_dead_in_new; d; 1 0 0 
+n_dead_in_copy; d; 1 0 0 
+n_live_in_copy; d; 1 0 0 
+at_pmark; l; 1 0 0 
+at_current_mark; l; 1 0 0 
+highest_id; d; 1 0 0 
+xmt_indices; p; 1 82 0 
+xmt_tags; p; 1 82 0 
+4 PMARK; Pmark; 1 14 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 1 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 1 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 1 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 1 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 1 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 39 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+168 CHAIN_HEAD; Chain head; 1 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 1 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 1 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 1 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 1 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_900080_8101 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_9001.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_9001.sch_txt
new file mode 100644
index 0000000..f26d74d
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_9001.sch_txt
@@ -0,0 +1,1175 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF12;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasol
+id_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=
+schema;KEY=SCH_9001;FILE=P_SCHEMA:SCH_9001.SCH_TXT;DATE=4-jan-1997;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 900102/9001; 
+173 130 1032 15152 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 14 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; d; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; d; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 40 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 10 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+**************** end of schema SCH_900102_9001 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_9003.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_9003.sch_txt
new file mode 100644
index 0000000..7192ca7
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_9003.sch_txt
@@ -0,0 +1,1226 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF1;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_9003;FILE=P_SCHEMA:SCH_9003.SCH_TXT;DATE=15-feb-1997;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 900133/9003; 
+182 134 1079 15745 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 14 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+n_new_bytes; d; 1 0 0 
+n_del_bytes; d; 1 0 0 
+n_copy_mod_bytes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 1 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 1 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 1 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 11 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 9 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 1 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 1 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parm; f; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+**************** end of schema SCH_900133_9003 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_9008.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_9008.sch_txt
new file mode 100644
index 0000000..5f1e85e
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_9008.sch_txt
@@ -0,0 +1,1227 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF1;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_9008;FILE=P_SCHEMA:SCH_9008.SCH_TXT;DATE=23-mar-1997;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 900161/9008; 
+182 134 1080 15750 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 15 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+**************** end of schema SCH_900161_9008 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/schema/sch_9100.sch_txt b/contrib/Parasolid/interface_parasolid/schema/sch_9100.sch_txt
new file mode 100644
index 0000000..2a3c841
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/schema/sch_9100.sch_txt
@@ -0,0 +1,1229 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=evms;MC_MODEL=ALPH;MC_ID=ALF3;OS=vms;OS_RELEASE=V6.2;FRU=sdl_parasoli
+d_test_evms;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=KERMAN;FORMAT=text;GUISE=s
+chema;KEY=SCH_9100;FILE=P_SCHEMA:SCH_9100.SCH_TXT;DATE=9-aug-1997;
+**PART2;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T 
+1 
+: SCHEMA FILE created by modeller version 901101/9100; 
+182 134 1082 15785 
+1 NULLP; Null; 1 0 0 
+2 WORKSPACE; Workspace; 1 1 1 
+ws; c; 1 0 1 
+3 PARTITION; Partition; 1 18 0 
+next; p; 0 3 0 
+previous; p; 0 3 0 
+model_data; p; 0 1034 0 
+current_pmark; p; 1 4 0 
+new; p; 0 168 0 
+del; p; 0 168 0 
+copy; p; 0 168 0 
+n_live_in_new; d; 0 0 0 
+n_dead_in_new; d; 0 0 0 
+n_dead_in_copy; d; 0 0 0 
+n_live_in_copy; d; 0 0 0 
+at_pmark; l; 0 0 0 
+at_current_mark; l; 0 0 0 
+highest_id; d; 1 0 0 
+rcv_key; p; 0 102 0 
+rcv_format; d; 0 0 0 
+rcv_tags; p; 0 82 0 
+rcv_user_fields; l; 0 0 0 
+4 PMARK; Pmark; 1 11 0 
+preceding; p; 1 4 0 
+first_following; p; 1 4 0 
+next_sibling; p; 1 4 0 
+prev_sibling; p; 1 4 0 
+mark_use_count; d; 0 0 0 
+n_new_nodes; d; 1 0 0 
+n_del_nodes; d; 1 0 0 
+n_copy_mod_nodes; d; 1 0 0 
+delta_key; d; 1 0 0 
+delta_is_forward; l; 1 0 0 
+id; d; 1 0 0 
+5 UNIVERSE; Universe; 0 7 0 
+first_partition; p; 1 3 0 
+current_mark; p; 1 9 0 
+pmarks_at_current; p; 1 170 0 
+root_tag_table; p; 1 8 0 
+session_data; p; 1 172 0 
+new; p; 1 168 0 
+del; p; 1 168 0 
+6 LEAF_TAG_TABLE; Leaf Tag Table; 0 2 0 
+entity; p; 1 1001 256 
+n_live; d; 1 0 0 
+7 BRANCH_TAG_TABLE; Branch Tag Table; 0 1 0 
+leaf; p; 1 6 1024 
+8 ROOT_TAG_TABLE; Root Tag Table; 0 6 0 
+branch; p; 1 7 1024 
+tag_limit; d; 1 0 0 
+null_branch; p; 1 7 0 
+null_leaf; p; 1 6 0 
+next_low_tag; d; 1 0 0 
+next_high_tag; d; 1 0 0 
+9 MARK; Mark; 0 4 0 
+following; p; 1 9 0 
+preceding; p; 1 9 0 
+pmarks_from_preceding; p; 1 170 0 
+pmarks_from_following; p; 1 170 0 
+10 ASSEMBLY; Assembly; 1 19 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 1 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+assembly_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 10 0 
+previous; p; 1 10 0 
+assembly_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+type; u; 1 0 0 
+sub_instance; p; 1 11 0 
+11 INSTANCE; Instance; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+type; u; 1 0 0 
+part; p; 1 1005 0 
+transform; p; 1 100 0 
+assembly; p; 1 10 0 
+next_in_part; p; 1 11 0 
+prev_in_part; p; 1 11 0 
+next_of_part; p; 1 11 0 
+prev_of_part; p; 1 11 0 
+12 BODY; Body; 1 25 0 
+highest_node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+attribute_chains; p; 1 70 0 
+list; p; 0 70 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+key; p; 1 102 0 
+res_size; f; 1 0 0 
+res_linear; f; 1 0 0 
+body_box; b; 0 0 0 
+ref_instance; p; 1 11 0 
+next; p; 1 12 0 
+previous; p; 1 12 0 
+body_box_tightness; c; 0 0 0 
+state; u; 1 0 0 
+owner; p; 1 101 0 
+body_type; u; 1 0 0 
+shell; p; 1 13 0 
+boundary_surface; p; 1 1006 0 
+boundary_curve; p; 1 1008 0 
+boundary_point; p; 1 29 0 
+region; p; 1 19 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+13 SHELL; Shell; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 13 0 
+face; p; 1 14 0 
+edge; p; 1 16 0 
+vertex; p; 1 18 0 
+region; p; 1 19 0 
+front_face; p; 1 14 0 
+14 FACE; Face; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+face_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+next; p; 1 14 0 
+previous; p; 1 14 0 
+loop; p; 1 15 0 
+shell; p; 1 13 0 
+surface; p; 1 1006 0 
+sense; c; 1 0 0 
+type; c; 0 0 0 
+face_box_tightness; c; 0 0 0 
+u_int; i; 0 0 0 
+v_int; i; 0 0 0 
+next_on_surface; p; 1 14 0 
+previous_on_surface; p; 1 14 0 
+next_front; p; 1 14 0 
+previous_front; p; 1 14 0 
+front_shell; p; 1 13 0 
+15 LOOP; Loop; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+face; p; 1 14 0 
+next; p; 1 15 0 
+type; c; 0 0 0 
+pbox; p; 0 109 0 
+16 EDGE; Edge; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+edge_box; b; 0 0 0 
+tolerance; f; 1 0 0 
+edge_box_tightness; c; 0 0 0 
+halfedge; p; 1 17 0 
+previous; p; 1 16 0 
+next; p; 1 16 0 
+curve; p; 1 1008 0 
+next_on_curve; p; 1 16 0 
+previous_on_curve; p; 1 16 0 
+owner; p; 1 1029 0 
+17 HALFEDGE; Halfedge; 1 11 0 
+loop; p; 1 15 0 
+forward; p; 1 17 0 
+backward; p; 1 17 0 
+vertex; p; 1 18 0 
+other; p; 1 17 0 
+edge; p; 1 16 0 
+curve; p; 1 1008 0 
+pbox; p; 0 109 0 
+next_at_vx; p; 1 17 0 
+polyline; p; 0 83 0 
+sense; c; 1 0 0 
+18 VERTEX; Vertex; 1 8 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+halfedge; p; 1 17 0 
+previous; p; 1 18 0 
+next; p; 1 18 0 
+point; p; 1 29 0 
+tolerance; f; 1 0 0 
+owner; p; 1 1029 0 
+19 REGION; Region; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+body; p; 1 12 0 
+next; p; 1 19 0 
+previous; p; 1 19 0 
+shell; p; 1 13 0 
+type; c; 1 0 0 
+29 POINT; Point; 1 6 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1011 0 
+next; p; 1 29 0 
+previous; p; 1 29 0 
+pvec; v; 1 0 0 
+30 LINE; Straight line; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+direction; v; 1 0 0 
+31 CIRCLE; Circle; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+radius; f; 1 0 0 
+32 ELLIPSE; Ellipse; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+33 PARABOLA; Parabola; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+focal_length; f; 1 0 0 
+34 HYPERBOLA; Hyperbola; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+origin; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+transverse_radius; f; 1 0 0 
+conjugate_radius; f; 1 0 0 
+35 PARACURVE; Parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+seg; n; 1 0 0 
+cpc; p; 1 48 0 
+36 OBSOLETE_CPC; Version 1 CPC (obsolete); 1 11 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+segment; p; 1 1025 1 
+37 PATCH_BOUND; Patch boundary; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; c; 1 0 0 
+lh_patch; p; 1 61 0 
+rh_patch; p; 1 61 0 
+38 INTERSECTION; Intersection; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+chart; p; 1 40 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+scale; f; 0 0 0 
+39 SILHOUETTE; Silhouette; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+analytic_root; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+start; p; 1 41 0 
+end; p; 1 41 0 
+eye; v; 1 0 0 
+40 CHART; Chart; 1 7 1 
+base_parameter; f; 1 0 0 
+base_scale; f; 1 0 0 
+chart_count; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+parameter_error; f; 1 0 2 
+hvec; h; 1 0 1 
+41 LIMIT; Limit; 1 2 1 
+type; c; 1 0 0 
+hvec; h; 1 0 1 
+42 BASIC_SEGMENT; basic segment of CPC; 0 4 1 
+segment_box; b; 0 0 0 
+t_length; f; 1 0 0 
+hull; p; 0 65 0 
+bezier_vertices; f; 1 0 1 
+43 BSPLINE_CURVE; B-spline curve; 1 5 0 
+knot_vector; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+vertex_count; n; 1 0 0 
+order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+44 KNOT_VECTOR; Knot vector; 1 3 1 
+periodic; l; 1 0 0 
+knot_count; n; 1 0 0 
+knots; f; 1 0 1 
+45 BSPLINE_VERTICES; B-spline vertices; 1 1 1 
+vertices; f; 1 0 1 
+46 OFFSET_CURVE; Offset curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+offset; f; 1 0 0 
+47 SUPER_SEGMENT; super segment of CPC; 0 4 0 
+split; f; 1 0 0 
+first; p; 1 1025 0 
+last; p; 1 1025 0 
+t_length; f; 1 0 0 
+48 CPC; Composite parametric curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 103 0 
+bspline; p; 1 43 0 
+49 OBSOLETE_SP_CURVE; SP curve; 1 12 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+const_param; l; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+surface; p; 1 1006 0 
+bezier_vertices; f; 1 0 1 
+50 PLANE; Plane; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+x_axis; v; 1 0 0 
+51 CYLINDER; Cylinder; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+52 CONE; Cone; 1 13 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+x_axis; v; 1 0 0 
+53 SPHERE; Sphere; 1 11 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+axis; v; 1 0 0 
+x_axis; v; 1 0 0 
+54 TORUS; Torus; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+x_axis; v; 1 0 0 
+55 PIPE; Pipe; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+spine; p; 1 1008 0 
+radius; f; 1 0 0 
+56 BLENDED_EDGE; Blended edge; 1 17 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 2 
+spine; p; 1 1008 0 
+range; f; 1 0 2 
+thumb_weight; f; 1 0 2 
+boundary; p; 1 1006 2 
+start; p; 1 41 0 
+end; p; 1 41 0 
+approx_spine; p; 0 1008 0 
+approx_spine_ctol; f; 0 0 0 
+57 BLENDED_VERTEX; Blended vertex; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+blend_type; c; 1 0 0 
+surface; p; 1 1006 3 
+sub_surface; p; 1 1006 3 
+boundary; p; 1 1006 3 
+range; f; 1 0 3 
+thumb_weight; f; 1 0 3 
+centre; v; 1 0 0 
+58 BLEND_OVERLAP; Blend overlap; 1 14 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+surface; p; 1 1006 2 
+sub_surface; p; 1 1006 4 
+range; f; 1 0 4 
+thumb_weight; f; 1 0 4 
+blend_type; c; 1 0 2 
+overlap_type; c; 1 0 0 
+swap_u_v; l; 1 0 0 
+59 BLEND_BOUND; Blend boundary; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+boundary; n; 1 0 0 
+blend; p; 1 1006 0 
+60 OFFSET_SURF; Offset surface; 1 19 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+check; c; 1 0 0 
+true_offset; l; 1 0 0 
+surface; p; 1 1006 0 
+offset; f; 1 0 0 
+scale; f; 1 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+tree; p; 0 160 0 
+61 PARASURF; Parametric surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+col; n; 1 0 0 
+row; n; 1 0 0 
+cps; p; 1 69 0 
+62 OBSOLETE_CPS; Version 1 CPS (obsolete); 1 13 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+patch; p; 1 1026 1 
+63 SILH_SURF; Silhouette surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+from_infinity; l; 1 0 0 
+surface; p; 1 1006 0 
+eye; v; 1 0 0 
+64 BASIC_PATCH; Basic Patch; 0 6 1 
+patch_box; b; 0 0 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+hull; p; 0 65 0 
+scale; f; 0 0 0 
+bezier_vertices; f; 1 0 1 
+65 HULL; Convex hull; 0 4 1 
+dimension; n; 1 0 0 
+plane_count; n; 1 0 0 
+corner_count; n; 1 0 0 
+vecs; v; 1 0 1 
+66 BSPLINE_SURF; B-spline surface; 1 8 0 
+row_knots; p; 1 44 0 
+col_knots; p; 1 44 0 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+67 SWEPT_SURF; Swept surface; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+section; p; 1 1008 0 
+sweep; v; 1 0 0 
+scale; f; 1 0 0 
+68 SPUN_SURF; Spun surface; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+profile; p; 1 1008 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+start; v; 1 0 0 
+end; v; 1 0 0 
+start_param; f; 1 0 0 
+end_param; f; 1 0 0 
+x_axis; v; 1 0 0 
+scale; f; 1 0 0 
+69 CPS; Compos; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bezier; p; 1 104 0 
+bspline; p; 1 66 0 
+props; p; 0 123 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+70 LIST; List Header; 1 12 0 
+node_id; d; 1 0 0 
+owner; p; 1 1013 0 
+next; p; 1 70 0 
+previous; p; 1 70 0 
+list_type; d; 1 0 0 
+list_length; d; 1 0 0 
+block_length; d; 1 0 0 
+size_of_entry; d; 1 0 0 
+list_block; p; 1 1012 0 
+finger_block; p; 1 1012 0 
+finger_index; d; 1 0 0 
+notransmit; l; 1 0 0 
+71 REAL_LIS_BLOCK; Real List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 71 0 
+entries; f; 1 0 1 
+72 INTEGER_LIS_BLOCK; Integer List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 72 0 
+entries; d; 1 0 1 
+73 TAG_LIS_BLOCK; Tag List; 0 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 73 0 
+entries; t; 1 0 1 
+74 POINTER_LIS_BLOCK; Pointer List; 1 3 1 
+n_entries; d; 1 0 0 
+next_block; p; 1 74 0 
+entries; p; 1 1001 1 
+79 ATT_DEF_ID; name field type for attrib def.; 1 1 1 
+string; c; 1 0 1 
+80 ATTRIB_DEF; attribute definition; 1 6 1 
+next; p; 1 80 0 
+identifier; p; 1 79 0 
+type_id; d; 1 0 0 
+actions; u; 1 0 8 
+legal_owners; l; 1 0 13 
+fields; u; 1 0 1 
+81 ATTRIBUTE; Attribute; 1 8 1 
+node_id; d; 1 0 0 
+definition; p; 1 80 0 
+owner; p; 1 1015 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_of_type; p; 1 81 0 
+previous_of_type; p; 1 81 0 
+fields; p; 1 1018 1 
+82 INT_VALUES; Int values; 1 1 1 
+values; d; 1 0 1 
+83 REAL_VALUES; Real values; 1 1 1 
+values; f; 1 0 1 
+84 CHAR_VALUES; Character values; 1 1 1 
+values; c; 1 0 1 
+85 POINT_VALUES; Point values; 1 1 1 
+values; v; 1 0 1 
+86 VECTOR_VALUES; Vector values; 1 1 1 
+values; v; 1 0 1 
+87 AXIS_VALUES; Axis values; 1 1 1 
+values; v; 1 0 1 
+88 TAG_VALUES; Tag values; 1 1 1 
+values; t; 1 0 1 
+89 DIRECTION_VALUES; Direction values; 1 1 1 
+values; v; 1 0 1 
+90 FEATURE; Feature; 1 7 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1005 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+type; u; 1 0 0 
+first_member; p; 1 91 0 
+91 MEMBER_OF_FEATURE; Member of feature; 1 7 0 
+dummy_node_id; d; 1 0 0 
+owning_feature; p; 1 90 0 
+owner; p; 1 1017 0 
+next; p; 1 1019 0 
+previous; p; 1 1019 0 
+next_member; p; 1 91 0 
+previous_member; p; 1 91 0 
+96 SHORT_VALUES; Short values; 1 1 1 
+values; n; 1 0 1 
+97 BOX_VALUES; Box values; 1 1 1 
+values; b; 1 0 1 
+100 TRANSFORM; Transformation; 1 10 0 
+node_id; d; 1 0 0 
+owner; p; 1 1023 0 
+next; p; 1 100 0 
+previous; p; 1 100 0 
+rotation_matrix; f; 1 0 9 
+translation_vector; v; 1 0 0 
+scale; f; 1 0 0 
+flag; d; 1 0 0 
+max_scale; f; 0 0 0 
+perspective_vector; v; 1 0 0 
+101 WORLD; World; 1 12 0 
+assembly; p; 1 10 0 
+attribute; p; 1 81 0 
+body; p; 1 12 0 
+list; p; 0 70 0 
+transform; p; 1 100 0 
+surface; p; 1 1006 0 
+curve; p; 1 1008 0 
+point; p; 1 29 0 
+alive; l; 1 0 0 
+attrib_def; p; 1 80 0 
+highest_id; d; 1 0 0 
+current_id; d; 1 0 0 
+102 KEY; Key; 1 1 1 
+string; c; 1 0 1 
+103 BEZIER_CURVE; Composite Bezier curve; 1 5 1 
+vertex_dimension; n; 1 0 0 
+segment_count; n; 1 0 0 
+order; n; 1 0 0 
+check; c; 1 0 0 
+segment; p; 1 1025 1 
+104 BEZIER_SURF; Composite Bezier Surface; 1 8 1 
+vertex_dimension; n; 1 0 0 
+col_count; n; 1 0 0 
+row_count; n; 1 0 0 
+u_order; n; 1 0 0 
+v_order; n; 1 0 0 
+check; c; 1 0 0 
+unsanitised; p; 0 108 0 
+patch; p; 1 1026 1 
+105 SUPER_PATCH; super patch of CPS; 0 6 0 
+split; f; 1 0 0 
+split_dir; c; 1 0 0 
+first; p; 1 1026 0 
+last; p; 1 1026 0 
+u_length; f; 1 0 0 
+v_length; f; 1 0 0 
+106 EVENT_FILTER; Event Filter; 0 15 0 
+face; l; 1 0 0 
+edge; l; 1 0 0 
+vertex; l; 1 0 0 
+loop; l; 1 0 0 
+shell; l; 1 0 0 
+region; l; 1 0 0 
+instance; l; 1 0 0 
+body; l; 1 0 0 
+assembly; l; 1 0 0 
+point; l; 1 0 0 
+curve; l; 1 0 0 
+surface; l; 1 0 0 
+transform; l; 1 0 0 
+feature; l; 1 0 0 
+att_def; l; 1 0 0 
+107 BULLETIN_BOARD; Bulletin Board; 0 14 0 
+create; p; 1 106 0 
+delete; p; 1 106 0 
+change; p; 1 106 0 
+transform; p; 1 106 0 
+split; p; 1 106 0 
+merge; p; 1 106 0 
+copy; p; 1 106 0 
+transfer; p; 1 106 0 
+change_attribute; p; 1 106 0 
+event; p; 1 70 0 
+entities; p; 1 70 0 
+n_entities; p; 1 70 0 
+entity_nt; p; 1 70 0 
+entity_usfld; p; 1 70 0 
+108 UNSANITISED; holds array of unsanitised patches; 0 1 1 
+bad_patch; p; 1 64 1 
+109 PBOX; parameter_box; 0 4 0 
+type; c; 1 0 0 
+sense; c; 1 0 0 
+u_int; i; 1 0 0 
+v_int; i; 1 0 0 
+110 SET_ELEMENT_TAG; Set Element Tag; 1 6 0 
+next; p; 1 110 0 
+forward; p; 1 110 0 
+backward; p; 1 110 0 
+class; d; 1 0 0 
+set; p; 1 1021 0 
+node; p; 1 1022 0 
+111 FACE_SET; Face Set; 1 5 0 
+tag; p; 1 110 0 
+next; p; 1 111 0 
+class; d; 1 0 0 
+he_set; p; 1 112 0 
+surfaces; p; 1 1006 0 
+112 HALFEDGE_SET; Halfedge Set; 1 6 0 
+tag; p; 1 110 0 
+next; p; 1 112 0 
+previous; p; 1 112 0 
+class; d; 1 0 0 
+fa_set; p; 1 111 0 
+co_he_set; p; 1 112 0 
+120 PE_SURF; PE_surface; 1 17 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+min_radii_curvature; f; 0 0 2 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+data; p; 1 1027 0 
+tf; p; 1 100 0 
+props; p; 0 123 0 
+tree; p; 0 160 0 
+approx; p; 0 1026 0 
+internal_geom; p; 1 1028 1 
+121 INT_PE_DATA; int_PE_data; 1 3 0 
+geom_type; d; 1 0 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+122 EXT_PE_DATA; ext_pe_data; 1 4 1 
+key; p; 1 102 0 
+real_array; p; 1 83 0 
+int_array; p; 1 82 0 
+data; f; 0 0 1 
+123 SU_PARAM_PROPS; su_param_props; 0 6 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_start; c; 1 0 0 
+u_end; c; 1 0 0 
+v_start; c; 1 0 0 
+v_end; c; 1 0 0 
+124 B_SURFACE; B surface; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1007 0 
+next; p; 1 1006 0 
+previous; p; 1 1006 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 126 0 
+data; p; 1 125 0 
+125 SURFACE_DATA; surface_data; 1 41 0 
+safe_u_range; i; 0 0 0 
+safe_v_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+u_parameter_scale; f; 0 0 0 
+v_parameter_scale; f; 0 0 0 
+u_tangent_half_angle; f; 0 0 0 
+v_tangent_half_angle; f; 0 0 0 
+uint; i; 0 0 0 
+vint; i; 0 0 0 
+original_uint; i; 1 0 0 
+original_vint; i; 1 0 0 
+extended_uint; i; 1 0 0 
+extended_vint; i; 1 0 0 
+convexity; u; 0 0 0 
+continuity; u; 0 0 0 
+self_int; u; 1 0 0 
+u_start; c; 0 0 0 
+u_end; c; 0 0 0 
+v_start; c; 0 0 0 
+v_end; c; 0 0 0 
+original_u_start; c; 1 0 0 
+original_u_end; c; 1 0 0 
+original_v_start; c; 1 0 0 
+original_v_end; c; 1 0 0 
+extended_u_start; c; 1 0 0 
+extended_u_end; c; 1 0 0 
+extended_v_start; c; 1 0 0 
+extended_v_end; c; 1 0 0 
+degeneracy_status; c; 0 0 0 
+analytic_form_type; c; 1 0 0 
+swept_form_type; c; 1 0 0 
+spun_form_type; c; 1 0 0 
+blend_form_type; c; 1 0 0 
+degeneracy; p; 0 159 0 
+tree; p; 0 160 0 
+polynomial_patches; p; 0 161 0 
+analytic_form; p; 1 1030 0 
+swept_form; p; 1 1031 0 
+spun_form; p; 1 1032 0 
+blend_form; p; 1 1033 0 
+126 NURBS_SURF; NURBS surface; 1 22 0 
+u_periodic; l; 1 0 0 
+v_periodic; l; 1 0 0 
+u_degree; n; 1 0 0 
+v_degree; n; 1 0 0 
+n_u_vertices; n; 1 0 0 
+n_v_vertices; n; 1 0 0 
+u_knot_type; u; 1 0 0 
+v_knot_type; u; 1 0 0 
+n_u_knots; n; 1 0 0 
+n_v_knots; n; 1 0 0 
+rational; l; 1 0 0 
+u_closed; l; 1 0 0 
+v_closed; l; 1 0 0 
+surface_form; u; 1 0 0 
+vertex_dim; n; 1 0 0 
+bspline_vertices; p; 1 45 0 
+u_knot_mult; p; 1 127 0 
+v_knot_mult; p; 1 127 0 
+u_knots; p; 1 128 0 
+v_knots; p; 1 128 0 
+u_knot_mult_sum; p; 0 129 0 
+v_knot_mult_sum; p; 0 129 0 
+127 KNOT_MULT; Knot multiplicities; 1 1 1 
+mult; n; 1 0 1 
+128 KNOT_SET; Knot set; 1 1 1 
+knots; f; 1 0 1 
+129 KNOT_MULT_SUM; knot_mult_sum; 0 1 1 
+mult; n; 1 0 1 
+130 PE_CURVE; PE_curve; 1 15 1 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+type; c; 1 0 0 
+data; p; 1 1027 0 
+global_scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tf; p; 1 100 0 
+props; p; 0 131 0 
+approx; p; 0 1025 0 
+internal_geom; p; 1 1028 1 
+131 CU_PARAM_PROPS; cu_param_props; 0 3 0 
+tint; i; 1 0 0 
+t_start; c; 1 0 0 
+t_end; c; 1 0 0 
+132 PCURVE; General Bspline SP-curve; 1 10 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+bsp_parms; l; 1 0 0 
+surface; p; 1 1006 0 
+bspline; p; 1 43 0 
+133 TRIMMED_CURVE; Trimmed Curve; 1 12 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+basis_curve; p; 1 1008 0 
+point_1; v; 1 0 0 
+point_2; v; 1 0 0 
+parm_1; f; 1 0 0 
+parm_2; f; 1 0 0 
+134 B_CURVE; B curve; 1 9 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+nurbs; p; 1 136 0 
+data; p; 1 135 0 
+135 CURVE_DATA; curve_data; 1 11 0 
+safe_range; i; 0 0 0 
+bx; b; 0 0 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+tangent_half_angle; f; 0 0 0 
+tint; i; 0 0 0 
+self_int; u; 1 0 0 
+t_start; c; 0 0 0 
+t_end; c; 0 0 0 
+tree; p; 0 139 0 
+polynomial_segments; p; 0 180 0 
+136 NURBS_CURVE; NURBS curve; 1 13 0 
+degree; n; 1 0 0 
+n_vertices; n; 1 0 0 
+vertex_dim; n; 1 0 0 
+n_knots; n; 1 0 0 
+knot_type; u; 1 0 0 
+periodic; l; 1 0 0 
+closed; l; 1 0 0 
+rational; l; 1 0 0 
+curve_form; u; 1 0 0 
+bspline_vertices; p; 1 45 0 
+knot_mult; p; 1 127 0 
+knots; p; 1 128 0 
+knot_mult_sum; p; 0 129 0 
+137 SP_CURVE; SP curve; 1 16 0 
+node_id; d; 1 0 0 
+attributes_features; p; 1 1019 0 
+owner; p; 1 1010 0 
+next; p; 1 1008 0 
+previous; p; 1 1008 0 
+geometric_owner; p; 1 141 0 
+sense; c; 1 0 0 
+periodic; u; 0 0 0 
+class; u; 0 0 0 
+chart; p; 0 138 0 
+scale; f; 0 0 0 
+parameter_scale; f; 0 0 0 
+surface; p; 1 1006 0 
+b_curve; p; 1 134 0 
+original; p; 1 1008 0 
+tolerance_to_original; f; 1 0 0 
+138 SP_CHART; SP curve chart; 0 4 1 
+chart_count; d; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+hvec; h; 1 0 1 
+139 CU_TREE; tree; 0 11 0 
+n_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+chordal_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+141 GEOMETRIC_OWNER; geometric owner of geometry; 1 4 0 
+owner; p; 1 1003 0 
+next; p; 1 141 0 
+previous; p; 1 141 0 
+shared_geometry; p; 1 1003 0 
+150 PLANE_FORM; plane_form; 1 2 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+151 CYLINDER_FORM; cylinder_form; 1 4 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+152 CONE_FORM; cone_form; 1 6 0 
+pvec; v; 1 0 0 
+axis; v; 1 0 0 
+radius; f; 1 0 0 
+sin_half_angle; f; 1 0 0 
+cos_half_angle; f; 1 0 0 
+sense; c; 1 0 0 
+153 SPHERE_FORM; sphere_form; 1 3 0 
+centre; v; 1 0 0 
+radius; f; 1 0 0 
+sense; c; 1 0 0 
+154 TORUS_FORM; torus_form; 1 5 0 
+centre; v; 1 0 0 
+axis; v; 1 0 0 
+major_radius; f; 1 0 0 
+minor_radius; f; 1 0 0 
+sense; c; 1 0 0 
+155 SWEPT_FORM; swept_form; 1 2 0 
+sweep; v; 1 0 0 
+subtype; c; 1 0 0 
+156 SWEPT_UV_FORM; swept_uv_form; 1 4 0 
+sweep_u; v; 1 0 0 
+sweep_v; v; 1 0 0 
+subtype_u; c; 1 0 0 
+subtype_v; c; 1 0 0 
+157 SPUN_FORM; spun_form; 1 3 0 
+base; v; 1 0 0 
+axis; v; 1 0 0 
+subtype; c; 1 0 0 
+158 VAR_RADIUS_PIPE_FORM; var_radius_pipe_form; 1 4 0 
+max_radius; f; 1 0 0 
+min_radius; f; 1 0 0 
+max_radius_bdry; c; 1 0 0 
+min_radius_bdry; c; 1 0 0 
+159 SU_DEGENERACY; su_degeneracy; 0 6 0 
+pvec; v; 1 0 0 
+normal; v; 1 0 0 
+u_range; i; 1 0 0 
+v_range; i; 1 0 0 
+type; d; 1 0 0 
+next; p; 1 159 0 
+160 SU_TREE; tree; 0 25 0 
+n_u_pvecs; n; 1 0 0 
+n_v_pvecs; n; 1 0 0 
+n_branches; n; 1 0 0 
+n_leaves; n; 1 0 0 
+distance_error; f; 1 0 0 
+angular_error; f; 1 0 0 
+regular_pvecs; p; 1 85 0 
+split_parms; p; 1 83 0 
+split_dirs; p; 1 84 0 
+branch_parents; p; 1 96 0 
+branch_lo_children; p; 1 96 0 
+branch_hi_children; p; 1 96 0 
+leaf_parents; p; 1 96 0 
+leaf_boxes; p; 1 97 0 
+leaf_pvecs; p; 1 85 0 
+leaf_u_lo; p; 1 83 0 
+leaf_u_hi; p; 1 83 0 
+leaf_v_lo; p; 1 83 0 
+leaf_v_hi; p; 1 83 0 
+bucket_chars; p; 1 84 0 
+bucket_shorts; p; 1 96 0 
+bucket_ints; p; 1 82 0 
+bucket_reals; p; 1 83 0 
+leaf_u_splits; p; 1 96 0 
+leaf_v_splits; p; 1 96 0 
+161 POLYNOMIAL_PATCHES; polynomial cache; 0 2 1 
+n_patches; d; 1 0 0 
+patch; p; 1 162 1 
+162 POLYNOMIAL_PATCH; polynomial patch; 0 29 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+triangular; l; 1 0 0 
+u_knot_index; n; 1 0 0 
+v_knot_index; n; 1 0 0 
+uint; i; 1 0 0 
+vint; i; 1 0 0 
+u_scale; f; 1 0 0 
+v_scale; f; 1 0 0 
+u_on_right; l; 1 0 0 
+v_on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdu; p; 1 86 0 
+Cdv; p; 1 86 0 
+Cd2u; p; 1 86 0 
+Cdudv; p; 1 86 0 
+Cd2v; p; 1 86 0 
+Cd2udv; p; 1 86 0 
+Cd2vdu; p; 1 86 0 
+Cd2ud2v; p; 1 86 0 
+W; p; 1 83 0 
+Wdu; p; 1 83 0 
+Wdv; p; 1 83 0 
+Wd2u; p; 1 83 0 
+Wdudv; p; 1 83 0 
+Wd2v; p; 1 83 0 
+Wd2udv; p; 1 83 0 
+Wd2vdu; p; 1 83 0 
+Wd2ud2v; p; 1 83 0 
+168 CHAIN_HEAD; Chain head; 0 1 0 
+dummy; c; 1 0 0 
+169 PMARK_ARRAY_INTERNAL; Pmark array internal; 0 1 1 
+pmarks; p; 1 4 1 
+170 PMARK_ARRAY; Pmark array; 0 3 0 
+length; d; 1 0 0 
+size; d; 1 0 0 
+array; p; 1 169 0 
+171 ROLL_DATA; Roll Data; 0 14 0 
+current_partition; p; 1 3 0 
+bulletin_board; p; 1 107 0 
+linear_prec; f; 1 0 0 
+angular_prec; f; 1 0 0 
+receive_user_fld; l; 1 0 0 
+local_check_on; l; 1 0 0 
+data_check_on; l; 1 0 0 
+self_int_check_on; l; 1 0 0 
+generated_surfs_on; l; 1 0 0 
+general_topology_on; l; 1 0 0 
+bulletin_board_on; d; 1 0 0 
+binary_text; d; 1 0 0 
+snapshot_binary_text; d; 1 0 0 
+continuity_check; d; 1 0 0 
+172 SESSION_DATA; Session Data; 0 7 0 
+attrib_def; p; 1 80 0 
+parameter_check_on; l; 1 0 0 
+journal_on; l; 1 0 0 
+roll_forward; l; 1 0 0 
+journal_open; d; 1 0 0 
+rollback_size; d; 1 0 0 
+tag_limit; d; 1 0 0 
+180 POLYNOMIAL_SEGMENTS; polynomial rep; 0 2 1 
+n_segments; d; 1 0 0 
+segment; p; 1 181 1 
+181 POLYNOMIAL_SEGMENT; polynomial segment; 0 12 0 
+last_used; d; 1 0 0 
+n_derivatives; d; 1 0 0 
+knot_index; n; 1 0 0 
+tint; i; 1 0 0 
+scale; f; 1 0 0 
+on_right; l; 1 0 0 
+C; p; 1 86 0 
+Cdt; p; 1 86 0 
+Cd2t; p; 1 86 0 
+W; p; 1 83 0 
+Wdt; p; 1 83 0 
+Wd2t; p; 1 83 0 
+**************** end of schema SCH_901101_9100 **************** 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/3D solid-X-Y plane.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/3D solid-X-Y plane.xmt_txt
new file mode 100644
index 0000000..5ca01e4
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/3D solid-X-Y plane.xmt_txt	
@@ -0,0 +1,78 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=x64/Windows NT;
+MC_MODEL=genuineintel family 6 model 14 stepping 5, intel(r) core(tm) i5 cpu         760  @ 2.80ghz;
+MC_ID=ds77;
+OS=windows nt (x64);
+OS_RELEASE=5.2 (workstation) (build 3790: service pack 2) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=autoform;
+FORMAT=text;
+GUISE=transmit;
+KEY=solid-xy;
+FILE=D:\WorkPiece\solid-xy.x_t;
+DATE=6-may-2014;
+**PART2;
+SCH=SCH_2201175_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 220117523 SCH_2201175_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 116 2 3 0 0 0 0 1e3 1
+e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 0 0 0 0 81 255 2 2 110 11 1 0 0 0 0 12 13 70 11
+ CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fing
+er_block1012 0 CZ3 0 4 T1 0 0 2 20 1 14 14 13 255 4 91 0 1 0 15 0 0 16 0 50 255
+ 5 90 0 15 17 0 0 +.4000040004582675 .364285996472412 .03 0 -1 0 0 0 -1 30 255 6
+ 86 0 18 19 0 0 +.4000040004582675 .364285996472412 .03 0 0 -1 29 255 7 67 0 20
+ 21 0 .4000040004582675 0 -.01 19 255 8 1 0 1 16 0 22 V16 255 9 73 0 ?23 0 24 19
+ 0 0 1 18 255 10 15 0 25 0 26 27 ?1 17 255 25 0 28 29 30 10 31 32 0 33 +18 26 10
+ 0 30 10 34 35 ?1 29 27 17 0 10 35 36 .4000040004582675 0 .03 29 35 12 0 26 37 2
+7 0 0 .03 29 36 70 0 38 27 39 .4000040004582675 .364285996472412 -.01 18 38 60 0
+ 40 41 0 36 ?1 29 39 69 0 41 36 21 0 .364285996472412 -.01 18 41 58 0 42 43 38 3
+9 ?1 29 21 68 0 43 39 7 0 0 -.01 18 43 56 0 44 20 41 21 ?1 17 44 0 45 46 23 43 4
+2 47 0 48 +18 20 54 0 49 50 43 7 ?1 17 49 0 51 33 48 20 52 53 0 54 +18 50 2 0 29
+ 34 20 55 ?1 17 29 0 28 56 25 50 57 58 0 59 +18 34 5 0 60 26 50 37 ?1 29 55 4 0
+ 50 0 37 .4000040004582675 .364285996472412 .03 29 37 7 0 34 55 35 0 .3642859964
+72412 .03 17 60 0 45 23 46 34 30 61 0 56 -15 255 45 79 0 44 62 0 17 23 0 45 44 6
+0 41 63 9 0 64 +17 46 0 45 60 44 26 48 24 0 31 -17 30 0 28 25 56 26 60 61 0 46 +
+16 61 11 0 ?30 32 65 66 0 0 1 17 56 0 28 30 29 34 67 65 0 63 +15 28 23 0 56 68 0
+ 17 67 0 69 70 63 50 56 65 0 0 -16 65 6 0 ?56 61 71 72 0 0 1 17 63 0 69 67 64 34
+ 23 9 0 0 -15 69 81 0 64 15 0 17 64 0 69 63 70 41 73 74 0 0 +17 70 0 69 64 67 38
+ 59 18 0 73 +17 73 0 75 76 42 38 64 74 0 0 -16 74 52 0 ?64 47 0 77 0 0 1 16 47 5
+0 0 ?44 53 74 78 0 0 1 30 77 66 0 74 79 78 0 +.4000040004582675 .364285996472412
+ -.01 -1 0 -888169536987207e-32 30 79 22 0 58 80 77 0 +.4000040004582675 0 .03 0
+ 1 0 30 78 65 0 47 77 81 0 +0 .364285996472412 -.01 0 -1 0 30 81 64 0 53 78 82 0
+ +0 0 -.01 1 0 888169536987207e-32 16 53 48 0 ?49 71 47 81 0 0 1 30 82 63 0 71 8
+1 83 0 +.4000040004582675 0 -.01 0 1 0 16 71 46 0 ?40 65 53 82 0 0 1 30 83 83 0
+ 84 82 85 0 +.4000040004582675 0 .03 0 0 -1 16 84 71 0 ?54 24 18 83 0 0 1 30 85
+ 84 0 24 83 19 0 +0 0 .03 0 0 -1 16 24 72 0 ?48 9 84 85 0 0 1 30 19 85 0 9 85 6
+ 0 +0 .364285996472412 .03 0 0 -1 17 48 0 51 49 31 43 46 24 0 52 +15 51 77 0 49
+ 86 0 17 31 0 51 48 33 26 25 32 0 0 -17 52 0 75 42 76 43 49 53 0 0 -15 75 45 0 7
+3 87 0 17 42 0 75 73 52 41 44 47 0 23 -17 76 0 75 52 73 20 40 71 0 0 -17 40 0 88
+ 59 54 38 76 71 0 70 +15 88 75 0 40 89 0 17 59 0 88 57 40 50 70 18 0 67 -17 54 0
+ 88 40 57 20 33 84 0 76 +17 57 0 88 54 59 10 29 58 0 0 -17 33 0 51 31 49 10 54 8
+4 0 57 -16 58 20 0 ?29 18 32 79 0 0 1 16 18 74 0 ?70 84 58 6 0 0 1 16 32 16 0 ?2
+5 58 61 80 0 0 1 30 80 19 0 32 66 79 0 +0 0 .03 1 0 888169536987207e-32 30 66 14
+ 0 61 72 80 0 +0 .364285996472412 .03 0 -1 0 30 72 9 0 65 0 66 0 +.4000040004582
+675 .364285996472412 .03 -1 0 -888169536987207e-32 14 255 89 76 90 ?68 86 88 4 9
+1 -0 0 68 86 22 81 1 90 114 92 89 0 0 93 94 95 14 68 24 94 ?87 89 28 4 96 +0 0 8
+7 89 22 14 86 78 93 ?89 62 51 4 97 -0 0 89 62 22 50 91 87 0 89 98 97 0 +.4000040
+004582675 0 .03 -1 0 0 0 0 1 13 22 3 0 0 0 0 0 0 8 15 14 15 82 99 ?62 0 69 4 5 -
+0 0 62 0 22 81 1 99 111 92 15 0 0 0 100 101 14 62 80 100 ?86 15 45 4 17 -0 0 86
+ 15 22 81 1 100 112 92 62 0 0 99 93 102 50 17 89 0 62 97 5 0 +0 .364285996472412
+ .03 1 0 0 0 0 -1 50 97 88 0 86 91 17 0 +0 0 .03 0 1 0 0 0 1 80 255 1 92 0 103 8
+001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 81 1 93 113 92 86 0 0 100 90 104 83 255 3
+ 102 .5960784 .6666667 .6862745 83 3 104 .5960784 .6666667 .6862745 79 255 15 10
+3 SDL/TYSA_COLOUR83 3 101 .5960784 .6666667 .6862745 50 98 62 0 87 96 91 0 +0 .3
+64285996472412 -.01 -888169536987207e-32 0 1 1 0 888169536987207e-32 14 87 42 10
+5 ?0 68 75 4 98 -0 0 0 68 22 50 96 25 0 68 0 98 0 +0 .364285996472412 .03 -88816
+9536987207e-32 0 1 1 0 888169536987207e-32 81 1 105 116 92 87 0 0 94 0 106 81 1
+ 94 115 92 68 0 0 90 105 107 83 3 106 .5960784 .6666667 .6862745 83 3 107 .59607
+84 .6666667 .6862745 83 3 95 .5960784 .6666667 .6862745 19 16 92 0 1 0 8 4 S74 4
+ CI16 index_map_offset0 0 1 dCCZ20 14 2 0 0 2 105 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 80 2 11 108 109 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 12 7830.64
+ 84 255 8 13 Kg/Cu M 79 16 109 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/3D solid-Z-Y plane.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/3D solid-Z-Y plane.xmt_txt
new file mode 100644
index 0000000..7a107da
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/3D solid-Z-Y plane.xmt_txt	
@@ -0,0 +1,73 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=x64/Windows NT;
+MC_MODEL=genuineintel family 6 model 14 stepping 5, intel(r) core(tm) i5 cpu         760  @ 2.80ghz;
+MC_ID=ds77;
+OS=windows nt (x64);
+OS_RELEASE=5.2 (workstation) (build 3790: service pack 2) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=autoform;
+FORMAT=text;
+GUISE=transmit;
+KEY=solid-ZY-plane;
+FILE=D:\WorkPiece\solid-ZY-plane.x_t;
+DATE=7-may-2014;
+**PART2;
+SCH=SCH_2201175_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 220117523 SCH_2201175_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 116 2 3 0 0 0 0 1e3 1
+e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 0 0 0 0 81 255 2 2 110 11 1 0 0 0 0 12 13 70 11
+ CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fing
+er_block1012 0 CZ3 0 4 T1 0 0 2 20 1 14 14 13 255 4 3 0 1 0 15 0 0 16 0 50 255 5
+ 90 0 15 17 0 0 +.05 -.1 .07 0 0 1 1 0 0 30 255 6 86 0 18 19 0 0 +.05 -.1 .07 -1
+ 0 0 29 255 7 67 0 20 21 0 -.01 -.1 -.075 19 255 8 1 0 1 16 0 22 V16 255 9 73 0
+ ?23 0 24 19 0 0 1 18 255 10 15 0 25 0 26 27 ?1 17 255 25 0 28 29 30 10 31 32 0
+ 33 -18 26 10 0 34 10 35 36 ?1 29 27 17 0 10 36 37 .05 -.1 -.075 29 36 12 0 26 3
+8 27 .05 .1 -.075 29 37 70 0 39 27 40 -.01 -.1 .07 18 39 60 0 41 42 0 37 ?1 29 4
+0 69 0 42 37 21 -.01 .1 .07 18 42 58 0 23 43 39 40 ?1 29 21 68 0 43 40 7 -.01 .1
+ -.075 18 43 56 0 44 20 42 21 ?1 17 44 0 45 46 47 43 34 24 0 48 +18 20 54 0 31 4
+9 43 7 ?1 17 31 0 50 48 33 20 25 32 0 30 +18 49 2 0 51 35 20 52 ?1 17 51 0 53 54
+ 55 49 41 18 0 29 -18 35 5 0 56 26 49 38 ?1 29 52 4 0 49 0 38 .05 -.1 .07 29 38
+ 7 0 35 52 36 .05 .1 .07 17 56 0 45 47 46 35 23 9 0 57 -15 255 45 79 0 46 58 0 1
+7 47 0 45 44 56 26 57 59 0 60 +17 46 0 45 56 44 42 61 62 0 63 -17 23 0 53 55 54
+ 42 56 9 0 46 +17 57 0 64 65 60 35 47 59 0 54 -15 64 23 0 65 66 0 17 65 0 64 67
+ 57 49 54 68 0 0 -17 60 0 64 57 67 26 33 69 0 0 -16 59 11 0 ?47 69 68 70 0 0 1 1
+7 54 0 53 23 51 35 65 68 0 0 +15 53 81 0 55 15 0 16 68 6 0 ?54 59 71 72 0 0 1 16
+ 71 46 0 ?73 68 74 75 0 0 1 30 72 9 0 68 0 70 0 +.05 -.1 .07 0 1 0 30 70 14 0 59
+ 72 76 0 +.05 .1 .07 0 0 -1 30 76 19 0 69 70 77 0 +.05 .1 -.075 0 -1 0 16 69 16
+ 0 ?33 78 59 76 0 0 1 30 77 22 0 78 76 79 0 +.05 -.1 -.075 0 0 1 16 78 20 0 ?29
+ 18 69 77 0 0 1 30 79 66 0 80 77 81 0 +-.01 -.1 .07 0 1 0 16 80 52 0 ?63 62 0 79
+ 0 0 1 30 81 65 0 62 79 82 0 +-.01 .1 .07 0 0 -1 16 62 50 0 ?61 74 80 81 0 0 1 3
+0 82 64 0 74 81 75 0 +-.01 .1 -.075 0 -1 0 16 74 48 0 ?83 71 62 82 0 0 1 30 75 6
+3 0 71 82 84 0 +-.01 -.1 -.075 0 0 1 30 84 83 0 32 75 85 0 +.05 -.1 -.075 -1 0 0
+ 16 32 71 0 ?31 24 18 84 0 0 1 30 85 84 0 24 84 19 0 +.05 .1 -.075 -1 0 0 16 24
+ 72 0 ?44 9 32 85 0 0 1 30 19 85 0 9 85 6 0 +.05 .1 .07 -1 0 0 16 18 74 0 ?41 32
+ 78 6 0 0 1 17 41 0 28 30 29 39 51 18 0 73 +15 28 75 0 30 86 0 17 30 0 28 25 41
+ 20 73 71 0 83 -17 29 0 28 41 25 49 67 78 0 65 +17 73 0 87 63 83 39 30 71 0 55 +
+15 87 45 0 63 88 0 17 63 0 87 61 73 42 55 80 0 0 +17 83 0 87 73 61 20 48 74 0 0
+ +17 55 0 53 51 23 39 63 80 0 0 -17 61 0 87 83 63 43 46 62 0 0 +17 48 0 50 34 31
+ 43 83 74 0 61 -15 50 77 0 48 89 0 17 34 0 50 33 48 26 44 24 0 47 -17 33 0 50 31
+ 34 10 60 69 0 67 +17 67 0 64 60 65 10 29 78 0 0 -14 255 89 78 90 ?86 58 50 4 91
+ +0 0 86 58 22 81 1 90 113 92 89 0 0 93 94 95 14 86 76 94 ?66 89 28 4 96 +0 0 66
+ 89 22 14 58 80 93 ?89 15 45 4 17 +0 0 89 15 22 50 91 88 0 89 96 17 0 +.05 .1 -.
+075 0 0 -1 -1 0 0 13 22 91 0 0 0 0 0 0 8 15 14 15 82 97 ?58 0 53 4 5 +0 0 58 0 2
+2 81 1 97 111 92 15 0 0 0 93 98 80 255 1 92 0 99 8001 0 0 0 0 3 5 0 0 0 FFFFTFTF
+FFFFFF2 81 1 93 112 92 58 0 0 97 90 100 83 255 3 98 .5960784 .6666667 .6862745 8
+3 3 100 .5960784 .6666667 .6862745 79 255 15 99 SDL/TYSA_COLOUR50 96 87 0 86 101
+ 91 0 +.05 -.1 -.075 0 -1 0 0 0 -1 50 17 89 0 58 91 5 0 +.05 .1 .07 0 1 0 0 0 1
+ 50 101 62 0 88 102 96 0 +-.01 .1 .07 -1 0 0 0 0 1 14 88 42 103 ?0 66 87 4 101 +
+0 0 0 66 22 50 102 25 0 66 0 101 0 +.05 .1 .07 -1 0 0 0 0 1 14 66 24 104 ?88 86
+ 64 4 102 -0 0 88 86 22 81 1 104 115 92 66 0 0 94 103 105 81 1 94 114 92 86 0 0
+ 90 104 106 81 1 103 116 92 88 0 0 104 0 107 83 3 105 .5960784 .6666667 .6862745
+ 83 3 107 .5960784 .6666667 .6862745 83 3 106 .5960784 .6666667 .6862745 83 3 95
+ .5960784 .6666667 .6862745 19 16 92 0 1 0 8 4 S74 4 CI16 index_map_offset0 0 1
+ dCCZ20 14 2 0 0 2 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 11 108 109 8004
+ 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 12 7830.64 84 255 8 13 Kg/Cu M 79 16 1
+09 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/B1.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/B1.xmt_txt
new file mode 100644
index 0000000..593b2ea
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/B1.xmt_txt
@@ -0,0 +1,92 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows;
+OS_RELEASE=unknown;
+FRU=Parasolid Version 24.1, build 224, 6/12/2012;
+APPL=ANSYS DesignModeler;
+SITE=Canonsburg PA;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=B1;
+FILE=B1.x_t;
+DATE=10/11/13 13:12:16;
+**PART2;
+SCH=SCH_2401224_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 240122417 SCH_2300000_200000 12
+ 1 236 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 0 0 0 0 81 2 2 228 11 1
+ 12 0 13 14 15 0 70 3 0 4 T1 0 0 2 20 1 16 16 13 4 3 0 1 0 17 0 0 18 0 50 5 95 0
+ 17 19 0 0 +0 0 1e-4 0 -1 0 0 0 -1 30 6 91 0 9 20 0 0 +-.01 0 1e-4 0 0 -1 29 7 7
+4 0 21 22 0 -.01 .005 0 19 8 1 0 1 18 0 23 V16 9 79 24 ?25 0 26 6 0 0 1 18 10 10
+ 27 28 0 29 30 ?1 81 2 27 120 11 10 0 0 31 32 33 34 17 28 0 35 36 37 10 38 26 0
+ 39 -18 29 5 31 40 10 21 41 ?1 29 30 12 0 10 41 22 -.01 .005 1e-4 29 41 7 0 29 4
+2 30 -.01 0 1e-4 29 22 75 0 43 30 7 -.01 0 0 18 43 64 44 25 21 45 22 ?1 81 2 44
+ 116 11 43 0 0 46 47 48 49 17 25 0 50 51 52 43 40 9 0 53 +18 21 62 47 38 29 43 7
+ ?1 18 45 155 54 36 43 55 56 ?1 81 2 54 156 11 45 0 0 57 58 59 60 17 36 0 35 61
+ 28 45 62 63 0 64 +18 55 151 57 65 45 66 67 ?1 29 56 208 0 45 67 68 .01 .005 1e-
+4 29 67 209 0 55 0 56 .01 0 1e-4 29 68 205 0 69 56 42 .01 0 0 18 69 161 70 51 66
+ 0 68 ?1 29 42 204 0 66 68 41 .01 .005 0 18 66 159 58 71 55 69 42 ?1 81 2 58 160
+ 11 66 0 0 54 70 72 73 17 71 0 74 75 76 66 37 77 0 61 +15 74 47 0 71 78 0 17 75
+ 0 74 79 71 69 80 81 0 82 -17 76 0 74 71 79 21 53 83 0 0 +17 37 0 35 28 61 21 71
+ 77 0 76 -16 77 48 84 ?71 85 83 86 0 0 1 17 61 0 35 37 36 66 87 88 0 80 +15 35 8
+1 0 37 89 0 17 87 0 90 91 80 45 61 88 0 0 -16 88 139 92 ?61 93 94 95 0 0 1 17 80
+ 0 90 87 82 66 75 81 0 0 +15 90 173 0 80 96 0 17 82 0 90 80 91 69 97 93 0 0 +16
+ 81 133 32 ?80 94 0 98 0 0 1 81 2 32 134 11 81 0 0 27 99 100 101 16 94 145 102 ?
+64 88 81 103 0 0 1 30 98 197 0 81 103 95 0 +.01 0 0 -693889390390723e-30 1 0 30
+ 103 201 0 94 0 98 0 +.01 0 1e-4 -693889390390723e-30 1 0 30 95 193 0 88 98 104
+ 0 +.01 .005 1e-4 0 0 -1 30 104 192 0 93 95 105 0 +.01 0 1e-4 0 0 -1 16 93 135 9
+9 ?82 106 88 104 0 0 1 30 105 9 0 85 104 107 0 +0 0 1e-4 -1 0 0 16 85 6 108 ?52
+ 109 77 105 0 0 1 30 107 14 0 109 105 110 0 +-.01 0 1e-4 693889390390723e-30 1 0
+ 16 109 11 111 ?39 63 85 107 0 0 1 30 110 19 0 63 107 112 0 +-.01 .005 1e-4 1 26
+0208521396521e-30 0 16 63 16 113 ?36 26 109 110 0 0 1 30 112 72 0 106 110 114 0
+ +0 0 0 -1 0 0 16 106 54 115 ?79 83 93 112 0 0 1 30 114 71 0 83 112 86 0 +-.01 0
+ 0 693889390390723e-30 1 0 16 83 51 116 ?76 77 106 114 0 0 1 30 86 70 0 77 114 2
+0 0 +-.01 .005 0 1 260208521396521e-30 0 30 20 90 0 26 86 6 0 +-.01 .005 1e-4 0
+ 0 -1 16 26 78 46 ?38 9 63 20 0 0 1 81 2 46 111 11 26 0 0 24 44 117 118 17 38 0
+ 119 53 39 21 28 26 0 37 +15 119 83 0 53 120 0 17 53 0 119 40 38 43 76 83 0 79 -
+17 39 0 119 38 40 10 121 109 0 62 +17 40 0 119 39 53 29 25 9 0 52 -17 121 0 122
+ 65 62 29 39 109 0 0 -17 62 0 122 121 64 10 36 63 0 0 -15 122 27 0 65 123 0 17 6
+4 0 122 62 65 45 91 94 0 87 +17 65 0 122 64 121 55 52 85 0 91 -17 91 0 90 82 87
+ 55 64 94 0 97 -17 97 0 50 52 51 55 82 93 0 0 -15 50 85 0 51 17 0 17 52 0 50 25
+ 97 29 65 85 0 121 +17 51 0 50 97 25 69 79 106 0 75 -17 79 0 74 76 75 43 51 106
+ 0 0 +14 17 86 124 ?120 0 50 4 5 +0 0 120 0 23 81 2 124 232 11 17 0 0 125 113 12
+6 127 14 120 84 128 ?89 17 119 4 19 +0 0 89 17 23 13 23 97 0 0 0 0 0 0 8 17 81 2
+ 128 106 11 120 0 0 116 24 129 130 14 89 82 125 ?123 120 35 4 131 +0 0 123 120 2
+3 50 19 94 0 120 131 5 0 +-.01 0 1e-4 -1 693889390390723e-30 0 -693889390390723e
+-30 -1 0 50 131 93 0 89 132 19 0 +-.01 .005 1e-4 -260208521396521e-30 1 0 -1 -26
+0208521396521e-30 0 50 132 68 0 78 133 131 0 +0 0 0 0 0 -1 -1 0 0 14 78 45 134 ?
+96 123 74 4 132 +0 0 96 123 23 50 133 29 0 123 135 132 0 +0 0 1e-4 0 0 -1 -1 0 0
+ 14 123 28 14 ?78 89 122 4 133 -0 0 78 89 23 50 135 187 0 96 0 133 0 +.01 0 1e-4
+ 1 693889390390723e-30 0 693889390390723e-30 -1 0 14 96 171 13 ?0 78 90 4 135 +0
+ 0 0 78 23 81 2 13 172 11 96 0 0 70 2 136 137 80 2 11 138 139 9000 0 0 0 0 3 6 0
+ 0 0 FFTFTFTTTFFFTF3 1 81 2 70 162 11 69 0 0 58 13 140 141 84 12 136 F185.r(X159
+)82 1 137 186 84 12 140 F185.r(X180)82 1 141 193 79 18 139 AnsysParaAttrDef.381
+ 2 14 229 11 123 0 0 2 134 142 143 81 2 134 230 11 78 0 0 14 125 144 145 84 10 1
+42 F153.Cap1t82 1 143 156 81 2 125 231 11 89 0 0 134 124 146 147 84 10 144 F153.
+Cap1b82 1 145 157 84 13 146 F153.F64.E13182 1 147 158 81 2 116 53 11 83 0 0 111
+ 128 148 149 81 2 24 110 11 9 0 0 128 46 150 151 84 13 129 F153.F64.E12682 1 130
+ 159 84 28 150 F153.F64.E126..F153.F64.E12182 1 151 172 81 2 111 24 11 109 0 0 0
+ 116 152 153 84 25 148 F153.Cap1b..F153.F64.E12682 1 149 168 84 25 152 F153.Cap1
+t..F153.F64.E12682 1 153 164 81 2 113 233 11 63 0 0 124 108 154 155 84 13 126 F1
+53.F64.E12182 1 127 160 81 2 108 234 11 85 0 0 113 84 156 157 84 25 154 F153.Cap
+1t..F153.F64.E13182 1 155 162 81 2 84 235 11 77 0 0 108 115 158 159 84 25 156 F1
+53.Cap1t..F153.F64.E12182 1 157 165 81 2 115 236 11 106 0 0 84 0 160 161 84 25 1
+58 F153.Cap1b..F153.F64.E13182 1 159 166 84 25 160 F153.Cap1b..F153.F64.E12182 1
+ 161 169 84 28 117 F153.F64.E131..F153.F64.E12682 1 118 171 81 2 99 136 11 93 0
+ 0 32 92 162 163 81 2 92 140 11 88 0 0 99 102 164 165 84 12 162 F185.r(X172)82 1
+ 163 187 81 2 102 146 11 94 0 0 92 57 166 167 84 12 164 F185.r(X171)82 1 165 188
+ 81 2 57 152 11 55 0 0 102 54 168 169 84 12 166 F185.r(X164)82 1 167 189 84 12 1
+68 F185.r(X176)82 1 169 192 84 12 100 F185.r(X168)82 1 101 190 84 12 72 F185.r(X
+179)82 1 73 194 84 12 59 F185.r(X175)82 1 60 191 81 2 47 117 11 21 0 0 44 31 170
+ 171 81 2 31 119 11 29 0 0 47 27 172 173 84 9 170 F153.Vtx382 1 171 179 84 9 172
+ F153.Vtx582 1 173 176 84 9 48 F153.Vtx282 1 49 180 84 9 33 F153.Vtx682 1 34 175
+ 19 18 98 0 1 0 8 4 S74 20 16 2 0 0 115 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8
+1 1 12 114 174 1 0 2 0 0 175 80 1 174 176 177 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFTFF
+FFF1 82 1 175 0 79 13 177 BodyAttrDef.484 6 15 F153.B1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/B2.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/B2.xmt_txt
new file mode 100644
index 0000000..c621ca5
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/B2.xmt_txt
@@ -0,0 +1,163 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows;
+OS_RELEASE=unknown;
+FRU=Parasolid Version 24.1, build 224, 6/12/2012;
+APPL=ANSYS DesignModeler;
+SITE=Canonsburg PA;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=B2;
+FILE=B2.x_t;
+DATE=10/11/13 13:14:50;
+**PART2;
+SCH=SCH_2401224_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 240122417 SCH_2300000_200000 74
+ 2 1 2 0 0 2 3 12 2 354 4 5 0 0 0 0 1e3 1e-8 0 0 3 1 0 1 1 6 7 8 9 10 11 12 0 0
+ 0 0 12 3 91 13 14 0 0 0 0 1e3 1e-8 0 2 0 1 0 1 1 15 16 17 18 19 20 21 0 0 0 0 8
+1 2 13 83 22 3 23 0 24 25 26 0 70 14 0 4 T3 0 0 2 20 1 27 27 13 15 6 0 3 0 28 0
+ 0 29 0 50 16 74 0 28 30 0 0 +0 0 0 1 0 0 0 1 0 30 17 82 0 31 32 0 0 +0 0 0 -1 0
+ 0 29 18 69 0 33 34 0 0 .005 0 19 19 4 0 3 29 0 35 V16 20 25 36 ?37 0 38 39 0 0
+ 3 18 21 37 40 41 0 42 43 ?3 81 2 40 38 22 21 0 0 44 45 46 47 17 41 0 48 37 49 2
+1 50 38 0 51 +18 42 35 44 52 21 53 54 ?3 29 43 66 0 21 54 55 -.01 0 1e-4 29 54 6
+5 0 42 56 43 -.01 .005 1e-4 29 55 67 0 57 43 34 0 0 1e-4 18 57 28 58 59 60 61 55
+ ?3 29 34 68 0 61 55 18 0 .005 1e-4 18 61 27 62 63 57 0 34 ?3 81 2 62 91 22 61 0
+ 0 64 0 65 66 17 63 0 67 59 68 61 69 70 0 71 -15 67 41 0 63 28 0 17 59 0 67 72 6
+3 57 73 74 0 50 +17 68 0 67 63 72 33 75 76 0 69 -17 69 0 77 78 71 33 63 70 0 79
+ +16 70 21 80 ?69 81 82 83 0 0 3 17 71 0 77 69 52 61 84 82 0 73 +15 77 53 0 71 8
+5 0 17 52 0 77 71 78 42 86 87 0 88 -17 84 0 89 90 73 42 71 82 0 0 -16 82 19 91 ?
+71 70 92 93 0 0 3 17 73 0 89 84 50 61 59 74 0 0 -15 89 50 0 73 94 0 17 50 0 89 7
+3 90 57 41 38 0 49 -16 74 7 95 ?59 96 0 97 0 0 3 81 2 95 87 22 74 0 0 98 58 99 1
+00 16 96 8 101 ?88 87 74 102 0 0 3 30 97 78 0 74 83 93 0 +0 0 1e-4 0 -1 0 30 83
+ 77 0 70 103 97 0 +0 .005 1e-4 0 0 -1 30 93 79 0 82 97 104 0 +-.01 .005 1e-4 1 2
+60208521396521e-30 0 30 104 80 0 38 93 32 0 +0 0 1e-4 -1 0 0 16 38 23 105 ?41 20
+ 81 104 0 0 3 30 32 81 0 106 104 17 0 +-.01 .005 0 1 260208521396521e-30 0 16 10
+6 12 107 ?79 76 87 32 0 0 3 81 2 107 13 22 106 0 0 108 109 110 111 17 79 0 112 7
+5 113 33 78 106 0 0 +16 76 14 25 ?75 31 106 114 0 0 3 16 87 10 108 ?86 106 96 11
+5 0 0 3 81 2 108 11 22 87 0 0 101 107 116 117 17 86 0 118 119 88 120 52 87 0 78
+ +30 115 59 0 87 39 121 0 +-.01 .005 1e-4 0 0 -1 30 39 58 0 20 0 115 0 +-.01 0 1
+e-4 0 0 -1 30 121 60 0 92 115 102 0 +-.01 0 0 693889390390723e-30 1 0 16 92 17 1
+22 ?113 82 31 121 0 0 3 30 102 61 0 96 121 114 0 +-.01 0 1e-4 693889390390723e-3
+0 1 0 30 114 75 0 76 102 103 0 +0 0 0 0 -1 0 30 103 76 0 81 114 83 0 +0 0 1e-4 0
+ 0 1 16 81 22 98 ?49 38 70 103 0 0 3 81 2 98 86 22 81 0 0 80 95 123 124 17 49 0
+ 48 41 125 57 72 81 0 0 +15 48 56 0 125 126 0 17 125 0 48 49 37 60 127 31 0 75 -
+17 72 0 67 68 59 60 49 81 0 125 -18 60 29 64 72 33 57 128 ?3 81 2 64 90 22 60 0
+ 0 129 62 130 131 18 33 30 129 68 120 60 18 ?3 29 128 62 0 60 0 132 0 0 0 29 132
+ 63 0 120 128 56 -.01 .005 0 18 120 31 133 86 53 33 132 ?3 29 56 64 0 53 132 54
+ -.01 0 0 18 53 33 134 127 42 120 56 ?3 81 2 134 34 22 53 0 0 133 44 135 136 17
+ 127 0 112 113 75 53 125 31 0 37 +15 112 47 0 79 137 0 17 113 0 112 79 127 120 1
+19 92 0 0 +17 75 0 112 127 79 60 68 76 0 0 +16 31 15 109 ?127 92 76 17 0 0 3 17
+ 37 0 48 125 41 53 51 20 0 119 +17 51 0 118 88 119 21 37 20 0 90 -17 119 0 118 5
+1 86 53 113 92 0 0 -15 118 44 0 119 138 0 14 138 42 139 ?137 28 118 15 140 +0 0
+ 137 28 35 81 2 139 43 22 138 0 0 45 141 142 143 14 137 45 141 ?94 138 112 15 30
+ +0 0 94 138 35 14 28 39 45 ?138 0 67 15 16 +0 0 138 0 35 50 140 57 0 138 0 144
+ 0 +-.01 0 1e-4 -1 693889390390723e-30 0 -693889390390723e-30 -1 0 13 35 5 0 0 0
+ 0 0 0 19 28 50 144 70 0 126 140 145 0 +0 0 1e-4 0 -1 0 0 0 -1 14 126 54 24 ?0 8
+5 48 15 144 +0 0 0 85 35 50 145 71 0 85 144 146 0 +-.01 .005 1e-4 -2602085213965
+21e-30 1 0 -1 -260208521396521e-30 0 14 85 51 147 ?126 94 77 15 145 +0 0 126 94
+ 35 50 146 72 0 94 145 30 0 +0 0 1e-4 0 0 -1 -1 0 0 14 94 48 148 ?85 137 89 15 1
+46 -0 0 85 137 35 50 30 73 0 137 146 16 0 +0 0 0 0 0 -1 -1 0 0 81 2 148 49 22 94
+ 0 0 141 147 149 150 80 2 22 151 152 9000 0 0 0 0 3 6 0 0 0 FFTFTFTTTFFFTF3 1 81
+ 2 141 46 22 137 0 0 139 148 153 154 81 2 147 52 22 85 0 0 148 24 155 156 84 10
+ 149 F153.Cap1t82 1 150 203 81 2 24 55 22 126 0 0 147 13 157 158 84 13 155 F153.
+F64.E13182 1 156 204 84 13 157 F153.F64.E12182 1 158 205 84 10 153 F153.Cap1b82
+ 1 154 202 79 18 152 AnsysParaAttrDef.381 2 45 40 22 28 0 0 40 139 159 160 84 4
+ 159 F19782 1 160 201 84 13 142 F153.F64.E12682 1 143 159 17 88 0 118 86 51 42 9
+0 96 0 84 +17 90 0 89 50 84 21 88 96 0 0 -81 2 109 16 22 31 0 0 107 122 161 162
+ 81 2 122 18 22 92 0 0 109 91 163 164 84 25 161 F153.Cap1b..F153.F64.E12182 1 16
+2 212 81 2 91 20 22 82 0 0 122 105 165 166 84 25 163 F153.Cap1b..F153.F64.E12682
+ 1 164 168 81 2 105 24 22 38 0 0 91 36 167 168 84 25 165 F153.Cap1t..F153.F64.E1
+3182 1 166 210 81 2 36 26 22 20 0 0 105 133 169 170 84 25 167 F153.Cap1t..F153.F
+64.E12182 1 168 217 81 2 133 32 22 120 0 0 36 134 171 172 84 28 169 F153.F64.E12
+6..F153.F64.E12182 1 170 172 84 9 171 F153.Vtx382 1 172 179 81 2 44 36 22 42 0 0
+ 134 40 173 174 84 9 135 F153.Vtx282 1 136 180 84 9 173 F153.Vtx682 1 174 175 81
+ 2 129 89 22 33 0 0 58 64 175 176 81 2 58 88 22 57 0 0 95 129 177 178 84 9 175 F
+197.Vtx282 1 176 222 84 9 177 F197.Vtx182 1 178 224 84 9 130 F197.Vtx382 1 131 2
+25 81 2 80 85 22 70 0 0 25 98 179 180 84 19 123 F197..F153.F64.E12182 1 124 215
+ 81 2 25 84 22 76 0 0 13 80 181 182 84 19 179 F197..F153.F64.E13182 1 180 214 84
+ 16 181 F197..F153.Cap1b82 1 182 213 17 78 0 77 52 69 120 79 106 0 113 -81 2 101
+ 9 22 96 0 0 0 108 183 184 84 28 116 F153.F64.E131..F153.F64.E12682 1 117 171 84
+ 25 183 F153.Cap1t..F153.F64.E12682 1 184 164 84 25 110 F153.Cap1b..F153.F64.E13
+182 1 111 211 84 16 99 F197..F153.Cap1t82 1 100 216 84 9 65 F197.Vtx482 1 66 223
+ 84 9 46 F153.Vtx582 1 47 176 19 29 1 0 3 0 19 15 S74 20 27 2 0 0 62 23 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 1 23 3 185 3 0 13 0 0 186 80 1 185 187 188 9000
+ 0 0 0 0 3 6 0 0 0 FFTFFFFFTFFFFF1 82 1 186 1 79 13 188 BodyAttrDef.484 9 26 F19
+7.P0.B81 2 4 228 22 2 189 0 190 191 192 0 70 5 0 4 T2 0 0 2 20 1 193 193 13 6 3
+ 0 2 0 194 0 0 195 0 50 7 95 0 194 196 0 0 +0 0 1e-4 0 -1 0 0 0 -1 30 8 247 0 11
+ 197 0 0 +0 0 0 0 -1 0 29 9 344 0 198 199 0 0 0 1e-4 19 10 1 0 2 195 0 200 V16 1
+1 321 201 ?202 0 203 8 0 0 2 18 12 286 204 205 0 206 207 ?2 81 2 204 354 22 12 0
+ 0 208 0 209 210 17 205 0 211 212 213 12 214 215 0 216 -18 206 284 217 202 12 19
+8 199 ?2 29 207 341 0 12 218 199 0 .005 1e-4 29 218 334 0 219 220 207 0 .005 0 2
+9 199 342 0 206 207 9 0 0 0 18 219 331 208 212 198 221 218 ?2 29 220 204 0 222 2
+23 218 .01 .005 0 18 222 159 224 225 226 227 220 ?2 29 223 205 0 227 228 220 .01
+ 0 0 18 227 161 229 230 222 0 223 ?2 29 228 208 0 221 231 223 .01 .005 1e-4 18 2
+21 155 232 233 219 226 228 ?2 29 231 209 0 226 0 228 .01 0 1e-4 18 226 151 234 2
+35 221 222 231 ?2 81 2 234 152 22 226 0 0 236 232 237 238 17 235 0 239 240 214 2
+26 241 242 0 243 -15 239 27 0 244 245 0 17 240 0 239 244 235 221 243 246 0 247 +
+17 214 0 239 235 244 198 205 215 0 241 +17 241 0 248 249 250 198 235 242 0 0 +16
+ 242 6 251 ?241 252 253 254 0 0 2 17 243 0 255 256 247 226 240 246 0 250 -15 255
+ 173 0 257 258 0 17 256 0 255 257 243 227 250 259 0 0 +17 247 0 255 243 257 221
+ 260 261 0 0 -16 246 145 236 ?240 261 262 263 0 0 2 17 250 0 248 241 230 226 256
+ 259 0 0 -15 248 267 0 249 194 0 17 230 0 248 250 249 227 264 265 0 266 -16 259
+ 135 267 ?256 265 261 268 0 0 2 81 2 267 136 22 259 0 0 269 270 271 272 16 265 5
+4 273 ?264 253 259 274 0 0 2 16 261 139 270 ?260 259 246 275 0 0 2 30 268 192 0
+ 259 275 254 0 +.01 0 1e-4 0 0 -1 30 275 193 0 261 276 268 0 +.01 .005 1e-4 0 0
+ -1 30 254 9 0 242 268 277 0 +0 0 1e-4 -1 0 0 30 277 19 0 252 254 274 0 +-.01 .0
+05 1e-4 1 260208521396521e-30 0 16 252 255 278 ?233 215 242 277 0 0 2 30 274 72
+ 0 265 277 197 0 +0 0 0 -1 0 0 30 197 70 0 253 274 8 0 +-.01 .005 0 1 2602085213
+96521e-30 0 16 253 238 279 ?225 242 265 197 0 0 2 81 2 279 239 22 253 0 0 273 27
+8 280 281 17 225 0 282 266 283 222 284 253 0 260 +15 282 246 0 283 285 0 17 266
+ 0 282 264 225 227 257 262 0 256 -17 283 0 282 225 264 219 202 11 0 0 -17 284 0
+ 286 216 260 219 225 253 0 283 -17 260 0 286 284 233 222 247 261 0 257 +15 286 2
+63 0 216 287 0 17 233 0 286 260 216 221 244 252 0 240 +17 257 0 255 247 256 222
+ 266 262 0 0 +16 262 133 269 ?257 246 0 276 0 0 2 81 2 269 134 22 262 0 0 0 267
+ 288 289 30 276 197 0 262 263 275 0 +.01 0 0 -693889390390723e-30 1 0 30 263 201
+ 0 246 290 276 0 +.01 0 1e-4 -693889390390723e-30 1 0 30 290 303 0 215 291 263 0
+ +0 0 1e-4 0 -1 0 16 215 258 292 ?214 293 252 290 0 0 2 30 291 304 0 203 294 290
+ 0 +0 0 1e-4 0 0 1 16 203 266 295 ?213 11 293 291 0 0 2 30 294 305 0 293 0 291 0
+ +0 .005 1e-4 0 0 -1 16 293 262 296 ?212 203 215 294 0 0 2 81 2 296 348 22 293 0
+ 0 292 295 297 298 17 212 0 211 202 205 219 216 293 0 284 +15 211 293 0 212 299
+ 0 17 202 0 211 213 212 206 283 11 0 249 +17 216 0 286 233 284 12 212 293 0 244
+ -17 244 0 239 214 240 12 233 252 0 0 -17 213 0 211 205 202 198 249 203 0 214 +1
+7 249 0 248 230 241 206 213 203 0 264 -17 264 0 282 283 266 206 230 265 0 0 +18
+ 198 283 300 213 206 219 9 ?2 81 2 300 352 22 198 0 0 217 208 301 302 81 2 217 3
+51 22 206 0 0 201 300 303 304 81 2 208 353 22 219 0 0 300 204 305 306 84 9 301 F
+197.Vtx682 1 302 220 84 9 305 F197.Vtx782 1 306 218 81 2 201 350 22 11 0 0 295 2
+17 307 308 84 9 303 F197.Vtx582 1 304 221 81 2 295 349 22 203 0 0 296 201 309 31
+0 84 16 307 F153.Cap1b..F19782 1 308 209 84 19 309 F153.F64.E121..F19782 1 310 2
+08 14 299 296 311 ?0 258 211 6 312 -0 0 0 258 200 81 2 311 340 22 299 0 0 278 29
+2 313 314 14 258 171 190 ?299 285 255 6 315 +0 0 299 285 200 50 312 302 0 299 0
+ 315 0 +0 0 0 1 0 0 0 1 0 13 200 97 0 0 0 0 0 0 10 194 14 194 86 316 ?287 0 248
+ 6 7 +0 0 287 0 200 81 2 316 232 22 194 0 0 317 251 318 319 14 287 82 317 ?245 1
+94 286 6 196 +0 0 245 194 200 81 2 317 231 22 287 0 0 320 316 321 322 14 245 28
+ 191 ?285 287 239 6 323 -0 0 285 287 200 50 196 93 0 287 324 7 0 +-.01 .005 1e-4
+ -260208521396521e-30 1 0 -1 -260208521396521e-30 0 50 324 68 0 285 323 196 0 +0
+ 0 0 0 0 -1 -1 0 0 14 285 45 320 ?258 245 282 6 324 +0 0 258 245 200 50 323 29 0
+ 245 315 324 0 +0 0 1e-4 0 0 -1 -1 0 0 50 315 187 0 258 312 323 0 +.01 0 1e-4 1
+ 693889390390723e-30 0 693889390390723e-30 -1 0 81 2 320 230 22 285 0 0 191 317
+ 325 326 81 2 191 229 22 245 0 0 4 320 327 328 84 10 325 F153.Cap1b82 1 326 157
+ 84 10 327 F153.Cap1t82 1 328 156 84 13 321 F153.F64.E13182 1 322 158 81 2 251 2
+34 22 242 0 0 316 273 329 330 84 13 318 F153.F64.E12182 1 319 160 81 2 273 236 2
+2 265 0 0 251 279 331 332 84 25 329 F153.Cap1t..F153.F64.E12182 1 330 165 84 25
+ 331 F153.Cap1b..F153.F64.E12182 1 332 169 81 2 190 172 22 258 0 0 229 4 333 334
+ 81 2 229 162 22 227 0 0 224 190 335 336 84 12 333 F185.r(X159)82 1 334 186 81 2
+ 224 160 22 222 0 0 232 229 337 338 84 12 335 F185.r(X180)82 1 336 193 81 2 232
+ 156 22 221 0 0 234 224 339 340 84 12 337 F185.r(X179)82 1 338 194 84 12 339 F18
+5.r(X175)82 1 340 191 81 2 278 256 22 252 0 0 279 311 341 342 81 2 292 347 22 21
+5 0 0 311 296 343 344 84 4 313 F19782 1 314 200 84 16 343 F153.Cap1t..F19782 1 3
+44 206 84 25 341 F153.Cap1t..F153.F64.E13182 1 342 162 84 19 297 F153.F64.E131..
+F19782 1 298 207 84 12 288 F185.r(X168)82 1 289 190 84 25 280 F153.Cap1b..F153.F
+64.E13182 1 281 166 81 2 270 140 22 261 0 0 267 236 345 346 81 2 236 146 22 246
+ 0 0 270 234 347 348 84 12 345 F185.r(X171)82 1 346 188 84 12 347 F185.r(X164)82
+ 1 348 189 84 12 271 F185.r(X172)82 1 272 187 84 12 237 F185.r(X176)82 1 238 192
+ 84 9 209 F197.Vtx882 1 210 219 19 195 98 0 2 0 10 6 S74 20 193 2 0 0 204 189 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 1 189 114 185 2 0 4 0 0 349 82 1 349 0 84
+ 6 192 F153.B1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/B3.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/B3.xmt_txt
new file mode 100644
index 0000000..7ba25e6
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/B3.xmt_txt
@@ -0,0 +1,90 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows;
+OS_RELEASE=unknown;
+FRU=Parasolid Version 24.1, build 224, 6/12/2012;
+APPL=ANSYS DesignModeler;
+SITE=Canonsburg PA;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=B3;
+FILE=B3.x_t;
+DATE=10/11/13 14:11:01;
+**PART2;
+SCH=SCH_2401224_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 240122417 SCH_2300000_200000 12
+ 1 122 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 0 0 0 0 81 1 2 114 11 1
+ 12 0 0 0 13 70 3 0 4 T1 0 0 2 20 1 14 14 13 4 97 0 1 0 15 0 0 16 0 51 5 96 0 15
+ 17 0 0 -0 0 .005 0 0 -1 .0101 -1 0 0 30 6 92 0 9 18 0 0 +-.0101 0 .005 0 0 -1 2
+9 7 73 0 19 20 0 .0101 0 0 19 8 1 0 1 16 0 21 V16 9 80 22 ?23 0 24 6 0 0 1 18 10
+ 15 25 26 0 27 28 ?1 81 2 25 121 29 10 0 0 30 31 32 33 17 26 0 34 35 36 10 37 38
+ 0 39 +18 27 10 31 40 10 41 42 ?1 29 28 17 0 10 42 43 .0101 0 .005 29 42 12 0 27
+ 44 28 .01 0 .005 29 43 76 0 45 28 46 -.0101 0 0 18 45 66 47 48 49 0 43 ?1 29 46
+ 75 0 49 43 20 -.01 0 0 18 49 64 50 51 52 45 46 ?1 29 20 74 0 52 46 7 .01 0 0 18
+ 52 62 53 54 19 49 20 ?1 81 2 53 117 29 52 0 0 50 55 56 57 17 54 0 58 59 37 52 4
+0 60 0 61 +18 19 60 55 59 62 52 7 ?1 81 2 55 118 29 19 0 0 53 63 64 65 17 59 0 5
+8 39 54 19 61 66 0 67 +18 62 2 30 68 41 19 69 ?1 81 2 30 120 29 62 0 0 63 25 70
+ 71 17 68 0 72 23 73 62 74 75 0 35 -18 41 5 63 74 27 62 44 ?1 29 69 4 0 62 0 44
+ -.0101 0 .005 29 44 7 0 41 69 42 -.01 0 .005 81 2 63 119 29 41 0 0 55 30 76 77
+ 17 74 0 34 36 35 41 68 75 0 73 +15 34 27 0 35 78 0 17 36 0 34 26 74 27 79 80 0
+ 0 -17 35 0 34 74 26 62 81 82 0 83 +16 75 6 84 ?74 80 82 85 0 0 1 17 73 0 72 68
+ 86 41 51 24 0 79 -15 72 85 0 86 87 0 17 86 0 72 73 23 49 48 88 0 89 +17 51 0 90
+ 91 79 49 73 24 0 86 +16 24 79 92 ?51 9 60 18 0 0 1 17 79 0 90 51 40 41 36 80 0
+ 0 +15 90 83 0 91 93 0 17 40 0 90 79 91 27 54 60 0 37 -16 80 11 94 ?79 38 75 95
+ 0 0 1 81 2 94 24 29 80 0 0 84 96 97 98 16 38 16 96 ?26 99 80 100 0 0 1 31 95 14
+ 0 80 85 100 0 +0 0 .005 0 0 1 1 0 0 .01 30 85 9 0 75 0 95 0 +-.0101 0 .005 1 0
+ 0 30 100 19 0 38 95 101 0 +.01 0 .005 1 0 0 31 101 22 0 82 100 102 0 +0 0 .005
+ 0 0 1 1 0 0 .0101 16 82 20 103 ?35 75 66 101 0 0 1 30 102 72 0 88 101 104 0 +-.
+0101 0 0 1 0 0 16 88 54 105 ?86 106 107 102 0 0 1 31 104 71 0 106 102 108 0 +0 0
+ 0 0 0 1 1 0 0 .01 16 106 51 109 ?89 66 88 104 0 0 1 30 108 70 0 66 104 110 0 +.
+01 0 0 1 0 0 16 66 48 111 ?59 82 106 108 0 0 1 31 110 69 0 107 108 112 0 +0 0 0
+ 0 0 1 1 0 0 .0101 16 107 57 113 ?114 88 0 110 0 0 1 30 112 89 0 99 110 115 0 +.
+0101 0 .005 0 0 -1 16 99 77 116 ?67 60 38 112 0 0 1 30 115 90 0 60 112 18 0 +.01
+ 0 .005 0 0 -1 16 60 78 117 ?54 24 99 115 0 0 1 30 18 91 0 24 115 6 0 +-.01 0 .0
+05 0 0 -1 81 2 117 111 29 60 0 0 92 116 118 119 80 2 29 120 121 9000 0 0 0 0 3 6
+ 0 0 0 FFTFTFTTTFFFTF3 1 81 2 92 110 29 24 0 0 22 117 122 123 81 2 116 112 29 99
+ 0 0 117 12 124 125 84 26 118 F104.F64.E94..F104.F64.E6582 1 119 122 81 2 12 113
+ 29 1 0 2 116 47 126 0 84 26 124 F104.F64.E94..F104.F64.E7582 1 125 121 81 2 47
+ 115 29 45 0 0 12 50 127 128 84 6 126 F104.B81 2 50 116 29 49 0 0 47 53 129 130
+ 84 9 127 F104.Vtx182 1 128 132 84 9 129 F104.Vtx282 1 130 131 81 2 22 109 29 9
+ 0 0 131 92 132 133 84 26 122 F104.F64.E65..F104.F64.E8582 1 123 123 81 2 131 10
+8 29 15 0 0 134 22 135 136 84 26 132 F104.F64.E85..F104.F64.E7582 1 133 124 14 1
+5 88 131 ?87 0 137 4 5 -0 0 87 0 21 81 2 134 107 29 87 0 0 138 131 139 140 84 12
+ 135 F104.F64.E7582 1 136 112 14 87 86 134 ?93 15 72 4 17 -0 0 93 15 21 81 2 138
+ 106 29 93 0 0 141 134 142 143 84 12 139 F104.F64.E8582 1 140 111 14 93 84 138 ?
+144 87 90 4 145 +0 0 144 87 21 81 2 141 105 29 144 0 0 146 138 147 148 84 12 142
+ F104.F64.E6582 1 143 110 14 144 82 141 ?78 93 58 4 149 -0 0 78 93 21 81 2 146 1
+04 29 78 0 0 150 141 151 152 84 12 147 F104.F64.E9482 1 148 109 14 78 28 146 ?15
+3 144 34 4 154 +0 0 153 144 21 81 2 150 103 29 153 0 0 113 146 155 156 84 10 151
+ F104.Cap1t82 1 152 107 14 153 45 150 ?0 78 157 4 158 -0 0 0 78 21 81 2 113 59 2
+9 107 0 0 105 150 159 160 84 10 155 F104.Cap1b82 1 156 108 81 2 105 56 29 88 0 0
+ 109 113 161 162 84 24 159 F104.Cap1b..F104.F64.E7582 1 160 118 81 2 109 53 29 1
+06 0 0 111 105 163 164 84 24 161 F104.Cap1b..F104.F64.E8582 1 162 120 81 2 111 5
+0 29 66 0 0 103 109 165 166 84 24 163 F104.Cap1b..F104.F64.E6582 1 164 119 81 2
+ 103 26 29 82 0 0 96 111 167 168 84 24 165 F104.Cap1b..F104.F64.E9482 1 166 117
+ 81 2 96 25 29 38 0 0 94 103 169 170 84 24 167 F104.Cap1t..F104.F64.E7582 1 168
+ 114 84 24 169 F104.Cap1t..F104.F64.E9482 1 170 113 15 157 47 0 171 153 0 50 158
+ 68 0 153 154 149 0 +0 0 0 0 0 1 1 0 0 13 21 3 0 0 0 0 0 0 8 15 50 154 29 0 78 0
+ 158 0 +0 0 .005 0 0 1 1 0 0 50 149 93 0 144 158 145 0 +.01 0 .005 0 1 0 0 0 1 5
+1 145 94 0 93 149 17 0 -0 0 .005 0 0 -1 .01 -1 0 0 50 17 95 0 87 145 5 0 +-.0101
+ 0 .005 0 1 0 0 0 1 17 171 0 157 61 48 19 114 107 0 0 -17 61 0 157 89 171 52 59
+ 66 0 91 -17 48 0 157 171 89 45 86 88 0 23 -17 114 0 137 83 67 45 171 107 0 0 +1
+5 137 87 0 114 15 0 17 83 0 137 81 114 62 23 9 0 0 -17 67 0 137 114 81 19 39 99
+ 0 171 +17 81 0 137 67 83 10 35 82 0 0 -17 39 0 58 37 59 10 67 99 0 81 -15 58 81
+ 0 59 144 0 17 37 0 58 54 39 27 26 38 0 36 -17 23 0 72 86 68 45 83 9 0 114 +17 8
+9 0 157 48 61 49 91 106 0 0 +17 91 0 90 40 51 52 89 106 0 0 -79 18 121 AnsysPara
+AttrDef.381 2 84 23 29 75 0 0 0 94 172 173 84 24 97 F104.Cap1t..F104.F64.E6582 1
+ 98 115 84 24 172 F104.Cap1t..F104.F64.E8582 1 173 116 84 9 76 F104.Vtx582 1 77
+ 127 84 9 70 F104.Vtx682 1 71 128 84 9 64 F104.Vtx482 1 65 129 84 9 56 F104.Vtx3
+82 1 57 130 81 2 31 122 29 27 0 0 25 0 174 175 84 9 174 F104.Vtx882 1 175 126 84
+ 9 32 F104.Vtx782 1 33 125 19 16 98 0 1 0 8 4 S74 20 14 2 0 0 31 2 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 80 1 11 176 177 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFTFFFFF1 82
+ 1 13 0 79 13 177 BodyAttrDef.41 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/B4.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/B4.xmt_txt
new file mode 100644
index 0000000..da979cf
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/B4.xmt_txt
@@ -0,0 +1,160 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows;
+OS_RELEASE=unknown;
+FRU=Parasolid Version 24.1, build 224, 6/12/2012;
+APPL=ANSYS DesignModeler;
+SITE=Canonsburg PA;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=B4;
+FILE=B4.x_t;
+DATE=10/11/13 14:10:42;
+**PART2;
+SCH=SCH_2401224_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 240122417 SCH_2300000_200000 74
+ 2 1 2 0 0 2 3 12 2 240 4 5 0 0 0 0 1e3 1e-8 0 0 3 1 0 1 1 6 7 8 9 10 11 12 0 0
+ 0 0 12 3 91 13 14 0 0 0 0 1e3 1e-8 0 2 0 1 0 1 1 15 16 17 18 19 20 21 0 0 0 0 8
+1 2 13 83 22 3 23 0 24 25 26 0 70 14 0 4 T3 0 0 2 20 1 27 27 13 15 6 0 3 0 28 0
+ 0 29 0 50 16 74 0 30 31 0 0 +0 0 0 1 0 0 0 1 0 31 17 82 0 32 33 0 0 +0 0 0 0 0
+ 1 1 0 0 .0101 29 18 69 0 21 34 0 0 .0101 0 19 19 4 0 3 29 0 35 V16 20 26 36 ?37
+ 0 38 39 0 0 3 18 21 38 40 41 0 42 18 ?3 81 2 40 90 22 21 0 0 43 44 45 46 17 41
+ 0 47 48 49 21 50 32 0 51 -18 42 36 52 53 21 54 55 ?3 81 2 52 37 22 42 0 0 56 57
+ 58 59 17 53 0 47 49 48 42 60 61 0 62 +18 54 34 56 63 42 64 34 ?3 29 55 65 0 42
+ 65 66 -.01 0 0 29 65 64 0 64 67 55 0 .0101 .005 29 66 66 0 68 55 69 -.0101 0 0
+ 18 68 27 70 50 71 0 66 ?3 29 69 67 0 72 66 34 -.01 0 .005 18 72 31 73 74 64 75
+ 69 ?3 29 34 68 0 54 69 18 -.0101 0 .005 81 2 73 32 22 72 0 0 70 56 76 77 17 74
+ 0 78 62 79 72 80 81 0 82 +18 64 33 83 84 54 72 65 ?3 18 75 30 43 79 72 71 67 ?3
+ 81 2 43 89 22 75 0 0 83 40 85 86 17 79 0 78 74 60 75 87 88 0 80 +18 71 29 44 60
+ 75 68 89 ?3 29 67 63 0 75 89 65 0 .01 .005 29 89 62 0 71 0 67 0 .01 0 81 2 44 9
+1 22 71 0 0 40 0 90 91 17 60 0 78 79 62 71 53 61 0 48 -15 78 44 0 60 92 0 17 62
+ 0 78 60 74 42 93 94 0 95 +16 61 19 96 ?53 97 98 33 0 0 3 17 48 0 47 53 41 71 99
+ 38 0 87 -15 47 50 0 48 100 0 17 99 0 101 37 87 21 48 38 0 0 +16 38 25 25 ?99 20
+ 102 103 0 0 3 17 87 0 101 99 104 71 79 88 0 0 -15 101 56 0 104 30 0 17 104 0 10
+1 87 37 75 84 105 0 0 -16 88 9 106 ?79 81 32 107 0 0 3 81 2 106 85 22 88 0 0 25
+ 36 108 109 16 81 10 110 ?74 94 88 111 0 0 3 16 32 7 112 ?50 88 0 17 0 0 3 30 10
+7 75 0 88 113 114 0 -0 .01 .005 0 0 -1 30 113 61 0 98 115 107 0 +-.0101 0 .005 1
+ 0 0 30 114 76 0 105 107 39 0 +0 0 .005 0 1 0 16 105 14 116 ?84 117 94 114 0 0 3
+ 30 39 77 0 20 114 103 0 -0 .0101 .005 0 0 -1 30 103 78 0 38 39 111 0 +0 0 0 0 1
+ 0 31 111 79 0 81 103 118 0 +0 0 .005 0 0 1 1 0 0 .01 31 118 80 0 117 111 33 0 +
+0 0 .005 0 0 1 1 0 0 .0101 16 117 15 119 ?63 98 105 118 0 0 3 31 33 81 0 61 118
+ 17 0 +0 0 0 0 0 1 1 0 0 .01 81 2 119 16 22 117 0 0 120 121 122 123 17 63 0 124
+ 82 84 54 125 117 0 126 +16 98 17 121 ?82 61 117 113 0 0 3 81 2 121 18 22 98 0 0
+ 119 96 127 128 17 82 0 124 80 63 72 126 98 0 93 +15 124 47 0 80 129 0 17 80 0 1
+24 84 82 75 74 81 0 104 -17 126 0 130 131 93 54 82 98 0 132 -17 93 0 130 126 95
+ 72 62 94 0 0 -15 130 53 0 95 133 0 17 95 0 130 93 131 42 49 97 0 0 +16 94 12 12
+0 ?62 105 81 134 0 0 3 81 2 120 13 22 94 0 0 110 119 135 136 30 134 59 0 94 137
+ 115 0 +-.01 0 .005 0 0 -1 30 137 58 0 102 0 134 0 +-.0101 0 .005 0 0 -1 30 115
+ 60 0 97 134 113 0 +-.0101 0 0 1 0 0 16 97 21 138 ?95 102 61 115 0 0 3 81 2 138
+ 22 22 97 0 0 96 139 140 141 16 102 23 139 ?131 38 97 137 0 0 3 81 2 139 24 22 1
+02 0 0 138 70 142 143 17 131 0 130 95 126 68 132 102 0 0 +17 132 0 144 125 50 54
+ 131 102 0 0 -15 144 41 0 51 28 0 17 125 0 144 51 132 64 63 117 0 37 -17 50 0 14
+4 132 51 68 41 32 0 49 +17 51 0 144 50 125 21 37 20 0 99 -17 49 0 47 41 53 68 95
+ 97 0 131 -17 37 0 101 104 99 64 51 20 0 0 +14 28 39 57 ?92 0 144 15 31 -0 0 92
+ 0 35 81 2 57 40 22 28 0 0 52 145 146 147 14 92 42 145 ?129 28 78 15 148 +0 0 12
+9 28 35 51 31 73 0 28 148 16 0 -0 0 .005 0 0 -1 .0101 -1 0 0 13 35 5 0 0 0 0 0 0
+ 19 28 51 148 72 0 92 149 31 0 -0 0 .005 0 0 -1 .01 -1 0 0 50 149 71 0 100 150 1
+48 0 +0 0 0 0 0 1 1 0 0 14 100 48 151 ?133 129 47 15 149 -0 0 133 129 35 50 150
+ 70 0 129 152 149 0 +0 0 .005 0 0 1 1 0 0 14 129 45 153 ?100 92 124 15 150 +0 0
+ 100 92 35 50 152 57 0 133 0 150 0 +-.0101 0 .005 0 1 0 0 0 1 14 133 51 154 ?30
+ 100 130 15 152 -0 0 30 100 35 81 2 154 52 22 133 0 0 151 24 155 156 14 30 54 24
+ ?0 133 101 15 16 +0 0 0 133 35 81 2 24 55 22 30 0 0 154 13 157 158 80 2 22 159
+ 160 9000 0 0 0 0 3 6 0 0 0 FFTFTFTTTFFFTF3 1 84 4 157 F14282 1 158 146 79 18 16
+0 AnsysParaAttrDef.381 2 151 49 22 100 0 0 153 154 161 162 84 12 155 F104.F64.E8
+582 1 156 111 81 2 153 46 22 129 0 0 145 151 163 164 84 10 161 F104.Cap1b82 1 16
+2 147 81 2 145 43 22 92 0 0 57 153 165 166 84 10 163 F104.Cap1t82 1 164 148 84 1
+2 165 F104.F64.E6582 1 166 149 84 12 146 F104.F64.E7582 1 147 150 81 2 70 28 22
+ 68 0 0 139 73 167 168 84 26 142 F104.F64.E85..F104.F64.E7582 1 143 124 84 9 167
+ F104.Vtx182 1 168 132 81 2 96 20 22 61 0 0 121 138 169 170 84 24 140 F104.Cap1b
+..F104.F64.E8582 1 141 120 84 24 169 F104.Cap1b..F104.F64.E6582 1 170 156 81 2 1
+10 11 22 81 0 0 112 120 171 172 84 26 135 F104.F64.E65..F104.F64.E8582 1 136 123
+ 81 2 112 8 22 32 0 0 0 110 173 174 84 24 171 F104.Cap1t..F104.F64.E6582 1 172 1
+62 84 24 173 F104.Cap1b..F104.F64.E7582 1 174 155 17 84 0 124 63 80 64 104 105 0
+ 125 +84 24 127 F104.Cap1t..F104.F64.E8582 1 128 116 84 24 122 F104.Cap1t..F104.
+F64.E7582 1 123 161 81 2 116 87 22 105 0 0 36 83 175 176 81 2 36 86 22 20 0 0 10
+6 116 177 178 81 2 83 88 22 64 0 0 116 43 179 180 84 16 175 F142..F104.Cap1t82 1
+ 176 160 84 9 179 F142.Vtx182 1 180 168 84 18 177 F142..F104.F64.E7582 1 178 159
+ 81 2 25 84 22 38 0 0 13 106 181 182 84 18 108 F142..F104.F64.E6582 1 109 158 84
+ 16 181 F142..F104.Cap1b82 1 182 157 84 9 90 F142.Vtx882 1 91 170 84 9 85 F142.V
+tx282 1 86 169 81 2 56 35 22 54 0 0 73 52 183 184 84 9 76 F104.Vtx582 1 77 127 8
+4 9 183 F104.Vtx682 1 184 128 84 9 58 F104.Vtx282 1 59 131 84 9 45 F142.Vtx382 1
+ 46 167 19 29 1 0 3 0 19 15 S74 20 27 2 0 0 23 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 81 1 23 2 185 3 0 13 0 0 186 80 1 185 187 188 9000 0 0 0 0 3 6 0 0 0 FFTF
+FFFFTFFFFF1 82 1 186 1 79 13 188 BodyAttrDef.484 9 26 F142.P0.B81 1 4 114 185 2
+ 189 0 0 0 190 70 5 0 4 T2 0 0 2 20 1 191 191 13 6 222 0 2 0 192 0 0 193 0 51 7
+ 96 0 194 195 0 0 -0 0 .005 0 0 -1 .0101 -1 0 0 30 8 133 0 196 197 0 0 +0 0 0 0
+ 1 0 29 9 230 0 198 199 0 0 .0101 .005 19 10 224 0 2 193 0 200 V16 11 148 201 ?2
+02 0 203 204 0 0 2 18 12 176 205 206 0 207 199 ?2 81 2 205 240 22 12 0 0 208 0 2
+09 210 17 206 0 211 202 212 12 213 196 0 214 -18 207 175 215 202 12 198 216 ?2 2
+9 199 229 0 12 216 9 0 .01 0 29 216 227 0 207 217 199 0 .01 .005 29 217 210 0 21
+8 219 216 0 .0101 0 18 218 209 208 212 198 220 217 ?2 29 219 73 0 221 222 217 .0
+101 0 0 18 221 60 223 224 225 226 219 ?2 29 222 74 0 226 227 219 .01 0 0 18 226
+ 62 228 229 221 0 222 ?2 29 227 17 0 220 230 222 .0101 0 .005 18 220 15 231 232
+ 218 225 227 ?2 29 230 12 0 225 0 227 .01 0 .005 18 225 10 233 234 220 221 230 ?
+2 81 2 233 122 22 225 0 0 231 235 236 237 17 234 0 238 239 240 225 229 241 0 242
+ -15 238 149 0 214 243 0 17 239 0 238 214 234 207 244 245 0 246 +17 240 0 238 23
+4 214 226 247 248 0 0 -17 229 0 249 224 242 226 234 241 0 250 +16 241 78 251 ?22
+9 196 252 197 0 0 2 17 242 0 249 229 253 225 232 254 0 244 -15 249 81 0 224 192
+ 0 17 253 0 249 242 224 220 255 252 0 256 -17 232 0 257 258 244 220 242 254 0 25
+3 +16 254 16 259 ?232 252 245 260 0 0 2 17 244 0 257 232 246 225 239 245 0 0 -15
+ 257 145 0 246 261 0 17 246 0 257 244 258 207 262 203 0 0 -16 245 11 263 ?239 25
+4 264 265 0 0 2 81 2 263 24 22 245 0 0 0 259 266 267 16 264 20 268 ?258 245 269
+ 270 0 0 2 31 265 14 0 245 271 260 0 +0 0 .005 0 0 1 1 0 0 .01 30 271 189 0 203
+ 272 265 0 +0 0 .005 0 1 0 30 260 19 0 254 265 270 0 +.01 0 .005 1 0 0 31 270 22
+ 0 264 260 273 0 +0 0 .005 0 0 1 1 0 0 .0101 31 273 71 0 248 270 274 0 +0 0 0 0
+ 0 1 1 0 0 .01 16 248 51 275 ?247 269 276 273 0 0 2 30 274 70 0 269 273 277 0 +.
+01 0 0 1 0 0 16 269 48 278 ?224 264 248 274 0 0 2 31 277 69 0 276 274 279 0 +0 0
+ 0 0 0 1 1 0 0 .0101 16 276 57 280 ?281 248 0 277 0 0 2 30 279 89 0 252 277 197
+ 0 +.0101 0 .005 0 0 -1 16 252 77 282 ?255 241 254 279 0 0 2 30 197 90 0 241 279
+ 8 0 +.01 0 .005 0 0 -1 81 2 282 112 22 252 0 0 251 189 283 284 17 255 0 285 281
+ 256 221 253 252 0 286 +15 285 87 0 281 194 0 17 281 0 285 287 255 218 286 276 0
+ 213 +17 256 0 285 255 287 220 258 264 0 0 -17 286 0 288 250 213 221 281 276 0 0
+ -15 288 47 0 247 289 0 17 250 0 288 247 286 226 224 269 0 240 -17 213 0 288 286
+ 247 218 206 196 0 0 +17 247 0 288 213 250 12 240 248 0 0 +16 196 131 290 ?213 2
+91 241 8 0 0 2 81 2 290 233 22 196 0 0 235 292 293 294 16 291 152 295 ?287 203 1
+96 272 0 0 2 81 2 295 236 22 291 0 0 201 296 297 298 17 287 0 285 256 281 198 21
+2 291 0 0 +16 203 144 292 ?262 11 291 271 0 0 2 30 272 190 0 291 204 271 0 -0 .0
+101 .005 0 0 -1 30 204 191 0 11 0 272 0 -0 .01 .005 0 0 -1 81 2 292 234 22 203 0
+ 0 290 201 299 300 17 262 0 211 212 202 198 246 203 0 258 +15 211 185 0 262 301
+ 0 17 212 0 211 206 262 218 287 291 0 281 -17 202 0 211 262 206 207 214 11 0 239
+ +18 198 172 296 262 207 218 9 ?2 17 258 0 257 246 232 198 256 264 0 287 +81 2 2
+96 237 22 198 0 0 295 215 302 303 81 2 215 238 22 207 0 0 296 208 304 305 84 9 3
+02 F142.Vtx482 1 303 165 81 2 208 239 22 218 0 0 215 205 306 307 84 9 304 F142.V
+tx582 1 305 164 84 9 306 F142.Vtx682 1 307 163 17 214 0 238 240 239 12 202 11 0
+ 247 -14 301 183 235 ?0 194 211 6 308 -0 0 0 194 200 81 2 235 226 22 301 0 0 233
+ 290 309 310 14 194 88 311 ?301 243 285 6 7 -0 0 301 243 200 50 308 188 0 301 0
+ 312 0 +0 0 0 1 0 0 0 1 0 13 200 223 0 0 0 0 0 0 10 192 14 192 82 313 ?261 0 249
+ 6 314 -0 0 261 0 200 81 2 313 105 22 192 0 0 315 316 317 318 14 261 28 315 ?289
+ 192 257 6 312 +0 0 289 192 200 50 314 93 0 192 319 195 0 +.01 0 .005 0 1 0 0 0
+ 1 50 319 68 0 289 312 314 0 +0 0 0 0 0 1 1 0 0 51 195 94 0 243 314 7 0 -0 0 .00
+5 0 0 -1 .01 -1 0 0 14 243 84 316 ?194 289 238 6 195 +0 0 194 289 200 81 2 316 1
+06 22 243 0 0 313 311 320 321 14 289 45 322 ?243 261 288 6 319 -0 0 243 261 200
+ 81 2 322 103 22 289 0 0 280 315 323 324 81 2 280 59 22 276 0 0 275 322 325 326
+ 81 2 315 104 22 261 0 0 322 313 327 328 84 10 323 F104.Cap1b82 1 324 108 84 10
+ 327 F104.Cap1t82 1 328 107 81 2 275 53 22 248 0 0 278 280 329 330 84 24 325 F10
+4.Cap1b..F104.F64.E7582 1 326 118 81 2 278 50 22 269 0 0 268 275 331 332 84 24 3
+29 F104.Cap1b..F104.F64.E6582 1 330 119 81 2 268 26 22 264 0 0 259 278 333 334 8
+4 24 331 F104.Cap1b..F104.F64.E9482 1 332 117 81 2 259 25 22 254 0 0 263 268 335
+ 336 84 24 333 F104.Cap1t..F104.F64.E7582 1 334 114 84 24 335 F104.Cap1t..F104.F
+64.E9482 1 336 113 81 2 311 108 22 194 0 0 316 251 337 338 84 12 320 F104.F64.E6
+582 1 321 110 81 2 251 111 22 241 0 0 311 282 339 340 84 12 337 F104.F64.E7582 1
+ 338 112 84 26 339 F104.F64.E94..F104.F64.E6582 1 340 122 50 312 29 0 261 308 31
+9 0 +0 0 .005 0 0 1 1 0 0 84 12 317 F104.F64.E9482 1 318 109 84 4 309 F14282 1 3
+10 145 81 2 201 235 22 11 0 0 292 295 341 342 84 16 299 F104.Cap1t..F14282 1 300
+ 152 84 18 341 F104.F64.E65..F14282 1 342 153 84 18 297 F104.F64.E75..F14282 1 2
+98 154 84 16 293 F104.Cap1b..F14282 1 294 151 17 224 0 249 253 229 221 250 269 0
+ 255 +81 2 189 113 22 2 0 4 282 228 343 0 84 26 283 F104.F64.E94..F104.F64.E7582
+ 1 284 121 81 2 228 117 22 226 0 0 189 223 344 345 84 6 343 F104.B81 2 223 118 2
+2 221 0 0 228 231 346 347 84 9 344 F104.Vtx382 1 345 130 81 2 231 121 22 220 0 0
+ 223 233 348 349 84 9 346 F104.Vtx482 1 347 129 84 9 348 F104.Vtx782 1 349 125 8
+4 24 266 F104.Cap1t..F104.F64.E6582 1 267 115 84 9 236 F104.Vtx882 1 237 126 84
+ 9 209 F142.Vtx782 1 210 166 19 193 98 0 2 0 10 6 S74 20 191 2 0 0 205 4 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 82 1 190 0 1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/Block.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/Block.xmt_txt
new file mode 100644
index 0000000..62075fe
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/Block.xmt_txt
@@ -0,0 +1,61 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=parasolid_acceptance_tests;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=Block;
+FILE=Block.xmt_txt;
+DATE=unknown;
+**PART2;
+SCH=SCH_2601153_26105;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 260115323 SCH_2601153_26105_1300
+6194 0 12 30 CCCCCCCCCCCCCDI5 owner1040 0 CCCCCCCCCA13 boundary_mesh1006 0 A16 i
+ndex_map_offset0 0 1 dA9 index_map82 0 A17 node_id_index_map82 0 A20 schema_embe
+dding_map82 0 A5 child12 0 A14 lowest_node_id0 0 1 dZ1 62 0 0 0 0 0 0 1e3 1e-8 0
+ 0 0 1 0 1 1 2 3 4 5 6 7 8 0 0 0 0 0 0 0 13 255 2 3 0 1 0 9 0 0 10 0 50 255 3 54
+ 0 9 11 0 0 +0 0 1 0 0 1 1 0 0 30 255 4 62 0 7 12 0 0 +0 -1 1 -1 0 0 29 255 5 58
+ 0 8 13 0 -.5 -1 1 19 8 CCCCCCCA5 owner12 0 Z6 1 0 1 10 0 14 V0 16 255 7 34 0 ?1
+5 0 16 4 0 0 1 18 255 8 23 0 15 0 17 5 ?1 17 255 15 0 18 19 20 8 21 7 0 22 +18 1
+7 21 0 23 8 24 13 ?1 17 23 0 25 26 27 17 22 16 0 28 +18 24 19 0 29 17 30 31 ?1 2
+9 13 57 0 17 31 5 -.5 1 1 29 31 56 0 24 32 13 .5 1 1 29 32 55 0 30 33 31 .5 -1 1
+ 18 30 17 0 21 24 34 32 ?1 29 33 41 0 35 36 32 -.5 -1 0 18 35 11 0 19 37 38 33 ?
+1 29 36 40 0 37 39 33 -.5 1 0 18 37 13 0 26 34 35 36 ?1 29 39 39 0 34 40 36 .5 1
+ 0 18 34 15 0 41 30 37 39 ?1 29 40 38 0 38 0 39 .5 -1 0 18 38 10 0 42 35 0 40 ?1
+ 17 42 0 43 44 45 38 20 46 0 47 -15 255 43 7 0 44 48 0 17 44 0 43 49 42 34 50 51
+ 0 0 +17 45 0 43 42 49 30 52 53 0 20 +17 20 0 18 15 47 30 42 46 0 0 +16 46 18 0
+ ?20 54 51 55 0 0 1 17 47 0 18 20 19 38 56 57 0 50 +15 18 32 0 20 58 0 17 19 0 1
+8 47 15 35 27 59 0 60 -17 56 0 61 62 50 35 47 57 0 0 -16 57 12 0 ?47 63 0 64 0 0
+ 1 17 50 0 61 56 65 38 44 51 0 0 -15 61 8 0 50 66 0 17 65 0 61 50 62 34 67 68 0
+ 44 -16 51 6 0 ?44 46 68 69 0 0 1 16 68 16 0 ?67 51 63 70 0 0 1 30 69 43 0 51 64
+ 70 0 +.5 0 0 0 1 0 30 64 42 0 57 0 69 0 +0 -1 0 1 0 0 30 70 44 0 68 69 71 0 +0
+ 1 0 -1 0 0 30 71 45 0 63 70 55 0 +-.5 0 0 0 -1 0 16 63 14 0 ?60 68 57 71 0 0 1
+ 30 55 50 0 46 71 72 0 +.5 -1 0 0 0 1 30 72 51 0 54 55 73 0 +.5 1 0 0 0 1 16 54
+ 20 0 ?49 74 46 72 0 0 1 30 73 52 0 74 72 75 0 +-.5 1 0 0 0 1 16 74 22 0 ?76 59
+ 54 73 0 0 1 30 75 53 0 59 73 77 0 +-.5 -1 0 0 0 1 16 59 24 0 ?27 53 74 75 0 0 1
+ 30 77 59 0 53 75 78 0 +.5 0 1 0 -1 0 16 53 25 0 ?45 79 59 77 0 0 1 30 78 60 0 7
+9 77 12 0 +0 1 1 1 0 0 16 79 28 0 ?29 16 53 78 0 0 1 30 12 61 0 16 78 4 0 +-.5 0
+ 1 0 1 0 16 16 31 0 ?23 7 79 12 0 0 1 17 29 0 80 41 76 24 28 79 0 52 +15 80 26 0
+ 76 81 0 17 41 0 80 67 29 34 49 54 0 65 -17 76 0 80 29 67 17 26 74 0 0 +17 28 0
+ 82 22 52 17 29 79 0 76 -17 52 0 82 28 21 24 45 53 0 49 -15 82 35 0 21 9 0 17 21
+ 0 82 52 22 30 15 7 0 45 -17 49 0 43 45 44 24 41 54 0 0 +17 22 0 82 21 28 8 23 1
+6 0 27 -17 27 0 25 23 60 8 19 59 0 0 +15 25 29 0 27 83 0 17 60 0 25 27 26 35 62
+ 63 0 56 +17 26 0 25 60 23 37 76 74 0 67 -17 62 0 61 65 56 37 60 63 0 0 -17 67 0
+ 80 76 41 37 65 68 0 62 +14 255 83 30 0 ?81 58 25 2 84 +0 0 81 58 14 14 81 27 0
+ ?66 83 80 2 85 +0 0 66 83 14 14 58 33 0 ?83 9 18 2 11 +0 0 83 9 14 50 84 48 0 8
+3 85 11 0 +-.5 0 0 -1 0 0 0 0 1 13 14 4 0 0 0 0 0 0 6 9 14 9 36 0 ?58 0 82 2 3 +
+0 0 58 0 14 50 85 47 0 81 86 84 0 +0 1 0 0 1 0 0 0 1 50 11 49 0 58 84 3 0 +0 -1
+ 0 0 -1 0 0 0 -1 50 86 46 0 48 87 85 0 +.5 0 0 1 0 0 0 0 -1 14 48 2 0 ?0 66 43 2
+ 86 +0 0 0 66 14 50 87 37 0 66 0 86 0 +0 0 0 0 0 -1 -1 0 0 14 66 9 0 ?48 81 61 2
+ 87 +0 0 48 81 14 19 10 5 0 1 0 6 2 S0 1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch.xmt_txt
new file mode 100644
index 0000000..4c13f55
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch.xmt_txt
@@ -0,0 +1,124 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=x64/Windows NT;
+MC_MODEL=genuineintel family 6 model 10 stepping 7, intel(r) core(tm) i5-2500 cpu @ 3.30ghz;
+MC_ID=sd18;
+OS=windows nt (x64);
+OS_RELEASE=6.1 (workstation) (build 7601: service pack 1) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=vidya;
+FORMAT=text;
+GUISE=transmit;
+KEY=Cutting-punch;
+FILE=D:\Nagaraj\Cutting-punch.x_t;
+DATE=5-may-2014;
+**PART2;
+SCH=SCH_2500176_25001;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 250017617 SCH_1000000_100040 12
+ 1 188 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 1 2 188 11 1 12 0 0
+ 0 13 70 3 0 1 0 0 4 5 20 8 14 14 1 T13 4 3 0 1 0 15 0 0 16 0 50 5 126 0 15 17 0
+ 0 +.1 .08 .13 0 1 0 0 0 1 30 6 120 0 18 19 0 0 +.1 .08 .13 -1 0 0 29 7 91 0 20
+ 21 0 0 .05 .13 19 8 1 0 1 16 0 22 V16 9 101 23 ?24 0 25 19 0 0 1 18 10 25 0 26
+ 0 27 28 ?1 17 26 29 30 31 10 32 33 0 34 -18 27 20 0 35 10 36 37 ?1 29 28 27 0 1
+0 37 38 .1 .05 .13 29 37 22 0 27 39 28 .1 .05 .0487938524157182 29 38 96 0 40 28
+ 41 0 .08 .13 18 40 82 0 42 43 0 38 ?1 29 41 95 0 43 38 44 0 .08 .03054 18 43 80
+ 0 24 45 40 41 ?1 29 44 94 0 45 41 46 0 .05 .03 18 45 78 0 47 48 43 44 ?1 29 46
+ 93 0 48 44 21 0 .04315959713348665 .0487938524157182 18 48 76 0 49 50 45 46 ?1
+ 29 21 92 0 50 46 7 0 .05 .0487938524157182 18 50 74 0 51 20 48 21 ?1 17 51 52 5
+3 54 50 35 55 0 56 +18 20 72 0 32 57 50 7 ?1 17 32 58 56 34 20 26 33 0 31 +18 57
+ 2 0 59 60 20 61 ?1 17 59 62 63 64 57 42 18 0 30 -18 60 5 0 65 66 57 67 ?1 29 61
+ 4 0 57 0 67 .1 .08 .13 29 67 7 0 60 61 68 .1 .08 .03054 29 68 12 0 66 67 39 .1
+ .05 .03 18 66 10 0 69 36 60 68 ?1 29 39 17 0 36 68 37 .1 .04315959713348665 .04
+87938524157182 18 36 15 0 70 27 66 39 ?1 17 70 52 54 53 36 49 71 0 72 -15 52 107
+ 0 53 73 0 17 54 52 51 70 27 74 75 0 76 +17 53 52 70 51 48 77 78 0 79 -17 49 80
+ 81 72 48 70 71 0 53 +16 71 99 82 ?49 25 55 83 0 0 1 17 72 80 49 69 36 84 85 0 7
+4 +15 80 109 0 81 86 0 17 69 80 72 81 66 47 25 0 87 -17 84 88 89 74 66 72 85 0 0
+ -16 85 16 90 ?72 75 91 92 0 0 1 17 74 88 84 76 36 54 75 0 0 -15 88 33 0 93 94 0
+ 17 76 88 74 95 27 34 96 0 0 -16 75 21 97 ?54 96 85 98 0 0 1 81 1 97 165 99 75 0
+ 0 100 101 102 16 96 26 103 ?34 104 75 105 0 0 1 30 98 24 0 75 92 105 0 +.1 .043
+15959713348665 .0487938524157182 0 1 0 30 92 19 0 85 106 98 0 +.1 .05 .03 0 -.34
+2020143325667 .939692620785909 30 105 29 0 96 98 107 0 +.1 .05 .0487938524157182
+ 0 0 1 30 107 32 0 104 105 108 0 +.1 .05 .13 0 1 0 16 104 30 109 ?30 18 96 107 0
+ 0 1 30 108 90 0 110 107 111 0 +0 .08 .13 0 0 -1 16 110 70 112 ?113 114 0 108 0
+ 0 1 30 111 89 0 114 108 115 0 +0 .08 .03054 0 -.999838039355374 -.0179970847083
+968 16 114 68 101 ?116 117 110 111 0 0 1 30 115 88 0 117 111 118 0 +0 .05 .03 0
+ -.342020143325667 .939692620785909 16 117 66 119 ?79 78 114 115 0 0 1 30 118 87
+ 0 78 115 120 0 +0 .04315959713348665 .0487938524157182 0 1 0 16 78 64 121 ?77 1
+22 117 118 0 0 1 30 120 86 0 122 118 123 0 +0 .05 .0487938524157182 0 0 1 16 122
+ 62 124 ?125 126 78 120 0 0 1 30 123 85 0 126 120 127 0 +0 .05 .13 0 1 0 16 126
+ 60 100 ?128 129 122 123 0 0 1 30 127 115 0 33 123 130 0 +.1 .05 .13 -1 0 0 16 3
+3 97 131 ?32 55 18 127 0 0 1 30 130 116 0 55 127 83 0 +.1 .05 .0487938524157182
+ -1 0 0 16 55 98 132 ?51 71 33 130 0 0 1 30 83 117 0 71 130 133 0 +.1 .043159597
+13348665 .0487938524157182 -1 0 0 30 133 118 0 25 83 19 0 +.1 .05 .03 -1 0 0 16
+ 25 100 134 ?47 9 71 133 0 0 1 30 19 119 0 9 133 6 0 +.1 .08 .03054 -1 0 0 81 1
+ 134 167 99 25 0 0 101 135 136 17 47 137 138 87 45 69 25 0 81 +15 137 111 0 138
+ 139 0 17 138 137 65 47 43 116 114 0 113 -17 87 137 47 65 66 89 91 0 84 +17 81 8
+0 69 49 45 79 117 0 116 -17 79 140 77 116 48 81 117 0 0 +17 116 140 79 113 45 13
+8 114 0 0 +15 140 59 0 113 141 0 17 113 140 116 128 43 64 110 0 0 +17 128 140 11
+3 125 40 31 126 0 64 +17 64 62 59 24 40 113 110 0 0 -15 62 113 0 64 15 0 17 24 6
+2 64 63 43 65 9 0 138 +17 63 62 24 59 60 93 129 0 0 +17 65 137 87 138 60 24 9 0
+ 89 -17 89 88 93 84 60 87 91 0 63 -17 93 88 95 89 57 63 129 0 0 -16 91 11 135 ?8
+7 85 129 106 0 0 1 81 1 135 168 99 91 0 0 134 23 142 16 129 6 143 ?63 91 126 144
+ 0 0 1 30 106 14 0 91 144 92 0 +.1 .08 .03054 0 -.999838039355374 -.017997084708
+3968 30 144 9 0 129 0 106 0 +.1 .08 .13 0 0 -1 81 1 143 162 99 129 0 0 119 82 14
+5 80 1 99 146 147 9000 1 1 1 1 1 1 1 1 FFFFTFTFFFFFF3 81 1 119 161 99 117 0 0 12
+1 143 148 81 1 82 163 99 71 0 0 143 100 149 84 32 145 823bb6f9d0015bd9e8cf44ccfa
+4d997881 1 100 164 99 126 0 0 82 97 150 84 32 149 7c6f60a92c660e6ba082fb3747038c
+d584 32 150 2e666c9515bcae936348449a9497508581 1 121 160 99 78 0 0 124 119 151 8
+4 32 148 d6f39ed86e92ed0f6476d108d138062181 1 124 159 99 122 0 0 131 121 152 84
+ 32 151 dfe3b2be7980846b2094de7a37f1157b81 1 131 158 99 33 0 0 112 124 153 84 32
+ 152 3e9a36f99ae9263dc456143c2acf84f481 1 112 157 99 110 0 0 90 131 154 84 32 15
+3 fd7653b247b9d3b1448ea54b13cbcf9981 1 90 156 99 85 0 0 103 112 155 84 32 154 0b
+9a2ecf72dde596bc1975daef7f0fa081 1 103 155 99 96 0 0 109 90 156 84 32 155 b4cd94
+0fd592ba3a7d64b9396e31476c81 1 109 154 99 104 0 0 157 103 158 84 32 156 2bcdcefb
+5d564baa87ef7705f993d75081 1 157 153 99 18 0 0 132 109 159 84 32 158 865c8065067
+0ac909a2d510c497083ec16 18 102 157 ?42 33 104 6 0 0 1 81 1 132 152 99 55 0 0 0 1
+57 160 84 32 159 fc2384803e72568a8976752c787078e584 32 160 c0651fb75bb618fdd73a3
+02980d3b59317 42 29 31 30 40 59 18 0 128 +15 29 103 0 31 161 0 17 31 29 26 42 20
+ 128 126 0 125 -17 30 29 42 26 57 95 104 0 93 +17 95 88 76 93 10 30 104 0 0 -17
+ 125 140 128 77 20 56 122 0 0 +17 77 140 125 79 50 53 78 0 0 +17 56 58 35 32 50
+ 125 122 0 77 -15 58 105 0 56 162 0 17 35 58 34 56 27 51 55 0 54 -17 34 58 32 35
+ 10 76 96 0 95 +14 162 106 163 ?161 73 58 4 164 +0 0 161 73 22 81 1 163 184 165
+ 162 166 0 167 168 169 14 161 104 168 ?94 162 29 4 170 +0 0 94 162 22 14 73 108
+ 167 ?162 86 52 4 171 +0 0 162 86 22 50 164 122 0 162 170 171 0 +.1 .05 .0487938
+524157182 0 -1 0 0 0 -1 13 22 127 0 0 0 0 0 0 8 15 14 15 114 172 ?139 0 62 4 5 +
+0 0 139 0 22 81 1 172 180 165 15 173 0 0 174 175 14 139 112 174 ?86 15 137 4 17
+ +0 0 86 15 22 81 1 174 181 165 139 176 0 172 177 178 14 86 110 177 ?73 139 80 4
+ 179 +0 0 73 139 22 50 17 125 0 139 179 5 0 +.1 .08 .03054 0 .0179970847083968 -
+.999838039355374 0 .999838039355374 .0179970847083968 50 179 124 0 86 171 17 0 +
+.1 .05 .03 0 -.939692620785909 -.342020143325667 0 .342020143325667 -.9396926207
+85909 50 171 123 0 73 164 179 0 +.1 .04315959713348665 .0487938524157182 0 0 1 1
+ 0 0 81 1 177 182 165 86 180 0 174 167 181 80 1 165 0 182 8001 0 0 0 0 3 5 0 0 F
+FFFTFTFFFFFF2 81 1 180 173 99 86 0 177 173 183 184 81 1 167 183 165 73 185 0 177
+ 163 186 83 3 181 .5960784 .6666667 .6862745 81 1 185 170 99 73 0 167 23 187 188
+ 83 3 186 .5960784 .6666667 .6862745 81 1 23 169 99 9 0 0 135 185 189 81 1 187 1
+71 99 94 0 190 185 173 191 84 32 188 a2210a7e60bf02b8729c29585bc7f68c14 94 34 19
+0 ?141 161 88 4 192 +0 0 141 161 22 81 1 190 186 165 94 187 0 168 193 194 81 1 1
+73 172 99 15 0 172 187 180 195 84 32 191 19f748f07f917ed28adcc72e91c27bd484 32 1
+95 e79af6e333da920ddab8867733fa4cb981 1 168 185 165 161 196 0 163 190 197 81 1 1
+93 187 165 141 183 0 190 0 198 83 3 194 .5960784 .6666667 .6862745 14 141 56 193
+ ?0 94 140 4 199 -0 0 0 94 22 81 1 183 174 99 141 0 193 180 166 200 83 3 198 .59
+60784 .6666667 .6862745 81 1 166 175 99 162 0 163 183 196 201 84 32 200 098b0641
+545b557e79e425a90ae1fb1c81 1 196 176 99 161 0 168 166 176 202 84 32 201 4b565319
+67de44e6762cf8c922d5394a81 1 176 177 99 139 0 174 196 0 203 84 32 202 504dea1e62
+b1fecf3fef7dd765820e7584 32 203 9fcd0e9184db9cc16ccd2fc74a3bd93950 199 84 0 141
+ 192 170 0 +0 0 0 1 0 0 0 0 -1 50 192 35 0 94 0 199 0 +.1 0 0 1 0 0 0 0 -1 50 17
+0 121 0 161 199 164 0 +.1 .05 .13 0 0 1 1 0 0 83 3 197 .5960784 .6666667 .686274
+5 84 32 189 3c8468c752966ba0cf13b3bd6dd1c18d84 32 184 ec970427e9b3217abf2a1a0e3d
+54907a79 15 182 SDL/TYSA_COLOUR83 3 178 .5960784 .6666667 .6862745 83 3 175 .596
+0784 .6666667 .6862745 83 3 169 .5960784 .6666667 .6862745 79 15 147 UGS/ObjectS
+tate84 32 142 f2268ae4b80cb84fa9d2f0f3a86a6bfe81 1 101 166 99 114 0 0 97 134 204
+ 84 32 136 35369ae172d96e2abda5e1fc73e09d0484 32 204 b0e66f12dabb7fa1607366e4604
+eb89084 32 102 ca95de678361320b18f59b4e5056e8a519 16 128 0 1 0 8 4 S74 20 14 5 0
+ 176 205 12 193 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 2 205 178 206 1 0 12 0 0 207
+ 208 81 1 12 179 146 1 205 2 0 0 209 80 1 146 210 211 9000 0 0 0 0 3 5 0 0 FFTFF
+FFFFFFFF1 82 1 209 8 79 7 211 body_id80 2 206 212 213 8004 0 0 0 0 3 5 0 0 FFTFF
+FFFFFFFF2 3 83 1 207 7830.64 84 8 208 Kg/Cu M 79 16 213 SDL/TYSA_DENSITY80 1 11
+ 214 215 9000 0 0 0 0 3 5 0 0 FFTFFFFFFFFFF1 82 1 13 129 79 24 215 UG2/BODY_COLO
+R_ATTRIBUTE1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch2.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch2.xmt_txt
new file mode 100644
index 0000000..196f442
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/Cutting-punch2.xmt_txt
@@ -0,0 +1,119 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=x64/Windows NT;
+MC_MODEL=genuineintel family 6 model 14 stepping 5, intel(r) core(tm) i5 cpu         760  @ 2.80ghz;
+MC_ID=ds77;
+OS=windows nt (x64);
+OS_RELEASE=5.2 (workstation) (build 3790: service pack 2) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=autoform;
+FORMAT=text;
+GUISE=transmit;
+KEY=Cutting-punch2;
+FILE=D:\WorkPiece\Cutting-punch2.x_t;
+DATE=5-may-2014;
+**PART2;
+SCH=SCH_2201175_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 220117517 SCH_1000000_100040 12
+ 1 271 2 3 0 0 0 0 1e3 1e-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 81 2 2 255 12 1 13 0 0
+ 0 14 0 70 3 0 1 0 0 4 9 20 8 15 15 1 T13 5 3 0 1 0 16 0 0 17 0 50 6 243 0 18 19
+ 0 0 +.1 .05 .03 0 .1045284632676534 -.994521895368273 0 .994521895368273 .10452
+84632676534 30 7 242 0 10 20 0 0 +.1 .08 .0331531270579703 -1 0 0 29 8 239 0 21
+ 22 0 0 .08 .0331531270579703 19 9 1 0 1 17 0 23 V16 10 101 0 ?24 0 25 7 0 0 1 1
+8 11 25 0 26 0 27 28 ?1 17 26 29 30 31 11 32 33 0 34 -18 27 20 0 35 11 36 37 ?1
+ 29 28 224 0 11 38 39 .05 .05 .08 29 38 223 0 40 41 28 .05 .08 .08 29 39 225 0 4
+2 28 22 0 .05 .08 18 42 72 0 32 40 43 39 ?1 29 22 238 0 44 39 8 .05 .08 .0331531
+270579703 18 44 5 0 45 46 40 22 ?1 17 45 47 48 49 44 24 10 0 50 -18 46 10 0 51 3
+6 44 52 ?1 18 40 2 0 53 44 42 38 ?1 17 53 54 55 56 40 57 58 0 30 -15 54 113 0 56
+ 16 0 17 55 54 24 53 44 59 60 0 0 +17 56 54 53 24 61 62 63 0 0 -17 57 29 31 30 6
+1 53 58 0 64 +16 58 102 0 ?57 33 65 66 0 0 1 17 30 29 57 26 40 67 65 0 59 +15 29
+ 103 0 31 68 0 17 67 69 70 59 11 30 65 0 0 -16 65 30 0 ?30 58 71 72 0 0 1 17 59
+ 69 67 50 40 55 60 0 0 -15 69 33 0 59 73 0 17 50 69 59 74 44 48 75 0 55 -16 60 6
+ 0 ?55 75 76 77 0 0 1 16 75 11 0 ?48 78 60 20 0 0 1 16 76 60 0 ?64 60 79 80 0 0
+ 1 30 77 210 0 60 81 82 0 +.05 .08 .13 0 0 -1 30 81 118 0 25 83 77 0 +.1 .05 .03
+ -1 0 0 30 82 212 0 78 77 84 0 +.05 .05 .03 0 -.342020143325667 .939692620785909
+ 16 78 16 0 ?85 86 75 82 0 0 1 30 84 213 0 86 82 87 0 +.05 .04315959713348665 .0
+487938524157182 0 1 0 16 86 21 0 ?88 71 78 84 0 0 1 30 87 214 0 71 84 80 0 +.05
+ .05 .0487938524157182 0 0 1 16 71 26 0 ?34 65 86 87 0 0 1 30 80 226 0 76 87 66
+ 0 +0 .05 .08 0 1 0 30 66 227 0 58 80 72 0 +.1 .08 .08 -1 0 0 30 72 228 0 65 66
+ 89 0 +.05 .05 .08 0 1 0 30 89 229 0 33 72 90 0 +.1 .05 .08 -1 0 0 16 33 97 0 ?3
+2 91 58 89 0 0 1 30 90 240 0 92 89 20 0 +0 .05 .03 0 -.994521895368273 -.1045284
+632676534 16 92 68 0 ?93 94 63 90 0 0 1 30 20 241 0 75 90 7 0 +.05 .05 .03 0 -.9
+94521895368273 -.1045284632676534 17 93 95 96 62 97 49 92 0 0 +16 94 66 98 ?96 9
+9 92 100 0 0 1 16 63 70 0 ?62 92 0 101 0 0 1 17 62 95 93 64 21 56 63 0 0 +30 101
+ 90 0 63 0 100 0 +0 .08 .13 0 0 -1 30 100 88 0 94 101 102 0 +0 .05 .03 0 -.34202
+0143325667 .939692620785909 30 102 87 0 99 100 103 0 +0 .04315959713348665 .0487
+938524157182 0 1 0 16 99 64 104 ?105 79 94 102 0 0 1 30 103 86 0 79 102 106 0 +0
+ .05 .0487938524157182 0 0 1 16 79 62 0 ?107 76 99 103 0 0 1 30 106 116 0 91 103
+ 83 0 +.1 .05 .0487938524157182 -1 0 0 16 91 98 0 ?108 109 33 106 0 0 1 30 83 11
+7 0 109 106 81 0 +.1 .04315959713348665 .0487938524157182 -1 0 0 16 109 99 0 ?11
+0 25 91 83 0 0 1 17 110 111 112 85 113 114 109 0 115 +16 25 100 0 ?116 10 109 81
+ 0 0 1 17 116 47 49 48 97 51 25 0 112 +15 47 111 0 49 18 0 17 49 47 45 116 21 93
+ 92 0 62 -17 48 47 116 45 46 50 75 0 74 +18 97 78 0 116 113 21 117 ?1 17 51 111
+ 85 112 46 116 25 0 48 -17 112 111 51 110 97 96 94 0 93 -15 111 109 0 112 118 0
+ 17 96 95 105 93 113 112 94 0 0 +15 95 59 0 62 119 0 17 105 95 107 96 43 115 99
+ 0 0 +18 113 76 0 110 43 97 120 ?1 18 43 74 0 108 42 113 121 ?1 29 120 93 0 113
+ 117 121 0 .04315959713348665 .0487938524157182 29 117 94 0 97 0 120 0 .05 .03 2
+9 121 92 0 43 120 52 0 .05 .0487938524157182 29 52 205 0 46 121 122 .05 .05 .03
+ 29 122 206 0 36 52 37 .05 .04315959713348665 .0487938524157182 18 36 15 0 114 2
+7 46 122 ?1 29 37 207 0 27 122 41 .05 .05 .0487938524157182 29 41 222 0 61 37 38
+ 0 .08 .08 18 61 82 0 57 21 0 41 ?1 18 21 80 0 24 97 61 8 ?1 17 24 54 56 55 21 4
+5 10 0 49 +17 114 123 88 115 36 110 109 0 85 -15 123 107 0 115 124 0 17 88 123 1
+08 114 27 125 86 0 70 +17 115 123 114 108 113 105 99 0 96 -17 85 111 110 51 36 7
+4 78 0 125 +17 74 69 50 125 46 85 78 0 0 -17 125 69 74 70 36 88 86 0 0 -17 70 69
+ 125 67 27 34 71 0 0 -17 34 126 32 35 11 70 71 0 67 +15 126 105 0 127 128 0 17 3
+2 126 127 34 42 26 33 0 31 +17 35 126 34 127 27 108 91 0 88 -17 127 126 35 32 43
+ 107 79 0 105 -17 108 123 115 88 43 35 91 0 127 +17 107 95 64 105 42 127 79 0 0
+ +17 64 95 62 107 61 31 76 0 56 +17 31 29 26 57 42 64 76 0 107 -14 128 106 129 ?
+68 124 126 5 130 +0 0 68 124 23 81 1 129 265 131 128 132 0 133 134 135 14 68 104
+ 134 ?73 128 29 5 19 +0 0 73 128 23 14 124 108 133 ?128 118 123 5 136 +0 0 128 1
+18 23 50 130 122 0 128 137 136 0 +.1 .05 .0487938524157182 0 -1 0 0 0 -1 13 23 1
+27 0 0 0 0 0 0 9 16 14 16 114 138 ?18 0 54 5 139 +0 0 18 0 23 81 1 138 257 131 1
+6 140 0 0 141 142 14 18 112 141 ?118 16 47 5 6 +0 0 118 16 23 50 139 126 0 16 14
+3 144 0 +.1 .08 .13 0 1 0 0 0 1 50 143 124 0 118 136 139 0 +.1 .05 .03 0 -.93969
+2620785909 -.342020143325667 0 .342020143325667 -.939692620785909 50 144 203 0 7
+3 139 19 0 +.05 0 0 1 0 0 0 0 -1 14 73 34 145 ?119 68 69 5 144 +0 0 119 68 23 50
+ 19 221 0 68 144 6 0 +.1 .05 .08 0 0 1 1 0 0 81 1 145 269 131 73 146 0 134 147 1
+48 14 119 56 147 ?0 73 95 5 137 -0 0 0 73 23 81 1 147 271 131 119 149 0 145 0 15
+0 50 137 84 0 119 0 130 0 +0 0 0 1 0 0 0 0 -1 80 1 131 0 151 8001 0 0 0 0 3 5 0
+ 0 FFFFTFTFFFFFF2 81 1 149 270 152 119 153 147 146 0 154 83 3 150 .5960784 .6666
+667 .6862745 80 1 152 155 156 8015 0 0 0 0 3 5 0 0 FFFFTFFFFFFFF2 81 3 153 253 1
+57 119 0 149 158 0 159 160 0 81 1 146 268 152 73 158 145 161 149 162 83 1 154 0
+ 81 3 158 252 157 73 0 146 163 153 164 165 0 81 1 161 266 152 68 163 134 132 146
+ 166 83 1 162 0 81 3 163 251 157 68 0 161 167 158 168 169 0 81 1 134 267 131 68
+ 161 0 129 145 170 81 1 132 264 152 128 167 129 171 161 172 83 1 166 0 81 3 167
+ 250 157 128 0 132 173 163 174 175 0 81 1 171 262 152 124 173 133 176 132 177 83
+ 1 172 0 81 3 173 249 157 124 0 171 178 167 179 180 0 81 1 133 263 131 124 171 0
+ 181 129 182 81 1 176 260 152 118 178 181 183 171 184 83 1 177 0 14 118 110 181
+ ?124 18 111 5 143 +0 0 124 18 23 81 3 178 248 157 118 0 176 185 173 186 187 0 8
+1 1 181 261 131 118 176 0 141 133 188 81 1 183 258 152 18 185 141 140 176 189 83
+ 1 184 0 81 3 185 247 157 18 0 183 190 178 191 192 0 81 1 141 259 131 18 183 0 1
+38 181 193 81 1 140 256 152 16 190 138 0 183 194 83 1 189 0 81 3 190 246 157 16
+ 0 140 0 185 195 196 0 83 1 194 0 80 3 157 197 198 9000 0 0 0 0 3 6 0 0 FFFFTFTT
+FFFFF1 1 3 82 1 195 0 82 1 196 33 79 27 198 MONIKER/MONIKER_DATA_ATTRIB83 3 193
+ .5960784 .6666667 .6862745 82 1 191 0 82 1 192 34 83 3 188 .5960784 .6666667 .6
+862745 82 1 186 0 82 1 187 35 83 3 182 .5960784 .6666667 .6862745 82 1 179 0 82
+ 1 180 36 82 1 174 0 82 1 175 37 83 3 170 .5960784 .6666667 .6862745 82 1 168 0
+ 82 1 169 38 82 1 164 0 82 1 165 39 82 1 159 0 82 1 160 40 79 21 156 SDL/TYSA_TR
+ANSLUCENCY79 15 151 SDL/TYSA_COLOUR83 3 148 .5960784 .6666667 .6862745 50 136 12
+3 0 124 130 143 0 +.1 .04315959713348665 .0487938524157182 0 0 1 1 0 0 83 3 142
+ .5960784 .6666667 .6862745 83 3 135 .5960784 .6666667 .6862745 81 1 104 160 199
+ 99 0 0 0 98 200 80 1 199 201 202 9000 1 1 1 1 1 1 1 1 FFFFTFTFFFFFF3 81 1 98 16
+1 199 94 0 0 104 0 203 84 32 200 dfe3b2be7980846b2094de7a37f1157b84 32 203 d6f39
+ed86e92ed0f6476d108d138062179 15 202 UGS/ObjectState19 17 128 0 1 0 9 5 S74 20 1
+5 9 0 98 204 147 205 206 153 13 2 149 0 0 0 0 0 0 0 0 0 0 0 81 1 204 179 207 1 0
+ 205 0 0 208 81 1 205 188 209 1 204 206 0 0 210 81 2 206 245 211 1 205 13 0 0 21
+2 213 81 3 13 254 214 1 206 2 0 0 215 216 217 80 3 214 157 218 9000 0 0 0 0 3 6
+ 0 0 FFTFFFFFFFFFF3 3 1 84 38 215 {7b249198-9198-4393-a762-f626205ff542}84 20 21
+6 NX 7.5.0.32-autoform82 1 217 0 79 25 218 MONIKER/GUID_TABLE_ATTRIB80 2 211 219
+ 220 8004 0 0 0 0 3 5 0 0 FFTFFFFFFFFFF2 3 83 1 212 7830.64 84 8 213 Kg/Cu M 79
+ 16 220 SDL/TYSA_DENSITY80 1 209 199 221 9000 0 0 0 0 3 5 0 0 FFTFFFFFFFFFF1 82
+ 1 210 129 79 24 221 UG2/BODY_COLOR_ATTRIBUTE80 1 207 222 223 9000 0 0 0 0 3 5 0
+ 0 FFTFFFFFFFFFF1 82 1 208 8 79 7 223 body_id80 2 12 214 224 9000 2 2 2 2 3 6 0
+ 0 FFTFFFFFFFFFF2 3 83 1 14 739 79 22 224 MONIKER/BODY_ID_ATTRIB1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/Hole CAD model.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/Hole CAD model.xmt_txt
new file mode 100644
index 0000000..dddecf6
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/Hole CAD model.xmt_txt	
@@ -0,0 +1,144 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=Intel x86;
+MC_MODEL=Level 6 Model 15 Stepping 6;
+MC_ID=ESD34;
+OS=Windows XP;
+OS_RELEASE=Build 2600 Service Pack 3.0;
+FRU=PRO/INTERFACE BY PTC, 2011220;
+APPL=PRO/ENGINEER BY PTC, 2011220;
+SITE=;
+USER=proe;
+FORMAT=text;
+GUISE=transmit;
+KEY=MM;
+FILE=mm.x_t;
+DATE=04-28-2014;
+**PART2;
+SCH=SCH_1000149_10004;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 100014917 SCH_1000149_100040 12
+ 1 147 5 7 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 38 207 37 80 41 205 81 79 13 2 SDL/TYS
+A_NAME80 1 3 0 2 8017 0 0 0 0 0 0 0 0 TTTTTTTTTTTTT3 84 2 4 MM81 1 5 1 3 1 0 0
+ 0 0 4 74 20 6 1 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 70 7 0 1 0 0 4 1 20
+ 4 6 6 1 T30 8 2 0 85 0 9 0 +0e0 0e0 0e0 1e0 0e0 0e0 30 9 3 0 87 8 10 0 +1e-1
+ 0e0 0e0 0e0 1e0 0e0 30 10 4 0 89 9 11 0 +1e-1 1e-1 0e0 -1e0 0e0 0e0 30 11 5 0
+ 91 10 12 0 +0e0 1e-1 0e0 0e0 -1e0 0e0 31 12 6 0 94 11 13 0 +
+8.06968665173469e-2 8.33252999679116e-2 0e0 0e0 0e0 -1e0 1e0 0e0 0e0 5e-3 31 13
+ 7 0 96 12 14 0 +8.06968665173469e-2 8.33252999679116e-2 0e0 0e0 0e0 -1e0 -1e0
+ 0e0 0e0 5e-3 31 14 8 0 99 13 15 0 +5.03056047451940e-2 4.98127734732133e-2 0e0
+ 0e0 0e0 -1e0 1e0 0e0 0e0 1.25e-2 31 15 9 0 101 14 16 0 +5.03056047451940e-2
+ 4.98127734732133e-2 0e0 0e0 0e0 -1e0 -1e0 0e0 0e0 1.25e-2 31 16 10 0 104 15 17
+ 0 +1.46574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0 -1e0 1e0 0e0 0e0 2.5e-3
+ 31 17 11 0 106 16 18 0 +1.46574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0
+ -1e0 -1e0 0e0 0e0 2.5e-3 30 18 12 0 112 17 19 0 +0e0 0e0 0e0 0e0 0e0 1e0 30 19
+ 13 0 122 18 20 0 +0e0 1e-1 0e0 0e0 0e0 1e0 30 20 14 0 131 19 21 0 +1e-1 1e-1
+ 0e0 0e0 0e0 1e0 30 21 15 0 116 20 22 0 +1e-1 0e0 0e0 0e0 0e0 1e0 30 22 16 0
+ 114 21 23 0 +0e0 0e0 2e-2 1e0 0e0 0e0 30 23 17 0 124 22 24 0 +0e0 1e-1 2e-2
+ 0e0 -1e0 0e0 30 24 18 0 133 23 25 0 +1e-1 1e-1 2e-2 -1e0 0e0 0e0 30 25 19 0
+ 141 24 26 0 +1e-1 0e0 2e-2 0e0 1e0 0e0 31 26 20 0 152 25 27 0 +
+8.06968665173469e-2 8.33252999679116e-2 2e-2 0e0 0e0 -1e0 1e0 0e0 0e0 5e-3 31
+ 27 21 0 154 26 28 0 +8.06968665173469e-2 8.33252999679116e-2 2e-2 0e0 0e0 -1e0
+ -1e0 0e0 0e0 5e-3 31 28 22 0 157 27 29 0 +5.03056047451940e-2
+ 4.98127734732133e-2 2e-2 0e0 0e0 -1e0 1e0 0e0 0e0 1.25e-2 31 29 23 0 159 28 30
+ 0 +5.03056047451940e-2 4.98127734732133e-2 2e-2 0e0 0e0 -1e0 -1e0 0e0 0e0
+ 1.25e-2 31 30 24 0 162 29 31 0 +1.46574760719119e-2 1.66288011598355e-2 2e-2
+ 0e0 0e0 -1e0 1e0 0e0 0e0 2.5e-3 31 31 25 0 164 30 32 0 +1.46574760719119e-2
+ 1.66288011598355e-2 2e-2 0e0 0e0 -1e0 -1e0 0e0 0e0 2.5e-3 30 32 26 0 170 31 33
+ 0 +8.56968665173469e-2 8.33252999679116e-2 0e0 0e0 0e0 1e0 30 33 27 0 173 32
+ 34 0 +7.56968665173469e-2 8.33252999679116e-2 0e0 0e0 0e0 1e0 30 34 28 0 186
+ 33 35 0 +6.28056047451940e-2 4.98127734732133e-2 0e0 0e0 0e0 1e0 30 35 29 0
+ 189 34 36 0 +3.78056047451940e-2 4.98127734732133e-2 0e0 0e0 0e0 1e0 30 36 30
+ 0 202 35 37 0 +1.71574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0 1e0 30 37
+ 31 0 205 36 0 0 +1.21574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0 1e0 13 38
+ 32 0 1 0 208 0 0 39 0 19 39 147 0 1 0 41 38 S13 40 33 0 0 0 0 0 0 41 208 19 41
+ 34 0 1 39 0 40 V29 42 35 0 43 0 44 8.56968665173469e-2 8.33252999679116e-2 0e0
+ 18 43 36 0 178 45 0 42 ?1 29 44 37 0 45 42 46 7.56968665173469e-2
+ 8.33252999679116e-2 0e0 18 45 38 0 179 47 43 44 ?1 29 46 39 0 47 44 48
+ 6.28056047451940e-2 4.98127734732133e-2 0e0 18 47 40 0 194 49 45 46 ?1 29 48
+ 41 0 49 46 50 3.78056047451940e-2 4.98127734732133e-2 0e0 18 49 42 0 195 51 47
+ 48 ?1 29 50 43 0 51 48 52 1.71574760719119e-2 1.66288011598355e-2 0e0 18 51 44
+ 0 210 53 49 50 ?1 29 52 45 0 53 50 54 1.21574760719119e-2 1.66288011598355e-2
+ 0e0 18 53 46 0 211 55 51 52 ?1 29 54 47 0 55 52 56 0e0 0e0 0e0 18 55 48 0 121
+ 57 53 54 ?1 29 56 49 0 57 54 58 1e-1 0e0 0e0 18 57 50 0 140 59 55 56 ?1 29 58
+ 51 0 59 56 60 1e-1 1e-1 0e0 18 59 52 0 139 61 57 58 ?1 29 60 53 0 61 58 62 0e0
+ 1e-1 0e0 18 61 54 0 130 63 59 60 ?1 29 62 55 0 63 60 64 8.56968665173469e-2
+ 8.33252999679116e-2 2e-2 18 63 56 0 181 65 61 62 ?1 29 64 57 0 65 62 66
+ 7.56968665173469e-2 8.33252999679116e-2 2e-2 18 65 58 0 180 67 63 64 ?1 29 66
+ 59 0 67 64 68 6.28056047451940e-2 4.98127734732133e-2 2e-2 18 67 60 0 197 69
+ 65 66 ?1 29 68 61 0 69 66 70 3.78056047451940e-2 4.98127734732133e-2 2e-2 18
+ 69 62 0 196 71 67 68 ?1 29 70 63 0 71 68 72 1.71574760719119e-2
+ 1.66288011598355e-2 2e-2 18 71 64 0 213 73 69 70 ?1 29 72 65 0 73 70 74
+ 1.21574760719119e-2 1.66288011598355e-2 2e-2 18 73 66 0 212 75 71 72 ?1 29 74
+ 67 0 75 72 76 0e0 0e0 2e-2 18 75 68 0 148 77 73 74 ?1 29 76 69 0 77 74 78 1e-1
+ 0e0 2e-2 18 77 70 0 147 79 75 76 ?1 29 78 71 0 79 76 80 1e-1 1e-1 2e-2 18 79
+ 72 0 150 81 77 78 ?1 29 80 73 0 81 78 0 0e0 1e-1 2e-2 18 81 74 0 149 0 79 80 ?
+1 50 82 75 0 83 0 108 0 +0e0 0e0 0e0 0e0 0e0 1e0 1e0 0e0 0e0 14 83 76 0 ?0 109
+ 103 38 82 -0 0 0 109 40 15 84 77 0 92 83 0 16 85 78 0 ?111 87 0 8 0 0 1 17 86
+ 84 92 88 55 111 85 0 0 -16 87 79 0 ?139 89 85 9 0 0 1 17 88 84 86 90 57 139 87
+ 0 0 -16 89 80 0 ?130 91 87 10 0 0 1 17 90 84 88 92 59 130 89 0 0 -16 91 81 0 ?
+121 94 89 11 0 0 1 17 92 84 90 86 61 121 91 0 0 -15 93 82 0 97 83 84 16 94 83 0
+ ?169 96 91 12 0 0 1 17 95 93 97 97 43 169 94 0 0 -16 96 84 0 ?178 99 94 13 0 0
+ 1 17 97 93 95 95 45 178 96 0 0 -15 98 85 0 102 83 93 16 99 86 0 ?185 101 96 14
+ 0 0 1 17 100 98 102 102 47 185 99 0 0 -16 101 87 0 ?194 104 99 15 0 0 1 17 102
+ 98 100 100 49 194 101 0 0 -15 103 88 0 107 83 98 16 104 89 0 ?201 106 101 16 0
+ 0 1 17 105 103 107 107 51 201 104 0 0 -16 106 90 0 ?210 112 104 17 0 0 1 17
+ 107 103 105 105 53 210 106 0 0 -50 108 91 0 109 82 118 0 +0e0 0e0 0e0 0e0 -1e0
+ 0e0 1e0 0e0 0e0 14 109 92 0 ?83 119 110 38 108 +0 0 83 119 40 15 110 93 0 117
+ 109 0 17 111 110 117 113 57 86 85 0 88 +16 112 94 0 ?126 114 106 18 0 0 1 17
+ 113 110 111 115 55 126 112 0 86 -16 114 95 0 ?147 116 112 22 0 0 1 17 115 110
+ 113 117 75 147 114 0 0 -16 116 96 0 ?117 122 114 21 0 0 1 17 117 110 115 111
+ 77 140 116 0 0 +50 118 97 0 119 108 127 0 +0e0 1e-1 0e0 -1e0 0e0 0e0 0e0 -1e0
+ 0e0 14 119 98 0 ?109 128 120 38 118 +0 0 109 128 40 15 120 99 0 126 119 0 17
+ 121 120 126 123 55 92 91 0 113 +16 122 100 0 ?135 124 116 19 0 0 1 17 123 120
+ 121 125 61 135 122 0 92 -16 124 101 0 ?148 131 122 23 0 0 1 17 125 120 123 126
+ 81 148 124 0 0 -17 126 120 125 121 75 113 112 0 115 +50 127 102 0 128 118 136
+ 0 +1e-1 1e-1 0e0 0e0 1e0 0e0 -1e0 0e0 0e0 14 128 103 0 ?119 137 129 38 127 +0
+ 0 119 137 40 15 129 104 0 135 128 0 17 130 129 135 132 61 90 89 0 123 +16 131
+ 105 0 ?143 133 124 20 0 0 1 17 132 129 130 134 59 143 131 0 90 -16 133 106 0 ?
+149 141 131 24 0 0 1 17 134 129 132 135 79 149 133 0 0 -17 135 129 134 130 81
+ 123 122 0 125 +50 136 107 0 137 127 144 0 +1e-1 0e0 0e0 1e0 0e0 0e0 0e0 1e0
+ 0e0 14 137 108 0 ?128 145 138 38 136 +0 0 128 145 40 15 138 109 0 143 137 0 17
+ 139 138 143 140 59 88 87 0 132 +17 140 138 139 142 57 117 116 0 111 -16 141
+ 110 0 ?150 152 133 25 0 0 1 17 142 138 140 143 77 150 141 0 117 -17 143 138
+ 142 139 79 132 131 0 134 +50 144 111 0 145 136 166 0 +0e0 0e0 2e-2 0e0 0e0 1e0
+ 1e0 0e0 0e0 14 145 112 0 ?137 167 161 38 144 +0 0 137 167 40 15 146 113 0 150
+ 145 0 17 147 146 150 148 77 115 114 0 142 +17 148 146 147 149 75 125 124 0 126
+ +17 149 146 148 150 81 134 133 0 135 +17 150 146 149 147 79 142 141 0 143 +15
+ 151 114 0 155 145 146 16 152 115 0 ?153 154 141 26 0 0 1 17 153 151 155 155 65
+ 172 152 0 0 +16 154 116 0 ?155 157 152 27 0 0 1 17 155 151 153 153 63 180 154
+ 0 0 +15 156 117 0 160 145 151 16 157 118 0 ?158 159 154 28 0 0 1 17 158 156
+ 160 160 69 188 157 0 0 +16 159 119 0 ?160 162 157 29 0 0 1 17 160 156 158 158
+ 67 196 159 0 0 +15 161 120 0 165 145 156 16 162 121 0 ?163 164 159 30 0 0 1 17
+ 163 161 165 165 73 204 162 0 0 +16 164 122 0 ?165 170 162 31 0 0 1 17 165 161
+ 163 163 71 212 164 0 0 +51 166 123 0 167 144 175 0 +8.06968665173469e-2
+ 8.33252999679116e-2 0e0 0e0 0e0 1e0 5e-3 1e0 0e0 0e0 14 167 124 0 ?145 176 168
+ 38 166 -0 0 145 176 40 15 168 125 0 174 167 0 17 169 168 174 171 45 95 94 0 97
+ +16 170 126 0 ?181 173 164 32 0 0 1 17 171 168 169 172 43 181 170 0 95 -17 172
+ 168 171 174 63 153 152 0 155 -16 173 127 0 ?174 186 170 33 0 0 1 17 174 168
+ 172 169 65 179 173 0 153 +51 175 128 0 176 166 182 0 +8.06968665173469e-2
+ 8.33252999679116e-2 0e0 0e0 0e0 1e0 5e-3 1e0 0e0 0e0 14 176 129 0 ?167 183 177
+ 38 175 -0 0 167 183 40 15 177 130 0 181 176 0 17 178 177 181 179 43 97 96 0
+ 171 +17 179 177 178 180 45 174 173 0 169 -17 180 177 179 181 65 155 154 0 174 -
+17 181 177 180 178 63 171 170 0 172 +51 182 131 0 183 175 191 0 +
+5.03056047451940e-2 4.98127734732133e-2 0e0 0e0 0e0 1e0 1.25e-2 1e0 0e0 0e0 14
+ 183 132 0 ?176 192 184 38 182 -0 0 176 192 40 15 184 133 0 190 183 0 17 185
+ 184 190 187 49 100 99 0 102 +16 186 134 0 ?197 189 173 34 0 0 1 17 187 184 185
+ 188 47 197 186 0 100 -17 188 184 187 190 67 158 157 0 160 -16 189 135 0 ?190
+ 202 186 35 0 0 1 17 190 184 188 185 69 195 189 0 158 +51 191 136 0 192 182 198
+ 0 +5.03056047451940e-2 4.98127734732133e-2 0e0 0e0 0e0 1e0 1.25e-2 1e0 0e0 0e0
+ 14 192 137 0 ?183 199 193 38 191 -0 0 183 199 40 15 193 138 0 197 192 0 17 194
+ 193 197 195 47 102 101 0 187 +17 195 193 194 196 49 190 189 0 185 -17 196 193
+ 195 197 69 160 159 0 190 -17 197 193 196 194 67 187 186 0 188 +51 198 139 0
+ 199 191 207 0 +1.46574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0 1e0 2.5e-3
+ 1e0 0e0 0e0 14 199 140 0 ?192 208 200 38 198 -0 0 192 208 40 15 200 141 0 206
+ 199 0 17 201 200 206 203 53 105 104 0 107 +16 202 142 0 ?213 205 189 36 0 0 1
+ 17 203 200 201 204 51 213 202 0 105 -17 204 200 203 206 71 163 162 0 165 -16
+ 205 143 0 ?206 0 202 37 0 0 1 17 206 200 204 201 73 211 205 0 163 +51 207 144
+ 0 208 198 0 0 +1.46574760719119e-2 1.66288011598355e-2 0e0 0e0 0e0 1e0 2.5e-3
+ 1e0 0e0 0e0 14 208 145 0 ?199 0 209 38 207 -0 0 199 0 40 15 209 146 0 213 208
+ 0 17 210 209 213 211 51 107 106 0 203 +17 211 209 210 212 53 206 205 0 201 -17
+ 212 209 211 213 73 165 164 0 206 -17 213 209 212 210 71 203 202 0 204 +1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/Work-piece.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/Work-piece.xmt_txt
new file mode 100644
index 0000000..a2721a7
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/Work-piece.xmt_txt
@@ -0,0 +1,89 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=x64/Windows NT;
+MC_MODEL=genuineintel family 6 model 10 stepping 7, intel(r) core(tm) i5-2500 cpu @ 3.30ghz;
+MC_ID=sd18;
+OS=windows nt (x64);
+OS_RELEASE=6.1 (workstation) (build 7601: service pack 1) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=vidya;
+FORMAT=text;
+GUISE=transmit;
+KEY=Work-piece;
+FILE=D:\Nagaraj\Work-piece.x_t;
+DATE=5-may-2014;
+**PART2;
+SCH=SCH_2500176_25001;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 250017617 SCH_1000000_100040 12
+ 1 102 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 1 2 102 11 1 12 0 0
+ 0 13 70 3 0 1 0 0 4 5 20 8 14 14 1 T13 4 3 0 1 0 15 0 0 16 0 50 5 54 0 15 17 0
+ 0 +.05 .025 .03 0 0 1 1 0 0 30 6 62 0 9 18 0 0 +.05 0 .03 -1 0 0 29 7 58 0 10 1
+9 0 0 0 .03 19 8 1 0 1 16 0 20 V16 9 34 21 ?22 0 23 6 0 0 1 18 10 23 0 22 0 24 7
+ ?1 17 22 25 26 27 10 28 9 0 29 +18 24 21 0 30 10 31 19 ?1 17 30 32 33 34 24 29
+ 23 0 35 +18 31 19 0 36 24 37 38 ?1 29 19 57 0 24 38 7 0 .05 .03 29 38 56 0 31 3
+9 19 .1 .05 .03 29 39 55 0 37 40 38 .1 0 .03 18 37 17 0 28 31 41 39 ?1 29 40 41
+ 0 42 43 39 0 0 0 18 42 11 0 26 44 45 40 ?1 29 43 40 0 44 46 40 0 .05 0 18 44 13
+ 0 33 41 42 43 ?1 29 46 39 0 41 47 43 .1 .05 0 18 41 15 0 48 37 44 46 ?1 29 47 3
+8 0 45 0 46 .1 0 0 18 45 10 0 49 42 0 47 ?1 17 49 50 51 52 45 27 53 0 54 -15 50
+ 7 0 51 55 0 17 51 50 56 49 41 57 58 0 0 +17 52 50 49 56 37 59 60 0 27 +17 27 25
+ 22 54 37 49 53 0 0 +16 53 18 61 ?27 62 58 63 0 0 1 17 54 25 27 26 45 64 65 0 57
+ +15 25 32 0 27 66 0 17 26 25 54 22 42 34 67 0 68 -17 64 69 70 57 42 54 65 0 0 -
+16 65 12 71 ?54 72 0 73 0 0 1 17 57 69 64 74 45 51 58 0 0 -15 69 8 0 57 75 0 17
+ 74 69 57 70 41 76 77 0 51 -16 58 6 78 ?51 53 77 79 0 0 1 81 1 78 78 80 58 0 0 8
+1 82 83 16 77 16 81 ?76 58 72 84 0 0 1 30 79 43 0 58 73 84 0 +.1 .025 0 0 1 0 30
+ 73 42 0 65 0 79 0 +.05 0 0 1 0 0 30 84 44 0 77 79 85 0 +.05 .05 0 -1 0 0 30 85
+ 45 0 72 84 63 0 +0 .025 0 0 -1 0 16 72 14 86 ?68 77 65 85 0 0 1 30 63 50 0 53 8
+5 87 0 +.1 0 0 0 0 1 30 87 51 0 62 63 88 0 +.1 .05 0 0 0 1 16 62 20 89 ?56 90 53
+ 87 0 0 1 30 88 52 0 90 87 91 0 +0 .05 0 0 0 1 16 90 22 82 ?92 67 62 88 0 0 1 30
+ 91 53 0 67 88 93 0 +0 0 0 0 0 1 16 67 24 94 ?34 60 90 91 0 0 1 30 93 59 0 60 91
+ 95 0 +.1 .025 .03 0 -1 0 16 60 25 96 ?52 97 67 93 0 0 1 30 95 60 0 97 93 18 0 +
+.05 .05 .03 1 0 0 16 97 28 98 ?36 23 60 95 0 0 1 30 18 61 0 23 95 6 0 +0 .025 .0
+3 0 1 0 16 23 31 99 ?30 9 97 18 0 0 1 81 1 99 84 80 23 0 0 89 71 100 80 1 80 101
+ 102 9000 1 1 1 1 1 1 1 1 FFFFTFTFFFFFF3 81 1 89 83 80 62 0 0 98 99 103 81 1 71
+ 85 80 65 0 0 99 21 104 84 32 100 b3e176798a64c003d06a1daf2560170e81 1 21 86 80
+ 9 0 0 71 61 105 84 32 104 5e82305112631e598650ae6f761eba7081 1 61 87 80 53 0 0
+ 21 94 106 84 32 105 7c0c43a55f92d02da1c1f7aee9720e7c81 1 94 88 80 67 0 0 61 107
+ 108 84 32 106 ca4166a04cdf962d1bbe29f1ab6f791481 1 107 89 80 109 0 110 94 111 1
+12 84 32 108 2c9a0e51b8e8abc35e3c24d3fcb91d3e14 109 30 110 ?113 66 32 4 114 +0 0
+ 113 66 20 81 1 110 98 115 109 107 0 116 117 118 81 1 111 90 80 66 0 116 107 119
+ 120 84 32 112 bdf418584b357e312d4410f3aa1e4a1014 66 33 116 ?109 15 25 4 17 +0 0
+ 109 15 20 81 1 116 97 115 66 111 0 121 110 122 81 1 119 91 80 75 0 123 111 124
+ 125 84 32 120 4577b9a056de698a68074130fb194ec014 75 9 123 ?55 113 69 4 126 +0 0
+ 55 113 20 81 1 123 100 115 75 119 0 117 127 128 81 1 124 92 80 15 0 121 119 129
+ 130 84 32 125 dac4607536c2902009afd8d63fbd66a214 15 36 121 ?66 0 131 4 5 +0 0 6
+6 0 20 81 1 121 96 115 15 124 0 0 116 132 81 1 129 93 80 55 0 127 124 133 134 84
+ 32 130 b7b7b09a698243ad822888415127cca214 55 2 127 ?0 75 50 4 135 +0 0 0 75 20
+ 81 1 127 101 115 55 129 0 123 0 136 81 1 133 94 80 113 0 117 129 0 137 84 32 13
+4 e9a529f680e580b77152ba4ef40812a214 113 27 117 ?75 109 138 4 139 +0 0 75 109 20
+ 81 1 117 99 115 113 133 0 110 123 140 84 32 137 49ac27d514ef1276ed679f8cfc08f9e
+080 1 115 0 141 8001 0 0 0 0 3 5 0 0 FFFFTFTFFFFFF2 83 3 140 .5960784 .6666667 .
+6862745 79 15 141 SDL/TYSA_COLOUR15 138 26 0 92 113 0 50 139 47 0 113 135 114 0
+ +.05 .05 0 0 1 0 0 0 1 13 20 4 0 0 0 0 0 0 8 15 50 135 46 0 55 126 139 0 +.1 .0
+25 0 1 0 0 0 0 -1 50 114 48 0 109 139 17 0 +0 .025 0 -1 0 0 0 0 1 50 17 49 0 66
+ 114 5 0 +.05 0 0 0 -1 0 0 0 -1 50 126 37 0 75 0 135 0 +.05 .025 0 0 0 -1 -1 0 0
+ 17 92 138 36 76 24 33 90 0 0 +17 36 138 48 92 31 35 97 0 59 +17 76 138 92 48 44
+ 74 77 0 70 +17 33 32 68 30 44 92 90 0 76 -15 32 29 0 34 109 0 17 68 32 34 33 42
+ 70 72 0 64 +17 34 32 30 68 10 26 67 0 0 +17 70 69 74 64 44 68 72 0 0 -17 48 138
+ 76 36 41 56 62 0 74 -17 56 50 52 51 31 48 62 0 0 +17 35 131 29 59 24 36 97 0 92
+ -17 59 131 35 28 31 52 60 0 56 -15 131 35 0 28 15 0 17 28 131 59 29 37 22 9 0 5
+2 -17 29 131 28 35 10 30 23 0 34 -83 3 136 .5960784 .6666667 .6862745 83 3 132 .
+5960784 .6666667 .6862745 83 3 128 .5960784 .6666667 .6862745 83 3 122 .5960784
+ .6666667 .6862745 83 3 118 .5960784 .6666667 .6862745 81 1 98 82 80 97 0 0 86 8
+9 142 84 32 103 270a36d445afaef74a9ae4eaf274d92281 1 86 81 80 72 0 0 96 98 143 8
+4 32 142 bd3f7dbfa3ca83c85d70ef9fe0f4036a81 1 96 80 80 60 0 0 82 86 144 84 32 14
+3 326a2a1507bafad60026cd7807d7f3c781 1 82 79 80 90 0 0 78 96 145 84 32 144 b1b94
+00b3e0afa0d0d51f70356f7661c84 32 145 41e196f387bc2b59200f3db47e1f9abf79 15 102 U
+GS/ObjectState81 1 81 77 80 77 0 0 0 78 146 84 32 146 7df4dc8ac6b6a895f798ceb877
+1998a884 32 83 e6c02811a7007b9122032fe2b28f662919 16 5 0 1 0 8 4 S74 20 14 5 0 1
+47 133 12 127 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 2 147 76 148 1 0 12 0 0 149 150
+ 81 1 12 95 101 1 147 2 0 0 151 80 1 101 152 153 9000 0 0 0 0 3 5 0 0 FFTFFFFFFF
+FFF1 82 1 151 9 79 7 153 body_id80 2 148 154 155 8004 0 0 0 0 3 5 0 0 FFTFFFFFFF
+FFF2 3 83 1 149 7830.64 84 8 150 Kg/Cu M 79 16 155 SDL/TYSA_DENSITY80 1 11 156 1
+57 9000 0 0 0 0 3 5 0 0 FFTFFFFFFFFFF1 82 1 13 129 79 24 157 UG2/BODY_COLOR_ATTR
+IBUTE1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/blend1.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/blend1.xmt_txt
new file mode 100644
index 0000000..7de6535
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/blend1.xmt_txt
@@ -0,0 +1,120 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=SDLINT105;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows NT;
+OS_RELEASE=5.0;
+FRU=Unigraphics Solutions;
+APPL=SolidEdge;
+SITE=Huntsville, AL;
+USER=chopra
+FORMAT=text;
+GUISE=transmit;
+KEY=C:\Program Files\Parasolid\Example Application\Example Parts\blend1;
+FILE=C:\Program Files\Parasolid\Example Application\Example Parts\blend1.x_t;
+DATE=Fri, May 31 02;
+**PART2;
+SCH=SCH_1400104_14000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 140010423 SCH_1400104_14000_1300
+6185 0 12 255 1 234 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 255 3 2
+ 229 11 1 12 0 0 0 13 14 15 70 11 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDC
+CDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ3 0 4 T1 0 0 7 20 1 16 16 13 2
+55 4 3 0 1 0 17 0 0 18 0 50 255 5 83 0 19 20 0 0 +-.05 0 .05 0 1 0 0 0 1 31 255
+ 6 199 0 9 21 0 0 --.05 .01 .04 1 -1850371707708595e-31 0 1850371707708595e-31 1
+ 0 .01 29 255 7 190 0 10 22 0 -.05 0 .04 19 255 8 33 0 1 18 0 23 V16 255 9 197 0
+ ?24 0 25 6 0 0 1 18 255 10 188 0 26 0 27 7 ?1 17 255 26 0 28 29 30 10 31 25 0 3
+2 +18 27 179 0 33 10 34 22 ?1 17 33 0 35 36 37 27 38 39 0 30 +18 34 170 0 38 27
+ 40 41 ?1 29 22 181 0 27 41 7 .05 0 .04 29 41 172 0 34 42 22 .05 .01 .05 29 42 1
+69 0 40 43 41 -.05 .01 .05 18 40 167 0 24 34 44 42 ?1 29 43 20 0 44 45 42 -.05 .
+075 .05 18 44 17 0 46 40 47 43 ?1 29 45 14 0 47 48 43 .05 .075 .05 18 47 11 0 49
+ 44 50 45 ?1 29 48 62 0 50 51 45 -.05 .075 0 18 50 48 0 52 47 53 48 ?1 29 51 63
+ 0 53 54 48 .05 .075 0 18 53 49 0 55 50 56 51 ?1 29 54 64 0 56 57 51 .05 0 0 18
+ 56 50 0 36 53 58 54 ?1 29 57 65 0 58 0 54 -.05 0 0 18 58 47 0 29 56 0 57 ?1 17
+ 29 0 28 59 26 58 32 60 0 61 +15 255 28 71 0 30 19 0 17 59 0 28 30 29 56 62 63 0
+ 0 +17 32 0 64 24 61 10 29 60 0 65 -16 60 189 0 ?29 66 67 68 0 0 1 17 61 0 64 32
+ 52 58 69 70 0 62 +15 64 74 0 32 71 0 17 52 0 64 61 72 50 46 73 0 69 +17 69 0 74
+ 75 62 50 61 70 0 76 -16 70 38 77 ?61 63 78 79 0 0 1 17 62 0 74 69 80 58 59 63 0
+ 0 -15 74 54 0 69 81 0 17 80 0 74 62 75 56 82 83 0 59 -16 63 41 84 ?59 83 70 85
+ 0 0 1 81 1 84 42 86 63 87 0 77 88 89 16 83 44 88 ?82 90 63 91 0 0 1 30 255 85 6
+1 0 63 92 91 0 +-.05 0 0 1 0 0 31 92 153 0 78 93 85 0 +487620910533078e-32 .0256
+3716814159295 .084925 0 0 -1 1 -612303176911189e-31 0 .01125174714289824 30 91 6
+0 0 83 85 94 0 +.05 0 0 -1850371707708595e-31 1 0 30 94 59 0 90 91 79 0 +.05 .07
+5 0 -1 0 0 16 90 35 95 ?76 96 83 94 0 0 1 30 79 58 0 70 94 97 0 +-.05 .075 0 -18
+50371707708595e-31 -1 0 30 97 13 0 98 79 99 0 +.05 0 .05 -1850371707708595e-31 1
+ 0 16 98 171 0 ?49 100 96 97 0 0 1 30 99 19 0 100 97 101 0 +.05 .075 .05 -1 0 0
+ 16 100 18 0 ?102 73 98 99 0 0 1 30 101 24 0 96 99 103 0 +-.05 .075 .05 -1850371
+707708595e-31 -1 0 16 96 23 0 ?104 98 90 101 0 0 1 30 103 76 0 73 101 105 0 +-.0
+5 .075 .05 0 0 -1 16 73 66 0 ?52 106 100 103 0 0 1 30 105 77 0 106 103 107 0 +.0
+5 .075 .05 0 0 -1 16 106 67 0 ?55 67 73 105 0 0 1 30 107 78 0 67 105 68 0 +.05 0
+ .05 0 0 -1 16 67 180 0 ?36 60 106 107 0 0 1 30 68 79 0 60 107 108 0 +-.05 0 .05
+ 0 0 -1 30 108 175 0 66 68 109 0 +.05 .01 .05 1 0 0 16 66 173 0 ?110 39 60 108 0
+ 0 1 31 109 184 0 39 108 21 0 -.05 .01 .04 -1 -1850371707708595e-31 0 1850371707
+708595e-31 -1 0 .01 16 39 182 0 ?33 25 66 109 0 0 1 30 21 193 0 25 109 6 0 --.05
+ 0 .04 1 0 0 16 25 191 0 ?26 9 39 21 0 0 1 17 110 0 111 49 104 34 112 66 0 37 +1
+5 111 25 0 104 17 113 17 49 0 111 102 110 47 37 98 0 114 +17 104 0 111 110 102 4
+0 72 96 0 112 +17 112 0 115 65 38 40 110 66 0 0 -17 37 0 35 33 114 34 49 98 0 0
+ -15 35 68 0 37 116 0 17 114 0 35 37 82 47 55 106 0 117 -17 82 0 35 114 36 53 80
+ 83 0 0 +17 55 0 118 76 117 53 114 106 0 75 +17 117 0 118 55 46 47 102 100 0 0 -
+15 118 30 0 117 119 0 17 46 0 118 117 76 44 52 73 0 72 -17 102 0 111 104 49 44 1
+17 100 0 0 +17 76 0 118 46 55 50 75 90 0 0 +17 72 0 64 52 24 44 104 96 0 102 -17
+ 24 0 64 72 32 40 65 9 0 104 +17 65 0 115 31 112 10 24 9 0 0 -15 115 210 0 65 12
+0 0 17 31 0 115 38 65 27 26 25 0 0 -17 38 0 115 112 31 34 33 39 0 110 -14 255 12
+0 209 121 ?0 122 115 4 123 +0 0 0 124 23 81 1 121 234 125 120 126 0 127 0 0 14 1
+22 138 128 ?120 124 129 4 130 -0 0 124 81 23 51 255 123 221 0 120 0 130 0 +-.05
+ .01 .04 -1 0 0 .01 0 0 1 14 124 131 131 ?122 81 132 4 133 +0 0 120 122 23 13 23
+ 32 0 0 0 0 0 0 8 17 14 17 26 134 ?71 0 111 4 135 +0 0 71 0 23 81 1 134 230 125
+ 17 136 0 128 137 0 14 71 75 137 ?19 17 64 4 138 -0 0 19 17 23 50 135 29 0 17 13
+9 138 0 +-.05 0 .05 0 0 1 1 0 0 50 139 57 0 81 133 135 0 +-.05 0 0 0 0 1 1 0 0 5
+0 138 80 0 71 135 140 0 +-.05 .075 .05 1 -1850371707708595e-31 0 185037170770859
+5e-31 1 0 50 140 81 0 119 138 20 0 +.05 .075 .05 0 -1 0 0 0 -1 14 119 31 141 ?81
+ 116 118 4 140 -0 0 81 116 23 50 20 82 0 116 140 5 0 +.05 0 .05 -1 -185037170770
+8595e-31 0 1850371707708595e-31 -1 0 14 116 69 127 ?119 19 35 4 20 -0 0 119 19 2
+3 81 1 127 233 125 116 142 0 143 121 0 14 19 72 143 ?116 71 28 4 5 -0 0 116 71 2
+3 81 1 143 232 125 19 144 0 137 127 0 80 255 1 125 145 146 9000 1 1 1 1 1 1 1 1
+ 0 FFFFTFTTFFFFFF1 81 1 144 105 147 19 148 143 142 149 150 81 1 137 231 125 71 1
+51 0 134 143 0 81 1 151 93 147 71 152 137 153 154 155 80 1 147 156 157 9000 0 0
+ 0 0 3 6 0 0 0 FFFFTFFFFFFFFF1 81 3 152 90 158 71 0 151 159 160 161 162 0 81 1 1
+53 89 147 81 159 163 0 151 164 81 1 154 97 147 119 160 141 151 142 165 82 255 1
+ 155 320 81 3 160 94 158 119 0 154 152 166 167 168 0 81 1 141 116 125 119 154 0
+ 0 163 0 81 1 142 101 147 116 166 127 154 144 169 82 1 165 320 81 3 166 98 158 1
+16 0 142 160 148 170 171 0 82 1 169 320 80 3 158 172 173 9000 0 0 0 0 3 6 0 0 0
+ FFFFTFTTFFFFFF1 1 3 81 3 148 102 158 19 0 144 166 136 174 175 0 82 1 170 0 82 1
+ 171 4 81 3 136 125 158 17 149 134 148 176 177 178 0 82 1 174 0 82 1 175 5 81 1
+ 149 124 147 17 0 136 144 179 180 81 3 176 135 158 124 0 179 136 181 182 183 0 8
+2 1 177 0 82 1 178 0 81 1 179 132 147 124 176 131 149 184 185 81 3 181 141 158 1
+22 0 184 176 186 187 188 0 82 1 182 0 82 1 183 8 81 1 184 139 147 122 181 128 17
+9 126 189 81 3 186 227 158 120 0 126 181 0 190 191 0 82 1 187 0 82 1 188 6 81 1
+ 126 228 147 120 186 121 184 0 192 82 1 190 0 82 1 191 9 82 1 192 478 81 1 128 1
+64 125 122 184 0 131 134 0 82 1 189 468 81 1 131 163 125 124 179 0 163 128 0 81
+ 1 163 118 125 81 153 0 141 131 0 14 81 53 163 ?124 119 74 4 139 -0 0 122 119 23
+ 82 1 185 468 82 1 180 320 79 255 27 173 MONIKER/MONIKER_DATA_ATTRIB82 1 167 0 8
+2 1 168 3 81 3 159 87 158 81 0 153 0 152 193 194 0 82 1 164 320 82 1 193 0 82 1
+ 194 1 82 1 161 0 82 1 162 2 79 23 157 SolidEdge/MNKR_ATTR_CID82 1 150 320 79 17
+ 146 SolidEdge/Display51 133 150 0 124 130 139 0 +487620910533078e-32 .025637168
+14159295 .084925 0 0 -1 .01125174714289824 -1 0 0 50 130 151 0 122 123 133 0 +48
+7620910533078e-32 .02563716814159295 .084925 0 0 -1 -1 0 0 15 132 136 0 195 124
+ 196 17 195 0 132 195 195 0 197 78 0 0 +15 196 137 0 198 124 0 17 198 0 196 198
+ 198 0 199 200 0 0 -17 199 0 113 199 199 0 198 200 0 0 +16 200 128 201 ?199 78 0
+ 93 0 0 1 81 1 201 129 86 200 202 0 88 0 203 16 78 127 0 ?195 70 200 92 0 0 1 31
+ 93 154 0 200 0 92 0 +487620910533078e-32 .02563716814159295 .05 0 0 -1 1 -61230
+3176911189e-31 0 .01125174714289824 80 1 86 204 205 9000 0 0 0 0 3 6 0 0 0 FFFFT
+FTFFFFFFF1 81 1 202 130 145 200 0 201 206 0 207 81 1 88 45 86 83 206 0 84 201 20
+8 82 1 203 387 81 1 206 46 145 83 0 88 87 202 209 82 1 208 98 80 1 145 210 211 9
+000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 81 1 87 43 145 63 0 84 212 206 213 82 1 20
+9 17 81 1 212 40 145 70 0 77 214 87 215 82 1 213 17 81 1 77 39 86 70 212 0 95 84
+ 216 81 1 214 37 145 90 0 95 0 212 217 82 1 215 17 81 1 95 36 86 90 214 0 0 77 2
+18 82 1 217 17 82 1 218 99 82 1 216 100 79 27 211 SolidEdge/MNKR_ATTR_TYPE_EX82
+ 1 207 17 79 23 205 SolidEdge/MNKR_ATTR_SID15 113 121 0 199 17 0 17 197 0 129 19
+7 197 0 195 78 0 0 -15 129 142 0 197 122 0 17 75 0 74 80 69 53 76 90 0 82 -17 36
+ 0 35 82 33 56 30 67 0 80 +17 30 0 28 26 59 27 36 67 0 31 -82 1 89 97 19 18 1 0
+ 1 0 8 4 S74 255 20 16 7 0 202 201 186 126 121 12 2 0 0 0 0 0 0 0 0 0 0 0 0 0 81
+ 2 12 119 219 1 0 2 0 0 220 221 80 2 219 11 222 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFF
+FFFFF2 3 83 255 1 220 320 84 255 6 221 SE 5.079 22 222 MONIKER/BODY_ID_ATTRIB80
+ 3 11 158 223 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 84 38 13 {53a85994-bac5
+-11d2-a151-0060b0c3f267}84 2 14 SE82 1 15 0 79 25 223 MONIKER/GUID_TABLE_ATTRIB1
+ 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/blend2.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/blend2.xmt_txt
new file mode 100644
index 0000000..df2e750
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/blend2.xmt_txt
@@ -0,0 +1,109 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=SDLINT105;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows NT;
+OS_RELEASE=5.0;
+FRU=Unigraphics Solutions;
+APPL=SolidEdge;
+SITE=Huntsville, AL;
+USER=chopra
+FORMAT=text;
+GUISE=transmit;
+KEY=C:\Program Files\Parasolid\Example Application\Example Parts\blend2;
+FILE=C:\Program Files\Parasolid\Example Application\Example Parts\blend2.x_t;
+DATE=Fri, May 31 02;
+**PART2;
+SCH=SCH_1400104_14000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 140010423 SCH_1400104_14000_1300
+6185 0 12 255 1 160 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 255 3 2
+ 157 11 1 12 0 0 0 13 14 15 70 11 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDC
+CDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ3 0 4 T1 0 0 8 20 1 16 16 13 2
+55 4 3 0 1 0 17 0 0 18 0 50 255 5 83 0 19 20 0 0 +-.05 0 .05 612303176911189e-31
+ 1 0 -1 612303176911189e-31 0 30 255 6 79 0 9 21 0 0 +-.05 0 .05 0 0 -1 29 255 7
+ 20 0 10 22 0 -.05 .075 .05 19 255 8 33 0 1 18 0 23 V16 255 9 73 0 ?24 0 25 6 0
+ 0 1 18 255 10 17 0 26 0 27 7 ?1 17 255 26 0 28 29 30 10 31 32 0 33 -18 27 11 0
+ 34 10 35 22 ?1 17 34 0 36 37 38 27 39 40 0 29 -18 35 5 0 41 27 42 43 ?1 29 22 1
+4 0 27 43 7 .05 .075 .05 29 43 8 0 35 44 22 .05 -612303176911189e-32 .05 29 44 4
+ 0 42 45 43 -.05 0 .05 18 42 2 0 46 35 47 44 ?1 29 45 62 0 47 48 44 -.05 .075 0
+ 18 47 48 0 31 42 49 45 ?1 29 48 63 0 49 50 45 .05 .075 0 18 49 49 0 39 47 51 48
+ ?1 29 50 64 0 51 52 48 .05 -612303176911189e-32 0 18 51 50 0 53 49 54 50 ?1 29
+ 52 65 0 54 0 50 -.05 0 0 18 54 47 0 24 51 0 52 ?1 17 24 0 55 56 57 54 46 9 0 58
+ +15 255 55 71 0 41 19 0 17 56 0 55 41 24 51 59 60 0 0 +17 57 0 55 24 41 42 61 6
+2 0 0 -17 46 0 63 33 58 42 24 9 0 64 -17 58 0 63 46 31 54 65 66 0 59 +15 63 74 0
+ 46 17 0 17 31 0 63 58 33 47 26 32 0 65 +17 65 0 67 68 59 47 58 66 0 30 -16 66 3
+8 69 ?58 60 70 71 0 0 1 17 59 0 67 65 72 54 56 60 0 0 -15 67 54 0 65 73 0 17 72
+ 0 67 59 68 51 38 74 0 56 -16 60 41 75 ?56 74 66 76 0 0 1 81 1 75 42 77 60 78 0
+ 69 79 80 16 74 44 79 ?38 81 60 82 0 0 1 30 76 61 0 60 83 82 0 +-.05 0 0 1 -6123
+03176911189e-31 0 31 255 83 155 0 70 84 76 0 +487620910533078e-32 .0256371681415
+9295 .084925 0 0 -1 1 -612303176911189e-31 0 .01125174714289824 30 82 60 0 74 76
+ 85 0 +.05 -612303176911189e-32 0 1850371707708595e-31 1 0 30 85 59 0 81 82 71 0
+ +.05 .075 0 -1 0 0 16 81 35 86 ?30 87 74 85 0 0 1 30 71 58 0 66 85 88 0 +-.05 .
+075 0 0 -1 0 30 88 7 0 62 71 89 0 +-.05 0 .05 1 -612303176911189e-31 0 16 62 6 0
+ ?61 90 87 88 0 0 1 30 89 13 0 90 88 91 0 +.05 -612303176911189e-32 .05 18503717
+07708595e-31 1 0 16 90 12 0 ?92 93 62 89 0 0 1 30 91 19 0 93 89 94 0 +.05 .075 .
+05 -1 0 0 16 93 18 0 ?95 32 90 91 0 0 1 30 94 24 0 87 91 96 0 +-.05 .075 .05 0 -
+1 0 16 87 23 0 ?64 62 81 94 0 0 1 30 96 76 0 32 94 97 0 +-.05 .075 .05 0 0 -1 16
+ 32 66 0 ?31 40 93 96 0 0 1 30 97 77 0 40 96 21 0 +.05 .075 .05 0 0 -1 16 40 67
+ 0 ?39 25 32 97 0 0 1 30 21 78 0 25 97 6 0 +.05 -612303176911189e-32 .05 0 0 -1
+ 16 25 70 0 ?53 9 40 21 0 0 1 17 53 0 36 38 37 51 41 25 0 72 +15 36 68 0 34 98 0
+ 17 38 0 36 34 53 49 72 74 0 0 +17 37 0 36 53 34 35 92 90 0 61 -17 41 0 55 57 56
+ 35 53 25 0 37 -17 92 0 99 95 61 27 37 90 0 0 +17 61 0 99 92 64 35 57 62 0 0 +15
+ 99 25 0 64 100 0 17 64 0 99 61 95 42 33 87 0 57 +17 95 0 99 64 92 10 29 93 0 0
+ +17 33 0 63 31 46 10 64 87 0 95 -17 29 0 28 39 26 27 95 93 0 92 -15 28 30 0 29
+ 101 0 17 39 0 28 30 29 49 34 40 0 68 +17 30 0 28 26 39 47 68 81 0 0 +17 68 0 67
+ 72 65 49 30 81 0 38 -14 255 101 31 102 ?100 98 28 4 103 -0 0 73 100 23 81 1 102
+ 117 104 101 105 0 106 107 0 14 100 26 108 ?73 101 109 4 110 -0 0 101 98 23 14 9
+8 69 106 ?101 19 36 4 20 -0 0 100 19 23 50 103 81 0 101 111 20 0 +.05 .075 .05 0
+ -1 0 0 0 -1 14 73 53 107 ?112 100 67 4 113 +0 0 112 101 23 13 23 32 0 0 0 0 0 0
+ 8 17 14 17 75 114 ?19 0 63 4 111 -0 0 19 0 23 81 1 114 114 104 17 115 0 0 116 0
+ 14 19 72 116 ?98 17 55 4 5 -0 0 98 17 23 50 111 80 0 17 110 103 0 +-.05 .075 .0
+5 1 0 0 0 0 -1 50 110 29 0 100 113 111 0 +-.05 .075 .05 0 0 -1 -1 0 0 50 113 57
+ 0 73 117 110 0 +-.05 .075 0 0 0 -1 -1 0 0 51 255 117 152 0 112 118 113 0 +48762
+0910533078e-32 .02563716814159295 .084925 0 0 -1 .01125174714289824 -1 0 0 14 11
+2 133 119 ?120 73 121 4 117 +0 0 120 73 23 50 118 153 0 120 0 117 0 +48762091053
+3078e-32 .02563716814159295 .084925 0 0 -1 -1 0 0 14 120 140 122 ?0 112 123 4 11
+8 -0 0 0 112 23 81 1 122 160 104 120 124 0 119 0 0 15 123 144 0 125 120 0 17 125
+ 0 123 125 125 0 126 70 0 0 -17 126 0 121 126 126 0 125 70 0 0 +16 70 129 0 ?126
+ 66 127 83 0 0 1 16 127 130 128 ?129 70 0 84 0 0 1 81 1 128 131 130 127 131 0 0
+ 0 132 17 129 0 109 129 129 0 133 127 0 0 +31 84 156 0 127 0 83 0 +4876209105330
+78e-32 .02563716814159295 .05 0 0 -1 1 -612303176911189e-31 0 .01125174714289824
+ 15 109 122 0 129 100 99 17 133 0 134 133 133 0 129 127 0 0 -15 134 139 0 133 11
+2 0 80 255 1 130 135 136 9000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 81 1 131 132 137
+ 127 0 128 138 0 139 82 255 1 132 387 80 1 137 140 141 9000 0 0 0 0 3 6 0 0 0 FF
+FFTFTTFFFFFF1 81 1 138 46 137 74 0 79 78 131 142 82 1 139 17 81 1 79 45 77 74 13
+8 0 75 0 143 81 1 78 43 137 60 0 75 144 138 145 82 1 142 17 81 1 144 40 137 66 0
+ 69 146 78 147 82 1 145 17 81 1 69 39 77 66 144 0 86 75 148 81 1 146 37 137 81 0
+ 86 0 144 149 82 1 147 17 81 1 86 36 77 81 146 0 0 69 150 82 1 149 17 80 1 77 13
+0 151 9000 0 0 0 0 3 6 0 0 0 FFFFTFTFFFFFFF1 82 1 150 99 79 255 23 151 SolidEdge
+/MNKR_ATTR_SID82 1 148 100 82 1 143 98 79 27 141 SolidEdge/MNKR_ATTR_TYPE_EX79 2
+6 136 SolidEdge/MNKR_ATTR_SID_EX15 121 138 0 126 112 134 80 1 104 137 152 9000 1
+ 1 1 1 1 1 1 1 0 FFFFTFTTFFFFFF1 81 1 124 141 153 120 154 122 155 0 156 81 1 119
+ 159 104 112 155 0 108 122 0 81 1 155 134 153 112 157 119 158 124 159 81 1 108 1
+58 104 100 160 0 107 119 0 81 1 160 86 153 100 161 108 0 162 163 81 1 107 119 10
+4 73 162 0 102 108 0 81 1 162 89 153 73 164 107 160 115 165 80 1 153 166 167 900
+0 0 0 0 0 3 6 0 0 0 FFFFTFFFFFFFFF1 81 3 164 87 168 73 0 162 161 169 170 171 0 8
+1 1 115 93 153 17 169 114 162 105 172 82 1 165 320 81 3 169 90 168 17 0 115 164
+ 173 174 175 0 81 1 105 97 153 101 173 102 115 176 177 82 1 172 320 81 3 173 94
+ 168 101 0 105 169 178 179 180 0 81 1 176 101 153 98 178 106 105 158 181 82 1 17
+7 320 81 3 178 98 168 98 0 176 173 182 183 184 0 81 1 106 116 104 98 176 0 116 1
+02 0 81 1 158 105 153 19 182 116 176 155 185 82 1 181 320 81 3 182 102 168 19 0
+ 158 178 157 186 187 0 81 1 116 115 104 19 158 0 114 106 0 82 1 185 320 80 3 168
+ 188 189 9000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 1 3 81 3 157 137 168 112 0 155 1
+82 154 190 191 0 82 1 186 0 82 1 187 5 81 3 154 143 168 120 0 124 157 0 192 193
+ 0 82 1 190 0 82 1 191 8 82 1 192 0 82 1 193 6 79 27 189 MONIKER/MONIKER_DATA_AT
+TRIB82 1 183 0 82 1 184 4 82 1 179 0 82 1 180 3 82 1 174 0 82 1 175 2 81 3 161 8
+4 168 100 0 160 0 164 194 195 0 82 1 170 0 82 1 171 1 82 1 194 0 82 1 195 0 79 2
+3 167 SolidEdge/MNKR_ATTR_CID82 1 163 320 82 1 159 468 82 1 156 468 79 17 152 So
+lidEdge/Display50 20 82 0 98 103 5 0 +.05 -612303176911189e-32 .05 -1 1850371707
+708595e-31 0 -1850371707708595e-31 -1 0 82 1 80 97 19 18 1 0 1 0 8 4 S74 255 20
+ 16 8 0 131 79 154 124 122 12 128 2 0 0 0 0 0 0 0 0 0 0 0 0 81 2 12 120 196 1 0
+ 2 0 0 197 198 80 2 196 11 199 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFFFFFF2 3 83 255 1
+ 197 320 84 255 6 198 SE 5.079 22 199 MONIKER/BODY_ID_ATTRIB80 3 11 168 200 9000
+ 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 84 38 13 {53a85994-bac5-11d2-a151-0060b0c
+3f267}84 2 14 SE82 1 15 0 79 25 200 MONIKER/GUID_TABLE_ATTRIB1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/blend3.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/blend3.xmt_txt
new file mode 100644
index 0000000..17ced6a
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/blend3.xmt_txt
@@ -0,0 +1,146 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=SDLINT105;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=Windows NT;
+OS_RELEASE=5.0;
+FRU=Unigraphics Solutions;
+APPL=SolidEdge;
+SITE=Huntsville, AL;
+USER=chopra
+FORMAT=text;
+GUISE=transmit;
+KEY=C:\Program Files\Parasolid\Example Application\Example Parts\blend3;
+FILE=C:\Program Files\Parasolid\Example Application\Example Parts\blend3.x_t;
+DATE=Fri, May 31 02;
+**PART2;
+SCH=SCH_1400104_14000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 140010423 SCH_1400104_14000_1300
+6185 0 12 255 1 324 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 255 3 2
+ 319 11 1 12 0 0 0 13 14 15 70 11 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDC
+CDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ3 0 4 T1 0 0 7 20 1 16 16 13 2
+55 4 3 0 1 0 17 0 0 18 0 50 255 5 117 0 19 20 0 0 +-.0338498630136977 .029115616
+43835535 .15 1 0 0 0 0 -1 30 255 6 166 0 9 21 0 0 +-.0338498630136977 .044568427
+68820305 .15 1 -1211306375749066e-31 0 29 255 7 160 0 10 22 0 .0717238356164364
+ .04456842768820305 .15 19 255 8 45 0 1 18 0 23 V16 255 9 164 0 ?24 0 25 6 0 0 1
+ 18 255 10 158 0 24 0 26 7 ?1 17 255 24 0 27 28 29 10 30 9 0 31 +18 26 29 0 32 1
+0 33 22 ?1 17 32 0 34 35 30 26 36 37 0 38 +18 33 11 0 39 26 40 41 ?1 29 22 32 0
+ 26 41 7 .03605657705894635 .02911561643835535 .15 29 41 14 0 33 42 22 .07172383
+56164364 0 .15 29 42 8 0 40 43 41 -.0338498630136977 0 .15 18 40 5 0 44 33 45 42
+ ?1 29 43 4 0 45 46 42 -.0338498630136977 .02911561643835535 .15 18 45 2 0 47 40
+ 48 43 ?1 29 46 84 0 48 49 43 .03605657705894635 .02911561643835535 0 18 48 66 0
+ 50 45 51 46 ?1 29 49 85 0 51 52 46 .03605657705894635 .0863999999999976 0 18 51
+ 67 0 53 48 54 49 ?1 29 52 86 0 54 55 49 .0717238356164364 .0863999999999976 0 1
+8 54 68 0 56 51 57 52 ?1 29 55 87 0 57 58 52 .0717238356164364 0 0 18 57 69 0 59
+ 54 60 55 ?1 29 58 88 0 60 61 55 -.0338498630136977 0 0 18 60 70 0 62 57 63 58 ?
+1 29 61 89 0 63 64 58 -.0338498630136977 .02911561643835535 0 18 63 65 0 65 60 6
+6 61 ?1 29 64 309 0 66 67 61 .0717238356164364 .0863999999999976 .06869203539823
+01 18 66 238 0 28 63 68 64 ?1 29 67 315 0 68 69 64 .03605657705894635 .044568427
+68820305 .15 18 68 240 0 29 66 70 67 ?1 29 69 316 0 70 0 67 .03605657705894635 .
+0863999999999976 .0686920353982301 18 70 239 0 71 68 0 69 ?1 17 71 0 27 29 28 70
+ 72 73 0 74 +15 255 27 272 0 71 75 0 17 29 0 27 24 71 68 74 76 0 30 +17 28 0 27
+ 71 24 66 31 77 0 72 -17 72 0 78 56 79 66 71 73 0 80 -16 73 212 0 ?71 77 76 81 0
+ 0 1 17 74 0 82 53 36 70 29 76 0 79 -15 82 42 0 36 83 0 17 53 0 82 84 74 51 79 8
+5 0 86 +17 36 0 82 74 38 68 32 37 0 0 -16 76 226 87 ?29 73 0 88 0 0 1 17 79 0 78
+ 72 89 70 53 85 0 0 -15 78 92 0 79 90 0 17 89 0 78 79 56 51 91 92 0 0 +16 85 171
+ 0 ?53 93 94 95 0 0 1 16 93 180 0 ?56 96 85 97 0 0 1 16 94 90 0 ?50 85 37 98 0 0
+ 1 30 95 107 0 85 98 97 0 +.03605657705894635 .0863999999999976 .15 0 0 -1 30 98
+ 106 0 94 99 95 0 +.03605657705894635 .02911561643835535 .15 0 0 -1 30 97 108 0
+ 93 95 100 0 +.0717238356164364 .0863999999999976 .15 0 0 -1 30 100 109 0 96 97
+ 101 0 +.0717238356164364 0 .15 0 0 -1 16 96 97 0 ?59 102 93 100 0 0 1 30 101 11
+0 0 102 100 21 0 +-.0338498630136977 0 .15 0 0 -1 16 102 100 0 ?62 25 96 101 0 0
+ 1 30 21 111 0 25 101 6 0 +-.0338498630136977 .02911561643835535 .15 0 0 -1 16 2
+5 103 0 ?65 9 102 21 0 0 1 17 65 0 103 104 105 63 47 25 0 106 +15 103 101 0 44 1
+9 0 17 104 0 103 44 65 60 107 108 0 0 +17 105 0 103 65 44 45 109 110 0 0 -17 47
+ 0 111 112 106 45 65 25 0 35 -17 106 0 111 47 50 63 113 114 0 107 +15 111 104 0
+ 47 17 0 17 50 0 111 106 112 48 38 94 0 113 +17 113 0 115 86 107 48 106 114 0 84
+ -16 114 50 116 ?106 108 77 117 0 0 1 17 107 0 115 113 118 63 104 108 0 0 -15 11
+5 74 0 113 119 0 17 118 0 115 107 120 60 121 122 0 104 -16 108 53 123 ?104 122 1
+14 124 0 0 1 81 1 123 54 125 108 126 0 116 127 128 16 122 56 127 ?121 129 108 13
+0 0 0 1 30 124 83 0 108 131 130 0 +-.0338498630136977 .02911561643835535 0 0 -1
+ 0 30 131 298 0 77 81 124 0 +.0717238356164364 .0352405154664896 .16813064904848
+55 0 -.457486801069265 .889216411706065 30 130 82 0 122 124 132 0 +-.03384986301
+36977 0 0 1 0 0 30 132 81 0 129 130 133 0 +.0717238356164364 0 0 0 1 0 16 129 59
+ 134 ?135 92 122 132 0 0 1 30 133 80 0 92 132 136 0 +.0717238356164364 .08639999
+99999976 0 -1 0 0 16 92 62 137 ?89 138 129 133 0 0 1 30 136 79 0 138 133 117 0 +
+.03605657705894635 .0863999999999976 0 -1211306375749066e-31 -1 0 16 138 47 139
+ ?84 140 92 136 0 0 1 30 117 78 0 114 136 141 0 +.03605657705894635 .02911561643
+835535 0 -1 -198519446754737e-30 0 30 141 7 0 110 117 142 0 +-.0338498630136977
+ .02911561643835535 .15 0 -1 0 16 110 6 0 ?109 143 140 141 0 0 1 30 142 13 0 143
+ 141 144 0 +-.0338498630136977 0 .15 1 0 0 16 143 12 0 ?145 146 110 142 0 0 1 30
+ 144 19 0 146 142 147 0 +.0717238356164364 0 .15 0 1 0 16 146 18 0 ?148 37 143 1
+44 0 0 1 30 147 31 0 37 144 99 0 +.03605657705894635 .0863999999999976 .15 -1211
+306375749066e-31 -1 0 16 37 162 0 ?32 94 146 147 0 0 1 30 99 36 0 140 147 98 0 +
+.03605657705894635 .02911561643835535 .15 -1 -198519446754737e-30 0 16 140 35 0
+ ?35 110 138 99 0 0 1 17 35 0 34 109 32 45 112 140 0 105 +15 34 165 0 30 149 0 1
+7 109 0 34 145 35 40 105 110 0 0 +17 112 0 111 50 47 26 35 140 0 0 -17 145 0 34
+ 148 109 33 150 143 0 0 +17 148 0 34 30 145 10 151 146 0 0 +17 150 0 152 62 39 4
+0 145 143 0 109 -15 152 98 0 39 153 0 17 62 0 152 121 150 60 44 102 0 118 +17 39
+ 0 152 150 121 33 59 96 0 151 -17 121 0 152 39 62 57 118 122 0 0 +17 59 0 154 13
+5 151 57 39 96 0 120 +17 151 0 154 59 31 33 148 146 0 145 -15 154 95 0 80 155 0
+ 17 31 0 154 151 80 10 28 77 0 148 +17 80 0 154 31 135 66 56 93 0 0 -16 77 214 0
+ ?31 114 73 131 0 0 1 17 135 0 154 80 59 54 120 129 0 0 +17 56 0 78 89 72 54 80
+ 93 0 91 +17 91 0 115 120 86 54 89 92 0 135 -17 120 0 115 118 91 57 135 129 0 12
+1 -17 86 0 115 91 113 51 84 138 0 89 -17 84 0 82 38 53 48 86 138 0 0 +17 38 0 82
+ 36 84 26 50 94 0 112 -14 255 155 96 156 ?90 153 154 4 157 -0 0 90 153 23 81 1 1
+56 320 158 155 159 0 160 161 0 14 90 93 161 ?83 155 78 4 162 -0 0 149 155 23 14
+ 153 99 163 ?155 19 152 4 20 -0 0 155 19 23 50 157 115 0 155 162 20 0 +.07172383
+56164364 0 .15 -1 0 0 0 0 1 13 23 44 0 0 0 0 0 0 8 17 14 17 105 164 ?19 0 111 4
+ 165 -0 0 19 0 23 81 1 164 149 158 17 166 0 0 167 0 14 19 102 167 ?153 17 103 4
+ 5 -0 0 153 17 23 50 165 112 0 17 168 169 0 +.03605657705894635 .029115616438355
+35 .15 198519446754737e-30 -1 0 1 198519446754737e-30 0 50 168 41 0 149 170 165
+ 0 +-.0338498630136977 .02911561643835535 .15 0 0 1 1 0 0 50 169 113 0 83 165 16
+2 0 +.03605657705894635 .0863999999999976 .15 1 -1211306375749066e-31 0 12113063
+75749066e-31 1 0 14 83 43 171 ?149 90 82 4 169 -0 0 119 149 23 50 162 114 0 90 1
+69 157 0 +.0717238356164364 .0863999999999976 .15 0 -1 0 0 0 -1 81 1 171 322 158
+ 83 172 0 161 173 0 14 149 38 173 ?119 83 34 4 168 +0 0 83 90 23 14 119 73 160 ?
+75 149 115 4 170 -0 0 75 83 23 81 1 160 156 158 119 174 0 163 156 0 14 75 267 17
+5 ?0 119 27 4 176 -0 0 0 119 23 50 170 77 0 119 176 168 0 +-.0338498630136977 .0
+2911561643835535 0 0 0 1 1 0 0 50 176 291 0 75 0 170 0 +.238814476639816 .086399
+9999999976 .0686920353982301 -1077113508920264e-31 -.889216411706065 -.457486801
+069265 0 .457486801069265 -.889216411706065 81 1 175 324 158 75 177 0 173 0 0 80
+ 255 1 158 178 179 9000 1 1 1 1 1 1 1 1 0 FFFFTFTTFFFFFF1 81 1 177 268 180 75 18
+1 175 182 0 183 81 1 173 323 158 149 184 0 171 175 0 81 1 184 120 180 149 185 17
+3 0 174 186 80 1 180 187 188 9000 0 0 0 0 3 6 0 0 0 FFFFTFFFFFFFFF1 81 3 185 118
+ 189 149 0 184 0 190 191 192 0 81 1 174 123 180 119 190 160 184 166 193 82 255 1
+ 186 395 81 3 190 121 189 119 0 174 185 194 195 196 0 81 1 166 127 180 17 194 16
+4 174 172 197 82 1 193 395 81 3 194 124 189 17 0 166 190 198 199 200 0 81 1 172
+ 131 180 83 198 171 166 201 202 82 1 197 395 81 3 198 128 189 83 0 172 194 203 2
+04 205 0 81 1 201 135 180 90 203 161 172 159 206 82 1 202 395 81 3 203 132 189 9
+0 0 201 198 207 208 209 0 81 1 161 321 158 90 201 0 156 171 0 81 1 159 139 180 1
+55 207 156 201 210 211 82 1 206 395 81 3 207 136 189 155 0 159 203 212 213 214 0
+ 81 1 210 143 180 153 212 163 159 182 215 82 1 211 395 81 3 212 140 189 153 0 21
+0 207 216 217 218 0 81 1 163 151 158 153 210 0 167 160 0 81 1 182 147 180 19 216
+ 167 210 177 219 82 1 215 395 81 3 216 144 189 19 0 182 212 181 220 221 0 81 1 1
+67 150 158 19 182 0 164 163 0 82 1 219 395 80 3 189 222 223 9000 0 0 0 0 3 6 0 0
+ 0 FFFFTFTTFFFFFF1 1 3 81 3 181 271 189 75 0 177 216 0 224 225 0 82 1 220 0 82 1
+ 221 7 82 1 224 0 82 1 225 12 79 255 27 223 MONIKER/MONIKER_DATA_ATTRIB82 1 217
+ 0 82 1 218 6 82 1 213 0 82 1 214 5 82 1 208 0 82 1 209 4 82 1 204 0 82 1 205 3
+ 82 1 199 0 82 1 200 2 82 1 195 0 82 1 196 1 82 1 191 0 82 1 192 0 79 23 188 Sol
+idEdge/MNKR_ATTR_CID82 1 183 597 79 17 179 SolidEdge/Display50 20 116 0 153 157
+ 5 0 +-.0338498630136977 0 .15 0 1 0 0 0 1 17 44 0 103 105 104 40 62 102 0 150 -
+17 30 0 34 32 148 68 24 9 0 36 -81 1 139 48 125 138 226 0 0 116 227 80 1 125 228
+ 229 9000 0 0 0 0 3 6 0 0 0 FFFFTFTFFFFFFF1 81 1 226 49 178 138 0 139 0 230 231
+ 81 1 116 51 125 114 230 0 139 123 232 82 1 227 257 81 1 230 52 178 114 0 116 22
+6 126 233 82 1 232 301 80 1 178 234 235 9000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 8
+1 1 126 55 178 108 0 123 230 236 237 82 1 233 17 81 1 236 58 178 122 0 127 126 2
+38 239 82 1 237 17 81 1 127 57 125 122 236 0 123 134 240 81 1 238 61 178 129 0 1
+34 236 241 242 82 1 239 17 81 1 134 60 125 129 238 0 127 137 243 81 1 241 64 178
+ 92 0 137 238 244 245 82 1 242 17 81 1 137 63 125 92 241 0 134 87 246 81 1 244 2
+29 178 76 0 87 241 0 247 82 1 245 17 81 1 87 228 125 76 244 0 137 0 248 82 1 247
+ 17 82 1 248 442 82 1 246 217 82 1 243 168 82 1 240 122 79 27 235 SolidEdge/MNKR
+_ATTR_TYPE_EX82 1 231 17 79 23 229 SolidEdge/MNKR_ATTR_SID30 81 299 0 73 88 131
+ 0 +.238814476639816 .0863999999999976 .0686920353982301 -1 1211306375749066e-31
+ 0 30 88 307 0 76 0 81 0 +.03605657705894635 .0863999999999976 .0686920353982301
+ -554156678956246e-31 -.457486801069265 .889216411706066 82 1 128 66 19 18 1 0 1
+ 0 8 4 S74 255 20 16 7 0 244 87 181 177 175 12 2 0 0 0 0 0 0 0 0 0 0 0 0 0 81 2
+ 12 157 249 1 0 2 0 0 250 251 80 2 249 11 252 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFFF
+FFF2 3 83 255 1 250 395 84 255 6 251 SE 5.079 22 252 MONIKER/BODY_ID_ATTRIB80 3
+ 11 189 253 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 84 38 13 {bfee01ed-bac8-1
+1d2-a151-0060b0c3f267}84 2 14 SE82 1 15 0 79 25 253 MONIKER/GUID_TABLE_ATTRIB1 0
+ 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/brut.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/brut.xmt_txt
new file mode 100644
index 0000000..445e475
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/brut.xmt_txt
@@ -0,0 +1,476 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=unknown;
+APPL=File generated by 3D Reviewer Application Version 5.3.0.0;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=brut;
+FILE=X:\Documents\Virfac\Examples\MachiningAdvanced\brut.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_1100000_11004;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 110000017 SCH_1100000_110040 10
+ 1 698 695 696 0 0 0 0 0 1e3 1e-008 0 0 0 1 0 1 693 12 2 692 691 151 0 0 0 0 1e3
+ 1e-008 693 0 0 1 0 1 1 78 218 689 146 76 65 61 13 3 3 0 0 0 0 0 0 76 4 14 4 4 1
+56 ?14 0 5 78 147 +0 0 14 0 3 15 5 5 0 79 4 0 16 6 6 0 1e-006 119 9 0 0 0 0 2 18
+ 7 7 0 120 10 0 134 1e-006 2 18 8 8 0 119 21 12 131 1e-006 2 16 9 9 0 1e-006 80
+ 11 6 0 0 0 2 18 10 10 0 123 12 7 133 1e-006 2 16 11 11 0 1e-006 81 13 9 0 0 0 2
+ 18 12 12 0 124 8 10 132 1e-006 2 16 13 13 0 1e-006 84 16 11 0 0 0 2 14 14 14 16
+1 ?18 4 15 78 158 +0 0 18 4 3 15 15 15 0 83 14 0 16 16 16 0 1e-006 120 17 13 0 0
+ 0 2 16 17 17 0 1e-006 85 20 16 0 0 0 2 14 18 18 166 ?28 14 19 78 163 +0 0 28 14
+ 3 15 19 19 0 87 18 0 16 20 20 0 1e-006 122 23 17 0 0 0 2 18 21 21 0 121 24 8 13
+5 1e-006 2 18 22 22 0 122 35 26 136 1e-006 2 16 23 23 0 1e-006 88 25 20 0 0 0 2
+ 18 24 24 0 127 26 21 137 1e-006 2 16 25 25 0 1e-006 89 27 23 0 0 0 2 18 26 26 0
+ 128 22 24 138 1e-006 2 16 27 27 0 1e-006 92 30 25 0 0 0 2 14 28 28 171 ?32 18 2
+9 78 168 +0 0 32 18 3 15 29 29 0 91 28 0 16 30 30 0 1e-006 121 31 27 0 0 0 2 16
+ 31 31 0 1e-006 93 34 30 0 0 0 2 14 32 32 176 ?42 28 33 78 173 +0 0 42 28 3 15 3
+3 33 0 95 32 0 16 34 34 0 1e-006 126 37 31 0 0 0 2 18 35 35 0 125 38 22 142 1e-0
+06 2 18 36 36 0 126 49 40 139 1e-006 2 16 37 37 0 1e-006 96 39 34 0 0 0 2 18 38
+ 38 0 110 40 35 141 1e-006 2 16 39 39 0 1e-006 97 41 37 0 0 0 2 18 40 40 0 107 3
+6 38 140 1e-006 2 16 41 41 0 1e-006 100 44 39 0 0 0 2 14 42 42 181 ?46 32 43 78
+ 178 +0 0 46 32 3 15 43 43 0 99 42 0 16 44 44 0 1e-006 125 45 41 0 0 0 2 16 45 4
+5 0 1e-006 101 48 44 0 0 0 2 14 46 46 186 ?53 42 47 78 183 +0 0 53 42 3 15 47 47
+ 0 103 46 0 16 48 48 0 1e-006 104 50 45 0 0 0 2 18 49 49 0 118 51 36 144 1e-006
+ 2 16 50 50 0 1e-006 105 52 48 0 0 0 2 18 51 51 0 115 59 49 143 1e-006 2 16 52 5
+2 0 1e-006 108 55 50 0 0 0 2 14 53 53 191 ?56 46 54 78 188 +0 0 56 46 3 15 54 54
+ 0 107 53 0 16 55 55 0 1e-006 109 58 52 0 0 0 2 14 56 56 196 ?63 53 57 78 193 +0
+ 0 63 53 3 15 57 57 0 111 56 0 16 58 58 0 1e-006 112 60 55 0 0 0 2 18 59 59 0 12
+9 61 51 146 1e-006 2 16 60 60 0 1e-006 113 62 58 0 0 0 2 18 61 61 0 130 0 59 145
+ 1e-006 2 16 62 62 0 1e-006 116 65 60 0 0 0 2 14 63 63 201 ?66 56 64 78 198 +0 0
+ 66 56 3 15 64 64 0 115 63 0 16 65 65 0 1e-006 117 0 62 0 0 0 2 14 66 66 206 ?68
+ 63 67 78 203 +0 0 68 63 3 15 67 67 0 119 66 0 14 68 68 211 ?71 66 69 78 208 +0
+ 0 71 66 3 15 69 69 0 121 68 70 15 70 70 0 123 68 0 14 71 71 216 ?74 68 72 78 21
+3 +0 0 74 68 3 15 72 72 0 125 71 73 15 73 73 0 127 71 0 14 74 74 221 ?0 71 75 78
+ 218 -0 0 0 71 3 15 75 75 0 129 74 0 19 76 76 0 2 77 0 3 V19 77 77 0 2 0 76 78 S
+13 78 78 0 2 0 4 0 0 77 0 17 79 0 5 80 82 7 119 6 293 0 -17 80 0 5 81 79 10 86 9
+ 271 0 +17 81 0 5 82 80 12 123 11 253 0 +17 82 0 5 79 81 8 84 13 239 0 -17 83 0
+ 15 84 86 8 120 16 329 82 -17 84 0 15 85 83 12 82 13 235 81 +17 85 0 15 86 84 10
+ 124 17 307 80 +17 86 0 15 83 85 7 80 9 275 79 -17 87 0 19 88 90 21 122 20 347 0
+ -17 88 0 19 89 87 24 94 23 361 0 +17 89 0 19 90 88 26 127 25 379 0 +17 90 0 19
+ 87 89 22 92 27 401 0 -17 91 0 29 92 94 22 121 30 419 90 -17 92 0 29 93 91 26 90
+ 27 397 89 +17 93 0 29 94 92 24 128 31 433 88 +17 94 0 29 91 93 21 88 23 365 87
+ -17 95 0 33 96 98 35 126 34 509 0 -17 96 0 33 97 95 38 102 37 487 0 +17 97 0 33
+ 98 96 40 103 39 469 0 +17 98 0 33 95 97 36 100 41 455 0 -17 99 0 43 100 102 36
+ 125 44 545 98 -17 100 0 43 101 99 40 98 41 451 97 +17 101 0 43 102 100 38 107 4
+5 523 96 +17 102 0 43 99 101 35 96 37 491 95 -17 103 0 47 104 106 38 97 39 473 1
+01 -17 104 0 47 105 103 49 110 48 595 0 +17 105 0 47 106 104 51 111 50 577 0 +17
+ 106 0 47 103 105 40 108 52 563 100 -17 107 0 54 108 110 40 101 45 527 106 -17 1
+08 0 54 109 107 51 106 52 559 105 +17 109 0 54 110 108 49 115 55 613 104 +17 110
+ 0 54 107 109 38 104 48 599 103 -17 111 0 57 112 114 49 105 50 581 109 -17 112 0
+ 57 113 111 59 118 58 667 0 +17 113 0 57 114 112 61 129 60 649 0 +17 114 0 57 11
+1 113 51 116 62 635 108 -17 115 0 64 116 118 51 109 55 617 114 -17 116 0 64 117
+ 115 61 114 62 631 113 +17 117 0 64 118 116 59 130 65 685 112 +17 118 0 64 115 1
+17 49 112 58 671 111 -17 119 0 67 120 120 8 79 6 289 83 +17 120 0 67 119 119 7 8
+3 16 325 86 +17 121 0 69 122 122 21 91 30 415 94 +17 122 0 69 121 121 22 87 20 3
+43 91 +17 123 0 70 124 124 10 81 11 257 85 -17 124 0 70 123 123 12 85 17 311 84
+ -17 125 0 72 126 126 35 99 44 541 102 +17 126 0 72 125 125 36 95 34 505 99 +17
+ 127 0 73 128 128 24 89 25 383 93 -17 128 0 73 127 127 26 93 31 437 92 -17 129 0
+ 75 130 130 59 113 60 653 117 -17 130 0 75 129 129 61 117 65 689 116 -29 131 131
+ 0 8 0 132 .004500000000000012 -.007191383079062988 -.01316373842835565 29 132 1
+32 0 12 131 133 .04450000000000007 -.007191383079063091 -.01316373842835559 29 1
+33 133 0 10 132 134 .04450000000000007 .007191383079063089 .0131637384283556 29
+ 134 134 0 7 133 135 .004500000000000012 .007191383079063006 .01316373842835564
+ 29 135 135 0 21 134 136 .04449999999999992 .01198563846510506 .0219395640472593
+2 29 136 136 0 22 135 137 .04449999999999992 -.01198563846510513 -.0219395640472
+5929 29 137 137 0 24 136 138 .1669059892324149 .01198563846510518 .0219395640472
+5922 29 138 138 0 26 137 139 .1669059892324149 -.01198563846510518 -.02193956404
+725922 29 139 139 0 36 138 140 .1669059892324149 -.04554542616739921 -.083370343
+37958538 29 140 140 0 40 139 141 .19 -.06472244771156727 -.1184736458552004 29 1
+41 141 0 38 140 142 .19 .06472244771156725 .1184736458552004 29 142 142 0 35 141
+ 143 .1669059892324149 .04554542616739923 .08337034337958538 29 143 143 0 51 142
+ 144 .2 -.06472244771156718 -.1184736458552004 29 144 144 0 49 143 145 .2 .06472
+244771156721 .1184736458552004 29 145 145 0 61 144 146 .22 -.04828157157653604 -
+.08837882395583034 29 146 146 0 59 145 0 .22 .04828157157653602 .088378823955830
+34 51 147 147 0 4 0 158 292 +.11225 0 0 -1 0 0 .01500000000000003 0 1 0 80 1 148
+ 0 149 8001 0 0 0 0 3 5 0 0 FFFFTFTFFFFFFF2 79 15 149 SDL/TYSA_COLOUR81 1 150 15
+0 148 4 0 156 0 159 153 70 151 151 2 0 0 4 2 20 4 152 152 1 T74 20 152 2 0 219 6
+91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 83 3 153 .8235294222831726 .8235294222831
+726 1 80 1 154 148 155 8017 0 0 0 0 0 0 0 0 TTTTTTTTTTTTTF3 79 13 155 SDL/TYSA_N
+AME81 1 156 156 154 4 150 0 0 161 157 84 7 157 Shaft.151 158 158 0 14 147 163 32
+8 +.11225 0 0 -1 0 0 .01500000000000003 0 1 0 81 1 159 159 148 14 0 161 150 164
+ 160 83 3 160 .8235294222831726 .8235294222831726 1 81 1 161 161 154 14 159 0 15
+6 166 162 84 7 162 Shaft.151 163 163 0 18 158 168 400 +.11225 0 0 -1 0 0 .024999
+99999999999 0 1 0 81 1 164 164 148 18 0 166 159 169 165 83 3 165 .82352942228317
+26 .8235294222831726 1 81 1 166 166 154 18 164 0 161 171 167 84 7 167 Shaft.151
+ 168 168 0 28 163 173 432 +.11225 0 0 -1 0 0 .02499999999999999 0 1 0 81 1 169 1
+69 148 28 0 171 164 174 170 83 3 170 .8235294222831726 .8235294222831726 1 81 1
+ 171 171 154 28 169 0 166 176 172 84 7 172 Shaft.152 173 173 0 32 168 178 508 +.
+1669059892324149 0 0 1 - 0 .09499999999999995 .8660254037844385 .500000000000000
+3 0 1 0 81 1 174 174 148 32 0 176 169 179 175 83 3 175 .8235294222831726 .823529
+4222831726 1 81 1 176 176 154 32 174 0 171 181 177 84 7 177 Shaft.152 178 178 0
+ 42 173 183 544 +.1669059892324149 0 0 1 - 0 .09499999999999995 .866025403784438
+5 .5000000000000003 0 1 0 81 1 179 179 148 42 0 181 174 184 180 83 3 180 .823529
+4222831726 .8235294222831726 1 81 1 181 181 154 42 179 0 176 186 182 84 7 182 Sh
+aft.151 183 183 0 46 178 188 594 +.11225 0 0 -1 0 0 .135 0 1 0 81 1 184 184 148
+ 46 0 186 179 189 185 83 3 185 .8235294222831726 .8235294222831726 1 81 1 186 18
+6 154 46 184 0 181 191 187 84 7 187 Shaft.151 188 188 0 53 183 193 612 +.11225 0
+ 0 -1 0 0 .135 0 1 0 81 1 189 189 148 53 0 191 184 194 190 83 3 190 .82352942228
+31726 .8235294222831726 1 81 1 191 191 154 53 189 0 186 196 192 84 7 192 Shaft.1
+52 193 193 0 56 188 198 666 +.22 0 0 -1 0 0 .100707133201754 .8638246397650071 .
+5037926078604724 0 1 0 81 1 194 194 148 56 0 196 189 199 195 83 3 195 .823529422
+2831726 .8235294222831726 1 81 1 196 196 154 56 194 0 191 201 197 84 7 197 Shaft
+.152 198 198 0 63 193 203 684 +.22 0 0 -1 0 0 .100707133201754 .8638246397650071
+ .5037926078604724 0 1 0 81 1 199 199 148 63 0 201 194 204 200 83 3 200 .8235294
+222831726 .8235294222831726 1 81 1 201 201 154 63 199 0 196 206 202 84 7 202 Sha
+ft.150 203 203 0 66 198 208 324 +.0045 0 .015 -1 0 0 0 1 0 81 1 204 204 148 66 0
+ 206 199 209 205 83 3 205 .8235294222831726 .8235294222831726 1 81 1 206 206 154
+ 66 204 0 201 211 207 84 7 207 Shaft.150 208 208 0 68 203 213 414 +.044499999999
+99992 0 .025 -1 0 0 0 1 0 81 1 209 209 148 68 0 211 204 214 210 83 3 210 .823529
+4222831726 .8235294222831726 1 81 1 211 211 154 68 209 0 206 216 212 84 7 212 Sh
+aft.150 213 213 0 71 208 218 540 +.166905989232415 0 .09499999999999992 -1 0 0 0
+ 1 0 81 1 214 214 148 71 0 216 209 219 215 83 3 215 .8235294222831726 .823529422
+2831726 1 81 1 216 216 154 71 214 0 211 221 217 84 7 217 Shaft.150 218 218 0 74
+ 213 0 688 +.22 0 0 -1 0 0 0 1 0 81 1 219 219 148 74 0 221 214 0 220 83 3 220 .8
+235294222831726 .8235294222831726 1 81 1 221 221 154 74 219 0 216 691 222 84 7 2
+22 Shaft.1134 223 0 0 0 0 0 0 +224 0 136 224 1 2 2 2 1 FFF1 225 226 227 45 4 225
+ 2.070796326794897 .10775 2.070796326794897 .06774999999999985 127 2 226 2 2 128
+ 2 227 .06774999999999985 .10775 134 228 0 0 0 0 0 0 +229 0 136 229 1 2 2 2 1 FF
+F1 230 231 232 45 4 230 2.070796326794897 .06774999999999985 2.070796326794897 .
+10775 127 2 231 2 2 128 2 232 .06774999999999985 .10775 137 233 233 0 2 0 235 23
+6 +158 223 0 ?141 234 233 274 328 158 133 235 235 0 84 233 237 0 +233 .004500000
+000000032 -.007191383079063059 -.01316373842835562 .04450000000000015 -.00719138
+3079063059 -.01316373842835562 .06774999999999985 .10775 141 236 235 236 236 233
+ 137 237 237 0 2 235 239 240 +147 228 0 ?141 238 237 252 292 147 133 239 239 0 8
+2 237 251 0 +237 .04450000000000015 -.007191383079063059 -.01316373842835562 .00
+4500000000000032 -.007191383079063059 -.01316373842835562 .06774999999999985 .10
+775 141 240 239 240 240 237 134 241 0 0 0 0 0 0 +242 0 136 242 1 2 2 2 1 FFF1 24
+3 244 245 45 4 243 -1.070796326794897 .06774999999999988 2.070796326794897 .0677
+4999999999988 127 2 244 2 2 128 2 245 .07818583470577051 .1253097245096175 134 2
+46 0 0 0 0 0 0 +247 0 136 247 9 10 2 2 1 FFF1 248 249 250 45 20 248 -.0071913830
+79063142 .03816373842835556 -.002596385147052242 .04067399723944023 .00298449842
+8265935 .0413798695510174 .008740861857913 .0398385317762147 .01363304230662512
+ .03603302974095664 .01664993859580497 .03051063812593315 .01720890176393992 .02
+433788870126161 .01539571634477149 .01866128754335674 .01178638101107404 .014346
+52038272912 .007191383079063142 .01183626157164445 127 2 249 10 10 128 2 250 .07
+818583470577052 .1253097245096175 137 251 251 0 2 239 253 254 +147 241 0 ?141 25
+2 251 270 238 147 133 253 253 0 81 251 255 0 +251 .04450000000000012 .0071913830
+79063057 .01316373842835562 .04450000000000012 -.007191383079063059 -.0131637384
+2835562 .07818583470577051 .1253097245096175 141 254 253 254 254 251 137 255 255
+ 0 2 253 257 258 +208 246 0 ?141 256 255 310 414 208 133 257 257 0 123 255 269 0
+ +255 .04449999999999992 -.007191383079063142 -.01316373842835555 .0444999999999
+9992 .007191383079063142 .01316373842835556 .07818583470577052 .1253097245096175
+ 141 258 257 258 258 255 134 259 0 0 0 0 0 0 +260 0 136 260 1 2 2 2 1 FFF1 261 2
+62 263 45 4 261 5.21238898038469 .10775 5.21238898038469 .06774999999999985 127
+ 2 262 2 2 128 2 263 .06774999999999985 .10775 134 264 0 0 0 0 0 0 +265 0 136 26
+5 1 2 2 2 1 FFF1 266 267 268 45 4 266 5.21238898038469 .06774999999999985 5.2123
+8898038469 .10775 127 2 267 2 2 128 2 268 .06774999999999985 .10775 137 269 269
+ 0 2 257 271 272 +147 259 0 ?141 270 269 292 252 147 133 271 271 0 80 269 273 0
+ +269 .004500000000000032 .007191383079063057 .01316373842835562 .04450000000000
+015 .007191383079063057 .01316373842835562 .06774999999999985 .10775 141 272 271
+ 272 272 269 137 273 273 0 2 271 275 276 +158 264 0 ?141 274 273 306 234 158 133
+ 275 275 0 86 273 287 0 +273 .04450000000000015 .007191383079063057 .01316373842
+835562 .004500000000000032 .007191383079063057 .01316373842835562 .0677499999999
+9985 .10775 141 276 275 276 276 273 134 277 0 0 0 0 0 0 +278 0 136 278 9 10 2 2
+ 1 FFF1 279 280 281 45 20 279 .007191383079063042 .001836261571644409 .011786381
+01107395 .004346520382729037 .01539571634477143 .008661287543356632 .01720890176
+39399 .01433788870126148 .01664993859580499 .02051063812593302 .0136330423066251
+8 .02603302974095653 .008740861857913094 .02983853177621462 .002984498428266047
+ .03137986955101735 -.002596385147052128 .03067399723944022 -.007191383079063042
+ .02816373842835559 127 2 280 10 10 128 2 281 .07818583470577034 .12530972450961
+73 134 282 0 0 0 0 0 0 +283 0 136 283 1 2 2 2 1 FFF1 284 285 286 45 4 284 2.0707
+96326794881 .10775 -1.070796326794897 .10775 127 2 285 2 2 128 2 286 .0781858347
+0577051 .1253097245096173 137 287 287 0 2 275 289 290 +203 277 0 ?141 288 287 32
+4 324 203 133 289 289 0 119 287 291 0 +287 .0045 .007191383079063042 .0131637384
+2835559 .0045 -.007191383079063042 -.01316373842835559 .07818583470577034 .12530
+97245096173 141 290 289 290 290 287 137 291 291 0 2 289 293 294 +147 282 0 ?141
+ 292 291 238 270 147 133 293 293 0 79 291 305 0 +291 .004500000000000004 -.00719
+1383079062848 -.01316373842835573 .004500000000000004 .007191383079063057 .01316
+373842835562 .07818583470577051 .1253097245096173 141 294 293 294 294 291 134 29
+5 0 0 0 0 0 0 +296 0 136 296 1 2 2 2 1 FFF1 297 298 299 45 4 297 2.0707963267948
+97 .06774999999999988 5.21238898038469 .06774999999999988 127 2 298 2 2 128 2 29
+9 .1253097245096175 .1724336143134645 134 300 0 0 0 0 0 0 +301 0 136 301 9 10 2
+ 2 1 FFF1 302 303 304 45 20 302 .007191383079063169 .01183626157164447 .00259638
+5147052274 .009326002760559792 -.002984498428265902 .008620130448982612 -.008740
+861857912971 .0101614682237853 -.01363304230662509 .01396697025904334 -.01664993
+859580496 .01948936187406683 -.01720890176393992 .02566211129873837 -.0153957163
+447715 .03133871245664324 -.01178638101107406 .03565347961727088 -.0071913830790
+63169 .03816373842835555 127 2 303 10 10 128 2 304 .1253097245096175 .1724336143
+134643 137 305 305 0 2 293 307 308 +158 295 0 ?141 306 305 328 274 158 133 307 3
+07 0 85 305 309 0 +305 .04450000000000012 -.007191383079063059 -.013163738428355
+62 .04450000000000012 .007191383079063057 .01316373842835562 .1253097245096175 .
+1724336143134645 141 308 307 308 308 305 137 309 309 0 2 307 311 312 +208 300 0
+ ?141 310 309 342 256 208 133 311 311 0 124 309 323 0 +309 .04449999999999992 .0
+07191383079063169 .01316373842835554 .04449999999999992 -.007191383079063169 -.0
+1316373842835554 .1253097245096175 .1724336143134643 141 312 311 312 312 309 134
+ 313 0 0 0 0 0 0 +314 0 136 314 9 10 2 2 1 FFF1 315 316 317 45 20 315 -.00719138
+3079063068 .02816373842835558 -.01178638101107397 .02565347961727094 -.015395716
+34477144 .02133871245664334 -.0172089017639399 .01566211129873849 -.016649938595
+80498 .009489361874066949 -.01363304230662516 .003966970259043445 -.008740861857
+913066 .0001614682237853667 -.002984498428266015 -.001379869551017356 .002596385
+147052159 -.0006739972394402168 .007191383079063068 .001836261571644422 127 2 31
+6 10 10 128 2 317 .1253097245096173 .1724336143134642 134 318 0 0 0 0 0 0 +319 0
+ 136 319 1 2 2 2 1 FFF1 320 321 322 45 4 320 5.212388980384667 .10775 2.07079632
+6794881 .10775 127 2 321 2 2 128 2 322 .1253097245096173 .1724336143134642 137 3
+23 323 0 2 311 325 326 +203 313 0 ?141 324 323 288 288 203 133 325 325 0 120 323
+ 327 0 +323 .0045 -.007191383079063068 -.01316373842835558 .0045 .00719138307906
+3068 .01316373842835558 .1253097245096173 .1724336143134642 141 326 325 326 326
+ 323 137 327 327 0 2 325 329 330 +158 318 0 ?141 328 327 234 306 158 133 329 329
+ 0 83 327 341 0 +327 .004500000000000004 .007191383079062754 .01316373842835578
+ .004500000000000004 -.007191383079062848 -.01316373842835573 .1253097245096173
+ .1724336143134642 141 330 329 330 330 327 134 331 0 0 0 0 0 0 +332 0 136 332 9
+ 10 2 2 1 FFF1 333 334 335 45 20 333 .01198563846510507 .003060435952740682 .019
+64396835178993 .007244200637881729 .02565952724128572 .01443547923892773 .028681
+50293989984 .02389648116876914 .02774989765967499 .03418439687655504 .0227217371
+7770864 .04338838290159423 .01456810309652183 .04973088629369104 .00497416404711
+0079 .05229978258502893 -.004327308578420216 .05112332873240039 -.01198563846510
+507 .04693956404725934 127 2 334 10 10 128 2 335 .1303097245096173 .208849540849
+3621 134 336 0 0 0 0 0 0 +337 0 136 337 1 2 2 2 1 FFF1 338 339 340 45 4 338 2.07
+0796326794904 .06775000000000009 -1.070796326794892 .06775000000000009 127 2 339
+ 2 2 128 2 340 .1303097245096173 .2088495408493621 137 341 341 0 2 329 343 344 +
+208 331 0 ?141 342 341 414 310 208 133 343 343 0 122 341 345 0 +341 .04449999999
+999992 .01198563846510507 .02193956404725933 .04449999999999992 -.01198563846510
+507 -.02193956404725933 .1303097245096173 .2088495408493621 141 344 343 344 344
+ 341 137 345 345 0 2 343 347 348 +163 336 0 ?141 346 345 360 400 163 133 347 347
+ 0 87 345 359 0 +345 .04449999999999992 -.01198563846510522 -.02193956404725922
+ .04449999999999992 .01198563846510516 .02193956404725925 .1303097245096173 .208
+8495408493621 141 348 347 348 348 345 134 349 0 0 0 0 0 0 +350 0 136 350 1 2 2 2
+ 1 FFF1 351 352 353 45 4 351 5.212388980384689 .06775000000000007 5.212388980384
+689 -.05465598923241485 127 2 352 2 2 128 2 353 -.06120299461620746 .06120299461
+620746 134 354 0 0 0 0 0 0 +355 0 136 355 1 2 2 2 1 FFF1 356 357 358 45 4 356 5.
+21238898038469 -.05465598923241485 5.21238898038469 .06775000000000007 127 2 357
+ 2 2 128 2 358 -.06120299461620746 .06120299461620746 137 359 359 0 2 347 361 36
+2 +163 349 0 ?141 360 359 378 346 163 133 361 361 0 88 359 363 0 +359 .044499999
+99999993 .01198563846510505 .02193956404725932 .1669059892324148 .01198563846510
+505 .02193956404725932 -.06120299461620746 .06120299461620746 141 362 361 362 36
+2 359 137 363 363 0 2 361 365 366 +168 354 0 ?141 364 363 396 432 168 133 365 36
+5 0 94 363 377 0 +363 .1669059892324148 .01198563846510507 .02193956404725931 .0
+4449999999999993 .01198563846510507 .02193956404725931 -.06120299461620746 .0612
+0299461620746 141 366 365 366 366 363 134 367 0 0 0 0 0 0 +368 0 136 368 1 2 2 2
+ 1 FFF1 369 370 371 45 4 369 -1.070796326794897 -.05465598923241487 2.0707963267
+94895 -.05465598923241487 127 2 370 2 2 128 2 371 .1303097245096171 .20884954084
+93619 134 372 0 0 0 0 0 0 +373 0 136 373 9 10 2 2 1 FFF1 374 375 376 45 20 374 -
+.01198563846510532 .116939564047259 -.004327308578420547 .1211233287324 .0049741
+64047109698 .1222997825850288 .01456810309652145 .1197308862936911 .022721737177
+70831 .1133883829015944 .02774989765967477 .1041843968765553 .02868150293989975
+ .09389648116876943 .02565952724128577 .08443547923892802 .01964396835179 .07724
+420063788197 .01198563846510532 .07306043595274084 127 2 375 10 10 128 2 376 .13
+03097245096171 .2088495408493619 137 377 377 0 2 365 379 380 +163 367 0 ?141 378
+ 377 400 360 163 133 379 379 0 89 377 381 0 +377 .1669059892324149 .011985638465
+10505 .02193956404725932 .1669059892324149 -.01198563846510503 -.021939564047259
+33 .1303097245096171 .2088495408493619 141 380 379 380 380 377 137 381 381 0 2 3
+79 383 384 +213 372 0 ?141 382 381 436 540 213 133 383 383 0 127 381 395 0 +381
+ .166905989232415 -.01198563846510532 -.02193956404725908 .166905989232415 .0119
+8563846510532 .02193956404725908 .1303097245096171 .2088495408493619 141 384 383
+ 384 384 381 134 385 0 0 0 0 0 0 +386 0 136 386 1 2 2 2 1 FFF1 387 388 389 45 4
+ 387 2.070796326794897 .06775000000000007 2.070796326794897 -.05465598923241485
+ 127 2 388 2 2 128 2 389 -.06120299461620746 .06120299461620746 134 390 0 0 0 0
+ 0 0 +391 0 136 391 1 2 2 2 1 FFF1 392 393 394 45 4 392 2.070796326794897 -.0546
+5598923241485 2.070796326794897 .06775000000000007 127 2 393 2 2 128 2 394 -.061
+20299461620746 .06120299461620746 137 395 395 0 2 383 397 398 +168 385 0 ?141 39
+6 395 418 364 168 133 397 397 0 92 395 399 0 +395 .04449999999999993 -.011985638
+46510507 -.02193956404725931 .1669059892324148 -.01198563846510507 -.02193956404
+725931 -.06120299461620746 .06120299461620746 141 398 397 398 398 395 137 399 39
+9 0 2 397 401 402 +163 390 0 ?141 400 399 346 378 163 133 401 401 0 90 399 413 0
+ +399 .1669059892324148 -.01198563846510507 -.02193956404725931 .044499999999999
+93 -.01198563846510507 -.02193956404725931 -.06120299461620746 .0612029946162074
+6 141 402 401 402 402 399 134 403 0 0 0 0 0 0 +404 0 136 404 9 10 2 2 1 FFF1 405
+ 406 407 45 20 405 -.01198563846510512 .04693956404725931 -.01964396835178997 .0
+4275579936211825 -.02565952724128575 .03556452076107224 -.02868150293989984 .026
+10351883123082 -.02774989765967498 .01581560312344492 -.0227217371777086 .006611
+617098405742 -.01456810309652178 .0002691137063089467 -.004974164047110026 -.002
+299782585028928 .004327308578420268 -.001123328732400362 .01198563846510512 .003
+060435952740703 127 2 406 10 10 128 2 407 .2088495408493621 .287389357189107 134
+ 408 0 0 0 0 0 0 +409 0 136 409 1 2 2 2 1 FFF1 410 411 412 45 4 410 5.2123889803
+84683 .06775000000000009 2.070796326794904 .06775000000000009 127 2 411 2 2 128
+ 2 412 .2088495408493621 .2873893571891066 137 413 413 0 2 401 415 416 +208 403
+ 0 ?141 414 413 256 342 208 133 415 415 0 121 413 417 0 +413 .04449999999999992
+ -.01198563846510512 -.0219395640472593 .04449999999999992 .01198563846510512 .0
+2193956404725931 .2088495408493621 .287389357189107 141 416 415 416 416 413 137
+ 417 417 0 2 415 419 420 +168 408 0 ?141 418 417 432 396 168 133 419 419 0 91 41
+7 431 0 +417 .04449999999999992 .01198563846510491 .02193956404725939 .044499999
+99999992 -.01198563846510522 -.02193956404725922 .2088495408493621 .287389357189
+1066 141 420 419 420 420 417 134 421 0 0 0 0 0 0 +422 0 136 422 1 2 2 2 1 FFF1 4
+23 424 425 45 4 423 2.070796326794895 -.05465598923241487 5.212388980384688 -.05
+465598923241487 127 2 424 2 2 128 2 425 .2088495408493619 .2873893571891067 134
+ 426 0 0 0 0 0 0 +427 0 136 427 9 10 2 2 1 FFF1 428 429 430 45 20 428 .011985638
+46510554 .07306043595274095 .004327308578420805 .06887667126759973 -.00497416404
+7109429 .06770021741497098 -.0145681030965212 .07026911370630865 -.0227217371777
+0813 .07661161709840524 -.02774989765967468 .08581560312344427 -.028681502939899
+76 .09610351883123011 -.02565952724128588 .1055645207610716 -.01964396835179027
+ .1127557993621177 -.01198563846510554 .1169395640472589 127 2 429 10 10 128 2 4
+30 .2088495408493619 .2873893571891059 137 431 431 0 2 419 433 434 +168 421 0 ?1
+41 432 431 364 418 168 133 433 433 0 93 431 435 0 +431 .1669059892324149 -.01198
+563846510503 -.02193956404725933 .1669059892324149 .01198563846510503 .021939564
+04725933 .2088495408493619 .2873893571891067 141 434 433 434 434 431 137 435 435
+ 0 2 433 437 438 +213 426 0 ?141 436 435 504 382 213 133 437 437 0 128 435 449 0
+ +435 .166905989232415 .01198563846510554 .02193956404725897 .166905989232415 -.
+01198563846510554 -.02193956404725897 .2088495408493619 .2873893571891059 141 43
+8 437 438 438 435 134 439 0 0 0 0 0 0 +440 0 136 440 1 2 2 2 1 FFF1 441 442 443
+ 45 4 441 4.21238898038469 0 4.21238898038469 .02309401076758507 127 2 442 2 2 1
+28 2 443 -.02309401076758506 .02309401076758506 134 444 0 0 0 0 0 0 +445 0 136 4
+45 1 2 2 2 1 FFF1 446 447 448 45 4 446 4.21238898038469 .02309401076758507 4.212
+38898038469 0 127 2 447 2 2 128 2 448 -.02309401076758506 .02309401076758506 137
+ 449 449 0 2 437 451 452 +178 439 0 ?141 450 449 490 544 178 133 451 451 0 100 4
+49 453 0 +449 .1669059892324149 -.04554542616739928 -.08337034337958535 .19 -.06
+472244771156742 -.1184736458552003 -.02309401076758506 .02309401076758506 141 45
+2 451 452 452 449 137 453 453 0 2 451 455 456 +173 444 0 ?141 454 453 468 508 17
+3 133 455 455 0 98 453 467 0 +453 .19 -.06472244771156742 -.1184736458552003 .16
+69059892324149 -.04554542616739928 -.08337034337958535 -.02309401076758506 .0230
+9401076758506 141 456 455 456 456 453 134 457 0 0 0 0 0 0 +458 0 136 458 1 2 2 2
+ 1 FFF1 459 460 461 45 4 459 7.353981633974483 .02309401076758507 4.212388980384
+69 .02309401076758507 127 2 460 2 2 128 2 461 -.1570796326794896 .15707963267948
+96 134 462 0 0 0 0 0 0 +463 0 136 463 1 2 2 2 1 FFF1 464 465 466 45 4 464 2.0707
+96326794893 -.07775 -1.070796326794897 -.07775 127 2 465 2 2 128 2 466 -.1570796
+326794896 .1570796326794896 137 467 467 0 2 455 469 470 +173 457 0 ?141 468 467
+ 486 454 173 133 469 469 0 97 467 471 0 +467 .19 .06472244771156741 .11847364585
+52003 .19 -.06472244771156742 -.1184736458552003 -.1570796326794896 .15707963267
+94896 141 470 469 470 470 467 137 471 471 0 2 469 473 474 +183 462 0 ?141 472 47
+1 562 594 183 133 473 473 0 103 471 485 0 +471 .19 -.06472244771156699 -.1184736
+458552006 .19 .06472244771156728 .1184736458552004 -.1570796326794896 .157079632
+6794896 141 474 473 474 474 471 134 475 0 0 0 0 0 0 +476 0 136 476 1 2 2 2 1 FFF
+1 477 478 479 45 4 477 1.070796326794897 0 1.070796326794897 .02309401076758507
+ 127 2 478 2 2 128 2 479 -.02309401076758506 .02309401076758506 134 480 0 0 0 0
+ 0 0 +481 0 136 481 1 2 2 2 1 FFF1 482 483 484 45 4 482 1.070796326794897 .02309
+401076758507 1.070796326794897 0 127 2 483 2 2 128 2 484 -.02309401076758506 .02
+309401076758506 137 485 485 0 2 473 487 488 +173 475 0 ?141 486 485 508 468 173
+ 133 487 487 0 96 485 489 0 +485 .1669059892324149 .04554542616739927 .083370343
+37958535 .19 .06472244771156741 .1184736458552003 -.02309401076758506 .023094010
+76758506 141 488 487 488 488 485 137 489 489 0 2 487 491 492 +178 480 0 ?141 490
+ 489 522 450 178 133 491 491 0 102 489 503 0 +489 .19 .06472244771156735 .118473
+6458552003 .1669059892324149 .04554542616739923 .08337034337958538 -.02309401076
+758506 .02309401076758506 141 492 491 492 492 489 134 493 0 0 0 0 0 0 +494 0 136
+ 494 9 10 2 2 1 FFF1 495 496 497 45 20 495 .04554542616739923 .01162965662041458
+ .07464707973680164 .02752796242395054 .09750620351688563 .05485482110792529 .10
+89897111716192 .09080662844132262 .1054496111067649 .129900708130909 .0863426012
+7529271 .1648758550260579 .05535879176678288 .1889773679160257 .0189018233790182
+9 .1987391738231097 -.0164437725979968 .1942686491831212 -.04554542616739923 .17
+83703433795852 127 2 496 10 10 128 2 497 -.1570796326794896 .1570796326794896 13
+4 498 0 0 0 0 0 0 +499 0 136 499 1 2 2 2 1 FFF1 500 501 502 45 4 500 4.212388980
+384691 0 7.353981633974481 0 127 2 501 2 2 128 2 502 -.1570796326794896 .1570796
+326794896 137 503 503 0 2 491 505 506 +213 493 0 ?141 504 503 540 436 213 133 50
+5 505 0 126 503 507 0 +503 .166905989232415 .04554542616739923 .0833703433795853
+4 .166905989232415 -.04554542616739923 -.08337034337958532 -.1570796326794896 .1
+570796326794896 141 506 505 506 506 503 137 507 507 0 2 505 509 510 +173 498 0 ?
+141 508 507 454 486 173 133 509 509 0 95 507 521 0 +507 .1669059892324149 -.0455
+454261673992 -.08337034337958539 .1669059892324149 .04554542616739941 .083370343
+37958528 -.1570796326794896 .1570796326794896 141 510 509 510 510 507 134 511 0
+ 0 0 0 0 0 +512 0 136 512 1 2 2 2 1 FFF1 513 514 515 45 4 513 4.21238898038469 .
+02309401076758507 1.070796326794897 .02309401076758507 127 2 514 2 2 128 2 515 .
+1570796326794896 .4712388980384689 134 516 0 0 0 0 0 0 +517 0 136 517 1 2 2 2 1
+ FFF1 518 519 520 45 4 518 5.212388980384684 -.07775 2.070796326794893 -.07775 1
+27 2 519 2 2 128 2 520 .1570796326794896 .4712388980384689 137 521 521 0 2 509 5
+23 524 +178 511 0 ?141 522 521 544 490 178 133 523 523 0 101 521 525 0 +521 .19
+ -.06472244771156742 -.1184736458552003 .19 .06472244771156741 .1184736458552003
+ .1570796326794896 .4712388980384689 141 524 523 524 524 521 137 525 525 0 2 523
+ 527 528 +188 516 0 ?141 526 525 558 612 188 133 527 527 0 107 525 539 0 +525 .1
+9 .06472244771156675 .1184736458552007 .19 -.06472244771156699 -.118473645855200
+6 .1570796326794896 .4712388980384689 141 528 527 528 528 525 134 529 0 0 0 0 0
+ 0 +530 0 136 530 9 10 2 2 1 FFF1 531 532 533 45 20 531 -.0455454261673991 .1783
+703433795854 -.07464707973680154 .1624720375760494 -.09750620351688558 .13514517
+88920747 -.1089897111716192 .09919337155867739 -.1054496111067649 .0600992918690
+91 -.08634260127529284 .02512414497394211 -.05535879176678304 .00102263208397418
+4 -.01890182337901845 -.008739173823109847 .01644377259799664 -.0042686491831214
+2 .0455454261673991 .0116296566204145 127 2 532 10 10 128 2 533 .157079632679489
+6 .4712388980384688 134 534 0 0 0 0 0 0 +535 0 136 535 1 2 2 2 1 FFF1 536 537 53
+8 45 4 536 1.070796326794898 0 4.212388980384691 0 127 2 537 2 2 128 2 538 .1570
+796326794896 .4712388980384688 137 539 539 0 2 527 541 542 +213 529 0 ?141 540 5
+39 382 504 213 133 541 541 0 125 539 543 0 +539 .166905989232415 -.0455454261673
+991 -.08337034337958543 .166905989232415 .0455454261673991 .08337034337958542 .1
+570796326794896 .4712388980384688 141 542 541 542 542 539 137 543 543 0 2 541 54
+5 546 +178 534 0 ?141 544 543 450 522 178 133 545 545 0 99 543 557 0 +543 .16690
+59892324149 .04554542616739912 .08337034337958543 .1669059892324149 -.0455454261
+673992 -.08337034337958539 .1570796326794896 .4712388980384688 141 546 545 546 5
+46 543 134 547 0 0 0 0 0 0 +548 0 136 548 1 2 2 2 1 FFF1 549 550 551 45 4 549 2.
+070796326794895 -.07775 2.070796326794895 -.08775 127 2 550 2 2 128 2 551 -.0877
+5 -.07775 134 552 0 0 0 0 0 0 +553 0 136 553 1 2 2 2 1 FFF1 554 555 556 45 4 554
+ 2.070796326794895 -.08775 2.070796326794895 -.07775 127 2 555 2 2 128 2 556 -.0
+8775 -.07775 137 557 557 0 2 545 559 560 +188 547 0 ?141 558 557 598 526 188 133
+ 559 559 0 108 557 561 0 +557 .19 -.0647224477115672 -.1184736458552005 .2 -.064
+7224477115672 -.1184736458552005 -.08775 -.07775 141 560 559 560 560 557 137 561
+ 561 0 2 559 563 564 +183 552 0 ?141 562 561 576 472 183 133 563 563 0 106 561 5
+75 0 +561 .2 -.0647224477115672 -.1184736458552005 .19 -.0647224477115672 -.1184
+736458552005 -.08775 -.07775 141 564 563 564 564 561 134 565 0 0 0 0 0 0 +566 0
+ 136 566 1 2 2 2 1 FFF1 567 568 569 45 4 567 -1.070796326794898 -.08775 2.070796
+326794893 -.08775 127 2 568 2 2 128 2 569 .703672512351933 1.127787520586555 134
+ 570 0 0 0 0 0 0 +571 0 136 571 1 2 2 2 1 FFF1 572 573 574 45 4 572 2.0707963267
+94895 .02 -1.070796326794897 .02 127 2 573 2 2 128 2 574 .703672512351933 1.1277
+87520586555 137 575 575 0 2 563 577 578 +183 565 0 ?141 576 575 594 562 183 133
+ 577 577 0 105 575 579 0 +575 .2 .06472244771156718 .1184736458552005 .2 -.06472
+244771156699 -.1184736458552006 .703672512351933 1.127787520586555 141 578 577 5
+78 578 575 137 579 579 0 2 577 581 582 +193 570 0 ?141 580 579 634 666 193 133 5
+81 581 0 111 579 593 0 +579 .2 -.06472244771156717 -.1184736458552004 .2 .064722
+44771156736 .1184736458552003 .703672512351933 1.127787520586555 141 582 581 582
+ 582 579 134 583 0 0 0 0 0 0 +584 0 136 584 1 2 2 2 1 FFF1 585 586 587 45 4 585
+ 5.212388980384689 -.07775 5.212388980384689 -.08775 127 2 586 2 2 128 2 587 -.0
+8775 -.07775 134 588 0 0 0 0 0 0 +589 0 136 589 1 2 2 2 1 FFF1 590 591 592 45 4
+ 590 5.212388980384688 -.08775 5.212388980384688 -.07775 127 2 591 2 2 128 2 592
+ -.08775 -.07775 137 593 593 0 2 581 595 596 +183 583 0 ?141 594 593 472 576 183
+ 133 595 595 0 104 593 597 0 +593 .19 .06472244771156728 .1184736458552004 .2 .0
+6472244771156728 .1184736458552004 -.08775 -.07775 141 596 595 596 596 593 137 5
+97 597 0 2 595 599 600 +188 588 0 ?141 598 597 612 558 188 133 599 599 0 110 597
+ 611 0 +597 .2 .06472244771156718 .1184736458552005 .19 .06472244771156718 .1184
+736458552005 -.08775 -.07775 141 600 599 600 600 597 134 601 0 0 0 0 0 0 +602 0
+ 136 602 1 2 2 2 1 FFF1 603 604 605 45 4 603 2.070796326794893 -.08775 5.2123889
+80384686 -.08775 127 2 604 2 2 128 2 605 1.127787520586555 1.551902528821177 134
+ 606 0 0 0 0 0 0 +607 0 136 607 1 2 2 2 1 FFF1 608 609 610 45 4 608 5.2123889803
+84688 .02 2.070796326794895 .02 127 2 609 2 2 128 2 610 1.127787520586555 1.5519
+02528821177 137 611 611 0 2 599 613 614 +188 601 0 ?141 612 611 526 598 188 133
+ 613 613 0 109 611 615 0 +611 .2 -.06472244771156699 -.1184736458552006 .2 .0647
+2244771156697 .1184736458552006 1.127787520586555 1.551902528821177 141 614 613
+ 614 614 611 137 615 615 0 2 613 617 618 +198 606 0 ?141 616 615 630 684 198 133
+ 617 617 0 115 615 629 0 +615 .2 .06472244771156716 .1184736458552004 .2 -.06472
+244771156717 -.1184736458552004 1.127787520586555 1.551902528821177 141 618 617
+ 618 618 615 134 619 0 0 0 0 0 0 +620 0 136 620 1 2 2 2 1 FFF1 621 622 623 45 4
+ 621 2.070796326794897 .02 2.070796326794897 0 127 2 622 2 2 128 2 623 0 .039698
+87546571364 134 624 0 0 0 0 0 0 +625 0 136 625 1 2 2 2 1 FFF1 626 627 628 45 4 6
+26 2.070796326794897 0 2.070796326794897 .02 127 2 627 2 2 128 2 628 0 .03969887
+546571364 137 629 629 0 2 617 631 632 +198 619 0 ?141 630 629 670 616 198 133 63
+1 631 0 116 629 633 0 +629 .2 -.06472244771156738 -.1184736458552003 .22 -.04828
+157157653611 -.08837882395583027 0 .03969887546571364 141 632 631 632 632 629 13
+7 633 633 0 2 631 635 636 +193 624 0 ?141 634 633 648 580 193 133 635 635 0 114
+ 633 647 0 +633 .22 -.04828157157653611 -.08837882395583027 .2 -.064722447711567
+38 -.1184736458552003 0 .03969887546571364 141 636 635 636 636 633 134 637 0 0 0
+ 0 0 0 +638 0 136 638 1 2 2 2 1 FFF1 639 640 641 45 4 639 -1.070796326794897 0 2
+.070796326794895 0 127 2 640 2 2 128 2 641 .5212388980384689 .8353981633974481 1
+34 642 0 0 0 0 0 0 +643 0 136 643 9 10 2 2 1 FFF1 644 645 646 45 20 644 -.048281
+57157653611 .0883788239558303 -.01743163365648229 .1052322218530821 .02003735205
+038763 .1099713136467773 .05868447596153233 .09962306640704698 .0915296405012299
+7 .07407365304942816 .1117845055979172 .03699737118500002 .1155372774797996 -.00
+4445288717096436 .1033638971112879 -.04255690397992007 .07913150949658993 -.0715
+2542605857855 .04828157157653611 -.0883788239558303 127 2 645 10 10 128 2 646 .5
+212388980384689 .8353981633974481 137 647 647 0 2 635 649 650 +193 637 0 ?141 64
+8 647 666 634 193 133 649 649 0 113 647 651 0 +647 .22 .04828157157653602 .08837
+882395583031 .22 -.04828157157653595 -.08837882395583037 .5212388980384689 .8353
+981633974481 141 650 649 650 650 647 137 651 651 0 2 649 653 654 +218 642 0 ?141
+ 652 651 688 688 218 133 653 653 0 129 651 665 0 +651 .22 -.04828157157653611 -.
+0883788239558303 .22 .04828157157653611 .0883788239558303 .5212388980384689 .835
+3981633974481 141 654 653 654 654 651 134 655 0 0 0 0 0 0 +656 0 136 656 1 2 2 2
+ 1 FFF1 657 658 659 45 4 657 5.21238898038469 .02 5.21238898038469 0 127 2 658 2
+ 2 128 2 659 0 .03969887546571364 134 660 0 0 0 0 0 0 +661 0 136 661 1 2 2 2 1 F
+FF1 662 663 664 45 4 662 5.212388980384688 0 5.212388980384688 .02 127 2 663 2 2
+ 128 2 664 0 .03969887546571364 137 665 665 0 2 653 667 668 +193 655 0 ?141 666
+ 665 580 648 193 133 667 667 0 112 665 669 0 +665 .2 .06472244771156736 .1184736
+458552003 .22 .0482815715765361 .08837882395583027 0 .03969887546571364 141 668
+ 667 668 668 665 137 669 669 0 2 667 671 672 +198 660 0 ?141 670 669 684 630 198
+ 133 671 671 0 118 669 683 0 +669 .22 .04828157157653595 .08837882395583037 .2 .
+06472244771156716 .1184736458552004 0 .03969887546571364 141 672 671 672 672 669
+ 134 673 0 0 0 0 0 0 +674 0 136 674 1 2 2 2 1 FFF1 675 676 677 45 4 675 2.070796
+326794895 0 5.212388980384688 0 127 2 676 2 2 128 2 677 .8353981633974481 1.1495
+57428756427 134 678 0 0 0 0 0 0 +679 0 136 679 9 10 2 2 1 FFF1 680 681 682 45 20
+ 680 .04828157157653597 -.08837882395583038 .01743163365648213 -.105232221853082
+1 -.0200373520503878 -.1099713136467772 -.05868447596153251 -.09962306640704689
+ -.09152964050123008 -.07407365304942803 -.1117845055979173 -.03699737118499985
+ -.1155372774797996 .004445288717096624 -.1033638971112878 .04255690397992024 -.
+07913150949658981 .07152542605857867 -.04828157157653597 .08837882395583038 127
+ 2 681 10 10 128 2 682 .8353981633974481 1.149557428756427 137 683 683 0 2 671 6
+85 686 +198 673 0 ?141 684 683 616 670 198 133 685 685 0 117 683 687 0 +683 .22
+ -.04828157157653595 -.08837882395583037 .22 .04828157157653595 .088378823955830
+37 .8353981633974481 1.149557428756427 141 686 685 686 686 683 137 687 687 0 2 6
+85 689 690 +218 678 0 ?141 688 687 652 652 218 133 689 689 0 130 687 0 0 +687 .2
+2 .04828157157653597 .08837882395583038 .22 -.04828157157653597 -.08837882395583
+038 .8353981633974481 1.149557428756427 141 690 689 690 690 687 81 1 691 691 154
+ 2 0 0 221 0 692 84 16 692 MechanicalTool.111 693 693 0 1 2 694 1 0 0 0 0 100 69
+4 694 693 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 ?81 1 695 695 154 1 0 0 0 0 698 70 696
+ 696 1 0 0 4 1 20 4 697 697 1 T74 20 697 1 0 695 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 84 7 698 brut_2D1 0 
\ No newline at end of file
diff --git a/contrib/Parasolid/interface_parasolid/testcases/bsurf.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/bsurf.xmt_txt
new file mode 100644
index 0000000..8c28d69
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/bsurf.xmt_txt
@@ -0,0 +1,49 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=psworkshop;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=C:\Documents and Settings\shaned\My Documents\Visual Studio 2005\Projects\DotNetExampleApplication\DotNetExampleApplication\bin\Debug\bsurf.xmt_txt.x_t;
+FILE=C:\documents and settings\shaned\my documents\visual studio 2005\projects\dotnetexampleapplication\dotnetexampleapplication\bin\debug\bsurf.xmt_txt.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_1701061_17100;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 170106117 SCH_1700000_161000 12
+ 1 53 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 3 1 4 5 6 7 8 9 10 81 2 2 53 11 1 0 0 0 0 1
+2 13 70 3 0 4 T1 0 0 1 20 1 14 14 13 4 2 0 1 0 15 0 0 8 15 124 5 46 0 15 0 0 0 +
+16 17 134 6 51 0 9 18 0 0 +19 20 29 7 40 0 10 21 0 .1 0 0 19 8 1 0 1 0 0 4 V16 9
+ 12 0 ?22 0 23 6 0 0 1 18 10 11 0 24 0 25 7 ?1 17 24 0 0 0 0 10 22 9 0 26 -18 25
+ 9 0 27 10 28 21 ?1 17 27 0 0 0 0 25 26 23 0 29 -18 28 7 0 30 25 31 32 ?1 29 21
+ 36 0 25 33 7 .1 .1 .02 29 33 32 0 31 32 21 0 0 0 18 31 6 0 22 28 0 33 ?1 29 32
+ 30 0 28 0 33 0 .1 .02 17 22 0 34 35 26 31 24 9 0 36 +15 34 4 0 35 15 0 17 35 0
+ 34 29 22 28 36 37 0 0 +17 26 0 34 22 29 10 27 23 0 0 +17 36 0 0 0 0 31 35 37 0
+ 0 -16 37 5 0 ?35 38 0 39 0 0 1 16 38 8 0 ?29 23 37 40 0 0 1 134 39 34 0 37 0 40
+ 0 +41 42 134 40 38 0 38 39 18 0 +43 44 136 41 3 4 3 2 1 FFF1 45 46 47 135 42 2
+ 0 45 12 45 0 0 0 0 .03 .02 0 .07 .03 0 .1 .02 127 2 46 4 4 128 2 47 0 1 134 18
+ 49 0 23 40 6 0 +48 49 136 43 3 4 3 2 1 FFF1 50 51 52 135 44 2 0 45 12 50 0 .1 .
+02 .03 .1 .015 .07 .1 .015 .1 .1 .02 127 2 51 4 4 128 2 52 0 1 16 23 10 0 ?26 9
+ 38 18 0 0 1 136 48 3 4 3 2 5 FFF1 53 54 55 135 49 2 0 45 12 53 .1 .1 .02 .1 .07
+ .03 .1 .03 .02 .1 0 0 127 2 54 4 4 128 2 55 0 1 17 29 0 34 26 35 25 30 38 0 0 +
+17 30 0 0 0 0 28 29 38 0 35 -14 15 3 0 ?0 0 34 4 5 +0 0 0 0 4 136 19 3 4 3 2 5 F
+FF1 56 57 58 135 20 2 0 45 12 56 .1 0 0 .07 0 .01 .03 0 .01 0 0 0 127 2 57 4 4 1
+28 2 58 0 1 126 16 FF3 3 4 4 5 5 2 2 FFF2 3 59 60 61 62 63 125 17 0 1 0 1 0 1 0
+ 1 2 BBBBBBBB????0 0 0 0 45 48 59 0 0 0 .03 0 .01 .07 0 .01 .1 0 0 0 .03 .02 .03
+ .03 .03 .07 .03 .03 .1 .03 .02 0 .07 .03 .03 .07 .04 .07 .07 .04 .1 .07 .03 0 .
+1 .02 .03 .1 .015 .07 .1 .015 .1 .1 .02 127 2 60 4 4 127 2 61 4 4 128 2 62 0 1 1
+28 2 63 0 1 74 20 14 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 11 64 65 9
+000 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 1 83 24 12 -.485267877578735 .265651136636
+734 -.833032429218292 0 -.854305922985077 -.3469566106796265 .387017101049423 0
+ -.186214655637741 .899471819400787 .395314633846283 0 0 0 0 1 1 .05 .05 .02 .09
+546838090494 0 0 0 82 1 13 0 79 12 65 SDL/ParaView1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/fan.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/fan.xmt_txt
new file mode 100644
index 0000000..66a7070
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/fan.xmt_txt
@@ -0,0 +1,1176 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=psworkshop;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=C:\Program Files\Parasolid\Example Application\Example parts\fan.x_t;
+FILE=C:\program files\parasolid\example application\example parts\fan.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_1401178_14000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 140117823 SCH_1401178_14000_1300
+6185 0 12 255 1 3813 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 81 255 2
+ 2 3813 11 1 12 0 0 0 13 14 70 11 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDC
+CDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ3 0 4 T1 0 0 14 20 1 15 15 13
+ 255 4 3 0 1 0 16 0 0 17 0 51 255 5 28 0 18 19 0 0 --.025 0 867361737988404e-33
+ 1 0 0 .05 0 0 -1 30 255 6 3295 0 9 20 0 0 +-.188630860989919 -.0036213203435595
+95 .001499999999999972 1 -3469446951953615e-32 607153216591883e-31 29 255 7 3213
+ 0 10 21 0 -.025 -.0307414623988915 .0328627827424511 19 255 8 15 0 1 17 0 22 V1
+6 255 9 3167 0 ?23 0 24 6 0 0 1 18 255 10 3211 0 25 0 26 7 ?1 17 255 25 0 27 28
+ 29 10 30 31 0 32 -18 26 3175 0 33 10 34 21 ?1 17 33 0 35 36 37 26 29 38 0 39 -1
+8 34 3164 0 40 26 41 42 ?1 29 21 3177 0 26 42 7 0 -.00149999999999998 .003621320
+34355961 29 42 3166 0 34 43 21 -.025 -.003621320343559595 .001499999999999982 29
+ 43 3163 0 41 44 42 2533629714762495e-33 -.0036213203435596 .001499999999999984
+ 18 41 3161 0 45 34 46 43 ?1 29 44 2846 0 46 47 43 -.025 -.04497499305169485 .00
+1499999999999974 18 46 2844 0 48 41 49 44 ?1 29 47 2801 0 49 50 44 -.025 -.00362
+132034355958 -.0015 18 49 2799 0 51 46 52 47 ?1 29 50 2798 0 52 53 47 1791546752
+3243e-31 -.00362132034355959 -.0015 18 52 2796 0 54 49 55 50 ?1 29 53 2509 0 55
+ 56 50 -.025 -.0328627827424511 -.0307414623988915 18 55 2507 0 57 52 58 53 ?1 2
+9 56 2480 0 58 59 53 -.025 -.001499999999999982 -.003621320343559635 18 58 2478
+ 0 60 55 61 56 ?1 29 59 2454 0 61 62 56 0 -.001499999999999984 -.003621320343559
+62 18 61 2452 0 63 58 64 59 ?1 29 62 2154 0 64 65 59 -.025 -.001499999999999954
+ -.04497499305169485 18 64 2152 0 66 61 67 62 ?1 29 65 1838 0 67 68 62 -.025 .03
+07414623988915 -.03286278274245105 18 67 1836 0 69 64 70 65 ?1 29 68 1809 0 70 7
+1 65 -.025 .00362132034355963 -.00149999999999996 18 70 1807 0 72 67 73 68 ?1 29
+ 71 1806 0 73 74 68 -2533629714762495e-33 .003621320343559625 -.0014999999999999
+62 18 73 1804 0 75 70 76 71 ?1 29 74 1528 0 76 77 71 -.025 .04497499305169485 -.
+001499999999999958 18 76 1526 0 78 73 79 74 ?1 29 77 1501 0 79 80 74 -.025 .0036
+21320343559605 .0015 18 79 1499 0 81 76 82 77 ?1 29 80 1498 0 82 83 77 -17915467
+523243e-31 .003621320343559605 .0015 18 82 1496 0 84 79 85 80 ?1 29 83 1223 0 85
+ 86 80 -.025 .0328627827424511 .0307414623988915 18 85 1221 0 87 82 88 83 ?1 29
+ 86 1210 0 88 89 83 -.025 .001499999999999984 .00362132034355963 18 88 1208 0 90
+ 85 91 86 ?1 29 89 1001 0 91 92 86 -.025 .001499999999999984 .04497499305169485
+ 18 91 999 0 93 88 94 89 ?1 29 92 471 0 94 95 89 .01 -.0618718433538229 .0441941
+7382415925 18 94 164 0 96 91 97 92 ?1 29 95 472 0 97 98 92 .01 -.057572806488876
+7 .039895136959213 18 97 210 0 99 94 100 95 ?1 29 98 473 0 100 101 95 .01 -.0557
+274778454674 .02829661133392025 18 100 208 0 102 97 103 98 ?1 29 101 474 0 103 1
+04 98 .01 -.0557274778454674 -.02829661133392025 18 103 206 0 105 100 106 101 ?1
+ 29 104 475 0 106 107 101 .01 -.0575728064888767 -.039895136959213 18 106 204 0
+ 108 103 109 104 ?1 29 107 476 0 109 110 104 .01 -.0618718433538229 -.0441941738
+241592 18 109 202 0 111 106 112 107 ?1 29 110 477 0 112 113 107 .01 -.0441941738
+2415925 -.0618718433538228 18 112 200 0 114 109 115 110 ?1 29 113 478 0 115 116
+ 110 .01 -.039895136959213 -.0575728064888766 18 115 198 0 117 112 118 113 ?1 29
+ 116 479 0 118 119 113 .01 -.0282966113339203 -.0557274778454673 18 118 196 0 12
+0 115 121 116 ?1 29 119 480 0 121 122 116 .01 .0282966113339203 -.05572747784546
+73 18 121 194 0 123 118 124 119 ?1 29 122 481 0 124 125 119 .01 .039895136959213
+05 -.0575728064888766 18 124 192 0 126 121 127 122 ?1 29 125 482 0 127 128 122 .
+01 .0441941738241592 -.0618718433538228 18 127 190 0 129 124 130 125 ?1 29 128 4
+83 0 130 131 125 .01 .0618718433538228 -.0441941738241593 18 130 188 0 132 127 1
+33 128 ?1 29 131 484 0 133 134 128 .01 .0575728064888766 -.039895136959213 18 13
+3 186 0 135 130 136 131 ?1 29 134 485 0 136 137 131 .01 .0557274778454673 -.0282
+966113339203 18 136 184 0 138 133 139 134 ?1 29 137 486 0 139 140 134 .01 .05572
+74778454674 .0282966113339203 18 139 182 0 141 136 142 137 ?1 29 140 487 0 142 1
+43 137 .01 .0575728064888767 .039895136959213 18 142 180 0 144 139 145 140 ?1 29
+ 143 488 0 145 146 140 .01 .0618718433538229 .0441941738241592 18 145 178 0 147
+ 142 148 143 ?1 29 146 489 0 148 149 143 .01 .0441941738241593 .0618718433538229
+ 18 148 176 0 150 145 151 146 ?1 29 149 490 0 151 152 146 .01 .03989513695921295
+ .0575728064888766 18 151 174 0 153 148 154 149 ?1 29 152 491 0 154 155 149 .01
+ .0282966113339203 .0557274778454674 18 154 172 0 156 151 157 152 ?1 29 155 492
+ 0 157 158 152 .01 -.02829661133392025 .0557274778454674 18 157 170 0 159 154 16
+0 155 ?1 29 158 493 0 160 161 155 .01 -.03989513695921295 .0575728064888767 18 1
+60 168 0 162 157 163 158 ?1 29 161 494 0 163 164 158 .01 -.0441941738241592 .061
+8718433538229 18 163 166 0 165 160 166 161 ?1 29 164 495 0 166 167 161 -37884326
+24689715e-33 -.0618718433538229 .04419417382415925 18 166 209 0 168 163 169 164
+ ?1 29 167 496 0 169 170 164 -3525201231683225e-33 -.0575728064888767 .039895136
+959213 18 169 207 0 171 166 172 167 ?1 29 170 497 0 172 173 167 -341221117260275
+5e-33 -.0557274778454674 .02829661133392025 18 172 205 0 174 169 175 170 ?1 29 1
+73 498 0 175 176 170 -3412211172602755e-33 -.0557274778454674 -.0282966113339202
+5 18 175 203 0 177 172 178 173 ?1 29 176 499 0 178 179 173 -352520123168323e-32
+ -.0575728064888767 -.039895136959213 18 178 201 0 180 175 181 176 ?1 29 179 500
+ 0 181 182 176 -3788432624689715e-33 -.0618718433538229 -.0441941738241592 18 18
+1 199 0 183 178 184 179 ?1 29 182 501 0 184 185 179 -27060233033498e-31 -.044194
+17382415925 -.0618718433538228 18 184 197 0 186 181 187 182 ?1 29 185 502 0 187
+ 188 182 -244279191034331e-32 -.039895136959213 -.0575728064888766 18 187 195 0
+ 189 184 190 185 ?1 29 188 503 0 190 191 185 -1732610501558055e-33 -.02829661133
+39203 -.0557274778454673 18 190 193 0 192 187 193 188 ?1 29 191 504 0 193 194 18
+8 1732610501558055e-33 .0282966113339203 -.0557274778454673 18 193 191 0 195 190
+ 196 191 ?1 29 194 505 0 196 197 191 2442791910343315e-33 .03989513695921305 -.0
+575728064888766 18 196 189 0 198 193 199 194 ?1 29 197 506 0 199 200 194 2706023
+3033498e-31 .0441941738241592 -.0618718433538228 18 199 187 0 201 196 202 197 ?1
+ 29 200 507 0 202 203 197 378843262468971e-32 .0618718433538228 -.04419417382415
+93 18 202 185 0 204 199 205 200 ?1 29 203 508 0 205 206 200 352520123168322e-32
+ .0575728064888766 -.039895136959213 18 205 183 0 207 202 208 203 ?1 29 206 509
+ 0 208 209 203 341221117260275e-32 .0557274778454673 -.0282966113339203 18 208 1
+81 0 210 205 211 206 ?1 29 209 510 0 211 212 206 3412211172602755e-33 .055727477
+8454674 .0282966113339203 18 211 179 0 213 208 214 209 ?1 29 212 511 0 214 215 2
+09 352520123168323e-32 .0575728064888767 .039895136959213 18 214 177 0 216 211 2
+17 212 ?1 29 215 512 0 217 218 212 3788432624689715e-33 .0618718433538229 .04419
+41738241592 18 217 175 0 219 214 220 215 ?1 29 218 513 0 220 221 215 27060233033
+498e-31 .0441941738241593 .0618718433538229 18 220 173 0 222 217 223 218 ?1 29 2
+21 514 0 223 224 218 2442791910343305e-33 .03989513695921295 .0575728064888766 1
+8 223 171 0 225 220 226 221 ?1 29 224 515 0 226 227 221 1732610501558055e-33 .02
+82966113339203 .0557274778454674 18 226 169 0 228 223 229 224 ?1 29 227 516 0 22
+9 230 224 -173261050155805e-32 -.02829661133392025 .0557274778454674 18 229 167
+ 0 231 226 232 227 ?1 29 230 517 0 232 233 227 -2442791910343305e-33 -.039895136
+95921295 .0575728064888767 18 232 165 0 234 229 235 230 ?1 29 233 518 0 235 236
+ 230 -27060233033498e-31 -.0441941738241592 .0618718433538229 18 235 163 0 237 2
+32 238 233 ?1 29 236 1161 0 238 239 233 0 -.001499999999999982 .0449749930516948
+5 18 238 1071 0 240 235 241 236 ?1 29 239 1162 0 241 242 236 0 .0014999999999999
+84 .04497499305169485 18 241 1075 0 243 238 244 239 ?1 29 242 1164 0 244 245 239
+ -.025 -.001499999999999982 .04497499305169485 18 244 1077 0 246 241 247 242 ?1
+ 29 245 1462 0 247 248 242 192035315099782e-32 .0328627827424511 .03074146239889
+15 18 247 1347 0 249 244 250 245 ?1 29 248 1467 0 250 251 245 -17915467523243e-3
+1 .00149999999999998 .003621320343559625 18 250 1348 0 252 247 253 248 ?1 29 251
+ 1468 0 253 254 248 1974154985510385e-33 .03074146239889145 .0328627827424511 18
+ 253 1338 0 255 250 256 251 ?1 29 254 1469 0 256 257 251 -.025 .0307414623988914
+5 .0328627827424511 18 256 1342 0 258 253 259 254 ?1 29 257 1772 0 259 260 254 2
+845678589247815e-33 .04497499305169485 .0015 18 259 1646 0 261 256 262 257 ?1 29
+ 260 1773 0 262 263 257 266198763617446e-32 .04497499305169485 -.001499999999999
+96 18 262 1655 0 264 259 265 260 ?1 29 263 1777 0 265 266 260 -.025 .04497499305
+169485 .0015 18 265 1647 0 267 262 268 263 ?1 29 266 2086 0 268 269 263 21040441
+0407118e-32 .0328627827424511 -.03074146239889145 18 268 1960 0 270 265 271 266
+ ?1 29 269 2087 0 271 272 266 1790464032437035e-33 .0307414623988915 -.032862782
+74245105 18 271 1969 0 273 268 274 269 ?1 29 272 2091 0 274 275 269 -.025 .03286
+27827424511 -.03074146239889145 18 274 1961 0 276 271 277 272 ?1 29 275 2411 0 2
+77 278 272 -17915467523243e-31 .0015 -.00362132034355958 18 277 2288 0 279 274 2
+80 275 ?1 29 278 2412 0 280 281 275 1836909530733575e-34 .0015 -.044974993051694
+85 18 280 2286 0 282 277 283 278 ?1 29 281 2413 0 283 284 278 -1836909530733515e
+-34 -.001499999999999958 -.04497499305169485 18 283 2295 0 285 280 286 281 ?1 29
+ 284 2417 0 286 287 281 -.025 .0015 -.04497499305169485 18 286 2287 0 288 283 28
+9 284 ?1 29 287 2418 0 289 290 284 -.025 .0015 -.00362132034355958 18 289 2297 0
+ 291 286 292 287 ?1 29 290 2760 0 292 293 287 -2104044104071175e-33 -.0328627827
+424511 -.0307414623988915 18 292 2638 0 294 289 295 290 ?1 29 293 2765 0 295 296
+ 290 -179046403243703e-32 -.03074146239889145 -.0328627827424511 18 295 2640 0 2
+97 292 298 293 ?1 29 296 2766 0 298 299 293 -.025 -.03074146239889145 -.03286278
+27424511 18 298 2642 0 300 295 301 296 ?1 29 299 3123 0 301 302 296 -26619876361
+7446e-32 -.04497499305169485 -.0015 18 301 2999 0 303 298 304 299 ?1 29 302 3124
+ 0 304 305 299 -2845678589247815e-33 -.04497499305169485 .001499999999999976 18
+ 304 2997 0 306 301 307 302 ?1 29 305 3129 0 307 308 302 -.025 -.044974993051694
+85 -.0015 18 307 3000 0 309 304 310 305 ?1 29 308 3494 0 310 311 305 -1920353150
+99782e-32 -.0328627827424511 .0307414623988915 18 310 3370 0 312 307 313 308 ?1
+ 29 311 3495 0 313 314 308 -197415498551039e-32 -.0307414623988915 .032862782742
+4511 18 313 3368 0 28 310 315 311 ?1 29 314 3498 0 315 316 311 -.025 -.001499999
+999999976 .00362132034355961 18 315 3369 0 37 313 317 314 ?1 29 316 3500 0 317 0
+ 314 -.025 -.0328627827424511 .0307414623988915 18 317 3371 0 318 315 0 316 ?1 1
+7 318 0 319 320 321 317 322 323 0 324 -15 255 319 3407 0 318 325 0 17 320 0 319
+ 23 318 34 324 326 0 0 -17 321 0 319 318 23 310 327 328 0 322 -17 322 0 329 330
+ 331 310 318 323 0 0 +16 323 3322 0 ?322 38 332 333 0 0 1 17 324 0 334 335 336 3
+17 320 326 0 331 +15 334 3527 0 324 337 338 17 335 0 334 336 324 46 331 339 0 0
+ -17 336 0 334 324 335 34 48 340 0 320 +16 326 3339 0 ?324 332 328 341 0 0 1 17
+ 331 0 329 322 342 317 335 339 0 0 +15 329 593 0 330 16 0 17 342 0 329 331 343 4
+6 344 345 0 335 +16 339 2845 346 ?331 347 348 349 347 348 1 81 1 346 3611 350 33
+9 0 0 351 352 353 16 347 2508 351 ?354 355 339 349 355 339 1 16 348 3212 356 ?24
+6 339 357 349 339 358 1 31 255 349 616 0 358 359 360 0 +-.025 -1734723475976805e
+-33 1040834085586084e-32 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .045
+ 16 358 1000 361 ?362 363 364 349 348 364 1 31 359 666 0 357 365 349 0 -.01 -.05
+30330085889909 .0530330085889911 -1 612303176911189e-31 0 -612303176911189e-31 -
+1 0 .006 31 360 567 0 363 349 366 0 -.01 -1734723475976805e-33 1040834085586084e
+-32 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .045 16 363 532 0 ?367 36
+8 358 360 0 0 1 30 366 470 0 369 360 370 0 +-27060233033498e-31 -.04419417382415
+92 .0618718433538229 432963728535968e-31 .707106781186548 -.707106781186547 16 3
+69 45 371 ?372 373 368 366 0 0 1 31 370 469 0 373 366 374 0 +-200982818180734e-3
+2 -.0328240691473475 .0646438743007421 1 -612303176911189e-31 0 612303176911189e
+-31 1 0 .01 16 373 48 375 ?376 377 369 370 0 0 1 31 374 468 0 377 370 378 0 +-10
+6217669540302e-48 -1734723475976805e-33 1040834085586084e-32 -1 612303176911189e
+-31 0 612303176911189e-31 1 0 .0625 16 377 51 379 ?380 381 373 374 0 0 1 31 378
+ 467 0 381 374 382 0 +2009828181807345e-33 .03282406914734755 .0646438743007421
+ 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 16 381 54 383 ?384 385 377
+ 378 0 0 1 30 382 466 0 385 378 386 0 +27060233033498e-31 .0441941738241593 .061
+8718433538229 4329637285359705e-32 .707106781186552 .707106781186543 16 385 57 3
+87 ?388 389 381 382 0 0 1 31 386 465 0 389 382 390 0 +324722796401976e-32 .05303
+30085889911 .0530330085889911 -1 612303176911189e-31 0 -612303176911189e-31 -1 0
+ .0125 16 389 60 391 ?392 393 385 386 0 0 1 30 390 464 0 393 386 394 0 +37884326
+24689715e-33 .0618718433538229 .0441941738241592 -432963728535969e-31 -.70710678
+1186549 -.707106781186546 16 393 63 395 ?396 397 389 390 0 0 1 31 394 463 0 397
+ 390 398 0 +3958164960219195e-33 .0646438743007421 .0328240691473475 1 -61230317
+6911189e-31 0 612303176911189e-31 1 0 .01 16 397 66 399 ?400 401 393 394 0 0 1 3
+1 398 462 0 401 394 402 0 +-106217669540302e-48 -1734723475976805e-33 1040834085
+586084e-32 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .0625 16 401 69 40
+3 ?404 405 397 398 0 0 1 31 402 461 0 405 398 406 0 +395816496021919e-32 .064643
+8743007421 -.0328240691473476 1 -612303176911189e-31 0 612303176911189e-31 1 0 .
+01 16 405 72 407 ?408 409 401 402 0 0 1 30 406 460 0 409 402 410 0 +378843262468
+971e-32 .0618718433538228 -.0441941738241593 432963728535964e-31 .70710678118654
+1 -.707106781186554 16 409 75 411 ?412 413 405 406 0 0 1 31 410 459 0 413 406 41
+4 0 +324722796401975e-32 .053033008588991 -.053033008588991 -1 612303176911189e-
+31 0 -612303176911189e-31 -1 0 .01249999999999986 16 413 78 415 ?416 417 409 410
+ 0 0 1 30 414 458 0 417 410 418 0 +2706023303349795e-33 .0441941738241592 -.0618
+718433538227 -432963728535968e-31 -.707106781186548 .707106781186547 16 417 81 4
+19 ?420 421 413 414 0 0 1 31 418 457 0 421 414 422 0 +2009828181807345e-33 .0328
+240691473476 -.0646438743007421 1 -612303176911189e-31 0 612303176911189e-31 1 0
+ .01 16 421 84 423 ?424 425 417 418 0 0 1 31 422 456 0 425 418 426 0 +-106217669
+540302e-48 -1734723475976805e-33 1040834085586084e-32 -1 612303176911189e-31 0 6
+12303176911189e-31 1 0 .0625 16 425 87 427 ?428 429 421 422 0 0 1 31 426 455 0 4
+29 422 430 0 +-2009828181807345e-33 -.03282406914734755 -.0646438743007421 1 -61
+2303176911189e-31 0 612303176911189e-31 1 0 .01 16 429 90 431 ?432 433 425 426 0
+ 0 1 30 430 454 0 433 426 434 0 +-27060233033498e-31 -.04419417382415925 -.06187
+18433538228 -432963728535968e-31 -.707106781186548 -.707106781186547 16 433 93 4
+35 ?436 437 429 430 0 0 1 31 434 453 0 437 430 438 0 +-3247227964019755e-33 -.05
+30330085889911 -.053033008588991 -1 612303176911189e-31 0 612303176911189e-31 1
+ 0 .0125 16 437 96 439 ?440 441 433 434 0 0 1 30 438 452 0 441 434 442 0 +-37884
+32624689715e-33 -.0618718433538229 -.0441941738241592 432963728535968e-31 .70710
+6781186548 .707106781186547 16 441 99 443 ?444 445 437 438 0 0 1 31 442 451 0 44
+5 438 446 0 +-3958164960219195e-33 -.0646438743007421 -.0328240691473475 1 -6123
+03176911189e-31 0 -612303176911189e-31 -1 0 .01 16 445 102 447 ?448 449 441 442
+ 0 0 1 31 446 450 0 449 442 450 0 +-106217669540302e-48 -1734723475976805e-33 10
+40834085586084e-32 -1 612303176911189e-31 0 612303176911189e-31 1 0 .0625 16 449
+ 105 451 ?452 453 445 446 0 0 1 31 450 449 0 453 446 454 0 +-3958164960219195e-3
+3 -.0646438743007421 .0328240691473475 1 -612303176911189e-31 0 -612303176911189
+e-31 -1 0 .01 16 453 108 455 ?456 457 449 450 0 0 1 30 454 448 0 457 450 458 0 +
+-3788432624689715e-33 -.0618718433538229 .04419417382415925 -432963728535968e-31
+ -.707106781186548 .707106781186548 16 457 111 459 ?460 461 453 454 0 0 1 31 458
+ 447 0 368 454 462 0 +-3247227964019755e-33 -.0530330085889911 .0530330085889911
+ -1 612303176911189e-31 0 612303176911189e-31 1 0 .0125 16 368 42 463 ?464 369 3
+63 458 0 0 1 30 462 446 0 465 458 466 0 +.01 -.0441941738241592 .061871843353822
+9 432963728535968e-31 .707106781186548 -.707106781186547 16 465 117 0 ?467 468 4
+61 462 0 0 1 31 466 445 0 468 462 469 0 +.01 -.0328240691473475 .064643874300742
+1 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 16 468 119 0 ?470 471 465
+ 466 0 0 1 31 469 444 0 471 466 472 0 +.01 -1734723475976805e-33 104083408558608
+4e-32 -1 612303176911189e-31 0 612303176911189e-31 1 0 .0625 16 471 121 0 ?473 4
+74 468 469 0 0 1 31 472 443 0 474 469 475 0 +.01 .03282406914734755 .06464387430
+07421 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 16 474 123 0 ?476 477
+ 471 472 0 0 1 30 475 442 0 477 472 478 0 +.01 .0441941738241593 .06187184335382
+29 4329637285359705e-32 .707106781186552 .707106781186543 16 477 125 0 ?479 480
+ 474 475 0 0 1 31 478 441 0 480 475 481 0 +.01 .0530330085889911 .05303300858899
+11 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .0125 16 480 127 0 ?482 48
+3 477 478 0 0 1 30 481 440 0 483 478 484 0 +.01 .0618718433538229 .0441941738241
+592 -432963728535969e-31 -.707106781186549 -.707106781186546 16 483 129 0 ?485 4
+86 480 481 0 0 1 31 484 439 0 486 481 487 0 +.01 .0646438743007421 .032824069147
+3475 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 16 486 131 0 ?488 489
+ 483 484 0 0 1 31 487 438 0 489 484 490 0 +.01 -1734723475976805e-33 10408340855
+86084e-32 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .0625 16 489 133 0
+ ?491 492 486 487 0 0 1 31 490 437 0 492 487 493 0 +.01 .0646438743007421 -.0328
+240691473476 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 16 492 135 0 ?
+494 495 489 490 0 0 1 30 493 436 0 495 490 496 0 +.01 .0618718433538228 -.044194
+1738241593 432963728535964e-31 .707106781186541 -.707106781186554 16 495 137 0 ?
+497 498 492 493 0 0 1 31 496 435 0 498 493 499 0 +.01 .053033008588991 -.0530330
+08588991 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .01249999999999986 1
+6 498 139 0 ?500 501 495 496 0 0 1 30 499 434 0 501 496 502 0 +.01 .044194173824
+1592 -.0618718433538227 -432963728535968e-31 -.707106781186548 .707106781186547
+ 16 501 141 0 ?503 504 498 499 0 0 1 31 502 433 0 504 499 505 0 +.01 .0328240691
+473476 -.0646438743007421 1 -612303176911189e-31 0 612303176911189e-31 1 0 .01 1
+6 504 143 0 ?506 507 501 502 0 0 1 31 505 432 0 507 502 508 0 +.01 -173472347597
+6805e-33 1040834085586084e-32 -1 612303176911189e-31 0 612303176911189e-31 1 0 .
+0625 16 507 145 0 ?509 510 504 505 0 0 1 31 508 431 0 510 505 511 0 +.01 -.03282
+406914734755 -.0646438743007421 1 -612303176911189e-31 0 612303176911189e-31 1 0
+ .01 16 510 147 0 ?512 513 507 508 0 0 1 30 511 430 0 513 508 514 0 +.01 -.04419
+417382415925 -.0618718433538228 -432963728535968e-31 -.707106781186548 -.7071067
+81186547 16 513 149 0 ?515 516 510 511 0 0 1 31 514 429 0 516 511 517 0 +.01 -.0
+530330085889911 -.053033008588991 -1 612303176911189e-31 0 612303176911189e-31 1
+ 0 .0125 16 516 151 0 ?518 519 513 514 0 0 1 30 517 428 0 519 514 520 0 +.01 -.0
+618718433538229 -.0441941738241592 432963728535968e-31 .707106781186548 .7071067
+81186547 16 519 153 0 ?521 522 516 517 0 0 1 31 520 427 0 522 517 523 0 +.01 -.0
+646438743007421 -.0328240691473475 1 -612303176911189e-31 0 -612303176911189e-31
+ -1 0 .01 16 522 155 0 ?524 525 519 520 0 0 1 31 523 426 0 525 520 526 0 +.01 -1
+734723475976805e-33 1040834085586084e-32 -1 612303176911189e-31 0 61230317691118
+9e-31 1 0 .0625 16 525 157 0 ?527 528 522 523 0 0 1 31 526 425 0 528 523 529 0 +
+.01 -.0646438743007421 .0328240691473475 1 -612303176911189e-31 0 -6123031769111
+89e-31 -1 0 .01 16 528 159 0 ?530 531 525 526 0 0 1 30 529 424 0 531 526 532 0 +
+.01 -.0618718433538229 .04419417382415925 -432963728535968e-31 -.707106781186548
+ .707106781186548 16 531 160 0 ?533 534 528 529 0 0 1 31 532 423 0 461 529 535 0
+ +.01 -.0530330085889911 .0530330085889911 -1 612303176911189e-31 0 612303176911
+189e-31 1 0 .0125 16 461 115 0 ?536 465 457 532 0 0 1 30 535 422 0 534 532 537 0
+ +.01 -.0618718433538229 .04419417382415925 -1 0 0 16 534 161 0 ?168 538 531 535
+ 0 0 1 30 537 421 0 538 535 539 0 +.01 -.0575728064888767 .039895136959213 -1 0
+ 0 16 538 158 0 ?171 540 534 537 0 0 1 30 539 420 0 540 537 541 0 +.01 -.0557274
+778454674 .02829661133392025 -1 0 0 16 540 156 0 ?174 542 538 539 0 0 1 30 541 4
+19 0 542 539 543 0 +.01 -.0557274778454674 -.02829661133392025 -1 0 0 16 542 154
+ 0 ?177 544 540 541 0 0 1 30 543 418 0 544 541 545 0 +.01 -.0575728064888767 -.0
+39895136959213 -1 0 0 16 544 152 0 ?180 546 542 543 0 0 1 30 545 417 0 546 543 5
+47 0 +.01 -.0618718433538229 -.0441941738241592 -1 0 0 16 546 150 0 ?183 548 544
+ 545 0 0 1 30 547 416 0 548 545 549 0 +.01 -.04419417382415925 -.061871843353822
+8 -1 0 0 16 548 148 0 ?186 550 546 547 0 0 1 30 549 415 0 550 547 551 0 +.01 -.0
+39895136959213 -.0575728064888766 -1 0 0 16 550 146 0 ?189 552 548 549 0 0 1 30
+ 551 414 0 552 549 553 0 +.01 -.0282966113339203 -.0557274778454673 -1 0 0 16 55
+2 144 0 ?192 554 550 551 0 0 1 30 553 413 0 554 551 555 0 +.01 .0282966113339203
+ -.0557274778454673 -1 0 0 16 554 142 0 ?195 556 552 553 0 0 1 30 555 412 0 556
+ 553 557 0 +.01 .03989513695921305 -.0575728064888766 -1 0 0 16 556 140 0 ?198 5
+58 554 555 0 0 1 30 557 411 0 558 555 559 0 +.01 .0441941738241592 -.06187184335
+38228 -1 0 0 16 558 138 0 ?201 560 556 557 0 0 1 30 559 410 0 560 557 561 0 +.01
+ .0618718433538228 -.0441941738241593 -1 0 0 16 560 136 0 ?204 562 558 559 0 0 1
+ 30 561 409 0 562 559 563 0 +.01 .0575728064888766 -.039895136959213 -1 0 0 16 5
+62 134 0 ?207 564 560 561 0 0 1 30 563 408 0 564 561 565 0 +.01 .055727477845467
+3 -.0282966113339203 -1 0 0 16 564 132 0 ?210 566 562 563 0 0 1 30 565 407 0 566
+ 563 567 0 +.01 .0557274778454674 .0282966113339203 -1 0 0 16 566 130 0 ?213 568
+ 564 565 0 0 1 30 567 406 0 568 565 569 0 +.01 .0575728064888767 .03989513695921
+3 -1 0 0 16 568 128 0 ?216 570 566 567 0 0 1 30 569 405 0 570 567 571 0 +.01 .06
+18718433538229 .0441941738241592 -1 0 0 16 570 126 0 ?219 572 568 569 0 0 1 30 5
+71 404 0 572 569 573 0 +.01 .0441941738241593 .0618718433538229 -1 0 0 16 572 12
+4 0 ?222 574 570 571 0 0 1 30 573 403 0 574 571 575 0 +.01 .03989513695921295 .0
+575728064888766 -1 0 0 16 574 122 0 ?225 576 572 573 0 0 1 30 575 402 0 576 573
+ 577 0 +.01 .0282966113339203 .0557274778454674 -1 0 0 16 576 120 0 ?228 578 574
+ 575 0 0 1 30 577 401 0 578 575 579 0 +.01 -.02829661133392025 .0557274778454674
+ -1 0 0 16 578 118 0 ?231 580 576 577 0 0 1 30 579 400 0 580 577 581 0 +.01 -.03
+989513695921295 .0575728064888767 -1 0 0 16 580 116 0 ?234 582 578 579 0 0 1 30
+ 581 399 0 582 579 583 0 +.01 -.0441941738241592 .0618718433538229 -1 0 0 16 582
+ 114 0 ?237 584 580 581 0 0 1 31 583 27 0 584 581 585 0 +0 0 867361737988404e-33
+ -1 612303176911189e-31 0 612303176911189e-31 1 0 .05 16 584 162 586 ?587 588 58
+2 583 0 0 1 31 585 6 0 588 583 589 0 +-.025 0 867361737988404e-33 -1 61230317691
+1189e-31 0 612303176911189e-31 1 0 .05 16 588 5 0 ?590 591 584 585 0 0 1 30 589
+ 1031 0 592 585 593 0 +.188630860989919 .001499999999999984 .04497499305169485 -
+1 0 0 16 592 1011 0 ?594 595 596 589 0 0 1 30 593 1032 0 596 589 597 0 -.1886308
+60989919 -.001499999999999982 .04497499305169485 -1 0 0 16 596 1009 598 ?599 592
+ 591 593 0 0 1 31 597 1033 0 591 593 600 0 +0 -1734723475976805e-33 104083408558
+6084e-32 1 0 0 0 0 -1 .045 16 591 1006 601 ?240 596 588 597 0 0 1 30 600 1576 0
+ 595 597 602 0 +-.188630860989919 .00362132034355961 .0015 1 -3469446951953615e-
+32 -607153216591883e-31 16 595 1502 0 ?603 604 592 600 0 0 1 30 602 1890 0 604 6
+00 605 0 +-.188630860989919 .003621320343559645 -.00149999999999995 1 -867361737
+988404e-31 -607153216591883e-31 16 604 1810 0 ?606 607 595 602 0 0 1 30 605 2210
+ 0 607 602 20 0 +-.188630860989919 .00150000000000003 -.00362132034355958 1 -121
+4306433183764e-31 -2602085213965215e-32 16 607 2124 0 ?279 24 604 605 0 0 1 30 2
+0 2924 0 24 605 6 0 +-.188630860989919 -.003621320343559555 -.0015 1 -8673617379
+88404e-31 607153216591883e-31 16 24 2802 0 ?608 9 607 20 0 0 1 17 608 0 609 610
+ 611 52 51 24 0 612 +15 609 3036 0 309 613 0 17 610 0 609 309 608 301 612 614 0
+ 615 -17 611 0 609 608 309 49 616 617 0 0 -17 51 0 618 57 54 49 608 24 0 619 -17
+ 612 0 620 294 303 52 610 614 0 0 +15 620 3187 0 39 621 0 17 294 0 620 297 612 2
+92 54 622 0 623 +17 303 0 620 612 306 301 343 624 0 610 +16 614 2961 0 ?612 617
+ 625 626 0 0 1 16 617 2968 0 ?616 624 614 627 0 0 1 16 625 3162 0 ?306 614 340 6
+28 0 0 1 30 626 3110 0 614 628 627 0 +0 -.045000000224719 -.0015 612303176911189
+e-31 1 1836909530733565e-31 30 628 3116 0 625 629 626 0 +0 -.045000000224719 .00
+1499999999999976 -612303176911189e-31 -1 -1836909530733565e-31 30 627 3109 0 617
+ 626 630 0 +-.025 -.045000000224719 -.0015 -612303176911189e-31 -1 -183690953073
+3565e-31 31 630 3103 0 624 627 631 0 +0 -1734723475976805e-33 1040834085586084e-
+32 1 -612303176911189e-31 612303176911189e-31 612303176911189e-31 1 0 .045 16 62
+4 2959 632 ?303 633 617 630 0 0 1 30 631 3102 0 633 630 634 0 -.188630860989919
+ -.04497499305169485 -.00149999999999998 -1 0 0 16 633 2951 0 ?615 345 624 631 0
+ 0 1 30 634 3100 0 345 631 635 0 +.188630860989919 -.04497499305169485 .00149999
+9999999988 -1 0 0 16 345 2946 0 ?342 636 633 634 0 0 1 30 635 2758 0 636 634 637
+ 0 +-.025 -.0328804654840747 -.03075914514051515 432963728535968e-31 .7071067811
+86548 .707106781186548 16 636 2609 0 ?619 622 345 635 0 0 1 30 637 2755 0 622 63
+5 638 0 +0 -.03288046548407475 -.03075914514051515 -432963728535968e-31 -.707106
+781186548 -.707106781186548 16 622 2797 0 ?294 639 636 637 0 0 1 30 638 2749 0 6
+39 637 640 0 +0 -.0307591451405151 -.03288046548407475 432963728535968e-31 .7071
+06781186548 .707106781186548 16 639 2599 0 ?641 642 622 638 0 0 1 30 640 2748 0
+ 642 638 643 0 +-.025 -.0307591451405151 -.03288046548407475 -432963728535968e-3
+1 -.707106781186548 -.707106781186548 16 642 2606 0 ?644 645 639 640 0 0 1 30 64
+3 2747 0 645 640 646 0 +-.188630860989919 -.001499999999999982 -.003621320343559
+655 1 0 1474514954580286e-31 16 645 2617 0 ?647 648 642 643 0 0 1 30 646 2746 0
+ 648 643 649 0 -.188630860989919 -.0307414623988915 -.0328627827424511 -1 0 0 16
+ 648 2615 0 ?650 651 645 646 0 0 1 30 649 2744 0 651 646 652 0 +.188630860989919
+ -.0328627827424511 -.03074146239889145 -1 0 0 16 651 2610 0 ?653 654 648 649 0
+ 0 1 31 652 2740 0 654 649 655 0 +0 -1734723475976805e-33 1040834085586084e-32 1
+ -1045266905447156e-31 4329637285359675e-32 1045266905447156e-31 1 0 .045 16 654
+ 2597 656 ?297 657 651 652 0 0 1 30 655 2398 0 657 652 658 0 +0 .0015 -.04500000
+0224719 -749830360911069e-47 -1224606353822376e-31 1 16 657 2250 0 ?659 660 654
+ 655 0 0 1 30 658 2397 0 660 655 661 0 +-.025 .0015 -.045000000224719 7498303609
+11069e-47 1224606353822376e-31 -1 16 660 2259 0 ?662 663 657 658 0 0 1 31 661 23
+91 0 663 658 664 0 +0 -1734723475976805e-33 1040834085586084e-32 1 -122460635382
+2376e-31 -749830360911069e-47 1224606353822376e-31 1 0 .045 16 663 2248 665 ?282
+ 666 660 661 0 0 1 30 664 2390 0 666 661 667 0 -.188630860989919 .00149999999999
+9986 -.04497499305169485 -1 0 0 16 666 2240 0 ?668 669 663 664 0 0 1 30 667 2388
+ 0 669 664 670 0 +.188630860989919 -.00149999999999998 -.04497499305169485 -1 0
+ 0 16 669 2233 671 ?672 673 666 667 0 0 1 30 670 2081 0 673 667 674 0 +-.025 .03
+075914514051515 -.03288046548407475 -4329637285359675e-32 -.707106781186548 .707
+106781186548 16 673 1937 0 ?675 676 669 670 0 0 1 30 674 2078 0 676 670 677 0 +0
+ .03075914514051515 -.03288046548407475 4329637285359675e-32 .707106781186548 -.
+707106781186548 16 676 2119 0 ?273 678 673 674 0 0 1 30 677 2072 0 678 674 679 0
+ +0 .0328804654840748 -.0307591451405151 -4329637285359675e-32 -.707106781186548
+ .707106781186548 16 678 1926 0 ?680 681 676 677 0 0 1 30 679 2071 0 681 677 682
+ 0 +-.025 .0328804654840748 -.0307591451405151 4329637285359675e-32 .70710678118
+6548 -.707106781186548 16 681 1934 0 ?683 684 678 679 0 0 1 31 682 2065 0 684 67
+9 685 0 +0 -1734723475976805e-33 1040834085586084e-32 1 -1045266905447156e-31 -4
+32963728535968e-31 1045266905447156e-31 1 0 .045 16 684 1924 686 ?270 687 681 68
+2 0 0 1 30 685 2064 0 687 682 688 0 -.188630860989919 .0328627827424511 -.030741
+46239889145 -1 0 0 16 687 1916 0 ?689 690 684 685 0 0 1 30 688 2062 0 690 685 69
+1 0 +.188630860989919 .03074146239889145 -.0328627827424511 -1 0 0 16 690 1910 0
+ ?692 693 687 688 0 0 1 30 691 1767 0 693 688 694 0 +-.025 .045000000224719 -.00
+1499999999999958 -612303176911188e-31 -1 -612303176911189e-31 16 693 1623 0 ?695
+ 696 690 691 0 0 1 30 694 1764 0 696 691 697 0 +0 .045000000224719 -.00149999999
+999996 612303176911188e-31 1 612303176911189e-31 16 696 1805 0 ?264 698 693 694
+ 0 0 1 30 697 1758 0 698 694 699 0 +0 .045000000224719 .0015 -612303176911188e-3
+1 -1 -612303176911189e-31 16 698 1612 0 ?700 701 696 697 0 0 1 30 699 1757 0 701
+ 697 702 0 +-.025 .045000000224719 .0015 612303176911188e-31 1 612303176911189e-
+31 16 701 1620 0 ?703 704 698 699 0 0 1 31 702 1751 0 704 699 705 0 +0 -17347234
+75976805e-33 1040834085586084e-32 1 -612303176911188e-31 -612303176911189e-31 -6
+12303176911189e-31 0 -1 .045 16 704 1610 706 ?261 707 701 702 0 0 1 30 705 1750
+ 0 707 702 708 0 -.188630860989919 .04497499305169485 .0015 -1 0 0 16 707 1602 0
+ ?709 710 704 705 0 0 1 30 708 1748 0 710 705 711 0 +.188630860989919 .044974993
+05169485 -.00149999999999997 -1 0 0 16 710 1596 0 ?712 713 707 708 0 0 1 30 711
+ 1459 0 713 708 714 0 +-.025 .03288046548407475 .03075914514051515 -432963728535
+9675e-32 -.707106781186548 -.707106781186548 16 713 1308 0 ?715 716 710 711 0 0
+ 1 30 714 1456 0 716 711 717 0 +0 .03288046548407475 .03075914514051515 43296372
+85359675e-32 .707106781186548 .707106781186548 16 716 1497 0 ?249 718 713 714 0
+ 0 1 30 717 1450 0 718 714 719 0 +0 .03075914514051515 .0328804654840748 -432963
+7285359675e-32 -.707106781186548 -.707106781186548 16 718 1297 0 ?720 721 716 71
+7 0 0 1 30 719 1449 0 721 717 722 0 +-.025 .03075914514051515 .0328804654840748
+ 4329637285359675e-32 .707106781186548 .707106781186548 16 721 1305 0 ?723 724 7
+18 719 0 0 1 30 722 1448 0 724 719 725 0 +-.188630860989919 .001499999999999984
+ .00362132034355963 1 0 -260208521396521e-31 16 724 1315 0 ?726 727 721 722 0 0
+ 1 30 725 1447 0 727 722 728 0 -.188630860989919 .03074146239889145 .03286278274
+24511 -1 0 0 16 727 1313 0 ?729 730 724 725 0 0 1 31 728 1440 0 730 725 731 0 +0
+ -1734723475976805e-33 1040834085586084e-32 1 -179339448375221e-31 -432963728535
+9675e-32 -4329637285359675e-32 0 -1 .045 16 730 1295 732 ?255 733 727 728 0 0 1
+ 30 731 1439 0 733 728 734 0 +.188630860989919 .0328627827424511 .03074146239889
+15 -1 0 0 16 733 1288 0 ?735 736 730 731 0 0 1 30 734 1159 0 736 731 737 0 +-.02
+5 .001499999999999984 .045000000224719 0 0 -1 16 736 1067 0 ?738 739 733 734 0 0
+ 1 30 737 1156 0 739 734 740 0 +0 .001499999999999984 .045000000224719 0 0 1 16
+ 739 1182 0 ?243 741 736 737 0 0 1 30 740 1150 0 742 737 743 0 +0 -.001499999999
+999982 .045000000224719 0 0 -1 16 742 1062 744 ?39 745 741 740 741 741 1 30 743
+ 1149 0 746 740 747 0 +-.025 -.001499999999999982 .045000000224719 0 0 1 16 746
+ 1064 748 ?749 750 745 743 745 745 1 31 747 992 0 750 743 751 0 +-32472279640197
+55e-33 -.053033008588991 -.0530330085889909 1 -612303176911189e-31 6123031769111
+89e-31 612303176911189e-31 1 0 .007 16 750 961 0 ?752 753 746 747 0 0 1 31 751 9
+91 0 753 747 754 0 +.005 -.053033008588991 -.0530330085889909 -1 612303176911189
+e-31 -612303176911189e-31 612303176911189e-31 1 0 .007 16 753 960 0 ?755 756 750
+ 751 0 0 1 31 754 990 0 756 751 757 0 +.005 -.053033008588991 -.0530330085889909
+ 1 -612303176911189e-31 612303176911189e-31 612303176911189e-31 1 0 .006 16 756
+ 959 758 ?759 760 753 754 0 0 1 31 757 948 0 760 754 761 0 -.01 -.05303300858899
+1 -.0530330085889909 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .006 16
+ 760 913 0 ?762 763 756 757 0 0 1 31 761 898 0 763 757 764 0 +324722796401975e-3
+2 .053033008588991 -.053033008588991 1 -1224606353822376e-31 -749830360911069e-4
+7 1224606353822376e-31 1 0 .007 16 763 867 0 ?765 766 760 761 0 0 1 31 764 897 0
+ 766 761 767 0 +.005 .053033008588991 -.053033008588991 -1 1224606353822376e-31
+ 749830360911069e-47 1224606353822376e-31 1 0 .007 16 766 866 0 ?768 769 763 764
+ 0 0 1 31 767 896 0 769 764 770 0 +.005 .053033008588991 -.053033008588991 1 -12
+24606353822376e-31 -749830360911069e-47 1224606353822376e-31 1 0 .006 16 769 865
+ 771 ?772 773 766 767 0 0 1 31 770 854 0 773 767 774 0 -.01 .053033008588991 -.0
+53033008588991 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .006 16 773 81
+9 0 ?775 776 769 770 0 0 1 31 774 804 0 776 770 777 0 +3247227964019755e-33 .053
+0330085889911 .053033008588991 1 -612303176911188e-31 -612303176911189e-31 61230
+3176911189e-31 0 1 .007 16 776 773 0 ?778 779 773 774 0 0 1 31 777 803 0 779 774
+ 780 0 +.005 .0530330085889911 .053033008588991 -1 612303176911188e-31 612303176
+911189e-31 612303176911189e-31 0 1 .007 16 779 772 0 ?781 782 776 777 0 0 1 31 7
+80 802 0 782 777 783 0 +.005 .0530330085889911 .053033008588991 1 -6123031769111
+88e-31 -612303176911189e-31 -612303176911189e-31 0 -1 .006 16 782 771 784 ?785 7
+86 779 780 0 0 1 31 783 760 0 786 780 787 0 -.01 .0530330085889911 .053033008588
+991 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 .006 16 786 725 0 ?788 78
+9 782 783 0 0 1 31 787 710 0 789 783 790 0 +-324722796401975e-32 -.0530330085889
+909 .0530330085889911 1 0 0 0 0 1 .007 16 789 679 0 ?791 792 786 787 0 0 1 31 79
+0 709 0 792 787 365 0 +.005 -.0530330085889909 .0530330085889911 -1 0 0 0 0 1 .0
+07 16 792 678 0 ?793 794 789 790 0 0 1 31 365 708 0 794 790 359 0 +.005 -.053033
+0085889909 .0530330085889911 1 0 0 0 0 -1 .006 16 794 677 795 ?796 357 792 365 0
+ 0 1 81 1 795 713 797 794 798 0 586 784 799 17 796 0 800 796 796 0 801 794 0 0 +
+16 357 631 0 ?802 348 794 359 0 0 1 17 802 0 803 802 802 0 804 357 0 0 +15 803 6
+49 0 802 805 806 17 804 0 807 804 804 0 802 357 0 0 -15 807 623 0 804 808 809 14
+ 255 808 907 810 ?18 811 812 4 813 -0 0 337 811 22 15 809 365 0 814 808 815 17 8
+14 0 809 816 817 94 536 461 0 533 -15 815 523 0 818 808 819 17 818 0 815 818 818
+ 0 367 363 0 0 -15 819 717 0 820 808 821 17 820 0 819 820 820 0 788 786 0 0 -15
+ 821 905 0 822 808 0 17 822 0 821 822 822 0 762 760 0 0 -17 762 0 823 762 762 0
+ 822 760 0 0 +15 823 931 0 762 824 825 14 824 926 826 ?827 828 823 4 829 +0 0 82
+7 828 22 15 825 932 0 830 824 0 17 830 0 825 830 830 0 759 756 0 0 -17 759 0 831
+ 759 759 0 830 756 0 0 +15 831 971 0 759 827 832 14 827 967 833 ?834 824 831 4 8
+35 -0 0 834 824 22 15 832 972 0 755 827 0 17 755 0 832 755 755 0 836 753 0 0 +17
+ 836 0 837 836 836 0 755 753 0 0 -15 837 983 0 836 834 838 14 834 978 839 ?621 8
+27 837 4 840 -0 0 621 827 22 15 838 984 0 841 834 0 17 841 0 838 841 841 0 752 7
+50 0 0 -17 752 0 842 752 752 0 841 750 0 0 +15 842 953 0 752 843 844 14 843 366
+ 845 ?846 337 842 4 847 +0 0 846 18 22 15 844 859 0 765 843 848 17 765 0 844 765
+ 765 0 849 763 0 0 +15 848 765 0 778 843 850 17 778 0 848 778 778 0 851 776 0 0
+ +15 850 671 0 791 843 852 17 791 0 850 791 791 0 853 789 0 0 +15 852 215 0 464
+ 843 854 17 464 0 852 372 460 235 855 368 0 856 +15 854 216 0 857 843 0 17 857 0
+ 854 857 857 0 587 584 0 0 -17 587 0 858 587 587 0 857 584 0 0 +15 858 21 0 587
+ 18 0 14 18 13 859 ?337 808 860 4 5 -0 0 843 337 22 81 1 859 3718 861 18 862 0 8
+10 863 864 14 337 8 863 ?843 18 865 4 19 +0 0 18 808 22 15 860 12 0 866 18 858 1
+3 22 14 0 0 0 0 0 0 8 16 14 16 3289 867 ?868 0 869 4 870 +0 0 868 0 22 81 1 867
+ 3698 861 16 871 0 0 872 873 14 868 3272 872 ?874 16 35 4 875 -876 876 874 16 22
+ 15 869 550 0 367 16 329 51 870 564 0 16 877 847 0 -.188630860989919 -1734723475
+976805e-33 1040834085586084e-32 -1 0 0 .045 0 0 1 51 877 663 0 805 878 870 0 -.1
+93630860989919 -.0530330085889909 .0530330085889911 -1 0 0 .006 0 0 1 50 255 847
+ 398 0 843 870 813 0 +-3247227964019755e-33 -.0530330085889911 .0530330085889911
+ -1 612303176911189e-31 0 -612303176911189e-31 -1 0 50 813 397 0 808 847 879 0 +
+.01 -.0530330085889911 .0530330085889911 -1 612303176911189e-31 0 -6123031769111
+89e-31 -1 0 51 879 396 0 846 813 880 0 +.01 -.0530330085889911 .0530330085889911
+ -1 0 0 .0125 0 0 1 14 846 217 881 ?882 843 883 4 879 +0 0 882 843 22 50 880 395
+ 0 884 879 885 0 +.01 -.0618718433538229 .04419417382415925 0 -.707106781186548
+ -.707106781186548 0 .707106781186548 -.707106781186548 14 884 355 886 ?805 887
+ 888 4 880 +0 0 805 887 22 51 885 394 0 887 880 889 0 -.01 -.0646438743007421 .0
+328240691473475 -1 0 0 .01 0 0 1 14 887 349 890 ?884 891 892 4 885 +0 0 884 891
+ 22 51 889 393 0 891 885 893 0 +.01 -1734723475976805e-33 1040834085586084e-32 -
+1 0 0 .0625 0 0 1 14 891 343 894 ?887 895 896 4 889 +0 0 887 895 22 51 893 392 0
+ 895 889 897 0 -.01 -.0646438743007421 -.0328240691473475 -1 0 0 .01 0 0 1 14 89
+5 337 898 ?891 899 900 4 893 +0 0 891 899 22 50 897 391 0 899 893 901 0 +.01 -.0
+618718433538229 -.0441941738241592 0 -.707106781186547 .707106781186548 0 -.7071
+06781186548 -.707106781186547 14 899 331 902 ?895 903 904 4 897 +0 0 895 903 22
+ 51 901 390 0 903 897 905 0 +.01 -.0530330085889911 -.053033008588991 -1 0 0 .01
+25 0 0 1 14 903 325 906 ?899 907 908 4 901 +0 0 899 907 22 50 905 389 0 907 901
+ 909 0 +.01 -.04419417382415925 -.0618718433538228 0 .707106781186547 -.70710678
+1186548 0 .707106781186548 .707106781186547 14 907 319 910 ?903 911 912 4 905 +0
+ 0 903 911 22 51 909 388 0 911 905 913 0 -.01 -.03282406914734755 -.064643874300
+7421 -1 0 0 .01 0 0 1 14 911 313 914 ?907 915 916 4 909 +0 0 907 915 22 51 913 3
+87 0 915 909 917 0 +.01 -1734723475976805e-33 1040834085586084e-32 -1 0 0 .0625
+ 0 0 1 14 915 307 918 ?911 919 920 4 913 +0 0 911 919 22 51 917 386 0 919 913 92
+1 0 -.01 .0328240691473476 -.0646438743007421 -1 0 0 .01 0 0 1 14 919 301 922 ?9
+15 923 924 4 917 +0 0 915 923 22 50 921 385 0 923 917 925 0 +.01 .04419417382415
+92 -.0618718433538227 0 -.707106781186547 -.707106781186548 0 .707106781186548 -
+.707106781186547 14 923 295 926 ?919 927 928 4 921 +0 0 919 927 22 51 925 384 0
+ 927 921 929 0 +.01 .053033008588991 -.053033008588991 -1 0 0 .01249999999999986
+ 0 0 1 14 927 289 930 ?923 931 932 4 925 +0 0 923 931 22 50 929 383 0 931 925 93
+3 0 +.01 .0618718433538228 -.0441941738241593 0 .707106781186554 .70710678118654
+1 0 -.707106781186541 .707106781186554 14 931 283 934 ?927 935 936 4 929 +0 0 92
+7 935 22 51 933 382 0 935 929 937 0 -.01 .0646438743007421 -.0328240691473476 -1
+ 0 0 .01 0 0 1 14 935 277 938 ?931 939 940 4 933 +0 0 931 939 22 51 937 381 0 93
+9 933 941 0 +.01 -1734723475976805e-33 1040834085586084e-32 -1 0 0 .0625 0 0 1 1
+4 939 271 942 ?935 943 944 4 937 +0 0 935 943 22 51 941 380 0 943 937 945 0 -.01
+ .0646438743007421 .0328240691473475 -1 0 0 .01 0 0 1 14 943 265 946 ?939 947 94
+8 4 941 +0 0 939 947 22 50 945 379 0 947 941 949 0 +.01 .0618718433538229 .04419
+41738241592 0 .707106781186546 -.707106781186549 0 .707106781186549 .70710678118
+6546 14 947 259 950 ?943 951 952 4 945 +0 0 943 951 22 51 949 378 0 951 945 953
+ 0 +.01 .0530330085889911 .0530330085889911 -1 0 0 .0125 0 0 1 14 951 253 954 ?9
+47 955 956 4 949 +0 0 947 955 22 50 953 377 0 955 949 957 0 +.01 .04419417382415
+93 .0618718433538229 0 -.707106781186543 .707106781186552 0 -.707106781186552 -.
+707106781186543 14 955 247 958 ?951 959 960 4 953 +0 0 951 959 22 51 957 376 0 9
+59 953 961 0 -.01 .03282406914734755 .0646438743007421 -1 0 0 .01 0 0 1 14 959 2
+41 962 ?955 963 964 4 957 +0 0 955 963 22 51 961 375 0 963 957 965 0 +.01 -17347
+23475976805e-33 1040834085586084e-32 -1 0 0 .0625 0 0 1 14 963 235 966 ?959 967
+ 968 4 961 +0 0 959 967 22 51 965 374 0 967 961 969 0 -.01 -.0328240691473475 .0
+646438743007421 -1 0 0 .01 0 0 1 14 967 229 970 ?963 882 971 4 965 +0 0 963 882
+ 22 50 969 373 0 882 965 19 0 +.01 -.0441941738241592 .0618718433538229 0 .70710
+6781186547 .707106781186548 0 -.707106781186548 .707106781186547 14 882 223 972
+ ?967 846 973 4 969 +0 0 967 846 22 50 19 11 0 337 969 5 0 +-.025 0 867361737988
+404e-33 -1 612303176911189e-31 0 -612303176911189e-31 -1 0 81 1 972 3726 861 882
+ 974 0 881 970 975 15 973 228 0 234 882 0 17 234 0 973 856 467 232 162 580 0 976
+ +17 856 0 973 165 234 235 372 369 0 0 -17 467 0 973 234 165 160 817 465 0 0 +17
+ 162 0 971 470 976 160 234 580 0 977 -17 976 0 971 162 231 232 376 373 0 372 -15
+ 971 234 0 231 967 0 17 231 0 971 976 470 229 159 578 0 978 +17 376 0 852 380 37
+2 229 976 373 0 0 +17 372 0 852 376 464 232 856 369 0 0 +17 380 0 852 384 376 22
+6 978 377 0 0 +17 384 0 852 388 380 223 979 381 0 0 +17 978 0 968 159 228 229 38
+0 377 0 376 -15 968 240 0 228 963 0 17 159 0 968 473 978 157 231 578 0 980 -17 2
+28 0 968 978 473 226 156 576 0 979 +17 473 0 968 228 159 154 980 471 0 0 +17 156
+ 0 964 476 979 154 228 576 0 981 -17 979 0 964 156 225 226 384 381 0 380 -15 964
+ 246 0 225 959 0 17 225 0 964 979 476 223 153 574 0 982 +17 476 0 964 225 156 15
+1 981 474 0 0 +17 153 0 960 479 982 151 225 574 0 983 -17 982 0 960 153 222 223
+ 388 385 0 384 -15 960 252 0 222 955 0 17 222 0 960 982 479 220 150 572 0 984 +1
+7 388 0 852 392 384 220 982 385 0 0 +17 392 0 852 396 388 217 984 389 0 0 +17 39
+6 0 852 400 392 214 985 393 0 0 +17 984 0 956 150 219 220 392 389 0 388 -15 956
+ 258 0 219 951 0 17 150 0 956 482 984 148 222 572 0 986 -17 219 0 956 984 482 21
+7 147 570 0 985 +17 482 0 956 219 150 145 986 480 0 0 +17 147 0 952 485 985 145
+ 219 570 0 987 -17 985 0 952 147 216 217 396 393 0 392 -15 952 264 0 216 947 0 1
+7 216 0 952 985 485 214 144 568 0 988 +17 485 0 952 216 147 142 987 483 0 0 +17
+ 144 0 948 488 988 142 216 568 0 989 -17 988 0 948 144 213 214 400 397 0 396 -15
+ 948 270 0 213 943 0 17 213 0 948 988 488 211 141 566 0 990 +17 400 0 852 404 39
+6 211 988 397 0 0 +17 404 0 852 408 400 208 990 401 0 0 +17 408 0 852 412 404 20
+5 991 405 0 0 +17 990 0 944 141 210 211 404 401 0 400 -15 944 276 0 210 939 0 17
+ 141 0 944 491 990 139 213 566 0 992 -17 210 0 944 990 491 208 138 564 0 991 +17
+ 491 0 944 210 141 136 992 489 0 0 +17 138 0 940 494 991 136 210 564 0 993 -17 9
+91 0 940 138 207 208 408 405 0 404 -15 940 282 0 207 935 0 17 207 0 940 991 494
+ 205 135 562 0 994 +17 494 0 940 207 138 133 993 492 0 0 +17 135 0 936 497 994 1
+33 207 562 0 995 -17 994 0 936 135 204 205 412 409 0 408 -15 936 288 0 204 931 0
+ 17 204 0 936 994 497 202 132 560 0 996 +17 412 0 852 416 408 202 994 409 0 0 +1
+7 416 0 852 420 412 199 996 413 0 0 +17 420 0 852 424 416 196 997 417 0 0 +17 99
+6 0 932 132 201 202 416 413 0 412 -15 932 294 0 201 927 0 17 132 0 932 500 996 1
+30 204 560 0 998 -17 201 0 932 996 500 199 129 558 0 997 +17 500 0 932 201 132 1
+27 998 498 0 0 +17 129 0 928 503 997 127 201 558 0 999 -17 997 0 928 129 198 199
+ 420 417 0 416 -15 928 300 0 198 923 0 17 198 0 928 997 503 196 126 556 0 1000 +
+17 503 0 928 198 129 124 999 501 0 0 +17 126 0 924 506 1000 124 198 556 0 1001 -
+17 1000 0 924 126 195 196 424 421 0 420 -15 924 306 0 195 919 0 17 195 0 924 100
+0 506 193 123 554 0 1002 +17 424 0 852 428 420 193 1000 421 0 0 +17 428 0 852 43
+2 424 190 1002 425 0 0 +17 432 0 852 436 428 187 1003 429 0 0 +17 1002 0 920 123
+ 192 193 428 425 0 424 -15 920 312 0 192 915 0 17 123 0 920 509 1002 121 195 554
+ 0 1004 -17 192 0 920 1002 509 190 120 552 0 1003 +17 509 0 920 192 123 118 1004
+ 507 0 0 +17 120 0 916 512 1003 118 192 552 0 1005 -17 1003 0 916 120 189 190 43
+2 429 0 428 -15 916 318 0 189 911 0 17 189 0 916 1003 512 187 117 550 0 1006 +17
+ 512 0 916 189 120 115 1005 510 0 0 +17 117 0 912 515 1006 115 189 550 0 1007 -1
+7 1006 0 912 117 186 187 436 433 0 432 -15 912 324 0 186 907 0 17 186 0 912 1006
+ 515 184 114 548 0 1008 +17 436 0 852 440 432 184 1006 433 0 0 +17 440 0 852 444
+ 436 181 1008 437 0 0 +17 444 0 852 448 440 178 1009 441 0 0 +17 1008 0 908 114
+ 183 184 440 437 0 436 -15 908 330 0 183 903 0 17 114 0 908 518 1008 112 186 548
+ 0 1010 -17 183 0 908 1008 518 181 111 546 0 1009 +17 518 0 908 183 114 109 1010
+ 516 0 0 +17 111 0 904 521 1009 109 183 546 0 1011 -17 1009 0 904 111 180 181 44
+4 441 0 440 -15 904 336 0 180 899 0 17 180 0 904 1009 521 178 108 544 0 1012 +17
+ 521 0 904 180 111 106 1011 519 0 0 +17 108 0 900 524 1012 106 180 544 0 1013 -1
+7 1012 0 900 108 177 178 448 445 0 444 -15 900 342 0 177 895 0 17 177 0 900 1012
+ 524 175 105 542 0 1014 +17 448 0 852 452 444 175 1012 445 0 0 +17 452 0 852 456
+ 448 172 1014 449 0 0 +17 456 0 852 460 452 169 1015 453 0 0 +17 1014 0 896 105
+ 174 175 452 449 0 448 -15 896 348 0 174 891 0 17 105 0 896 527 1014 103 177 542
+ 0 1016 -17 174 0 896 1014 527 172 102 540 0 1015 +17 527 0 896 174 105 100 1016
+ 525 0 0 +17 102 0 892 530 1015 100 174 540 0 1017 -17 1015 0 892 102 171 172 45
+6 453 0 452 -15 892 354 0 171 887 0 17 171 0 892 1015 530 169 99 538 0 1018 +17
+ 530 0 892 171 102 97 1017 528 0 0 +17 99 0 888 533 1018 97 171 538 0 816 -17 10
+18 0 888 99 168 169 460 457 0 456 -15 888 360 0 533 884 0 17 168 0 888 1018 533
+ 166 96 534 0 855 +17 460 0 852 464 456 166 1018 457 0 0 +17 533 0 888 168 99 94
+ 816 531 0 0 +17 96 0 883 536 855 94 168 534 0 814 -17 855 0 883 96 237 166 464
+ 368 0 460 -15 883 222 0 237 846 0 17 237 0 883 855 536 235 165 582 0 464 +17 53
+6 0 883 237 96 163 814 461 0 817 +17 165 0 973 467 856 163 237 582 0 536 -17 817
+ 0 809 814 977 163 467 465 0 0 -17 977 0 809 817 980 160 470 468 0 467 -17 980 0
+ 809 977 981 157 473 471 0 470 -17 470 0 971 231 162 157 977 468 0 0 +17 981 0 8
+09 980 983 154 476 474 0 473 -17 983 0 809 981 986 151 479 477 0 476 -17 986 0 8
+09 983 987 148 482 480 0 479 -17 479 0 960 222 153 148 983 477 0 0 +17 987 0 809
+ 986 989 145 485 483 0 482 -17 989 0 809 987 992 142 488 486 0 485 -17 992 0 809
+ 989 993 139 491 489 0 488 -17 488 0 948 213 144 139 989 486 0 0 +17 993 0 809 9
+92 995 136 494 492 0 491 -17 995 0 809 993 998 133 497 495 0 494 -17 998 0 809 9
+95 999 130 500 498 0 497 -17 497 0 936 204 135 130 995 495 0 0 +17 999 0 809 998
+ 1001 127 503 501 0 500 -17 1001 0 809 999 1004 124 506 504 0 503 -17 1004 0 809
+ 1001 1005 121 509 507 0 506 -17 506 0 924 195 126 121 1001 504 0 0 +17 1005 0 8
+09 1004 1007 118 512 510 0 509 -17 1007 0 809 1005 1010 115 515 513 0 512 -17 10
+10 0 809 1007 1011 112 518 516 0 515 -17 515 0 912 186 117 112 1007 513 0 0 +17
+ 1011 0 809 1010 1013 109 521 519 0 518 -17 1013 0 809 1011 1016 106 524 522 0 5
+21 -17 1016 0 809 1013 1017 103 527 525 0 524 -17 524 0 900 177 108 103 1013 522
+ 0 0 +17 1017 0 809 1016 816 100 530 528 0 527 -17 816 0 809 1017 814 97 533 531
+ 0 530 -80 255 1 861 0 1019 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 81 1 974 3725
+ 1020 882 1021 972 1022 1023 1024 81 1 881 3724 861 846 1022 0 845 972 1025 81 1
+ 970 3728 861 967 1023 0 972 966 1026 83 255 3 975 0 1 0 81 1 1023 3727 1020 967
+ 1027 970 974 1028 1029 81 1 966 3730 861 963 1028 0 970 962 1030 83 3 1026 0 1
+ 0 81 1 1028 3729 1020 963 1031 966 1023 1032 1033 81 1 962 3732 861 959 1032 0
+ 966 958 1034 83 3 1030 0 1 0 81 1 1032 3731 1020 959 1035 962 1028 1036 1037 81
+ 1 958 3734 861 955 1036 0 962 954 1038 83 3 1034 0 1 0 81 1 1036 3733 1020 955
+ 1039 958 1032 1040 1041 81 1 954 3736 861 951 1040 0 958 950 1042 83 3 1038 0 1
+ 0 81 1 1040 3735 1020 951 1043 954 1036 1044 1045 81 1 950 3738 861 947 1044 0
+ 954 946 1046 83 3 1042 0 1 0 81 1 1044 3737 1020 947 1047 950 1040 1048 1049 81
+ 1 946 3740 861 943 1048 0 950 942 1050 83 3 1046 0 1 0 81 1 1048 3739 1020 943
+ 1051 946 1044 1052 1053 81 1 942 3742 861 939 1052 0 946 938 1054 83 3 1050 0 1
+ 0 81 1 1052 3741 1020 939 1055 942 1048 1056 1057 81 1 938 3744 861 935 1056 0
+ 942 934 1058 83 3 1054 0 1 0 81 1 1056 3743 1020 935 1059 938 1052 1060 1061 81
+ 1 934 3746 861 931 1060 0 938 930 1062 83 3 1058 0 1 0 81 1 1060 3745 1020 931
+ 1063 934 1056 1064 1065 81 1 930 3748 861 927 1064 0 934 926 1066 83 3 1062 0 1
+ 0 81 1 1064 3747 1020 927 1067 930 1060 1068 1069 81 1 926 3750 861 923 1068 0
+ 930 922 1070 83 3 1066 0 1 0 81 1 1068 3749 1020 923 1071 926 1064 1072 1073 81
+ 1 922 3752 861 919 1072 0 926 918 1074 83 3 1070 0 1 0 81 1 1072 3751 1020 919
+ 1075 922 1068 1076 1077 81 1 918 3754 861 915 1076 0 922 914 1078 83 3 1074 0 1
+ 0 81 1 1076 3753 1020 915 1079 918 1072 1080 1081 81 1 914 3756 861 911 1080 0
+ 918 910 1082 83 3 1078 0 1 0 81 1 1080 3755 1020 911 1083 914 1076 1084 1085 81
+ 1 910 3758 861 907 1084 0 914 906 1086 83 3 1082 0 1 0 81 1 1084 3757 1020 907
+ 1087 910 1080 1088 1089 81 1 906 3760 861 903 1088 0 910 902 1090 83 3 1086 0 1
+ 0 81 1 1088 3759 1020 903 1091 906 1084 1092 1093 81 1 902 3762 861 899 1092 0
+ 906 898 1094 83 3 1090 0 1 0 81 1 1092 3761 1020 899 1095 902 1088 1096 1097 81
+ 1 898 3764 861 895 1096 0 902 894 1098 83 3 1094 0 1 0 81 1 1096 3763 1020 895
+ 1099 898 1092 1100 1101 81 1 894 3766 861 891 1100 0 898 890 1102 83 3 1098 0 1
+ 0 81 1 1100 3765 1020 891 1103 894 1096 1104 1105 81 1 890 3768 861 887 1104 0
+ 894 886 1106 83 3 1102 0 1 0 81 1 1104 3767 1020 887 1107 890 1100 1108 1109 81
+ 1 886 3770 861 884 1108 0 890 1110 1111 83 3 1106 0 1 0 81 1 1108 3769 1020 884
+ 1112 886 1104 1113 1114 81 1 1110 3772 861 805 1113 0 886 1115 1116 83 3 1111 0
+ 1 0 14 805 644 1110 ?1117 884 803 4 877 +0 0 1117 884 22 81 1 1113 3771 1020 80
+5 1118 1110 1108 1119 1120 81 1 1115 3774 861 1117 1119 0 1110 1121 1122 83 3 11
+16 0 1 0 14 1117 685 1115 ?1123 805 800 4 1124 -0 0 1123 805 22 81 1 1119 3773 1
+020 1117 1125 1115 1113 1126 1127 81 1 1121 3776 861 1123 1126 0 1115 1128 1129
+ 83 3 1122 0 1 0 14 1123 696 1121 ?1130 1117 1131 4 878 -0 0 1130 1117 22 81 1 1
+126 3775 1020 1123 1132 1121 1119 1133 1134 81 1 1128 3778 861 1130 1133 0 1121
+ 1135 1136 83 3 1129 0 1 0 14 1130 738 1128 ?1137 1123 1138 4 1139 +0 0 1137 112
+3 22 81 1 1133 3777 1020 1130 1140 1128 1126 1141 1142 81 1 1135 3780 861 1137 1
+141 0 1128 1143 1144 83 3 1136 0 1 0 14 1137 779 1135 ?1145 1130 1146 4 1147 -0
+ 0 1145 1130 22 81 1 1141 3779 1020 1137 1148 1135 1133 1149 1150 81 1 1143 3782
+ 861 1145 1149 0 1135 1151 1152 83 3 1144 0 1 0 14 1145 790 1143 ?1153 1137 1154
+ 4 1155 -0 0 1153 1137 22 81 1 1149 3781 1020 1145 1156 1143 1141 1157 1158 81 1
+ 1151 3784 861 1153 1157 0 1143 1159 1160 83 3 1152 0 1 0 14 1153 832 1151 ?1161
+ 1145 1162 4 1163 +0 0 1161 1145 22 81 1 1157 3783 1020 1153 1164 1151 1149 1165
+ 1166 81 1 1159 3786 861 1161 1165 0 1151 1167 1168 83 3 1160 0 1 0 14 1161 873
+ 1159 ?828 1153 1169 4 1170 -0 0 828 1153 22 81 1 1165 3785 1020 1161 1171 1159
+ 1157 1172 1173 81 1 1167 3788 861 828 1172 0 1159 826 1174 83 3 1168 0 1 0 14 8
+28 884 1167 ?824 1161 1175 4 1176 -0 0 824 1161 22 81 1 1172 3787 1020 828 1177
+ 1167 1165 1178 1179 81 1 826 3790 861 824 1178 0 1167 833 1180 83 3 1174 0 1 0
+ 81 1 1178 3789 1020 824 1181 826 1172 1182 1183 81 1 833 3792 861 827 1182 0 82
+6 839 1184 83 3 1180 0 1 0 81 1 1182 3791 1020 827 1185 833 1178 1186 1187 81 1
+ 839 3794 861 834 1186 0 833 1188 1189 83 3 1184 0 1 0 81 1 1186 3793 1020 834 1
+190 839 1182 1191 1192 81 1 1188 3796 861 621 1191 0 839 1193 1194 83 3 1189 0 1
+ 0 14 621 1127 1188 ?1195 834 620 4 1196 +0 0 1195 834 22 81 1 1191 3795 1020 62
+1 1197 1188 1186 1198 1199 81 1 1193 3798 861 1195 1198 0 1188 1200 1201 83 3 11
+94 0 1 0 14 1195 1391 1193 ?1202 621 1203 4 1204 -0 0 1202 621 22 81 1 1198 3797
+ 1020 1195 1205 1193 1191 1206 1207 81 1 1200 3800 861 1202 1206 0 1193 1208 120
+9 83 3 1201 0 1 0 14 1202 1679 1200 ?1210 1195 1211 4 1212 -0 0 1210 1195 22 81
+ 1 1206 3799 1020 1202 1213 1200 1198 1214 1215 81 1 1208 3802 861 1210 1214 0 1
+200 1216 1217 83 3 1209 0 1 0 14 1210 1993 1208 ?1218 1202 1219 4 1220 -0 0 1218
+ 1202 22 81 1 1214 3801 1020 1210 1221 1208 1206 1222 1223 81 1 1216 3804 861 12
+18 1222 0 1208 1224 1225 83 3 1217 0 1 0 14 1218 2319 1216 ?1226 1210 1227 4 122
+8 -0 0 1226 1210 22 81 1 1222 3803 1020 1218 1229 1216 1214 1230 1231 81 1 1224
+ 3806 861 1226 1230 0 1216 1232 1233 83 3 1225 0 1 0 14 1226 2692 1224 ?613 1218
+ 1234 4 1235 -0 0 613 1218 22 81 1 1230 3805 1020 1226 1236 1224 1222 1237 1238
+ 81 1 1232 3808 861 613 1237 0 1224 1239 1240 83 3 1233 0 1 0 14 613 3031 1232 ?
+1241 1226 609 4 1242 -0 0 1241 1226 22 81 1 1237 3807 1020 613 1243 1232 1230 12
+44 1245 81 1 1239 3810 861 1241 1244 0 1232 1246 1247 83 3 1240 0 1 0 14 1241 33
+90 1239 ?325 613 27 4 1248 -0 0 325 613 22 81 1 1244 3809 1020 1241 1249 1239 12
+37 1250 1251 81 1 1246 3812 861 325 1250 0 1239 0 1252 83 3 1247 0 1 0 14 325 34
+02 1246 ?0 1241 319 4 1253 -0 0 0 1241 22 81 1 1250 3811 1020 325 1254 1246 1244
+ 0 1255 83 3 1252 0 1 0 80 1 1020 1256 1257 8015 0 0 0 0 3 5 0 0 0 FFFFTFFFFFFFF
+F2 81 3 1254 3672 1258 325 1259 1250 1260 1087 1261 1262 0 83 1 1255 0 80 3 1258
+ 1263 1264 9000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 1 3 91 255 1259 0 1265 325 126
+6 1254 0 1267 81 3 1260 3671 1258 843 1268 1269 1270 1254 1271 1272 0 81 3 1087
+ 3673 1258 907 1273 1084 1254 1067 1274 1275 0 82 255 1 1261 0 82 1 1262 41 91 1
+273 0 1265 907 1276 1087 1277 1278 81 3 1067 3674 1258 927 1279 1064 1087 1280 1
+281 1282 0 82 1 1274 0 82 1 1275 42 91 1279 0 1265 927 1283 1067 1284 1285 81 3
+ 1280 3675 1258 16 1286 871 1067 1197 1287 1288 0 82 1 1281 0 82 1 1282 43 91 12
+86 0 1265 16 1289 1280 1290 0 81 1 871 3697 1020 16 1280 867 0 1291 1292 81 3 11
+97 3676 1258 621 1293 1191 1280 1294 1295 1296 0 82 1 1287 0 82 1 1288 44 91 129
+3 0 1265 621 1297 1197 1298 1299 81 3 1294 3677 1258 1300 1301 1302 1197 1229 13
+03 1304 0 82 1 1295 0 82 1 1296 45 14 1300 2805 1305 ?876 874 618 4 1306 -0 0 87
+6 874 22 91 1301 0 1265 1300 1307 1294 1308 1309 81 1 1302 3703 1020 1300 1294 1
+305 1310 1311 1312 81 3 1229 3678 1258 1218 1313 1222 1294 1177 1314 1315 0 82 1
+ 1303 0 82 1 1304 46 91 1313 0 1265 1218 1316 1229 1317 1318 81 3 1177 3679 1258
+ 828 1319 1172 1229 1095 1320 1321 0 82 1 1314 0 82 1 1315 47 91 1319 0 1265 828
+ 1322 1177 1323 1324 81 3 1095 3680 1258 899 1325 1092 1177 1039 1326 1327 0 82
+ 1 1320 0 82 1 1321 48 91 1325 0 1265 899 1328 1095 1329 1277 81 3 1039 3681 125
+8 955 1330 1036 1095 1031 1331 1332 0 82 1 1326 0 82 1 1327 49 91 1330 0 1265 95
+5 1333 1039 1334 1335 81 3 1031 3682 1258 963 1336 1028 1039 1243 1337 1338 0 82
+ 1 1331 0 82 1 1332 50 91 1336 0 1265 963 1339 1031 1335 1340 81 3 1243 3683 125
+8 613 1341 1237 1031 1236 1342 1343 0 82 1 1337 0 82 1 1338 51 91 1341 0 1265 61
+3 1344 1243 1267 1317 81 3 1236 3684 1258 1226 1317 1230 1243 1164 1345 1346 0 8
+2 1 1342 0 82 1 1343 52 91 1317 0 1265 1226 1347 1236 1341 1313 81 3 1164 3685 1
+258 1153 1348 1157 1236 1156 1349 1350 0 82 1 1345 0 82 1 1346 53 91 1348 0 1265
+ 1153 1351 1164 1324 1352 81 3 1156 3686 1258 1145 1352 1149 1164 1125 1353 1354
+ 0 82 1 1349 0 82 1 1350 54 91 1352 0 1265 1145 1355 1156 1348 1356 81 3 1125 36
+87 1258 1117 1357 1119 1156 1185 1358 1359 0 82 1 1353 0 82 1 1354 55 91 1357 0
+ 1265 1117 1360 1125 1361 1362 81 3 1185 3688 1258 827 1363 1182 1125 1190 1364
+ 1365 0 82 1 1358 0 82 1 1359 56 91 1363 0 1265 827 1366 1185 1299 1323 81 3 119
+0 3689 1258 834 1299 1186 1185 1367 1368 1369 0 82 1 1364 0 82 1 1365 57 91 1299
+ 0 1265 834 1370 1190 1293 1363 81 3 1367 3690 1258 337 1371 1372 1190 1103 1373
+ 1374 0 82 1 1368 0 82 1 1369 58 91 1371 0 1265 337 1375 1367 1268 1376 81 1 137
+2 3719 1020 337 1367 863 862 1269 1377 81 3 1103 3691 1258 891 1378 1100 1367 10
+75 1379 1380 0 82 1 1373 0 82 1 1374 59 91 1378 0 1265 891 1381 1103 1382 1329 8
+1 3 1075 3692 1258 919 1383 1072 1103 1047 1384 1385 0 82 1 1379 0 82 1 1380 60
+ 91 1383 0 1265 919 1386 1075 1387 1284 81 3 1047 3693 1258 947 1388 1044 1075 1
+112 1389 1390 0 82 1 1384 0 82 1 1385 61 91 1388 0 1265 947 1391 1047 1392 1334
+ 81 3 1112 3694 1258 884 1393 1108 1047 0 1394 1395 0 82 1 1389 0 82 1 1390 62 9
+1 1393 0 1265 884 1396 1112 1362 1382 82 1 1394 0 82 1 1395 63 90 255 1265 3632
+ 1397 1 0 1398 2 1286 81 2 1396 3537 1399 884 1400 1393 1401 1402 1403 1404 91 1
+362 0 1265 805 1405 1118 1357 1393 91 1382 0 1265 887 1402 1107 1393 1378 81 2 1
+402 3538 1399 887 1406 1382 1396 1381 1407 1408 81 3 1107 3664 1258 887 1382 110
+4 1249 1079 1409 1410 0 81 3 1249 3663 1258 1241 1267 1244 1411 1107 1412 1413 0
+ 81 3 1079 3665 1258 915 1387 1076 1107 1051 1414 1415 0 82 1 1409 0 82 1 1410 3
+3 91 1387 0 1265 915 1416 1079 1278 1383 81 3 1051 3666 1258 943 1392 1048 1079
+ 1063 1417 1418 0 82 1 1414 0 82 1 1415 34 91 1392 0 1265 943 1419 1051 1420 138
+8 81 3 1063 3667 1258 931 1285 1060 1051 1148 1421 1422 0 82 1 1417 0 82 1 1418
+ 35 91 1285 0 1265 931 1423 1063 1279 1424 81 3 1148 3668 1258 1137 1356 1141 10
+63 1181 1425 1426 0 82 1 1421 0 82 1 1422 36 91 1356 0 1265 1137 1427 1148 1352
+ 1428 81 3 1181 3669 1258 824 1323 1178 1148 1270 1429 1430 0 82 1 1425 0 82 1 1
+426 37 91 1323 0 1265 824 1431 1181 1363 1319 81 3 1270 3670 1258 808 1432 1433
+ 1181 1260 1434 1435 0 82 1 1429 0 82 1 1430 38 91 1432 0 1265 808 1436 1270 137
+6 1437 81 1 1433 3715 1020 808 1270 810 1438 862 1439 82 1 1434 0 82 1 1435 39 8
+1 1 810 3716 861 808 1433 0 1440 859 1441 81 1 1438 3713 1020 811 1442 1440 1443
+ 1433 1444 81 1 862 3717 1020 18 1445 859 1433 1372 1446 83 1 1439 0 81 3 1445 3
+658 1258 18 1376 862 1055 1447 1448 1449 0 83 1 1446 0 91 1376 0 1265 18 1450 14
+45 1371 1432 81 3 1055 3657 1258 939 1420 1052 1027 1445 1451 1452 0 81 3 1447 3
+659 1258 1453 1454 1443 1445 1213 1455 1456 0 82 1 1448 0 82 1 1449 27 14 1453 1
+505 1457 ?811 1458 1459 4 1460 -0 0 811 1458 22 91 1454 0 1265 1453 1461 1447 14
+37 1462 81 1 1443 3711 1020 1453 1447 1457 1463 1438 1464 81 3 1213 3660 1258 12
+02 1465 1206 1447 1221 1466 1467 0 82 1 1455 0 82 1 1456 28 91 1465 0 1265 1202
+ 1468 1213 1318 1298 81 3 1221 3661 1258 1210 1318 1214 1213 1411 1469 1470 0 82
+ 1 1466 0 82 1 1467 29 91 1318 0 1265 1210 1471 1221 1313 1465 81 3 1411 3662 12
+58 1472 1473 1474 1221 1249 1475 1476 0 82 1 1469 0 82 1 1470 30 14 1472 2127 14
+77 ?1458 876 1478 4 1479 -0 0 1458 876 22 91 1473 0 1265 1472 1480 1411 1462 130
+8 81 1 1474 3707 1020 1472 1411 1477 1311 1463 1481 82 1 1475 0 82 1 1476 31 81
+ 1 1477 3708 861 1472 1474 0 1482 1483 1484 81 1 1311 3705 1020 876 1485 1482 13
+02 1474 1486 81 1 1463 3709 1020 1458 1487 1483 1474 1443 1488 83 1 1481 0 14 14
+58 1813 1483 ?1453 1472 1489 4 1490 -0 0 1453 1472 22 81 3 1487 3650 1258 1458 1
+462 1463 1205 1171 1491 1492 0 81 1 1483 3710 861 1458 1463 0 1477 1457 1493 83
+ 1 1488 0 81 1 1457 3712 861 1453 1443 0 1483 1440 1494 83 3 1493 0 1 0 81 1 144
+0 3714 861 811 1438 0 1457 810 1495 83 3 1494 0 1 0 14 811 1213 1440 ?808 1453 1
+496 4 1497 -0 0 808 1453 22 83 3 1495 0 1 0 15 1496 1212 0 90 811 0 50 1497 1139
+ 0 811 875 835 0 +-.188630860989919 .001499999999999984 .045000000224719 0 -1 0
+ 0 0 -1 50 875 1141 0 868 1196 1497 0 +-.188630860989919 -.001499999999999982 .0
+45000000224719 0 1 0 0 0 1 50 835 988 0 827 1497 840 0 +.005 -.053033008588991 -
+.0530330085889909 1 -612303176911189e-31 612303176911189e-31 612303176911189e-31
+ 1 0 51 840 987 0 834 835 829 0 +-3247227964019755e-33 -.053033008588991 -.05303
+30085889909 1 -612303176911189e-31 612303176911189e-31 .007 612303176911189e-31
+ 1 0 51 829 945 0 824 840 1170 0 -.193630860989919 -.0530330085889911 -.05303300
+85889909 -1 612303176911189e-31 -612303176911189e-31 .006 -612303176911189e-31 -
+1 0 50 1170 894 0 1161 829 1176 0 +.005 .053033008588991 -.053033008588991 1 -12
+24606353822376e-31 -749830360911069e-47 1224606353822376e-31 1 0 51 1176 893 0 8
+28 1170 1163 0 +324722796401975e-32 .053033008588991 -.053033008588991 1 -122460
+6353822376e-31 -749830360911069e-47 .007 1224606353822376e-31 1 0 51 1163 851 0
+ 1153 1176 1147 0 -.193630860989919 .0530330085889909 -.053033008588991 -1 12246
+06353822376e-31 749830360911069e-47 .006 -1224606353822376e-31 -1 0 50 1147 800
+ 0 1137 1163 1155 0 +.005 .0530330085889911 .053033008588991 1 -612303176911188e
+-31 -612303176911189e-31 -612303176911189e-31 0 -1 51 1155 799 0 1145 1147 1139
+ 0 +3247227964019755e-33 .0530330085889911 .053033008588991 1 -612303176911188e-
+31 -612303176911189e-31 .007 612303176911189e-31 0 1 51 1139 757 0 1130 1155 112
+4 0 -.193630860989919 .0530330085889911 .0530330085889909 -1 612303176911188e-31
+ 612303176911189e-31 .006 612303176911189e-31 0 1 50 1124 706 0 1117 1139 878 0
+ +.005 -.0530330085889909 .0530330085889911 1 0 0 0 0 -1 51 878 705 0 1123 1124
+ 877 0 +-324722796401975e-32 -.0530330085889909 .0530330085889911 1 0 0 .007 0 0
+ 1 50 1196 1143 0 621 1460 875 0 +0 0 1734723475976805e-33 1 0 0 612303176911189
+e-31 1 0 50 1460 1433 0 1453 1204 1196 0 +-.188630860989919 .03288046548407475 .
+03075914514051515 183995210002005e-31 -.707106781186548 .707106781186548 0 -.707
+106781186548 -.707106781186548 50 1204 1435 0 1195 1490 1460 0 +-.18863086098991
+9 .03075914514051515 .0328804654840748 -183995210002005e-31 .707106781186548 -.7
+07106781186548 0 .707106781186548 .707106781186548 50 1490 1741 0 1458 1212 1204
+ 0 +-.188630860989919 .045000000224719 -.001499999999999948 607153216591883e-31
+ -612303176911189e-31 1 0 -1 -612303176911189e-31 50 1212 1743 0 1202 1479 1490
+ 0 +-.188630860989919 .045000000224719 .0015 -607153216591883e-31 61230317691118
+9e-31 -1 0 1 612303176911189e-31 50 1479 2055 0 1472 1220 1212 0 +-.188630860989
+919 .03075914514051515 -.0328804654840747 1042639523344694e-31 .707106781186548
+ .707106781186548 0 -.707106781186548 .707106781186548 50 1220 2057 0 1210 1228
+ 1479 0 +-.188630860989919 .0328804654840748 -.0307591451405151 -104263952334469
+4e-31 -.707106781186548 -.707106781186548 0 .707106781186548 -.707106781186548 5
+0 1228 2383 0 1218 1306 1220 0 +-.188630860989919 .00150000000000003 -.045000000
+224719 -1214306433183764e-31 -1 -1224606353822376e-31 0 1224606353822376e-31 -1
+ 50 1306 2734 0 1300 1235 1228 0 +-.188630860989919 -.0328804654840747 -.0307591
+4514051515 1042639523344694e-31 .707106781186548 -.707106781186548 0 .7071067811
+86548 .707106781186548 50 1235 2736 0 1226 1498 1306 0 +-.188630860989919 -.0307
+591451405151 -.03288046548407475 -1042639523344694e-31 -.707106781186548 .707106
+781186548 0 -.707106781186548 -.707106781186548 50 1498 3093 0 874 1242 1235 0 +
+-.188630860989919 -.045000000224719 .001499999999999964 607153216591883e-31 1836
+909530733565e-31 -1 0 1 1836909530733565e-31 14 874 3170 1499 ?1300 868 1500 4 1
+498 -0 0 1300 868 22 50 1242 3095 0 613 1248 1498 0 +-.188630860989919 -.0450000
+00224719 -.0015 -607153216591883e-31 -1836909530733565e-31 1 0 -1 -1836909530733
+565e-31 50 1248 3464 0 1241 1253 1242 0 +-.188630860989919 -.03075914514051515 .
+03288046548407475 183995210002005e-31 -.707106781186547 -.707106781186548 0 .707
+106781186548 -.707106781186547 50 1253 3466 0 325 0 1248 0 +-.188630860989919 -.
+03288046548407475 .0307591451405151 -183995210002005e-31 .707106781186547 .70710
+6781186548 0 -.707106781186548 .707106781186547 81 1 1499 3702 861 874 1310 0 87
+2 1305 1501 15 1500 3168 0 40 874 0 17 40 0 1500 48 45 34 23 9 0 336 -17 48 0 15
+00 344 40 46 336 340 0 342 -17 45 0 1500 40 344 41 306 625 0 23 -17 23 0 319 321
+ 320 41 40 9 0 327 +17 327 0 620 306 312 41 321 328 0 0 +17 306 0 620 303 327 30
+4 45 625 0 344 +17 312 0 620 327 1502 310 330 332 0 321 +16 328 3332 0 ?327 326
+ 1503 1504 0 0 1 16 1503 3329 0 ?1502 328 31 1505 0 0 1 30 1504 3481 0 328 1505
+ 341 0 +0 -.03288046548407475 .03075914514051515 432963728535968e-31 .7071067811
+86548 -.707106781186547 30 1505 3487 0 1503 1506 1504 0 +0 -.03075914514051515 .
+03288046548407475 -432963728535968e-31 -.707106781186548 .707106781186547 30 341
+ 3480 0 326 1504 1507 0 +-.025 -.03288046548407475 .03075914514051515 -432963728
+535968e-31 -.707106781186548 .707106781186547 31 1507 3474 0 332 341 333 0 +0 -1
+734723475976805e-33 1040834085586084e-32 1 -179339448375221e-31 432963728535968e
+-31 432963728535968e-31 0 -1 .045 16 332 3330 1508 ?312 323 326 1507 0 0 1 30 33
+3 3473 0 323 1507 1509 0 -.188630860989919 -.0328627827424511 .0307414623988915
+ -1 0 0 30 1509 3472 0 38 333 1510 0 +-.188630860989919 -.001499999999999982 .00
+362132034355961 -1 0 -2602085213965215e-32 16 38 3320 0 ?29 1511 323 1509 0 0 1
+ 30 1510 3471 0 1511 1509 629 0 +.188630860989919 -.0307414623988915 .0328627827
+424511 -1 0 0 16 1511 3317 0 ?32 340 38 1510 0 0 1 30 629 3119 0 340 1510 628 0
+ +-.025 -.045000000224719 .001499999999999974 612303176911189e-31 1 183690953073
+3565e-31 16 340 2971 0 ?336 625 1511 629 0 0 1 17 32 0 329 246 330 10 28 1511 0
+ 1512 +17 246 0 329 599 32 244 1512 348 0 1513 +17 330 0 329 32 322 313 312 332
+ 0 0 -17 28 0 27 1514 25 313 32 1511 0 1502 -17 1512 0 865 30 1513 10 246 348 0
+ 0 -15 865 3530 0 30 337 334 17 30 0 865 1513 1512 315 25 31 0 0 +17 1513 0 865
+ 1512 30 244 37 745 0 1515 +17 37 0 35 33 1515 315 1513 745 0 29 -16 745 3206 15
+16 ?1513 746 742 743 746 746 1 17 1515 0 35 37 36 244 599 596 0 0 -15 35 3271 0
+ 33 868 0 17 36 0 35 1515 33 238 39 742 0 599 -17 599 0 329 1517 246 238 1515 59
+6 0 0 +17 1517 0 329 594 599 241 240 591 0 0 -17 594 0 329 362 1517 91 1518 592
+ 0 1519 +17 240 0 620 39 243 238 1517 591 0 36 +17 39 0 620 1502 240 26 36 742 0
+ 1514 +17 243 0 620 240 720 241 252 739 0 1518 +17 720 0 620 243 255 250 1520 71
+8 0 0 +17 252 0 1496 90 1518 250 243 739 0 726 -17 1518 0 1496 252 93 241 594 59
+2 0 1517 -17 93 0 1496 1518 90 91 738 736 0 594 -17 90 0 1496 93 252 88 726 724
+ 0 738 -17 738 0 1521 723 1519 88 93 736 0 1522 +15 1521 1492 0 723 337 1523 17
+ 723 0 1521 1519 738 256 1522 721 0 362 +17 1519 0 1521 738 723 91 362 358 0 0 -
+17 1522 0 1203 726 258 88 723 721 0 0 -15 1203 1396 0 258 1195 0 17 726 0 1203 1
+520 1522 250 90 724 0 720 +17 258 0 1203 1522 1520 256 729 727 0 723 -17 1520 0
+ 1203 258 726 253 720 718 0 729 -17 729 0 329 1524 362 253 258 727 0 0 +17 1524
+ 0 329 735 729 247 255 730 0 0 -17 362 0 329 729 594 256 1519 358 0 0 +17 735 0
+ 329 1525 1524 85 1526 733 0 1527 +17 255 0 620 720 249 253 1524 730 0 1520 +17
+ 249 0 620 255 700 247 84 716 0 1526 +17 700 0 620 249 261 82 1528 698 0 0 +17 8
+4 0 1459 81 1526 82 249 716 0 603 -17 1526 0 1459 84 87 247 735 733 0 1524 -15 1
+459 1503 0 81 1453 0 17 87 0 1459 1526 81 85 715 713 0 735 -17 81 0 1459 87 84 7
+9 603 595 0 715 -17 715 0 1529 703 1527 79 87 713 0 1530 +15 1529 1800 0 703 337
+ 1521 17 703 0 1529 1527 715 265 1530 701 0 1525 +17 1527 0 1529 715 703 85 1525
+ 364 0 0 -17 1530 0 1211 603 267 79 703 701 0 0 -15 1211 1684 0 267 1202 0 17 60
+3 0 1211 1528 1530 82 81 595 0 700 +17 267 0 1211 1530 1528 265 709 707 0 703 -1
+7 1528 0 1211 267 603 259 700 698 0 709 -17 709 0 329 1531 1525 259 267 707 0 0
+ +17 1531 0 329 712 709 262 261 704 0 0 -17 1525 0 329 709 735 265 1527 364 0 0
+ +16 364 1222 1532 ?1525 358 1533 349 358 1533 1 81 1 1532 3617 350 364 0 0 1534
+ 632 1535 16 1533 1527 1534 ?1536 364 1537 349 364 1537 1 81 1 1534 3616 350 153
+3 0 0 361 1532 1538 17 1536 0 329 689 712 274 1539 1533 0 0 +16 1537 1837 1540 ?
+1541 1533 355 349 1533 355 1 81 1 1540 3614 350 1537 0 0 356 361 1542 17 1541 0
+ 329 668 692 286 1543 1537 0 0 +16 355 2153 352 ?1544 1537 347 349 1537 347 1 81
+ 1 352 3612 350 355 0 0 346 356 1545 17 1544 0 329 650 672 298 1546 355 0 0 +17
+ 650 0 329 1547 1544 295 300 648 0 0 +17 672 0 329 1544 1548 64 1549 669 0 1546
+ +17 1546 0 1550 749 644 64 1544 355 0 0 -15 1550 2791 0 644 337 1551 17 749 0 1
+550 644 1546 58 66 746 0 1552 +17 644 0 1550 1546 749 298 1552 642 0 1544 +17 15
+52 0 1234 647 300 58 644 642 0 0 -15 1234 2697 0 300 1226 0 17 647 0 1234 1553 1
+552 61 60 645 0 641 +17 300 0 1234 1552 1553 298 650 648 0 644 -17 1553 0 1234 3
+00 647 295 641 639 0 650 -17 641 0 620 285 297 61 1553 639 0 0 +17 285 0 620 282
+ 641 283 63 741 0 1549 +17 297 0 620 641 294 295 1547 654 0 1553 +17 1547 0 329
+ 653 650 292 297 654 0 0 -17 653 0 329 354 1547 55 623 651 0 1554 +17 354 0 329
+ 615 653 307 1554 347 0 0 +17 623 0 618 54 57 292 653 651 0 1547 -17 1554 0 338
+ 619 616 55 354 347 0 0 -15 338 3156 0 616 337 1550 17 619 0 338 616 1554 49 57
+ 636 0 611 +17 616 0 338 1554 619 307 611 617 0 354 +17 57 0 618 623 51 55 619 6
+36 0 653 -15 618 2803 0 51 1300 0 17 54 0 618 51 623 52 294 622 0 608 -17 615 0
+ 329 343 354 301 309 633 0 0 +17 343 0 329 342 615 304 303 624 0 0 -17 309 0 609
+ 611 610 307 615 633 0 616 -17 282 0 620 659 285 280 1548 663 0 1555 +17 63 0 15
+56 60 1549 61 285 741 0 647 -16 741 2453 1557 ?285 742 739 740 742 742 1 17 1549
+ 0 1556 63 66 283 672 669 0 1548 -15 1556 2485 0 60 876 0 17 66 0 1556 1549 60 6
+4 749 746 0 672 -17 1548 0 329 672 668 283 282 663 0 0 -17 668 0 329 1548 1541 2
+80 288 666 0 0 +17 288 0 1227 291 1555 286 668 666 0 662 -15 1227 2324 0 288 121
+8 0 17 291 0 1227 279 288 289 662 660 0 1558 -17 1555 0 1227 288 279 280 659 657
+ 0 668 -17 662 0 1551 1543 675 286 291 660 0 1541 +15 1551 2445 0 662 337 1559 1
+7 1543 0 1551 675 662 67 1541 1537 0 0 -17 675 0 1551 662 1543 289 69 673 0 0 +1
+7 69 0 1478 1560 1558 67 675 673 0 692 -15 1478 2125 0 1558 1472 0 17 1560 0 147
+8 1561 69 271 692 690 0 1562 -17 1558 0 1478 69 1561 289 279 607 0 675 -17 692 0
+ 329 1541 1562 67 1560 690 0 1543 +17 1562 0 329 692 689 271 270 684 0 0 -17 689
+ 0 329 1562 1536 268 276 687 0 0 +17 270 0 620 680 273 268 1562 684 0 1563 +17 6
+80 0 620 264 270 73 1563 678 0 0 +17 273 0 620 270 659 271 1561 676 0 1560 +17 1
+563 0 1219 276 606 268 680 678 0 689 -15 1219 1998 0 276 1210 0 17 276 0 1219 15
+64 1563 274 689 687 0 683 -17 606 0 1219 1563 1564 73 72 604 0 680 +17 1564 0 12
+19 606 276 70 683 681 0 0 -17 72 0 1489 78 75 70 606 604 0 695 -15 1489 1811 0 7
+2 1458 0 17 78 0 1489 1565 72 76 695 693 0 712 -17 75 0 1489 72 1565 73 264 696
+ 0 606 -17 695 0 1559 683 1539 70 78 693 0 1564 +15 1559 2114 0 683 337 1529 17
+ 683 0 1559 1539 695 274 1564 681 0 1536 +17 1539 0 1559 695 683 76 1536 1533 0
+ 0 -17 1565 0 1489 75 78 262 712 710 0 1531 -17 264 0 620 261 680 262 75 696 0 1
+565 +17 261 0 620 700 264 259 1531 704 0 1528 +17 712 0 329 1536 1531 76 1565 71
+0 0 1539 +17 659 0 620 273 282 277 1555 657 0 1561 +17 1561 0 1478 1558 1560 277
+ 273 676 0 0 -17 279 0 1227 1555 291 277 1558 607 0 659 +17 60 0 1556 66 63 58 6
+47 645 0 749 -14 876 2486 1482 ?1472 1300 1556 4 875 -868 868 1472 1300 22 81 1
+ 1482 3706 861 876 1311 0 1305 1477 1566 81 1 1305 3704 861 1300 1302 0 1499 148
+2 1567 83 3 1566 0 1 0 83 3 1567 0 1 0 81 1 1557 3628 350 741 0 0 598 744 1568 8
+0 1 350 1399 1569 9000 0 0 0 0 3 6 0 0 0 FFFFTFTFFFFFFF1 81 1 598 3627 350 596 0
+ 0 671 1557 1570 81 1 744 3629 350 742 0 0 1557 748 1571 82 1 1568 63753 81 1 74
+8 3630 350 746 0 0 744 1516 1572 82 1 1571 10339 81 1 1516 3631 350 745 0 0 748
+ 0 1573 82 1 1572 63756 82 1 1573 10318 81 1 671 3626 350 669 0 0 706 598 1574 8
+2 1 1570 10356 81 1 706 3625 350 704 0 0 732 671 1575 82 1 1574 63370 81 1 732 3
+624 350 730 0 0 686 706 1576 82 1 1575 10347 81 1 686 3623 350 684 0 0 601 732 1
+577 82 1 1576 10367 81 1 601 3622 350 591 0 0 665 686 1578 82 1 1577 10366 81 1
+ 665 3621 350 663 0 0 1508 601 1579 82 1 1578 10321 81 1 1508 3620 350 332 0 0 6
+56 665 1580 82 1 1579 10305 81 1 656 3619 350 654 0 0 632 1508 1581 82 1 1580 10
+340 81 1 632 3618 350 624 0 0 1532 656 1582 82 1 1581 10365 82 1 1582 63391 79 2
+55 23 1569 UG2/CMOD_SPLT_ATTRIBUTE81 1 356 3613 350 348 0 0 352 1540 1583 82 1 1
+545 10362 82 1 1583 10352 81 1 361 3615 350 358 0 0 1540 1534 1584 82 1 1542 103
+11 82 1 1584 10306 82 1 1538 10315 82 1 1535 10335 15 1523 7 0 590 337 0 17 590
+ 0 1523 590 590 0 866 588 0 0 +17 866 0 860 866 866 0 590 588 0 0 -17 1502 0 620
+ 312 39 313 1514 1503 0 330 +17 1514 0 27 29 28 26 1502 1503 0 0 -15 27 3395 0 2
+8 1241 0 17 29 0 27 25 1514 315 33 38 0 30 +16 31 3342 0 ?30 1503 0 1506 0 0 1 3
+0 1506 3490 0 31 0 1505 0 +-.025 -.03075914514051515 .03288046548407475 43296372
+8535968e-31 .707106781186548 -.707106781186547 17 344 0 1500 45 48 304 342 345 0
+ 343 -81 1 1310 3701 1020 874 1585 1499 1291 1302 1586 81 1 872 3700 861 868 129
+1 0 867 1499 1587 83 3 1501 0 1 0 81 1 1291 3699 1020 868 1588 872 871 1310 1589
+ 83 3 1587 0 1 0 81 3 1588 3639 1258 868 1290 1291 1083 1485 1590 1591 0 83 1 15
+89 0 91 1290 0 1265 868 1592 1588 1309 1286 81 3 1083 3638 1258 911 1278 1080 11
+18 1588 1593 1594 0 81 3 1485 3640 1258 876 1308 1311 1588 1140 1595 1596 0 82 1
+ 1590 0 82 1 1591 9 91 1308 0 1265 876 1597 1485 1473 1301 81 3 1140 3641 1258 1
+130 1428 1133 1485 1132 1598 1599 0 82 1 1595 0 82 1 1596 9 91 1428 0 1265 1130
+ 1600 1140 1356 1361 81 3 1132 3642 1258 1123 1361 1126 1140 1059 1601 1602 0 82
+ 1 1598 0 82 1 1599 10 91 1361 0 1265 1123 1603 1132 1428 1357 81 3 1059 3643 12
+58 935 1424 1056 1132 1442 1604 1605 0 82 1 1601 0 82 1 1602 11 91 1424 0 1265 9
+35 1606 1059 1285 1420 81 3 1442 3644 1258 811 1437 1438 1059 1071 1607 1608 0 8
+2 1 1604 0 82 1 1605 12 91 1437 0 1265 811 1609 1442 1432 1454 81 3 1071 3645 12
+58 923 1284 1068 1442 1610 1611 1612 0 82 1 1607 0 82 1 1608 13 91 1284 0 1265 9
+23 1613 1071 1383 1279 81 3 1610 3646 1258 846 1614 1022 1071 1021 1615 1616 0 8
+2 1 1611 0 82 1 1612 14 91 1614 0 1265 846 1401 1610 1617 1268 81 1 1022 3723 10
+20 846 1610 881 1269 974 1618 81 3 1021 3647 1258 882 1617 974 1610 1035 1619 16
+20 0 82 1 1615 0 82 1 1616 15 91 1617 0 1265 882 1621 1021 1340 1614 81 3 1035 3
+648 1258 959 1335 1032 1021 1205 1622 1623 0 82 1 1619 0 82 1 1620 16 91 1335 0
+ 1265 959 1624 1035 1330 1336 81 3 1205 3649 1258 1195 1298 1198 1035 1487 1625
+ 1626 0 82 1 1622 0 82 1 1623 17 91 1298 0 1265 1195 1627 1205 1465 1293 82 1 16
+25 0 82 1 1626 18 81 2 1627 3580 1399 1195 1628 1298 1609 1461 1629 1630 80 2 13
+99 1631 1632 9000 0 0 0 0 3 6 0 0 0 FFFFTFFFFFFFFF1 1 81 1 1628 1393 797 1195 16
+33 1627 1634 1635 1636 81 2 1609 3577 1399 811 1634 1437 1431 1627 1637 1638 81
+ 2 1461 3581 1399 1453 1635 1454 1627 1468 1639 1640 82 1 1629 51176 82 1 1630 4
+8 81 1 1635 1508 797 1453 1641 1461 1628 1642 1643 81 2 1468 3584 1399 1202 1642
+ 1465 1461 1644 1645 1646 82 1 1639 51176 82 1 1640 49 81 1 1642 1681 797 1202 1
+647 1468 1635 1648 1649 81 2 1644 3585 1399 1458 1648 1462 1468 1471 1650 1651 8
+2 1 1645 51176 82 1 1646 52 81 1 1648 1816 797 1458 1652 1644 1642 1653 1654 91
+ 1462 0 1265 1458 1644 1487 1454 1473 81 2 1471 3588 1399 1210 1653 1318 1644 14
+80 1655 1656 82 1 1650 51176 82 1 1651 53 81 1 1653 1995 797 1210 1657 1471 1648
+ 1658 1659 81 2 1480 3589 1399 1472 1658 1473 1471 1316 1660 1661 82 1 1655 5117
+6 82 1 1656 56 81 1 1658 2130 797 1472 1662 1480 1653 1663 1664 81 2 1316 3592 1
+399 1218 1663 1313 1480 1665 1666 1667 82 1 1660 51176 82 1 1661 57 81 1 1663 23
+21 797 1218 1668 1316 1658 1669 1670 81 2 1665 3593 1399 868 1671 1592 1316 1672
+ 1673 1674 82 1 1666 51176 82 1 1667 60 81 1 1671 3278 797 868 1675 1665 1676 16
+77 1678 81 1 1592 3609 350 868 1665 1290 1597 351 1679 81 2 1672 3594 1399 876 1
+669 1597 1665 1347 1680 1681 82 1 1673 51176 82 1 1674 44 81 1 1669 2492 797 876
+ 1682 1672 1663 1683 1684 81 1 1597 3608 350 876 1672 1308 0 1592 1685 81 2 1347
+ 3597 1399 1226 1683 1317 1672 1307 1686 1687 82 1 1680 51176 82 1 1681 44 81 1
+ 1683 2694 797 1226 1688 1347 1669 1689 1690 81 2 1307 3598 1399 1300 1691 1301
+ 1347 1344 1692 1693 82 1 1686 51176 82 1 1687 64 81 1 1691 2809 1631 1300 1694
+ 1307 1695 1696 1697 81 2 1344 3601 1399 613 1698 1341 1307 1699 1700 1701 82 1
+ 1692 51176 82 1 1693 65 81 1 1698 3033 797 613 1702 1344 1689 1676 1703 81 2 16
+99 3602 1399 874 1704 1309 1344 1297 1705 1706 82 1 1700 51176 82 1 1701 68 81 1
+ 1704 3174 1631 874 1707 1699 1708 1709 1710 91 1309 0 1265 874 1699 1585 1301 1
+290 81 2 1297 3603 1399 621 1711 1293 1699 1375 1712 1713 82 1 1705 51176 82 1 1
+706 69 81 1 1711 3522 1631 621 1708 1297 1714 0 1715 81 2 1375 3604 1399 337 171
+4 1371 1297 1266 1716 1717 82 1 1712 51176 82 1 1713 42 81 1 1714 3520 1631 337
+ 1718 1375 1719 1711 1720 81 2 1266 3605 1399 325 1721 1259 1375 1722 1723 1724
+ 82 1 1716 51176 82 1 1717 1 81 1 1721 3404 797 325 1725 1266 1677 0 1726 81 2 1
+722 3606 1399 1241 1677 1267 1266 0 1727 1728 82 1 1723 51176 82 1 1724 72 81 1
+ 1677 3392 797 1241 1729 1722 1671 1721 1730 91 1267 0 1265 1241 1722 1249 1259
+ 1341 82 1 1727 51176 82 1 1728 73 80 1 797 1731 1732 9000 0 0 0 0 3 6 0 0 0 FFF
+FTFTFFFFFFF1 81 1 1729 3393 1733 1241 1734 1677 1675 1725 1735 82 1 1730 3 80 1
+ 1733 797 1736 9000 0 0 0 0 3 6 0 0 0 FFFFTFTFFFFFFF1 81 1 1734 3394 1631 1241 0
+ 1729 1737 1719 1738 81 1 1675 3277 1733 868 1739 1671 1740 1729 1741 81 1 1725
+ 3405 1733 325 1719 1721 1729 0 1742 82 1 1735 1338 81 1 1719 3406 1631 325 0 17
+25 1734 1714 1743 82 1 1742 1341 80 1 1631 1733 1744 9000 0 0 0 0 3 6 0 0 0 FFFF
+TFFFFFFFFF1 82 1 1743 1603 79 23 1744 SolidEdge/MNKR_ATTR_CID81 1 1739 3276 1631
+ 868 1709 1675 1709 1737 1745 81 1 1740 3274 1733 868 0 1709 1707 1675 1746 82 1
+ 1741 1341 81 1 1709 3275 1631 868 1740 1739 1704 1739 1747 81 1 1707 3173 1733
+ 874 1676 1704 1702 1740 1748 82 1 1746 1338 81 1 1676 3172 797 874 0 1707 1698
+ 1671 1749 81 1 1702 3034 1733 613 1696 1698 1694 1707 1750 82 1 1748 1338 81 1
+ 1696 3035 1631 613 0 1702 1691 1718 1751 81 1 1694 2808 1733 1300 1689 1691 168
+8 1702 1752 82 1 1750 1341 81 1 1689 2807 797 1300 0 1694 1683 1698 1753 81 1 16
+88 2695 1733 1226 1754 1683 1682 1694 1755 82 1 1752 1338 81 1 1754 2696 1631 12
+26 0 1688 1756 1757 1758 81 1 1682 2491 1733 876 1756 1669 1759 1688 1760 82 1 1
+755 1341 81 1 1756 2490 1631 876 1761 1682 1761 1754 1762 81 1 1759 2488 1733 87
+6 0 1761 1668 1682 1763 82 1 1760 1341 81 1 1761 2489 1631 876 1759 1756 1764 17
+56 1765 81 1 1668 2322 1733 1218 1766 1663 1662 1759 1767 82 1 1763 1338 81 1 17
+66 2323 1631 1218 0 1668 1768 1769 1770 81 1 1662 2129 1733 1472 1768 1658 1657
+ 1668 1771 82 1 1767 1341 81 1 1768 2128 1631 1472 0 1662 1772 1766 1773 81 1 16
+57 1996 1733 1210 1774 1653 1652 1662 1775 82 1 1771 1338 81 1 1774 1997 1631 12
+10 0 1657 1776 1777 1778 81 1 1652 1815 1733 1458 1776 1648 1647 1657 1779 82 1
+ 1775 1341 81 1 1776 1814 1631 1458 0 1652 1780 1774 1781 81 1 1647 1682 1733 12
+02 1782 1642 1641 1652 1783 82 1 1779 1338 81 1 1782 1683 1631 1202 0 1647 1784
+ 1785 1786 81 1 1641 1507 1733 1453 1784 1635 1633 1647 1787 82 1 1783 1341 81 1
+ 1784 1506 1631 1453 0 1641 1788 1782 1789 81 1 1633 1394 1733 1195 1790 1628 17
+91 1641 1792 82 1 1787 1338 81 1 1790 1395 1631 1195 0 1633 1793 1794 1795 81 1
+ 1791 1215 1733 811 1793 1634 1796 1633 1797 82 1 1792 1341 81 1 1793 1214 1631
+ 811 0 1791 1798 1790 1799 81 1 1634 1216 797 811 1791 1609 1800 1628 1801 81 1
+ 1796 994 1733 756 0 758 1802 1791 1803 82 1 1797 1338 81 1 758 995 797 756 1796
+ 0 771 1804 1805 81 1 1802 900 1733 769 0 771 1806 1796 1807 82 1 1803 1 81 1 77
+1 901 797 769 1802 0 784 758 1808 81 1 1806 806 1733 782 0 784 798 1802 1809 82
+ 1 1807 1 81 1 784 807 797 782 1806 0 795 771 1810 81 1 798 712 1733 794 0 795 1
+811 1806 1812 82 1 1809 1 81 1 1811 519 1733 584 0 586 459 798 1813 82 1 1812 1
+ 81 1 586 520 797 584 1811 0 1814 795 1815 81 1 459 112 1733 457 1814 0 455 1811
+ 1816 82 1 1813 81 81 1 1814 113 797 457 0 459 1817 586 1818 81 1 455 109 1733 4
+53 1817 0 451 459 1819 82 1 1816 392 81 1 1817 110 797 453 0 455 1820 1814 1821
+ 81 1 451 106 1733 449 1820 0 447 455 1822 82 1 1819 871 81 1 1820 107 797 449 0
+ 451 1823 1817 1824 81 1 447 103 1733 445 1823 0 443 451 1825 82 1 1822 860 81 1
+ 1823 104 797 445 0 447 1826 1820 1827 81 1 443 100 1733 441 1826 0 439 447 1828
+ 82 1 1825 885 81 1 1826 101 797 441 0 443 1829 1823 1830 81 1 439 97 1733 437 1
+829 0 435 443 1831 82 1 1828 430 81 1 1829 98 797 437 0 439 1832 1826 1833 81 1
+ 435 94 1733 433 1832 0 431 439 1834 82 1 1831 856 81 1 1832 95 797 433 0 435 18
+35 1829 1836 81 1 431 91 1733 429 1835 0 427 435 1837 82 1 1834 799 81 1 1835 92
+ 797 429 0 431 1838 1832 1839 81 1 427 88 1733 425 1838 0 423 431 1840 82 1 1837
+ 883 81 1 1838 89 797 425 0 427 1841 1835 1842 81 1 423 85 1733 421 1841 0 419 4
+27 1843 82 1 1840 859 81 1 1841 86 797 421 0 423 1844 1838 1845 81 1 419 82 1733
+ 417 1844 0 415 423 1846 82 1 1843 881 81 1 1844 83 797 417 0 419 1847 1841 1848
+ 81 1 415 79 1733 413 1847 0 411 419 1849 82 1 1846 734 81 1 1847 80 797 413 0 4
+15 1850 1844 1851 81 1 411 76 1733 409 1850 0 407 415 1852 82 1 1849 851 81 1 18
+50 77 797 409 0 411 1853 1847 1854 81 1 407 73 1733 405 1853 0 403 411 1855 82 1
+ 1852 637 81 1 1853 74 797 405 0 407 1856 1850 1857 81 1 403 70 1733 401 1856 0
+ 399 407 1858 82 1 1855 879 81 1 1856 71 797 401 0 403 1859 1853 1860 81 1 399 6
+7 1733 397 1859 0 395 403 1861 82 1 1858 843 81 1 1859 68 797 397 0 399 1862 185
+6 1863 81 1 395 64 1733 393 1862 0 391 399 1864 82 1 1861 877 81 1 1862 65 797 3
+93 0 395 1865 1859 1866 81 1 391 61 1733 389 1865 0 387 395 1867 82 1 1864 523 8
+1 1 1865 62 797 389 0 391 1868 1862 1869 81 1 387 58 1733 385 1868 0 383 391 187
+0 82 1 1867 838 81 1 1868 59 797 385 0 387 1871 1865 1872 81 1 383 55 1733 381 1
+871 0 379 387 1873 82 1 1870 467 81 1 1871 56 797 381 0 383 1874 1868 1875 81 1
+ 379 52 1733 377 1874 0 375 383 1876 82 1 1873 875 81 1 1874 53 797 377 0 379 18
+77 1871 1878 81 1 375 49 1733 373 1877 0 371 379 1879 82 1 1876 832 81 1 1877 50
+ 797 373 0 375 1880 1874 1881 81 1 371 46 1733 369 1880 0 463 375 1882 82 1 1879
+ 873 81 1 1880 47 797 369 0 371 1883 1877 1884 81 1 463 43 1733 368 1883 0 0 371
+ 1885 82 1 1882 344 81 1 1883 44 797 368 0 463 0 1880 1886 82 1 1885 827 82 1 18
+86 17 82 1 1884 17 82 1 1881 17 82 1 1878 17 82 1 1875 17 82 1 1872 17 82 1 1869
+ 17 82 1 1866 17 82 1 1863 17 82 1 1860 17 82 1 1857 17 82 1 1854 17 82 1 1851 1
+7 82 1 1848 17 82 1 1845 17 82 1 1842 17 82 1 1839 17 82 1 1836 17 82 1 1833 17
+ 82 1 1830 17 82 1 1827 17 82 1 1824 17 82 1 1821 17 82 1 1818 17 82 1 1815 17 8
+2 1 1810 17 82 1 1808 17 81 1 1804 1129 797 621 1887 1788 758 1800 1888 82 1 180
+5 17 81 1 1887 1130 1631 621 0 1804 1889 1798 1890 81 1 1788 1488 1631 621 1804
+ 1780 1794 1784 1891 81 1 1800 1177 797 337 1892 1798 1804 1634 1893 82 1 1888 1
+ 81 1 1892 31 1631 337 0 1800 0 1894 1895 81 1 1798 1178 1631 337 1800 1794 1887
+ 1793 1896 82 1 1893 2 81 1 1794 1486 1631 337 1798 1785 1790 1788 1897 82 1 189
+6 1417 81 1 1785 1794 1631 337 1794 1777 1782 1780 1898 82 1 1897 1567 81 1 1777
+ 2108 1631 337 1785 1769 1774 1772 1899 81 1 1780 1796 1631 621 1788 1772 1785 1
+776 1900 82 1 1898 1573 81 1 1772 2110 1631 621 1780 1764 1777 1768 1901 82 1 19
+00 1573 81 1 1764 2440 1631 621 1772 1695 1769 1761 1902 82 1 1901 1579 81 1 169
+5 2787 1631 621 1764 1708 1757 1691 1903 81 1 1769 2438 1631 337 1777 1757 1766
+ 1764 1904 82 1 1902 1585 81 1 1757 2786 1631 337 1769 1718 1754 1695 1905 82 1
+ 1904 1585 81 1 1718 3149 1631 337 1757 1714 1696 1708 1906 82 1 1905 1591 81 1
+ 1708 3151 1631 621 1695 1711 1718 1704 1907 82 1 1906 1597 82 1 1907 1597 82 1
+ 1903 1591 82 1 1899 1579 81 1 1894 38 1631 18 0 1450 1892 1908 1909 82 1 1895 9
+8 81 2 1450 3533 1399 18 1894 1376 0 1436 1910 1911 81 1 1908 214 1631 843 0 191
+2 1894 1913 1914 82 1 1909 98 81 2 1912 3535 1399 843 1908 1268 1436 1401 1915 1
+916 81 1 1913 218 1631 846 0 1401 1908 1917 1918 82 1 1914 892 81 2 1401 3536 13
+99 846 1913 1614 1912 1396 1919 1920 81 1 1917 224 1631 882 0 1621 1913 1921 192
+2 82 1 1918 892 81 2 1621 3559 1399 882 1917 1617 1923 1289 1924 1925 81 1 1921
+ 230 1631 967 0 1923 1917 1926 1927 82 1 1922 892 81 2 1923 3558 1399 967 1921 1
+340 1339 1621 1928 1929 81 1 1926 236 1631 963 0 1339 1921 1930 1931 82 1 1927 8
+92 81 2 1339 3557 1399 963 1926 1336 1624 1923 1932 1933 81 1 1930 242 1631 959
+ 0 1624 1926 1934 1935 82 1 1931 892 81 2 1624 3556 1399 959 1930 1335 1333 1339
+ 1936 1937 81 1 1934 248 1631 955 0 1333 1930 1938 1939 82 1 1935 892 81 2 1333
+ 3555 1399 955 1934 1330 1940 1624 1941 1942 81 1 1938 254 1631 951 0 1940 1934
+ 1943 1944 82 1 1939 892 81 2 1940 3554 1399 951 1938 1334 1391 1333 1945 1946 8
+1 1 1943 260 1631 947 0 1391 1938 1947 1948 82 1 1944 892 81 2 1391 3553 1399 94
+7 1943 1388 1419 1940 1949 1950 81 1 1947 266 1631 943 0 1419 1943 1951 1952 82
+ 1 1948 892 81 2 1419 3552 1399 943 1947 1392 1953 1391 1954 1955 81 1 1951 272
+ 1631 939 0 1953 1947 1956 1957 82 1 1952 892 81 2 1953 3551 1399 939 1951 1420
+ 1606 1419 1958 1959 81 1 1956 278 1631 935 0 1606 1951 1960 1961 82 1 1957 892
+ 81 2 1606 3550 1399 935 1956 1424 1423 1953 1962 1963 81 1 1960 284 1631 931 0
+ 1423 1956 1964 1965 82 1 1961 892 81 2 1423 3549 1399 931 1960 1285 1283 1606 1
+966 1967 81 1 1964 290 1631 927 0 1283 1960 1968 1969 82 1 1965 892 81 2 1283 35
+48 1399 927 1964 1279 1613 1423 1970 1971 81 1 1968 296 1631 923 0 1613 1964 197
+2 1973 82 1 1969 892 81 2 1613 3547 1399 923 1968 1284 1386 1283 1974 1975 81 1
+ 1972 302 1631 919 0 1386 1968 1976 1977 82 1 1973 892 81 2 1386 3546 1399 919 1
+972 1383 1416 1613 1978 1979 81 1 1976 308 1631 915 0 1416 1972 1980 1981 82 1 1
+977 892 81 2 1416 3545 1399 915 1976 1387 1982 1386 1983 1984 81 1 1980 314 1631
+ 911 0 1982 1976 1985 1986 82 1 1981 892 81 2 1982 3544 1399 911 1980 1278 1276
+ 1416 1987 1988 81 1 1985 320 1631 907 0 1276 1980 1989 1990 82 1 1986 892 81 2
+ 1276 3543 1399 907 1985 1273 1991 1982 1992 1993 81 1 1989 326 1631 903 0 1991
+ 1985 1994 1995 82 1 1990 892 81 2 1991 3542 1399 903 1989 1277 1328 1276 1996 1
+997 81 1 1994 332 1631 899 0 1328 1989 1998 1999 82 1 1995 892 81 2 1328 3541 13
+99 899 1994 1325 2000 1991 2001 2002 81 1 1998 338 1631 895 0 2000 1994 2003 200
+4 82 1 1999 892 81 2 2000 3540 1399 895 1998 1329 1381 1328 2005 2006 81 1 2003
+ 344 1631 891 0 1381 1998 1406 2007 82 1 2004 892 81 2 1381 3539 1399 891 2003 1
+378 1402 2000 2008 2009 81 1 1406 350 1631 887 0 1402 2003 1400 2010 82 1 2007 8
+92 81 1 1400 356 1631 884 0 1396 1406 2011 2012 82 1 2010 892 81 1 2011 645 1631
+ 805 0 1405 1400 2013 2014 82 1 2012 892 81 2 1405 3563 1399 805 2011 1362 1360
+ 1355 2015 2016 81 1 2013 686 1631 1117 0 1360 2011 2017 2018 82 1 2014 1046 81
+ 2 1360 3562 1399 1117 2013 1357 1603 1405 2019 2020 81 1 2017 697 1631 1123 0 1
+603 2013 2021 2022 82 1 2018 1046 81 2 1603 3561 1399 1123 2017 1361 1289 1360 2
+023 2024 81 1 2021 739 1631 1130 0 1600 2017 2025 2026 82 1 2022 1046 81 2 1600
+ 3566 1399 1130 2021 1428 1427 1322 2027 2028 81 1 2025 780 1631 1137 0 1427 202
+1 2029 2030 82 1 2026 1082 81 2 1427 3565 1399 1137 2025 1356 1355 1600 2031 203
+2 81 1 2029 791 1631 1145 0 1355 2025 2033 2034 82 1 2030 1082 81 2 1355 3564 13
+99 1145 2029 1352 1405 1427 2035 2036 81 1 2033 833 1631 1153 0 1351 2029 2037 2
+038 82 1 2034 1082 81 2 1351 3569 1399 1153 2033 1348 2039 1370 2040 2041 81 1 2
+037 874 1631 1161 0 2039 2033 2042 2043 82 1 2038 1089 81 2 2039 3568 1399 1161
+ 2037 1324 1322 1351 2044 2045 81 1 2042 885 1631 828 0 1322 2037 2046 2047 82 1
+ 2043 1089 81 2 1322 3567 1399 828 2042 1319 1600 2039 2048 2049 81 1 2046 908 1
+631 808 0 1436 2042 2050 2051 82 1 2047 1089 81 2 1436 3534 1399 808 2046 1432 1
+450 1912 2052 2053 81 1 2050 927 1631 824 0 1431 2046 2054 2055 82 1 2051 892 81
+ 2 1431 3572 1399 824 2050 1323 1366 1609 2056 2057 81 1 2054 968 1631 827 0 136
+6 2050 1889 2058 82 1 2055 1096 81 2 1366 3571 1399 827 2054 1363 1370 1431 2059
+ 2060 81 1 1889 979 1631 834 0 1370 2054 1887 2061 82 1 2058 1096 81 2 1370 3570
+ 1399 834 1889 1299 1351 1366 2062 2063 82 1 2061 1096 82 1 2062 51176 82 1 2063
+ 39 82 1 2059 51176 82 1 2060 40 82 1 2056 51176 82 1 2057 41 82 1 2052 51176 82
+ 1 2053 3 82 1 2048 51176 82 1 2049 36 91 1324 0 1265 1161 2039 1171 1319 1348 8
+2 1 2044 51176 82 1 2045 37 81 3 1171 3651 1258 1161 1324 1165 1487 1091 2064 20
+65 0 81 3 1091 3652 1258 903 1277 1088 1171 1585 2066 2067 0 82 1 2064 0 82 1 20
+65 20 91 1277 0 1265 903 1991 1091 1325 1273 81 3 1585 3653 1258 874 1309 1310 1
+091 1099 2068 2069 0 82 1 2066 0 82 1 2067 21 81 3 1099 3654 1258 895 1329 1096
+ 1585 1043 2070 2071 0 82 1 2068 0 82 1 2069 22 91 1329 0 1265 895 2000 1099 137
+8 1325 81 3 1043 3655 1258 951 1334 1040 1099 1027 2072 2073 0 82 1 2070 0 82 1
+ 2071 23 91 1334 0 1265 951 1940 1043 1388 1330 81 3 1027 3656 1258 967 1340 102
+3 1043 1055 2074 2075 0 82 1 2072 0 82 1 2073 24 91 1340 0 1265 967 1923 1027 13
+36 1617 82 1 2074 0 82 1 2075 25 82 1 2040 51176 82 1 2041 38 82 1 2035 51176 82
+ 1 2036 33 82 1 2031 51176 82 1 2032 34 82 1 2027 51176 82 1 2028 35 81 2 1289 3
+560 1399 16 1737 1286 1621 1603 2076 2077 82 1 2023 51176 82 1 2024 30 81 1 1737
+ 3291 1631 16 0 1289 1739 1734 2078 82 1 2076 51176 82 1 2077 29 82 1 2078 952 8
+2 1 2019 51176 82 1 2020 31 82 1 2015 51176 82 1 2016 32 82 1 2008 51176 82 1 20
+09 8 82 1 2005 51176 82 1 2006 9 82 1 2001 51176 82 1 2002 10 82 1 1996 51176 82
+ 1 1997 11 82 1 1992 51176 82 1 1993 12 91 1278 0 1265 911 1982 1083 1273 1387 8
+2 1 1987 51176 82 1 1988 13 82 1 1983 51176 82 1 1984 14 82 1 1978 51176 82 1 19
+79 15 82 1 1974 51176 82 1 1975 16 82 1 1970 51176 82 1 1971 17 82 1 1966 51176
+ 82 1 1967 18 82 1 1962 51176 82 1 1963 19 91 1420 0 1265 939 1953 1055 1424 139
+2 82 1 1958 51176 82 1 1959 20 82 1 1954 51176 82 1 1955 21 82 1 1949 51176 82 1
+ 1950 22 82 1 1945 51176 82 1 1946 23 82 1 1941 51176 82 1 1942 24 82 1 1936 511
+76 82 1 1937 25 82 1 1932 51176 82 1 1933 26 82 1 1928 51176 82 1 1929 27 82 1 1
+924 51176 82 1 1925 28 82 1 1919 51176 82 1 1920 5 91 1268 0 1265 843 1912 1260
+ 1614 1371 82 1 1915 51176 82 1 1916 4 82 1 1910 51176 82 1 1911 2 82 1 1891 156
+7 82 1 1890 1417 82 1 1801 3 82 1 1799 1417 82 1 1795 1567 82 1 1789 1567 82 1 1
+786 1573 82 1 1781 1573 82 1 1778 1579 82 1 1773 1579 82 1 1770 1585 82 1 1765 1
+585 82 1 1762 1417 82 1 1758 1591 82 1 1753 3 82 1 1751 1597 82 1 1749 3 82 1 17
+47 1585 82 1 1745 1417 82 1 1738 1603 79 23 1736 SolidEdge/MNKR_ATTR_SID79 24 17
+32 SolidEdge/MNKR_ATTR_TYPE82 1 1726 3 82 1 1720 1603 82 1 1715 1603 82 1 1710 1
+597 82 1 1703 3 82 1 1697 1591 82 1 1690 3 82 1 1685 51173 82 1 1684 3 81 1 351
+ 3610 350 347 0 0 1592 346 2079 82 1 1679 51153 82 1 2079 63363 82 1 1678 3 82 1
+ 1670 3 82 1 1664 3 82 1 1659 3 82 1 1654 3 82 1 1649 3 82 1 1643 3 82 1 1637 51
+176 82 1 1638 45 82 1 1636 3 79 23 1632 UG2/CMOD_FACR_ATTRIBUTE81 1 1269 3721 10
+20 843 1260 845 1372 1022 2080 83 1 1618 0 81 1 845 3722 861 843 1269 0 863 881
+ 2081 83 1 2080 0 81 1 863 3720 861 337 1372 0 859 845 2082 83 3 2081 0 1 0 83 3
+ 2082 0 1 0 81 3 1118 3637 1258 805 1362 1113 0 1083 2083 2084 0 82 1 1593 0 82
+ 1 1594 8 82 1 2083 0 82 1 2084 7 83 1 1586 0 82 1 1491 0 82 1 1492 19 83 1 1486
+ 0 83 3 1484 0 1 0 83 1 1464 0 82 1 1451 0 82 1 1452 26 83 1 1444 0 83 3 1441 0
+ 1 0 82 1 1412 0 82 1 1413 32 82 1 1407 51176 82 1 1408 7 82 1 1403 51176 82 1 1
+404 6 81 1 1397 3634 1263 1265 2085 0 0 0 2086 81 2 1398 3636 2087 1 1265 2088 0
+ 0 2089 2090 80 2 2087 2091 2092 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 81 3 2
+088 3695 2093 1 1398 12 0 0 2094 2095 2096 83 1 2089 7830.64369935348 84 255 8 2
+090 KG/CU M 80 3 2093 1258 2097 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 81 2
+ 12 3696 2098 1 2088 2 0 0 2099 0 84 68 2094 {94683e01-1f47-11d3-ffffffbcffffff8
+9-0060ffffffb0ffffffed22ffffff8f}84 38 2095 Unigraphics V15.0.2.1<!<UGMOLD>!>-de
+mo82 1 2096 0 80 2 2098 2093 2100 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFFFFFF2 3 83 1
+ 2099 54 79 22 2100 MONIKER/BODY_ID_ATTRIB79 25 2097 MONIKER/GUID_TABLE_ATTRIB79
+ 16 2092 SDL/TYSA_DENSITY80 1 1263 2101 2102 9000 0 0 0 0 3 5 0 0 0 FFFFFFFFTFFF
+FF1 81 1 2085 3633 2101 1265 0 1397 0 0 2103 82 1 2086 0 80 1 2101 350 2104 9000
+ 0 0 0 0 3 5 0 0 0 FFFFFFFFTFFFFF1 82 1 2103 51176 79 23 2104 UG2/CMOD_FEAT_ATTR
+IBUTE79 23 2102 UG2/CMOD_NEST_ATTRIBUTE83 1 1377 0 83 1 1312 0 83 1 1292 0 82 1
+ 1271 0 82 1 1272 40 79 27 1264 MONIKER/MONIKER_DATA_ATTRIB79 21 1257 SDL/TYSA_T
+RANSLUCENCY83 1 1251 0 83 1 1245 0 83 1 1238 0 83 1 1231 0 83 1 1223 0 83 1 1215
+ 0 83 1 1207 0 83 1 1199 0 83 1 1192 0 83 1 1187 0 83 1 1183 0 83 1 1179 0 15 11
+75 889 0 2105 828 2106 17 2105 0 1175 2105 2105 0 768 766 0 0 -15 2106 890 0 849
+ 828 0 17 849 0 2106 849 849 0 765 763 0 0 -17 768 0 2107 768 768 0 2105 766 0 0
+ +15 2107 878 0 768 1161 0 83 1 1173 0 15 1169 877 0 772 1161 2107 17 772 0 1169
+ 772 772 0 2108 769 0 0 +17 2108 0 2109 2108 2108 0 772 769 0 0 -15 2109 838 0 2
+108 1153 0 83 1 1166 0 15 1162 837 0 775 1153 2109 17 775 0 1162 775 775 0 2110
+ 773 0 0 +17 2110 0 812 2110 2110 0 775 773 0 0 -15 812 811 0 2110 808 807 83 1
+ 1158 0 15 1154 795 0 2111 1145 2112 17 2111 0 1154 2111 2111 0 781 779 0 0 -15
+ 2112 796 0 851 1145 0 17 851 0 2112 851 851 0 778 776 0 0 -17 781 0 2113 781 78
+1 0 2111 779 0 0 +15 2113 784 0 781 1137 0 83 1 1150 0 15 1146 783 0 785 1137 21
+13 17 785 0 1146 785 785 0 2114 782 0 0 +17 2114 0 2115 2114 2114 0 785 782 0 0
+ -15 2115 744 0 2114 1130 0 83 1 1142 0 15 1138 743 0 788 1130 2115 17 788 0 113
+8 788 788 0 820 786 0 0 +83 1 1134 0 15 1131 701 0 2116 1123 2117 17 2116 0 1131
+ 2116 2116 0 793 792 0 0 -15 2117 702 0 853 1123 0 17 853 0 2117 853 853 0 791 7
+89 0 0 -17 793 0 2118 793 793 0 2116 792 0 0 +15 2118 690 0 793 1117 0 83 1 1127
+ 0 15 800 689 0 796 1117 2118 83 1 1120 0 83 1 1114 0 83 1 1109 0 83 1 1105 0 83
+ 1 1101 0 83 1 1097 0 83 1 1093 0 83 1 1089 0 83 1 1085 0 83 1 1081 0 83 1 1077
+ 0 83 1 1073 0 83 1 1069 0 83 1 1065 0 83 1 1061 0 83 1 1057 0 83 1 1053 0 83 1
+ 1049 0 83 1 1045 0 83 1 1041 0 83 1 1037 0 83 1 1033 0 83 1 1029 0 83 3 1025 0
+ 1 0 83 1 1024 0 79 15 1019 SDL/TYSA_COLOUR17 367 0 869 367 367 0 818 363 0 0 +8
+3 3 873 0 1 0 83 3 864 0 1 0 15 806 650 0 801 805 0 17 801 0 806 801 801 0 796 7
+94 0 0 -82 1 799 17 82 1 353 10314 19 17 1 0 1 0 8 4 S74 255 20 15 14 0 1721 172
+5 1711 1722 1516 2085 1397 1398 1112 2088 12 1250 1246 2 0 0 0 0 0 0 80 2 11 209
+8 2119 9000 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 1 83 24 13 .462702602148056 .10461
+22163534164 -.880318999290466 0 .886413097381592 -.03966358304023745 .4611922502
+5177 0 .01332972943782806 -.993721783161163 -.1110821142792702 0 0 0 0 1 1 -.007
+5 0 485722573273506e-31 .105668345971453 0 0 0 82 1 14 0 79 12 2119 SDL/ParaView
+1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_block.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_block.xmt_txt
new file mode 100644
index 0000000..1d89994
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_block.xmt_txt
@@ -0,0 +1,71 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\tt1\p_inst_bod1.x_t;
+FILE=U:\tt1\p_inst_bod1.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 82 2 3 0 0 0 0 1e3 1e
+-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 0 0 0 0 81 255 2 2 76 11 1 0 0 0 0 12 13 70 11 C
+I9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger
+_block1012 0 CZ3 0 4 T1 0 0 2 20 1 14 14 13 255 4 3 0 1 0 15 0 0 16 0 50 255 5 5
+4 0 15 17 0 0 +.01 .025 .005 0 0 1 1 0 0 30 255 6 62 0 9 18 0 0 +.01 0 .005 -1 0
+ 0 29 255 7 58 0 10 19 0 0 0 .005 19 255 8 1 0 1 16 0 20 V16 255 9 34 0 ?21 0 22
+ 6 0 0 1 18 255 10 23 0 21 0 23 7 ?1 17 255 21 0 24 25 26 10 27 9 0 28 +18 23 21
+ 0 29 10 30 19 ?1 17 29 0 31 32 33 23 28 22 0 34 +18 30 19 0 35 23 36 37 ?1 29 1
+9 57 0 23 37 7 0 .05 .005 29 37 56 0 30 38 19 .02 .05 .005 29 38 55 0 36 39 37 .
+02 0 .005 18 36 17 0 27 30 40 38 ?1 29 39 41 0 41 42 38 0 0 0 18 41 11 0 25 43 4
+4 39 ?1 29 42 40 0 43 45 39 0 .05 0 18 43 13 0 32 40 41 42 ?1 29 45 39 0 40 46 4
+2 .02 .05 0 18 40 15 0 47 36 43 45 ?1 29 46 38 0 44 0 45 .02 0 0 18 44 10 0 48 4
+1 0 46 ?1 17 48 0 49 50 51 44 26 52 0 53 -15 255 49 7 0 50 54 0 17 50 0 49 55 48
+ 40 56 57 0 0 +17 51 0 49 48 55 36 58 59 0 26 +17 26 0 24 21 53 36 48 52 0 0 +16
+ 52 18 0 ?26 60 57 61 0 0 1 17 53 0 24 26 25 44 62 63 0 56 +15 24 32 0 26 64 0 1
+7 25 0 24 53 21 41 33 65 0 66 -17 62 0 67 68 56 41 53 63 0 0 -16 63 12 0 ?53 69
+ 0 70 0 0 1 17 56 0 67 62 71 44 50 57 0 0 -15 67 8 0 56 72 0 17 71 0 67 56 68 40
+ 73 74 0 50 -16 57 6 0 ?50 52 74 75 0 0 1 16 74 16 0 ?73 57 69 76 0 0 1 30 75 43
+ 0 57 70 76 0 +.02 .025 0 0 1 0 30 70 42 0 63 0 75 0 +.01 0 0 1 0 0 30 76 44 0 7
+4 75 77 0 +.01 .05 0 -1 0 0 30 77 45 0 69 76 61 0 +0 .025 0 0 -1 0 16 69 14 0 ?6
+6 74 63 77 0 0 1 30 61 50 0 52 77 78 0 +.02 0 0 0 0 1 30 78 51 0 60 61 79 0 +.02
+ .05 0 0 0 1 16 60 20 0 ?55 80 52 78 0 0 1 30 79 52 0 80 78 81 0 +0 .05 0 0 0 1
+ 16 80 22 0 ?82 65 60 79 0 0 1 30 81 53 0 65 79 83 0 +0 0 0 0 0 1 16 65 24 0 ?33
+ 59 80 81 0 0 1 30 83 59 0 59 81 84 0 +.02 .025 .005 0 -1 0 16 59 25 0 ?51 85 65
+ 83 0 0 1 30 84 60 0 85 83 18 0 +.01 .05 .005 1 0 0 16 85 28 0 ?35 22 59 84 0 0
+ 1 30 18 61 0 22 84 6 0 +0 .025 .005 0 1 0 16 22 31 0 ?29 9 85 18 0 0 1 17 35 0
+ 86 47 82 30 34 85 0 58 +15 86 26 0 82 87 0 17 47 0 86 73 35 40 55 60 0 71 -17 8
+2 0 86 35 73 23 32 80 0 0 +17 34 0 88 28 58 23 35 85 0 82 -17 58 0 88 34 27 30 5
+1 59 0 55 -15 88 35 0 27 15 0 17 27 0 88 58 28 36 21 9 0 51 -17 55 0 49 51 50 30
+ 47 60 0 0 +17 28 0 88 27 34 10 29 22 0 33 -17 33 0 31 29 66 10 25 65 0 0 +15 31
+ 29 0 33 89 0 17 66 0 31 33 32 41 68 69 0 62 +17 32 0 31 66 29 43 82 80 0 73 -17
+ 68 0 67 71 62 43 66 69 0 0 -17 73 0 86 82 47 43 71 74 0 68 +14 255 89 30 90 ?87
+ 64 31 4 91 +0 0 87 64 20 81 1 90 79 92 89 0 0 93 94 95 14 87 27 94 ?72 89 86 4
+ 96 +0 0 72 89 20 14 64 33 93 ?89 15 24 4 17 +0 0 89 15 20 50 91 48 0 89 96 17 0
+ +0 .025 0 -1 0 0 0 0 1 13 20 4 0 0 0 0 0 0 8 15 14 15 36 97 ?64 0 88 4 5 +0 0 6
+4 0 20 81 1 97 77 92 15 0 0 0 93 98 80 255 1 92 0 99 8001 0 0 0 0 3 5 0 0 0 FFFF
+TFTFFFFFFF2 81 1 93 78 92 64 0 0 97 90 100 83 255 3 98 .5960784 .6666667 .686274
+5 83 3 100 .5960784 .6666667 .6862745 79 255 15 99 SDL/TYSA_COLOUR50 96 47 0 87
+ 101 91 0 +.01 .05 0 0 1 0 0 0 1 50 17 49 0 64 91 5 0 +.01 0 0 0 -1 0 0 0 -1 50
+ 101 46 0 54 102 96 0 +.02 .025 0 1 0 0 0 0 -1 14 54 2 103 ?0 72 49 4 101 +0 0 0
+ 72 20 50 102 37 0 72 0 101 0 +.01 .025 0 0 0 -1 -1 0 0 14 72 9 104 ?54 87 67 4
+ 102 +0 0 54 87 20 81 1 104 81 92 72 0 0 94 103 105 81 1 94 80 92 87 0 0 90 104
+ 106 81 1 103 82 92 54 0 0 104 0 107 83 3 105 .5960784 .6666667 .6862745 83 3 10
+7 .5960784 .6666667 .6862745 83 3 106 .5960784 .6666667 .6862745 83 3 95 .596078
+4 .6666667 .6862745 19 16 5 0 1 0 8 4 S74 4 CI16 index_map_offset0 0 1 dCCZ20 14
+ 2 0 0 2 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 11 108 109 8004 0 0 0 0 3
+ 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 12 7830.64 84 255 8 13 Kg/Cu M 79 16 109 SDL/TYS
+A_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_block_inscribed.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_block_inscribed.xmt_txt
new file mode 100644
index 0000000..e128215
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_block_inscribed.xmt_txt
@@ -0,0 +1,90 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\finstd\p_inst_bod7.x_t;
+FILE=U:\finstd\p_inst_bod7.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 123 2 3 0 0 0 0 1e3 1
+e-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 116 12 1 0 0 0 0 13 14 70 1
+1 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fin
+ger_block1012 0 CZ3 0 4 T1 0 0 2 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255
+ 6 54 0 18 19 0 0 +.05 .05 .04 0 0 1 1 0 0 137 255 7 105 0 1 20 0 21 -19 22 0 ?2
+9 255 8 96 0 11 23 0 0 0 .019 19 255 9 1 0 1 17 0 24 V16 255 10 99 0 254e-7 25 0
+ 26 0 0 0 1 18 255 11 94 0 27 0 28 8 254e-7 1 17 255 27 0 29 30 31 11 25 10 20 3
+2 -18 28 89 0 25 11 33 23 254e-7 1 17 25 0 34 35 32 28 27 10 36 37 +18 33 23 0 3
+8 28 39 40 ?1 29 23 91 0 28 40 8 .1 0 .019 29 40 58 0 33 41 23 0 0 .04 29 41 57
+ 0 39 42 40 0 .1 .04 18 39 21 0 43 33 44 41 ?1 29 42 56 0 44 45 41 .1 .1 .04 18
+ 44 19 0 46 39 47 42 ?1 29 45 55 0 47 48 42 .1 0 .04 18 47 17 0 35 44 49 45 ?1 2
+9 48 41 0 50 51 45 0 0 0 18 50 11 0 30 52 53 48 ?1 29 51 40 0 52 54 48 0 .1 0 18
+ 52 13 0 55 49 50 51 ?1 29 54 39 0 49 56 51 .1 .1 0 18 49 15 0 57 47 52 54 ?1 29
+ 56 38 0 53 0 54 .1 0 0 18 53 10 0 58 50 0 56 ?1 17 58 0 59 60 37 53 31 61 0 62
+ -15 255 59 7 0 60 63 0 17 60 0 59 64 58 49 65 66 0 0 +17 37 0 59 58 67 28 35 68
+ 0 31 -17 31 0 29 27 62 28 58 61 0 0 +16 61 18 0 ?31 69 68 70 0 0 1 17 62 0 29 3
+1 30 53 71 72 0 65 +15 29 100 0 27 73 0 17 30 0 29 62 27 50 74 75 0 76 -17 71 0
+ 77 78 65 50 62 72 0 0 -16 72 12 0 ?62 79 0 80 0 0 1 17 65 0 77 71 81 53 60 66 0
+ 0 -15 77 8 0 65 82 0 17 81 0 77 65 78 49 83 84 0 60 -16 66 6 0 ?60 68 84 85 0 0
+ 1 16 68 90 0 ?35 61 66 86 0 0 1 16 84 16 0 ?83 66 79 87 0 0 1 30 255 85 43 0 66
+ 80 87 0 +.1 .05 0 0 1 0 30 80 42 0 72 0 85 0 +.05 0 0 1 0 0 30 87 44 0 84 85 88
+ 0 +.05 .1 0 -1 0 0 30 88 45 0 79 87 89 0 +0 .05 0 0 -1 0 16 79 14 0 ?76 84 72 8
+8 0 0 1 30 89 50 0 1 88 90 91 +.1 0 0 0 0 1 30 90 51 0 69 89 92 0 +.1 .1 0 0 0 1
+ 141 255 91 86 93 93 89 133 255 86 92 0 68 94 70 0 +89 .1 0 .019 .1 0 .04 .019 .
+04 141 93 70 91 91 89 133 70 93 0 61 86 95 0 +89 .1 0 0 .1 0 .019 0 .019 133 95
+ 97 0 96 70 97 0 +98 0 0 .019 0 0 .04 .019 .04 16 96 95 0 ?38 75 99 95 0 0 1 133
+ 97 98 0 75 95 100 0 +98 0 0 0 0 0 .019 0 .019 30 98 53 0 1 92 101 102 +0 0 0 0
+ 0 1 30 92 52 0 99 90 98 0 +0 .1 0 0 0 1 30 101 59 0 103 98 104 0 +.1 .05 .04 0
+ -1 0 141 102 95 105 105 98 141 105 97 102 102 98 16 103 25 0 ?67 106 75 101 0 0
+ 1 30 104 60 0 106 101 107 0 +.05 .1 .04 1 0 0 16 106 28 0 ?46 108 103 104 0 0 1
+ 30 107 61 0 108 104 94 0 +0 .05 .04 0 1 0 16 108 31 0 ?43 26 106 107 0 0 1 30 9
+4 62 0 26 107 86 0 +.05 0 .04 -1 0 0 16 26 34 0 ?109 10 108 94 0 0 1 17 109 0 34
+ 32 35 33 110 26 0 111 +15 34 32 0 32 16 0 17 32 0 34 25 109 11 38 96 0 74 -17 3
+5 0 34 109 25 47 37 68 0 110 +17 110 0 112 113 111 47 109 26 0 67 -17 111 0 112
+ 110 114 33 43 108 0 0 -15 112 35 0 110 18 0 17 114 0 112 111 113 39 46 106 0 11
+5 -17 43 0 116 55 38 39 111 108 0 114 +15 116 29 0 74 117 0 17 55 0 116 76 43 52
+ 115 99 0 83 -17 38 0 116 43 74 33 32 96 0 109 +17 74 0 116 38 76 11 30 75 0 0 +
+17 76 0 116 74 55 50 78 79 0 71 +16 75 24 0 ?74 103 96 97 0 0 1 17 78 0 77 81 71
+ 52 76 79 0 0 -17 115 0 118 46 83 39 55 99 0 0 +16 99 22 0 ?115 96 69 92 0 0 1 1
+7 83 0 118 115 57 52 81 84 0 78 +15 118 26 0 115 119 0 17 57 0 118 83 46 49 64 6
+9 0 81 -17 46 0 118 57 115 44 114 106 0 113 +17 64 0 59 67 60 44 57 69 0 0 +16 6
+9 20 0 ?64 99 61 90 0 0 1 17 67 0 59 37 64 47 113 103 0 0 +17 113 0 112 114 110
+ 44 67 103 0 64 -14 255 119 27 120 ?82 117 118 5 121 +0 0 82 117 24 81 1 120 121
+ 122 119 0 0 123 124 125 14 82 9 124 ?63 119 77 5 126 +0 0 63 119 24 14 117 30 1
+23 ?119 73 116 5 127 +0 0 119 73 24 50 121 47 0 119 128 127 0 +.05 .1 0 0 1 0 0
+ 0 1 13 24 4 0 0 0 0 0 0 9 16 14 16 107 129 ?18 0 34 5 19 +73 73 18 0 24 81 1 12
+9 117 122 16 0 0 0 130 131 14 18 36 130 ?73 16 112 5 6 +0 0 73 16 24 50 19 49 0
+ 73 127 6 132 +.05 0 0 0 -1 0 0 0 -1 14 73 33 133 ?117 18 29 5 19 +16 16 117 18
+ 24 81 1 133 119 122 73 0 0 130 123 134 80 255 1 122 0 135 8001 0 0 0 0 3 5 0 0
+ 0 FFFFTFTFFFFFFF2 81 1 130 118 122 18 0 0 129 133 136 81 1 123 120 122 117 0 0
+ 133 120 137 83 255 3 134 .5960784 .6666667 .6862745 83 3 137 .5960784 .6666667
+ .6862745 83 3 136 .5960784 .6666667 .6862745 79 255 15 135 SDL/TYSA_COLOUR50 12
+7 48 0 117 121 19 0 +0 .05 0 -1 0 0 0 0 1 141 132 100 138 138 19 137 100 102 0 1
+ 97 36 139 +19 140 0 ?141 138 7 132 132 19 133 36 103 0 25 100 20 0 +100 -138777
+8780781446e-32 0 .019 .1 0 .019 0 1 141 139 36 139 139 100 134 255 140 0 0 0 0 0
+ 0 +141 142 136 255 141 1 2 2 2 5 FFF1 143 144 145 135 255 142 1 0 45 255 4 143
+ -.019 -.05 -.019 .05 127 255 2 144 2 2 128 255 2 145 0 1 133 20 104 0 27 36 7 0
+ +7 .1 0 .019 -1387778780781446e-32 0 .019 1 0 83 3 131 .5960784 .6666667 .68627
+45 50 128 46 0 63 126 121 0 +.1 .05 0 1 0 0 0 0 -1 14 63 2 146 ?0 82 59 5 128 +0
+ 0 0 82 24 50 126 37 0 82 0 128 0 +.05 .05 0 0 0 -1 -1 0 0 81 1 146 123 122 63 0
+ 0 124 0 147 81 1 124 122 122 82 0 0 120 146 148 83 3 147 .5960784 .6666667 .686
+2745 83 3 148 .5960784 .6666667 .6862745 83 3 125 .5960784 .6666667 .6862745 19
+ 17 5 0 1 0 9 5 S141 21 20 21 21 7 134 22 0 0 0 0 0 0 +149 150 136 149 1 2 2 2 5
+ FFF1 151 152 153 135 150 1 0 45 4 151 -.019 -.05 -.019 .05 127 2 152 2 2 128 2
+ 153 0 1 74 4 CI16 index_map_offset0 0 1 dCCZ20 15 2 0 0 2 146 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 80 2 12 154 155 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1
+ 13 7830.64 84 255 8 14 Kg/Cu M 79 16 155 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_block_tool.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_block_tool.xmt_txt
new file mode 100644
index 0000000..371913b
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_block_tool.xmt_txt
@@ -0,0 +1,80 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\fastinst\tool-thing-2p.x_t;
+FILE=U:\fastinst\tool-thing-2p.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 118 2 3 0 0 0 0 1e3 1
+e-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 112 12 1 0 0 0 0 13 14 70 1
+1 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fin
+ger_block1012 0 CZ3 0 4 T1 0 0 2 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255
+ 6 90 0 16 18 0 0 +.018 .015 -.01185278320312498 1 0 1104170216537108e-30 110417
+0216537108e-30 0 -1 30 255 7 86 0 19 20 0 0 +.018 .015 -.01185278320312498 0 -1
+ 0 29 255 8 67 0 21 22 0 .00885864257812496 0 -.011852783203125 19 255 9 1 0 1 1
+7 0 23 V16 255 10 73 0 ?24 0 25 20 0 0 1 18 255 11 15 0 26 0 27 28 ?1 17 255 26
+ 0 29 30 31 11 32 33 0 34 -18 27 10 0 35 11 36 37 ?1 29 28 17 0 11 37 38 .008858
+64257812496 .015 -.011852783203125 29 37 12 0 27 39 28 .00885864257812494 .015 .
+007 29 38 70 0 40 28 41 .018 0 -.01185278320312498 18 40 60 0 42 43 0 38 ?1 29 4
+1 69 0 43 38 22 .018 0 .007 18 43 58 0 24 44 40 41 ?1 29 22 68 0 44 41 8 .008858
+64257812494 0 .007 18 44 56 0 45 21 43 22 ?1 17 45 0 46 47 48 44 35 25 0 49 +18
+ 21 54 0 32 50 44 8 ?1 17 32 0 51 49 34 21 26 33 0 31 +18 50 2 0 52 36 21 53 ?1
+ 17 52 0 54 55 56 50 42 19 0 30 -18 36 5 0 57 27 50 39 ?1 29 53 4 0 50 0 39 .018
+ .015 -.01185278320312498 29 39 7 0 36 53 37 .018 .015 .007 17 57 0 46 48 47 36
+ 24 10 0 58 -15 255 46 79 0 47 59 0 17 48 0 46 45 57 27 58 60 0 61 +17 47 0 46 5
+7 45 43 62 63 0 64 -17 24 0 54 56 55 43 57 10 0 47 +17 58 0 65 66 61 36 48 60 0
+ 55 -15 65 23 0 66 67 0 17 66 0 65 68 58 50 55 69 0 0 -17 61 0 65 58 68 27 34 70
+ 0 0 -16 60 11 0 ?48 70 69 71 0 0 1 17 55 0 54 24 52 36 66 69 0 0 +15 54 81 0 56
+ 16 0 16 69 6 0 ?55 60 72 73 0 0 1 16 72 46 0 ?74 69 75 76 0 0 1 30 73 9 0 69 0
+ 71 0 +.018 .015 -.01185278320312498 -1104170216537108e-30 0 1 30 71 14 0 60 73
+ 77 0 +.018 .015 .007 -1 0 -1233482301749496e-30 30 77 19 0 70 71 78 0 +.0088586
+4257812494 .015 .007 1196184401248532e-30 0 -1 16 70 16 0 ?34 79 60 77 0 0 1 30
+ 78 22 0 79 77 80 0 +.00885864257812496 .015 -.011852783203125 1 0 1138599047768
+766e-30 16 79 20 0 ?30 19 70 78 0 0 1 30 80 66 0 81 78 82 0 +.018 0 -.0118527832
+0312498 -1104170216537108e-30 0 1 16 81 52 0 ?64 63 0 80 0 0 1 30 82 65 0 63 80
+ 83 0 +.018 0 .007 -1 0 -1233482301749496e-30 16 63 50 0 ?62 75 81 82 0 0 1 30 8
+3 64 0 75 82 76 0 +.00885864257812494 0 .007 1196184401248532e-30 0 -1 16 75 48
+ 0 ?84 72 63 83 0 0 1 30 76 63 0 72 83 85 0 +.00885864257812496 0 -.011852783203
+125 1 0 1138599047768766e-30 30 85 83 0 33 76 86 0 +.00885864257812496 .015 -.01
+1852783203125 0 -1 0 16 33 71 0 ?32 25 19 85 0 0 1 30 86 84 0 25 85 20 0 +.00885
+864257812494 .015 .007 0 -1 0 16 25 72 0 ?45 10 33 86 0 0 1 30 20 85 0 10 86 7 0
+ +.018 .015 .007 0 -1 0 16 19 74 0 ?42 33 79 7 0 0 1 17 42 0 29 31 30 40 52 19 0
+ 74 +15 29 75 0 31 87 0 17 31 0 29 26 42 21 74 72 0 84 -17 30 0 29 42 26 50 68 7
+9 0 66 +17 74 0 88 64 84 40 31 72 0 56 +15 88 45 0 64 89 0 17 64 0 88 62 74 43 5
+6 81 0 0 +17 84 0 88 74 62 21 49 75 0 0 +17 56 0 54 52 24 40 64 81 0 0 -17 62 0
+ 88 84 64 44 47 63 0 0 +17 49 0 51 35 32 44 84 75 0 62 -15 51 77 0 49 90 0 17 35
+ 0 51 34 49 27 45 25 0 48 -17 34 0 51 32 35 11 61 70 0 68 +17 68 0 65 61 66 11 3
+0 79 0 0 -14 255 90 78 91 ?87 59 51 5 92 +0 0 87 59 23 81 1 91 115 93 90 0 0 94
+ 95 96 14 87 76 95 ?67 90 29 5 97 +0 0 67 90 23 14 59 80 94 ?90 16 46 5 18 +0 0
+ 90 16 23 50 92 88 0 90 97 18 0 +.00885864257812494 .015 .007 -1 0 -119618440124
+8532e-30 -1196184401248532e-30 0 1 13 23 91 0 0 0 0 0 0 9 16 14 16 82 98 ?59 0 5
+4 5 6 +0 0 59 0 23 81 1 98 113 93 16 0 0 0 94 99 80 255 1 93 0 100 8001 0 0 0 0
+ 3 5 0 0 0 FFFFTFTFFFFFFF2 81 1 94 114 93 59 0 0 98 91 101 83 255 3 99 .5960784
+ .6666667 .6862745 83 3 101 .5960784 .6666667 .6862745 79 255 15 100 SDL/TYSA_CO
+LOUR50 97 87 0 87 102 92 0 +.00885864257812496 .015 -.011852783203125 1138599047
+768766e-30 0 -1 -1 0 -1138599047768766e-30 50 18 89 0 59 92 6 0 +.018 .015 .007
+ -1233482301749496e-30 0 1 1 0 1233482301749496e-30 50 102 62 0 89 103 97 0 +.01
+8 0 .007 0 -1 0 0 0 -1 14 89 42 104 ?0 67 88 5 102 +0 0 0 67 23 50 103 25 0 67 0
+ 102 0 +.018 .015 .007 0 -1 0 0 0 -1 14 67 24 105 ?89 87 65 5 103 -0 0 89 87 23
+ 81 1 105 117 93 67 0 0 95 104 106 81 1 95 116 93 87 0 0 91 105 107 81 1 104 118
+ 93 89 0 0 105 0 108 83 3 106 .5960784 .6666667 .6862745 83 3 108 .5960784 .6666
+667 .6862745 83 3 107 .5960784 .6666667 .6862745 83 3 96 .5960784 .6666667 .6862
+745 19 17 92 0 1 0 9 5 S74 4 CI16 index_map_offset0 0 1 dCCZ20 15 2 0 0 2 104 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 12 109 110 8004 0 0 0 0 3 5 0 0 0 FFTFFF
+FFFFFFFF2 3 83 1 13 7830.64 84 255 8 14 Kg/Cu M 79 16 110 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool.xmt_txt
new file mode 100644
index 0000000..e6b2af4
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool.xmt_txt
@@ -0,0 +1,72 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\finstd\p_inst_bod6.x_t;
+FILE=U:\finstd\p_inst_bod6.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 95 2 3 0 0 0 0 1e3 1e
+-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 89 12 1 0 0 0 0 13 14 70 11
+ CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fing
+er_block1012 0 CZ3 0 4 T1 0 0 2 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255 6
+ 54 0 16 18 0 0 +.055 .005 .079 0 0 1 1 0 0 30 255 7 62 0 10 19 0 0 +.055 0 .079
+ -1 0 0 29 255 8 58 0 11 20 0 .05 0 .079 19 255 9 1 0 1 17 0 21 V16 255 10 34 0
+ ?22 0 23 7 0 0 1 18 255 11 23 0 22 0 24 8 ?1 17 255 22 0 25 26 27 11 28 10 0 29
+ +18 24 21 0 30 11 31 20 ?1 17 30 0 32 33 34 24 29 23 0 35 +18 31 19 0 36 24 37
+ 38 ?1 29 20 57 0 24 38 8 .05 .01 .079 29 38 56 0 31 39 20 .06 .01 .079 29 39 55
+ 0 37 40 38 .06 0 .079 18 37 17 0 28 31 41 39 ?1 29 40 41 0 42 43 39 .05 0 .019
+ 18 42 11 0 26 44 45 40 ?1 29 43 40 0 44 46 40 .05 .01 .019 18 44 13 0 33 41 42
+ 43 ?1 29 46 39 0 41 47 43 .06 .01 .019 18 41 15 0 48 37 44 46 ?1 29 47 38 0 45
+ 0 46 .06 0 .019 18 45 10 0 49 42 0 47 ?1 17 49 0 50 51 52 45 27 53 0 54 -15 255
+ 50 7 0 51 55 0 17 51 0 50 56 49 41 57 58 0 0 +17 52 0 50 49 56 37 59 60 0 27 +1
+7 27 0 25 22 54 37 49 53 0 0 +16 53 18 0 ?27 61 58 62 0 0 1 17 54 0 25 27 26 45
+ 63 64 0 57 +15 25 32 0 27 65 0 17 26 0 25 54 22 42 34 66 0 67 -17 63 0 68 69 57
+ 42 54 64 0 0 -16 64 12 0 ?54 70 0 71 0 0 1 17 57 0 68 63 72 45 51 58 0 0 -15 68
+ 8 0 57 73 0 17 72 0 68 57 69 41 74 75 0 51 -16 58 6 0 ?51 53 75 76 0 0 1 16 75
+ 16 0 ?74 58 70 77 0 0 1 30 76 43 0 58 71 77 0 +.06 .005 .019 0 1 0 30 71 42 0 6
+4 0 76 0 +.055 0 .019 1 0 0 30 77 44 0 75 76 78 0 +.055 .01 .019 -1 0 0 30 78 45
+ 0 70 77 62 0 +.05 .005 .019 0 -1 0 16 70 14 0 ?67 75 64 78 0 0 1 30 62 50 0 53
+ 78 79 0 +.06 0 .019 0 0 1 30 79 51 0 61 62 80 0 +.06 .01 .019 0 0 1 16 61 20 0
+ ?56 81 53 79 0 0 1 30 80 52 0 81 79 82 0 +.05 .01 .019 0 0 1 16 81 22 0 ?83 66
+ 61 80 0 0 1 30 82 53 0 66 80 84 0 +.05 0 .019 0 0 1 16 66 24 0 ?34 60 81 82 0 0
+ 1 30 84 59 0 60 82 85 0 +.06 .005 .079 0 -1 0 16 60 25 0 ?52 86 66 84 0 0 1 30
+ 85 60 0 86 84 19 0 +.055 .01 .079 1 0 0 16 86 28 0 ?36 23 60 85 0 0 1 30 19 61
+ 0 23 85 7 0 +.05 .005 .079 0 1 0 16 23 31 0 ?30 10 86 19 0 0 1 17 36 0 87 48 83
+ 31 35 86 0 59 +15 87 26 0 83 88 0 17 48 0 87 74 36 41 56 61 0 72 -17 83 0 87 36
+ 74 24 33 81 0 0 +17 35 0 89 29 59 24 36 86 0 83 -17 59 0 89 35 28 31 52 60 0 56
+ -15 89 35 0 28 16 0 17 28 0 89 59 29 37 22 10 0 52 -17 56 0 50 52 51 31 48 61 0
+ 0 +17 29 0 89 28 35 11 30 23 0 34 -17 34 0 32 30 67 11 26 66 0 0 +15 32 29 0 34
+ 90 0 17 67 0 32 34 33 42 69 70 0 63 +17 33 0 32 67 30 44 83 81 0 74 -17 69 0 68
+ 72 63 44 67 70 0 0 -17 74 0 87 83 48 44 72 75 0 69 +14 255 90 30 91 ?88 65 32 5
+ 92 +0 0 88 65 21 81 1 91 92 93 90 0 0 94 95 96 14 88 27 95 ?73 90 87 5 97 +0 0
+ 73 90 21 14 65 33 94 ?90 16 25 5 18 +0 0 90 16 21 50 92 48 0 90 97 18 0 +.05 .0
+05 .019 -1 0 0 0 0 1 13 21 4 0 0 0 0 0 0 9 16 14 16 36 98 ?65 0 89 5 6 +0 0 65 0
+ 21 81 1 98 90 93 16 0 0 0 94 99 80 255 1 93 0 100 8001 0 0 0 0 3 5 0 0 0 FFFFTF
+TFFFFFFF2 81 1 94 91 93 65 0 0 98 91 101 83 255 3 99 .5960784 .6666667 .6862745
+ 83 3 101 .5960784 .6666667 .6862745 79 255 15 100 SDL/TYSA_COLOUR50 97 47 0 88
+ 102 92 0 +.055 .01 .019 0 1 0 0 0 1 50 18 49 0 65 92 6 0 +.055 0 .019 0 -1 0 0
+ 0 -1 50 102 46 0 55 103 97 0 +.06 .005 .019 1 0 0 0 0 -1 14 55 2 104 ?0 73 50 5
+ 102 +0 0 0 73 21 50 103 37 0 73 0 102 0 +.055 .005 .019 0 0 -1 -1 0 0 14 73 9 1
+05 ?55 88 68 5 103 +0 0 55 88 21 81 1 105 94 93 73 0 0 95 104 106 81 1 95 93 93
+ 88 0 0 91 105 107 81 1 104 95 93 55 0 0 105 0 108 83 3 106 .5960784 .6666667 .6
+862745 83 3 108 .5960784 .6666667 .6862745 83 3 107 .5960784 .6666667 .6862745 8
+3 3 96 .5960784 .6666667 .6862745 19 17 5 0 1 0 9 5 S74 4 CI16 index_map_offset0
+ 0 1 dCCZ20 15 2 0 0 2 104 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 12 109 110 8
+004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 13 7830.64 84 255 8 14 Kg/Cu M 79 1
+6 110 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool2.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool2.xmt_txt
new file mode 100644
index 0000000..08d0935
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_cuboid_tool2.xmt_txt
@@ -0,0 +1,84 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\finstd\p_inst_bod_pad1.x_t;
+FILE=U:\finstd\p_inst_bod_pad1.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 90 2 3 0 0 0 0 1e3 1e
+-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 84 12 1 13 0 0 0 14 0 70 11
+ CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fing
+er_block1012 0 CZ3 0 4 T1 0 0 5 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255 6
+ 54 0 16 18 0 0 +.004 .0125 .025 0 0 1 1 0 0 30 255 7 62 0 10 19 0 0 +.004 .0105
+ .025 -1 0 0 29 255 8 58 0 11 20 0 .002 .0105 .025 19 255 9 1 0 1 17 0 21 V16 25
+5 10 34 0 ?22 0 23 7 0 0 1 18 255 11 23 0 22 0 24 8 ?1 17 255 22 0 25 26 27 11 2
+8 10 0 29 +18 24 21 0 30 11 31 20 ?1 17 30 0 32 33 34 24 29 23 0 35 +18 31 19 0
+ 36 24 37 38 ?1 29 20 57 0 24 38 8 .002 .0145 .025 29 38 56 0 31 39 20 .006 .014
+5 .025 29 39 55 0 37 40 38 .006 .0105 .025 18 37 17 0 28 31 41 39 ?1 29 40 41 0
+ 42 43 39 .002 .0105 .005 18 42 11 0 26 44 45 40 ?1 29 43 40 0 44 46 40 .002 .01
+45 .005 18 44 13 0 33 41 42 43 ?1 29 46 39 0 41 47 43 .006 .0145 .005 18 41 15 0
+ 48 37 44 46 ?1 29 47 38 0 45 0 46 .006 .0105 .005 18 45 10 0 49 42 0 47 ?1 17 4
+9 0 50 51 52 45 27 53 0 54 -15 255 50 7 0 51 55 0 17 51 0 50 56 49 41 57 58 0 0
+ +17 52 0 50 49 56 37 59 60 0 27 +17 27 0 25 22 54 37 49 53 0 0 +16 53 18 0 ?27
+ 61 58 62 0 0 1 17 54 0 25 27 26 45 63 64 0 57 +15 25 32 0 27 65 0 17 26 0 25 54
+ 22 42 34 66 0 67 -17 63 0 68 69 57 42 54 64 0 0 -16 64 12 0 ?54 70 0 71 0 0 1 1
+7 57 0 68 63 72 45 51 58 0 0 -15 68 8 0 57 73 0 17 72 0 68 57 69 41 74 75 0 51 -
+16 58 6 0 ?51 53 75 76 0 0 1 16 75 16 0 ?74 58 70 77 0 0 1 30 76 43 0 58 71 77 0
+ +.006 .0125 .005 0 1 0 30 71 42 0 64 0 76 0 +.004 .0105 .005 1 0 0 30 77 44 0 7
+5 76 78 0 +.004 .0145 .005 -1 0 0 30 78 45 0 70 77 62 0 +.002 .0125 .005 0 -1 0
+ 16 70 14 0 ?67 75 64 78 0 0 1 30 62 50 0 53 78 79 0 +.006 .0105 .005 0 0 1 30 7
+9 51 0 61 62 80 0 +.006 .0145 .005 0 0 1 16 61 20 0 ?56 81 53 79 0 0 1 30 80 52
+ 0 81 79 82 0 +.002 .0145 .005 0 0 1 16 81 22 0 ?83 66 61 80 0 0 1 30 82 53 0 66
+ 80 84 0 +.002 .0105 .005 0 0 1 16 66 24 0 ?34 60 81 82 0 0 1 30 84 59 0 60 82 8
+5 0 +.006 .0125 .025 0 -1 0 16 60 25 0 ?52 86 66 84 0 0 1 30 85 60 0 86 84 19 0
+ +.004 .0145 .025 1 0 0 16 86 28 0 ?36 23 60 85 0 0 1 30 19 61 0 23 85 7 0 +.002
+ .0125 .025 0 1 0 16 23 31 0 ?30 10 86 19 0 0 1 17 36 0 87 48 83 31 35 86 0 59 +
+15 87 26 0 83 88 0 17 48 0 87 74 36 41 56 61 0 72 -17 83 0 87 36 74 24 33 81 0 0
+ +17 35 0 89 29 59 24 36 86 0 83 -17 59 0 89 35 28 31 52 60 0 56 -15 89 35 0 28
+ 16 0 17 28 0 89 59 29 37 22 10 0 52 -17 56 0 50 52 51 31 48 61 0 0 +17 29 0 89
+ 28 35 11 30 23 0 34 -17 34 0 32 30 67 11 26 66 0 0 +15 32 29 0 34 90 0 17 67 0
+ 32 34 33 42 69 70 0 63 +17 33 0 32 67 30 44 83 81 0 74 -17 69 0 68 72 63 44 67
+ 70 0 0 -17 74 0 87 83 48 44 72 75 0 69 +14 255 90 30 91 ?88 65 32 5 92 +0 0 88
+ 65 21 81 1 91 87 93 90 94 0 95 96 97 14 88 27 96 ?73 90 87 5 98 +0 0 73 90 21 1
+4 65 33 95 ?90 16 25 5 18 +0 0 90 16 21 50 92 48 0 90 98 18 0 +.002 .0125 .005 -
+1 0 0 0 0 1 13 21 4 0 0 0 0 0 0 9 16 14 16 36 99 ?65 0 89 5 6 +0 0 65 0 21 81 1
+ 99 85 93 16 100 0 0 95 101 80 255 1 93 0 102 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFF
+FFF2 81 3 100 78 103 16 0 99 94 104 105 106 0 81 1 95 86 93 65 107 0 99 91 108 8
+3 255 3 101 .5960784 .6666667 .6862745 81 3 107 80 103 65 0 95 104 109 110 111 0
+ 83 3 108 .5960784 .6666667 .6862745 80 3 103 112 113 9000 0 0 0 0 3 6 0 0 0 FFF
+FTFTTFFFFFF1 1 3 81 3 104 79 103 88 0 96 100 107 114 115 0 81 3 109 81 103 55 0
+ 116 107 117 118 119 0 82 255 1 110 0 82 1 111 53 14 55 2 116 ?0 73 50 5 120 +0
+ 0 0 73 21 81 1 116 90 93 55 109 0 121 0 122 81 3 117 82 103 73 0 121 109 0 123
+ 124 0 82 1 118 0 82 1 119 54 14 73 9 121 ?55 88 68 5 125 +0 0 55 88 21 81 1 121
+ 89 93 73 117 0 96 116 126 82 1 123 0 82 1 124 55 81 1 96 88 93 88 104 0 91 121
+ 127 83 3 126 .5960784 .6666667 .6862745 83 3 127 .5960784 .6666667 .6862745 50
+ 125 37 0 73 0 120 0 +.004 .0125 .005 0 0 -1 -1 0 0 50 120 46 0 55 125 98 0 +.00
+6 .0125 .005 1 0 0 0 0 -1 50 98 47 0 88 120 92 0 +.004 .0145 .005 0 1 0 0 0 1 83
+ 3 122 .5960784 .6666667 .6862745 82 1 114 0 82 1 115 52 79 255 27 113 MONIKER/M
+ONIKER_DATA_ATTRIB81 3 94 77 103 90 0 91 0 100 128 129 0 82 1 105 0 82 1 106 51
+ 82 1 128 0 82 1 129 50 79 15 102 SDL/TYSA_COLOUR50 18 49 0 65 92 6 0 +.004 .010
+5 .005 0 -1 0 0 0 -1 83 3 97 .5960784 .6666667 .6862745 19 17 5 0 1 0 9 5 S74 4
+ CI16 index_map_offset0 0 1 dCCZ20 15 5 0 0 130 117 13 2 116 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 81 2 130 76 131 1 0 13 0 0 132 133 81 3 13 83 134 1 130 2 0 0 135 136
+ 137 80 3 134 103 138 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 84 255 38 135 {
+ead8f22f-f22f-4241-b180-4ab19324eaa8}84 18 136 NX 7.5.0.26-berryr82 1 137 0 79 2
+5 138 MONIKER/GUID_TABLE_ATTRIB80 2 131 139 140 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFF
+FFFFF2 3 83 1 132 7830.64 84 8 133 Kg/Cu M 79 16 140 SDL/TYSA_DENSITY80 2 12 134
+ 141 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFFFFFF2 3 83 1 14 3489 79 22 141 MONIKER/BOD
+Y_ID_ATTRIB1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_h_shape.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_h_shape.xmt_txt
new file mode 100644
index 0000000..63999b7
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_h_shape.xmt_txt
@@ -0,0 +1,167 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\fastinst\h-shape-1p.x_t;
+FILE=U:\fastinst\h-shape-1p.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 284 2 3 0 0 0 0 1e3 1
+e-8 0 0 4 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 270 12 1 0 0 0 0 13 14 70 1
+1 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fin
+ger_block1012 0 CZ3 0 4 T1 0 0 2 20 1 15 15 13 255 5 235 0 1 0 16 0 0 17 0 50 25
+5 6 234 0 16 18 0 0 +-.06 .01 -.028 1 0 1206764157201256e-30 1206764157201256e-3
+0 0 -1 30 255 7 222 0 19 20 0 0 +-.06 .01 -.028 0 -1 0 29 255 8 163 0 21 22 0 -.
+031 0 -.028 19 255 9 1 0 1 17 0 23 V16 255 10 185 0 ?24 0 25 20 0 0 1 18 255 11
+ 55 0 26 0 27 28 ?1 17 255 26 0 29 30 31 11 32 33 0 34 +18 27 50 0 31 11 35 36 ?
+1 29 28 57 0 11 36 37 -.031 .01 -.028 29 36 52 0 27 38 28 -.031 .01 -.009 29 37
+ 174 0 39 28 40 -.06 0 -.028 18 39 148 0 41 42 0 37 ?1 29 40 173 0 42 37 43 -.06
+ 0 .018 18 42 146 0 44 45 39 40 ?1 29 43 172 0 45 40 46 -.032 0 .017 18 45 144 0
+ 47 48 42 43 ?1 29 46 171 0 48 43 49 -.032 0 .003999999999999925 18 48 142 0 50
+ 51 45 46 ?1 29 49 170 0 51 46 52 1387778780781446e-32 0 .004 18 51 140 0 53 54
+ 48 49 ?1 29 52 169 0 54 49 55 -308148791101958e-47 0 .017 18 54 138 0 56 57 51
+ 52 ?1 29 55 168 0 57 52 58 .027 0 .017 18 57 136 0 59 60 54 55 ?1 29 58 167 0 6
+0 55 61 .027 0 -.028 18 60 134 0 62 63 57 58 ?1 29 61 166 0 63 58 64 -1387778780
+781446e-32 0 -.028 18 63 132 0 65 66 60 61 ?1 29 64 165 0 66 61 22 -142108547152
+02e-30 0 -.009 18 66 130 0 67 68 63 64 ?1 29 22 164 0 68 64 8 -.031 0 -.009 18 6
+8 128 0 69 21 66 22 ?1 17 69 0 70 71 72 68 73 74 0 75 +18 21 126 0 76 77 68 8 ?1
+ 17 76 0 78 34 75 21 79 80 0 81 +18 77 2 0 30 82 21 83 ?1 17 30 0 29 84 26 77 85
+ 86 0 87 +18 82 5 0 88 89 77 90 ?1 29 83 4 0 77 0 90 -.06 .01 -.028 29 90 7 0 82
+ 83 91 -.06 .01 .018 29 91 12 0 89 90 92 -.032 .01 .017 18 89 10 0 93 94 82 91 ?
+1 29 92 17 0 94 91 95 -.032 .01 .003999999999999925 18 94 15 0 96 97 89 92 ?1 29
+ 95 22 0 97 92 98 1387778780781446e-32 .01 .004 18 97 20 0 99 100 94 95 ?1 29 98
+ 27 0 100 95 101 -308148791101958e-47 .01 .017 18 100 25 0 102 103 97 98 ?1 29 1
+01 32 0 103 98 104 .027 .01 .017 18 103 30 0 105 106 100 101 ?1 29 104 37 0 106
+ 101 107 .027 .01 -.028 18 106 35 0 108 109 103 104 ?1 29 107 42 0 109 104 38 -1
+387778780781446e-32 .01 -.028 18 109 40 0 110 35 106 107 ?1 29 38 47 0 35 107 36
+ -14210854715202e-30 .01 -.009 18 35 45 0 111 27 109 38 ?1 17 111 0 29 31 110 35
+ 112 113 0 114 +15 255 29 63 0 84 115 0 17 31 0 29 26 111 27 116 117 0 71 +17 11
+0 0 29 111 108 109 118 119 0 120 +17 112 0 121 122 114 109 111 113 0 0 -16 113 4
+6 0 ?111 117 119 123 0 0 1 17 114 0 121 112 67 35 72 124 0 116 -15 121 193 0 67
+ 125 0 17 67 0 121 114 122 66 126 127 0 72 +17 72 0 70 69 116 66 114 124 0 73 +1
+6 124 177 0 ?72 128 129 130 0 0 1 17 116 0 70 72 71 35 31 117 0 0 -15 70 191 0 6
+9 131 0 17 71 0 70 116 69 27 75 129 0 32 -16 117 51 0 ?31 33 113 132 0 0 1 16 33
+ 56 0 ?26 86 117 133 0 0 1 30 132 54 0 117 123 133 0 +-14210854715202e-30 .01 -.
+009 -1 0 0 30 123 49 0 113 134 132 0 +-14210854715202e-30 .01 -.028 0 0 1 30 133
+ 59 0 33 132 135 0 +-.031 .01 -.009 365204942310907e-29 0 -1 30 135 62 0 86 133
+ 136 0 +-.031 .01 -.028 -1 0 0 16 86 60 0 ?30 19 33 135 0 0 1 30 136 162 0 137 1
+35 138 0 +-.06 0 -.028 -1206764157201256e-30 0 1 16 137 124 0 ?139 140 0 136 0 0
+ 1 30 138 161 0 140 136 141 0 +-.06 0 .018 .99936285434755 0 -.03569153051241125
+ 16 140 122 0 ?47 142 137 138 0 0 1 30 141 160 0 142 138 143 0 +-.032 0 .017 0 0
+ -1 16 142 120 0 ?50 144 140 141 0 0 1 30 143 159 0 144 141 145 0 +-.032 0 .0039
+99999999999925 1 0 235813972515597e-29 16 144 118 0 ?53 146 142 143 0 0 1 30 145
+ 158 0 146 143 147 0 +152288934501116e-31 0 .004 -1171453342316276e-30 0 1 16 14
+6 116 0 ?56 148 144 145 0 0 1 30 147 157 0 148 145 149 0 +0 0 .017 1 0 0 16 148
+ 114 0 ?59 150 146 147 0 0 1 30 149 156 0 150 147 151 0 +.027 0 .017 37007434154
+1719e-29 0 -1 16 150 112 0 ?62 152 148 149 0 0 1 30 151 155 0 152 149 153 0 +.02
+7 0 -.028 -1 0 0 16 152 110 0 ?65 127 150 151 0 0 1 30 153 154 0 127 151 154 0 +
+-14210854715202e-30 0 -.028 0 0 1 16 127 108 0 ?67 74 152 153 0 0 1 30 154 153 0
+ 74 153 155 0 +-14210854715202e-30 0 -.009 -1 0 0 16 74 106 0 ?69 80 127 154 0 0
+ 1 30 155 152 0 80 154 156 0 +-.031 0 -.009 365204942310907e-29 0 -1 16 80 104 0
+ ?76 157 74 155 0 0 1 30 156 151 0 157 155 158 0 +-.031 0 -.028 -1 0 0 16 157 10
+2 0 ?41 159 80 156 0 0 1 30 158 211 0 160 156 161 0 +-.031 .01 -.028 0 -1 0 16 1
+60 175 0 ?81 129 19 158 0 0 1 30 161 212 0 129 158 130 0 +-.031 .01 -.009 0 -1 0
+ 16 129 176 0 ?75 124 160 161 0 0 1 30 130 213 0 124 161 162 0 +-14210854715202e
+-30 .01 -.009 0 -1 0 30 162 214 0 128 130 163 0 +-1387778780781446e-32 .01 -.028
+ 0 -1 0 16 128 178 0 ?122 164 124 162 0 0 1 30 163 215 0 164 162 165 0 +.027 .01
+ -.028 0 -1 0 16 164 179 0 ?166 167 128 163 0 0 1 30 165 216 0 167 163 168 0 +.0
+27 .01 .017 0 -1 0 16 167 180 0 ?169 170 164 165 0 0 1 30 168 217 0 170 165 171
+ 0 +-308148791101958e-47 .01 .017 0 -1 0 16 170 181 0 ?172 173 167 168 0 0 1 30
+ 171 218 0 173 168 174 0 +1387778780781446e-32 .01 .004 0 -1 0 16 173 182 0 ?175
+ 176 170 171 0 0 1 30 174 219 0 176 171 177 0 +-.032 .01 .003999999999999925 0 -
+1 0 16 176 183 0 ?178 25 173 174 0 0 1 30 177 220 0 25 174 20 0 +-.032 .01 .017
+ 0 -1 0 16 25 184 0 ?179 10 176 177 0 0 1 30 20 221 0 10 177 7 0 +-.06 .01 .018
+ 0 -1 0 17 179 0 180 50 181 45 182 25 0 183 +15 180 205 0 50 184 0 17 50 0 180 1
+85 179 48 183 142 0 178 +17 181 0 180 179 185 89 96 186 0 0 -17 182 0 187 88 47
+ 89 179 25 0 181 -17 183 0 188 44 189 45 50 142 0 0 -15 188 101 0 190 191 0 17 4
+4 0 188 190 183 42 47 140 0 24 -17 189 0 188 183 192 48 53 144 0 0 -17 192 0 188
+ 189 193 51 56 146 0 0 -17 53 0 194 195 178 51 189 144 0 175 +15 194 203 0 53 19
+6 0 17 195 0 194 197 53 97 175 173 0 198 -17 178 0 194 53 197 48 185 176 0 189 +
+17 175 0 199 56 198 51 195 173 0 192 +15 199 201 0 56 200 0 17 56 0 199 201 175
+ 54 192 146 0 172 +17 198 0 199 175 201 97 102 202 0 0 -17 201 0 199 198 56 100
+ 172 170 0 203 -17 102 0 29 105 99 100 198 202 0 201 +16 202 26 0 ?102 204 205 2
+06 0 0 1 16 204 31 0 ?105 207 202 208 0 0 1 16 205 21 0 ?99 202 186 209 0 0 1 30
+ 206 29 0 202 209 208 0 +152288934501116e-31 .01 .004 -1171453342316276e-30 0 1
+ 30 209 24 0 205 210 206 0 +-.032 .01 .003999999999999925 1 0 235813972515597e-2
+9 30 208 34 0 204 206 211 0 +0 .01 .017 1 0 0 30 211 39 0 207 208 134 0 +.027 .0
+1 .017 370074341541719e-29 0 -1 16 207 36 0 ?108 119 204 211 0 0 1 30 134 44 0 1
+19 211 123 0 +.027 .01 -.028 -1 0 0 16 119 41 0 ?110 113 207 134 0 0 1 17 108 0
+ 29 110 105 106 212 207 0 213 +17 105 0 29 108 102 103 203 204 0 214 +17 212 0 2
+15 169 213 103 108 207 0 0 -17 213 0 215 212 62 106 166 164 0 118 -15 215 197 0
+ 62 216 0 17 62 0 215 213 169 60 217 150 0 166 +17 166 0 218 65 118 60 213 164 0
+ 219 +17 118 0 218 166 120 106 110 119 0 0 -15 218 195 0 65 220 0 17 120 0 218 1
+18 65 109 122 128 0 112 -17 65 0 218 120 166 63 219 152 0 122 +17 122 0 121 67 1
+12 63 120 128 0 126 +17 126 0 188 219 73 63 67 127 0 0 -17 219 0 188 217 126 60
+ 65 152 0 0 -17 73 0 188 126 79 66 69 74 0 0 -17 79 0 188 73 221 68 76 80 0 0 -1
+7 221 0 188 79 190 21 41 157 0 0 -17 190 0 188 221 44 39 139 137 0 0 -17 41 0 22
+2 87 81 39 221 157 0 223 +15 222 187 0 41 224 0 17 87 0 222 85 41 77 223 19 0 22
+5 -17 81 0 222 41 85 21 34 160 0 221 +17 223 0 226 139 225 39 87 19 0 190 +15 22
+6 209 0 139 16 0 17 139 0 226 227 223 42 190 137 0 0 +17 225 0 226 223 227 77 84
+ 159 0 0 -16 19 186 0 ?223 160 86 7 0 0 1 17 227 0 226 225 139 82 24 10 0 0 -17
+ 84 0 29 93 30 82 225 159 0 227 +16 159 6 0 ?84 228 157 229 0 0 1 16 228 11 0 ?9
+3 186 159 230 0 0 1 30 229 9 0 159 0 230 0 +-.06 .01 -.028 -1206764157201256e-30
+ 0 1 30 230 14 0 228 229 210 0 +-.06 .01 .018 .99936285434755 0 -.03569153051241
+125 30 210 19 0 186 230 209 0 +-.032 .01 .017 0 0 -1 16 186 16 0 ?96 205 228 210
+ 0 0 1 17 96 0 29 99 93 94 181 186 0 185 +17 99 0 29 102 96 97 197 205 0 195 +17
+ 93 0 29 96 84 89 88 228 0 182 +17 185 0 180 181 50 94 178 176 0 197 -17 197 0 1
+94 178 195 94 99 205 0 0 -17 88 0 187 24 182 82 93 228 0 84 -15 187 207 0 47 231
+ 0 17 24 0 187 47 88 42 227 10 0 139 +17 47 0 187 182 24 45 44 140 0 179 +14 255
+ 231 208 232 ?184 16 187 5 18 -0 0 184 16 23 81 1 232 272 233 231 0 0 234 235 23
+6 14 184 206 235 ?196 231 180 5 237 -0 0 196 231 23 14 16 210 234 ?231 0 226 5 6
+ -0 0 231 0 23 50 18 233 0 231 237 6 0 +-.06 .01 .018 -.03569153051241125 0 -.99
+936285434755 -.99936285434755 0 .03569153051241125 13 23 3 0 0 0 0 0 0 9 16 50 2
+37 232 0 184 238 18 0 +-.032 .01 .017 -1 0 0 0 0 1 50 238 231 0 196 239 237 0 +-
+.032 .01 .003999999999999925 235813972515597e-29 0 -1 -1 0 -235813972515597e-29
+ 14 196 204 240 ?200 184 194 5 238 -0 0 200 184 23 50 239 230 0 200 241 238 0 +1
+52288934501116e-31 .01 .004 1 0 1171453342316276e-30 1171453342316276e-30 0 -1 1
+4 200 202 242 ?243 196 199 5 239 -0 0 243 196 23 50 241 229 0 243 244 239 0 +0 .
+01 .017 0 0 -1 -1 0 0 14 243 200 245 ?216 200 246 5 241 -0 0 216 200 23 50 244 2
+28 0 216 247 241 0 +.027 .01 .017 -1 0 -370074341541719e-29 -370074341541719e-29
+ 0 1 14 216 198 248 ?220 243 215 5 244 -0 0 220 243 23 50 247 227 0 220 249 244
+ 0 +.027 .01 -.028 0 0 1 1 0 0 14 220 196 250 ?125 216 218 5 247 -0 0 125 216 23
+ 50 249 226 0 125 251 247 0 +-14210854715202e-30 .01 -.028 1 0 0 0 0 -1 14 125 1
+94 252 ?131 220 121 5 249 -0 0 131 220 23 50 251 225 0 131 253 249 0 +-142108547
+15202e-30 .01 -.009 0 0 1 1 0 0 14 131 192 254 ?255 125 70 5 251 -0 0 255 125 23
+ 50 253 224 0 255 256 251 0 +-.031 .01 -.009 -1 0 -365204942310907e-29 -36520494
+2310907e-29 0 1 14 255 190 257 ?224 131 78 5 253 -0 0 224 131 23 50 256 223 0 22
+4 258 253 0 +-.031 .01 -.028 0 0 1 1 0 0 14 224 188 259 ?115 255 222 5 256 -0 0
+ 115 255 23 50 258 150 0 191 260 256 0 +-.06 0 .00399999999999986 0 1 0 0 0 1 14
+ 191 98 261 ?0 115 188 5 258 -0 0 0 115 23 50 260 65 0 115 0 258 0 +-.06 .01 .00
+399999999999986 0 1 0 0 0 1 14 115 64 262 ?191 224 29 5 260 +0 0 191 224 23 81 1
+ 262 283 233 115 0 0 259 261 263 80 255 1 233 0 264 8001 0 0 0 0 3 5 0 0 0 FFFFT
+FTFFFFFFF2 81 1 259 282 233 224 0 0 257 262 265 81 1 261 284 233 191 0 0 262 0 2
+66 83 255 3 263 .5960784 .6666667 .6862745 83 3 266 .5960784 .6666667 .6862745 8
+1 1 257 281 233 255 0 0 254 259 267 83 3 265 .5960784 .6666667 .6862745 81 1 254
+ 280 233 131 0 0 252 257 268 83 3 267 .5960784 .6666667 .6862745 81 1 252 279 23
+3 125 0 0 250 254 269 83 3 268 .5960784 .6666667 .6862745 81 1 250 278 233 220 0
+ 0 248 252 270 83 3 269 .5960784 .6666667 .6862745 81 1 248 277 233 216 0 0 245
+ 250 271 83 3 270 .5960784 .6666667 .6862745 81 1 245 276 233 243 0 0 242 248 27
+2 83 3 271 .5960784 .6666667 .6862745 81 1 242 275 233 200 0 0 240 245 273 83 3
+ 272 .5960784 .6666667 .6862745 81 1 240 274 233 196 0 0 235 242 274 83 3 273 .5
+960784 .6666667 .6862745 81 1 235 273 233 184 0 0 232 240 275 83 3 274 .5960784
+ .6666667 .6862745 83 3 275 .5960784 .6666667 .6862745 79 255 15 264 SDL/TYSA_CO
+LOUR15 78 189 0 76 255 0 15 246 199 0 59 243 0 17 59 0 246 214 172 57 193 148 0
+ 169 +17 214 0 246 203 59 103 169 167 0 212 -17 172 0 246 59 203 54 201 170 0 19
+3 +17 193 0 188 192 217 54 59 148 0 0 -17 169 0 215 62 212 57 214 167 0 217 +17
+ 217 0 188 193 219 57 62 150 0 0 -17 203 0 246 172 214 100 105 204 0 0 -81 1 234
+ 271 233 16 0 0 0 232 276 83 3 276 .5960784 .6666667 .6862745 83 3 236 .5960784
+ .6666667 .6862745 17 85 0 222 81 87 11 30 86 0 0 -17 34 0 78 32 76 11 81 160 0
+ 85 -17 32 0 78 75 34 27 26 33 0 0 -17 75 0 78 76 32 68 71 129 0 79 +19 17 236 0
+ 1 0 9 5 S74 4 CI16 index_map_offset0 0 1 dCCZ20 15 2 0 0 2 261 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 80 2 12 277 278 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83
+ 1 13 7830.64 84 255 8 14 Kg/Cu M 79 16 278 SDL/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_multi_level.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_multi_level.xmt_txt
new file mode 100644
index 0000000..45095de
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_multi_level.xmt_txt
@@ -0,0 +1,222 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\finstd\p_inst_bod4.x_t;
+FILE=U:\finstd\p_inst_bod4.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 825 2 3 0 0 0 0 1e3 1
+e-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 800 12 1 13 0 0 0 14 0 70 1
+1 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fin
+ger_block1012 0 CZ3 0 4 T1 0 0 6 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255
+ 6 54 0 18 19 0 0 +.002 .002 .02 0 0 1 1 0 0 30 255 7 734 0 1 20 0 21 +0 .025 .0
+1 0 -1 0 29 255 8 173 0 11 22 0 0 .004 .015 19 255 9 1 0 1 17 0 23 V16 255 10 34
+ 0 ?24 0 25 26 0 0 1 18 255 11 169 0 27 0 28 8 1e-8 1 17 255 27 0 29 30 31 11 32
+ 33 0 34 +18 28 164 0 35 11 36 22 1e-8 1 17 35 0 37 38 39 28 40 41 0 42 +18 36 1
+58 0 39 28 43 44 1e-8 1 29 22 168 0 28 44 8 0 .004 .01 29 44 161 0 36 45 22 0 .0
+04 .005 29 45 133 0 43 46 44 .004 0 .015 18 43 129 0 47 36 48 45 1e-8 1 29 46 12
+8 0 48 49 45 .004 0 .01 18 48 124 0 50 43 51 46 1e-8 1 29 49 117 0 51 52 46 .004
+ .004 .015 18 51 113 0 53 48 54 49 1e-8 1 29 52 105 0 54 55 49 .004 .004 .005 18
+ 54 102 0 56 51 57 52 1e-8 1 29 55 58 0 57 58 52 0 0 .02 18 57 23 0 24 54 59 55
+ ?1 29 58 57 0 59 60 55 0 .004 .02 18 59 21 0 30 57 61 58 ?1 29 60 56 0 61 62 58
+ .004 .004 .02 18 61 19 0 63 59 64 60 ?1 29 62 55 0 64 65 60 .004 0 .02 18 64 17
+ 0 66 61 67 62 ?1 29 65 41 0 67 68 62 0 0 0 18 67 11 0 69 64 70 65 ?1 29 68 667
+ 0 70 71 65 .004 .004 .01 18 70 480 0 72 67 73 68 1e-8 1 29 71 669 0 73 74 68 0
+ .05 .015 18 73 476 0 75 70 76 71 ?1 29 74 670 0 76 77 71 .02 .05 .015 18 76 478
+ 0 78 73 79 74 ?1 29 77 671 0 79 80 74 .02 0 .015 18 79 471 0 81 76 82 77 ?1 29
+ 80 672 0 83 84 77 0 .05 .01 18 83 477 0 85 82 86 80 ?1 29 84 673 0 82 87 80 .02
+ .05 .01 18 82 479 0 88 79 83 84 ?1 29 87 674 0 86 89 84 .02 0 .01 18 86 469 0 9
+0 83 91 87 ?1 29 89 684 0 91 92 87 .004 0 .005 18 91 472 0 93 86 94 89 1e-8 1 29
+ 92 685 0 94 95 89 0 .05 .005 18 94 466 0 96 91 97 92 ?1 29 95 686 0 97 98 92 .0
+2 .05 .005 18 97 481 0 99 94 100 95 ?1 29 98 687 0 100 101 95 .02 0 .005 18 100
+ 483 0 102 97 103 98 ?1 29 101 688 0 104 105 98 0 .05 0 18 104 487 0 106 103 107
+ 101 ?1 29 105 689 0 103 108 101 .02 .05 0 18 103 482 0 109 100 104 105 ?1 29 10
+8 690 0 107 0 105 .02 0 0 18 107 467 0 110 104 0 108 ?1 17 110 0 111 112 69 107
+ 113 114 0 115 +15 255 111 32 0 110 116 0 17 112 0 111 117 110 100 115 118 0 0 +
+17 69 0 111 110 24 67 119 120 0 121 -17 113 0 122 106 123 67 110 114 0 0 -16 114
+ 12 0 ?110 124 125 126 0 0 1 17 115 0 127 128 129 107 112 118 0 123 -15 127 569
+ 0 128 130 0 17 128 0 127 131 115 103 123 132 0 0 +17 129 0 127 115 131 100 133
+ 134 0 112 +16 118 342 0 ?112 135 132 136 0 0 1 17 123 0 122 113 137 107 128 132
+ 0 0 -15 122 8 0 123 138 0 17 137 0 122 123 106 103 139 140 0 128 -16 132 395 0
+ ?128 118 140 141 0 0 1 16 140 405 0 ?139 132 0 142 0 0 1 30 141 661 0 132 0 142
+ 0 +.02 .025 0 0 1 0 30 142 660 0 140 141 136 0 +.01 .05 0 -1 0 0 30 136 659 0 1
+18 142 143 0 +.02 0 0 0 0 1 30 143 658 0 135 136 144 0 +.02 .05 0 0 0 1 16 135 3
+97 0 ?131 145 118 143 0 0 1 30 144 657 0 145 143 146 0 +0 .05 0 0 0 1 16 145 401
+ 0 ?147 134 135 144 0 0 1 30 146 656 0 134 144 148 0 +.02 .025 .005 0 -1 0 16 13
+4 399 0 ?129 149 145 146 0 0 1 30 148 655 0 149 146 150 0 +.01 .05 .005 1 0 0 16
+ 149 403 0 ?99 151 134 148 0 0 1 30 150 636 0 152 148 153 0 +.02 .025 .01 0 1 0
+ 16 152 389 0 ?154 155 156 150 0 0 1 30 153 635 0 156 150 157 0 +.01 .05 .01 -1
+ 0 0 16 156 387 0 ?158 152 159 153 0 0 1 30 157 633 0 155 153 160 0 +.02 0 .01 0
+ 0 1 16 155 348 0 ?161 162 152 157 0 0 1 30 160 632 0 162 157 163 0 +.02 .05 .01
+ 0 0 1 16 162 391 0 ?164 165 155 160 0 0 1 30 163 631 0 165 160 166 0 +0 .05 .01
+ 0 0 1 16 165 383 0 ?167 168 162 163 0 0 1 30 166 630 0 168 163 169 0 +.02 .025
+ .015 0 -1 0 16 168 393 0 ?170 171 165 166 0 0 1 30 169 629 0 171 166 172 0 +.01
+ .05 .015 1 0 0 16 171 385 0 ?78 173 168 169 0 0 1 30 172 50 0 1 169 174 175 +.0
+04 0 0 0 0 1 30 174 51 0 1 172 176 177 +.004 .004 0 0 0 1 141 255 175 178 179 17
+9 172 133 255 178 122 0 180 181 182 0 +172 .004 0 .005 .004 0 .01 .005 .01 141 1
+79 182 175 175 172 133 182 132 0 183 178 184 0 +172 .004 0 .015 .004 0 .02 .015
+ .02 16 183 130 0 ?66 180 124 182 0 0 1 133 184 162 0 41 182 185 0 +176 0 .004 .
+005 0 .004 .01 .005 .01 16 41 22 0 ?35 120 186 184 0 0 1 133 185 172 0 186 184 1
+87 0 +176 0 .004 .015 0 .004 .02 .015 .02 30 176 52 0 1 174 188 189 +0 .004 0 0
+ 0 1 30 188 53 0 120 176 190 0 +0 0 0 0 0 1 141 189 184 191 191 176 141 191 185
+ 189 189 176 16 120 24 0 ?119 192 41 188 0 0 1 30 190 59 0 192 188 193 0 +.004 .
+002 .02 0 -1 0 16 192 25 0 ?194 195 120 190 0 0 1 30 193 60 0 195 190 196 0 +.00
+2 .004 .02 1 0 0 16 195 28 0 ?197 25 192 193 0 0 1 30 196 61 0 25 193 26 0 +0 .0
+02 .02 0 1 0 16 25 31 0 ?198 10 195 196 0 0 1 30 26 62 0 10 196 199 0 +.002 0 .0
+2 -1 0 0 133 199 106 0 200 26 181 0 +174 .004 .004 .005 .004 .004 .01 .005 .01 1
+6 200 20 0 ?72 186 201 199 0 0 1 133 181 116 0 201 199 178 0 +174 .004 .004 .015
+ .004 .004 .02 .015 .02 16 201 114 0 ?63 200 180 181 0 0 1 17 63 0 202 194 53 61
+ 31 201 0 197 +16 180 18 0 ?203 201 183 178 0 0 1 17 203 0 111 90 117 48 93 180
+ 0 204 +17 90 0 111 161 203 86 204 205 0 206 +17 117 0 111 203 112 91 102 207 0
+ 0 +17 93 0 208 56 50 91 203 180 0 209 -17 204 0 210 211 212 48 90 205 0 0 -15 2
+10 557 0 42 213 0 17 211 0 210 42 204 70 50 214 0 0 -17 212 0 210 204 215 86 154
+ 152 0 0 -16 205 346 0 ?90 159 33 216 0 0 1 16 159 376 0 ?217 156 205 20 0 0 1 1
+6 33 437 0 ?27 205 218 219 0 0 1 133 216 721 0 205 220 221 0 +221 .004 0 .01 .02
+ 0 .01 -.006 .01 30 220 718 0 1 222 216 223 +.01 .004 .01 1 0 0 30 221 722 0 1 2
+16 224 225 +.01 0 .01 1 0 0 133 224 723 0 218 221 226 0 +226 .004 0 .015 .004 .0
+04 .015 -.025 -.021 141 225 216 225 225 221 16 218 449 0 ?53 33 227 224 0 0 1 30
+ 226 724 0 1 224 228 229 +.004 .025 .015 0 1 0 133 228 725 0 230 226 231 0 +231
+ .02 0 .015 .004 0 .015 -.01 .006 141 229 224 229 229 226 16 230 350 0 ?232 214
+ 173 228 0 0 1 30 231 726 0 1 228 219 233 +.01 0 .015 -1 0 0 133 219 727 0 33 23
+1 234 0 +234 .004 .004 .015 0 .004 .015 .006 .01 141 233 228 233 233 231 30 234
+ 728 0 1 219 235 236 +.01 .004 .015 -1 0 0 133 235 731 0 173 234 237 0 +237 0 .0
+04 .015 0 .05 .015 -.021 .025 141 236 219 236 236 234 16 173 381 0 ?75 230 171 2
+35 0 0 1 30 237 732 0 1 235 20 238 +0 .025 .015 0 1 0 133 20 733 0 159 237 7 0 +
+7 0 .05 .01 0 .004 .01 -.025 .021 141 238 235 238 238 237 17 75 0 239 85 34 73 2
+40 173 0 241 +15 239 29 0 119 242 0 17 85 0 239 217 75 83 167 165 0 158 -17 34 0
+ 239 75 198 11 30 186 0 240 -17 240 0 243 32 241 11 75 173 0 0 -17 241 0 243 240
+ 244 73 78 171 0 167 -15 243 532 0 32 245 0 17 244 0 243 241 81 76 170 168 0 164
+ -17 78 0 246 88 167 76 241 171 0 244 +17 167 0 246 78 158 73 85 165 0 0 +15 246
+ 551 0 167 247 0 17 158 0 246 167 88 83 215 156 0 248 +17 88 0 246 158 78 82 164
+ 162 0 215 -17 215 0 210 212 248 82 158 156 0 154 -17 248 0 210 215 42 83 217 15
+9 0 0 -17 42 0 210 248 211 28 38 125 0 217 -17 217 0 239 40 85 28 248 159 0 0 +1
+7 40 0 239 96 217 36 35 41 0 249 -17 96 0 239 250 40 94 249 151 0 251 +17 249 0
+ 252 253 251 36 96 151 0 0 -15 252 581 0 249 254 0 17 253 0 252 209 249 54 39 25
+5 0 0 +17 251 0 252 249 133 94 99 149 0 147 -16 151 335 0 ?96 207 149 256 0 0 1
+ 16 207 344 0 ?117 255 151 257 0 0 1 133 256 704 0 151 258 259 0 +259 0 .004 .00
+5 0 .05 .005 -.021 .025 30 258 703 0 1 260 256 261 +.002 .004 .005 1 0 0 30 259
+ 705 0 1 256 262 263 +0 .025 .005 0 1 0 133 262 707 0 124 259 264 0 +264 0 .05 0
+ 0 0 0 -.048 .002 141 263 256 263 263 259 16 124 14 0 ?121 183 114 262 0 0 1 30
+ 264 708 0 1 262 126 265 +0 .002 0 0 -1 0 133 126 709 0 114 264 266 0 +266 0 0 0
+ .02 0 0 -.002 .018 141 265 262 265 265 264 30 266 710 0 1 126 267 268 +.002 0 0
+ 1 0 0 133 267 715 0 214 266 269 0 +269 .004 .004 .01 .004 0 .01 .021 .025 141 2
+68 126 268 268 266 16 214 419 0 ?50 125 230 267 0 0 1 30 269 716 0 1 267 222 270
+ +.004 .025 .01 0 -1 0 133 222 717 0 125 269 220 0 +220 0 .004 .01 .004 .004 .01
+ -.01 -.006 141 270 267 270 270 269 16 125 433 0 ?38 114 214 222 0 0 1 17 38 0 3
+7 271 35 70 42 125 0 211 +15 37 183 0 38 272 0 17 271 0 37 39 38 54 72 200 0 253
+ -17 39 0 37 35 271 36 253 255 0 40 -17 72 0 208 50 56 70 271 200 0 38 +15 208 1
+43 0 50 273 0 17 50 0 208 93 72 48 211 214 0 203 +17 56 0 208 72 93 54 209 227 0
+ 271 -17 209 0 252 102 253 91 56 227 0 117 +16 227 411 0 ?209 218 255 187 0 0 1
+ 16 255 407 0 ?253 227 207 260 0 0 1 133 187 698 0 227 185 274 0 +274 .004 .004
+ .005 .004 0 .005 -.002 .002 30 274 699 0 1 187 257 275 +.004 .002 .005 0 -1 0 1
+33 257 700 0 207 274 276 0 +276 .02 0 .005 .004 0 .005 -.01 .006 141 275 187 275
+ 275 274 30 276 701 0 1 257 260 277 +.01 0 .005 -1 0 0 133 260 702 0 255 276 258
+ 0 +258 0 .004 .005 .004 .004 .005 -.002 .002 141 277 257 277 277 276 17 102 0 2
+52 133 209 100 117 207 0 129 -17 133 0 252 251 102 97 129 134 0 131 -17 131 0 12
+7 129 128 97 109 135 0 0 +17 109 0 278 139 99 103 131 135 0 137 -15 278 575 0 14
+7 279 0 17 139 0 278 147 109 104 137 140 0 0 +17 99 0 278 109 147 97 251 149 0 1
+33 +17 147 0 278 99 139 94 250 145 0 0 +17 250 0 239 121 96 104 147 145 0 139 -1
+7 121 0 239 119 250 67 106 124 0 113 +17 119 0 239 198 121 57 69 120 0 0 +17 106
+ 0 122 137 113 104 121 124 0 250 -17 198 0 239 34 119 59 280 25 0 281 +17 280 0
+ 282 283 281 57 198 25 0 119 -17 281 0 282 280 284 59 197 195 0 0 -15 282 35 0 2
+83 18 0 17 284 0 282 281 283 61 194 192 0 0 -17 197 0 29 31 30 61 281 195 0 284
+ +15 29 191 0 27 16 0 17 31 0 29 27 197 51 63 201 0 32 -17 30 0 29 197 27 59 34
+ 186 0 198 +16 186 170 0 ?30 41 200 185 0 0 1 17 32 0 243 285 240 51 27 33 0 0 -
+17 285 0 243 81 32 43 53 218 0 232 -17 81 0 243 244 285 79 232 230 0 170 -17 53
+ 0 202 63 47 51 285 218 0 31 +17 232 0 111 66 161 43 81 230 0 0 +17 66 0 111 24
+ 232 64 47 183 0 283 +17 161 0 111 232 90 79 206 155 0 0 +17 206 0 286 154 170 8
+6 161 155 0 212 -15 286 563 0 154 287 0 17 154 0 286 164 206 82 212 152 0 0 +17
+ 170 0 286 206 164 79 244 168 0 161 +17 164 0 286 170 154 76 88 162 0 0 +14 255
+ 287 558 288 ?0 213 286 5 289 +0 0 0 213 23 81 1 288 825 290 287 291 0 292 0 293
+ 14 213 552 292 ?287 247 210 5 294 +0 0 287 247 23 50 289 606 0 287 294 295 0 +.
+02 .025 .01 1 0 0 0 0 -1 13 23 4 0 0 0 0 0 0 9 16 14 16 186 296 ?297 0 29 5 298
+ +272 272 297 0 23 81 1 296 801 290 16 299 0 0 300 301 14 297 146 300 ?18 16 202
+ 5 302 +273 273 18 16 23 50 298 47 0 272 302 303 0 +.002 .004 0 0 1 0 0 0 1 14 2
+72 27 304 ?138 242 37 5 298 +16 16 138 242 23 81 1 304 808 290 272 305 0 306 307
+ 308 14 138 9 307 ?273 272 122 5 309 +0 0 273 272 23 14 242 30 306 ?272 116 239
+ 5 303 +0 0 272 116 23 81 1 306 807 290 242 310 0 311 304 312 14 116 33 311 ?242
+ 18 111 5 19 +0 0 242 18 23 50 303 48 0 242 298 19 0 +0 .002 0 -1 0 0 0 0 1 50 1
+9 49 0 116 303 6 0 +.002 0 0 0 -1 0 0 0 -1 81 1 311 805 290 116 313 0 314 306 31
+5 14 18 36 314 ?116 297 282 5 6 +0 0 116 297 23 81 1 314 803 290 18 316 0 300 31
+1 317 80 255 1 290 0 318 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 81 3 316 786 319
+ 18 320 314 321 322 323 324 0 81 1 300 802 290 297 325 0 296 314 326 83 255 3 31
+7 .5960784 .6666667 .6862745 81 3 325 791 319 297 327 300 328 329 330 331 0 83 3
+ 326 .5960784 .6666667 .6862745 80 3 319 332 333 9000 0 0 0 0 3 6 0 0 0 FFFFTFTT
+FFFFFF1 1 3 81 3 327 782 319 297 0 325 334 335 336 337 0 81 3 328 790 319 116 33
+4 338 299 325 339 340 0 81 3 329 792 319 273 335 341 325 342 343 344 0 82 255 1
+ 330 0 82 1 331 127 14 273 2 341 ?279 138 208 5 302 +297 297 279 138 23 81 3 335
+ 783 319 273 0 329 327 345 346 347 0 81 1 341 811 290 273 329 0 307 348 349 81 3
+ 342 793 319 245 0 350 329 338 351 352 0 82 1 343 0 82 1 344 127 14 245 527 353
+ ?247 254 243 5 354 +0 0 247 254 23 81 1 350 818 355 245 342 353 356 357 358 81
+ 3 338 794 319 116 328 313 342 359 360 361 0 82 1 351 0 82 1 352 170 81 1 313 80
+4 355 116 338 311 0 310 362 81 3 359 795 319 242 322 310 338 363 364 365 0 82 1
+ 360 0 82 1 361 171 81 3 322 787 319 242 366 359 316 305 367 368 0 81 1 310 806
+ 355 242 359 306 313 369 370 81 3 363 796 319 247 0 357 359 371 372 373 0 82 1 3
+64 0 82 1 365 172 14 247 546 374 ?213 245 246 5 295 +0 0 213 245 23 81 1 357 820
+ 355 247 363 374 350 375 376 81 3 371 797 319 213 0 375 363 377 378 379 0 82 1 3
+72 0 82 1 373 173 81 1 375 822 355 213 371 292 357 291 380 81 3 377 798 319 287
+ 0 291 371 0 381 382 0 82 1 378 0 82 1 379 174 81 1 291 824 355 287 377 288 375
+ 0 383 82 1 381 0 82 1 382 175 80 1 355 384 385 8015 0 0 0 0 3 5 0 0 0 FFFFTFFFF
+FFFFF2 83 1 383 0 79 255 21 385 SDL/TYSA_TRANSLUCENCY81 1 292 823 290 213 375 0
+ 374 288 386 83 1 380 0 81 1 374 821 290 247 357 0 353 292 387 83 3 386 .5960784
+ .6666667 .6862745 81 1 353 819 290 245 350 0 388 374 389 83 3 387 .5960784 .666
+6667 .6862745 81 1 388 817 290 254 356 0 390 353 391 83 3 389 .5960784 .6666667
+ .6862745 14 254 576 388 ?245 130 252 5 392 +0 0 245 130 23 81 1 356 816 355 254
+ 393 388 394 350 395 81 1 390 815 290 130 394 0 348 388 396 83 3 391 .5960784 .6
+666667 .6862745 14 130 564 390 ?254 279 127 5 397 +0 0 254 279 23 81 1 394 814 3
+55 130 398 390 399 356 400 81 1 348 813 290 279 399 0 341 390 401 83 3 396 .5960
+784 .6666667 .6862745 14 279 570 348 ?130 273 278 5 402 +0 0 130 273 23 81 1 399
+ 812 355 279 403 348 369 394 404 83 3 401 .5960784 .6666667 .6862745 81 3 403 77
+4 319 279 0 399 405 393 406 407 0 81 1 369 809 355 138 321 307 310 399 408 83 1
+ 404 0 81 3 321 785 319 138 345 369 345 316 409 410 0 81 1 307 810 290 138 369 0
+ 304 341 411 83 1 408 0 83 3 411 .5960784 .6666667 .6862745 81 3 345 784 319 138
+ 412 321 335 321 413 414 0 82 1 409 0 82 1 410 122 81 3 412 771 319 138 0 345 0
+ 398 415 416 0 82 1 413 0 82 1 414 103 81 3 398 772 319 130 0 394 412 405 417 41
+8 0 82 1 415 0 82 1 416 11 81 3 405 773 319 242 0 366 398 403 419 420 0 82 1 417
+ 0 82 1 418 12 81 3 366 778 319 242 405 322 320 421 422 423 0 82 1 419 0 82 1 42
+0 13 81 3 320 777 319 18 0 316 424 366 425 426 0 81 3 421 779 319 16 0 299 366 4
+27 428 429 0 82 1 422 0 82 1 423 99 81 3 299 789 319 16 421 296 305 328 430 431
+ 0 81 3 427 780 319 272 0 305 421 334 432 433 0 82 1 428 0 82 1 429 100 81 3 305
+ 788 319 272 427 304 322 299 434 435 0 81 3 334 781 319 116 424 328 427 327 436
+ 437 0 82 1 432 0 82 1 433 100 81 3 424 776 319 116 0 334 393 320 438 439 0 82 1
+ 436 0 82 1 437 101 81 3 393 775 319 254 0 356 403 424 440 441 0 82 1 438 0 82 1
+ 439 16 82 1 440 0 82 1 441 15 82 1 434 0 82 1 435 125 82 1 430 0 82 1 431 125 8
+2 1 425 0 82 1 426 98 82 1 406 0 82 1 407 14 50 402 613 0 279 397 392 0 +.01 .05
+ 0 0 1 0 0 0 1 50 397 614 0 130 0 402 0 +.02 .025 0 1 0 0 0 0 -1 50 392 612 0 25
+4 402 294 0 +.01 .025 .005 0 0 1 1 0 0 50 294 607 0 213 392 289 0 +.01 .025 .01
+ 0 0 -1 -1 0 0 83 1 400 0 83 1 395 0 83 1 376 0 50 295 605 0 247 289 354 0 +.01
+ .05 .01 0 1 0 0 0 1 50 354 602 0 245 295 309 0 +.01 .025 .015 0 0 1 1 0 0 50 30
+9 37 0 138 354 302 0 +.002 .002 0 0 0 -1 -1 0 0 50 302 46 0 273 309 298 0 +.004
+ .002 0 1 0 0 0 0 -1 83 1 370 0 82 1 367 0 82 1 368 124 83 1 362 0 83 1 358 0 83
+ 3 349 .5960784 .6666667 .6862745 82 1 346 0 82 1 347 102 82 1 339 0 82 1 340 12
+6 82 1 336 0 82 1 337 102 79 27 333 MONIKER/MONIKER_DATA_ATTRIB82 1 323 0 82 1 3
+24 123 79 15 318 SDL/TYSA_COLOUR83 3 315 .5960784 .6666667 .6862745 83 3 312 .59
+60784 .6666667 .6862745 83 3 308 .5960784 .6666667 .6862745 15 202 151 0 53 297
+ 0 83 3 301 .5960784 .6666667 .6862745 83 3 293 .5960784 .6666667 .6862745 17 24
+ 0 111 69 66 57 283 10 0 280 +17 47 0 202 53 194 43 66 183 0 285 -17 283 0 282 2
+84 280 64 24 10 0 194 -17 194 0 202 47 63 64 284 192 0 0 +141 261 260 261 261 25
+8 141 223 222 223 223 220 141 177 199 442 442 174 141 442 181 177 177 174 19 17
+ 5 0 1 0 9 5 S141 21 20 21 21 7 74 4 CI16 index_map_offset0 0 1 dCCZ20 15 6 0 0
+ 288 443 377 13 2 291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 2 443 770 444 1 0 13 0 0 44
+5 446 81 3 13 799 447 1 443 2 0 0 448 449 450 80 3 447 319 451 9000 0 0 0 0 3 6
+ 0 0 0 FFTFFFFFFFFFFF3 3 1 84 255 38 448 {9ccd3f38-3f38-4e5b-bf3a-62a25f7ef09d}8
+4 18 449 NX 7.5.0.26-berryr82 1 450 0 79 25 451 MONIKER/GUID_TABLE_ATTRIB80 2 44
+4 452 453 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 445 7830.64 84 8 446 Kg/
+Cu M 79 16 453 SDL/TYSA_DENSITY80 2 12 447 454 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFF
+FFFF2 3 83 1 14 3574 79 22 454 MONIKER/BODY_ID_ATTRIB1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_prism_tool.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_prism_tool.xmt_txt
new file mode 100644
index 0000000..8f95957
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_prism_tool.xmt_txt
@@ -0,0 +1,86 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=Intel x86/Windows NT;
+MC_MODEL=genuineintel family 6 model 15 stepping 2, intel(r) core(tm)2 cpu          6400  @ 2.13ghz;
+MC_ID=cbrint148;
+OS=windows nt;
+OS_RELEASE=5.1 (workstation) (build 2600: service pack 2) ;
+FRU=mdc_ugii_v7.0_djl_can_vrh;
+APPL=unigraphics;
+SITE=unknown;
+USER=berryr;
+FORMAT=text;
+GUISE=transmit;
+KEY=inst_bod_prism;
+FILE=U:\temp_run_ug_directory\inst_bod_prism.x_t;
+DATE=12-jan-2010;
+**PART2;
+SCH=SCH_2201127_20000;
+USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 220112723 SCH_2201127_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 114 2 3 0 0 0 0 1e3 1
+e-8 0 4 0 1 0 1 1 5 6 7 8 9 10 11 0 0 0 0 81 255 2 2 109 12 1 13 0 0 0 14 0 70 1
+1 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 fin
+ger_block1012 0 CZ3 0 4 T1 0 0 5 20 1 15 15 13 255 5 3 0 1 0 16 0 0 17 0 50 255
+ 6 72 0 16 18 0 0 +.0118810684770611 .01414668800463448 .023 .905949405681461 -.
+4233859638030145 0 .4233859638030145 .905949405681461 0 30 255 7 69 0 19 20 0 0
+ +.0118810684770611 .01414668800463448 .023 0 0 -1 29 255 8 55 0 21 22 0 .008247
+85132920774 .01428324845028418 .003 19 255 9 1 0 1 17 0 23 V16 255 10 59 0 ?24 0
+ 25 20 0 0 1 18 255 11 10 0 26 0 27 28 ?1 17 255 26 0 29 30 31 11 32 25 0 33 -18
+ 27 5 0 34 11 35 36 ?1 29 28 12 0 11 36 37 .00824785132920774 .01428324845028418
+ .023 29 36 7 0 27 38 28 .00994345615420823 .01000063952309734 .023 29 37 57 0 3
+9 28 22 .0118810684770611 .01414668800463448 .003 18 39 49 0 40 41 0 37 ?1 29 22
+ 56 0 41 37 8 .00994345615420823 .01000063952309734 .003 18 41 47 0 24 21 39 22
+ ?1 17 24 0 42 43 44 41 34 10 0 45 +18 21 45 0 32 35 41 8 ?1 17 32 0 46 45 33 21
+ 26 25 0 31 +18 35 2 0 47 27 21 38 ?1 17 47 0 42 44 43 35 40 19 0 30 -29 38 4 0
+ 35 0 36 .0118810684770611 .01414668800463448 .023 15 255 42 65 0 43 16 0 17 44
+ 0 42 24 47 27 48 49 0 0 +17 43 0 42 47 24 39 50 51 0 0 -17 40 0 29 31 30 39 47
+ 19 0 52 +16 19 60 0 ?40 25 53 7 0 0 1 17 30 0 29 40 26 35 54 53 0 48 +15 29 61
+ 0 31 55 0 17 54 0 56 57 48 11 30 53 0 0 -16 53 15 0 ?30 19 58 59 0 0 1 17 48 0
+ 56 54 57 35 44 49 0 0 -15 56 18 0 48 60 0 17 57 0 56 48 54 27 33 58 0 44 -16 49
+ 6 0 ?44 58 61 62 0 0 1 16 58 11 0 ?33 53 49 63 0 0 1 16 61 39 0 ?52 49 64 65 0
+ 0 1 30 62 9 0 49 0 63 0 +.0118810684770611 .01414668800463448 .023 -.4233859638
+030145 -.905949405681461 0 30 63 14 0 58 62 59 0 +.00994345615420823 .0100006395
+2309734 .023 -.368124552684689 .929776485888247 0 30 59 17 0 53 63 66 0 +.008247
+85132920774 .01428324845028416 .023 .999294369607586 -.0375601234100384 0 30 66
+ 54 0 51 59 67 0 +.0118810684770611 .01414668800463448 .003 -.4233859638030145 -
+.905949405681461 0 16 51 43 0 ?50 64 0 66 0 0 1 30 67 53 0 64 66 65 0 +.00994345
+615420823 .01000063952309734 .003 -.368124552684689 .929776485888247 0 16 64 41
+ 0 ?68 61 51 67 0 0 1 30 65 52 0 61 67 69 0 +.00824785132920774 .014283248450284
+16 .003 .999294369607586 -.0375601234100384 0 30 69 67 0 25 65 20 0 +.0082478513
+2920774 .01428324845028418 .023 0 0 -1 16 25 58 0 ?32 10 19 69 0 0 1 30 20 68 0
+ 10 69 7 0 +.00994345615420823 .01000063952309734 .023 0 0 -1 17 68 0 70 52 50 2
+1 45 64 0 0 +15 70 38 0 50 71 0 17 52 0 70 50 68 39 31 61 0 43 +17 50 0 70 68 52
+ 41 43 51 0 0 +17 45 0 46 34 32 41 68 64 0 50 -15 46 63 0 45 72 0 17 34 0 46 33
+ 45 27 24 10 0 57 -17 33 0 46 32 34 11 57 58 0 54 +14 255 72 64 73 ?55 16 46 5 1
+8 +0 0 55 16 23 81 1 73 111 74 72 75 0 76 77 78 14 55 62 77 ?60 72 29 5 79 +0 0
+ 60 72 23 14 16 66 76 ?72 0 42 5 6 +0 0 72 0 23 50 18 71 0 72 79 6 0 +.009943456
+15420823 .01000063952309734 .023 -.929776485888247 -.3681245526846895 0 .3681245
+526846895 -.929776485888247 0 13 23 73 0 0 0 0 0 0 9 16 50 79 70 0 55 80 18 0 +.
+00824785132920774 .01428324845028416 .023 .0375601234100384 .999294369607586 0 -
+.999294369607586 .0375601234100384 0 50 80 51 0 71 81 79 0 +.0118810684770611 .0
+1414668800463448 .003 0 0 1 1 0 0 14 71 35 82 ?0 60 70 5 80 -0 0 0 60 23 50 81 2
+0 0 60 0 80 0 +.0118810684770611 .01414668800463448 .023 0 0 1 1 0 0 14 60 19 83
+ ?71 55 56 5 81 +0 0 71 55 23 81 1 83 113 74 60 84 0 77 82 85 80 255 1 74 0 86 8
+001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 81 3 84 106 87 60 0 83 88 89 90 91 0 81 1
+ 77 112 74 55 88 0 73 83 92 81 1 82 114 74 71 89 0 83 0 93 83 255 3 85 .5960784
+ .6666667 .6862745 81 3 89 107 87 71 0 82 84 0 94 95 0 83 3 93 .5960784 .6666667
+ .6862745 80 3 87 96 97 9000 0 0 0 0 3 6 0 0 0 FFFFTFTTFFFFFF1 1 3 82 255 1 94 0
+ 82 1 95 50 79 255 27 97 MONIKER/MONIKER_DATA_ATTRIB81 3 88 105 87 55 0 77 75 84
+ 98 99 0 83 3 92 .5960784 .6666667 .6862745 81 3 75 104 87 72 0 73 100 88 101 10
+2 0 82 1 98 0 82 1 99 48 81 3 100 103 87 16 0 76 0 75 103 104 0 82 1 101 0 82 1
+ 102 47 81 1 76 110 74 16 100 0 0 73 105 82 1 103 0 82 1 104 46 83 3 105 .596078
+4 .6666667 .6862745 82 1 90 0 82 1 91 49 79 15 86 SDL/TYSA_COLOUR83 3 78 .596078
+4 .6666667 .6862745 17 31 0 29 26 40 21 52 61 0 68 -19 17 74 0 1 0 9 5 S74 4 CI1
+6 index_map_offset0 0 1 dCCZ20 15 5 0 0 106 89 13 2 82 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 81 2 106 102 107 1 0 13 0 0 108 109 81 3 13 108 110 1 106 2 0 0 111 112 113
+ 80 3 110 87 114 9000 0 0 0 0 3 6 0 0 0 FFTFFFFFFFFFFF3 3 1 84 255 38 111 {2abed
+fe1-dfe1-42a8-b570-363de071a94d}84 18 112 NX 7.5.0.28-berryr82 1 113 0 79 25 114
+ MONIKER/GUID_TABLE_ATTRIB80 2 107 115 116 8004 0 0 0 0 3 5 0 0 0 FFTFFFFFFFFFFF
+2 3 83 1 108 7830.64 84 8 109 Kg/Cu M 79 16 116 SDL/TYSA_DENSITY80 2 12 110 117
+ 9000 2 2 2 2 3 6 0 0 0 FFTFFFFFFFFFFF2 3 83 1 14 7008 79 22 117 MONIKER/BODY_ID
+_ATTRIB1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_sheet_body.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_sheet_body.xmt_txt
new file mode 100644
index 0000000..d2078d9
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_sheet_body.xmt_txt
@@ -0,0 +1,64 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\tt1\p_inst_bod1_sheet1.x_t;
+FILE=U:\tt1\p_inst_bod1_sheet1.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 92 2 3 0 0 0 0 1e3 1e
+-8 0 0 0 1 0 3 1 4 5 6 7 8 9 10 0 0 0 0 81 255 2 2 88 11 1 0 0 0 0 12 13 70 11 C
+I9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger
+_block1012 0 CZ3 0 4 T1 0 0 2 20 1 14 14 13 255 4 71 0 1 0 15 0 0 8 15 50 255 5
+ 18 0 15 16 0 0 +.01 .025 .005 0 0 1 1 0 0 30 255 6 42 0 9 17 0 0 +0 .025 .005 0
+ 1 0 29 255 7 66 0 10 18 0 0 .05 .005 19 255 8 70 0 1 0 0 4 V16 255 9 41 0 ?19 0
+ 20 6 0 0 1 18 255 10 64 0 21 0 22 7 ?1 17 255 21 0 23 24 25 10 26 20 0 19 -18 2
+2 61 0 27 10 28 18 ?1 17 27 0 29 30 31 22 32 33 0 34 +18 28 58 0 35 22 36 37 ?1
+ 29 18 63 0 22 37 7 0 0 .005 29 37 60 0 28 38 18 0 .05 0 29 38 57 0 36 39 37 0 0
+ 0 18 36 55 0 40 28 41 38 ?1 29 39 54 0 41 42 38 .02 0 0 18 41 52 0 43 36 44 39
+ ?1 29 42 51 0 44 45 39 .02 0 .005 18 44 49 0 46 41 47 42 ?1 29 45 48 0 47 48 42
+ .02 .05 .005 18 47 46 0 49 44 50 45 ?1 29 48 45 0 50 0 45 .02 .05 0 18 50 43 0
+ 51 47 0 48 ?1 17 51 0 52 49 53 50 43 54 0 55 +15 255 52 8 0 51 56 0 17 49 0 52
+ 46 51 47 55 57 0 25 +17 53 0 52 51 46 41 31 58 0 59 -17 43 0 60 40 61 41 51 54
+ 0 53 -16 54 21 0 ?51 57 0 62 0 0 1 17 55 0 0 0 0 50 49 57 0 61 -16 57 23 0 ?49
+ 63 54 64 0 0 1 17 61 0 60 43 35 50 65 66 0 0 -15 60 12 0 43 67 0 17 35 0 60 61
+ 40 28 68 69 0 65 -17 65 0 0 0 0 28 61 66 0 0 +16 66 33 0 ?65 33 69 70 0 0 1 16
+ 33 35 0 ?27 71 66 72 0 0 1 16 69 31 0 ?68 66 73 74 0 0 1 30 70 34 0 66 74 72 0
+ +.01 .05 0 -1 0 0 30 74 32 0 69 75 70 0 +0 .025 0 0 -1 0 30 72 36 0 33 70 76 0
+ +.01 0 .005 -1 0 0 30 76 38 0 71 72 17 0 +0 0 0 0 0 1 16 71 37 0 ?34 20 33 76 0
+ 0 1 30 17 40 0 20 76 6 0 +.01 .05 .005 1 0 0 16 20 39 0 ?26 9 71 17 0 0 1 17 26
+ 0 0 0 0 47 21 20 0 0 +17 34 0 0 0 0 22 30 71 0 24 +17 30 0 29 59 27 36 34 71 0
+ 0 -17 24 0 23 32 21 22 19 9 0 0 -15 23 20 0 32 15 0 17 32 0 23 25 24 44 27 33 0
+ 0 -17 19 0 0 0 0 10 24 9 0 0 +17 25 0 23 21 32 47 46 63 0 26 -17 46 0 52 53 49
+ 44 25 63 0 31 +16 63 25 0 ?46 58 57 77 0 0 1 16 58 27 0 ?31 73 63 78 0 0 1 30 7
+7 26 0 63 64 78 0 +.02 .025 .005 0 -1 0 30 64 24 0 57 62 77 0 +.02 .05 0 0 0 1 3
+0 78 28 0 58 77 75 0 +.02 0 0 0 0 1 30 75 30 0 73 78 74 0 +.01 0 0 1 0 0 16 73 2
+9 0 ?59 69 58 75 0 0 1 17 59 0 29 31 30 41 40 73 0 0 +15 29 16 0 31 79 0 17 31 0
+ 29 27 59 44 53 58 0 32 +17 40 0 60 35 43 36 59 73 0 68 -17 68 0 0 0 0 36 35 69
+ 0 30 +14 255 79 13 80 ?67 15 29 4 16 +0 0 67 15 4 81 1 80 90 81 79 0 0 82 83 84
+ 14 67 9 83 ?56 79 60 4 85 +0 0 56 79 4 14 15 17 82 ?79 0 23 4 5 +0 0 79 0 4 50
+ 16 14 0 79 85 5 0 +.01 0 0 0 -1 0 0 0 -1 50 85 10 0 67 86 16 0 +.01 .025 0 0 0
+ -1 -1 0 0 50 86 2 0 56 0 85 0 +.02 .025 0 1 0 0 0 0 -1 14 56 1 87 ?0 67 52 4 86
+ +0 0 0 67 4 81 1 87 92 81 56 0 0 83 0 88 80 255 1 81 0 89 8001 0 0 0 0 3 5 0 0
+ 0 FFFFTFTFFFFFFF2 81 1 83 91 81 67 0 0 80 87 90 83 255 3 88 .5960784 .6666667 .
+6862745 83 3 90 .5960784 .6666667 .6862745 79 255 15 89 SDL/TYSA_COLOUR81 1 82 8
+9 81 15 0 0 0 80 91 83 3 91 .5960784 .6666667 .6862745 83 3 84 .5960784 .6666667
+ .6862745 30 62 22 0 54 0 64 0 +.02 .025 0 0 1 0 74 4 CI16 index_map_offset0 0 1
+ dCCZ20 14 2 0 0 2 87 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 11 92 93 8004 0 0
+ 0 0 3 5 0 0 0 FFTFFFFFFFFFFF2 3 83 1 12 7830.64 84 255 8 13 Kg/Cu M 79 16 93 SD
+L/TYSA_DENSITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl.xmt_txt
new file mode 100644
index 0000000..00e900d
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl.xmt_txt
@@ -0,0 +1,43 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\tt1\p_inst_bod_cyl1.x_t;
+FILE=U:\tt1\p_inst_bod_cyl1.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 32 2 3 0 0 0 0 1e3 1e
+-8 0 0 0 1 0 1 1 4 5 6 0 7 8 0 0 0 0 0 81 255 2 2 29 9 1 0 0 0 0 10 11 70 11 CI9
+ list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger_b
+lock1012 0 CZ3 0 4 T1 0 0 2 20 1 12 12 13 255 4 3 0 1 0 13 0 0 14 0 51 255 5 18
+ 0 15 16 0 0 +.01 .0125 .005 0 0 1 .0025 1 0 0 31 255 6 16 0 8 17 0 0 +.01 .0125
+ .015 0 0 -1 -1 0 0 .0025 19 255 7 1 0 1 14 0 18 V16 255 8 12 0 ?19 0 20 6 0 0 1
+ 17 255 19 0 21 19 19 0 22 8 0 0 +16 20 6 0 ?23 8 0 17 0 0 1 17 23 0 24 23 23 0
+ 25 20 0 0 +31 17 10 0 20 0 6 0 +.01 .0125 .005 0 0 1 1 0 0 .0025 15 255 24 7 0
+ 23 15 0 17 25 0 26 25 25 0 23 20 0 0 -15 26 8 0 25 27 0 14 255 27 9 28 ?15 13 2
+6 4 29 +0 0 15 13 18 81 1 28 31 30 27 0 0 31 32 33 14 15 2 32 ?0 27 21 4 5 +0 0
+ 0 27 18 14 13 15 31 ?27 0 34 4 16 +0 0 27 0 18 50 255 29 11 0 27 0 16 0 +.01 .0
+125 .005 0 0 -1 -1 0 0 13 18 4 0 0 0 0 0 0 7 13 50 16 17 0 13 29 5 0 +.01 .0125
+ .015 0 0 1 1 0 0 81 1 31 30 30 13 0 0 0 28 35 15 34 14 0 22 13 0 17 22 0 34 22
+ 22 0 19 8 0 0 -80 255 1 30 0 36 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 83 255 3
+ 35 .5960784 .6666667 .6862745 79 255 15 36 SDL/TYSA_COLOUR81 1 32 32 30 15 0 0
+ 28 0 37 15 21 13 0 19 15 24 83 3 37 .5960784 .6666667 .6862745 83 3 33 .5960784
+ .6666667 .6862745 19 14 5 0 1 0 7 4 S74 4 CI16 index_map_offset0 0 1 dCCZ20 12
+ 2 0 0 2 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 9 38 39 8004 0 0 0 0 3 5 0
+ 0 0 FFTFFFFFFFFFFF2 3 83 1 10 7830.64 84 255 8 11 Kg/Cu M 79 16 39 SDL/TYSA_DEN
+SITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl2.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl2.xmt_txt
new file mode 100644
index 0000000..cb4e9e0
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/instance_solid_cyl2.xmt_txt
@@ -0,0 +1,43 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=U:\tt1\p_inst_bod_cyl2.x_t;
+FILE=U:\tt1\p_inst_bod_cyl2.x_t;
+DATE=unknown;
+**PART2;
+SCH=SCH_2000118_20000;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 200011823 SCH_2000118_20000_1300
+6186 0 12 27 CCCCCCCCCCCCCCCCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0
+ A17 node_id_index_map82 0 A20 schema_embedding_map82 0 Z1 32 2 3 0 0 0 0 1e3 1e
+-8 0 0 0 1 0 1 1 4 5 6 0 7 8 0 0 0 0 0 81 255 2 2 29 9 1 0 0 0 0 10 11 70 11 CI9
+ list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger_b
+lock1012 0 CZ3 0 4 T1 0 0 2 20 1 12 12 13 255 4 3 0 1 0 13 0 0 14 0 51 255 5 18
+ 0 15 16 0 0 +.01 .0125 .003 0 0 1 .0025 1 0 0 31 255 6 16 0 8 17 0 0 +.01 .0125
+ .013 0 0 -1 -1 0 0 .0025 19 255 7 1 0 1 14 0 18 V16 255 8 12 0 ?19 0 20 6 0 0 1
+ 17 255 19 0 21 19 19 0 22 8 0 0 +16 20 6 0 ?23 8 0 17 0 0 1 17 23 0 24 23 23 0
+ 25 20 0 0 +31 17 10 0 20 0 6 0 +.01 .0125 .003 0 0 1 1 0 0 .0025 15 255 24 7 0
+ 23 15 0 17 25 0 26 25 25 0 23 20 0 0 -15 26 8 0 25 27 0 14 255 27 9 28 ?15 13 2
+6 4 29 +0 0 15 13 18 81 1 28 31 30 27 0 0 31 32 33 14 15 2 32 ?0 27 21 4 5 +0 0
+ 0 27 18 14 13 15 31 ?27 0 34 4 16 +0 0 27 0 18 50 255 29 11 0 27 0 16 0 +.01 .0
+125 .003 0 0 -1 -1 0 0 13 18 4 0 0 0 0 0 0 7 13 50 16 17 0 13 29 5 0 +.01 .0125
+ .013 0 0 1 1 0 0 81 1 31 30 30 13 0 0 0 28 35 15 34 14 0 22 13 0 17 22 0 34 22
+ 22 0 19 8 0 0 -80 255 1 30 0 36 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 83 255 3
+ 35 .5960784 .6666667 .6862745 79 255 15 36 SDL/TYSA_COLOUR81 1 32 32 30 15 0 0
+ 28 0 37 15 21 13 0 19 15 24 83 3 37 .5960784 .6666667 .6862745 83 3 33 .5960784
+ .6666667 .6862745 19 14 5 0 1 0 7 4 S74 4 CI16 index_map_offset0 0 1 dCCZ20 12
+ 2 0 0 2 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 2 9 38 39 8004 0 0 0 0 3 5 0
+ 0 0 FFTFFFFFFFFFFF2 3 83 1 10 7830.64 84 255 8 11 Kg/Cu M 79 16 39 SDL/TYSA_DEN
+SITY1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/sheet_body.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/sheet_body.xmt_txt
new file mode 100644
index 0000000..ae1ea78
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/sheet_body.xmt_txt
@@ -0,0 +1,23 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;MC=i386;MC_MODEL=Intel/NT;MC_ID=SDLINT37;OS=unknown;OS_RELEASE=unknown;F
+RU=sdl_parasolid_test_i386;APPL=unknown;SITE=sdl-cambridge-u.k.;USER=matthewp;FO
+RMAT=text;GUISE=transmit;KEY=holey_sheet_v101;FILE=holey_sheet_v101.xmt_txt;DATE
+=5-feb-1999;
+**PART2;SCH=SCH_1001134_10004;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 100113417 SCH_1001134_100040 12
+ 1 56 0 0 0 0 0 0 1e3 1e-8 0 2 0 1 0 3 0 3 4 5 6 7 8 9 13 3 3 0 1 0 10 0 0 7 10
+ 50 4 25 0 10 0 0 0 +0 0 0 0 0 1 1 0 0 31 5 33 0 8 11 0 0 +0 0 0 0 0 1 1 0 0 2 2
+9 6 24 0 12 13 0 -5 5 0 19 7 5 0 1 0 0 3 V16 8 30 0 ?14 0 15 5 0 0 1 18 9 20 0 1
+6 0 17 13 ?1 17 16 18 19 20 9 21 22 0 23 -18 17 16 0 19 9 24 25 ?1 29 13 23 0 9
+ 25 6 -5 -5 0 29 25 19 0 17 26 13 5 -5 0 29 26 15 0 24 0 25 5 5 0 18 24 12 0 27
+ 17 12 26 ?1 17 27 18 20 19 24 28 29 0 30 -18 12 11 0 21 24 0 6 ?1 17 21 0 0 0 1
+2 16 22 0 20 +16 22 21 0 ?21 31 0 11 0 0 1 17 20 18 16 27 12 30 15 0 0 -15 18 8
+ 0 20 10 0 17 30 0 0 0 24 20 15 0 0 +16 15 6 0 ?30 8 29 32 0 0 1 16 29 13 0 ?28
+ 15 31 33 0 0 1 30 32 10 0 15 0 33 0 +0 5 0 1 0 0 30 33 14 0 29 32 34 0 +5 0 0 0
+ -1 0 30 34 18 0 31 33 11 0 +0 -5 0 -1 0 0 16 31 17 0 ?23 29 22 34 0 0 1 30 11 2
+2 0 22 34 5 0 +-5 0 0 0 1 0 17 23 0 0 0 9 19 31 0 0 +17 19 18 27 16 17 23 31 0 2
+8 -17 28 0 0 0 17 27 29 0 0 +14 10 9 0 ?0 0 35 3 4 +0 0 0 0 3 15 35 32 0 36 10 1
+8 17 36 35 36 36 0 14 8 0 0 -17 14 0 0 0 0 36 8 0 0 +1 0 
diff --git a/contrib/Parasolid/interface_parasolid/testcases/twoplates.xmt_txt b/contrib/Parasolid/interface_parasolid/testcases/twoplates.xmt_txt
new file mode 100644
index 0000000..3289467
--- /dev/null
+++ b/contrib/Parasolid/interface_parasolid/testcases/twoplates.xmt_txt
@@ -0,0 +1,279 @@
+**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz**************************
+**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789**************************
+**PART1;
+MC=unknown;
+MC_MODEL=unknown;
+MC_ID=unknown;
+OS=unknown;
+OS_RELEASE=unknown;
+FRU=sdl_parasolid_customer_support;
+APPL=.Net Example Application;
+SITE=unknown;
+USER=unknown;
+FORMAT=text;
+GUISE=transmit;
+KEY=X:\Documents\VirfacProjects\NewProject\Geometries\Boolean_3198_part(3198).xmt_txt;
+FILE=X:\Documents\VirfacProjects\NewProject\Geometries\Boolean_3198_part(3198).xmt_txt;
+DATE=unknown;
+**PART2;
+SCH=SCH_2600139_25001;USFLD_SIZE=0;
+**PART3;
+**END_OF_HEADER*****************************************************************
+T51 : TRANSMIT FILE created by modeller version 260013923 SCH_2600139_25001_1300
+6189 0 12 29 CCCCCCCCCCCCCDI5 owner1040 0 CCCCCCCCCA16 index_map_offset0 0 1 dA9
+ index_map82 0 A17 node_id_index_map82 0 A20 schema_embedding_map82 0 A5 child12
+ 0 A14 lowest_node_id0 0 1 dZ1 505 2 3 0 0 0 0 1e3 1e-8 0 4 0 1 0 6 1 0 5 6 7 8
+ 9 10 0 0 0 0 0 0 81 255 1 2 356 11 1 0 0 12 13 14 70 11 CI9 list_type0 0 1 uI10
+ notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ3 96 4
+ T1 0 0 3 20 1 15 15 50 255 5 431 0 16 17 0 18 +0 -.2 -.0032 0 0 1 1 0 0 133 255
+ 6 437 0 19 20 0 0 +20 0 -.2 -.0032 0 0 -.0032 0 .2 29 255 7 489 0 21 22 0 .2 -.
+2 -.0032 19 8 CCCCCCCA5 owner12 0 Z8 505 0 1 23 0 24 V0 16 255 9 54 0 1e-6 25 0
+ 26 0 0 0 1 18 255 10 49 0 27 0 28 29 1e-6 1 17 255 27 0 30 25 31 10 32 33 34 35
+ +18 28 47 0 36 10 37 38 1e-6 1 29 29 92 0 10 39 38 -439463280580791e-31 .2 0 29
+ 39 91 0 40 41 29 .2 .2 -.0032 29 38 93 0 28 29 42 -439463280580791e-31 .2 -.003
+2 29 42 492 0 43 38 44 0 -.2 0 18 43 428 0 45 46 47 42 1e-6 1 29 44 491 0 46 42
+ 22 0 -.2 -.0032 18 46 427 0 48 49 43 44 1e-6 1 29 22 490 0 47 44 7 .2 -.2 0 18
+ 47 429 0 50 43 21 22 1e-6 1 17 50 0 51 52 45 47 53 54 55 56 +18 21 430 0 57 47
+ 0 7 1e-6 1 17 57 0 58 48 59 21 60 61 62 63 -15 255 58 408 0 19 16 0 17 48 0 58
+ 19 57 46 64 65 66 67 -17 59 0 58 57 19 49 68 69 70 60 +17 60 0 71 72 63 49 57 6
+1 73 74 +16 61 418 0 1e-6 60 75 76 0 0 0 1 133 62 457 0 57 77 78 0 +77 .2 0 -.00
+32 .2 -.2 -.0032 -2755455298081545e-32 .2 17 63 0 71 60 56 21 79 80 81 64 +15 71
+ 388 0 60 82 0 17 56 0 71 63 72 47 52 75 83 79 -17 79 0 84 53 64 47 63 80 85 0 -
+16 80 421 0 1e-6 63 54 65 0 0 0 1 133 81 475 0 63 86 87 0 +86 .2 -.2 0 .2 -.2 -.
+0032 0 .0032 17 64 0 84 79 88 21 48 65 89 0 +15 84 382 0 64 90 0 17 88 0 84 64 5
+3 46 91 76 92 0 +16 65 422 0 1e-6 64 80 0 0 0 0 1 133 89 471 0 64 93 94 0 +93 0
+ -.2 -.0032 .2 -.2 -.0032 0 .2 137 255 93 472 0 1 85 89 95 +96 97 0 ?137 94 470
+ 0 1 89 66 98 +5 99 0 ?133 66 469 0 48 94 100 0 +94 .2 -.2 -.0032 0 -.2 -.0032 0
+ .2 141 255 98 66 98 98 94 134 255 99 0 0 0 0 0 0 +101 102 136 255 101 1 2 2 2 1
+ FFF1 103 104 105 135 255 102 2 0 45 255 4 103 .2 0 0 0 127 255 2 104 2 2 128 25
+5 2 105 0 .2 137 100 468 0 1 66 106 107 +17 108 0 ?133 106 467 0 52 100 109 0 +1
+00 .2 -.2 0 .2 0 0 -2755455298081545e-32 .2 141 107 106 107 107 100 50 17 432 0
+ 110 111 5 112 +0 -.2 0 0 0 1 1 0 0 134 108 0 0 0 0 0 0 +113 114 136 113 1 2 2 2
+ 1 FFF1 115 116 117 135 114 2 0 45 4 115 .2 -2755455298081545e-32 .2 .2 127 2 11
+6 2 2 128 2 117 -2755455298081545e-32 .2 14 255 110 397 118 ?90 82 51 119 17 +0
+ 0 16 120 24 50 111 433 0 120 121 17 122 +0 0 0 1 0 0 0 -1 0 141 112 123 124 125
+ 17 137 123 444 0 1 70 126 127 +17 128 0 ?141 124 129 130 112 17 141 125 78 112
+ 130 17 137 78 456 0 1 62 131 132 +17 133 0 ?141 130 100 125 124 17 133 131 455
+ 0 134 78 135 0 +78 .2 0 0 -971445146547012e-31 0 0 0 .2 141 132 131 132 132 78
+ 134 133 0 0 0 0 0 0 +136 137 136 136 1 2 2 2 1 FFF1 138 139 140 135 137 2 0 45
+ 4 138 .2 .2 -971445146547012e-31 .2 127 2 139 2 2 128 2 140 0 .2 17 134 0 51 45
+ 52 141 142 143 131 144 -137 135 452 0 1 131 145 146 +111 147 0 ?133 145 451 0 1
+48 135 149 0 +135 0 0 0 0 0 -.0032 0 .0032 141 146 145 146 146 135 134 147 0 0 0
+ 0 0 0 +150 151 136 150 1 2 2 2 1 FFF1 152 153 154 135 151 2 0 45 4 152 0 0 0 .0
+032 127 2 153 2 2 128 2 154 0 .0032 17 148 0 155 67 144 156 157 158 145 19 +137
+ 149 446 0 1 145 70 159 +5 160 0 ?133 70 445 0 59 149 123 0 +149 -97144514654701
+2e-31 0 -.0032 .2 0 -.0032 0 .2 141 159 70 159 159 149 134 160 0 0 0 0 0 0 +161
+ 162 136 161 1 2 2 2 1 FFF1 163 164 165 135 162 2 0 45 4 163 -971445146547012e-3
+1 .2 .2 .2 127 2 164 2 2 128 2 165 0 .2 15 155 396 0 67 120 0 17 67 0 155 91 148
+ 46 19 166 167 88 +17 144 0 155 148 91 141 45 168 169 25 -18 156 30 0 148 40 141
+ 170 1e-6 1 17 157 0 171 35 172 141 173 158 174 0 -16 158 36 0 1e-6 148 175 143
+ 0 0 0 1 17 19 0 58 59 48 156 67 166 6 68 -16 166 412 0 1e-6 67 168 75 0 0 0 1 1
+7 68 0 176 36 74 156 177 69 178 172 -15 176 58 0 36 179 0 17 36 0 176 180 68 28
+ 172 26 181 182 -17 74 0 176 68 180 49 183 175 184 185 -17 177 0 186 187 173 49
+ 59 69 188 0 +16 69 29 0 1e-6 59 189 168 0 0 0 1 133 178 210 0 68 190 191 0 +190
+ .2 0 -.0032 0 0 -.0032 0 .2 17 172 0 171 157 182 156 36 26 192 0 +15 171 52 0 1
+72 193 0 17 182 0 171 172 35 28 194 195 196 197 +16 26 53 0 1e-6 172 9 33 0 0 0
+ 1 133 192 350 0 172 198 199 0 +198 0 .2 -.0032 0 0 -.0032 0 .2 137 198 348 0 1
+ 200 192 201 +202 203 0 ?137 199 352 0 1 192 181 204 +205 206 0 ?133 181 354 0 3
+6 199 207 0 +199 0 0 -.0032 0 .2 -.0032 0 .2 141 204 181 204 204 199 50 205 133
+ 0 179 208 96 209 +0 0 -.0032 0 0 1 1 0 0 134 206 0 0 0 0 0 0 +210 211 136 210 1
+ 2 2 2 1 FFF1 212 213 214 135 211 2 0 45 4 212 0 0 0 .2 127 2 213 2 2 128 2 214
+ 0 .2 14 179 57 12 ?215 216 176 217 205 -0 0 0 216 24 50 208 126 0 216 202 205 2
+18 +0 0 0 0 0 1 1 0 0 50 96 436 0 90 205 121 219 +0 -.2 0 0 1 0 1 0 0 141 209 19
+9 220 221 205 141 220 190 222 209 205 141 221 223 209 222 205 137 223 316 0 1 22
+4 225 226 +205 227 0 ?141 222 228 221 220 205 137 228 262 0 1 229 184 230 +205 2
+31 0 ?133 229 260 0 183 232 228 0 +232 .2 -551091059616309e-31 -.0032 .2 .2 -.00
+32 -2755455298081545e-32 .2 133 184 264 0 74 228 233 0 +228 .2 .2 -.0032 .2 -275
+5455298081545e-32 -.0032 -2755455298081545e-32 .2 141 230 184 230 230 228 134 23
+1 0 0 0 0 0 0 +234 235 136 234 1 2 2 2 1 FFF1 236 237 238 135 235 2 0 45 4 236 .
+2 .2 .2 -2755455298081545e-32 127 2 237 2 2 128 2 238 -2755455298081545e-32 .2 1
+37 233 276 0 1 184 34 239 +208 240 0 ?133 34 278 0 27 233 241 0 +233 .2 .2 0 -97
+1445146547012e-31 .2 0 0 .2 141 239 34 239 239 233 134 240 0 0 0 0 0 0 +242 243
+ 136 242 1 2 2 2 1 FFF1 244 245 246 135 243 2 0 45 4 244 .2 .2 -971445146547012e
+-31 .2 127 2 245 2 2 128 2 246 0 .2 137 241 280 0 1 34 247 248 +249 250 0 ?133 2
+47 282 0 32 241 251 0 +241 -832667268468867e-31 .2 0 .2 .2 0 0 .2 141 248 247 24
+8 248 241 50 249 112 0 252 253 202 254 +.2 .2 0 0 -1 0 -1 0 0 134 250 0 0 0 0 0
+ 0 +255 256 136 255 1 2 2 2 1 FFF1 257 258 259 135 256 2 0 45 4 257 .2 0 0 0 127
+ 2 258 2 2 128 2 259 0 .2 14 252 44 260 ?193 261 262 217 249 -0 0 193 261 24 50
+ 253 105 0 261 263 249 264 +.2 -2755455298081545e-32 0 -1 0 0 0 1 0 50 202 119 0
+ 193 249 208 265 +0 .2 0 1 0 0 0 -1 0 141 254 266 267 268 249 137 266 312 0 1 26
+9 224 270 +249 271 0 ?141 267 272 273 254 249 141 268 274 254 273 249 137 274 29
+8 0 1 196 269 275 +249 276 0 ?141 273 241 268 267 249 133 196 296 0 182 251 274
+ 0 +251 0 .2 0 0 .2 -.0032 0 .0032 133 269 300 0 194 274 266 0 +274 -83266726846
+8867e-31 .2 -.0032 -832667268468867e-31 .2 0 0 .0032 141 275 269 275 275 274 134
+ 276 0 0 0 0 0 0 +277 278 136 277 1 2 2 2 1 FFF1 279 280 281 135 278 2 0 45 4 27
+9 .2 .0032 .2 0 127 2 280 2 2 128 2 281 0 .0032 17 194 0 262 32 197 10 182 195 2
+69 0 -15 262 45 0 197 252 0 17 32 0 262 282 194 37 27 33 247 283 -17 197 0 262 1
+94 282 28 180 284 224 0 +16 195 48 0 1e-6 182 33 284 0 0 0 1 16 33 50 0 1e-6 27
+ 26 195 0 0 0 1 16 284 46 0 1e-6 197 195 285 0 0 0 1 16 285 43 0 1e-6 31 284 286
+ 0 0 0 1 17 31 0 30 27 287 37 288 285 289 32 +16 286 41 0 1e-6 282 285 175 0 0 0
+ 1 17 282 0 262 197 32 40 283 286 290 183 +16 175 39 0 1e-6 183 286 158 0 0 0 1
+ 17 183 0 291 283 185 40 74 175 229 0 +15 291 38 0 183 261 0 17 283 0 291 288 18
+3 37 282 286 292 0 -17 185 0 291 183 288 49 72 189 293 0 +18 40 40 0 180 37 156
+ 39 1e-6 1 17 180 0 176 74 36 40 197 284 225 282 -18 37 42 0 31 28 40 41 1e-6 1
+ 29 41 90 0 37 294 39 .2 .2 0 29 294 89 0 49 295 41 .2 -183697019872103e-31 -.00
+32 18 49 31 0 59 296 46 294 1e-6 1 29 295 88 0 296 170 294 .2 -183697019872103e-
+31 0 18 296 33 0 72 141 49 295 1e-6 1 29 170 87 0 156 297 295 0 0 -.0032 29 297
+ 86 0 141 0 170 0 0 0 18 141 35 0 134 156 296 297 1e-6 1 17 72 0 71 56 60 296 18
+7 189 298 52 -17 187 0 186 142 177 296 185 189 299 0 -16 189 32 0 1e-6 185 143 6
+9 0 0 0 1 133 298 461 0 72 300 301 0 +300 .2 0 -.0032 .2 0 0 0 .0032 17 52 0 51
+ 134 50 296 56 75 106 287 +15 51 402 0 50 110 0 16 75 416 0 1e-6 52 166 61 0 0 0
+ 1 17 287 0 30 31 25 296 134 143 302 288 +15 30 56 0 287 216 0 17 25 0 30 287 27
+ 141 35 9 303 157 +16 143 34 0 1e-6 287 158 189 0 0 0 1 133 302 170 0 287 304 30
+5 0 +304 0 0 0 .2 0 0 0 .2 17 288 0 291 185 283 296 31 285 306 0 -133 306 228 0
+ 288 307 272 0 +307 .2 .2 0 .2 -551091059616309e-31 0 -2755455298081545e-32 .2 1
+37 307 226 0 1 289 306 308 +253 309 0 ?137 272 240 0 1 306 290 310 +249 311 0 ?1
+33 290 242 0 282 272 312 0 +272 .2 .2 0 .2 .2 -.0032 0 .0032 141 310 290 310 310
+ 272 134 311 0 0 0 0 0 0 +313 314 136 313 1 2 2 2 1 FFF1 315 316 317 135 314 2 0
+ 45 4 315 0 0 0 .0032 127 2 316 2 2 128 2 317 0 .0032 137 312 244 0 1 290 292 31
+8 +253 319 0 ?133 292 246 0 283 312 232 0 +312 .2 .2 -.0032 .2 .2 0 0 .0032 141
+ 318 292 318 318 312 134 319 0 0 0 0 0 0 +320 321 136 320 1 2 2 2 1 FFF1 322 323
+ 324 135 321 2 0 45 4 322 .2 .0032 .2 0 127 2 323 2 2 128 2 324 0 .0032 137 232
+ 258 0 1 292 229 325 +253 326 0 ?141 325 229 325 325 232 134 326 0 0 0 0 0 0 +32
+7 328 136 327 1 2 2 2 1 FFF1 329 330 331 135 328 2 0 45 4 329 -2755455298081545e
+-32 .0032 .2 .0032 127 2 330 2 2 128 2 331 -2755455298081545e-32 .2 133 289 224
+ 0 31 191 307 0 +191 .2 -2755455298081545e-32 0 .2 .2 0 -2755455298081545e-32 .2
+ 141 308 306 308 308 307 134 309 0 0 0 0 0 0 +332 333 136 332 1 2 2 2 1 FFF1 334
+ 335 336 135 333 2 0 45 4 334 .2 0 -2755455298081545e-32 0 127 2 335 2 2 128 2 3
+36 -2755455298081545e-32 .2 137 191 222 0 1 178 289 337 +208 338 0 ?141 337 289
+ 337 337 191 134 338 0 0 0 0 0 0 +339 340 136 339 1 2 2 2 1 FFF1 341 342 343 135
+ 340 2 0 45 4 341 .2 -2755455298081545e-32 .2 .2 127 2 342 2 2 128 2 343 -275545
+5298081545e-32 .2 137 304 168 0 1 174 302 344 +208 345 0 ?137 305 172 0 1 302 34
+6 347 +263 348 0 ?133 346 174 0 142 305 349 0 +305 .2 0 0 0 0 0 0 .2 141 347 346
+ 347 347 305 50 263 94 0 215 0 253 350 +0 0 0 0 1 0 1 0 0 134 348 0 0 0 0 0 0 +3
+51 352 136 351 1 2 2 2 1 FFF1 353 354 355 135 352 2 0 45 4 353 .2 0 0 0 127 2 35
+4 2 2 128 2 355 0 .2 14 215 27 356 ?0 179 186 217 263 -0 0 0 0 119 141 350 357 3
+58 359 263 137 357 204 0 1 299 188 360 +263 361 0 ?141 358 362 363 350 263 141 3
+59 364 350 363 263 137 364 190 0 1 293 299 365 +263 366 0 ?141 363 305 359 358 2
+63 133 293 188 0 185 349 364 0 +349 .2 -2755455298081545e-32 0 .2 -2755455298081
+545e-32 -.0032 0 .0032 133 299 192 0 187 364 357 0 +364 .2 0 -.0032 .2 0 0 0 .00
+32 141 365 299 365 365 364 134 366 0 0 0 0 0 0 +367 368 136 367 1 2 2 2 1 FFF1 3
+69 370 371 135 368 2 0 45 4 369 .2 .0032 .2 0 127 2 370 2 2 128 2 371 0 .0032 13
+7 349 186 0 1 346 293 372 +253 373 0 ?141 372 293 372 372 349 134 373 0 0 0 0 0
+ 0 +374 375 136 374 1 2 2 2 1 FFF1 376 377 378 135 375 2 0 45 4 376 0 0 0 .0032
+ 127 2 377 2 2 128 2 378 0 .0032 137 362 150 0 1 0 379 380 +263 381 0 ?133 379 1
+52 0 173 362 382 0 +362 0 0 0 0 0 -.0032 0 .0032 141 380 379 380 380 362 134 381
+ 0 0 0 0 0 0 +383 384 136 383 1 2 2 2 1 FFF1 385 386 387 135 384 2 0 45 4 385 0
+ 0 0 .0032 127 2 386 2 2 128 2 387 0 .0032 17 173 0 186 177 142 156 148 158 379
+ 0 +137 382 154 0 1 379 174 388 +202 389 0 ?133 174 156 0 157 382 304 0 +382 0 0
+ -.0032 0 0 0 0 .0032 141 388 174 388 388 382 134 389 0 0 0 0 0 0 +390 391 136 3
+90 1 2 2 2 1 FFF1 392 393 394 135 391 2 0 45 4 392 .2 .0032 .2 0 127 2 393 2 2 1
+28 2 394 0 .0032 15 186 28 0 177 215 0 17 142 0 186 173 187 141 287 143 346 0 -1
+33 188 206 0 177 357 190 0 +357 0 0 -.0032 .2 0 -.0032 0 .2 141 360 188 360 360
+ 357 134 361 0 0 0 0 0 0 +395 396 136 395 1 2 2 2 1 FFF1 397 398 399 135 396 2 0
+ 45 4 397 0 .0032 .2 .0032 127 2 398 2 2 128 2 399 0 .2 137 190 208 0 1 188 178
+ 400 +205 401 0 ?141 400 178 400 400 190 134 401 0 0 0 0 0 0 +402 403 136 402 1
+ 2 2 2 1 FFF1 404 405 406 135 403 2 0 45 4 404 .2 0 0 0 127 2 405 2 2 128 2 406
+ 0 .2 81 1 356 103 11 215 407 0 0 408 409 13 255 217 61 0 0 0 261 0 0 23 0 13 11
+9 496 0 0 0 82 0 0 410 215 14 82 383 411 ?110 0 71 119 121 -0 0 120 90 24 19 410
+ 410 0 1 0 23 119 S0 19 23 60 0 1 410 8 217 S0 81 1 411 385 11 82 412 0 13 413 4
+14 50 121 435 0 82 96 111 415 +.2 -.2 0 -1 0 0 0 1 0 14 120 391 413 ?0 16 155 11
+9 111 -0 0 110 82 24 14 90 377 13 ?16 110 84 119 96 -0 0 82 0 24 13 24 375 0 0 0
+ 0 0 0 8 90 81 1 13 379 11 90 416 0 2 411 417 14 16 403 418 ?120 90 58 119 5 -0
+ 0 261 110 24 81 1 418 405 11 16 419 0 118 0 420 14 261 37 408 ?252 0 291 217 25
+3 -0 0 252 16 24 81 1 408 110 11 261 421 0 356 260 422 80 255 1 11 423 424 8017
+ 0 0 0 0 0 0 0 0 0 TTTTTTTTTTTTTF3 81 1 421 108 425 261 426 408 407 427 428 81 1
+ 260 117 11 252 427 0 408 429 430 84 255 5 422 Pad.181 1 427 115 425 252 431 260
+ 421 432 433 81 1 429 124 11 193 432 0 260 434 435 84 5 430 Pad.114 193 51 429 ?
+216 252 171 217 202 -0 0 216 252 24 81 1 432 122 425 193 436 429 427 437 438 81
+ 1 434 131 11 216 437 0 429 12 439 84 5 435 Pad.114 216 55 434 ?179 193 30 217 2
+08 +0 0 179 193 24 81 1 437 129 425 216 440 434 432 441 442 81 1 12 138 11 179 4
+41 0 434 2 443 84 5 439 Pad.181 1 441 136 425 179 444 12 437 416 445 84 5 443 Pa
+d.180 1 425 446 447 8015 0 0 0 0 3 5 0 0 0 FFFFTFFFFFFFFF2 81 1 444 134 448 179
+ 0 441 440 449 450 81 1 416 380 425 90 449 13 441 412 451 83 255 1 445 .30196078
+43137255 81 1 449 381 448 90 0 416 444 452 453 81 1 412 386 425 82 452 411 416 4
+54 455 83 1 451 .3019607843137255 81 1 452 387 448 82 0 412 449 456 457 81 1 454
+ 394 425 120 456 413 412 458 459 83 1 455 .3019607843137255 81 1 456 395 448 120
+ 0 454 452 460 461 81 1 413 393 11 120 454 0 411 118 462 81 1 458 400 425 110 46
+0 118 454 419 463 83 1 459 .3019607843137255 81 1 460 401 448 110 0 458 456 464
+ 465 81 1 118 399 11 110 458 0 413 418 466 81 1 419 406 425 16 464 418 458 0 467
+ 83 1 463 .3019607843137255 81 1 464 407 448 16 0 419 460 0 468 83 1 467 .301960
+7843137255 80 1 448 0 469 8001 0 0 0 0 3 5 0 0 0 FFFFTFTFFFFFFF2 83 3 468 .82352
+9422283173 .823529422283173 1 79 255 15 469 SDL/TYSA_COLOUR84 5 466 Pad.183 3 46
+5 .823529422283173 .823529422283173 1 84 5 462 Pad.183 3 461 .823529422283173 .8
+23529422283173 1 83 3 457 .823529422283173 .823529422283173 1 83 3 453 .82352942
+2283173 .823529422283173 1 81 1 440 127 448 216 0 437 436 444 470 83 3 450 .8235
+29422283173 .823529422283173 1 81 1 436 120 448 193 0 432 431 440 471 83 3 470 .
+823529422283173 .823529422283173 1 81 1 431 113 448 252 0 427 426 436 472 83 3 4
+71 .823529422283173 .823529422283173 1 81 1 426 106 448 261 0 421 473 431 474 83
+ 3 472 .823529422283173 .823529422283173 1 81 1 473 95 448 215 0 407 0 426 475 8
+3 3 474 .823529422283173 .823529422283173 1 81 1 407 101 425 215 473 356 0 421 4
+76 83 3 475 .823529422283173 .823529422283173 1 83 1 476 .3019607843137255 79 21
+ 447 SDL/TYSA_TRANSLUCENCY83 1 442 .3019607843137255 83 1 438 .3019607843137255
+ 83 1 433 .3019607843137255 83 1 428 .3019607843137255 79 13 424 SDL/TYSA_NAME84
+ 5 420 Pad.184 5 417 Pad.1141 415 301 477 478 121 137 301 460 0 1 298 73 479 +12
+1 480 0 ?141 477 86 481 415 121 141 478 300 415 481 121 137 300 462 0 1 83 298 4
+82 +121 483 0 ?141 481 109 478 477 121 137 109 466 0 1 106 83 484 +121 485 0 ?13
+3 83 465 0 56 109 300 0 +109 .2 0 0 .2 -.2 0 -2755455298081545e-32 .2 141 484 83
+ 484 484 109 134 485 0 0 0 0 0 0 +486 487 136 486 1 2 2 2 1 FFF1 488 489 490 135
+ 487 2 0 45 4 488 .2 0 -2755455298081545e-32 0 127 2 489 2 2 128 2 490 -27554552
+98081545e-32 .2 141 482 298 482 482 300 134 483 0 0 0 0 0 0 +491 492 136 491 1 2
+ 2 2 1 FFF1 493 494 495 135 492 2 0 45 4 493 .2 .0032 .2 0 127 2 494 2 2 128 2 4
+95 0 .0032 137 86 476 0 1 496 81 497 +121 498 0 ?133 496 477 0 53 499 86 0 +499
+ .2 -.2 0 0 -.2 0 0 .2 141 497 81 497 497 86 134 498 0 0 0 0 0 0 +500 501 136 50
+0 1 2 2 2 1 FFF1 502 503 504 135 501 2 0 45 4 502 0 0 0 .0032 127 2 503 2 2 128
+ 2 504 0 .0032 17 53 0 84 88 79 43 50 54 496 0 -137 499 478 0 1 55 496 505 +96 5
+06 0 ?133 55 479 0 50 129 499 0 +129 0 -.2 0 .2 -.2 0 0 .2 141 505 496 505 505 4
+99 134 506 0 0 0 0 0 0 +507 508 136 507 1 2 2 2 1 FFF1 509 510 511 135 508 2 0 4
+5 4 509 .2 0 0 0 127 2 510 2 2 128 2 511 0 .2 137 129 480 0 1 512 55 513 +17 514
+ 0 ?133 512 481 0 91 515 129 0 +515 0 -.2 -.0032 0 -.2 0 0 .0032 141 513 55 513
+ 513 129 134 514 0 0 0 0 0 0 +516 517 136 516 1 2 2 2 1 FFF1 518 519 520 135 517
+ 2 0 45 4 518 0 0 .2 0 127 2 519 2 2 128 2 520 0 .2 17 91 0 155 144 67 43 88 76
+ 512 53 -137 515 482 0 1 92 512 521 +111 522 0 ?133 92 483 0 88 207 515 0 +207 0
+ -.2 0 0 -.2 -.0032 0 .0032 141 521 512 521 521 515 134 522 0 0 0 0 0 0 +523 524
+ 136 523 1 2 2 2 1 FFF1 525 526 527 135 524 2 0 45 4 525 .2 .0032 .2 0 127 2 526
+ 2 2 128 2 527 0 .0032 137 207 484 0 1 181 92 528 +96 529 0 ?141 528 92 528 528
+ 207 134 529 0 0 0 0 0 0 +530 531 136 530 1 2 2 2 1 FFF1 532 533 534 135 531 2 0
+ 45 4 532 0 0 0 .0032 127 2 533 2 2 128 2 534 0 .0032 16 76 419 0 1e-6 88 61 54
+ 0 0 0 1 16 54 420 0 1e-6 50 76 80 0 0 0 1 133 73 459 0 60 301 77 0 +301 .2 -.2
+ -.0032 .2 0 -.0032 -2755455298081545e-32 .2 141 479 73 479 479 301 134 480 0 0
+ 0 0 0 0 +535 536 136 535 1 2 2 2 1 FFF1 537 538 539 135 536 2 0 45 4 537 -27554
+55298081545e-32 .0032 .2 .0032 127 2 538 2 2 128 2 539 -2755455298081545e-32 .2
+ 137 77 458 0 1 73 62 540 +5 541 0 ?141 540 62 540 540 77 134 541 0 0 0 0 0 0 +5
+42 543 136 542 1 2 2 2 1 FFF1 544 545 546 135 543 2 0 45 4 544 .2 .2 .2 -2755455
+298081545e-32 127 2 545 2 2 128 2 546 -2755455298081545e-32 .2 84 5 414 Pad.184
+ 5 409 Pad.1141 344 302 344 344 304 134 345 0 0 0 0 0 0 +547 548 136 547 1 2 2 2
+ 1 FFF1 549 550 551 135 548 2 0 45 4 549 0 0 .2 0 127 2 550 2 2 128 2 551 0 .2 1
+7 35 0 171 182 157 10 25 9 200 194 -133 303 332 0 25 552 553 0 +552 0 .2 0 0 0 0
+ 0 .2 137 552 330 0 1 225 303 554 +208 555 0 ?137 553 334 0 1 303 200 556 +202 5
+57 0 ?133 200 336 0 35 553 198 0 +553 0 0 0 0 .2 0 0 .2 141 556 200 556 556 553
+ 134 557 0 0 0 0 0 0 +558 559 136 558 1 2 2 2 1 FFF1 560 561 562 135 559 2 0 45
+ 4 560 .2 0 0 0 127 2 561 2 2 128 2 562 0 .2 133 225 318 0 180 223 552 0 +223 -9
+71445146547012e-31 .2 -.0032 .2 .2 -.0032 0 .2 141 554 303 554 554 552 134 555 0
+ 0 0 0 0 0 +563 564 136 563 1 2 2 2 1 FFF1 565 566 567 135 564 2 0 45 4 565 0 .2
+ 0 0 127 2 566 2 2 128 2 567 0 .2 133 224 314 0 197 266 223 0 +266 .2 .2 -.0032
+ -832667268468867e-31 .2 -.0032 0 .2 137 251 294 0 1 247 196 568 +202 569 0 ?141
+ 568 196 568 568 251 134 569 0 0 0 0 0 0 +570 571 136 570 1 2 2 2 1 FFF1 572 573
+ 574 135 571 2 0 45 4 572 0 0 0 .0032 127 2 573 2 2 128 2 574 0 .0032 141 270 22
+4 270 270 266 134 271 0 0 0 0 0 0 +575 576 136 575 1 2 2 2 1 FFF1 577 578 579 13
+5 576 2 0 45 4 577 0 .0032 .2 .0032 127 2 578 2 2 128 2 579 0 .2 141 265 198 580
+ 581 202 141 580 382 582 265 202 141 581 553 265 582 202 141 582 251 581 580 202
+ 141 264 232 583 584 253 141 583 349 585 264 253 141 584 312 264 585 253 141 585
+ 307 584 583 253 141 226 225 226 226 223 134 227 0 0 0 0 0 0 +586 587 136 586 1
+ 2 2 2 1 FFF1 588 589 590 135 587 2 0 45 4 588 -971445146547012e-31 .2 .2 .2 127
+ 2 589 2 2 128 2 590 0 .2 141 219 93 591 592 96 141 591 207 593 219 96 141 592 8
+7 219 593 96 137 87 474 0 1 81 85 594 +96 595 0 ?141 593 499 592 591 96 133 85 4
+73 0 79 87 93 0 +87 .2 -.2 -.0032 .2 -.2 0 0 .0032 141 594 85 594 594 87 134 595
+ 0 0 0 0 0 0 +596 597 136 596 1 2 2 2 1 FFF1 598 599 600 135 597 2 0 45 4 598 .2
+ .0032 .2 0 127 2 599 2 2 128 2 600 0 .0032 141 218 552 601 602 208 141 601 304
+ 603 218 208 141 602 233 218 603 208 141 603 191 602 601 208 141 201 192 201 201
+ 198 134 203 0 0 0 0 0 0 +604 605 136 604 1 2 2 2 1 FFF1 606 607 608 135 605 2 0
+ 45 4 606 0 .0032 .2 .0032 127 2 607 2 2 128 2 608 0 .2 16 168 411 0 1e-6 45 69
+ 166 0 0 0 1 17 45 0 51 50 134 43 144 168 126 91 +133 126 443 0 45 123 609 0 +12
+3 0 0 0 0 -.2 0 0 .2 137 609 442 0 1 126 169 610 +111 611 0 ?133 169 441 0 144 6
+09 612 0 +609 0 -.2 0 0 0 0 0 .2 141 610 169 610 610 609 134 611 0 0 0 0 0 0 +61
+3 614 136 613 1 2 2 2 1 FFF1 615 616 617 135 614 2 0 45 4 615 .2 0 0 0 127 2 616
+ 2 2 128 2 617 0 .2 137 612 440 0 1 169 167 618 +111 619 0 ?133 167 439 0 67 612
+ 20 0 +612 0 0 -.0032 0 -.2 -.0032 0 .2 141 618 167 618 618 612 134 619 0 0 0 0
+ 0 0 +620 621 136 620 1 2 2 2 1 FFF1 622 623 624 135 621 2 0 45 4 622 0 .0032 .2
+ .0032 127 2 623 2 2 128 2 624 0 .2 137 20 438 0 1 167 6 625 +5 626 0 ?141 625 6
+ 625 625 20 134 626 0 0 0 0 0 0 +627 628 136 627 1 2 2 2 1 FFF1 629 630 631 135
+ 628 2 0 45 4 629 0 0 0 .2 127 2 630 2 2 128 2 631 0 .2 141 127 126 127 127 123
+ 134 128 0 0 0 0 0 0 +632 633 136 632 1 2 2 2 1 FFF1 634 635 636 135 633 2 0 45
+ 4 634 0 .2 0 0 127 2 635 2 2 128 2 636 0 .2 141 122 612 637 638 111 141 637 515
+ 639 122 111 141 638 609 122 639 111 141 639 135 638 637 111 141 95 89 95 95 93
+ 134 97 0 0 0 0 0 0 +640 641 136 640 1 2 2 2 1 FFF1 642 643 644 135 641 2 0 45 4
+ 642 0 .0032 .2 .0032 127 2 643 2 2 128 2 644 0 .2 141 18 20 645 646 5 141 645 9
+4 647 18 5 141 646 149 18 647 5 141 647 77 646 645 5 74 4 CI16 index_map_offset0
+ 0 1 dCCZ20 15 3 0 0 464 419 418 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 84 9 14 LWR P
+LATE1 0 
diff --git a/contrib/Salome/CMakeLists.txt b/contrib/Salome/CMakeLists.txt
index a5c323f..f392f85 100644
--- a/contrib/Salome/CMakeLists.txt
+++ b/contrib/Salome/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/bamg/CMakeLists.txt b/contrib/bamg/CMakeLists.txt
index 1421bc5..3c0d04d 100644
--- a/contrib/bamg/CMakeLists.txt
+++ b/contrib/bamg/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/bamg/bamglib/Mesh2.h b/contrib/bamg/bamglib/Mesh2.h
index 879843d..ebf1e45 100644
--- a/contrib/bamg/bamglib/Mesh2.h
+++ b/contrib/bamg/bamglib/Mesh2.h
@@ -1265,9 +1265,8 @@ inline Real4 qualite(const Vertex &va,const Vertex &vb,const Vertex &vc)
 
 inline  Triangle::Triangle(Triangles *Th,Int4 i,Int4 j,Int4 k) {
   Vertex *v=Th->vertices;
-  Int4 nbv = Th->nbv;
   assert(i >=0 && j >=0 && k >=0);
-  assert(i < nbv && j < nbv && k < nbv);
+  assert(i < Th->nbv && j < Th->nbv && k < Th->nbv);
   ns[0]=v+i;
   ns[1]=v+j;
   ns[2]=v+k;
diff --git a/contrib/blossom/CMakeLists.txt b/contrib/blossom/CMakeLists.txt
index 101fdc6..0b290e5 100644
--- a/contrib/blossom/CMakeLists.txt
+++ b/contrib/blossom/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/gmm/gmm_blas.h b/contrib/gmm/gmm_blas.h
index f320ea0..d239b8d 100644
--- a/contrib/gmm/gmm_blas.h
+++ b/contrib/gmm/gmm_blas.h
@@ -1242,8 +1242,8 @@ namespace gmm {
 
   template <typename L1, typename L2> inline
     void add_spec(const L1& l1, L2& l2, abstract_matrix) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    GMM_ASSERT2(m==mat_nrows(l2) && n==mat_ncols(l2), "dimensions mismatch");
+    GMM_ASSERT2(mat_nrows(l1)==mat_nrows(l2) &&
+                mat_ncols(l1)==mat_ncols(l2), "dimensions mismatch");
     add(l1, l2, typename linalg_traits<L1>::sub_orientation(),
 	typename linalg_traits<L2>::sub_orientation());
   }
@@ -1933,9 +1933,11 @@ namespace gmm {
   template <typename L1, typename L2, typename L3>
   void mult_dispatch(const L1& l1, const L2& l2, L3& l3, abstract_matrix) {
     typedef typename temporary_matrix<L3>::matrix_type temp_mat_type;
-    size_type m = mat_nrows(l1), n = mat_ncols(l1), k = mat_ncols(l2);
+    size_type n = mat_ncols(l1);
     if (n == 0) { gmm::clear(l3); return; }
-    GMM_ASSERT2(n == mat_nrows(l2) && m == mat_nrows(l3) && k == mat_ncols(l3),
+    GMM_ASSERT2(n == mat_nrows(l2) &&
+                mat_nrows(l1) == mat_nrows(l3) &&
+                mat_ncols(l2) == mat_ncols(l3),
 		"dimensions mismatch");
 
     if (same_origin(l2, l3) || same_origin(l1, l3)) {
diff --git a/contrib/kbipack/CMakeLists.txt b/contrib/kbipack/CMakeLists.txt
index 3a1cfce..52dbf95 100644
--- a/contrib/kbipack/CMakeLists.txt
+++ b/contrib/kbipack/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/mmg3d/CMakeLists.txt b/contrib/mmg3d/CMakeLists.txt
index 85523e9..e69ed90 100644
--- a/contrib/mmg3d/CMakeLists.txt
+++ b/contrib/mmg3d/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/mobile/Android/AndroidManifest.xml b/contrib/mobile/Android/AndroidManifest.xml
index 6d55282..2b76786 100644
--- a/contrib/mobile/Android/AndroidManifest.xml
+++ b/contrib/mobile/Android/AndroidManifest.xml
@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="org.geuz.onelab"
-          android:versionCode="5"
-          android:versionName="1.0.6"
+          android:versionCode="10"
+          android:versionName="1.0.11"
           android:installLocation="auto" >
   
   <uses-sdk android:minSdkVersion="14"
@@ -16,7 +16,8 @@
                android:logo="@drawable/ic_launcher"
                android:allowBackup="true" >
     <activity android:name=".SplashScreen"
-              android:label="@string/title_activity_main">
+              android:label="@string/title_activity_main"
+              android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
       <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
diff --git a/contrib/mobile/Android/res/layout/fragment_postprocessing.xml b/contrib/mobile/Android/res/layout/fragment_postprocessing.xml
index 5264110..20d5adc 100644
--- a/contrib/mobile/Android/res/layout/fragment_postprocessing.xml
+++ b/contrib/mobile/Android/res/layout/fragment_postprocessing.xml
@@ -1,38 +1,33 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:padding="15dp" >
-    
-    <TextView
-        android:layout_width="match_parent"
-	    android:layout_height="wrap_content"
-        android:text="@string/postpro_intervalstype" />
-	<Spinner
-	    android:id="@+id/intervals_type"
-	    android:layout_width="match_parent"
-	    android:layout_height="wrap_content" />
-	
-	<TextView
-	    android:layout_width="match_parent"
-	    android:layout_height="wrap_content"
-        android:text="@string/postpro_intervals" />
-	<EditText 
-	    android:id="@+id/intervals"
-	    android:layout_width="match_parent"
-	    android:layout_height="wrap_content"
-	    android:inputType="number"
-	    android:digits="0123456789" />
-	
-	<TextView
-	    android:layout_width="match_parent"
-	    android:layout_height="wrap_content"
-        android:text="@string/postpro_raisez" />
-	<SeekBar 
-	    android:id="@+id/raisez"
-	    android:layout_width="match_parent"
-	    android:layout_height="wrap_content"
-	    android:max="5" />
-
-</LinearLayout>
\ No newline at end of file
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:orientation="vertical"
+              android:padding="15dp" >
+  <TextView
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:text="@string/postpro_intervalstype" />
+  <Spinner
+      android:id="@+id/intervals_type"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content" />
+  <TextView
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:text="@string/postpro_intervals" />
+  <SeekBar 
+      android:id="@+id/intervals"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:max="100" />
+  <TextView
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:text="@string/postpro_raisez" />
+  <SeekBar 
+      android:id="@+id/raisez"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:max="100" />
+</LinearLayout>
diff --git a/contrib/mobile/Android/res/layout/splash.xml b/contrib/mobile/Android/res/layout/splash.xml
index 4091ae1..18ce462 100644
--- a/contrib/mobile/Android/res/layout/splash.xml
+++ b/contrib/mobile/Android/res/layout/splash.xml
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent" >
+                android:layout_height="match_parent" 
+                android:background="@color/black">
   <ImageView android:id="@+id/splashImage"
              android:layout_centerInParent="true"
              android:layout_width="wrap_content"
diff --git a/contrib/mobile/Android/res/values/colors.xml b/contrib/mobile/Android/res/values/colors.xml
new file mode 100644
index 0000000..4dd3366
--- /dev/null
+++ b/contrib/mobile/Android/res/values/colors.xml
@@ -0,0 +1,3 @@
+<resources>
+  <color name="black">#ff000000</color>
+</resources>
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/AboutActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/AboutActivity.java
index 708de71..a65dd0b 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/AboutActivity.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/AboutActivity.java
@@ -9,7 +9,8 @@ import android.webkit.WebView;
 
 public class AboutActivity extends Activity{
 
-    protected void onCreate(android.os.Bundle savedInstanceState) {
+    protected void onCreate(android.os.Bundle savedInstanceState)
+    {
         super.onCreate(savedInstanceState);
         getActionBar().setDisplayHomeAsUpEnabled(true);
         WebView webview = new WebView(this);
@@ -17,19 +18,24 @@ public class AboutActivity extends Activity{
         String aboutGetDP = Gmsh.getAboutGetDP();
         String aboutOnelab = "<p> </p><center><h3>Onelab/Mobile</h3>";
         try {
-            aboutOnelab += "Version "+this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
+            aboutOnelab += "Version " + this.getPackageManager().
+                getPackageInfo(this.getPackageName(), 0).versionName;
         }
         catch (android.content.pm.PackageManager.NameNotFoundException e) {
             aboutOnelab += "Version ?.?.?";
         }
-        aboutOnelab += "<p>Copyright (C) 2014 Christophe Geuzaine and Maxime Graulich, University of Liège</p>";
-        aboutOnelab += "<p>Visit <a href=\"http://onelab.info/\">http://onelab.info/</a> for more information</p>";
+        aboutOnelab += "<p>Copyright (C) 2014-2015 Christophe Geuzaine and Maxime Graulich, ";
+        aboutOnelab += "University of Liège</p>";
+        aboutOnelab += "<p>Visit <a href=\"http://onelab.info/\">http://onelab.info/</a> ";
+        aboutOnelab += "for more information</p>";
         aboutOnelab += "<p> </p><p>This version of Onelab/Mobile contains:</p>";
-        webview.loadDataWithBaseURL("", aboutOnelab + aboutGmsh + aboutGetDP, "text/html", "UTF-8", "");
+        webview.loadDataWithBaseURL("", aboutOnelab + aboutGmsh + aboutGetDP,
+                                    "text/html", "UTF-8", "");
         setContentView(webview);
     }
     @Override
-	public boolean onMenuItemSelected(int featureId, MenuItem item) {
+    public boolean onMenuItemSelected(int featureId, MenuItem item)
+    {
         if(item.getItemId() == android.R.id.home) {
             Intent returnIntent = new Intent();
             this.setResult(RESULT_CANCELED, returnIntent);
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/GLESRender.java b/contrib/mobile/Android/src/org/geuz/onelab/GLESRender.java
index 7016016..b3af710 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/GLESRender.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/GLESRender.java
@@ -27,9 +27,9 @@ public class GLESRender implements Renderer{
     public void scaleModel(float s) { mGModel.scale(s); }
     public void translateModel(float x, float y) { mGModel.translate(x, y); }
     public void resetModelPosition() { mGModel.resetPosition(); }
-    public void viewX() { mGModel.viewX();}
-    public void viewY() { mGModel.viewY();}
-    public void viewZ() { mGModel.viewZ();}
+    public void viewX() { mGModel.viewX(); }
+    public void viewY() { mGModel.viewY(); }
+    public void viewZ() { mGModel.viewZ(); }
 
     // OpenGL ES methods
     public void onDrawFrame(GL10 gl)
@@ -44,8 +44,8 @@ public class GLESRender implements Renderer{
         _height = height;
     }
     public void onSurfaceCreated(GL10 gl, EGLConfig config) { }
-    public void needScreenshot() {_screenshot = null; _needScreenshot = true;}
-    public Bitmap getScreenshot(){return _screenshot;}
+    public void needScreenshot() { _screenshot = null; _needScreenshot = true; }
+    public Bitmap getScreenshot(){ return _screenshot; }
     private void screenshot(GL10 gl)
     {
         _needScreenshot = false;
@@ -54,16 +54,19 @@ public class GLESRender implements Renderer{
         IntBuffer intBuffer = IntBuffer.wrap(bitmapBuffer);
         intBuffer.position(0);
 
-        gl.glReadPixels(0, 0, _width, _height, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, intBuffer);
+        gl.glReadPixels(0, 0, _width, _height, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE,
+                        intBuffer);
         int offset1, offset2;
         for (int i = 0; i < _height; i++) {
             offset1 = i * _width;
             offset2 = (_height - i - 1) * _width;
             for (int j = 0; j < _width; j++) {
                 int pixel = bitmapBuffer[offset1 + j];
-                bitmapSource[offset2 + j] = (pixel & 0xFF00FF00) | (pixel << 16) & 0x00FF0000 | (pixel >> 16) & 0x000000FF;
+                bitmapSource[offset2 + j] = (pixel & 0xFF00FF00) |
+                    (pixel << 16) & 0x00FF0000 | (pixel >> 16) & 0x000000FF;
             }
         }
-        _screenshot = Bitmap.createBitmap(bitmapSource, _width, _height, Bitmap.Config.ARGB_8888);
+        _screenshot = Bitmap.createBitmap(bitmapSource, _width, _height,
+                                          Bitmap.Config.ARGB_8888);
     }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java b/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java
index cf7dc24..3d4b9d4 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java
@@ -5,38 +5,43 @@ import android.os.Parcel;
 import android.os.Parcelable;
 
 public class Gmsh implements Parcelable {
-    /** From C / C++ code **/
+    /** from C/C++ code **/
     static {
         System.loadLibrary("f2cblas");
         System.loadLibrary("f2clapack");
         System.loadLibrary("petsc");
+        System.loadLibrary("slepc");
         System.loadLibrary("Gmsh");
         System.loadLibrary("GetDP");
         System.loadLibrary("Onelab");
     }
-    private native long init(float fontFactor); // Init Gmsh
-    private native void loadFile(long ptr, String name); // load a file(OpenProjet)
-    private native void initView(long ptr, int w, int h); // Called each time the GLView change
-    private native void drawView(long ptr); // Called each time the GLView request a render
+    // init Gmsh
+    private native long init(float fontFactor);
+    // load a file(OpenProjet)
+    private native void loadFile(long ptr, String name);
+    // called each time the GLView changes
+    private native void initView(long ptr, int w, int h);
+    // called each time the GLView requests a render
+    private native void drawView(long ptr);
     private native void eventHandler(long ptr, int event, float x, float y);
-    public native String[] getParams(); // return the parameters for onelab
-    public native int setParam(String type, String name, String value); // change a parameters
-    public native int setStringOption(String category, String name, String value);
-    public native int setDoubleOption(String category, String name, double value);
-    public native int setIntegerOption(String category, String name, int value);
-    public native String getStringOption(String category, String name);
-    public native double getDoubleOption(String category, String name);
-    public native int getIntegerOption(String category, String name);
-    public native String[] getPView(); // get a list of PViews
-    public native void setPView(int position, int intervalsType,int visible,int nbIso, float raisez); // Change options for a PView
-    public native int onelabCB(String action); // Call onelab
-
-    public boolean haveAnimation() {return numberOfAnimation() > 1;}
+    // return the parameters for onelab
+    public native String[] getParams();
+    // change a parameter
+    public native int setParam(String type, String name, String value);
+    // access Gmsh options
+    public native int setStringOption(String category, String name, String value, int index);
+    public native int setDoubleOption(String category, String name, double value, int index);
+    public native int setIntegerOption(String category, String name, int value, int index);
+    public native String getStringOption(String category, String name, int index);
+    public native double getDoubleOption(String category, String name, int index);
+    public native int getIntegerOption(String category, String name, int index);
+    // call onelab
+    public native int onelabCB(String action);
+    public boolean haveAnimation() { return numberOfAnimation() > 1; }
     public native int numberOfAnimation();
     public native int animationNext();
     public native int animationPrev();
     public native void setAnimation(int animation);
-
     public static native String getAboutGmsh();
     public static native String getAboutGetDP();
 
@@ -76,9 +81,9 @@ public class Gmsh implements Parcelable {
     {
         this.eventHandler(ptr, 3, x, y);
     }
-    public void viewX() { this.eventHandler(ptr, 5, 0, 0);}
-    public void viewY() { this.eventHandler(ptr, 6, 0, 0);}
-    public void viewZ() { this.eventHandler(ptr, 7, 0, 0);}
+    public void viewX() { this.eventHandler(ptr, 5, 0, 0); }
+    public void viewY() { this.eventHandler(ptr, 6, 0, 0); }
+    public void viewZ() { this.eventHandler(ptr, 7, 0, 0); }
     public void endEvent(float x, float y)
     {
         this.eventHandler(ptr, 4, x, y);
@@ -87,11 +92,13 @@ public class Gmsh implements Parcelable {
     {
         this.eventHandler(ptr, 10, 0, 0);
     }
-    public void ShowPopup(String message) {
+    public void ShowPopup(String message)
+    {
         if(handler != null)
             handler.obtainMessage(0, message).sendToTarget();
     }
-    public void RequestRender() {
+    public void RequestRender()
+    {
         if(handler != null)
             handler.obtainMessage(1).sendToTarget();
     }
@@ -110,7 +117,7 @@ public class Gmsh implements Parcelable {
     {
         this.ptr = in.readLong();
     }
-    public int describeContents() {return 0;}
+    public int describeContents() { return 0; }
     public void writeToParcel(Parcel out, int flags)
     {
         out.writeLong(this.ptr);
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
index 7648795..5f758e4 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
@@ -30,7 +30,6 @@ import android.view.Window;
 import android.view.WindowManager;
 import android.widget.Toast;
 
-
 public class MainActivity extends Activity{
 
     private Gmsh _gmsh;
@@ -44,9 +43,11 @@ public class MainActivity extends Activity{
     public MainActivity() { }
 
     @Override
-	protected void onCreate(Bundle savedInstanceState) {
+    protected void onCreate(Bundle savedInstanceState)
+    {
         super.onCreate(savedInstanceState);
-        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                             WindowManager.LayoutParams.FLAG_FULLSCREEN);
         getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
         setContentView(R.layout.main_activity_layout);
         _gmsh = new Gmsh(mainHandler, getResources().getDisplayMetrics().density);
@@ -57,7 +58,8 @@ public class MainActivity extends Activity{
         Intent intent = getIntent();
     	Bundle extras = intent.getExtras();
     	if(savedInstanceState != null);
-    	else if(intent.getAction() != null && intent.getAction().equals(Intent.ACTION_VIEW)) {
+    	else if(intent.getAction() != null &&
+                intent.getAction().equals(Intent.ACTION_VIEW)) {
             String tmp = intent.getData().getPath();
             _gmsh.load(tmp);
     	}
@@ -67,31 +69,36 @@ public class MainActivity extends Activity{
             String tmp = extras.getString("file");
             _gmsh.load(tmp);
     	}
-    	else
+    	else{
             this.finish();
+        }
     	_twoPane = (findViewById(R.id.parameter_fragment) != null);
     	_modelFragment = ModelFragment.newInstance(_gmsh);
-        getFragmentManager().beginTransaction().replace(R.id.model_fragment, _modelFragment).commit();
+        getFragmentManager().beginTransaction().replace
+            (R.id.model_fragment, _modelFragment).commit();
     	if(_twoPane) {
             _optionsFragment = OptionsFragment.newInstance(_gmsh);
-            getFragmentManager().beginTransaction().replace(R.id.parameter_fragment, _optionsFragment).commit();
-            _optionsFragment.setOnOptionsChangedListener(new OptionsFragment.OnOptionsChangedListener() {
-
-                    public void OnOptionsChanged() {
-                        _modelFragment.requestRender();
-                    }
-    		});
+            getFragmentManager().beginTransaction().replace
+                (R.id.parameter_fragment, _optionsFragment).commit();
+            _optionsFragment.setOnOptionsChangedListener
+                (new OptionsFragment.OnOptionsChangedListener(){
+                        public void OnOptionsChanged() {
+                            _modelFragment.requestRender();
+                        }
+                    });
     	}
     }
 
     @Override
-	protected void onSaveInstanceState(Bundle outState) {
+    protected void onSaveInstanceState(Bundle outState)
+    {
         outState.putBoolean("Compute", _compute);
         super.onSaveInstanceState(outState);
     }
 
     @Override
-        public boolean onCreateOptionsMenu(Menu menu) {
+    public boolean onCreateOptionsMenu(Menu menu)
+    {
     	super.onCreateOptionsMenu(menu);
     	if(!_twoPane) {
             _switchFragmentMenuItem = menu.add(R.string.menu_parameters);
@@ -103,13 +110,17 @@ public class MainActivity extends Activity{
     	shareMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
         return true;
     }
+
     @Override
-	public boolean onMenuOpened(int featureId, Menu menu) {
+    public boolean onMenuOpened(int featureId, Menu menu)
+    {
         _modelFragment.postDelay();
         return super.onMenuOpened(featureId, menu);
     }
+
     @Override
-        public boolean onMenuItemSelected(int featureId, MenuItem item) {
+    public boolean onMenuItemSelected(int featureId, MenuItem item)
+    {
     	if (item.getTitle().equals(getString(R.string.menu_parameters))) {
             Intent intent = new Intent(this, OptionsActivity.class);
             intent.putExtra("Gmsh", (Parcelable)_gmsh);
@@ -128,10 +139,9 @@ public class MainActivity extends Activity{
     	else if(item.getTitle().equals(getString(R.string.menu_share))) {
             if(this._compute) {
                 AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
-                _errorDialog = dialogBuilder.setTitle("Can't show the model list")
+                _errorDialog = dialogBuilder.setTitle("Cannot show the model list")
                     .setMessage("The computation has to complete before you can take a screenshot")
                     .setPositiveButton("OK", new DialogInterface.OnClickListener() {
-
                             public void onClick(DialogInterface dialog, int which) {
                                 dialog.dismiss();
                             }
@@ -140,7 +150,8 @@ public class MainActivity extends Activity{
             }
             else {
                 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss");
-                File file = new File(this.getExternalFilesDir(null), "onelab-screenshot-"+dateFormat.format(new Date())+".png");
+                File file = new File(this.getExternalFilesDir(null),
+                                     "onelab-screenshot-"+dateFormat.format(new Date())+".png");
                 file.setReadable(true, false);
                 _modelFragment.takeScreenshot(file);
                 Intent shareIntent = new Intent();
@@ -153,10 +164,9 @@ public class MainActivity extends Activity{
         else if(item.getItemId() == android.R.id.home) {
             if(this._compute) {
                 AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
-                _errorDialog = dialogBuilder.setTitle("Can't show the model list")
+                _errorDialog = dialogBuilder.setTitle("Cannot show the model list")
                     .setMessage("The computation has to complete before you can select another model")
                     .setPositiveButton("OK", new DialogInterface.OnClickListener() {
-
                             public void onClick(DialogInterface dialog, int which) {
                                 dialog.dismiss();
                             }
@@ -170,7 +180,8 @@ public class MainActivity extends Activity{
     }
 
     @Override
-	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+    protected void onActivityResult(int requestCode, int resultCode, Intent data)
+    {
         super.onActivityResult(requestCode, resultCode, data);
         switch (requestCode) {
         case 1:
@@ -180,7 +191,8 @@ public class MainActivity extends Activity{
         }
     }
 
-    public String getRealPathFromURI(Uri contentUri) {
+    public String getRealPathFromURI(Uri contentUri)
+    {
         String[] proj = { MediaStore.Images.Media.DATA };
         Cursor cursor = managedQuery(contentUri, proj, null, null, null);
         int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
@@ -191,20 +203,23 @@ public class MainActivity extends Activity{
     private class Run extends AsyncTask<Void, Void, Integer[]> {
 
     	@Override
-            protected void onPreExecute() {
+        protected void onPreExecute()
+        {
             _compute = true;
             _runStopMenuItem.setTitle(R.string.menu_stop);
             super.onPreExecute();
     	}
 
         @Override
-            protected Integer[] doInBackground(Void... params) {
+        protected Integer[] doInBackground(Void... params)
+        {
             _gmsh.onelabCB("compute");
             return new Integer[] {1};
         }
 
         @Override
-            protected void onPostExecute(Integer[] result) {
+        protected void onPostExecute(Integer[] result)
+         {
             //(Vibrator) getSystemService(Context.VIBRATOR_SERVICE).vibrate(350);
             _runStopMenuItem.setTitle(R.string.menu_run);
             _runStopMenuItem.setEnabled(true);
@@ -215,8 +230,9 @@ public class MainActivity extends Activity{
         }
 
     }
-    private void showError(){
-    	if(_errors.size()>0){
+    private void showError()
+    {
+    	if(_errors.size() > 0){
             if(_errorDialog != null && _errorDialog.isShowing()) _errorDialog.dismiss();
             AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
             dialogBuilder.setTitle("Gmsh/GetDP Error(s)")
@@ -227,25 +243,28 @@ public class MainActivity extends Activity{
                             _errorDialog.dismiss();
 		        }
                     });
-            if(_errors.size()>1)dialogBuilder.setPositiveButton("Show more", new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialog, int which) {
-                        _errors.remove(_errors.size()-1);
-                        _errorDialog.dismiss();
-                        showError();
-                    }
-                });
+            if(_errors.size()>1)
+                dialogBuilder.setPositiveButton("Show more", new DialogInterface.OnClickListener() {
+                        public void onClick(DialogInterface dialog, int which) {
+                            _errors.remove(_errors.size()-1);
+                            _errorDialog.dismiss();
+                            showError();
+                        }
+                    });
             _errorDialog = dialogBuilder.show();
     	}
     }
     @Override
-	protected void onPause() {
+    protected void onPause()
+    {
         if(_compute) notifyComputing();
         super.onPause();
         _notify = true;
     }
 
     @Override
-	protected void onResume() {
+    protected void onResume()
+    {
         super.onResume();
         NotificationManager mNotificationManager =
             (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
@@ -254,22 +273,26 @@ public class MainActivity extends Activity{
     }
 
     @Override
-	protected void onStop() {
+    protected void onStop()
+    {
         super.onStop();
         if(_compute) notifyComputing();
         _notify = true;
     }
 
     @Override
-	public void onLowMemory() {
+    public void onLowMemory()
+    {
         if(!_compute) return;
         _gmsh.onelabCB("stop");
-        Toast.makeText(this, "Low memory! Computation is going to stop", Toast.LENGTH_LONG).show();
+        Toast.makeText(this, "Low memory! Computation is going to stop",
+                       Toast.LENGTH_LONG).show();
         super.onLowMemory();
     }
 
     @Override
-	public void onTrimMemory(int level) {
+    public void onTrimMemory(int level)
+    {
         if(!_compute) return;
         if(level == Activity.TRIM_MEMORY_COMPLETE){
             _gmsh.onelabCB("stop");
@@ -282,33 +305,42 @@ public class MainActivity extends Activity{
         super.onTrimMemory(level);
     }
 
-    private void notifyComputing(String msg, boolean alert) {
+    private void notifyComputing(String msg, boolean alert)
+    {
         Intent intent = new Intent(this, MainActivity.class);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
-        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
+        PendingIntent pendingIntent = PendingIntent.getActivity
+            (this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
         Notification.Builder notifyBuilder = new Notification.Builder(this);
         notifyBuilder.setContentTitle("ONELAB")
             .setContentIntent(pendingIntent)
             .setContentText(msg)
             .setSmallIcon(R.drawable.ic_launcher)
             .setProgress(0, 0, true);
-        if(alert) notifyBuilder.setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
-        NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+        if(alert)
+            notifyBuilder.setDefaults(Notification.DEFAULT_SOUND |
+                                      Notification.DEFAULT_VIBRATE);
+        NotificationManager mNotificationManager = (NotificationManager)
+            getSystemService(Context.NOTIFICATION_SERVICE);
         mNotificationManager.notify(1337, notifyBuilder.getNotification());
     }
 
-    private void notifyComputing() {
+    private void notifyComputing()
+    {
         notifyComputing("Computation in progress", false);
     }
 
-    private void notifyEndComputing() {
+    private void notifyEndComputing()
+    {
         notifyEndComputing("Computation done!");
     }
 
-    private void notifyEndComputing(String msg) {
+    private void notifyEndComputing(String msg)
+    {
         Intent intent = new Intent(this, MainActivity.class);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
-        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
+        PendingIntent pendingIntent = PendingIntent.getActivity
+            (this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
         Notification.Builder notifyBuilder = new Notification.Builder(this)
             .setSmallIcon(R.drawable.ic_launcher)
             .setContentIntent(pendingIntent)
@@ -317,7 +349,8 @@ public class MainActivity extends Activity{
             .setAutoCancel(true)
             .setProgress(0, 0, false)
             .setContentText(msg);
-        NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+        NotificationManager mNotificationManager = (NotificationManager)
+            getSystemService(Context.NOTIFICATION_SERVICE);
         mNotificationManager.notify(1337, notifyBuilder.getNotification());
     }
 
@@ -345,5 +378,5 @@ public class MainActivity extends Activity{
             };
         };
 
-    public boolean isComputing() {return _compute;}
+    public boolean isComputing() { return _compute; }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/Model.java b/contrib/mobile/Android/src/org/geuz/onelab/Model.java
index 42419e3..dfc50a4 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/Model.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/Model.java
@@ -11,36 +11,24 @@ class Model {
     private File _file;
     private Bitmap _bitmap;
     private Uri _url;
-
-    public Model(String name, String summary, File file){
+    public Model(String name, String summary, File file)
+    {
         _name = name;
         _summary = summary;
         _file = file;
     }
-    public String getName() {
-        return _name;
-    }
-    public String getSummary() {
-        return _summary;
-    }
-    public File getFile() {
-        return _file;
-    }
-    public Bitmap getBitmap() {
-        return _bitmap;
-    }
-    public Uri getUrl() {
-        return _url;
-    }
-    public void setBitmap(File f) {
+    public String getName() { return _name; }
+    public String getSummary() { return _summary; }
+    public File getFile() { return _file; }
+    public Bitmap getBitmap() { return _bitmap; }
+    public Uri getUrl() { return _url; }
+    public void setBitmap(File f)
+    {
         BitmapFactory.Options options = new BitmapFactory.Options();
-        options.inSampleSize = 8;
         options.inJustDecodeBounds = false;
         options.inPreferredConfig = Bitmap.Config.RGB_565;
         options.inDither = true;
         _bitmap = BitmapFactory.decodeFile(f.toString(), options);
     }
-    public void setUrl(Uri url) {
-        _url = url;
-    }
+    public void setUrl(Uri url) { _url = url; }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ModelArrayAdapter.java b/contrib/mobile/Android/src/org/geuz/onelab/ModelArrayAdapter.java
index b6adf77..60dc9c9 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/ModelArrayAdapter.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/ModelArrayAdapter.java
@@ -14,24 +14,26 @@ import android.widget.TextView;
 public class ModelArrayAdapter extends ArrayAdapter<Model> {
     private List<Model> _models;
 
-    public ModelArrayAdapter(Context c) {
+    public ModelArrayAdapter(Context c)
+        {
         super(c, R.layout.model);
         _models = new ArrayList<Model>();
     }
 
     @Override
-	public void add(Model model) {
+    public void add(Model model)
+    {
         super.add(model);
         _models.add(model);
     }
 
-    public Model getModel(int pos) {
-        return _models.get(pos);
-    }
+    public Model getModel(int pos) { return _models.get(pos); }
 
     @Override
-	public View getView(int position, View convertView, final ViewGroup parent) {
-        LayoutInflater inflater = (LayoutInflater) parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+    public View getView(int position, View convertView, final ViewGroup parent)
+    {
+        LayoutInflater inflater = (LayoutInflater) parent.getContext()
+            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         final Model m = _models.get(position);
         View rowView = inflater.inflate(R.layout.model, parent, false);
         TextView title = (TextView) rowView.findViewById(R.id.title);
@@ -41,7 +43,6 @@ public class ModelArrayAdapter extends ArrayAdapter<Model> {
         if(m.getSummary() != null) description.setText(m.getSummary());
         if(m.getBitmap() != null) icon.setImageBitmap(m.getBitmap());
         else icon.setImageResource(R.drawable.ic_launcher);
-
         return rowView;
     }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
index caf7144..1c7f053 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
@@ -41,10 +41,11 @@ public class ModelFragment extends Fragment{
     private SeekBar _animationStepper;
 
     final Runnable hideControlsRunnable = new Runnable() {
-            public void run() {hideControlBar();}
+            public void run() { hideControlBar(); }
         };
 
-    public static ModelFragment newInstance(Gmsh g) {
+    public static ModelFragment newInstance(Gmsh g)
+    {
         ModelFragment fragment = new ModelFragment();
         Bundle bundle = new Bundle();
         bundle.putParcelable("Gmsh", g);
@@ -52,18 +53,19 @@ public class ModelFragment extends Fragment{
         return fragment;
     }
 
-    public ModelFragment() {
-    }
+    public ModelFragment() { }
 
     @Override
-	public void onCreate(Bundle savedInstanceState) {
+    public void onCreate(Bundle savedInstanceState)
+    {
         super.onCreate(savedInstanceState);
         _gmsh = getArguments().getParcelable("Gmsh");
     }
 
     @Override
-	public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                                 Bundle savedInstanceState) {
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState)
+    {
         View rootView = inflater.inflate(R.layout.fragment_model, container, false);
         RelativeLayout glViewLayout = (RelativeLayout)rootView.findViewById(R.id.glViewLayout);
         GLESRender renderer = new GLESRender(_gmsh);
@@ -74,12 +76,20 @@ public class ModelFragment extends Fragment{
         _glView.requestRender();
         _hideDelay = new Handler();
         _gestureDetector = new GestureDetector(getActivity(), new OnGestureListener() {
-                public boolean onSingleTapUp(MotionEvent e) { return false; } // UNUSED Auto-generated method stub
-                public void onShowPress(MotionEvent e) {} // UNUSED Auto-generated method stub
-                public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { return false; } // UNUSED Auto-generated method stub
-                public void onLongPress(MotionEvent e) {} // UNUSED Auto-generated method stub
-                public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return false; } // UNUSED Auto-generated method stub
-                public boolean onDown(MotionEvent e) { return false; } // UNUSED Auto-generated method stub
+                // UNUSED Auto-generated method stub
+                public boolean onSingleTapUp(MotionEvent e) { return false; }
+                // UNUSED Auto-generated method stub
+                public void onShowPress(MotionEvent e) {}
+                // UNUSED Auto-generated method stub
+                public boolean onScroll(MotionEvent e1, MotionEvent e2,
+                                        float distanceX, float distanceY) { return false; }
+                // UNUSED Auto-generated method stub
+                public void onLongPress(MotionEvent e) {}
+                // UNUSED Auto-generated method stub
+                public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
+                                       float velocityY) { return false; }
+                // UNUSED Auto-generated method stub
+                public boolean onDown(MotionEvent e) { return false; }
             });
         _gestureDetector.setOnDoubleTapListener(new GestureDetector.OnDoubleTapListener() {
                 public boolean onSingleTapConfirmed(MotionEvent e) {
@@ -89,11 +99,12 @@ public class ModelFragment extends Fragment{
                         showControlBar();
                     return true;
                 }
-                public boolean onDoubleTapEvent(MotionEvent e) { return false; } // UNUSED Auto-generated method stub
-                public boolean onDoubleTap(MotionEvent e) { return false; } // UNUSED Auto-generated method stub
+                // UNUSED Auto-generated method stub
+                public boolean onDoubleTapEvent(MotionEvent e) { return false; }
+                // UNUSED Auto-generated method stub
+                public boolean onDoubleTap(MotionEvent e) { return false; }
             });
         _glView.setOnTouchListener(new View.OnTouchListener() {
-
                 public boolean onTouch(View v, MotionEvent event) {
                     return _gestureDetector.onTouchEvent(event);
                 }
@@ -106,7 +117,9 @@ public class ModelFragment extends Fragment{
         rotationButton.setOnClickListener(new View.OnClickListener() {
                 public void onClick(View v) {
                     boolean rotate = !_glView.getRotate();
-                    ((ImageButton)v).setBackgroundResource((rotate)?R.drawable.icon_translate:R.drawable.icon_rotate);
+                    ((ImageButton)v).setBackgroundResource(rotate ?
+                                                           R.drawable.icon_translate :
+                                                           R.drawable.icon_rotate);
                     _glView.setRotate(rotate);
                 }
             });
@@ -142,15 +155,17 @@ public class ModelFragment extends Fragment{
              RelativeLayout.LayoutParams.WRAP_CONTENT);
         layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
         glViewLayout.addView(_progressLayout, layoutParams);
-        _controlBarLayout = (LinearLayout) getActivity().getLayoutInflater().inflate(R.layout.control_bar, null);
+        _controlBarLayout = (LinearLayout) getActivity().getLayoutInflater()
+            .inflate(R.layout.control_bar, null);
         final ImageButton prevButton = (ImageButton)_controlBarLayout.findViewById(R.id.controlPrev);
         final ImageButton playPauseButton = (ImageButton)_controlBarLayout.findViewById(R.id.controlPlay);
         final ImageButton nextButton = (ImageButton)_controlBarLayout.findViewById(R.id.controlNext);
         _animationStepper = (SeekBar)_controlBarLayout.findViewById(R.id.controlStepper);
         _animationStepper.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
-
-                public void onStopTrackingTouch(SeekBar seekBar) {} // UNUSED Auto-generated method stub
-                public void onStartTrackingTouch(SeekBar seekBar) {} // UNUSED Auto-generated method stub
+                // UNUSED Auto-generated method stub
+                public void onStopTrackingTouch(SeekBar seekBar) {}
+                // UNUSED Auto-generated method stub
+                public void onStartTrackingTouch(SeekBar seekBar) {}
                 public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                     if(fromUser) {
                         postDelay();
@@ -207,15 +222,19 @@ public class ModelFragment extends Fragment{
         this._controlBarLayout.setVisibility(View.INVISIBLE);
         return rootView;
     }
-    public void postDelay(int delay) {
+    public void postDelay(int delay)
+    {
         _hideDelay.removeCallbacks(hideControlsRunnable);
         _hideDelay.postDelayed(hideControlsRunnable, delay);
     }
-    public void postDelay() {
+    public void postDelay()
+    {
         this.postDelay(6000);
     }
-    public void showControlBar() {
-        if(getActivity() == null || ((MainActivity)getActivity()).isComputing() || !_gmsh.haveAnimation()) return;
+    public void showControlBar()
+    {
+        if(getActivity() == null || ((MainActivity)getActivity()).isComputing() ||
+           !_gmsh.haveAnimation()) return;
         _controlBarLayout.setEnabled(true);
         _animationStepper.setMax(_gmsh.numberOfAnimation()-1);
         this.postDelay();
@@ -223,7 +242,8 @@ public class ModelFragment extends Fragment{
         _controlBarLayout.setVisibility(View.VISIBLE);
         _controlBarLayout.startAnimation(bottomUp);
     }
-    public void hideControlBar() {
+    public void hideControlBar()
+    {
         if(getActivity() == null || View.INVISIBLE == _controlBarLayout.getVisibility()) return;
         _hideDelay.removeCallbacks(hideControlsRunnable);
         Animation bottomDown = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out);
@@ -231,18 +251,22 @@ public class ModelFragment extends Fragment{
         _controlBarLayout.setVisibility(View.INVISIBLE);
 
     }
-    public void showProgress(String progress) {
+    public void showProgress(String progress)
+    {
         _progressLayout.setAlpha(1);
         _progress.setText(progress);
     }
-    public void hideProgress() {
+    public void hideProgress()
+    {
         _progressLayout.setAlpha(0);
         _progress.setText("");
     }
-    public void requestRender() {
+    public void requestRender()
+    {
         _glView.requestRender();
     }
-    public void takeScreenshot(File out) {
+    public void takeScreenshot(File out)
+    {
         Bitmap screenshot = _glView.getScreenshot();
         try {
             FileOutputStream f = new FileOutputStream(out);
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java b/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java
index f770d54..8d9d906 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java
@@ -32,7 +32,8 @@ public class ModelList extends Activity {
     private ModelArrayAdapter _modelArrayAdapter;
 
     @Override
-	protected void onCreate(Bundle savedInstanceState) {
+    protected void onCreate(Bundle savedInstanceState)
+    {
         super.onCreate(savedInstanceState);
         _modelArrayAdapter = new ModelArrayAdapter(this);
         try {
@@ -48,7 +49,6 @@ public class ModelList extends Activity {
     	ListView list = new ListView(this);
     	list.setAdapter(_modelArrayAdapter);
     	list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-
                 public void onItemClick(AdapterView<?> parent, View view, int position,
 					long id) {
                     Model m = _modelArrayAdapter.getModel(position);
@@ -59,7 +59,6 @@ public class ModelList extends Activity {
                 }
             });
     	list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
-
                 public boolean onItemLongClick(AdapterView<?> parent, View view,
                                                int position, long id) {
                     final Model m = _modelArrayAdapter.getModel(position);
@@ -103,7 +102,8 @@ public class ModelList extends Activity {
     }
 
     @Override
-	public boolean onCreateOptionsMenu(Menu menu) {
+    public boolean onCreateOptionsMenu(Menu menu)
+    {
         MenuItem about = menu.add("About");
         about.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
         MenuItem loadFile = menu.add(R.string.button_open_file);
@@ -112,7 +112,8 @@ public class ModelList extends Activity {
     }
 
     @Override
-	public boolean onMenuItemSelected(int featureId, MenuItem item) {
+    public boolean onMenuItemSelected(int featureId, MenuItem item)
+    {
         if(item.getTitle().equals(getString(R.string.button_open_file))) {
             Intent fileBrowserIntent = new Intent();
             fileBrowserIntent.setAction(Intent.ACTION_GET_CONTENT);
@@ -121,7 +122,8 @@ public class ModelList extends Activity {
                 startActivityForResult(fileBrowserIntent, 1);
             }
             catch(ActivityNotFoundException e) {
-                Toast.makeText(this, "No application found on your device to open the files.", Toast.LENGTH_LONG).show();
+                Toast.makeText(this, "No application found on your device to open the files.",
+                               Toast.LENGTH_LONG).show();
             }
         }
         else if(item.getTitle().equals("About")) {
@@ -132,7 +134,8 @@ public class ModelList extends Activity {
     }
 
     @Override
-	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+    protected void onActivityResult(int requestCode, int resultCode, Intent data)
+    {
         super.onActivityResult(requestCode, resultCode, data);
         if(resultCode == RESULT_CANCELED) return;
         switch (requestCode) {
@@ -180,7 +183,8 @@ public class ModelList extends Activity {
             }
         }
     }
-    private void readModel(XmlPullParser parser, String dir) throws XmlPullParserException, IOException{
+    private void readModel(XmlPullParser parser, String dir) throws XmlPullParserException, IOException
+    {
         parser.require(XmlPullParser.START_TAG, null, "model");
         String title = null;
         String summary = null;
@@ -231,7 +235,8 @@ public class ModelList extends Activity {
         if(url != null) newModel.setUrl(Uri.parse(url));
         _modelArrayAdapter.add(newModel);
     }
-    private void skipTag(XmlPullParser parser) throws XmlPullParserException, IOException {
+    private void skipTag(XmlPullParser parser) throws XmlPullParserException, IOException
+    {
         if (parser.getEventType() != XmlPullParser.START_TAG) {
             throw new IllegalStateException();
         }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsActivity.java
index ecac782..394e871 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsActivity.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsActivity.java
@@ -11,41 +11,45 @@ public class OptionsActivity extends Activity {
 
     boolean _compute;
 
-	@Override
-	protected void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
-		setContentView(R.layout.activity_fragment);
-		Bundle extra = getIntent().getExtras();
-		Gmsh gmsh = extra.getParcelable("Gmsh");
-		_compute = extra.getBoolean("Compute", false);
-		getActionBar().setDisplayHomeAsUpEnabled(true);
-		getActionBar().setTitle(R.string.title_activity_options);
-		OptionsFragment optionsFragment = OptionsFragment.newInstance(gmsh);
-		getFragmentManager().beginTransaction().replace(R.id.model_fragment, optionsFragment).commit();
-	}
+    @Override
+    protected void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                             WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        setContentView(R.layout.activity_fragment);
+        Bundle extra = getIntent().getExtras();
+        Gmsh gmsh = extra.getParcelable("Gmsh");
+        _compute = extra.getBoolean("Compute", false);
+        getActionBar().setDisplayHomeAsUpEnabled(true);
+        getActionBar().setTitle(R.string.title_activity_options);
+        OptionsFragment optionsFragment = OptionsFragment.newInstance(gmsh);
+        getFragmentManager().beginTransaction().replace(R.id.model_fragment, optionsFragment).commit();
+    }
 
-	@Override
-	public boolean onCreateOptionsMenu(Menu menu) {
-		if(_compute) return super.onCreateOptionsMenu(menu);
-		MenuItem runStopMenuItem = menu.add(R.string.menu_run);
-                runStopMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
-		return super.onCreateOptionsMenu(menu);
-	}
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu)
+    {
+        if(_compute) return super.onCreateOptionsMenu(menu);
+        MenuItem runStopMenuItem = menu.add(R.string.menu_run);
+        runStopMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+        return super.onCreateOptionsMenu(menu);
+    }
 
-	@Override
-	public boolean onMenuItemSelected(int featureId, MenuItem item) {
-            if(item.getTitle().equals(getString(R.string.menu_run))) {
-                Intent returnIntent = new Intent();
-                returnIntent.putExtra("Compute", true);
-                this.setResult(RESULT_OK, returnIntent);
-                this.finish();
-            }
-            else if(item.getItemId() == android.R.id.home) {
-                Intent returnIntent = new Intent();
-                this.setResult(RESULT_CANCELED, returnIntent);
-                this.finish();
-            }
-            return super.onMenuItemSelected(featureId, item);
-	}
+    @Override
+    public boolean onMenuItemSelected(int featureId, MenuItem item)
+    {
+        if(item.getTitle().equals(getString(R.string.menu_run))) {
+            Intent returnIntent = new Intent();
+            returnIntent.putExtra("Compute", true);
+            this.setResult(RESULT_OK, returnIntent);
+            this.finish();
+        }
+        else if(item.getItemId() == android.R.id.home) {
+            Intent returnIntent = new Intent();
+            this.setResult(RESULT_CANCELED, returnIntent);
+            this.finish();
+        }
+        return super.onMenuItemSelected(featureId, item);
+    }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java
index 707bbf5..004b228 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java
@@ -18,131 +18,138 @@ import android.widget.LinearLayout;
 
 public class OptionsDisplayFragment extends Fragment{
 
-	private Gmsh _gmsh;
-	private SeparatedListView _listView;
-	
-	public static OptionsDisplayFragment newInstance(Gmsh g) {
-		OptionsDisplayFragment fragment = new OptionsDisplayFragment();
-		Bundle bundle = new Bundle();
-		bundle.putParcelable("Gmsh", g);
-		fragment.setArguments(bundle);
+    private Gmsh _gmsh;
+    private SeparatedListView _listView;
+
+    public static OptionsDisplayFragment newInstance(Gmsh g)
+    {
+        OptionsDisplayFragment fragment = new OptionsDisplayFragment();
+        Bundle bundle = new Bundle();
+        bundle.putParcelable("Gmsh", g);
+        fragment.setArguments(bundle);
         return fragment;
-	}
-	
-	public OptionsDisplayFragment() {
-		super();
-	}
-	
-	@Override
-	public void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		_gmsh = getArguments().getParcelable("Gmsh");
-	}
-	
-	@Override
-	public View onCreateView(LayoutInflater inflater, final ViewGroup container,
-			Bundle savedInstanceState) {
-		_listView = (SeparatedListView)inflater.inflate(R.layout.fragment_options_display, container, false);
-		CheckBox showGeomPoints = new CheckBox(_listView.getContext());
-		showGeomPoints.setText("Show geometry points");
-		showGeomPoints.setChecked((_gmsh.getDoubleOption("Geometry", "Points") > 0.));
-		showGeomPoints.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-			
-			public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-				_gmsh.setDoubleOption("Geometry", "Points", (isChecked)?1. : 0.);
-				if(mListener != null) mListener.OnModelOptionsChanged();
-			}
-		});
-		_listView.addItem("Display", showGeomPoints);
-		CheckBox showGeomLines = new CheckBox(_listView.getContext());
-		showGeomLines.setText("Show geometry lines");
-		showGeomLines.setChecked((_gmsh.getDoubleOption("Geometry", "Lines") > 0.));
-		showGeomLines.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-			
-			public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-				_gmsh.setDoubleOption("Geometry", "Lines", (isChecked)?1. : 0.);
-				if(mListener != null) mListener.OnModelOptionsChanged();
-			}
-		});
-		_listView.addItem("Display", showGeomLines);
-		CheckBox showMeshSurfaceEdges = new CheckBox(_listView.getContext());
+    }
+
+    public OptionsDisplayFragment()
+    {
+        super();
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        _gmsh = getArguments().getParcelable("Gmsh");
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, final ViewGroup container,
+                             Bundle savedInstanceState)
+    {
+        _listView = (SeparatedListView)inflater.inflate(R.layout.fragment_options_display,
+                                                        container, false);
+        CheckBox showGeomPoints = new CheckBox(_listView.getContext());
+        showGeomPoints.setText("Show geometry points");
+        showGeomPoints.setChecked(_gmsh.getDoubleOption("Geometry", "Points", 0) > 0.);
+        showGeomPoints.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    _gmsh.setDoubleOption("Geometry", "Points", (isChecked)?1. : 0., 0);
+                    if(mListener != null) mListener.OnModelOptionsChanged();
+                }
+            });
+        _listView.addItem("Display Options", showGeomPoints);
+        CheckBox showGeomLines = new CheckBox(_listView.getContext());
+        showGeomLines.setText("Show geometry lines");
+        showGeomLines.setChecked(_gmsh.getDoubleOption("Geometry", "Lines", 0) > 0.);
+        showGeomLines.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    _gmsh.setDoubleOption("Geometry", "Lines", (isChecked)?1. : 0., 0);
+                    if(mListener != null) mListener.OnModelOptionsChanged();
+                }
+            });
+        _listView.addItem("Display Options", showGeomLines);
+        CheckBox showMeshSurfaceEdges = new CheckBox(_listView.getContext());
     	showMeshSurfaceEdges.setText("Show mesh surface edges");
-    	showMeshSurfaceEdges.setChecked((_gmsh.getDoubleOption("Mesh", "SurfaceEdges") > 0.));
+    	showMeshSurfaceEdges.setChecked(_gmsh.getDoubleOption("Mesh", "SurfaceEdges", 0) > 0.);
     	showMeshSurfaceEdges.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-			
-			public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-				_gmsh.setDoubleOption("Mesh", "SurfaceEdges", (isChecked)?1. : 0.);
-				if(mListener != null) mListener.OnModelOptionsChanged();
-			}
-		});
-    	_listView.addItem("Display", showMeshSurfaceEdges);
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    _gmsh.setDoubleOption("Mesh", "SurfaceEdges", (isChecked)?1. : 0., 0);
+                    if(mListener != null) mListener.OnModelOptionsChanged();
+                }
+            });
+    	_listView.addItem("Display Options", showMeshSurfaceEdges);
     	CheckBox showMeshVolumesEdges = new CheckBox(_listView.getContext());
     	showMeshVolumesEdges.setText("Show mesh volume edges");
-    	showMeshVolumesEdges.setChecked((_gmsh.getDoubleOption("Mesh", "VolumeEdges") > 0.));
-    	showMeshVolumesEdges.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-			
-			public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-				_gmsh.setDoubleOption("Mesh", "VolumeEdges", (isChecked)?1. : 0.);
-				if(mListener != null) mListener.OnModelOptionsChanged();
-			}
-		});
-    	_listView.addItem("Display", showMeshVolumesEdges);
+    	showMeshVolumesEdges.setChecked(_gmsh.getDoubleOption("Mesh", "VolumeEdges", 0) > 0.);
+    	showMeshVolumesEdges.setOnCheckedChangeListener
+            (new CompoundButton.OnCheckedChangeListener() {
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    _gmsh.setDoubleOption("Mesh", "VolumeEdges", (isChecked)?1. : 0., 0);
+                    if(mListener != null) mListener.OnModelOptionsChanged();
+                }
+            });
+    	_listView.addItem("Display Options", showMeshVolumesEdges);
     	this.refresh();
-		return _listView;
-	}
-	
-	public void refresh() {
-		if(_gmsh == null) return;
-		String[] PViews = _gmsh.getPView();
-		for(int i=0; i<_listView.itemsCountInSection("Result"); i++) {
-			View v = (View)_listView.getItemAtPosition(6+i);
-			if(!v.getClass().equals(LinearLayout.class)) continue;
-			for(int j=0; j<((LinearLayout)v).getChildCount(); j++) {
-				View sv = ((LinearLayout)v).getChildAt(j);
-				if(sv.getClass().equals(CheckBox.class)){
-					String[] infos = PViews[i].split("\n");
-					((CheckBox)sv).setChecked(infos[2].equals("1"));
-				}
-			}
-		}
-		for(int i=_listView.itemsCountInSection("Result"); i < PViews.length;i++) {
-			String[] infos = PViews[i].split("\n"); // name / IntervalsType (1=Iso 2=Continous 3=Discrete 4=Numeric)
-			final int myID = i;
-			LinearLayout layout = new LinearLayout(_listView.getContext());
-        	CheckBox checkbox = new CheckBox(_listView.getContext());
-        	checkbox.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-        	checkbox.setText(infos[0]);
-        	checkbox.setChecked(infos[2].equals("1"));
-        	checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-				
-				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-					_gmsh.setPView(myID, -1, (isChecked)? 1 : 0, -1, -1);
-					if(mListener != null) mListener.OnModelOptionsChanged();
-				}
-			});
-        	Button button = new Button(_listView.getContext());
-        	button.setText("More options >");
-        	button.setOnClickListener(new View.OnClickListener() {
-				public void onClick(View v) {
-					Intent intent = new Intent(getActivity(), PostProcessingActivity.class);
-				    intent.putExtra("Gmsh", (Parcelable)_gmsh);
-				    intent.putExtra("PView", myID);
-					startActivity(intent);
-					if(mListener != null) mListener.OnModelOptionsChanged();
-				}
-			});
-        	button.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
-        	button.setBackgroundColor(Color.TRANSPARENT);
-        	button.setGravity(Gravity.RIGHT);
-			layout.addView(checkbox);
-			layout.addView(button);
-			_listView.addItem("Result", layout);
-		}
-	}
+        return _listView;
+    }
+
+    public void refresh()
+    {
+        if(_gmsh == null) return;
+        int nbviews = (int)_gmsh.getDoubleOption("PostProcessing", "NbViews", 0);
+
+        for(int i = 0; i<_listView.itemsCountInSection("Result Options"); i++) {
+            View v = (View)_listView.getItemAtPosition(6 + i);
+            if(!v.getClass().equals(LinearLayout.class)) continue;
+            for(int j = 0; j < ((LinearLayout)v).getChildCount(); j++) {
+                View sv = ((LinearLayout)v).getChildAt(j);
+                if(sv.getClass().equals(CheckBox.class)){
+                    ((CheckBox)sv).setChecked(_gmsh.getDoubleOption("View", "Visible", i) > 0.);
+                }
+            }
+        }
+        for(int i = _listView.itemsCountInSection("Result Options"); i < nbviews; i++) {
+            final int myID = i;
+            LinearLayout layout = new LinearLayout(_listView.getContext());
+            CheckBox checkbox = new CheckBox(_listView.getContext());
+            checkbox.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.WRAP_CONTENT,
+                                                                  LayoutParams.WRAP_CONTENT));
+            checkbox.setText(_gmsh.getStringOption("View", "Name", myID));
+            checkbox.setChecked(_gmsh.getDoubleOption("View", "Visible", myID) > 0.);
+            checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                        _gmsh.setDoubleOption("View", "Visible", isChecked ? 1. : 0., myID);
+                        if(mListener != null) mListener.OnModelOptionsChanged();
+                    }
+                });
+            Button button = new Button(_listView.getContext());
+            button.setText(">");
+            button.setOnClickListener(new View.OnClickListener() {
+                    public void onClick(View v) {
+                        Intent intent = new Intent(getActivity(), PostProcessingActivity.class);
+                        intent.putExtra("Gmsh", (Parcelable)_gmsh);
+                        intent.putExtra("PView", myID);
+                        startActivity(intent);
+                        if(mListener != null) mListener.OnModelOptionsChanged();
+                    }
+                });
+            button.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT,
+                                                                LayoutParams.WRAP_CONTENT));
+            button.setBackgroundColor(Color.TRANSPARENT);
+            button.setGravity(Gravity.RIGHT);
+            layout.addView(checkbox);
+            layout.addView(button);
+            _listView.addItem("Result Options", layout);
+        }
+    }
 
-	private OnModelOptionsChangedListener mListener;
-	public void setOnModelOptionsChangedListener(OnModelOptionsChangedListener listener) { mListener = listener;}
-	public interface OnModelOptionsChangedListener {
-		void OnModelOptionsChanged();
-	}
+    private OnModelOptionsChangedListener mListener;
+    public void setOnModelOptionsChangedListener(OnModelOptionsChangedListener listener)
+    {
+        mListener = listener;
+    }
+    public interface OnModelOptionsChangedListener
+    {
+        void OnModelOptionsChanged();
+    }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsFragment.java
index bcf1f3b..55e7335 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsFragment.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsFragment.java
@@ -11,100 +11,111 @@ import android.app.FragmentTransaction;
 
 public class OptionsFragment extends Fragment{
 
-	private Gmsh _gmsh;
-	private int _viewN;
-	private OptionsDisplayFragment _optionDisplayFragment;
-	private OptionsModelFragment _optionModelFragment;
-	
-	public static OptionsFragment newInstance(Gmsh g) {
-		OptionsFragment fragment = new OptionsFragment();
-		Bundle bundle = new Bundle();
-		bundle.putParcelable("Gmsh", g);
-		fragment.setArguments(bundle);
+    private Gmsh _gmsh;
+    private int _viewN;
+    private OptionsDisplayFragment _optionDisplayFragment;
+    private OptionsModelFragment _optionModelFragment;
+
+    public static OptionsFragment newInstance(Gmsh g)
+    {
+        OptionsFragment fragment = new OptionsFragment();
+        Bundle bundle = new Bundle();
+        bundle.putParcelable("Gmsh", g);
+        fragment.setArguments(bundle);
         return fragment;
-	}
-	
-	public OptionsFragment() {
-	}
-	
-	@Override
-	public void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		_gmsh = getArguments().getParcelable("Gmsh");
-		_viewN = 0;
-		if(savedInstanceState != null)
-			_viewN = savedInstanceState.getInt("viewN");
-	}
-	
-	@Override
-	public View onCreateView(LayoutInflater inflater, ViewGroup container,
-			Bundle savedInstanceState) {
-		LinearLayout rootView = (LinearLayout)inflater.inflate(R.layout.fragment_options, container, false);
-		_optionModelFragment = OptionsModelFragment.newInstance(_gmsh);
-		_optionModelFragment.setOnModelOptionsChangedListener(new OptionsModelFragment.OnModelOptionsChangedListener() {
-			public void OnModelOptionsChanged() {
-				if(mListener != null) mListener.OnOptionsChanged();
-			}
-		});
-		_optionDisplayFragment = OptionsDisplayFragment.newInstance(_gmsh);
-		_optionDisplayFragment.setOnModelOptionsChangedListener(new OptionsDisplayFragment.OnModelOptionsChangedListener() {
-			public void OnModelOptionsChanged() {
-				if(mListener != null) mListener.OnOptionsChanged();
-			}
-		});
-		final Button optionModel = (Button) rootView.findViewById(R.id.goto_options_model);
-		final Button optionDisplay = (Button) rootView.findViewById(R.id.goto_options_display);
-		if(_viewN == 0) {
-			optionDisplay.setEnabled(true);
-			optionModel.setEnabled(false);
-			getFragmentManager().beginTransaction().replace(R.id.options_fragment, _optionModelFragment).commit();
-		}
-		else {
-			optionDisplay.setEnabled(false);
-			optionModel.setEnabled(true);
-			getFragmentManager().beginTransaction().replace(R.id.options_fragment, _optionDisplayFragment).commit();
-		}
-		optionModel.setOnClickListener(new View.OnClickListener() {
-			
-			public void onClick(View v) {
-				optionModel.setEnabled(false);
-				optionDisplay.setEnabled(true);
-				FragmentTransaction ft = getFragmentManager().beginTransaction();
+    }
+
+    public OptionsFragment() { }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        _gmsh = getArguments().getParcelable("Gmsh");
+        _viewN = 0;
+        if(savedInstanceState != null)
+            _viewN = savedInstanceState.getInt("viewN");
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState)
+    {
+        LinearLayout rootView = (LinearLayout)inflater.inflate(R.layout.fragment_options,
+                                                               container, false);
+        _optionModelFragment = OptionsModelFragment.newInstance(_gmsh);
+        _optionModelFragment.setOnModelOptionsChangedListener
+            (new OptionsModelFragment.OnModelOptionsChangedListener() {
+                    public void OnModelOptionsChanged() {
+                        if(mListener != null) mListener.OnOptionsChanged();
+                    }
+                });
+        _optionDisplayFragment = OptionsDisplayFragment.newInstance(_gmsh);
+        _optionDisplayFragment.setOnModelOptionsChangedListener
+            (new OptionsDisplayFragment.OnModelOptionsChangedListener() {
+                    public void OnModelOptionsChanged() {
+                        if(mListener != null) mListener.OnOptionsChanged();
+                    }
+                });
+        final Button optionModel = (Button) rootView.findViewById(R.id.goto_options_model);
+        final Button optionDisplay = (Button) rootView.findViewById(R.id.goto_options_display);
+        if(_viewN == 0) {
+            optionDisplay.setEnabled(true);
+            optionModel.setEnabled(false);
+            getFragmentManager().beginTransaction().replace(R.id.options_fragment,
+                                                            _optionModelFragment).commit();
+        }
+        else {
+            optionDisplay.setEnabled(false);
+            optionModel.setEnabled(true);
+            getFragmentManager().beginTransaction().replace(R.id.options_fragment,
+                                                            _optionDisplayFragment).commit();
+        }
+        optionModel.setOnClickListener(new View.OnClickListener() {
+                public void onClick(View v) {
+                    optionModel.setEnabled(false);
+                    optionDisplay.setEnabled(true);
+                    FragmentTransaction ft = getFragmentManager().beginTransaction();
 	            ft.replace(R.id.options_fragment, _optionModelFragment);
 	            ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
 	            ft.commit();
 	            _viewN = 0;
-			}
-		});
-		optionDisplay.setOnClickListener(new View.OnClickListener() {
-			
-			public void onClick(View v) {
-				optionDisplay.setEnabled(false);
-				optionModel.setEnabled(true);
-				FragmentTransaction ft = getFragmentManager().beginTransaction();
+                }
+            });
+        optionDisplay.setOnClickListener(new View.OnClickListener() {
+                public void onClick(View v) {
+                    optionDisplay.setEnabled(false);
+                    optionModel.setEnabled(true);
+                    FragmentTransaction ft = getFragmentManager().beginTransaction();
 	            ft.replace(R.id.options_fragment, _optionDisplayFragment);
 	            ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
 	            ft.commit();
 	            _viewN = 1;
-			}
-		});
-		return rootView;
-	}
+                }
+            });
+        return rootView;
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState)
+    {
+        super.onSaveInstanceState(outState);
+        outState.putInt("viewN", _viewN);
+    }
+
+    public void refresh()
+    {
+        if(_optionDisplayFragment != null)_optionDisplayFragment.refresh();
+        if(_optionModelFragment != null)_optionModelFragment.refresh();
+    }
 
-	@Override
-	public void onSaveInstanceState(Bundle outState) {
-		super.onSaveInstanceState(outState);
-		outState.putInt("viewN", _viewN);
-	}
-	
-	public void refresh() {
-		if(_optionDisplayFragment != null)_optionDisplayFragment.refresh();
-		if(_optionModelFragment != null)_optionModelFragment.refresh();
-	}
-	
-	private OnOptionsChangedListener mListener;
-	public void setOnOptionsChangedListener(OnOptionsChangedListener listener) { mListener = listener;}
-	public interface OnOptionsChangedListener {
-		void OnOptionsChanged();
-	}
+    private OnOptionsChangedListener mListener;
+    public void setOnOptionsChangedListener(OnOptionsChangedListener listener)
+    {
+        mListener = listener;
+    }
+    public interface OnOptionsChangedListener
+    {
+        void OnOptionsChanged();
+    }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsModelFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsModelFragment.java
index 329c8e9..6d83098 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsModelFragment.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsModelFragment.java
@@ -10,100 +10,121 @@ import android.view.View;
 import android.view.ViewGroup;
 
 public class OptionsModelFragment extends Fragment{
-	private Gmsh _gmsh;
-	private SeparatedListView _listView;
-	private List<Parameter> params = new ArrayList<Parameter>();
-	
-	public static OptionsModelFragment newInstance(Gmsh g) {
-		OptionsModelFragment fragment = new OptionsModelFragment();
-		Bundle bundle = new Bundle();
-		bundle.putParcelable("Gmsh", g);
-		fragment.setArguments(bundle);
+    private Gmsh _gmsh;
+    private SeparatedListView _listView;
+    private List<Parameter> params = new ArrayList<Parameter>();
+
+    public static OptionsModelFragment newInstance(Gmsh g)
+    {
+        OptionsModelFragment fragment = new OptionsModelFragment();
+        Bundle bundle = new Bundle();
+        bundle.putParcelable("Gmsh", g);
+        fragment.setArguments(bundle);
         return fragment;
-	}
-	
-	public OptionsModelFragment() {
-		super();
-	}
-	@Override
-	public void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		_gmsh = getArguments().getParcelable("Gmsh");
-	}
-	
-	@Override
-	public View onCreateView(LayoutInflater inflater, ViewGroup container,
-			Bundle savedInstanceState) {
-		params.clear();
-		_listView = (SeparatedListView)inflater.inflate(R.layout.fragment_options_display, container, false);
-		_listView.setDividerHeight(0);
-		this.refresh();
-		return _listView;
-	}
-	
-	public void refresh() {
-		if(_gmsh == null) return;
-		if(_listView != null){ _listView.clear(); params.clear();} // TODO temporary, remove must be implemented in listview
-		this.getAvailableParam();
-		if(_listView != null) _listView.refresh();
-	}
-	
-	private void getAvailableParam(){
+    }
+
+    public OptionsModelFragment()
+    {
+        super();
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        _gmsh = getArguments().getParcelable("Gmsh");
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState)
+    {
+        params.clear();
+        _listView = (SeparatedListView)inflater.inflate(R.layout.fragment_options_display,
+                                                        container, false);
+        _listView.setDividerHeight(0);
+        this.refresh();
+        return _listView;
+    }
+
+    public void refresh()
+    {
+        if(_gmsh == null) return;
+        // TODO temporary, remove must be implemented in listview
+        if(_listView != null){ _listView.clear(); params.clear(); }
+        this.getAvailableParam();
+        if(_listView != null) _listView.refresh();
+    }
+
+    private void getAvailableParam()
+    {
     	String[] tmp = _gmsh.getParams();
-		for(String s : tmp){ // for each parameters in ONEALB
-			boolean found = false;
-			for(int i = 0; i<params.size(); i++){ // for each parameters
-				Parameter p = params.get(i);
-				if(s.split(Character.toString((char)0x03))[2].equals(p.getName())){ // the parameter already exist, just refresh it
-					if(p.getType().equals("ParameterNumber")){
-						if(((ParameterNumber)p).fromString(s) == -1){
-							params.remove(i);
-						}
-					}
-					else if(p.getType().equals("ParameterString")){
-						if(((ParameterString)p).fromString(s) == -1)
-							params.remove(i);
-					}
-					found = true;
-					break;
-				}
-			}
-			if(found) continue;
-			// add new parameter
-			if(s.split(Character.toString((char)0x03))[1].equals("number")){
-				final ParameterNumber mParam = new ParameterNumber(_listView.getContext(), _gmsh, "");
-				if(mParam.fromString(s) == -1) continue;
-				mParam.setOnParameterChangedListener(new ParameterNumber.OnParameterChangedListener() {
-					
-					public void OnParameterChanged() {
-						if(_gmsh.onelabCB("check") > 0 && mListener != null) mListener.OnModelOptionsChanged();;
-						refresh();
-					}
-				});
-				params.add(mParam);
-				if(_listView != null)
-					_listView.addItem(mParam.getName().split("/")[0].equals("Parameters")? mParam.getName().split("/")[0] + " > " + mParam.getName().split("/")[1]: mParam.getName().split("/")[0], mParam.getView());
-			}
-			else if(s.split("|")[1].equals("string")){
-				ParameterString mParam = new ParameterString(_listView.getContext(), _gmsh, "");
-				if(mParam.fromString(s) != -1){
-					mParam.setOnParameterChangedListener(new ParameterString.OnParameterChangedListener() {
-						
-						public void OnParameterChanged() {
-							if(_gmsh.onelabCB("check") > 0 && mListener != null) mListener.OnModelOptionsChanged();
-							refresh();
-						}
-					});
-					params.add(mParam);
-					if(_listView != null)
-						_listView.addItem(mParam.getName().split("/")[0].equals("Parameters")? mParam.getName().split("/")[0] + " > " + mParam.getName().split("/")[1]: mParam.getName().split("/")[0], mParam.getView());
-				}
-			}
-		}
+        for(String s : tmp){ // for each parameters in ONEALB
+            boolean found = false;
+            for(int i = 0; i<params.size(); i++){ // for each parameters
+                Parameter p = params.get(i);
+                if(s.split(Character.toString((char)0x03))[2].equals(p.getName())){
+                    // the parameter already exist, just refresh it
+                    if(p.getType().equals("ParameterNumber")){
+                        if(((ParameterNumber)p).fromString(s) == -1){
+                            params.remove(i);
+                        }
+                    }
+                    else if(p.getType().equals("ParameterString")){
+                        if(((ParameterString)p).fromString(s) == -1)
+                            params.remove(i);
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if(found) continue;
+            // add new parameter
+            if(s.split(Character.toString((char)0x03))[1].equals("number")){
+                final ParameterNumber mParam = new ParameterNumber(_listView.getContext(), _gmsh, "");
+                if(mParam.fromString(s) == -1) continue;
+                mParam.setOnParameterChangedListener(new ParameterNumber.OnParameterChangedListener() {
+                        public void OnParameterChanged() {
+                            if(_gmsh.onelabCB("check") > 0 && mListener != null)
+                                mListener.OnModelOptionsChanged();
+                            refresh();
+                        }
+                    });
+                params.add(mParam);
+                if(_listView != null)
+                    _listView.addItem(mParam.getName().split("/")[0].equals("Parameters")?
+                                      mParam.getName().split("/")[0] + " > " +
+                                      mParam.getName().split("/")[1] :
+                                      mParam.getName().split("/")[0], mParam.getView());
+            }
+            else if(s.split("|")[1].equals("string")){
+                ParameterString mParam = new ParameterString(_listView.getContext(), _gmsh, "");
+                if(mParam.fromString(s) != -1){
+                    mParam.setOnParameterChangedListener
+                        (new ParameterString.OnParameterChangedListener() {
+                                public void OnParameterChanged() {
+                                    if(_gmsh.onelabCB("check") > 0 && mListener != null)
+                                        mListener.OnModelOptionsChanged();
+                                    refresh();
+                                }
+                            });
+                    params.add(mParam);
+                    if(_listView != null)
+                        _listView.addItem(mParam.getName().split("/")[0].equals("Parameters") ?
+                                          mParam.getName().split("/")[0] + " > " +
+                                          mParam.getName().split("/")[1] :
+                                          mParam.getName().split("/")[0], mParam.getView());
+                }
+            }
+        }
+    }
+    private OnModelOptionsChangedListener mListener;
+    public void setOnModelOptionsChangedListener(OnModelOptionsChangedListener listener)
+    {
+        mListener = listener;
+    }
+    public interface OnModelOptionsChangedListener
+    {
+        void OnModelOptionsChanged();
     }
-	private OnModelOptionsChangedListener mListener;
-	public void setOnModelOptionsChangedListener(OnModelOptionsChangedListener listener) { mListener = listener;}
-	public interface OnModelOptionsChangedListener {
-		void OnModelOptionsChanged();
-	}
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsPostProcessingFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsPostProcessingFragment.java
index cc44519..1912b9b 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsPostProcessingFragment.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsPostProcessingFragment.java
@@ -1,6 +1,7 @@
 package org.geuz.onelab;
 
 import java.util.ArrayList;
+import java.lang.Math;
 
 import android.app.Fragment;
 import android.content.Context;
@@ -20,101 +21,98 @@ import android.widget.SeekBar;
 import android.widget.Spinner;
 
 public class OptionsPostProcessingFragment extends Fragment{
-	private Gmsh _gmsh;
-	private int _pview;
-	
-	public static OptionsPostProcessingFragment newInstance(Gmsh g, int p) {
-		OptionsPostProcessingFragment fragment = new OptionsPostProcessingFragment();
-		Bundle bundle = new Bundle();
-		bundle.putParcelable("Gmsh", g);
-		bundle.putInt("PView", p);
-		fragment.setArguments(bundle);
+    private Gmsh _gmsh;
+    private int _pview;
+
+    public static OptionsPostProcessingFragment newInstance(Gmsh g, int p)
+    {
+        OptionsPostProcessingFragment fragment = new OptionsPostProcessingFragment();
+        Bundle bundle = new Bundle();
+        bundle.putParcelable("Gmsh", g);
+        bundle.putInt("PView", p);
+        fragment.setArguments(bundle);
         return fragment;
-	}
-	
-	private OptionsPostProcessingFragment() {
-		super();
-	}
+    }
+
+    private OptionsPostProcessingFragment()
+    {
+        super();
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        _gmsh = getArguments().getParcelable("Gmsh");
+        _pview = getArguments().getInt("PView");
+    }
 
-	@Override
-	public void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		_gmsh = getArguments().getParcelable("Gmsh");
-		_pview = getArguments().getInt("PView");
-	}
-	
-	@Override
-	public View onCreateView(LayoutInflater inflater, ViewGroup container,
-			Bundle savedInstanceState) {
-		String[] PViews = _gmsh.getPView();
-		String[] infos = PViews[_pview].split("\n");
-		getActivity().getActionBar().setTitle(infos[0]);
-		LinearLayout layout =  (LinearLayout)inflater.inflate(R.layout.fragment_postprocessing, container, false);
-		final Spinner intervalsType = (Spinner)layout.findViewById(R.id.intervals_type);
-		final EditText intervals = (EditText)layout.findViewById(R.id.intervals);
-		final SeekBar raiseZ = (SeekBar)layout.findViewById(R.id.raisez);
-		raiseZ.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
-			
-			public void onStopTrackingTouch(SeekBar seekBar) {_gmsh.setPView(_pview, -1, -1, -1, seekBar.getProgress());}
-			public void onStartTrackingTouch(SeekBar seekBar) {} // UNUSED Auto-generated method stub
-			public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } // UNUSED Auto-generated method stub
-		});
-		raiseZ.setProgress(Integer.parseInt(infos[4]));
-		intervalsType.setEnabled(infos[2].equals("1"));
-		ArrayList<String> choices;
-		ArrayAdapter<String> adapter;
-		choices = new ArrayList<String>();
-		choices.add("Iso-values");
-		choices.add("Continous map");
-		choices.add("Filled iso-values");
-		adapter = new ArrayAdapter<String>(container.getContext(), android.R.layout.simple_spinner_dropdown_item, choices);
-		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
-		intervalsType.setAdapter(adapter);
-		intervalsType.setSelection(Integer.parseInt(infos[1])-1);
-		intervalsType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-			public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
-				_gmsh.setPView(_pview, pos+1, -1, -1, -1);
-				//TODO glView.requestRender();
-				intervals.setEnabled(pos == 0 || pos == 2);
-			}
-			public void onNothingSelected(AdapterView<?> arg0) {} // Unused Auto-generated method stub
-		});
-		intervals.setText(infos[3]);
-		intervals.setOnKeyListener(new View.OnKeyListener() {
-			
-			public boolean onKey(View v, int keyCode, KeyEvent event) {
-				if(keyCode == KeyEvent.KEYCODE_ENTER){ // hide the keyboard
-					InputMethodManager imm = (InputMethodManager)intervals.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-					imm.hideSoftInputFromWindow(intervals.getWindowToken(), 0);
-					return true;
-				}
-				return false;
-			}
-		});
-		intervals.addTextChangedListener(new TextWatcher() {
-			
-			public void onTextChanged(CharSequence s, int start, int before, int count) {
-				
-				int nIso = 1;
-				try {
-					if(s.length() < 1) nIso = 1;
-					else nIso = Integer.parseInt(s.toString());
-				}
-				catch(NumberFormatException e)
-				{
-					nIso = 1;
-					intervals.setText("");
-				}
-				if(nIso > 1000) {_gmsh.setPView(_pview, -1, -1, 1000, -1); intervals.setText("1000");}
-				else if(nIso > 0) _gmsh.setPView(_pview, -1, -1, nIso, -1);
-				else _gmsh.setPView(_pview, -1, -1, 1, -1);
-			}
-			
-			public void beforeTextChanged(CharSequence s, int start, int count, int after) {} // UNUSED Auto-generated method stub
-			public void afterTextChanged(Editable s) {} // UNUSED Auto-generated method stub
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState)
+    {
+        getActivity().getActionBar().setTitle(_gmsh.getStringOption("View", "Name", _pview));
+        LinearLayout layout =  (LinearLayout)inflater.inflate(R.layout.fragment_postprocessing,
+                                                              container, false);
+        final Spinner intervalsType = (Spinner)layout.findViewById(R.id.intervals_type);
+        intervalsType.setEnabled(_gmsh.getDoubleOption("View", "Visible", _pview) > 0.);
+        ArrayList<String> choices;
+        ArrayAdapter<String> adapter;
+        choices = new ArrayList<String>();
+        choices.add("Iso-values");
+        choices.add("Continous map");
+        choices.add("Filled iso-values");
+        adapter = new ArrayAdapter<String>(container.getContext(),
+                                           android.R.layout.simple_spinner_dropdown_item, choices);
+        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        intervalsType.setAdapter(adapter);
+        intervalsType.setSelection((int)_gmsh.getDoubleOption("View", "IntervalsType", _pview) - 1);
+        intervalsType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+                public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+                    _gmsh.setDoubleOption("View", "IntervalsType", pos + 1, _pview);
+                    // TODO glView.requestRender();
+                }
+                // Unused Auto-generated method stub
+                public void onNothingSelected(AdapterView<?> arg0) {}
+            });
 
-		});
+        final SeekBar intervals = (SeekBar)layout.findViewById(R.id.intervals);
+        intervals.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+                public void onStopTrackingTouch(SeekBar seekBar) {
+                    double d = seekBar.getProgress();
+                    if(d < 1.) d = 1.;
+                    _gmsh.setDoubleOption("View", "NbIso", d, _pview);
+                }
+                // UNUSED Auto-generated method stub
+                public void onStartTrackingTouch(SeekBar seekBar) {}
+                // UNUSED Auto-generated method stub
+                public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { }
+            });
+        intervals.setProgress((int)_gmsh.getDoubleOption("View", "NbIso", _pview));
 
-		return layout;
-	}
+        final SeekBar raiseZ = (SeekBar)layout.findViewById(R.id.raisez);
+        raiseZ.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+                public void onStopTrackingTouch(SeekBar seekBar) {
+                    double maxval = Math.max(Math.abs(_gmsh.getDoubleOption("View", "Min", _pview)),
+                                             Math.abs(_gmsh.getDoubleOption("View", "Max", _pview)));
+                    if(maxval == 0.) maxval = 1.;
+                    double val2 = 2. * _gmsh.getDoubleOption("General", "BoundingBoxSize", 0) / maxval;
+                    // map [0,100] to [-val2,val2]
+                    double d = 2 * val2 * (seekBar.getProgress() / 100. - 0.5);
+                    _gmsh.setDoubleOption("View", "RaiseZ", d, _pview);
+                }
+                // UNUSED Auto-generated method stub
+                public void onStartTrackingTouch(SeekBar seekBar) {}
+                // UNUSED Auto-generated method stub
+                public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { }
+            });
+        double maxval = Math.max(Math.abs(_gmsh.getDoubleOption("View", "Min", _pview)),
+                                 Math.abs(_gmsh.getDoubleOption("View", "Max", _pview)));
+        if(maxval == 0.) maxval = 1.;
+        double val2 = 2. * _gmsh.getDoubleOption("General", "BoundingBoxSize", 0) / maxval;
+        // map [-val2,val2] to [0,100]
+        double d = 100. * (_gmsh.getDoubleOption("View", "RaiseZ", _pview) / (2 * val2) + 0.5);
+        raiseZ.setProgress((int)d);
+        return layout;
+    }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/Parameter.java b/contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
index dae90a4..0c86a28 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
@@ -5,7 +5,6 @@ import android.graphics.Color;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-
 public class Parameter {
     protected Context _context;
     protected Gmsh _gmsh;
@@ -15,7 +14,8 @@ public class Parameter {
     protected boolean _changed;
     protected TextView _title;
 
-    public Parameter(Context context, Gmsh gmsh, String name){
+    public Parameter(Context context, Gmsh gmsh, String name)
+    {
         _context = context;
         _gmsh = gmsh;
         _readOnly = false;
@@ -25,13 +25,15 @@ public class Parameter {
         _title.setTextAppearance(context, android.R.style.TextAppearance_DeviceDefault_Medium);
         _title.setTextColor(Color.DKGRAY);
     }
-    public Parameter(Context context, Gmsh gmsh, String name, boolean readOnly){
+    public Parameter(Context context, Gmsh gmsh, String name, boolean readOnly)
+    {
         this(context, gmsh, name);
         _readOnly = readOnly;
         _changed = false;
     }
 
-    protected void update(){
+    protected void update()
+    {
         if(_label != null && !_label.equals(""))
             _title.setText(_label);
         else
@@ -39,14 +41,16 @@ public class Parameter {
         if(isReadOnly()) _title.setAlpha(0.423f);
     }
 
-    public void setName(String name) {_name = name;this.update();}
-    public void setReadOnly(boolean readOnly) {_readOnly = readOnly;this.update();}
-    public void setLabel(String label) {
+    public void setName(String name) { _name = name; this.update(); }
+    public void setReadOnly(boolean readOnly) { _readOnly = readOnly; this.update(); }
+    public void setLabel(String label)
+    {
         _label = label;
         this.update();
     }
-    public String getName() { return _name;}
-    public String getShortName() {
+    public String getName() { return _name; }
+    public String getShortName()
+    {
         if(_label != null && _label.length() > 0) return _label;
         String[] splited = _name.split("/");
         String name = splited[splited.length-1];
@@ -54,9 +58,10 @@ public class Parameter {
             name = name.substring(1);
         return name;
     }
-    public boolean isReadOnly() {return _readOnly;}
-    public String getLabel() {return _label;}
-    public int fromString(String s){
+    public boolean isReadOnly() { return _readOnly; }
+    public String getLabel() { return _label; }
+    public int fromString(String s)
+    {
         String[] infos = s.split(Character.toString((char)0x03));
         int pos=0;
         pos++;// version
@@ -74,14 +79,20 @@ public class Parameter {
         this.update();
         return pos;
     }
-    public boolean changed() { if(_changed){_changed=false; return true;}return _changed;}
-    public String getType(){return "Parameter";}
-
-    public LinearLayout getView() {
+    public boolean changed()
+    {
+        if(_changed){
+            _changed = false;
+            return true;
+        }
+        return _changed;
+    }
+    public String getType(){ return "Parameter"; }
+    public LinearLayout getView()
+    {
         LinearLayout paramLayout = new LinearLayout(_context);
         paramLayout.setOrientation(LinearLayout.VERTICAL);
         paramLayout.addView(_title);
         return paramLayout;
     }
 }
-
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java b/contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
index 4ec9e82..523113c 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
@@ -35,10 +35,12 @@ public class ParameterNumber extends Parameter {
     private EditText _edittext;
     private Stepper _stepper;
 
-    public ParameterNumber(Context context, Gmsh gmsh, String name){
+    public ParameterNumber(Context context, Gmsh gmsh, String name)
+    {
         super(context, gmsh, name);
     }
-    public ParameterNumber(Context context, Gmsh gmsh, String name,  double value, double min, double max, double step)
+    public ParameterNumber(Context context, Gmsh gmsh, String name,
+                           double value, double min, double max, double step)
     {
         this(context, gmsh, name);
         _value = value;
@@ -46,7 +48,8 @@ public class ParameterNumber extends Parameter {
         _max = max;
         _step = step;
     }
-    public ParameterNumber(Context context, Gmsh gmsh, String name, boolean readOnly, double value, double min, double max, double step)
+    public ParameterNumber(Context context, Gmsh gmsh, String name, boolean readOnly,
+                           double value, double min, double max, double step)
     {
         this(context, gmsh, name, value, min, max, step);
         _readOnly = readOnly;
@@ -61,13 +64,13 @@ public class ParameterNumber extends Parameter {
     {
         super.update();
         if(_bar != null) {
-            _title.setText(getShortName() + " (" + formatDouble(_value)+ ")");
+            _title.setText(getShortName() + " (" + formatDouble(_value) + ")");
             _bar.setMax(100);
             _bar.setProgress((int)(100*(_value-_min)/(_max-_min)));
             _bar.setEnabled(!this.isReadOnly());
         }
         else if(_spinner != null) {
-            for(int i=0;i<_choices.size();i++)
+            for(int i = 0; i < _choices.size(); i++)
                 if(_values.get(i) == _value)
                     _spinner.setSelection(i, true);
         }
@@ -76,7 +79,7 @@ public class ParameterNumber extends Parameter {
             _checkbox.setChecked((_value == 0)? false : true);
         }
         else if(_edittext != null) {
-            _edittext.setText(""+formatDouble(_value));
+            _edittext.setText("" + formatDouble(_value));
         }
         else if(_stepper != null) {
             _stepper.setMaximum((int)Math.round(_max));
@@ -86,19 +89,15 @@ public class ParameterNumber extends Parameter {
     }
     public void setValue(double value)
     {
-        if(value < _min || value > _max) {
-            //Log.w("ParameterNumber", "Incorect value "+value+" (max="+_max+" min="+_min+")");
-            return;
-        }
         if(value == _value) return;
         _value = value;
         _changed = true;
         _gmsh.setParam(getType(), getName(), String.valueOf(value));
         if(mListener != null) mListener.OnParameterChanged();
     }
-    public void setMin(double min) {_min = min;this.update();}
-    public void setMax(double max) {_max = max;this.update();}
-    public void setStep(double step) {_step = step;this.update();}
+    public void setMin(double min) { _min = min; this.update(); }
+    public void setMax(double max) { _max = max; this.update(); }
+    public void setStep(double step) { _step = step;this.update(); }
     public void addChoice(double choice, String value)
     {
         if(_values == null) {
@@ -108,7 +107,9 @@ public class ParameterNumber extends Parameter {
             _choices.add(value);
             if(_spinner == null) {
                 _spinner = new Spinner(_context);
-                _adapter = new ArrayAdapter<String>(_context, android.R.layout.simple_spinner_dropdown_item, _choices);
+                _adapter = new ArrayAdapter<String>(_context,
+                                                    android.R.layout.simple_spinner_dropdown_item,
+                                                    _choices);
                 _adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                 _spinner.setAdapter(_adapter);
             }
@@ -119,20 +120,19 @@ public class ParameterNumber extends Parameter {
                     _choices.set(i, value);
                     return;
                 }
-                else if(_values.get(i).equals(choice))
-                    {
-                        _choices.add(value);
-                        return;
-                    }
+                else if(_values.get(i).equals(choice)){
+                    _choices.add(value);
+                    return;
+                }
             }
             _values.add(choice);
             _choices.add(value);
         }
     }
-    public double getValue() {return _value;}
-    public double getMax() {return _max;}
-    public double getMin() {return _min;}
-    public double getStep() {return _step;}
+    public double getValue() { return _value; }
+    public double getMax() { return _max; }
+    public double getMin() { return _min; }
+    public double getStep() { return _step; }
     public int fromString(String s)
     {
         int pos = super.fromString(s);
@@ -149,7 +149,7 @@ public class ParameterNumber extends Parameter {
         pos++;// index
         int nChoix = Integer.parseInt(infos[pos++]); // choices' size
         double choices[] = new double[nChoix];
-        for(int i=0; i<nChoix; i++)
+        for(int i = 0; i < nChoix; i++)
             choices[i] = Double.parseDouble(infos[pos++]); // choice
         int nLabels = Integer.parseInt(infos[pos++]); // labels' size
         if(nChoix == 2 && choices[0] == 0 && choices[1] == 1 && nLabels == 0) {
@@ -159,7 +159,7 @@ public class ParameterNumber extends Parameter {
         }
         if(_choices != null)_choices.clear();
         if(_values != null) _values.clear();
-        for(int i=0; i<nLabels && nChoix == nLabels; i++){
+        for(int i = 0; i < nLabels && nChoix == nLabels; i++){
             double val = Double.parseDouble(infos[pos++]); // choice
             this.addChoice(val, infos[pos++]); // label
         }
@@ -181,43 +181,48 @@ public class ParameterNumber extends Parameter {
         paramLayout.addView(_title);
         if(!_readOnly) paramLayout.setOnLongClickListener(new View.OnLongClickListener(){
                 @Override
-                public boolean onLongClick(View v){
-			AlertDialog.Builder builder = new AlertDialog.Builder(_context);
-			LinearLayout layout = new LinearLayout(_context);
-			layout.setOrientation(LinearLayout.VERTICAL);
-			TextView label = new TextView(_context);
-			label.setText("Edit value of \n" + _name);
-			EditText edit = new EditText(_context);
-			edit.setText(String.valueOf(_value));
-			edit.addTextChangedListener(new TextWatcher() {
-				public void onTextChanged(CharSequence s, int start, int before, int count) {
-					try {
-						if(s.length() < 1)  _tmpValue = 1;
-						_tmpValue = Double.parseDouble(s.toString());
-					} catch(NumberFormatException e) {
-	                                	_tmpValue = 1;
-					}
-				}
-		                    public void beforeTextChanged(CharSequence s, int start, int count, int after) {} // UNUSED Auto-generated method stub
-		                    public void afterTextChanged(Editable s) {} // UNUSED Auto-generated method stub
-		        	});
-			edit.requestFocus();
-			//_context.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
-			layout.addView(label);
-			layout.addView(edit);
-			builder.setView(layout)
-				.setPositiveButton("OK", new DialogInterface.OnClickListener() {
-					public void onClick(DialogInterface dialog, int id) {
-						setValue(_tmpValue);
-					}
-				})
-				.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
-					public void onClick(DialogInterface dialog, int id) {
-						// User cancelled the dialog
-					}
-				});
-			builder.create().show();
-                	return true;
+                public boolean onLongClick(View v)
+                {
+                    AlertDialog.Builder builder = new AlertDialog.Builder(_context);
+                    LinearLayout layout = new LinearLayout(_context);
+                    layout.setOrientation(LinearLayout.VERTICAL);
+                    TextView label = new TextView(_context);
+                    label.setText("Edit value of \n" + _name);
+                    EditText edit = new EditText(_context);
+                    edit.setText(String.valueOf(_value));
+                    edit.addTextChangedListener(new TextWatcher() {
+                            public void onTextChanged(CharSequence s, int start, int before, int count) {
+                                try {
+                                    if(s.length() < 1)  _tmpValue = 1;
+                                    _tmpValue = Double.parseDouble(s.toString());
+                                }
+                                catch(NumberFormatException e) {
+                                    _tmpValue = 1;
+                                }
+                            }
+                            // UNUSED Auto-generated method stub
+                            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+                            // UNUSED Auto-generated method stub
+                            public void afterTextChanged(Editable s) {}
+                        });
+                    edit.requestFocus();
+                    //_context.getWindow().setSoftInputMode
+                    //    (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
+                    layout.addView(label);
+                    layout.addView(edit);
+                    builder.setView(layout)
+                        .setPositiveButton("OK", new DialogInterface.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int id) {
+                                    setValue(_tmpValue);
+                                }
+                            })
+                        .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int id) {
+                                    // User cancelled the dialog
+                                }
+                            });
+                    builder.create().show();
+                    return true;
                 }
             });
         if(_spinner != null) {
@@ -237,9 +242,7 @@ public class ParameterNumber extends Parameter {
                     public void onStopTrackingTouch(SeekBar seekBar) {
                         setValue(getMin() + (getMax() - getMin())*seekBar.getProgress()/100);
                     }
-
                     public void onStartTrackingTouch(SeekBar seekBar) {}
-
                     public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {}
                 });
         }
@@ -248,7 +251,6 @@ public class ParameterNumber extends Parameter {
             paramLayout.addView(_checkbox);
             _checkbox.setEnabled(!_readOnly);
             _checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-
                     public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                         setValue((isChecked)? 1 : 0);
                     }
@@ -261,35 +263,37 @@ public class ParameterNumber extends Parameter {
             _edittext.setOnKeyListener(new View.OnKeyListener() {
                     public boolean onKey(View v, int keyCode, KeyEvent event) {
                         if(keyCode == KeyEvent.KEYCODE_ENTER){ // hide the keyboard
-                            InputMethodManager imm = (InputMethodManager)_context.getSystemService(
-                                                                                                   Context.INPUT_METHOD_SERVICE);
+                            InputMethodManager imm = (InputMethodManager)_context.getSystemService
+                                (Context.INPUT_METHOD_SERVICE);
                             imm.hideSoftInputFromWindow(_edittext.getWindowToken(), 0);
                             setValue(_value);
                             _edittext.clearFocus();
                             return true;
                         }
-                        if(keyCode > KeyEvent.KEYCODE_9 && keyCode != KeyEvent.KEYCODE_NUMPAD_DOT && (keyCode <KeyEvent.KEYCODE_NUMPAD_0 || keyCode >KeyEvent.KEYCODE_NUMPAD_9) && keyCode != KeyEvent.KEYCODE_DEL)
+                        if(keyCode > KeyEvent.KEYCODE_9 &&
+                           keyCode != KeyEvent.KEYCODE_NUMPAD_DOT &&
+                           (keyCode <KeyEvent.KEYCODE_NUMPAD_0 ||
+                            keyCode >KeyEvent.KEYCODE_NUMPAD_9) &&
+                           keyCode != KeyEvent.KEYCODE_DEL)
                             return true;
                         return false;
                     }
                 });
             _edittext.addTextChangedListener(new TextWatcher() {
-
                     public void onTextChanged(CharSequence s, int start, int before, int count) {
                         try {
                             if(s.length() < 1) _value = 1;
                             else _value = Double.parseDouble(s.toString());
                         }
-                        catch(NumberFormatException e)
-                            {
-                                _value = 1;
-                                //_edittext.setText("");
-                            }
+                        catch(NumberFormatException e){
+                            _value = 1;
+                            //_edittext.setText("");
+                        }
                     }
-
-                    public void beforeTextChanged(CharSequence s, int start, int count, int after) {} // UNUSED Auto-generated method stub
-                    public void afterTextChanged(Editable s) {} // UNUSED Auto-generated method stub
-
+                    // UNUSED Auto-generated method stub
+                    public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+                    // UNUSED Auto-generated method stub
+                    public void afterTextChanged(Editable s) {}
                 });
         }
         else if(_stepper != null) {
@@ -303,7 +307,10 @@ public class ParameterNumber extends Parameter {
         return paramLayout;
     }
     private OnParameterChangedListener mListener;
-    public void setOnParameterChangedListener(OnParameterChangedListener listener) { mListener = listener;}
+    public void setOnParameterChangedListener(OnParameterChangedListener listener)
+    {
+        mListener = listener;
+    }
     public interface OnParameterChangedListener
     {
         void OnParameterChanged();
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ParameterString.java b/contrib/mobile/Android/src/org/geuz/onelab/ParameterString.java
index 0847f0c..c3c0ce4 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/ParameterString.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/ParameterString.java
@@ -16,14 +16,15 @@ import android.widget.Spinner;
 
 public class ParameterString extends Parameter{
 
-    private  String _kind;
+    private String _kind;
     private int _index;
     private ArrayList<String> _choices;
     private ArrayAdapter<String> _adapter;
     private Spinner _spinner;
     private EditText _edittext;
 
-    public ParameterString(Context context, Gmsh gmsh, String name) {
+    public ParameterString(Context context, Gmsh gmsh, String name)
+    {
         super(context, gmsh, name);
         _choices = new ArrayList<String>();
         _choices.add("-"); // Default choice
@@ -33,12 +34,15 @@ public class ParameterString extends Parameter{
     {
         if(_spinner != null) return;
         _spinner = new Spinner(_context);
-        _adapter = new ArrayAdapter<String>(_context, android.R.layout.simple_spinner_dropdown_item, _choices);
+        _adapter = new ArrayAdapter<String>(_context,
+                                            android.R.layout.simple_spinner_dropdown_item,
+                                            _choices);
         _adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
         _spinner.setAdapter(_adapter);
     }
 
-    protected void update(){
+    protected void update()
+    {
         super.update();
         if(_spinner != null)
             _spinner.setSelection(_index);
@@ -46,14 +50,17 @@ public class ParameterString extends Parameter{
             _edittext.setText(_choices.get(0));
     }
 
-    public void setValue(int index) {
+    public void setValue(int index)
+    {
         if(index == _index) return;
         _changed = true;
         _index = index;
         _gmsh.setParam(getType(), getName(), _choices.get(_index));
         if(mListener != null) mListener.OnParameterChanged();
     }
-    public void setValue(String value) {
+
+    public void setValue(String value)
+    {
         int index = _choices.indexOf(value);
         if(index < 0) { // the value is not in the list, add it
             this.addChoices(value);
@@ -65,8 +72,10 @@ public class ParameterString extends Parameter{
         _gmsh.setParam(getType(), getName(), value);
         if(mListener != null) mListener.OnParameterChanged();
     }
-    public void setKind(String kind) {_kind = kind;}
-    public void addChoices(String choice) {
+
+    public void setKind(String kind) { _kind = kind; }
+    public void addChoices(String choice)
+    {
         if(_edittext == null && _spinner == null) createSpinner();
         for(String c : _choices) // do not add a duplicate value
             if(c.equals(choice))return;
@@ -75,11 +84,16 @@ public class ParameterString extends Parameter{
         _choices.add(choice);
         this.update();
     }
-    public String getValue() {if( _index < 0) return "";return _choices.get(_index);}
-    public String getKind() {return _kind;}
-    public int getIndex() {return _index;}
-    public ArrayList<String> getChoices() {return _choices;}
-    public int fromString(String s){
+    public String getValue() {
+        if( _index < 0)
+            return "";
+        return _choices.get(_index);
+    }
+    public String getKind() { return _kind; }
+    public int getIndex() { return _index; }
+    public ArrayList<String> getChoices() { return _choices; }
+    public int fromString(String s)
+    {
         int pos = super.fromString(s);
         if(pos <= 0) return -1; // error
         String[] infos = s.split(Character.toString((char)0x03));
@@ -97,8 +111,9 @@ public class ParameterString extends Parameter{
         this.update();
         return pos;
     }
-    public String getType(){return "ParameterString";}
-    public LinearLayout getView() {
+    public String getType(){ return "ParameterString"; }
+    public LinearLayout getView()
+    {
         LinearLayout paramLayout = new LinearLayout(_context);
         paramLayout.setOrientation(LinearLayout.VERTICAL);
         paramLayout.addView(_title);
@@ -106,24 +121,20 @@ public class ParameterString extends Parameter{
             paramLayout.addView(_spinner);
             _spinner.setEnabled(!_readOnly);
             _spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-
                     public void onNothingSelected(AdapterView<?> arg0) {}
-
                     public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
                         setValue(pos);
                     }
-
                 });
         }
         else if(_edittext != null){
             paramLayout.addView(_edittext);
             _edittext.setEnabled(!_readOnly);
             _edittext.setOnKeyListener(new View.OnKeyListener() {
-
                     public boolean onKey(View v, int keyCode, KeyEvent event) {
                         if(keyCode == KeyEvent.KEYCODE_ENTER){ // hide the keyboard
-                            InputMethodManager imm = (InputMethodManager)_context.getSystemService(
-                                                                                                   Context.INPUT_METHOD_SERVICE);
+                            InputMethodManager imm = (InputMethodManager)_context.getSystemService
+                                (Context.INPUT_METHOD_SERVICE);
                             imm.hideSoftInputFromWindow(_edittext.getWindowToken(), 0);
                             _edittext.clearFocus();
                             return true;
@@ -132,13 +143,11 @@ public class ParameterString extends Parameter{
                     }
                 });
             _edittext.addTextChangedListener(new TextWatcher() {
-
                     public void onTextChanged(CharSequence s, int start, int before, int count) {
                         _choices.clear(); _choices.add(s.toString());
                     }
-
-                    public void beforeTextChanged(CharSequence s, int start, int count, int after) {} // UNUSED Auto-generated method stub
-
+                    // UNUSED Auto-generated method stub
+                    public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
                     public void afterTextChanged(Editable s) {
                         _gmsh.setParam(getType(), getName(), _choices.get(0));
                     }
@@ -147,8 +156,12 @@ public class ParameterString extends Parameter{
         return paramLayout;
     }
     private OnParameterChangedListener mListener;
-    public void setOnParameterChangedListener(OnParameterChangedListener listener) { mListener = listener;}
-    public interface OnParameterChangedListener {
+    public void setOnParameterChangedListener(OnParameterChangedListener listener)
+    {
+        mListener = listener;
+    }
+    public interface OnParameterChangedListener
+    {
         void OnParameterChanged();
     }
 
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/PostProcessingActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/PostProcessingActivity.java
index f0407e4..6c520a4 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/PostProcessingActivity.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/PostProcessingActivity.java
@@ -6,23 +6,28 @@ import android.view.MenuItem;
 import android.view.WindowManager;
 
 public class PostProcessingActivity extends Activity{
-	@Override
-	protected void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
-		setContentView(R.layout.activity_fragment);
-		Bundle extra = getIntent().getExtras();
-		int id = extra.getInt("PView", 0);
-		Gmsh gmsh = extra.getParcelable("Gmsh");
-		getActionBar().setDisplayHomeAsUpEnabled(true);
-		OptionsPostProcessingFragment optionsFragment = OptionsPostProcessingFragment.newInstance(gmsh, id);
-		getFragmentManager().beginTransaction().add(R.id.model_fragment, optionsFragment).commit();
-	}
-	
-	@Override
-	public boolean onMenuItemSelected(int featureId, MenuItem item) {
-		if(item.getItemId() == android.R.id.home)
-			this.finish();
-		return super.onMenuItemSelected(featureId, item);
-	}
+    @Override
+    protected void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                             WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        setContentView(R.layout.activity_fragment);
+        Bundle extra = getIntent().getExtras();
+        int id = extra.getInt("PView", 0);
+        Gmsh gmsh = extra.getParcelable("Gmsh");
+        getActionBar().setDisplayHomeAsUpEnabled(true);
+        OptionsPostProcessingFragment optionsFragment =
+            OptionsPostProcessingFragment.newInstance(gmsh, id);
+        getFragmentManager().beginTransaction().add(R.id.model_fragment,
+                                                    optionsFragment).commit();
+    }
+
+    @Override
+    public boolean onMenuItemSelected(int featureId, MenuItem item)
+    {
+        if(item.getItemId() == android.R.id.home)
+            this.finish();
+        return super.onMenuItemSelected(featureId, item);
+    }
 }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/SeparatedListView.java b/contrib/mobile/Android/src/org/geuz/onelab/SeparatedListView.java
index 4a20677..9fcc861 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/SeparatedListView.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/SeparatedListView.java
@@ -12,7 +12,6 @@ import android.widget.BaseAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
 
-
 public class SeparatedListView extends ListView{
 
     private SeparatedListAdaptater adapter;
@@ -35,15 +34,18 @@ public class SeparatedListView extends ListView{
         adapter = new SeparatedListAdaptater();
         this.setAdapter(adapter);
     }
-
-    public void addItem(String header, View item) {
-        TextView title = (TextView)((LayoutInflater) _context.getSystemService( Context.LAYOUT_INFLATER_SERVICE )).inflate(R.layout.list_header, null);
+    public void addItem(String header, View item)
+    {
+        TextView title = (TextView)
+            ((LayoutInflater) _context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
+            .inflate(R.layout.list_header, null);
         title.setText(header);
         adapter.addItem(header, title, item);
         adapter.notifyDataSetChanged();
         this.invalidateViews();
     }
-    public int itemsCountInSection(String header) {
+    public int itemsCountInSection(String header)
+    {
         return adapter.getCountForSection(header);
     }
     public void refresh()
@@ -51,13 +53,11 @@ public class SeparatedListView extends ListView{
         adapter.notifyDataSetChanged();
         this.invalidateViews();
     }
-
     public void clear()
     {
         adapter.clear();
         adapter.notifyDataSetChanged();
     }
-
     private class Section{
         private String _name;
         private List<View> _items;
@@ -78,17 +78,13 @@ public class SeparatedListView extends ListView{
             return _items.get(pos);
         }
     }
-
     private class SeparatedListAdaptater extends BaseAdapter{
-
         List<Section> sections;
         List<View> titles;
-
         public SeparatedListAdaptater() {
             sections = new ArrayList<SeparatedListView.Section>();
             titles = new ArrayList<View>();
         }
-
         public void addItem(String header, View title, View item) {
             for(Section s : sections){
                 if(s.getName().equals(header)){
@@ -101,7 +97,6 @@ public class SeparatedListView extends ListView{
             sections.add(s);
             titles.add(title);
         }
-
         //@Override
         public int getCount() {
             int count = 0;
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java b/contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
index 48bd02e..13febbf 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
@@ -23,8 +23,7 @@ public class SplashScreen extends Activity{
 
     private Intent newIntent;
 
-    private final Handler handler = new Handler()
-	{
+    private final Handler handler = new Handler() {
             public void handleMessage(Message msg) {
                 switch (msg.what) {
                 case STOPSPLASH:
@@ -40,11 +39,13 @@ public class SplashScreen extends Activity{
             };
 	};
 
-    protected void onCreate(android.os.Bundle savedInstanceState) {
+    protected void onCreate(android.os.Bundle savedInstanceState)
+    {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.splash);
         Intent oldIntent = this.getIntent();
-        if(oldIntent != null && oldIntent.getAction() != null && oldIntent.getAction().equals(Intent.ACTION_VIEW)){
+        if(oldIntent != null && oldIntent.getAction() != null &&
+           oldIntent.getAction().equals(Intent.ACTION_VIEW)){
             newIntent = new Intent(SplashScreen.this, MainActivity.class);
             newIntent.setAction(oldIntent.getAction());
             newIntent.setData(oldIntent.getData());
@@ -54,15 +55,17 @@ public class SplashScreen extends Activity{
 	SharedPreferences sharedPref = getSharedPreferences(getPackageName(), Context.MODE_PRIVATE);
 	int codev = 0;
 	try {
-		codev = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
-	} catch (android.content.pm.PackageManager.NameNotFoundException e) {}
+            codev = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
+	}
+        catch (android.content.pm.PackageManager.NameNotFoundException e) {
+        }
 	int modelsv = sharedPref.getInt("OnelabModelsVersion", 0);
 	if(modelsv == 0 || modelsv != codev) {
-		Log.d("Models", "Updating models to version "+codev);
-		SharedPreferences.Editor editor = sharedPref.edit();
-		editor.putInt("OnelabModelsVersion", codev);
-		editor.commit();
-		loadNative();
+            Log.d("Models", "Updating models to version "+codev);
+            SharedPreferences.Editor editor = sharedPref.edit();
+            editor.putInt("OnelabModelsVersion", codev);
+            editor.commit();
+            loadNative();
 	}
 	else Log.d("Models", "Leaving models as-is (version "+modelsv+")");
         final Message msg = new Message();
@@ -76,7 +79,8 @@ public class SplashScreen extends Activity{
     private void loadNative()
     {
     	try {
-            ZipInputStream zipStream = new ZipInputStream(new BufferedInputStream(getResources().openRawResource(R.raw.models)));
+            ZipInputStream zipStream = new ZipInputStream
+                (new BufferedInputStream(getResources().openRawResource(R.raw.models)));
             ZipEntry entry;
             while ((entry = zipStream.getNextEntry()) != null) {
                 String name = entry.getName();
@@ -95,11 +99,13 @@ public class SplashScreen extends Activity{
                     outputStream = openFileOutput(name, Context.MODE_PRIVATE);
                 }
                 byte[] buffer = new byte[2048];
-                for (int i = zipStream.read(buffer, 0, buffer.length); i > 0;i = zipStream.read(buffer, 0, buffer.length))
+                for (int i = zipStream.read(buffer, 0, buffer.length); i > 0;
+                     i = zipStream.read(buffer, 0, buffer.length))
                     outputStream.write(buffer,0,i);
             }
             zipStream.close();
-        } catch (IOException e1) {
+        }
+        catch (IOException e1) {
             e1.printStackTrace();
         }
     }
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/Stepper.java b/contrib/mobile/Android/src/org/geuz/onelab/Stepper.java
index 5392218..46b2047 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/Stepper.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/Stepper.java
@@ -8,7 +8,6 @@ import android.widget.EditText;
 import android.text.TextWatcher;
 import android.text.Editable;
 
-
 class Stepper extends LinearLayout{
 
     private int _min, _max, _val;
@@ -58,7 +57,10 @@ class Stepper extends LinearLayout{
     public void inc(){setValue(_val+1);}
     public void dec(){setValue(_val-1);}
 
-    public void setOnValueChangedListener(OnValueChangedListener listener) {_listener = listener;}
+    public void setOnValueChangedListener(OnValueChangedListener listener)
+    {
+        _listener = listener;
+    }
     public void setMaximum(int max){_max = max;}
     public void setMinimum(int min){_min = min;}
     public void setValue(int val){
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/StringTexture.java b/contrib/mobile/Android/src/org/geuz/onelab/StringTexture.java
index c53de72..2528573 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/StringTexture.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/StringTexture.java
@@ -26,7 +26,8 @@ public class StringTexture {
         getBitmapFromText(12.0f, Color.BLACK);
     }
 
-    private void getBitmapFromText(float textSize, int textColor) {
+    private void getBitmapFromText(float textSize, int textColor)
+    {
         Paint paint = new Paint();
         paint.setTextSize(textSize);
         paint.setColor(textColor);
@@ -41,7 +42,8 @@ public class StringTexture {
         canvas.drawText(_text, 0, baseline, paint);
     }
 
-    private void loadGLTexture(GL10 gl) {
+    private void loadGLTexture(GL10 gl)
+    {
         if(_bitmap == null) return;
         gl.glGenTextures(1, _textures, 0);
 
@@ -55,7 +57,8 @@ public class StringTexture {
         _bitmap.recycle();
     }
 
-    public void draw(GL10 gl, int x, int y) {
+    public void draw(GL10 gl, int x, int y)
+    {
         gl.glEnable(GL10.GL_TEXTURE_2D);
         // VERTEX
         float vertex[] = {
@@ -87,7 +90,6 @@ public class StringTexture {
         loadGLTexture(gl);
         gl.glBindTexture(GL10.GL_TEXTURE_2D, _textures[0]);
 
-
         // DRAW
         gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
         gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
@@ -122,14 +124,6 @@ public class StringTexture {
         Canvas canvas = new Canvas(bitmap);
         canvas.setBitmap(bitmap);
         canvas.drawText(s, 0, baseline, paint);
-        // TMP
-        try {
-            FileOutputStream stream = new FileOutputStream(Environment.getExternalStorageDirectory()+"/test.jpg");
-            bitmap.compress(CompressFormat.JPEG, 80, stream);
-        } catch (FileNotFoundException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
         // Get the pixel in a map
         ByteBuffer buffer = ByteBuffer.allocateDirect(width*height);
         buffer.order(ByteOrder.nativeOrder());
diff --git a/contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java b/contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
index c69bbbc..ea2ab71 100644
--- a/contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
+++ b/contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
@@ -17,7 +17,8 @@ class mGLSurfaceView extends GLSurfaceView {
     private GLESRender _renderer;
     private boolean _rotate;
 
-    public mGLSurfaceView(Context context, GLESRender renderer) {
+    public mGLSurfaceView(Context context, GLESRender renderer)
+    {
         super(context);
         _renderer = renderer;
         gesture = new GestureDetector(context, new GestureListener());
@@ -44,7 +45,8 @@ class mGLSurfaceView extends GLSurfaceView {
     }
 
     @Override
-	public boolean onTouchEvent(MotionEvent event) {
+    public boolean onTouchEvent(MotionEvent event)
+    {
         scaleGesture.onTouchEvent(event);
         return gesture.onTouchEvent(event);
     }
@@ -54,18 +56,11 @@ class mGLSurfaceView extends GLSurfaceView {
             _renderer.startInteraction(e.getX(),e.getY());
             return true;
         }
-
+        // UNUSED Auto-generated method stub
         public boolean onFling(MotionEvent e1, MotionEvent e2,
-                               float velocityX, float velocityY) {
-            // UNUSED Auto-generated method stub
-            return false;
-        }
-
-        public void onLongPress(MotionEvent e) {
-            // UNUSED Auto-generated method stub
-
-        }
-
+                               float velocityX, float velocityY) { return false; }
+        // UNUSED Auto-generated method stub
+        public void onLongPress(MotionEvent e) { }
         public boolean onScroll(MotionEvent e1, MotionEvent e2,
 				float distanceX, float distanceY) {
             if(e1.getPointerCount() > 1 || e2.getPointerCount() > 1) return false;
@@ -76,39 +71,31 @@ class mGLSurfaceView extends GLSurfaceView {
             requestRender();
             return true;
         }
-
-        public void onShowPress(MotionEvent e) {
-            // UNUSED Auto-generated method stub
-
-        }
-
-        public boolean onSingleTapUp(MotionEvent e) {
-            // UNUSED Auto-generated method stub
-            return false;
-        }
-        public boolean onDoubleTap(MotionEvent e) {
-            // UNUSED Auto-generated method stub
-            return false;
-        }
+        // UNUSED Auto-generated method stub
+        public void onShowPress(MotionEvent e) { }
+        // UNUSED Auto-generated method stub
+        public boolean onSingleTapUp(MotionEvent e) { return false; }
+        // UNUSED Auto-generated method stub
+        public boolean onDoubleTap(MotionEvent e) { return false; }
         public boolean onDoubleTapEvent(MotionEvent e) {
             scaleFactor = 1f;
             _renderer.resetModelPosition();
             requestRender();
             return true;
         }
-        public boolean onSingleTapConfirmed(MotionEvent e) {
-            // UNUSED Auto-generated method stub
-            return false;
-        }
+        // UNUSED Auto-generated method stub
+        public boolean onSingleTapConfirmed(MotionEvent e) { return false; }
 
     }
-    public boolean getRotate() {return _rotate;}
-    public void setRotate(boolean r) {_rotate = r;}
-    public void resetScale(){
+    public boolean getRotate() { return _rotate; }
+    public void setRotate(boolean r) { _rotate = r; }
+    public void resetScale()
+    {
         scaleFactor = 1f;
         _renderer.scaleModel(scaleFactor);
     }
-    public Bitmap getScreenshot() {
+    public Bitmap getScreenshot()
+    {
         _renderer.needScreenshot();
         this.requestRender();
         while(_renderer.getScreenshot() == null);
diff --git a/contrib/mobile/CMakeLists.txt b/contrib/mobile/CMakeLists.txt
index d85a1ab..a432175 100644
--- a/contrib/mobile/CMakeLists.txt
+++ b/contrib/mobile/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Library to use Onelab (Gmsh/GetDP) on Android or iOS
-
 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 
 if(APPLE)
@@ -97,10 +95,20 @@ if(ENABLE_BUILD_IOS_EMULATOR OR ENABLE_BUILD_IOS)
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${PETSC_FRAMEWORK}/ ${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/frameworks/petsc.framework/
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${SLEPC_FRAMEWORK}/ ${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/frameworks/slepc.framework/
   )
+  add_custom_command(TARGET xcodeProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory
+                    ${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/files)
   foreach(DIR ${BENCHMARKS})
     get_filename_component(DIRNAME ${DIR} NAME)
     add_custom_command(TARGET xcodeProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
-                    ${DIR} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/files/${DIRNAME})
+                       ${DIR} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/files/${DIRNAME})
+    file(GLOB PNG ${DIR}/*.png)
+    foreach(IMG ${PNG})
+      get_filename_component(IMGNAME ${IMG} NAME)
+      if(NOT (IMGNAME MATCHES ".*_128.png"))
+        add_custom_command(TARGET xcodeProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
+                          "${CMAKE_CURRENT_BINARY_DIR}/Onelab/Onelab/files/${DIRNAME}/${IMGNAME}")
+      endif()
+    endforeach(IMG)
   endforeach(DIR)
 
   message(STATUS "")
@@ -155,10 +163,11 @@ if(ENABLE_BUILD_ANDROID)
   set_target_properties(androidOnelab PROPERTIES OUTPUT_NAME Onelab)
   target_link_libraries(androidOnelab ${LIBRARY_DEPS}  ${EXTERNAL_LIBRARIES})
   find_library(PETSC_LIB petsc PATH_SUFFIXES lib)
+  find_library(SLEPC_LIB slepc PATH_SUFFIXES lib)
   find_library(BLAS_LIB f2cblas PATH_SUFFIXES lib)
   find_library(LAPACK_LIB f2clapack PATH_SUFFIXES lib)
   set(ONELAB_LIB ${CMAKE_CURRENT_BINARY_DIR}/libs/libOnelab.so)
-  if(PETSC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
+  if(PETSC_LIB AND SLEPC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
     add_custom_target(androidProject
       COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Onelab/
       COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/models/
@@ -168,13 +177,26 @@ if(ENABLE_BUILD_ANDROID)
       COMMAND ${CMAKE_COMMAND} -E copy ${GETDP_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
       COMMAND ${CMAKE_COMMAND} -E copy ${ONELAB_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
       COMMAND ${CMAKE_COMMAND} -E copy ${PETSC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
+      COMMAND ${CMAKE_COMMAND} -E copy ${SLEPC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
       COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
       COMMAND ${CMAKE_COMMAND} -E copy ${BLAS_LIB} ${CMAKE_CURRENT_BINARY_DIR}/Onelab/libs/armeabi-v7a/
     )
+    add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory
+                      ${CMAKE_CURRENT_BINARY_DIR}/models)
+    add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
+                      ${CMAKE_CURRENT_BINARY_DIR}/Onelab/res/raw/models.zip)
     foreach(DIR ${BENCHMARKS})
       get_filename_component(DIRNAME ${DIR} NAME)
       add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
                       ${DIR} ${CMAKE_CURRENT_BINARY_DIR}/models/${DIRNAME})
+      file(GLOB PNG ${DIR}/*.png)
+      foreach(IMG ${PNG})
+	get_filename_component(IMGNAME ${IMG} NAME)
+	if(NOT (IMGNAME MATCHES ".*_128.png"))
+          add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
+                      "${CMAKE_CURRENT_BINARY_DIR}/models/${DIRNAME}/${IMGNAME}")
+	endif()
+      endforeach(IMG)
     endforeach(DIR)
     find_program(ZIP_COMMAND zip)
     add_custom_command(TARGET androidProject POST_BUILD COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/models/ && zip -r
@@ -187,7 +209,7 @@ if(ENABLE_BUILD_ANDROID)
   message(STATUS " * Finally you can build the app with ant 'ant debug'")
   message(STATUS "")
  
-  else(PETSC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
-    message(STATUS "Cannot make Android project without PETSc or without BLAS or without LAPACK or without \"Onelab library\"")
-  endif(PETSC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
+  else(PETSC_LIB AND SLEPC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
+    message(STATUS "Cannot make Android project without PETSc or SLEPc or without BLAS or without LAPACK or without \"Onelab library\"")
+  endif(PETSC_LIB AND SLEPC_LIB AND BLAS_LIB AND LAPACK_LIB AND ONELAB_LIB)
 endif(ENABLE_BUILD_ANDROID)
diff --git a/contrib/mobile/README.txt b/contrib/mobile/README.txt
index d451b4e..941360c 100644
--- a/contrib/mobile/README.txt
+++ b/contrib/mobile/README.txt
@@ -1,30 +1,367 @@
 This directory contains the source code for Onelab/Mobile, the mobile version of
 Onelab for iOS and Android devices.
 
-Copyright (C) 2014 Christophe Geuzaine and Maxime Graulich, University of Liege
+Copyright (C) 2014-2015 Christophe Geuzaine and Maxime Graulich, University of Liege
 
-On iTunes:
-
-Onelab (http://onelab.info) is a finite element package based on the open source
-mesh generator Gmsh (http://gmsh.info) and the solver GetDP
+Onelab/Mobile (http://onelab.info) is a finite element package based on the open
+source mesh generator Gmsh (http://gmsh.info) and the solver GetDP
 (http://getdp.info). It can be used to simulate a wide variety of multi-physic
 problems: electromagnetics, thermics, mechanics...
 
-Onelab comes packaged with a selection of ready-to-use examples. New models can
-be added through iTunes file sharing: see http://onelab.info/wiki/Mobile for
-more information.
+Onelab/Mobile comes packaged with a selection of ready-to-use examples. New
+models can be added through iTunes file sharing on iOS devices, or opened
+directly on your devices on Android: see http://onelab.info/wiki/Mobile for more
+information.
+
+Onelab/Mobile is available on the AppStore and the Google Play store:
 
 https://itunes.apple.com/us/app/onelab/id845930897
+https://play.google.com/store/apps/details?id=org.geuz.onelab
 
-On Google Play:
+Sample scripts for building Onelab/Mobile are available in utils/onelab_*_build.sh
 
-Onelab (http://onelab.info) is a finite element package based on the open source
-mesh generator Gmsh (http://gmsh.info) and the solver GetDP
-(http://getdp.info). It can be used to simulate a wide variety of multi-physic
-problems: electromagnetics, thermics, mechanics... 
+                              ***
 
-Onelab comes packaged with a selection of ready-to-use examples. New models can
-be opened directly on your device: see http://onelab.info/wiki/Mobile for more
-information.
+Onelab/Mobile is provided under the terms of the GNU General Public License
+(GPL), Version 2 or later.
 
-https://play.google.com/store/apps/details?id=org.geuz.onelab
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/contrib/mobile/androidGModel.cpp b/contrib/mobile/androidGModel.cpp
index c8de0cc..597d8ad 100644
--- a/contrib/mobile/androidGModel.cpp
+++ b/contrib/mobile/androidGModel.cpp
@@ -1,3 +1,5 @@
+#undef NDEBUG
+
 #ifndef NDEBUG
 #include <android/log.h>
 #define  LOG_TAG    "Gmsh"
@@ -109,15 +111,15 @@ void getBitmapFromString(const char *text, int textsize, unsigned char **map,
   jstring jtext = env->NewStringUTF(text);
   jmethodID mid = env->GetStaticMethodID(jClass, "getHeightFromString",
                                          "(Ljava/lang/String;I)I");
-  *height = env->CallIntMethod(gCallbackObject, mid, jtext, textsize);
+  *height = env->CallStaticIntMethod(jClass, mid, jtext, textsize);
   mid = env->GetStaticMethodID(jClass, "getWidthFromString", "(Ljava/lang/String;I)I");
-  *width =env->CallIntMethod(gCallbackObject, mid, jtext, textsize);
+  *width =env->CallStaticIntMethod(jClass, mid, jtext, textsize);
   if(realWidth != NULL){
     mid = env->GetStaticMethodID(jClass, "getRealWidthFromString", "(Ljava/lang/String;I)I");
-    *realWidth = env->CallIntMethod(gCallbackObject, mid, jtext, textsize);
+    *realWidth = env->CallStaticIntMethod(jClass, mid, jtext, textsize);
   }
   mid = env->GetStaticMethodID(jClass, "getBytesFromString", "(Ljava/lang/String;I)[B");
-  jobject jbuffer = env->CallObjectMethod(gCallbackObject, mid, jtext, textsize);
+  jobject jbuffer = env->CallStaticObjectMethod(jClass, mid, jtext, textsize);
   jbyteArray *jarray = reinterpret_cast<jbyteArray*>(&jbuffer);
   *map = (unsigned char *) malloc((*height)*(*width));
   env->GetByteArrayRegion(*jarray, 0, (*height)*(*width), (jbyte*)*map);
@@ -162,7 +164,7 @@ extern "C" {
     ((drawContext *)jptr)->eventHandler(jevent, jx, jy);
   }
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setStringOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n, jstring v)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jstring v, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(v, NULL);
@@ -174,10 +176,10 @@ extern "C" {
     tmp = env->GetStringUTFChars(c, NULL);
     std::string category(tmp, strlen(tmp));
     env->ReleaseStringUTFChars(c, tmp);
-    GmshSetOption(category, name, value, 0);
+    GmshSetStringOption(category, name, value, (int)idx);
   }
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setDoubleOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n, jdouble v)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jdouble v, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(n, NULL);
@@ -186,10 +188,10 @@ extern "C" {
     tmp = env->GetStringUTFChars(c, NULL);
     const std::string category(tmp, strlen(tmp));
     env->ReleaseStringUTFChars(c, tmp);
-    GmshSetOption(category, name, (double)v);
+    GmshSetNumberOption(category, name, (double)v, (int)idx);
   }
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setIntegerOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n, jint v)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jint v, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(n, NULL);
@@ -198,10 +200,10 @@ extern "C" {
     tmp = env->GetStringUTFChars(c, NULL);
     const std::string category(tmp, strlen(tmp));
     env->ReleaseStringUTFChars(c, tmp);
-    GmshSetOption(category, name, (unsigned int)v);
+    GmshSetColorOption(category, name, (unsigned int)v, (int)idx);
   }
   JNIEXPORT jstring JNICALL Java_org_geuz_onelab_Gmsh_getStringOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(n, NULL);
@@ -209,13 +211,13 @@ extern "C" {
     env->ReleaseStringUTFChars(n, tmp);
     tmp = env->GetStringUTFChars(c, NULL);
     const std::string category(tmp, strlen(tmp));
+    env->ReleaseStringUTFChars(c, tmp);
     std::string value;
-    GmshGetOption(category, name, value);
+    value = GmshGetStringOption(category, name, (int)idx);
     return env->NewStringUTF(value.c_str());
-
   }
   JNIEXPORT jdouble JNICALL Java_org_geuz_onelab_Gmsh_getDoubleOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(n, NULL);
@@ -223,12 +225,11 @@ extern "C" {
     env->ReleaseStringUTFChars(n, tmp);
     tmp = env->GetStringUTFChars(c, NULL);
     const std::string category(tmp, strlen(tmp));
-    double value;
-    GmshGetOption(category, name, value);
+    double value = GmshGetNumberOption(category, name, (int)idx);
     return value;
   }
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_getIntegerOption
-  (JNIEnv *env, jobject obj, jstring c, jstring n)
+  (JNIEnv *env, jobject obj, jstring c, jstring n, jint idx)
   {
     const char* tmp;
     tmp = env->GetStringUTFChars(n, NULL);
@@ -236,18 +237,16 @@ extern "C" {
     env->ReleaseStringUTFChars(n, tmp);
     tmp = env->GetStringUTFChars(c, NULL);
     const std::string category(tmp, strlen(tmp));
-    unsigned int value;
-    GmshGetOption(category, name, value, 0);
+    unsigned int value = GmshGetColorOption(category, name, (int)idx);
     return value;
   }
-
   JNIEXPORT jobjectArray JNICALL Java_org_geuz_onelab_Gmsh_getParams
   (JNIEnv *env, jobject obj)
   {
     jclass stringClass = env->FindClass( "java/lang/String" );
     std::vector<std::string> tmp =  onelab::server::instance()->toChar();
-    for(unsigned int i=0;i<tmp.size();i++)
-      for(unsigned int j=0; j<tmp[i].size();j++)
+    for(unsigned int i = 0; i < tmp.size(); i++)
+      for(unsigned int j = 0; j < tmp[i].size(); j++)
         if(tmp[i][j] == '\0') tmp[i][j] = 0x03;
     jobjectArray params = env->NewObjectArray(tmp.size(), stringClass, 0);
     for(int i=0; i<tmp.size();i++){
@@ -257,7 +256,6 @@ extern "C" {
     }
     return params;
   }
-
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setParam
   (JNIEnv *env, jobject obj, jstring jtype, jstring jname, jstring jvalue)
   {
@@ -265,14 +263,14 @@ extern "C" {
     const char *name = env->GetStringUTFChars(jname, NULL);
     const char *value = env->GetStringUTFChars(jvalue, NULL);
     // Get the original param and then change the value
-    if(strcmp(type,"ParameterNumber") == 0){
+    if(strcmp(type, "ParameterNumber") == 0){
       std::vector<onelab::number> s;
       if(onelab::server::instance()->get(s,  name)){
         s[0].setValue(atof(value));
         onelab::server::instance()->set(s[0]);
       }
     }
-    else if(strcmp(type,"ParameterString") == 0){
+    else if(strcmp(type, "ParameterString") == 0){
       std::vector<onelab::string> s;
       if(onelab::server::instance()->get(s,  name)){
         s[0].setValue(value);
@@ -281,35 +279,6 @@ extern "C" {
     }
   }
 
-  JNIEXPORT jobjectArray JNICALL Java_org_geuz_onelab_Gmsh_getPView
-  (JNIEnv *env, jobject obj)
-  {
-    jclass stringClass = env->FindClass( "java/lang/String" );
-    jobjectArray jPView = env->NewObjectArray(PView::list.size(), stringClass, 0);
-    for(unsigned int i = 0; i < PView::list.size(); i++){
-      std::ostringstream sstream;
-      sstream	<< PView::list[i]->getData()->getName().c_str()
-                << "\n" <<  PView::list[i]->getOptions()->intervalsType
-                << "\n" << ((PView::list[i]->getOptions()->visible) ? 1 : 0)
-                << "\n" << PView::list[i]->getOptions()->nbIso
-                << "\n" << PView::list[i]->getOptions()->raise[2];
-      jstring s = env->NewStringUTF(sstream.str().c_str());
-      env->SetObjectArrayElement(jPView, i, s);
-      env->DeleteLocalRef(s);
-    }
-    return jPView;
-  }
-
-  JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_setPView
-  (JNIEnv *env, jobject, jint pos, jint intervalsType, jint visible, jint nIntervals, jfloat raisez)
-  {
-    if(intervalsType > 0 && intervalsType < 4) PView::list[pos]->getOptions()->intervalsType = intervalsType;
-    if(visible >= 0) PView::list[pos]->getOptions()->visible = visible;
-    if(nIntervals > 0) PView::list[pos]->getOptions()->nbIso = nIntervals;
-    if(raisez>=0) PView::list[pos]->getOptions()->raise[2] = raisez;
-    PView::list[pos]->setChanged(true);
-  }
-
   JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_onelabCB
   (JNIEnv *env, jobject obj, jstring jaction)
   {
@@ -344,7 +313,7 @@ extern "C" {
     sstream << "<center><h3>Gmsh</h3>"
             << "Version " << GMSH_VERSION << " "
             << "(<i>Build date:</i> " << GMSH_DATE << ")"
-            << "<p>Copyright (C) 1997-2014 Christophe Geuzaine and Jean-François Remacle</p>"
+            << "<p>Copyright (C) 1997-2015 Christophe Geuzaine and Jean-François Remacle</p>"
             << "<p><a href=\"http://geuz.org/gmsh/doc/CREDITS.txt\">Credits</a> "
             << "and <a href=\"http://geuz.org/gmsh/doc/LICENSE.txt\">licensing information</a></p>"
             << "<p><i>Build options:</i> " << GMSH_CONFIG_OPTIONS << "</p>"
@@ -358,7 +327,7 @@ extern "C" {
     sstream << "<center><h3>GetDP</h3>"
             << "Version " << GETDP_VERSION << " "
             << "(<i>Build date:</i> " << GETDP_DATE << ")"
-            << "<p>Copyright (C) 1997-2014 Patrick Dular and Christophe Geuzaine, University of Liège</p>"
+            << "<p>Copyright (C) 1997-2015 Patrick Dular and Christophe Geuzaine, University of Liège</p>"
             << "<p><a href=\"http://geuz.org/getdp/doc/CREDITS.txt\">Credits</a> "
             << "and <a href=\"http://geuz.org/getdp/doc/LICENSE.txt\">licensing information</a></p>"
             << "<p><i>Build options:</i> " << GETDP_CONFIG_OPTIONS << "</p>"
diff --git a/contrib/mobile/androidGModel.h b/contrib/mobile/androidGModel.h
index fca4dfd..58a6060 100644
--- a/contrib/mobile/androidGModel.h
+++ b/contrib/mobile/androidGModel.h
@@ -9,179 +9,44 @@ void getBitmapFromString(const char *text, int textsize, unsigned char **map, in
 #ifdef __cplusplus
 extern "C" {
 #endif
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    init
- * Signature: (F)J
- */
 JNIEXPORT jlong JNICALL Java_org_geuz_onelab_Gmsh_init
   (JNIEnv *, jobject, jfloat);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    loadFile
- * Signature: (JLjava/lang/String;)V
- */
 JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_loadFile
   (JNIEnv *, jobject, jlong, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    initView
- * Signature: (JII)V
- */
 JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_initView
   (JNIEnv *, jobject, jlong, jint, jint);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    drawView
- * Signature: (J)V
- */
 JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_drawView
   (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    eventHandler
- * Signature: (JIFF)V
- */
 JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_eventHandler
   (JNIEnv *, jobject, jlong, jint, jfloat, jfloat);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setStringOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setStringOption
-  (JNIEnv *, jobject, jstring, jstring, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setDoubleOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;D)I
- */
+  (JNIEnv *, jobject, jstring, jstring, jstring, jint);
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setDoubleOption
-  (JNIEnv *, jobject, jstring, jstring, jdouble);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setIntegerOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;I)I
- */
+  (JNIEnv *, jobject, jstring, jstring, jdouble, jint);
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setIntegerOption
-  (JNIEnv *, jobject, jstring, jstring, jint);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getStringOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- */
+  (JNIEnv *, jobject, jstring, jstring, jint, jint);
 JNIEXPORT jstring JNICALL Java_org_geuz_onelab_Gmsh_getStringOption
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getDoubleOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;)D
- */
+  (JNIEnv *, jobject, jstring, jstring, jint);
 JNIEXPORT jdouble JNICALL Java_org_geuz_onelab_Gmsh_getDoubleOption
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getIntegerOption
- * Signature: (Ljava/lang/String;Ljava/lang/String;)I
- */
+(JNIEnv *, jobject, jstring, jstring, jint);
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_getIntegerOption
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getParams
- * Signature: ()[Ljava/lang/String;
- */
+(JNIEnv *, jobject, jstring, jstring, jint);
 JNIEXPORT jobjectArray JNICALL Java_org_geuz_onelab_Gmsh_getParams
   (JNIEnv *, jobject);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setParam
- * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setParam
   (JNIEnv *, jobject, jstring, jstring, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getPView
- * Signature: ()[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_org_geuz_onelab_Gmsh_getPView
-  (JNIEnv *, jobject);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setPView
- * Signature: (IIIIF)V
- */
-JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_setPView
-  (JNIEnv *, jobject, jint, jint, jint, jint, jfloat);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    onelabCB
- * Signature: (Ljava/lang/String;)I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_onelabCB
   (JNIEnv *, jobject, jstring);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    numberOfAnimation
- * Signature: ()I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_numberOfAnimation
   (JNIEnv *, jobject);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    animationNext
- * Signature: ()I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_animationNext
   (JNIEnv *, jobject);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    animationPrev
- * Signature: ()I
- */
 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_animationPrev
   (JNIEnv *, jobject);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    setAnimation
- * Signature: (I)V
- */
 JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_setAnimation
   (JNIEnv *, jobject, jint);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getAboutGmsh
- * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- */
 JNIEXPORT jstring JNICALL Java_org_geuz_onelab_Gmsh_getAboutGmsh
   (JNIEnv *, jclass);
-
-/*
- * Class:     org_geuz_onelab_Gmsh
- * Method:    getAboutGetDP
- * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- */
 JNIEXPORT jstring JNICALL Java_org_geuz_onelab_Gmsh_getAboutGetDP
   (JNIEnv *, jclass);
 
diff --git a/contrib/mobile/drawContext.cpp b/contrib/mobile/drawContext.cpp
index f8c45f6..4a377ae 100644
--- a/contrib/mobile/drawContext.cpp
+++ b/contrib/mobile/drawContext.cpp
@@ -46,8 +46,8 @@ drawContext::drawContext(float fontFactor, bool retina)
 
 static void checkGlError(const char* op)
 {
-  for (GLint error = glGetError(); error; error = glGetError())
-    Msg::Error("%s: glError (0x%x)",op,error);
+  //for (GLint error = glGetError(); error; error = glGetError())
+  //  Msg::Error("%s: glError (0x%x)",op,error);
 }
 
 void drawContext::load(std::string filename)
@@ -363,8 +363,12 @@ void drawContext::drawPView(PView *p)
   glLineWidth((GLfloat)opt->lineWidth);
 
   drawArray(p->va_points, GL_POINTS, true);
+
   drawArray(p->va_lines, GL_LINES, true);
+
+  glEnable(GL_LIGHTING);
   drawArray(p->va_triangles, GL_TRIANGLES, true, true);
+  glDisable(GL_LIGHTING);
 
   glLineWidth(1);
   glPointSize(1);
@@ -382,7 +386,7 @@ void drawContext::drawScale()
   double height = size / 10.;
   double dh = height / 5;
 
-	// Draw the scale bar
+  // Draw the scale bar
   int nPview = 0;
   for(int i=0; i<PView::list.size();i++){
     PView *p = PView::list[i];
@@ -578,12 +582,77 @@ void drawContext::drawAxes()
   glPopMatrix();
 }
 
+int drawContext::fix2dCoordinates(double *x, double *y)
+{
+  int ret = (*x > 99999 && *y > 99999) ? 3 : (*y > 99999) ? 2 : (*x > 99999) ? 1 : 0;
+
+  if(*x < 0) // measure from right border
+    *x = _right + *x;
+  else if(*x > 99999) // by convention, x-centered
+    *x = _right / 2;
+
+  if(*y < 0) // measure from bottom border
+    *y = -(*y);
+  else if(*y > 99999) // by convention, y-centered
+    *y = _top / 2.;
+  else
+    *y = _top - *y;
+  return ret;
+}
+
+void drawContext::drawText2d()
+{
+  glPushMatrix();
+  glLoadIdentity();
+
+  for(unsigned int i = 0; i < PView::list.size(); i++){
+    PViewData *data = PView::list[i]->getData();
+    PViewOptions *opt = PView::list[i]->getOptions();
+    if(opt->visible && opt->drawStrings){
+      for(int j = 0; j < data->getNumStrings2D(); j++){
+        double x, y, style;
+        std::string str;
+        data->getString2D(j, opt->timeStep, str, x, y, style);
+        //fix2dCoordinates(&x, &y);
+        GLfloat colors[] = {0., 0, 0, 1.};
+        drawString s(str.c_str(), 20 * _fontFactor, colors);
+        // FIXME:
+        s.draw(_left + (_right - _left) / 2.,
+               _bottom + 0.8 * (_top - _bottom), 0,
+               _width/(_right-_left), _height/(_top-_bottom), true);
+      }
+    }
+  }
+
+  glPopMatrix();
+}
+
+void drawGraph2d()
+{
+  glPushMatrix();
+  glLoadIdentity();
+
+  std::vector<PView*> graphs;
+  for(unsigned int i = 0; i < PView::list.size(); i++){
+    PViewData *data = PView::list[i]->getData();
+    PViewOptions *opt = PView::list[i]->getOptions();
+    if(!data->getDirty() && opt->visible && opt->type != PViewOptions::Plot3D)
+      graphs.push_back(PView::list[i]);
+  }
+  if(graphs.empty()) return;
+
+  // FIXME: draw 2d graph(s)
+
+  glPopMatrix();
+}
+
 void drawContext::drawView()
 {
   OrthofFromGModel();
 
   glMatrixMode(GL_MODELVIEW);
-  // fill the background
+
+  // draw the background
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   if(CTX::instance()->bgGradient){
     glPushMatrix();
@@ -611,10 +680,73 @@ void drawContext::drawView()
   }
   checkGlError("Draw background");
 
+  // init lights
+  glPushMatrix();
   glLoadIdentity();
   glScalef(_scale[0], _scale[1], _scale[2]);
   glTranslatef(_translate[0], _translate[1], _translate[2]);
+  for(int i = 0; i < 6; i++) {
+    if(CTX::instance()->light[i]) {
+      GLfloat position[4] = {
+        (GLfloat)CTX::instance()->lightPosition[i][0],
+        (GLfloat)CTX::instance()->lightPosition[i][1],
+        (GLfloat)CTX::instance()->lightPosition[i][2],
+        (GLfloat)CTX::instance()->lightPosition[i][3]
+      };
+      glLightfv((GLenum)(GL_LIGHT0 + i), GL_POSITION, position);
+      GLfloat r = (GLfloat)(CTX::instance()->unpackRed
+                            (CTX::instance()->color.ambientLight[i]) / 255.);
+      GLfloat g = (GLfloat)(CTX::instance()->unpackGreen
+                            (CTX::instance()->color.ambientLight[i]) / 255.);
+      GLfloat b = (GLfloat)(CTX::instance()->unpackBlue
+                            (CTX::instance()->color.ambientLight[i]) / 255.);
+      GLfloat ambient[4] = {r, g, b, 1.0F};
+      glLightfv((GLenum)(GL_LIGHT0 + i), GL_AMBIENT, ambient);
+      r = (GLfloat)(CTX::instance()->unpackRed
+                    (CTX::instance()->color.diffuseLight[i]) / 255.);
+      g = (GLfloat)(CTX::instance()->unpackGreen
+                    (CTX::instance()->color.diffuseLight[i]) / 255.);
+      b = (GLfloat)(CTX::instance()->unpackBlue
+                    (CTX::instance()->color.diffuseLight[i]) / 255.);
+      GLfloat diffuse[4] = {r, g, b, 1.0F};
+      glLightfv((GLenum)(GL_LIGHT0 + i), GL_DIFFUSE, diffuse);
+      r = (GLfloat)(CTX::instance()->unpackRed
+                    (CTX::instance()->color.specularLight[i]) / 255.);
+      g = (GLfloat)(CTX::instance()->unpackGreen
+                    (CTX::instance()->color.specularLight[i]) / 255.);
+      b = (GLfloat)(CTX::instance()->unpackBlue
+                    (CTX::instance()->color.specularLight[i]) / 255.);
+      GLfloat specular[4] = {r, g, b, 1.0F};
+      glLightfv((GLenum)(GL_LIGHT0 + i), GL_SPECULAR, specular);
+      glEnable((GLenum)(GL_LIGHT0 + i));
+    }
+    else{
+      glDisable((GLenum)(GL_LIGHT0 + i));
+    }
+  }
+  glPopMatrix();
+  // ambient and diffuse material colors track glColor automatically
+  //glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+  glEnable(GL_COLOR_MATERIAL);
+  // "white"-only specular material reflection color
+  GLfloat spec[4] = {(GLfloat)CTX::instance()->shine,
+                     (GLfloat)CTX::instance()->shine,
+                     (GLfloat)CTX::instance()->shine, 1.0F};
+  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec);
+  // specular exponent in [0,128] (larger means more "focused"
+  // reflection)
+  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS,
+              (GLfloat)CTX::instance()->shineExponent);
+  glShadeModel(GL_SMOOTH);
+  glEnable(GL_RESCALE_NORMAL);
+  glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, 1.);
+  glDisable(GL_LIGHTING);
+  checkGlError("Initialize lights");
 
+  // init position
+  glLoadIdentity();
+  glScalef(_scale[0], _scale[1], _scale[2]);
+  glTranslatef(_translate[0], _translate[1], _translate[2]);
   if(CTX::instance()->rotationCenterCg)
     glTranslatef(CTX::instance()->cg[0],
                  CTX::instance()->cg[1],
@@ -623,10 +755,8 @@ void drawContext::drawView()
     glTranslatef(CTX::instance()->rotationCenter[0],
                  CTX::instance()->rotationCenter[1],
                  CTX::instance()->rotationCenter[2]);
-
   buildRotationMatrix();
   glMultMatrixf(_rotatef);
-
   if(CTX::instance()->rotationCenterCg)
     glTranslatef(-CTX::instance()->cg[0],
                  -CTX::instance()->cg[1],
@@ -635,22 +765,18 @@ void drawContext::drawView()
     glTranslatef(-CTX::instance()->rotationCenter[0],
                  -CTX::instance()->rotationCenter[1],
                  -CTX::instance()->rotationCenter[2]);
-
   checkGlError("Initialize position");
 
+  // draw everything
   glEnable(GL_DEPTH_TEST);
-
-  drawMesh();
-  checkGlError("Draw mesh");
-  drawGeom();
-  checkGlError("Draw geometry");
-  drawPost();
-  checkGlError("Draw post-pro");
+  drawMesh(); checkGlError("Draw mesh");
+  drawGeom(); checkGlError("Draw geometry");
+  drawPost(); checkGlError("Draw post-pro");
   glDisable(GL_DEPTH_TEST);
-  drawScale();
-  checkGlError("Draw scales");
-  drawAxes();
-  checkGlError("Draw axes");
+  drawScale(); checkGlError("Draw scales");
+  drawAxes(); checkGlError("Draw axes");
+  drawText2d(); checkGlError("Draw text2d");
+  drawGraph2d(); checkGlError("Draw graph2d");
 }
 
 std::vector<std::string> commandToVector(const std::string cmd)
@@ -730,6 +856,7 @@ int onelab_cb(std::string action)
   } while(action == "compute" && !onelabStop && (onelabUtils::incrementLoop("3") ||
                                                  onelabUtils::incrementLoop("2") ||
                                                  onelabUtils::incrementLoop("1")));
+  onelabStop = false;
   locked = false;
   return onelab::server::instance()->getChanged();
 }
diff --git a/contrib/mobile/drawContext.h b/contrib/mobile/drawContext.h
index ac7076d..5768e54 100644
--- a/contrib/mobile/drawContext.h
+++ b/contrib/mobile/drawContext.h
@@ -36,12 +36,14 @@ public:
   void setScale(int i, float s) {if(i>=0 && i<3) _scale[i] = s;}
   float getScale(int i) {if(i>=0 && i<3) return _scale[i]; return 0;}
   void initView(int w, int h);
+  int fix2dCoordinates(double *x, double *y);
   void drawView();
   void drawAxes();
   void drawGeom();
   void drawMesh();
   void drawPost();
   void drawScale();
+  void drawText2d();
 };
 
 void drawArray(VertexArray *va, int type, bool useColorArray=false,
diff --git a/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj b/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj
index 3eb4164..9387ffc 100644
--- a/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj
+++ b/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj
@@ -445,11 +445,12 @@
 		9C96086D1712C16400E1D4A0 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CLANG_ENABLE_OBJC_ARC = YES;
-				CODE_SIGN_IDENTITY = "iPhone Developer";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				CODE_SIGN_IDENTITY = "iPhone Distribution";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Onelab/frameworks",
@@ -474,11 +475,12 @@
 		9C96086E1712C16400E1D4A0 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CLANG_ENABLE_OBJC_ARC = YES;
-				CODE_SIGN_IDENTITY = "iPhone Developer";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				CODE_SIGN_IDENTITY = "iPhone Distribution";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Onelab/frameworks",
diff --git a/contrib/mobile/iOS/Onelab/AboutViewController.mm b/contrib/mobile/iOS/Onelab/AboutViewController.mm
index b7d2423..cd9610a 100644
--- a/contrib/mobile/iOS/Onelab/AboutViewController.mm
+++ b/contrib/mobile/iOS/Onelab/AboutViewController.mm
@@ -35,8 +35,8 @@
   // Do any additional setup after loading the view.
   self.aboutView.delegate = self;
   self.aboutView.dataDetectorTypes = UIDataDetectorTypeNone;
-  [self.aboutView loadHTMLString:[NSString stringWithFormat:@"<html><head><style type=\"text/css\"><!--body { background-color: #FFFFFF; color: #252525; margin: 35px 10px 35px 10px; padding: 0; font-family: helvetica-neue,sans-serif; font-size: 1em; }--></style></head><body><center><p><!--img width=32 src=\"icon_onelab.png\"--></p><h3>Onelab/Mobile</h3>Version %@<p>Copyright (C) 2014 Christophe Geuzaine and Maxime Graulich, University of Liège</p><p>Visit <a href=\"http://onelab.i [...]
-                                           [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"],
+  [self.aboutView loadHTMLString:[NSString stringWithFormat:@"<html><head><style type=\"text/css\"><!--body { background-color: #FFFFFF; color: #252525; margin: 35px 10px 35px 10px; padding: 0; font-family: helvetica-neue,sans-serif; font-size: 1em; }--></style></head><body><center><p><!--img width=32 src=\"icon_onelab.png\"--></p><h3>Onelab/Mobile</h3>Version %@<p>Copyright (C) 2014-2015 Christophe Geuzaine and Maxime Graulich, University of Liège</p><p>Visit <a href=\"http://one [...]
+                                           [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"],
                                            GMSH_VERSION,
                                            GMSH_DATE,
                                            GMSH_CONFIG_OPTIONS,
diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm
index 7afc0bb..226599c 100644
--- a/contrib/mobile/iOS/Onelab/ModelViewController.mm
+++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm
@@ -379,7 +379,7 @@ void getBitmap(void *self, const char *text, int textsize, unsigned char **map,
 
 -(void) getBitmapFromStringObjC:(const char *)text withTextSize:(int)textsize inMap:(unsigned char **)map inHeight:(int *)height inWidth:(int *)width inRealWidth:(int *) realWidth
 {
-  UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 1024, textsize)];
+  UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 1024, 7*textsize/6)];
   lbl.font = [UIFont systemFontOfSize:textsize];
   [lbl setText:[NSString stringWithCString:text  encoding:[NSString defaultCStringEncoding]]];
   [lbl setBackgroundColor:[UIColor clearColor]];
diff --git a/contrib/mobile/iOS/Onelab/Onelab-Info.plist b/contrib/mobile/iOS/Onelab/Onelab-Info.plist
index 64118d5..f35e1b1 100644
--- a/contrib/mobile/iOS/Onelab/Onelab-Info.plist
+++ b/contrib/mobile/iOS/Onelab/Onelab-Info.plist
@@ -35,11 +35,11 @@
     <key>CFBundlePackageType</key>
     <string>APPL</string>
     <key>CFBundleShortVersionString</key>
-    <string>1.0.6</string>
+    <string>1.0.11</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleVersion</key>
-    <string>1.0.6</string>
+    <string>1.0.11</string>
     <key>LSRequiresIPhoneOS</key>
     <true/>
     <key>UIFileSharingEnabled</key>
diff --git a/contrib/mobile/iOS/Onelab/Parameter.mm b/contrib/mobile/iOS/Onelab/Parameter.mm
index b487416..5ac5cba 100644
--- a/contrib/mobile/iOS/Onelab/Parameter.mm
+++ b/contrib/mobile/iOS/Onelab/Parameter.mm
@@ -1,4 +1,5 @@
 #import "parameter.h"
+#import "Utils.h"
 
 @implementation Parameter
 -(id)init
@@ -141,28 +142,42 @@
 
 -(void)selectValue
 {
-  std::vector<onelab::number> number;
-  onelab::server::instance()->get(number,[name UTF8String]);
-  if(number.size() < 1) return;
-  UIActionSheet *popupSelectValue = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:@"%s", number[0].getLabel().c_str()] delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
-  std::vector<double> choices = number[0].getChoices();
-  for(int i=0;i<choices.size();i++)
-    [popupSelectValue addButtonWithTitle:[NSString stringWithFormat:@"%s", number[0].getValueLabel(choices[i]).c_str()]];
-  [popupSelectValue addButtonWithTitle:@"Cancel"];
-  [popupSelectValue setCancelButtonIndex:popupSelectValue.numberOfButtons - 1];
-  [popupSelectValue showInView:button];
-}
+  std::vector<onelab::number> numbers;
+  onelab::server::instance()->get(numbers,[name UTF8String]);
+  if(numbers.size() < 1) return;
+  UIAlertController *alertController;
+  UIAlertAction *destroyAction;
+  alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
+  std::vector<double> choices = numbers[0].getChoices();
+  for(unsigned int i = 0; i < choices.size(); i++)
+    [alertController addAction:[UIAlertAction actionWithTitle:[NSString stringWithFormat:@"%s", numbers[0].getValueLabel(choices[i]).c_str()]
+                                                        style:UIAlertActionStyleDefault
+                                                      handler:^(UIAlertAction *action) {
+          [self updateNumber:numbers[0] withValue:choices[i]];
+          [button setTitle:[NSString stringWithFormat:@"%s", numbers[0].getValueLabel(i).c_str()] forState:UIControlStateNormal];
+	}]];
+
+  destroyAction = [UIAlertAction actionWithTitle:@"Cancel"
+                                           style:UIAlertActionStyleDestructive
+                                         handler:^(UIAlertAction *action) {
+      // do nothing
+    }];
+
+  [alertController addAction:destroyAction];
+  [alertController setModalPresentationStyle:UIModalPresentationPopover];
+
+  UIPopoverPresentationController *popPresenter = [alertController popoverPresentationController];
+  popPresenter.sourceView = button;
+  popPresenter.sourceRect = button.bounds;
+  // FIXME: is traverseResponderChainForUIViewController a good idea?
+  [[Utils traverseResponderChainForUIViewController:button] presentViewController:alertController animated:YES completion:nil];
+}
+
+-(void) updateNumber: (onelab::number)n withValue:(double)v
+{
+  n.setValue(v);
+  onelab::server::instance()->set(n);
 
--(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
-{
-  std::vector<onelab::number> number;
-  onelab::server::instance()->get(number,[name UTF8String]);
-  if(number.size() < 1) return;
-  if(buttonIndex > number[0].getChoices().size() - 1) return; // cancel
-  double selected = number[0].getChoices()[buttonIndex];
-  number[0].setValue(selected);
-  onelab::server::instance()->set(number[0]);
-  [button setTitle:[NSString stringWithFormat:@"%s", number[0].getValueLabel(number[0].getValue()).c_str()] forState:UIControlStateNormal];
   [super editValue];
 }
 
diff --git a/contrib/mobile/iOS/Onelab/Utils.h b/contrib/mobile/iOS/Onelab/Utils.h
index 364eb7a..448225c 100644
--- a/contrib/mobile/iOS/Onelab/Utils.h
+++ b/contrib/mobile/iOS/Onelab/Utils.h
@@ -5,4 +5,7 @@
 + (NSString *) getApplicationDocumentsDirectory;
 + (void) copyRes;
 
++ (id) traverseResponderChainForUIViewController:(UIView *)v;
+
+
 @end
diff --git a/contrib/mobile/iOS/Onelab/Utils.mm b/contrib/mobile/iOS/Onelab/Utils.mm
index 91b06af..f76a002 100644
--- a/contrib/mobile/iOS/Onelab/Utils.mm
+++ b/contrib/mobile/iOS/Onelab/Utils.mm
@@ -20,10 +20,23 @@
     NSString *modelSrc = [[resPath stringByAppendingString:@"/"] stringByAppendingString:obj];
     NSString *modelDst = [[docPath stringByAppendingString:@"/"] stringByAppendingString:obj];
     [[NSFileManager defaultManager] removeItemAtPath:modelDst error:nil];
-    NSError *error;
+    NSError *error = nil;
     if (![[NSFileManager defaultManager] copyItemAtPath:modelSrc toPath:modelDst error:&error])
       NSLog(@"Error: %@", error);
+    else if(![[NSURL fileURLWithPath:modelDst] setResourceValue: [NSNumber numberWithBool: YES] forKey: NSURLIsExcludedFromBackupKey error: &error])
+      NSLog(@"Error %@", error);
   }
 }
 
++ (UIViewController *) traverseResponderChainForUIViewController:(UIView *)v
+{
+  id nextResponder = [v nextResponder];
+  if ([nextResponder isKindOfClass:[UIViewController class]])
+    return nextResponder;
+  else if ([nextResponder isKindOfClass:[UIView class]])
+    return [Utils traverseResponderChainForUIViewController:nextResponder];
+  else
+    return nil;
+}
+
 @end
diff --git a/contrib/mobile/iOS/Onelab/emulatorFix.c b/contrib/mobile/iOS/Onelab/emulatorFix.c
index 4af626e..2624820 100644
--- a/contrib/mobile/iOS/Onelab/emulatorFix.c
+++ b/contrib/mobile/iOS/Onelab/emulatorFix.c
@@ -7,6 +7,7 @@
 //
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/resource.h>
 #include <sys/types.h>
@@ -17,6 +18,7 @@
 #include <pthread.h>
 #include <sys/time.h>
 #include <time.h>
+#include <string.h>
 
 int getrlimit$UNIX2003( int resource, struct rlimit *rlp)
 {
@@ -140,3 +142,43 @@ clock_t clock$UNIX2003()
 {
     return clock();
 }
+
+int creat$UNIX2003(const char *path, mode_t mode)
+{
+  return creat(path, mode);
+}
+
+int nanosleep$UNIX2003(const struct timespec *rqtp, struct timespec *rmtp)
+{
+  return nanosleep(rqtp, rmtp);
+}
+
+FILE *popen$UNIX2003(const char *command, const char *mode)
+{
+  return popen(command, mode);
+}
+
+int setenv$UNIX2003(const char *name, const char *value, int overwrite)
+{
+  return setenv(name, value, overwrite);
+}
+
+unsigned int sleep$UNIX2003(unsigned int seconds)
+{
+  return sleep(seconds);
+}
+
+char *strerror$UNIX2003(int errnum)
+{
+  return strerror(errnum);
+}
+
+double strtod$UNIX2003(const char *restrict nptr, char **restrict endptr)
+{
+  return strtod(nptr, endptr);
+}
+
+int system$UNIX2003(const char *command)
+{
+  return system(command);
+}
diff --git a/contrib/mobile/utils/android_petsc_reconfigure-armv7-android-linux.py b/contrib/mobile/utils/android_petsc_reconfigure-armv7-android-linux.py
index d920a1b..ae7712b 100755
--- a/contrib/mobile/utils/android_petsc_reconfigure-armv7-android-linux.py
+++ b/contrib/mobile/utils/android_petsc_reconfigure-armv7-android-linux.py
@@ -4,16 +4,21 @@ if __name__ == '__main__':
   import os
   sys.path.insert(0, os.path.abspath('config'))
   import configure
+  ndkroot='/Users/geuzaine/android-ndk-r8b/'
+  ndkbin=ndkroot + 'toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/'
+  ndklibs=ndkroot + 'toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/user/libs/'
+  ndklibs2=ndkroot + 'platforms/android-14/arch-arm/usr/lib/'
+  externallibs='/Users/geuzaine/src/gmsh/contrib/mobile/frameworks_android/petsc/'
   configure_options = [
-    '--AR=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar',
-    '--CC=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc',
-    '--CFLAGS=--sysroot=/opt/android-ndk/platforms/android-8/arch-arm',
-    '--CPP=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-cpp',
-    '--CPPFLAGS=--sysroot=/opt/android-ndk/platforms/android-8/arch-arm',
-    '--CXX=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-g++',
-    '--CXXFLAGS=--sysroot=/opt/android-ndk/platforms/android-8/arch-arm -fsigned-char -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fdata-sections -ffunction-sections -fPIC -Wno-psabi -frtti -fexceptions -mthumb -O3 -fomit-frame-pointer -DNDEBUG -fPIC -isystem /opt/android-ndk/platforms/android-8/arch-arm/usr/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -lstdc++',
-    '--LDFLAGS= -L/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/user/libs/armeabi-v7a  -L/home/maxime/Stage/_gmsh/CMakeFiles/ndklibs/armeabi-v7a  -L/home/maxime/Stage/petsc-3.3-p6/armv7-unknown-linux/lib',
-    '--LD_SHARED=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld',
+    '--AR=' + ndkbin + 'arm-linux-androideabi-ar',
+    '--CC=' + ndkbin + 'arm-linux-androideabi-gcc',
+    '--CFLAGS=--sysroot=' + ndkroot + 'platforms/android-8/arch-arm',
+    '--CPP=' + ndkbin + 'arm-linux-androideabi-cpp',
+    '--CPPFLAGS=--sysroot=' + ndkroot + 'platforms/android-8/arch-arm',
+    '--CXX=' + ndkbin + 'arm-linux-androideabi-g++',
+    '--CXXFLAGS=--sysroot=' + ndkroot + 'platforms/android-8/arch-arm -fsigned-char -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fdata-sections -ffunction-sections -fPIC -Wno-psabi -frtti -fexceptions -mthumb -O3 -fomit-frame-pointer -DNDEBUG -fPIC -isystem ' + ndkroot + 'platforms/android-8/arch-arm/usr/include -isystem ' + ndkroot + 'sources/cxx-stl/gnu-libstdc++/4.6/include -isystem ' + ndkroot + 'sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -lstdc++',
+    '--LDFLAGS= -L' + ndklibs + 'armeabi-v7a -L' + ndklibs2 + ' -lm',
+    '--LD_SHARED=' + ndkbin + 'arm-linux-androideabi-ld',
     '--download-blacs=0',
     '--download-mumps=0',
     '--download-parmetis=0',
@@ -34,18 +39,18 @@ if __name__ == '__main__':
     '--known-sizeof-short=2',
     '--known-sizeof-size_t=8',
     '--known-sizeof-void-p=8',
-    '--with-blas-lib=/home/maxime/Stage/petsc-3.3-p6/externalpackages/f2cblaslapack-3.1.1.q/libf2cblas.so',
+    '--with-blas-lib=' + externallibs + 'libf2cblas.so',
     '--with-clanguage=cxx',
     '--with-cmake=1',
     '--with-debugging=0',
     '--with-fc=0',
-    '--with-lapack-lib=/home/maxime/Stage/petsc-3.3-p6/externalpackages/f2clapacklapack-3.1.1.q/libf2clapack.so',
+    '--with-lapack-lib=' + externallibs + 'libf2clapack.so',
     '--with-mpi=0',
     '--with-shared-libraries=1',
     '--with-x=0',
-    '-I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/include/',
-    '-I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/include/backward',
-    '-I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include',
+    '-I' + ndkroot + 'sources/cxx-stl/gnu-libstdc++/include/',
+    '-I' + ndkroot + 'sources/cxx-stl/gnu-libstdc++/include/backward',
+    '-I' + ndkroot + 'sources/cxx-stl/gnu-libstdc++/libs/armeabi/include',
     '-lstdc++',
     '-with-batch=1',
     'PETSC_ARCH=armv7-android-linux',
diff --git a/contrib/mobile/utils/iOS.cmake b/contrib/mobile/utils/iOS.cmake
index 5c79dd1..611a6c9 100644
--- a/contrib/mobile/utils/iOS.cmake
+++ b/contrib/mobile/utils/iOS.cmake
@@ -25,10 +25,10 @@ set (UNIX True)
 set (APPLE True)
 set (IOS True)
 
-# Force the compilers to gcc for iOS
-include (CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER (gcc gcc)
-CMAKE_FORCE_CXX_COMPILER (g++ g++)
+# Force the compilers to gcc for iOS - removed for Yosemite XCode
+#include (CMakeForceCompiler)
+#CMAKE_FORCE_C_COMPILER (gcc gcc)
+#CMAKE_FORCE_CXX_COMPILER (g++ g++)
 
 # Skip the platform compiler checks for cross compiling
 set (CMAKE_CXX_COMPILER_WORKS TRUE)
diff --git a/contrib/mobile/utils/onelab_android_build.sh b/contrib/mobile/utils/onelab_android_build.sh
index 3a85946..a59de38 100755
--- a/contrib/mobile/utils/onelab_android_build.sh
+++ b/contrib/mobile/utils/onelab_android_build.sh
@@ -6,7 +6,7 @@ frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_android"
 
 petsc_lib="$frameworks_dir/petsc"
 slepc_lib="$frameworks_dir/slepc"
-android_ndk="${HOME}/android-ndk-r8b/"
+android_ndk="${HOME}/android-ndk-r8b/" 
 android_sdk="${HOME}/android-sdk/"
 
 cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_svn/contrib/mobile/utils/Android.cmake -DENABLE_BUILD_ANDROID=1 -DCMAKE_BUILD_TYPE=Release"
@@ -16,11 +16,12 @@ function check {
   return_code=$?
   if [ $return_code != 0 ]; then
     echo "last command failed (return $return_code)"
-    exit $return_cod
+    exit $return_code
   fi
 }
 
 # PETSc and BLAS/LAPACK
+echo $petsc_lib/libpetsc.so
 if [ ! -f "$petsc_lib/libpetsc.so" ] || [ ! -f "$petsc_lib/libf2clapack.so" ] || [ ! -f "$petsc_lib/libf2cblas.so" ] || [ ! -d "$petsc_lib/Headers/" ]; then 
   echo -e "ERROR: Need BLAS (f2c), LAPACK (f2c) and PETSc\ncheck android_petsc_reconfigure-armv7-android-linux.py for compile options\n"
   exit 1
@@ -35,7 +36,7 @@ if [ ! -d "$gmsh_svn/build_android" ] || [ ! -f "$gmsh_svn/build_android/CMakeCa
   mkdir $gmsh_svn/build_android
 fi
 cd $gmsh_svn/build_android
-cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_SHARED=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_TETGEN=1 -DBLAS_LIB="$petsc_lib/libf2cblas.so" -DLAPACK_LIB="$petsc_lib/libf2clapack.so" ..
+cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_SHARED=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DBLAS_LIB="$petsc_lib/libf2cblas.so" -DLAPACK_LIB="$petsc_lib/libf2clapack.so" ..
 check
 make androidGmsh -j$cmake_thread
 check
@@ -49,7 +50,7 @@ if [ ! -d "$getdp_svn/build_android" ] || [ ! -f "$getdp_svn/build_android/CMake
   mkdir $getdp_svn/build_android
 fi
 cd $getdp_svn/build_android
-PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_SHARED=1 -DENABLE_GMSH=1 -DENABLE_LEGACY=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_lib/Headers;$petsc_lib/Headers/mpiuni" -DPETSC_LIBS="$petsc_lib/libpetsc.so" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_lib/Headers/" -DSLEPC_LIB="$slepc_lib/libslepc.a" -DGMSH_INC="$gmsh_svn/build_android/Headers/" -DGMSH_LIB="$gmsh_svn/build_android/libs/libGmsh.so" -DBLAS_LAPACK_LIBRARIES="$petsc_lib/libf2cblas.so;$petsc [...]
+PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_SHARED=1 -DENABLE_GMSH=1 -DENABLE_LEGACY=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_lib/Headers;$petsc_lib/Headers/mpiuni" -DPETSC_LIBS="$petsc_lib/libpetsc.so" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_lib/Headers/" -DSLEPC_LIB="$slepc_lib/libslepc.so" -DGMSH_INC="$gmsh_svn/build_android/Headers/" -DGMSH_LIB="$gmsh_svn/build_android/libs/libGmsh.so" -DBLAS_LAPACK_LIBRARIES="$petsc_lib/libf2cblas.so;$pets [...]
 check
 make androidGetdp -j$cmake_thread
 check
@@ -57,14 +58,15 @@ make get_headers
 check
 
 # Onelab/Mobile interface
-if [ ! -d "$gmsh_svn/contrib/mobile/build_android" ] || [ ! -f "$gmsh_svn/contrib/mobile/build_android/CMakeCache.txt" ]; then
+if [ ! -d "$gmsh_svn/contrib/mobile/build_android" ]; then
   mkdir $gmsh_svn/contrib/mobile/build_android
 fi
 cd $gmsh_svn/contrib/mobile/build_android
+
 cmake $cmake_default \
       -DCMAKE_INCLUDE_PATH="$getdp_svn/" \
       -DBLAS_LIB="$petsc_lib/libf2cblas.so" -DLAPACK_LIB="$petsc_lib/libf2clapack.so" \
-      -DPETSC_LIB="$petsc_lib/libpetsc.so" \
+      -DPETSC_LIB="$petsc_lib/libpetsc.so" -DSLEPC_LIB="$slepc_lib/libslepc.so" \
       -DGMSH_INC="$gmsh_svn/build_android/Headers" -DGMSH_LIB="$gmsh_svn/build_android/libs/libGmsh.so" \
       -DBENCHMARKSDIR="$getdp_svn/" \
       -DGETDP_INC="$getdp_svn/build_android/Headers" -DGETDP_LIB="$getdp_svn/build_android/libs/libGetDP.so" ..
@@ -74,8 +76,24 @@ check
 make androidProject
 check
 
-# Onelab/Mobile package
+# Potentially modify source tree for alternate branding
 cd Onelab
+if [ $# -eq 1 ] ; then
+  packagename=${1,,}
+  appname=$1
+  # change package name
+  mv src/org/geuz/onelab/ src/org/geuz/$packagename
+  mkdir src/org/geuz/onelab
+  mv src/org/geuz/$packagename/Gmsh.java src/org/geuz/onelab
+  find . -type f -name '*.java' -not -name 'Gmsh.java' -exec sed -i "s/org\.geuz\.onelab/org\.geuz\.$packagename/g" {} \;
+  sed -i "s/org\.geuz\.onelab/org\.geuz\.$packagename/g" AndroidManifest.xml
+  grep -r -m 1 'Gmsh' src | cut -d ':' -f 1 | xargs -n 1 sed -i "s/org\.geuz\.$packagename;/org\.geuz\.$packagename;\n\nimport org.geuz.onelab.Gmsh;/"
+  # change app name
+  sed -i "s/<string name=\"app_name\">Onelab<\/string>/<string name=\"app_name\">$appname<\/string>/" res/values/strings.xml
+fi
+
+
+# Onelab/Mobile package
 if [ ! -d "libs/armeabi-v7a/" ]; then mkdir -p libs/armeabi-v7a/; fi
 target=1
 while read line; do
@@ -98,6 +116,9 @@ while read line; do
   target=$(($target+1))
 done < <($android_sdk/tools/android list target | grep -A 5 "id:")
 
+# to sign the APK:
+# cp utils/ant.properties build_android/Onelab/
+
 # to re-install on the device:
 # $android_sdk/platform-tools/adb install -r $gmsh_svn/contrib/mobile/build_android/Onelab/bin/Onelab-release.apk
 
diff --git a/contrib/mobile/utils/onelab_ios_build.sh b/contrib/mobile/utils/onelab_ios_build.sh
index 73e5b8e..ae47971 100755
--- a/contrib/mobile/utils/onelab_ios_build.sh
+++ b/contrib/mobile/utils/onelab_ios_build.sh
@@ -29,7 +29,7 @@ function build_gmsh {
     mkdir $gmsh_svn/build_ios_$1
   fi
   cd $gmsh_svn/build_ios_$1
-  cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_TETGEN=1 -DCMAKE_OSX_ARCHITECTURES="$1" ..
+  cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DCMAKE_OSX_ARCHITECTURES="$1" ..
   check
   $build_cmd
   check
@@ -80,6 +80,9 @@ cd $gmsh_svn/contrib/mobile/build_ios
 cmake -DCMAKE_INCLUDE_PATH="$frameworks_dir;$getdp_svn" ..
 make xcodeProject
 
+# Potentially modify source tree for alternate branding
+
+
 #TODO
 #xcodebuild -project "Onelab" -target "Onelab" -configuration Release
 #xcrun -sdk iphoneos PackageApplication -v "Onelab.app" -o "Onelab.ipa" --sign "iPhone Distribution: Your Signature\" --embed enterprise.mobileprovision
diff --git a/contrib/mobile/utils/onelab_iossimulator_build.sh b/contrib/mobile/utils/onelab_iossimulator_build.sh
index 77ea8e6..1fa4b42 100755
--- a/contrib/mobile/utils/onelab_iossimulator_build.sh
+++ b/contrib/mobile/utils/onelab_iossimulator_build.sh
@@ -17,7 +17,7 @@ function build_gmsh {
     mkdir $gmsh_svn/build_iossimulator
   fi
   cd $gmsh_svn/build_iossimulator
-  cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_TETGEN=1 ..
+  cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 ..
   $build_cmd
   $headers_cmd
   cd -
diff --git a/contrib/mpeg_encode/CMakeLists.txt b/contrib/mpeg_encode/CMakeLists.txt
index cebd32a..129194c 100644
--- a/contrib/mpeg_encode/CMakeLists.txt
+++ b/contrib/mpeg_encode/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/onelab/CMakeLists.txt b/contrib/onelab/CMakeLists.txt
index a60d974..66f9cce 100644
--- a/contrib/onelab/CMakeLists.txt
+++ b/contrib/onelab/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/onelab/OnelabClients.cpp b/contrib/onelab/OnelabClients.cpp
index d11c79c..d448bc3 100644
--- a/contrib/onelab/OnelabClients.cpp
+++ b/contrib/onelab/OnelabClients.cpp
@@ -30,9 +30,9 @@ class onelabMetaModelServer : public GmshServer{
     : GmshServer(), _client(client) {}
   ~onelabMetaModelServer(){}
 
-  int NonBlockingSystemCall(const char *str){
-    std::cout << "Calling now : " << str << std::endl;
-    return SystemCall(str);
+  int NonBlockingSystemCall(const std::string &exe, const std::string &args){
+    std::cout << "Calling now : " << exe << " " << args << std::endl;
+    return SystemCallExe(exe, args);
   }
   int NonBlockingWait(double waitint, double timeout, int socket)
   {
@@ -337,7 +337,8 @@ bool localNetworkSolverClient::run()
   }
 
   // Build the commande line
-  std::string command = buildCommandLine();
+  std::string exe = buildCommandLine();
+  std::string command(exe);
   if(command.size())
     command.append(appendArguments());
   else
@@ -350,7 +351,7 @@ bool localNetworkSolverClient::run()
 
   int sock;
   try{
-    sock = socketConnection->Start(command.c_str(), sockname.c_str(), 10);
+    sock = socketConnection->Start(exe.c_str(), command.c_str(), sockname.c_str(), 10);
   }
   catch(const char *err){
     OLMsg::Error("%s (on socket '%s')", err, sockname.c_str());
diff --git a/contrib/onelab/OnelabClients.h b/contrib/onelab/OnelabClients.h
index 24056e9..e43e635 100644
--- a/contrib/onelab/OnelabClients.h
+++ b/contrib/onelab/OnelabClients.h
@@ -14,6 +14,7 @@
 #include "OS.h"
 #include "onelab.h"
 #include "OnelabMessage.h"
+#include "StringUtils.h"
 
 // Onelab file extension
 static std::string onelabExtension(".ol");
@@ -72,6 +73,8 @@ class ShortNameLessThan{
   }
 };
 
+void preProcess(const std::string &client, const std::string &fullName);
+
 /*
 VIRTUAL and BASE CLASSES
 
diff --git a/contrib/onelab/OnelabMessage.cpp b/contrib/onelab/OnelabMessage.cpp
index 18ff2e2..9fde6be 100644
--- a/contrib/onelab/OnelabMessage.cpp
+++ b/contrib/onelab/OnelabMessage.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/onelab/OnelabParser.cpp b/contrib/onelab/OnelabParser.cpp
index 24159fd..cfd9dba 100644
--- a/contrib/onelab/OnelabParser.cpp
+++ b/contrib/onelab/OnelabParser.cpp
@@ -4,7 +4,6 @@
 
 #include "OnelabClients.h"
 
-
 // reserved keywords for the onelab parser
 
 namespace olkey{
@@ -354,8 +353,8 @@ std::string localSolverClient::resolveGetVal(std::string line) {
 	  else if(!action.compare("expand")) {
 	    std::string pattern;
 	    pattern.assign(extractExpandPattern(args[0]));
-	    OLMsg::Info("Expand parameter <%s> with pattern <%s>",
-		      paramName.c_str(),pattern.c_str());
+	    // OLMsg::Info("Expand parameter <%s> with pattern <%s>",
+	    // 	      paramName.c_str(),pattern.c_str());
 	    buff.assign(1,pattern[0]);
 	    for(std::vector<double>::iterator it = choices.begin();
 		it != choices.end(); it++){
@@ -1436,10 +1435,39 @@ void localSolverClient::convert_oneline(std::string line, std::ifstream &infile,
   }
 }
 
+void preProcess(const std::string &client, const std::string &fullName){
+  std::vector<std::string> split = SplitOLFileName(fullName);
+  std::string ifileName = split[1] + split[2] ; // remove heading "_" if any
+  std::string ofileName = split[0] + split[1] ; // remove trailing ".ol"
+
+  std::string workDir = SplitFileName(split[1]) [0];
+  localSolverClient *c = new InterfacedClient(client, "", workDir);
+
+  std::ifstream  infile(ifileName.c_str());
+  if( infile.is_open()) {
+    std::ofstream outfile(ofileName.c_str());
+    if(outfile.is_open()) {
+      OLMsg::Info("Preprocess file <%s> into <%s>",ifileName.c_str(), ofileName.c_str());
+      while ( infile.good() ) {
+	std::string line;
+	getline (infile,line);
+	c->convert_oneline(line,infile,outfile);
+      }
+      outfile.close();
+    }
+    else
+      OLMsg::Error("The file <%s> cannot be opened",ofileName.c_str());
+    infile.close();
+  }
+  else
+    OLMsg::Error("The file <%s> cannot be opened",ifileName.c_str());
+  delete c;
+}
+
 void localSolverClient::convert_onefile(std::string fileName, std::ofstream &outfile) {
   std::ifstream infile(fileName.c_str());
   if (infile.is_open()){
-    //OLMsg::Info("Convert file <%s>",fileName.c_str());
+    OLMsg::Info("Convert file <%s>",fileName.c_str());
     while ( infile.good() ) {
       std::string line;
       getline (infile,line);
@@ -1559,18 +1587,6 @@ void MetaModel::client_sentence(const std::string &name,
       }
     }
   }
-/* else if(!action.compare("commandLine")){
-    if(isTodo(REGISTER)){
-      if(arguments[0].size() >= 1)
-	OLMsg::SetOnelabString(name + "/CommandLine", arguments[0], false);
-      else
-	OLMsg::Error("No pathname given for client <%s>", name.c_str());
-      if(arguments[0].size() >= 2)
-	OLMsg::SetOnelabString(name + "/HostName", arguments[1], false);
-      if(arguments[0].size() >= 3)
-	OLMsg::SetOnelabString(name + "/RemoteDir",arguments[2], false);
-    }
-    }*/
   else if(!action.compare("workingSubdir")){
     localSolverClient *c;
     if((c=findClientByName(name)))
diff --git a/contrib/onelab/README.txt b/contrib/onelab/README.txt
new file mode 100644
index 0000000..7879677
--- /dev/null
+++ b/contrib/onelab/README.txt
@@ -0,0 +1,23 @@
+// ONELAB - Copyright (C) 2014-2015 ULg-UCL
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, and/or sell copies of the
+// Software, and to permit persons to whom the Software is furnished
+// to do so, provided that the above copyright notice(s) and this
+// permission notice appear in all copies of the Software and that
+// both the above copyright notice(s) and this permission notice
+// appear in supporting documentation.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+// OF THIS SOFTWARE.
diff --git a/contrib/onelab/myOS.cpp b/contrib/onelab/myOS.cpp
index 0283278..86e2026 100644
--- a/contrib/onelab/myOS.cpp
+++ b/contrib/onelab/myOS.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/onelab/myOS.h b/contrib/onelab/myOS.h
index 27b3a1f..0f394cc 100644
--- a/contrib/onelab/myOS.h
+++ b/contrib/onelab/myOS.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/contrib/onelab/python/onelab.py b/contrib/onelab/python/onelab.py
index 6bed104..3d0d08c 100755
--- a/contrib/onelab/python/onelab.py
+++ b/contrib/onelab/python/onelab.py
@@ -27,27 +27,20 @@ Please report all bugs and problems to the public mailing list
 <gmsh at geuz.org>.
 """
 
-import socket, struct, os, sys, subprocess
+import socket, struct, os, sys, subprocess, time
 _VERSION = '1.1'
 
-def file_exist(filename):
-  try:
-    with open(filename) as f:
-      return True
-  except IOError:
-    return False
-
-def path(ref,inp=''):
-  # ref is reference directory name
-  # inp is an optional file or directory name
-  dirname = os.path.dirname(ref)
+def path(dirname, inp):
+  # dirname is a directory, can be empty
+  # inp is an optional file or subdirectory name
+  # returns the path to 'inp' in the same directory as 'ref' 
+  dirname = os.path.dirname(dirname + os.sep)
   if not inp: 
-    if dirname:
-      return dirname
-    else :
-      return '.'
+    return dirname
   if inp[0] == '/' or inp[0] == '\\' or (len(inp) > 2 and inp[1] == '\:'):
-     return inp # do nothing, inp is an absolute path
+    return inp # do nothing, inp is an absolute path
+  if inp[0] == '.' :
+    inp = inp[2:] # cut off heading './' or '.\'
   if dirname: 
     return dirname + os.sep + inp # append inp to the path of the reference file
   else:
@@ -311,7 +304,7 @@ class client :
     if not self.socket or not filename :
       return
     self._send(self._GMSH_MERGE_FILE, filename)
-
+        
   def openProject(self, filename) :
     if not self.socket or not filename :
       return
@@ -345,13 +338,13 @@ class client :
       if msg == "true" :
           return True
     return False
-
+  
   def isChanged(self, name) :
     if not self.socket :
       return
     msg = ["get", name]
     self._send(self._GMSH_CLIENT_CHANGED, '\0'.join(msg))
-    (t, msg) = self._receive() 
+    (t, msg) = self._receive()
     if t == self._GMSH_CLIENT_CHANGED :
       if msg == "true" :
           return True
@@ -391,10 +384,11 @@ class client :
   def run(self, name, command, arguments=''):
     self.runSubClient(name, command, arguments)
 
-  def __init__(self):
+  def __init__(self, ref=''):
     self.socket = None
     self.name = ""
     self.addr = ""
+    self.wdir = os.path.dirname(ref)
     self._numSubClients = 0
     for i, v in enumerate(sys.argv) :
       if v == '-onelab':
@@ -405,7 +399,6 @@ class client :
     self.action = "compute" # default (subclients have no client.Action defined)
     self.action = self.getString(self.name + '/Action', False)
     self.setNumber('IsPyMetamodel',value=1,visible=0)
-    #self.defineNumber('0Metamodel/Loop',value=0,visible=0)
     self.loop = self.getNumber('0Metamodel/Loop', warn_if_not_found=False)
     self.batch = self.getNumber('0Metamodel/Batch', warn_if_not_found=False)
     self.sendInfo("Performing OneLab '" + self.action + "'")
@@ -425,7 +418,7 @@ class client :
   def __del__(self):
     self.finalize()
 
-  def call(self, name, cmdline, remote='', rundir='', logfile=''):
+  def call(self, name, cmdline, remote='', rundir='', logfile='', poll=0):
     cwd = None
     if not remote :
       argv = cmdline.rsplit(' ')
@@ -434,26 +427,47 @@ class client :
     else :
       argv=['ssh', remote , "cd %s ; %s" %(rundir,cmdline) ]
 
+    if poll and not logfile :
+        logfile = os.devnull
     if logfile:
       call = subprocess.Popen(argv, bufsize=1, cwd=cwd,
                               stdout=open(logfile,"w"),
-                              stderr=subprocess.PIPE)
+                              stderr=subprocess.STDOUT)
+      while call.poll() == None :
+        self.action = self.getString(self.name + '/Action', False)
+        if self.action == 'stop':
+          call.terminate()
+          self._send(self._GMSH_WARNING, 'client killed')
+          sys.exit(1)
+        time.sleep(1) # check every second for the stop signal from Gmsh
     else:
       call = subprocess.Popen(argv, bufsize=1, cwd=cwd,
                               stdout=subprocess.PIPE,
-                              stderr=subprocess.PIPE)
+                              stderr=subprocess.STDOUT)
+      count = 0
       for line in iter(call.stdout.readline, b''):
         print(line.rstrip())
+        count += 1
+        if count == 50 : # check every 50 lines for the stop signal from Gmsh
+          count = 0
+          self.action = self.getString(self.name + '/Action', False)
+          if self.action == 'stop':
+            call.terminate()
+            self._send(self._GMSH_WARNING, 'client killed')
+            sys.exit(1)
+      
     result = call.wait()
     if result == 0 :
-      self._send(self._GMSH_INFO, 'call \"' + ' '.join(argv) + '\"')
+      self._send(self._GMSH_INFO, 'done \"' + ' '.join(argv) + '\"')
       if self.action == 'compute':
         self.setChanged(name, False)
     else :
-      for line in iter(call.stderr.readline, b''):
-        self._send(self._GMSH_ERROR, line.rstrip().encode('utf-8'))
+      self._send(self._GMSH_ERROR, 'error \"' + ' '.join(argv) + '\"')
       sys.exit(1)
-      
+  
+  def copy(self, here, there):
+    os.system('cp '+ here + ' ' + there)
+    
   def upload(self, here, there, remote='') :
     if not here or not there :
       return
@@ -483,28 +497,72 @@ class client :
       self._send(self._GMSH_INFO, 'download: ' + ' '.join(argv))
     else :
       print(call.stderr.read())
-      
-  def solutionFiles(self, list) :
+
+  def getPath(self, inp='') :
+    return path(self.wdir, inp)
+
+  def fileExists(self, p) :
+    return os.path.exists(p)
+
+  def checkFile(self, p) :
+    if not self.fileExists(p):
+      self.sendError('path error: %s' %(p))
+      exit(0) 
+    return True
+
+  def checkPath(self, inp='') :
+    p = path(self.wdir,inp)
+    self.checkFile(p)
+    return p
+
+  def solutionFiles(self, client, list) :
     self.defineNumber('0Metamodel/9Use restored solution', value=0, choices=[0,1])
     self.defineString('0Metamodel/9Tag', value='')
     if list :
       if self.getNumber('0Metamodel/9Use restored solution') :
-        return self.getStringChoices('0Metamodel/9Solution files')  
+        solFiles = self.getStringChoices('0Metamodel/9Solution files')
+        for i in solFiles:
+          self.checkFile(i)
       else :
-        self.setString('0Metamodel/9Solution files', value=list[0],
-                       choices=list, readOnly=1)      
-    return list
+        solFiles = list
+        self.setString('0Metamodel/9Solution files', value=solFiles[0],
+                       choices=solFiles, readOnly=1)
+        for i in solFiles:
+          if not self.fileExists(i) :
+            self.setChanged(client, 'true')
+    return solFiles
+
+  def needsCompute(self, client) :
+    # Avoid recomputation when a database with restored solutions has just been loaded
+    # Otherwise, stop using restored solutions when the client elmer has changed
+    if self.useRestoredSolution() == 2: # we have just loaded a database
+      self.setRestoredSolution(1)
+      self.setChanged(client, 'false') # do not compute
+    else :
+      if self.isChanged(client):
+        self.setRestoredSolution(0)
+        return True
+    return False
+
+  def willCompute(self, client) : # Inform user about the value of needsCompute
+    if self.useRestoredSolution() == 2: # special value
+      return False
+    else :
+      return True if self.isChanged(client) else False
+
+  def useRestoredSolution(self) :
+    return self.getNumber('0Metamodel/9Use restored solution') 
 
-  def restoreSolution(self) :
-    return self.getNumber('0Metamodel/9Use restored solution')
+  def setRestoredSolution(self, val) :
+    self.setNumber('0Metamodel/9Use restored solution', value=val)
 
   def outputFiles(self, list) :
     if list :
-      self.setString(self.name+'/9Output files', value=list[0],
-                     choices=list, visible=0)
+      self.setString('0Metamodel/9Output files', value=list[0],
+                     choices=list, visible=1)
 
 # tool to extract the (i, j)th element in an array file
-from rlcompleter import readline
+# from rlcompleter import readline
 def extract(filename,i,j):
     input = open(filename,'r')
     all_lines = input.readlines()
diff --git a/contrib/onelab2/CMakeLists.txt b/contrib/onelab2/CMakeLists.txt
new file mode 100644
index 0000000..64e683f
--- /dev/null
+++ b/contrib/onelab2/CMakeLists.txt
@@ -0,0 +1,34 @@
+set(SRC
+  NetworkUtils.cpp
+  OnelabAttributes.cpp
+  OnelabDatabase.cpp
+  OnelabProtocol.cpp
+  OnelabLocalNetworkClient.cpp
+  OnelabServer.cpp
+  OnelabNetworkClient.cpp
+  GmshNetworkClient.cpp
+  GmshLocalClient.cpp)
+
+file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
+append_gmsh_src(contrib/onelab2 "${SRC};${HDR}")
+
+# build only the server
+if(HAVE_UDT)
+	find_package(Threads REQUIRED)
+	find_path(UDT_INCLUDE_DIR udt.h PATH_SUFFIXES include udt)
+	find_library(UDT_LIBRARY udt)
+	if(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+		list(APPEND EXTERNAL_INCLUDES ${UDT_INCLUDE_DIR})
+		list(APPEND EXTERNAL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+		list(APPEND EXTERNAL_LIBRARIES ${UDT_LIBRARY})
+	else(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+		message(FATAL_ERROR "Unable to find UDT library")
+	endif(UDT_INCLUDE_DIR AND UDT_LIBRARY AND Threads_FOUND)
+endif(HAVE_UDT)
+
+include_directories(${CMAKE_SOURCE_DIR}/Common/) # for onelab.h
+include_directories(${CMAKE_BINARY_DIR}/Common/) # for GmshConfig.h
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
+include_directories(${EXTERNAL_INCLUDES}) # for UDT
+add_executable (onelabserver Onelab.cpp OnelabServer.cpp OnelabNetworkClient.cpp OnelabLocalNetworkClient.cpp NetworkUtils.cpp OnelabProtocol.cpp OnelabAttributes.cpp) 
+target_link_libraries(onelabserver ${EXTERNAL_LIBRARIES})
diff --git a/contrib/onelab2/GmshLocalClient.cpp b/contrib/onelab2/GmshLocalClient.cpp
new file mode 100644
index 0000000..db3d031
--- /dev/null
+++ b/contrib/onelab2/GmshLocalClient.cpp
@@ -0,0 +1,76 @@
+#include "GmshLocalClient.h"
+#include "onelabUtils.h"
+#ifdef HAVE_FLTK
+#include "FlGui.h"
+#include "GmshMessage.h"
+#include "onelab2Group.h"
+#include "OpenFile.h"
+#include "Context.h"
+
+void GmshLocalClient::setCallback(onelabGroup *cb) {_cb_obj = cb;}
+void GmshLocalClient::onNewParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->addParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshLocalClient::onUpdateParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->updateParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshLocalClient::onRemoveParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->removeParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshLocalClient::onMessage(const std::string & name, const std::string &message, int level)
+{
+  FlGui::instance()->lock();
+  switch(level) {
+    case OnelabAttrMessage::Info:
+      Msg::Direct("Info    : %s - %s", name.c_str(), message.c_str());
+      break;
+    case OnelabAttrMessage::Warning:
+      Msg::Warning("%s - %s", name.c_str(), message.c_str());
+      break;
+    case OnelabAttrMessage::Error:
+      Msg::Error("%s - %s", name.c_str(), message.c_str());
+      break;
+  }
+  FlGui::instance()->unlock();
+  Fl::awake((void *)NULL);
+}
+void GmshLocalClient::refresh()
+{
+  Fl::awake(onelab_cb, (void*)"refresh");
+}
+void GmshLocalClient::mergeFile(const std::string &filename)
+{
+  FlGui::instance()->lock();
+  MergePostProcessingFile(filename, CTX::instance()->solver.autoShowViews, CTX::instance()->solver.autoShowLastStep, true);
+  _cb_obj->addLastPostProcessing();
+  FlGui::instance()->unlock();
+  Fl::awake((void *)NULL);
+}
+#endif
+
+void GmshLocalClient::run(std::string action) {
+  if(getName() == "Gmsh") {
+    FlGui::instance()->lock();
+    onelabUtils::runGmshClient(action, 2); 
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
diff --git a/contrib/onelab2/GmshLocalClient.h b/contrib/onelab2/GmshLocalClient.h
new file mode 100644
index 0000000..9fca4a1
--- /dev/null
+++ b/contrib/onelab2/GmshLocalClient.h
@@ -0,0 +1,38 @@
+#ifndef _GMSHLOCLACLIENT_H_
+#define _GMSHLOCALCLIENT_H_
+
+#include "OnelabLocalClient.h"
+
+#ifdef HAVE_FLTK
+class onelabGroup;
+#endif
+
+class GmshLocalClient : public OnelabLocalClient
+{
+private:
+#ifdef HAVE_FLTK
+  onelabGroup *_cb_obj;
+#endif
+public:
+#ifdef HAVE_FLTK
+	GmshLocalClient(std::string name, onelab::parameterSpace *parameterSpace)
+		: OnelabLocalClient(name, parameterSpace){
+    _cb_obj = NULL;
+	}
+	~GmshLocalClient(){}
+  void setCallback(onelabGroup *cb);
+	void onNewParameter(onelab::parameter *p);
+  void onUpdateParameter(onelab::parameter *p);
+  void onRemoveParameter(onelab::parameter *p);
+  void onMessage(const std::string &name, const std::string &message, int level);
+  void refresh();
+  void mergeFile(const std::string &filename);
+#else
+	GmshLocalClient(std::string name, onelab::parameterSpace *parameterSpace)
+		: OnelabLocalClient(name, parameterSpace){}
+#endif
+
+  void run(std::string action);
+};
+
+#endif
diff --git a/contrib/onelab2/GmshNetworkClient.cpp b/contrib/onelab2/GmshNetworkClient.cpp
new file mode 100644
index 0000000..f0c2be1
--- /dev/null
+++ b/contrib/onelab2/GmshNetworkClient.cpp
@@ -0,0 +1,54 @@
+#include <iostream>
+
+#include "GmshNetworkClient.h"
+#ifdef HAVE_FLTK
+#include "FlGui.h"
+#include "onelab2Group.h"
+#include "GmshMessage.h"
+
+void GmshNetworkClient::setCallback(onelabGroup *cb) {_cb_obj = cb;}
+void GmshNetworkClient::onNewParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->addParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshNetworkClient::onUpdateParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->updateParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshNetworkClient::onRemoveParameter(onelab::parameter *p)
+{
+  if(_cb_obj) {
+    FlGui::instance()->lock();
+    _cb_obj->removeParameter(*p);
+    FlGui::instance()->unlock();
+    Fl::awake((void *)NULL);
+  }
+}
+void GmshNetworkClient::onMessage(const std::string & name, const std::string &message, int level)
+{
+  FlGui::instance()->lock();
+  switch(level) {
+    case OnelabAttrMessage::Info:
+      Msg::Direct("Info    : %s - %s", name.c_str(), message.c_str());
+      break;
+    case OnelabAttrMessage::Warning:
+      Msg::Warning("%s - %s", name.c_str(), message.c_str());
+      break;
+    case OnelabAttrMessage::Error:
+      Msg::Error("%s - %s", name.c_str(), message.c_str());
+      break;
+  }
+  FlGui::instance()->unlock();
+  Fl::awake((void *)NULL);
+}
+#endif
diff --git a/contrib/onelab2/GmshNetworkClient.h b/contrib/onelab2/GmshNetworkClient.h
new file mode 100644
index 0000000..8af7133
--- /dev/null
+++ b/contrib/onelab2/GmshNetworkClient.h
@@ -0,0 +1,36 @@
+#ifndef _GMSHCLIENT_H_
+#define _GMSHCLIENT_H_
+
+#include <vector>
+
+#include "VirtualClient.h"
+#include "NetworkUtils.h"
+#include "OnelabNetworkClient.h"
+#include "OnelabProtocol.h"
+
+#ifdef HAVE_FLTK
+class onelabGroup;
+#endif
+
+class GmshNetworkClient : public OnelabNetworkClient
+{
+private:
+#ifdef HAVE_FLTK
+  onelabGroup *_cb_obj;
+#endif
+public:
+#ifdef HAVE_FLTK
+	GmshNetworkClient(std::string name) : OnelabNetworkClient(name) {_cb_obj=NULL;}
+	GmshNetworkClient(std::string name, unsigned int ip, unsigned short port) : OnelabNetworkClient(name, ip, port) {_cb_obj =NULL;}
+  void setCallback(onelabGroup *cb);
+	void onNewParameter(onelab::parameter *p);
+  void onUpdateParameter(onelab::parameter *p);
+  void onRemoveParameter(onelab::parameter *p);
+  void onMessage(const std::string &name, const std::string &message, int level);
+#else
+	GmshNetworkClient(std::string name) : OnelabNetworkClient(name) {}
+	GmshNetworkClient(std::string name, unsigned int ip, unsigned short port) : OnelabNetworkClient(name, ip, port) {}
+#endif
+};
+
+#endif
diff --git a/contrib/onelab2/NetworkUtils.cpp b/contrib/onelab2/NetworkUtils.cpp
new file mode 100644
index 0000000..12bfa24
--- /dev/null
+++ b/contrib/onelab2/NetworkUtils.cpp
@@ -0,0 +1,146 @@
+#include <sys/socket.h>
+#include <netdb.h>
+#include <ifaddrs.h>
+#include <iostream>
+#include <unistd.h>
+
+#include "NetworkUtils.h"
+
+UInt32 ip4_inet_pton(const char *ip)
+{
+	struct in_addr dst;
+	if(inet_pton(AF_INET, ip, &dst) == 0)
+		return 0; // the string seems to contain an invalid ip
+	return ntohl(dst.s_addr);
+}
+
+UInt32 ip4_inet_resolve(const char *hostname)
+{
+	struct hostent *he;
+	struct in_addr **addr_list;
+
+	if((he = gethostbyname(hostname)) == NULL)
+		return 0;
+
+	addr_list = (struct in_addr **) he->h_addr_list;
+
+	for(int i = 0; addr_list[i] != NULL; i++) 
+		return ntoh32(addr_list[i]->s_addr);
+
+	return 0;
+}
+
+void ip4_socket_ip(Socket fd, IPv4 &ip)
+{
+  struct sockaddr_in sin;
+  socklen_t len = sizeof(sin);
+  if(getsockname(fd, (struct sockaddr *)&sin, &len) != -1){
+	  ip.address = ntoh32(sin.sin_addr.s_addr);
+    ip.port = ntoh16(sin.sin_port);
+  }
+}
+
+UInt32 ip4_default_iface()
+{
+	struct ifaddrs *ifas = NULL;
+	UInt32 ip = 0;
+
+	getifaddrs(&ifas);
+	for (struct ifaddrs *ifa = ifas; ifa != NULL; ifa = ifa->ifa_next) {
+		if(ifa->ifa_addr->sa_family == AF_INET) {
+			UInt32 tmp = ntoh32((UInt32)((struct sockaddr_in *) ifa->ifa_addr)->sin_addr.s_addr);
+			if(!ip4_is_loopback(tmp)) {
+				ip = tmp;
+				break;
+			}
+		}
+	}
+	freeifaddrs(ifas);
+	return ip;
+}
+
+Socket ip4_socket(IPv4 ip, int socketType)
+{
+	Socket fd;
+	struct sockaddr_in addr;
+
+	memset(&addr, 0, sizeof(struct sockaddr_in));
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = hton32((ip.address==0)? INADDR_ANY : ip.address);
+	addr.sin_port = hton16(ip.port);
+
+	if((fd = socket(AF_INET, socketType, 0)) < 0) throw ERROR_SOCKET_CREATE;
+
+	if(bind(fd, (struct sockaddr*)&addr, sizeof(addr)) != 0) throw ERROR_SOCKET_BIND;	
+
+	return fd;
+}
+
+void ip4_socket_timeout(Socket fd, long tos, long tous)
+{
+	struct timeval tv;
+	tv.tv_sec = tos; // seconds
+	tv.tv_usec = tous; // microseconds
+	setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval));
+}
+
+int ip4_socket_send(Socket fd, UInt8 *src, int length)
+{
+	ssize_t sent = send(fd, src, length, 0);
+
+	// TODO handle error (length != sent) for ??? and (sent < 0) for local error
+  //std::cout << "ip: send " << sent << "/" << length << "bytes" <<  std::endl;
+	return (int)sent;
+}
+int ip4_socket_send(Socket fd, UInt8 *src, int length, IPv4 dst)
+{
+	struct sockaddr_in to;
+	socklen_t tol = sizeof(to);
+	memset(&to, 0, tol);
+
+	to.sin_family = AF_INET;
+	to.sin_port = hton16(dst.port);
+	to.sin_addr.s_addr = hton32(dst.address);
+
+	ssize_t sent = sendto(fd, src, length, 0, (struct sockaddr *)&to, tol);
+
+	// TODO handle error (length != sent) for ??? and (sent < 0) for local error
+  //std::cout << "ip: send " << sent << "/" << length << "bytes to " << ip4_inet_ntop(dst.address)<< ':' << dst.port << std::endl;
+	return (int)sent;
+}
+
+int ip4_socket_recv(Socket fd, UInt8 *dst, int maxlength)
+{
+  ssize_t recved = recv(fd, dst, maxlength, 0);
+  
+	// TODO handle error if(recvlength < 0)
+  //std::cout << "ip: recv " << recved << "bytes" << std::endl;
+	return recved;
+}
+int ip4_socket_recv(Socket fd, UInt8 *dst, int maxlength, IPv4 &src)
+{
+	struct sockaddr_in from;
+	socklen_t froml = sizeof(from);
+	memset(&from, 0, froml);
+
+	ssize_t recvlength = recvfrom(fd, dst, maxlength, 0, (struct sockaddr *)&from, &froml);
+	src.port = ntoh16(from.sin_port);
+	src.address = ntoh32(from.sin_addr.s_addr);
+
+	// TODO handle error if(recvlength < 0)
+  //std::cout << "ip: recv " << recvlength << "bytes from " << ip4_inet_ntop(src.address)<< ':' << src.port << std::endl;
+	return recvlength;
+}
+
+bool ip4_socket_get_local_address(Socket fd, IPv4 &ip)
+{
+	struct sockaddr_in addr_in;
+	socklen_t len = sizeof(addr_in);
+
+	if(getsockname(fd, (struct sockaddr *)&addr_in, &len) != -1) {
+		ip.port = ntoh16(addr_in.sin_port);
+		ip.address = ntoh32(addr_in.sin_addr.s_addr);
+		return true;
+	}
+	return false;
+}
diff --git a/contrib/onelab2/NetworkUtils.h b/contrib/onelab2/NetworkUtils.h
new file mode 100644
index 0000000..3b44e30
--- /dev/null
+++ b/contrib/onelab2/NetworkUtils.h
@@ -0,0 +1,156 @@
+#ifndef _NETWORKUTILS_H_
+#define _NETWORKUTILS_H_
+
+#include <cstring>
+#include <sstream>
+#include <unistd.h>
+#include <arpa/inet.h>
+
+#define ERROR_SOCKET_CREATE 10
+#define ERROR_SOCKET_BIND 11
+#define ERROR_SOCKET_CONNECT 12
+#define ERROR_SOCKET_LISTEN 13
+#define ERROR_SOCKET_RECV 14
+
+#ifdef WIN32
+typedef SOCKET Socket;
+typedef int socklen_t;
+#else
+typedef int Socket;
+#endif
+
+typedef unsigned char  UInt8;
+typedef unsigned short UInt16;
+typedef unsigned int UInt32;
+typedef unsigned long long UInt64;
+typedef struct {unsigned char bytes[16];} UInt128;
+typedef struct {UInt32 address; UInt16 port;} IPv4;
+
+// host to network (and network to host) order, Reference RFC 791
+#define hton64 ntoh64
+#define hton32 htonl
+#define ntoh32 ntohl
+#define hton16 htons
+#define ntoh16 ntohs
+#if BYTE_ORDER == BIG_ENDIAN
+inline UInt64 ntoh64(UInt64 n) {return n;}
+inline double ntoh64(double n) {return n;}
+#else
+inline UInt64 ntoh64(UInt64 n) {
+        union
+        {
+		UInt64 d;
+                UInt8 b[8];
+        }in, out;
+        in.d = n;
+        out.b[0] = in.b[7];
+        out.b[1] = in.b[6];
+        out.b[2] = in.b[5];
+        out.b[3] = in.b[4];
+        out.b[4] = in.b[3];
+        out.b[5] = in.b[2];
+        out.b[6] = in.b[1];
+        out.b[7] = in.b[0];
+        return out.d;
+}
+inline double ntoh64(double n) {
+        union
+        {
+		double d;
+                UInt8 b[8];
+        }in, out;
+        in.d = n;
+        out.b[0] = in.b[7];
+        out.b[1] = in.b[6];
+        out.b[2] = in.b[5];
+        out.b[3] = in.b[4];
+        out.b[4] = in.b[3];
+        out.b[5] = in.b[2];
+        out.b[6] = in.b[1];
+        out.b[7] = in.b[0];
+        return out.d;
+}
+#endif
+
+inline UInt8 *encode(UInt8 *dst, UInt8 data) {memcpy(dst, reinterpret_cast<void*>(&data), sizeof(UInt8));return dst+ sizeof(UInt8);}
+inline UInt8 *encode(UInt8 *dst, UInt16 data) {data = hton16(data);memcpy(dst, reinterpret_cast<void*>(&data), sizeof(UInt16));return dst+ sizeof(UInt16);}
+inline UInt8 *encode(UInt8 *dst, UInt32 data) {data = hton32(data);memcpy(dst, reinterpret_cast<void*>(&data), sizeof(UInt32));return dst+ sizeof(UInt32);}
+inline UInt8 *encode(UInt8 *dst, UInt64 data) {data = hton64(data);memcpy(dst, reinterpret_cast<void*>(&data), sizeof(UInt64));return dst+ sizeof(UInt64);}
+inline UInt8 *encode(UInt8 *dst, UInt8 *data, unsigned int length) {memcpy(dst, reinterpret_cast<void*>(data), length);return dst+ length;}
+inline UInt8 *encode(UInt8 *dst, double data) {data = hton64(data);memcpy(dst, reinterpret_cast<void*>(&data), sizeof(double));return dst+ sizeof(double);}
+
+inline UInt8 *parse(UInt8 *src, UInt8 &data) {memcpy(reinterpret_cast<void*>(&data), src, sizeof(UInt8)); return src+ sizeof(UInt8);}
+inline UInt8 *parse(UInt8 *src, UInt16 &data) {memcpy(reinterpret_cast<void*>(&data), src, sizeof(UInt16));data = ntoh16(data);return src+ sizeof(UInt16);}
+inline UInt8 *parse(UInt8 *src, UInt32 &data) {memcpy(reinterpret_cast<void*>(&data), src, sizeof(UInt32));data = ntoh32(data);return src+ sizeof(UInt32);}
+inline UInt8 *parse(UInt8 *src, UInt64 &data) {memcpy(reinterpret_cast<void*>(&data), src, sizeof(UInt64));data = ntoh64(data);return src+ sizeof(UInt64);}
+inline UInt8 *parse(UInt8 *src, UInt8 *data, UInt16 length) {memcpy(reinterpret_cast<void*>(data), src, length);return src+length;}
+inline UInt8 *parse(UInt8 *src, double &data) {memcpy(reinterpret_cast<void*>(&data), src, sizeof(double));data = ntoh64(data);return src+ sizeof(double);}
+inline UInt8 *parse(UInt8 *src, std::string &data, UInt16 length) {data.assign((char *)src, length-1); return src+length;}
+inline UInt8 *parse(UInt8 *src, std::string &data, char limiter) {UInt16 len = strchr((char *)src, limiter)-(char*)src+1; return parse(src, data, len);}
+
+inline bool ip4_is_loopback(const unsigned int ip) { // Reference RFC 1122
+	return (unsigned int)(ip & 0xFF000000) == (unsigned int)0x7F000000; // 127.0.0.0/8
+}
+inline bool ip4_is_private(const unsigned int ip) { // Refercence RFC 1918
+	return (unsigned int)(ip & 0xFFFF0000) == (unsigned int)0xC0A80000 || // 192.168.0.0/16
+		(unsigned int)(ip & 0xFFF00000) == (unsigned int)0xAC100000 || // 172.16.0.0/12
+		(unsigned int)(ip & 0xFF000000) == (unsigned int)0x0A000000; // 10.0.0.0/8
+}
+UInt32 ip4_inet_pton(const char *);
+UInt32 ip4_inet_resolve(const char *hostname);
+UInt32 ip4_default_iface();
+inline std::string ip4_inet_ntop(UInt32 address) {
+	std::ostringstream oss;
+	oss << ((address >> 24) & 0xFF) << '.'	
+		<< ((address >> 16) & 0xFF) << '.'
+		<< ((address >> 8) & 0xFF) << '.'
+		<< (address & 0xFF);
+	return oss.str();
+}
+void ip4_socket_ip(Socket fd, IPv4 &ip);
+
+Socket ip4_socket(IPv4 ip, int socketType);
+int ip4_socket_send(Socket fd, UInt8 *src, int length);
+int ip4_socket_send(Socket fd, UInt8 *src, int length, IPv4 dst);
+int ip4_socket_recv(Socket fd, UInt8 *dst, int maxlength, IPv4 &src);
+int ip4_socket_recv(Socket fd, UInt8 *dst, int maxlength);
+inline void ip4_socket_listen(Socket fd, int maxconnection=1024)
+{
+	if(-1 == listen(fd, maxconnection))  throw ERROR_SOCKET_LISTEN;
+}
+inline Socket ip4_socket_accept(Socket fd, IPv4 &ip)
+{
+	Socket cli;
+	struct sockaddr_in addr;
+  unsigned int addrl = sizeof(addr);
+
+	cli = accept(fd, (struct sockaddr*)&addr, &addrl);
+	ip.address = ntoh32(addr.sin_addr.s_addr);
+	ip.port = ntoh16(addr.sin_port);
+
+	return cli;
+}
+inline int ip4_socket_connect(Socket fd, IPv4 &ip)
+{
+  struct sockaddr_in addr;
+  unsigned int addrl = sizeof(addr);
+  memset(&addr, 0, sizeof(struct sockaddr_in));
+
+  addr.sin_family = AF_INET;
+  addr.sin_addr.s_addr = hton32(ip.address);
+  addr.sin_port = hton16(ip.port);
+  return connect(fd, (struct sockaddr*)&addr, addrl);
+}
+inline bool ip4_socket_connected(Socket fd)
+{
+  int error_code;
+  unsigned int optlen = sizeof(error_code);
+  getsockopt(fd, SOL_SOCKET, SO_ERROR, &error_code, &optlen);
+  return (error_code == 0);
+}
+bool ip4_socket_get_local_address(Socket fd, IPv4 &ip);
+void ip4_socket_timeout(Socket d, long tos, long tous=0);
+inline void ip4_socket_reuse_address(Socket fd, bool reuse=true) {setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof reuse);}
+inline void ip4_socket_close(Socket fd) {/*if(-1 == */close(fd);}
+
+#endif
diff --git a/contrib/onelab2/Onelab.cpp b/contrib/onelab2/Onelab.cpp
new file mode 100644
index 0000000..4b3989d
--- /dev/null
+++ b/contrib/onelab2/Onelab.cpp
@@ -0,0 +1,68 @@
+#include <iostream>
+
+#include "OnelabServer.h"
+#include "OnelabNetworkClient.h"
+
+#include "NetworkUtils.h"
+
+OnelabServer *OnelabServer::_server = 0;
+
+void usage()
+{
+	//TODO std::cout << std::endl;
+}
+
+int server(unsigned short port=0)
+{
+	OnelabServer::instance(0, port);
+	OnelabServer::instance()->Run();
+}
+
+int main(int argc, char **argv)
+{
+	bool isServer = false;
+	unsigned int ip = 0;
+	unsigned short port = 0;
+	for(int arg=1; arg<argc; arg++) {
+		if(strcmp(argv[arg], "-l") == 0 || strcmp(argv[arg], "--listen") == 0)
+			isServer = true;
+		else if(strcmp(argv[arg], "-p") == 0 || strcmp(argv[arg], "--port") == 0) {
+			if(++arg >= argc) {
+				usage();
+				return 1;
+			}
+			port = atoi(argv[arg]);
+		}
+		else if(strcmp(argv[arg], "-i") == 0 || strcmp(argv[arg], "--ip") == 0) {
+			if(++arg >= argc) {
+				usage();
+				return 1;
+			}
+			ip = ip4_inet_pton(argv[arg]);
+			
+		}
+		else {
+			usage();
+			return 1;
+		}
+	}
+	try {
+		if(isServer && port != 0)
+			server(port);
+		else {
+			usage();
+			return -1;
+		}
+	}
+	catch(int &e) {
+		if(e == ERROR_SOCKET_CREATE || e == ERROR_SOCKET_BIND || e == ERROR_SOCKET_CONNECT || e == ERROR_SOCKET_LISTEN || e == ERROR_SOCKET_RECV)
+			std::cerr << "UDT fail: " << UDT::getlasterror().getErrorMessage() << std::endl;
+		std::cerr << "Fail with code " << e << std::endl;
+		return e;
+	}
+	catch(const char*e) {
+		std::cout << e << std::endl;
+		return 1;
+	}
+	return 0;
+}
diff --git a/contrib/onelab2/OnelabAttributes.cpp b/contrib/onelab2/OnelabAttributes.cpp
new file mode 100644
index 0000000..f89c989
--- /dev/null
+++ b/contrib/onelab2/OnelabAttributes.cpp
@@ -0,0 +1,198 @@
+#include <cstring>
+#include <iostream>
+
+#include "OnelabAttributes.h"
+
+UInt8 *OnelabAttrStart::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+	dst = encode(dst, (UInt8 *)_name.c_str(), _name.size());
+
+	return dst;
+}
+UInt8 *OnelabAttrStart::parseAttribute(UInt8 *src, UInt32 length)
+{
+	_name.assign((char *)src, (int)length);
+
+	return src+length;
+}
+void OnelabAttrStart::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute start:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "name:   " << _name << std::endl;
+}
+
+UInt8 *OnelabAttrParameterQuery::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+	dst = encode(dst, _ptype);
+	dst = encode(dst, (UInt8 *)_pname.c_str(), _pname.size());
+
+	return dst;
+}
+UInt8 *OnelabAttrParameterQuery::parseAttribute(UInt8 *src, UInt32 length)
+{
+	if(length < 1) throw ERROR_INVALID_ATTRIBUTE_SIZE;
+
+	src = parse(src, _ptype);
+	_pname.assign((char *)src, (int)(length-1));
+
+	return src+length;
+}
+void OnelabAttrParameterQuery::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute parameter query:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "type:   " << this->_ptype << std::endl
+		<< "name:   " << this->_pname << std::endl;
+}
+
+UInt8 *OnelabAttrMessage::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+	dst = encode(dst, _level);
+	dst = encode(dst, _message, _messageLength);
+
+	return dst;
+}
+UInt8 *OnelabAttrMessage::parseAttribute(UInt8 *src, UInt32 length)
+{
+	if(length < 1) throw ERROR_INVALID_ATTRIBUTE_SIZE;
+
+	src = parse(src, _level);
+	_messageLength = length-1;
+	if(_message != NULL) free(_message);
+	_message = (UInt8 *)malloc(_messageLength);
+	src = parse(src, _message, _messageLength);
+
+	return src;
+}
+void OnelabAttrMessage::showAttribute() const
+{
+	std::cout << "Attribute message:" << std::endl
+		<< "Level:   " << _level << std::endl
+		<< "Message: " << _message << std::endl;
+}
+
+UInt8 *OnelabAttrAction::encodeAttribute(UInt8 *dst)
+{
+  dst = encode(dst, getAttributeType());
+  dst = encode(dst, getAttributeLength());
+
+  dst = encode(dst, (UInt8 *)_client.c_str(), _client.size()+1);
+  dst = encode(dst, (UInt8 *)_action.c_str(), _action.size());
+
+  return dst;
+}
+
+UInt8 *OnelabAttrAction::parseAttribute(UInt8 *src, UInt32 length)
+{
+  _client.assign((char *)src);
+  src += _client.size()+1;
+  _action.assign((char *)src, length-_client.size()-1);
+  src += _action.size();
+  return src;
+}
+
+void OnelabAttrAction::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute action:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "client (target):  " << _client << std::endl
+		<< "action:           " << _action << std::endl;
+}
+
+UInt8 *OnelabAttrFileQuery::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+  dst = encode(dst, (UInt8 *)_name, _length);
+  dst = encode(dst, (UInt8 *)_client.c_str(), _client.length()+1);
+
+  return dst;
+}
+UInt8 *OnelabAttrFileQuery::parseAttribute(UInt8 *src, UInt32 length)
+{
+  if(_name != NULL) free(_name);
+  _length = length;
+  _name = (char *)malloc(_length+1);
+  src = parse(src, (UInt8 *)_name, _length);
+  _name[_length] = '\0';
+
+  return src;
+}
+void OnelabAttrFileQuery::setFilename(const std::string name)
+{
+  if(_name != NULL) free(_name);
+
+  _length = name.size();
+  _name = strndup(name.c_str(), _length);
+}
+void OnelabAttrFileQuery::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute file query:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "client (file):  " << _client << std::endl
+		<< "file:           " << _name << std::endl;
+}
+
+
+UInt8 *OnelabAttrMergeFile::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+  dst = encode(dst, (UInt8 *)_name, _length);
+
+  return dst;
+}
+UInt8 *OnelabAttrMergeFile::parseAttribute(UInt8 *src, UInt32 length)
+{
+  if(_name != NULL) free(_name);
+  _length = length;
+  _name = (char *)malloc(_length+1);
+  src = parse(src, (UInt8 *)_name, _length);
+  _name[_length] = '\0';
+  return src;
+}
+void OnelabAttrMergeFile::setFilename(const std::string name)
+{
+  if(_name != NULL) free(_name);
+
+  _length = name.size();
+  _name = strndup(name.c_str(), _length+1);
+}
+void OnelabAttrMergeFile::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute merge file:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "file:           " << _name << std::endl;
+}
+
+
+UInt8 *OnelabAttrFile::encodeAttribute(UInt8 *dst)
+{
+	dst = encode(dst, getAttributeType());
+	dst = encode(dst, getAttributeLength());
+
+  dst = encode(dst, _filelength);
+  dst = encode(dst, (UInt8 *)_name, strlen(_name)+1);
+  return dst;
+}
+UInt8 *OnelabAttrFile::parseAttribute(UInt8 *src, UInt32 length)
+{
+  if(length < 5) throw ERROR_INVALID_ATTRIBUTE_SIZE;
+  if(_name != NULL) free(_name);
+
+  src = parse(src, _filelength);
+  _name = strndup((char *)src, length-4);
+  return  src+length-4;
+}
+void OnelabAttrFile::showAttribute() const
+{
+	std::cout << "\033[1m" << "Attribute file:"<< getAttributeType() << "\033[0m"<< std::endl
+		<< "file:           " << _name << std::endl;
+}
diff --git a/contrib/onelab2/OnelabAttributes.h b/contrib/onelab2/OnelabAttributes.h
new file mode 100644
index 0000000..433a501
--- /dev/null
+++ b/contrib/onelab2/OnelabAttributes.h
@@ -0,0 +1,233 @@
+#ifndef _ONELAB_ATTRIBUTES_H
+#define _ONELAB_ATTRIBUTES_H
+
+#define SESSION_SIZE 32
+
+#define ERROR_BUFFER_TOO_SMALL 50
+#define ERROR_INVALID_ATTRIBUTE_SIZE 51
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "NetworkUtils.h"
+
+class OnelabAttr
+{
+protected:
+	// Header :
+	//UInt16 _type;
+	//UInt16 _size;
+
+	bool _stored; // is the attribute in the database ?
+public:
+	OnelabAttr() {}
+	virtual ~OnelabAttr(){}
+
+	virtual UInt8 *encodeAttribute(UInt8 *dst) = 0;
+	virtual UInt8 *parseAttribute(UInt8 *src, UInt32 length) = 0;
+	virtual void showAttribute() const = 0;
+
+	virtual inline UInt16 getAttributeType() const = 0;
+	virtual inline UInt16 getAttributeLength() const = 0;
+
+	bool isInDatabase() const {return this->_stored;}
+	void isInDatabase(bool isInDb) {this->_stored = isInDb;}
+
+	// attributes type to connect peers
+	static const UInt16 Peer = 0x01;
+	static const UInt16 Server = 0x02;
+	static const UInt16 Session = 0x03;
+
+	// attributes type for onelab
+	static const UInt16 Start = 0x04;
+	static const UInt16 Parameter = 0x05;
+	static const UInt16 Number = 0x06;
+	static const UInt16 String = 0x07;
+	static const UInt16 Region = 0x08;
+	static const UInt16 Function = 0x09;
+
+	// other message for onelab
+	static const UInt16 Message = 0x0A;
+
+};
+
+class OnelabAttrStart : public OnelabAttr
+{
+private:
+	std::string _name;
+public:
+	OnelabAttrStart() {}
+	OnelabAttrStart(const std::string name) {_name = name;}
+	~OnelabAttrStart(){}
+	UInt8 *encodeAttribute(UInt8 *dst);
+	UInt8 *parseAttribute(UInt8 *src, UInt32 length);
+	void showAttribute() const;
+
+	static UInt16 attributeType() {return 0x04;}
+	inline UInt16 getAttributeType() const {return this->attributeType();}
+	inline UInt16 getAttributeLength() const {return _name.size();}
+
+	std::string name(){return _name;}
+};
+
+class OnelabAttrParameterQuery : public OnelabAttr
+{
+private:
+	UInt8 _ptype;
+	std::string _pname;
+public:
+	OnelabAttrParameterQuery() {}
+	OnelabAttrParameterQuery(const std::string name, UInt8 parameter) {_ptype = parameter; _pname = name;}
+	~OnelabAttrParameterQuery() {}
+	UInt8 *encodeAttribute(UInt8 *buff);
+	UInt8 *parseAttribute(UInt8 *buff, UInt32 length);
+	void showAttribute() const;
+
+	static UInt16 attributeType() {return 0x05;}
+	inline UInt16 getAttributeType() const {return this->attributeType();}
+	inline UInt16 getAttributeLength() const {return 1+_pname.size();}
+
+	inline UInt8 paramType() const {return this->_ptype;}
+	std::string getName() const {return this->_pname;}
+};
+
+class OnelabAttrMessage : public OnelabAttr
+{
+private:
+	UInt8 *_message = NULL;
+	UInt16 _messageLength;
+	UInt8 _level;
+	
+public:
+	OnelabAttrMessage() : _message(NULL), _messageLength(0), _level(0) {}
+	OnelabAttrMessage(const std::string &message, const int level=OnelabAttrMessage::Debug) : _message(NULL){setMessage(message, level);}
+	~OnelabAttrMessage(){if(_message != NULL) free(_message);};
+	UInt8 *encodeAttribute(UInt8 *dst);
+	UInt8 *parseAttribute(UInt8 *src, UInt32 length);
+	void showAttribute() const;
+
+	static UInt16 attributeType() {return 0x0A;}
+	inline UInt16 getAttributeType() const {return this->attributeType();}
+	inline UInt16 getAttributeLength() const {return 1+_messageLength;}
+
+	void setMessage(const std::string &message, const int level=OnelabAttrMessage::Debug) {
+		_level = level;
+		_messageLength = message.size()+1;
+		if(_message != NULL) free(_message);
+		_message = (UInt8 *)strndup(message.c_str(), _messageLength);
+	}
+	const char *getMessage() {return (char *)_message;}
+	int getLevel() {return _level;}
+
+	typedef enum {
+		Debug=99,
+		Info=5,
+		Warning=3,
+		Error=2,
+		Fatal=1
+	} OnelabMessageLvl;
+};
+
+class OnelabAttrAction : public OnelabAttr
+{
+private:
+  std::string _action;
+  std::string _client;
+
+public:
+  OnelabAttrAction() : _action(""), _client("") {}
+  OnelabAttrAction(std::string action, std::string client) : _action(action), _client(client) {}
+  ~OnelabAttrAction() {}
+
+  UInt8 *encodeAttribute(UInt8 *dst);
+  UInt8 *parseAttribute(UInt8 *src, UInt32 lenght);
+  void showAttribute() const;
+
+  static UInt16 attributeType() {return 0x10;}
+  inline UInt16 getAttributeType() const {return attributeType();}
+  inline UInt16 getAttributeLength() const {return _client.size()+1+_action.size();}
+
+  void setAction(std::string action) {_action = action;}
+  void setClient(std::string client) {_client = client;}
+  std::string getAction() {return _action;}
+  std::string getClient() {return _client;}
+};
+
+class OnelabAttrFileQuery : public OnelabAttr
+{
+private:
+  char *_name;
+  UInt16 _length;
+  std::string _client;
+
+public:
+  OnelabAttrFileQuery() : _name(NULL), _length(0){}
+  OnelabAttrFileQuery(const std::string filename) : _name(NULL), _length(0) {setFilename(filename);}
+  ~OnelabAttrFileQuery() {if(_name != NULL) free(_name);}
+  UInt8 *encodeAttribute(UInt8 *dst);
+  UInt8 *parseAttribute(UInt8 *src, UInt32 length);
+  void showAttribute() const;
+
+  static UInt16 attributeType() {return 0x0B;}
+  inline UInt16 getAttributeType() const {return attributeType();}
+  inline UInt16 getAttributeLength() const {return _length+_client.length()+1;}
+
+  void setFilename(std::string name);
+  void setClient(std::string client) {_client = client;}
+  const char *getFilename() {return _name;}
+};
+
+class OnelabAttrMergeFile : public OnelabAttr
+{
+private:
+  char *_name;
+  UInt16 _length;
+
+public:
+  OnelabAttrMergeFile() : _name(NULL), _length(0){}
+  OnelabAttrMergeFile(const std::string filename) : _name(NULL), _length(0) {setFilename(filename);}
+  ~OnelabAttrMergeFile() {if(_name != NULL) free(_name);}
+  UInt8 *encodeAttribute(UInt8 *dst);
+  UInt8 *parseAttribute(UInt8 *src, UInt32 length);
+  void showAttribute() const;
+
+  static UInt16 attributeType() {return 0x0D;}
+  inline UInt16 getAttributeType() const {return attributeType();}
+  inline UInt16 getAttributeLength() const {return _length;}
+
+  void setFilename(std::string name);
+  const char *getFilename() {return _name;}
+};
+
+class OnelabAttrFile : public OnelabAttr
+{
+private:
+  char *_name;
+  FILE *_fd;
+  UInt32 _filelength;
+
+public:
+  OnelabAttrFile() : _name(NULL), _filelength(0) {}
+  OnelabAttrFile(const std::string filename, FILE *fd) {setFile(filename, fd);}
+  ~OnelabAttrFile() {if(_name != NULL) free(_name);}
+  UInt8 *encodeAttribute(UInt8 *dst);
+  UInt8 *parseAttribute(UInt8 *src, UInt32 length);
+  void showAttribute() const;
+
+  static UInt16 attributeType() {return 0x0C;}
+  inline UInt16 getAttributeType() const {return attributeType();}
+  inline UInt16 getAttributeLength() const {return 4+strlen(_name);}
+
+  void setFile(std::string name, FILE *fd) 
+  {
+    if(_name != NULL) free(_name);
+    _name = strndup(name.c_str(), name.size()+1);
+    _fd = fd;
+    long pos = ftell(fd); fseek(fd, 0, SEEK_END);
+    _filelength = (UInt32)ftell(fd); fseek(fd, pos, SEEK_SET);
+  }
+  const char *getFilename() {return _name;}
+  unsigned int getFileSize() {return _filelength;}
+};
+
+#endif
diff --git a/contrib/onelab2/OnelabDatabase.cpp b/contrib/onelab2/OnelabDatabase.cpp
new file mode 100644
index 0000000..817a671
--- /dev/null
+++ b/contrib/onelab2/OnelabDatabase.cpp
@@ -0,0 +1,108 @@
+#include "OnelabDatabase.h"
+
+OnelabServer *OnelabServer::_server = NULL;
+
+#ifndef WIN32
+void *OnelabDatabase_listen(void *arg)
+#else
+DWORD WINAPI OnelabDatabase_listen(LPVOID arg)
+#endif
+{
+  std::string *client = (std::string *)arg;
+  OnelabProtocol msg(-1);
+  UInt8 buff[1024];
+  int recvlen = 0;
+  while(1) {
+    recvlen = OnelabDatabase::instance()->listen(msg);
+    if(recvlen <= 0)
+      break; // invalid len
+    switch(msg.msgType()) {
+      case OnelabProtocol::OnelabStop:
+        std::clog << "\033[0;35m" << "Client is going to stop" << "\033[0;0m" << std::endl;
+        return NULL;
+      case OnelabProtocol::OnelabMessage:
+        if(msg.attrs.size()==1 && msg.attrs[0]->getAttributeType() == OnelabAttrMessage::attributeType()) {
+          OnelabNetworkClient *gui = OnelabDatabase::instance()->getNetworkClient();
+          if(gui) gui->onMessage("Server", ((OnelabAttrMessage *)msg.attrs[0])->getMessage(), ((OnelabAttrMessage *)msg.attrs[0])->getLevel());
+        }
+        break;
+      case OnelabProtocol::OnelabResponse:
+      case OnelabProtocol::OnelabUpdate:
+        std::clog << "\033[0;35m" << "Update " << msg.attrs.size() << " parameter(s) on client:" << "\033[0;0m" << std::endl;
+        for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+          std::clog << "  - " << ((onelab::parameter *)*it)->getName() << std::endl; // FIXME
+          if((*it)->getAttributeType() == OnelabAttr::Number) {
+            onelab::number *attr = (onelab::number *)*it;
+            OnelabDatabase::instance()->set(*attr, false);
+          }
+          else if((*it)->getAttributeType() == OnelabAttr::String) {
+            onelab::string *attr = (onelab::string *)*it;
+            OnelabDatabase::instance()->set(*attr, false);
+          }
+          else if((*it)->getAttributeType() == OnelabAttr::Region) {
+            onelab::region *attr = (onelab::region *)*it;
+            OnelabDatabase::instance()->set(*attr, false);
+          }
+          else if((*it)->getAttributeType() == OnelabAttr::Function) {
+            onelab::function *attr = (onelab::function *)*it;
+            OnelabDatabase::instance()->set(*attr, false);
+          }
+          else if((*it)->getAttributeType() == OnelabAttrFileQuery::attributeType()) {
+            OnelabAttrFileQuery *attr = (OnelabAttrFileQuery *)*it;
+            const char *filename = attr->getFilename();
+            // FIXME path/filename ?
+            std::clog << "try to open " << filename << " for reading" << std::endl;
+            FILE *fp = fopen(filename, "rb");
+            if(fp != NULL){
+              OnelabProtocol rep(OnelabProtocol::OnelabUpdate);
+              rep.attrs.push_back(new OnelabAttrFile(std::string(filename), fp));
+              recvlen = rep.encodeMsg(buff, 1024);
+              OnelabDatabase::instance()->sendbytes(buff, recvlen);
+              while((recvlen = fread(buff, 1, 1024, fp)) > 0)
+                OnelabDatabase::instance()->sendbytes(buff, recvlen);
+            }
+          }
+          else if((*it)->getAttributeType() == OnelabAttrFile::attributeType()) {
+            OnelabAttrFile *attr = (OnelabAttrFile *)*it;
+            const char *filename = attr->getFilename();
+            std::clog << "try to open " << filename << " for writing" << std::endl;
+            FILE *fp = fopen(filename, "wb");
+            if(fp != NULL){
+              unsigned int filesize = ((OnelabAttrFile *)attr)->getFileSize();
+              unsigned int downloadsize = 0;
+              while(downloadsize < filesize) {
+                recvlen = OnelabDatabase::instance()->listen(buff, 1024);
+                downloadsize += recvlen;
+                fwrite(buff, 1, recvlen, fp);
+              }
+            }
+          }
+        }
+        break;
+      case OnelabProtocol::OnelabAction:
+      {
+        std::clog << "\033[0;35m" << "Client have to perform an action" << "\033[0;0m" << std::endl;
+        // nothing to do ?
+      }
+    }
+  }
+}
+#ifndef WIN32
+void *OnelabDatabase_server(void *arg)
+#else
+DWORD WINAPI OnelabDatabase_server(LPVOID arg)
+#endif
+{
+  OnelabServer::instance()->Run();
+}
+
+void OnelabDatabase::finalize()
+{
+  if(_client) {
+    _client->disconnect();
+    pthread_join(_listenThread, NULL);
+  }
+  else {
+    //TODO pthread_join(_serverThread, NULL);
+  }
+}
diff --git a/contrib/onelab2/OnelabDatabase.h b/contrib/onelab2/OnelabDatabase.h
new file mode 100644
index 0000000..9b5358a
--- /dev/null
+++ b/contrib/onelab2/OnelabDatabase.h
@@ -0,0 +1,252 @@
+#ifndef _ONELABDATABASE_H_
+#define _ONELABDATABASE_H_
+#endif
+#include <signal.h>
+#include <stdio.h>
+
+#include "GmshMessage.h"
+#include "Options.h"
+#include "Context.h"
+#include "onelabUtils.h"
+#include "OnelabServer.h"
+#include "VirtualClient.h"
+#include "GmshNetworkClient.h"
+#include "GmshLocalClient.h"
+
+#ifndef WIN32
+void *OnelabDatabase_listen(void *arg);
+void *OnelabDatabase_server(void *arg);
+#else
+DWORD WINAPI OnelabDatabase_listen(LPVOID arg);
+DWORD WINAPI OnelabDatabase_server(void *arg);
+#endif
+
+static void initializeLoops();
+static bool incrementLoops();
+// OnelabDatabase is a singleton that get/set/... parameters from server/clients
+class OnelabDatabase {
+private:
+  static OnelabDatabase *_instance;
+#ifndef WIN32
+  pthread_t _listenThread, _serverThread;
+#else
+  HANDLER _listenThread, _serverThread;
+#endif
+  GmshNetworkClient *_client;
+  GmshLocalClient *_localGUI, *_localGmsh;
+  void _clear() {
+#ifndef WIN32
+    // TODO send message to thread to exit the thread
+    // pthread_cancel
+    //pthread_kill(_serverThread, 9);
+    //if(_client) pthread_kill(_listenThread, 9);
+#else
+    // TODO
+#endif
+    if(_client) {
+      _client->disconnect();
+      delete _client;
+    }
+    if(_localGUI) delete _localGUI;
+    if(_localGmsh) delete _localGmsh;
+    _client = NULL; _localGUI = _localGmsh = NULL;
+  }
+
+public:
+  OnelabDatabase() {
+    _localGUI = NULL; _client = NULL; _localGmsh = NULL;
+  }
+  static OnelabDatabase *instance() {
+    if(!_instance) _instance = new OnelabDatabase;
+    return _instance;
+  }
+  GmshLocalClient *useAsClient(){
+    // the server is in the same memory space
+    _clear();
+
+    OnelabServer::instance(0x7F000001, 0);
+    //OnelabServer::instance(0, 0);
+    _localGUI = new GmshLocalClient("localGUI", OnelabServer::instance()->getParameterSpace());
+    _localGmsh = new GmshLocalClient("Gmsh", OnelabServer::instance()->getParameterSpace());
+    OnelabServer::instance()->addClient(_localGUI); // TODO remove from server in _clear()
+    OnelabServer::instance()->addClient(_localGmsh); // TODO remove from server in _clear()
+
+#ifndef WIN32
+    pthread_create(&_serverThread, NULL, OnelabDatabase_server, &(((OnelabLocalClient *)_localGmsh)->getName()));
+#else
+    _serverThread = CreateThread(NULL, 0, NULL, OnelabDatabase_server, 0, NULL);
+#endif
+    return _localGUI;
+  }
+  GmshNetworkClient *useAsNetworkClient(UInt32 address, UInt16 port, std::string cli="GUI"){
+    // use this as a network client (take server address/port)
+    if(!_client) {
+      _clear();
+
+      _client = new GmshNetworkClient(cli, address, port);
+      if(_client->connect()) {
+#ifndef WIN32
+        pthread_create(&_listenThread, NULL, OnelabDatabase_listen, &(((OnelabLocalClient *)_client)->getName()));
+#else
+        _listenThread = CreateThread(NULL, 0, NULL, OnelabDatabase_listen, 0, NULL);
+#endif
+        return _client;
+      }
+      else {
+        delete _client;
+        _client = NULL;
+        return NULL;
+      }
+    }
+    else {
+#ifndef WIN32
+      pthread_create(&_listenThread, NULL, OnelabDatabase_listen, &(((OnelabLocalClient *)_client)->getName()));
+#else
+      _listenThread = CreateThread(NULL, 0, NULL, OnelabDatabase_listen, 0, NULL);
+#endif
+      return _client;
+    }
+    return NULL;
+  }
+  GmshNetworkClient *getNetworkClient(){return _client;}
+  void finalize();
+  int listen(OnelabProtocol &msg) {
+    if(_client) return _client->recvfrom(msg);
+    return 0;
+  }
+  int listen(UInt8 *buff, unsigned int maxlen){
+    if(_client) return _client->recvfrom(buff, maxlen);
+    return 0;
+  }
+  void sendbytes(UInt8 *buff, unsigned int len){
+    if(_client) _client->sendto(buff, len);
+  }
+  GmshLocalClient *useAsServer(UInt32 address, UInt16 port){
+    // use this as a network server (take interface/port to listen to)
+    _clear();
+
+    OnelabServer::instance(address, port);
+    _localGUI = new GmshLocalClient("localGUI", OnelabServer::instance()->getParameterSpace());
+#ifndef WIN32
+    pthread_create(&_serverThread, NULL, OnelabDatabase_server, NULL);
+#else
+    _serverThread = CreateThread(NULL, 0, NULL, OnelabDatabase_server, 0, NULL);
+#endif
+    return _localGUI;
+  }
+  template <class T> bool set(const T &p, const std::string &client) {
+    if(_client) return _client->set(p, true);
+    return OnelabServer::instance()->set(p, client);
+  }
+  template <class T> bool set(const T &p, bool update=true) {
+    if(_client) return _client->set(p, update);
+    //if(_localGUI) return _localGUI->set(p);
+    return OnelabServer::instance()->set(p);
+  }
+  template <class T> bool get(std::vector<T> &ps, const std::string &name="", const std::string &client="") {
+    if(_client) return _client->get(ps, name);
+    //if(_localGUI) _localGUI->get(ps, name);
+    return OnelabServer::instance()->get(ps, name, client);
+  }
+  void clear(const std::string &name="", const std::string &client="") {
+     if(_client) return _client->clear(name, client);
+    return OnelabServer::instance()->clear(name, client);
+  }
+  bool fromFile(FILE *fp, const std::string &client="")
+  {
+    if(_client) return _client->fromFile(fp, client);
+    return OnelabServer::instance()->fromFile(fp, client);
+
+  }
+  bool run(const std::string action, const std::string client="") {
+    UInt8 buff[1024];
+    OnelabProtocol msg(OnelabProtocol::OnelabAction);
+    if(client.size()) {
+      std::cout << "try to " << action << ' ' << client <<  std::endl;
+      if(_client && ((OnelabLocalClient *)_client)->getName() == client) {
+        if(client == "Gmsh") onelabUtils::runGmshClient(action, true);
+      }
+      else if(_client) {
+        std::cout << "client is remote" << std::endl;
+        msg.attrs.push_back(new OnelabAttrAction(action, client));
+        int size = msg.encodeMsg(buff, 1024);
+        sendbytes(buff, size);
+        return true;
+      }
+      else {
+        std::cout << "client is local" << std::endl;
+        OnelabServer::instance()->performAction(action, client);
+        return true;
+      }
+    }
+    else { // run all client
+      if(action == "compute") initializeLoops();
+
+      do{ // enter loop
+        run(action, "Gmsh"); // run Gmsh client
+
+        if(CTX::instance()->solverToRun >= 0) { // launch the solver
+          std::string solver = opt_solver_name(CTX::instance()->solverToRun, GMSH_GET, "");
+          std::string exe = opt_solver_executable(CTX::instance()->solverToRun, GMSH_GET, "");
+          if(_client && exe.size()) {
+            onelab::string o(solver + "/CommandLine", exe);
+            o.setVisible(false);
+            o.setNeverChanged(true);
+            set(o, solver);
+          }
+          run(action, solver);
+        }
+        else { // send action to all connected client except Gmsh
+          if(_client) {
+            std::cout << "server is remote" << std::endl;
+            msg.attrs.push_back(new OnelabAttrAction(action, client));
+            int size = msg.encodeMsg(buff, 1024);
+            sendbytes(buff, size);
+          }
+          else {
+            std::cout << "server is local" << std::endl;
+            OnelabServer::instance()->performAction(action, client, true);
+          }
+          return true;
+        }
+      } while(action == "compute" && /*!FlGui::instance()->onelab->stop() &&*/
+          incrementLoops());
+    }
+    return false;
+  }
+  bool getChanged(const std::string &client="") const {
+    if(!_client)
+      return OnelabServer::instance()->getChanged(client);
+    else
+      return true; // TODO
+  }
+  void setChanged(bool changed, const std::string &client="") {
+    if(!_client)
+      OnelabServer::instance()->setChanged(changed, client);
+    else
+      return; // TODO
+  }
+};
+
+static void initializeLoops()
+{
+  onelabUtils::initializeLoop("1");
+  onelabUtils::initializeLoop("2");
+  onelabUtils::initializeLoop("3");
+}
+
+static bool incrementLoops()
+{
+  bool ret = false;
+  if(onelabUtils::incrementLoop("3"))      ret = true;
+  else if(onelabUtils::incrementLoop("2")) ret = true;
+  else if(onelabUtils::incrementLoop("1")) ret = true;
+
+  //Define ONELAB parameter indicating whether or not in a loop
+  onelab::number n("0Metamodel/Loop",ret?1:0);
+  n.setVisible(false);
+  OnelabDatabase::instance()->set(n);
+
+  return ret;
+}
+
diff --git a/contrib/onelab2/OnelabLocalClient.h b/contrib/onelab2/OnelabLocalClient.h
new file mode 100644
index 0000000..b227c5b
--- /dev/null
+++ b/contrib/onelab2/OnelabLocalClient.h
@@ -0,0 +1,30 @@
+#ifndef _ONELABLOCALCLIENT_H_
+#define _ONELABLOCALCLIENT_H_
+
+#include "VirtualClient.h"
+
+/**
+  @class OnelabLocalClient
+  @brief This class is used for client in the same memory space as the server.
+
+*/
+
+class OnelabLocalClient : public VirtualClient
+{
+public:
+	OnelabLocalClient(std::string name, onelab::parameterSpace *parameterSpace)
+		: VirtualClient(name, parameterSpace){
+	}
+	virtual ~OnelabLocalClient(){}
+	virtual void onNewParameter(onelab::parameter *p){}
+  virtual void onUpdateParameter(onelab::parameter *p){}
+  virtual void onRemoveParameter(onelab::parameter *p){}
+  virtual void onMessage(const std::string &name, const std::string &message, int level){}
+  virtual void refresh(){}
+  virtual void mergeFile(const std::string &filename){}
+
+  virtual void run(std::string action) {}
+  void stop() {}
+};
+
+#endif
diff --git a/contrib/onelab2/OnelabLocalNetworkClient.cpp b/contrib/onelab2/OnelabLocalNetworkClient.cpp
new file mode 100644
index 0000000..7e40893
--- /dev/null
+++ b/contrib/onelab2/OnelabLocalNetworkClient.cpp
@@ -0,0 +1,74 @@
+#include "OnelabLocalNetworkClient.h"
+#include "OnelabProtocol.h"
+
+//#ifdef HAVE_UDT
+OnelabLocalNetworkClient::OnelabLocalNetworkClient(std::string name, UDTSOCKET fd, unsigned int ip, unsigned short port, bool UDT)
+{
+	_name = name;
+  _fds = 0;
+	_fdu = fd;
+	_ip.address = ip;
+	_ip.port = port;
+}
+//#endif
+OnelabLocalNetworkClient::OnelabLocalNetworkClient(std::string name, Socket fd, unsigned int ip, unsigned short port)
+{
+	_name = name;
+  _fdu = 0;
+	_fds = fd;
+	_ip.address = ip;
+	_ip.port = port;
+}
+void OnelabLocalNetworkClient::sendto(UInt8 *buff, unsigned int len)
+{
+//#ifdef HAVE_UDT
+	if(_fds) ip4_socket_send(_fds, buff, len, _ip);
+  else udt_socket_send(_fdu, buff, len);
+//#else
+//	return ip4_socket_send(_fds, buff, maxlen);
+//#endif
+}
+int OnelabLocalNetworkClient::recvfrom(UInt8 *buff, unsigned int maxlen)
+{
+  IPv4 unused;
+//#ifdef HAVE_UDT
+	if(_fds) return ip4_socket_recv(_fds, buff, maxlen, unused);
+	return udt_socket_recv(_fdu, buff, maxlen);
+//#else
+//	return ip4_socket_recv(_fds, buff, maxlen);
+//#endif
+}
+int OnelabLocalNetworkClient::recvmsg(OnelabProtocol &msg)
+{
+  UInt8 header[8];
+  UInt8 *buff = NULL;
+  int recvlen = 0;
+  // recv the header
+  recvlen = recvfrom(header, 4);
+  if(recvlen != 4) return recvlen;
+  int msglen = msg.parseHeader(header, recvlen);
+  // then recv the message
+  if(msglen == 0) return 4;
+  buff = (UInt8 *) malloc(sizeof(UInt8)*msglen);
+  recvlen = recvfrom(buff, msglen); // recvlen should be equals to msglen
+  msg.parseMessage(buff, recvlen);
+  free(buff);
+  return recvlen + 4;
+}
+void OnelabLocalNetworkClient::updateParameter(onelab::parameter *p)
+{
+  if(p == NULL) return;
+  OnelabProtocol msg(OnelabProtocol::OnelabUpdate);
+  msg.attrs.push_back(p);
+  UInt8 buff[1024];
+  unsigned int recvlen = msg.encodeMsg(buff, 1024);
+  sendto(buff, recvlen);
+}
+void OnelabLocalNetworkClient::run(std::string action)
+{
+  OnelabProtocol msg(OnelabProtocol::OnelabAction);
+  msg.attrs.push_back(new OnelabAttrAction(action, _name));
+  UInt8 buff[1024];
+  unsigned int size = msg.encodeMsg(buff, 1024);
+  sendto(buff, size);
+}
diff --git a/contrib/onelab2/OnelabLocalNetworkClient.h b/contrib/onelab2/OnelabLocalNetworkClient.h
new file mode 100644
index 0000000..5349fbc
--- /dev/null
+++ b/contrib/onelab2/OnelabLocalNetworkClient.h
@@ -0,0 +1,41 @@
+#ifndef _ONELABLOCALNETWORKCLIENT_H_
+#define _ONELABLOCALNETWORKCLIENT_H_
+
+#include <string>
+#include "onelab.h"
+//#ifdef HAVE_UDT
+#include "UdtUtils.h"
+#include "OnelabProtocol.h"
+//#else
+//#include "NetworkUtils.h"
+//#endif
+
+class OnelabLocalNetworkClient
+{
+private:
+  Socket _fds;
+//#ifdef HAVE_UDT
+	UDTSOCKET _fdu;
+//#endif
+	IPv4 _ip;
+	std::string _name;
+  pthread_mutex_t _mutex_wait = PTHREAD_MUTEX_INITIALIZER;
+public:
+//#ifdef HAVE_UDT
+	OnelabLocalNetworkClient(std::string name, UDTSOCKET fd, unsigned int ip, unsigned short port, bool UDT);
+//#endif
+	OnelabLocalNetworkClient(std::string name, Socket fd, unsigned int ip, unsigned short port);
+	virtual ~OnelabLocalNetworkClient(){}
+	void sendto(UInt8 *buff, unsigned int len);
+	int recvfrom(UInt8 *buff, unsigned int maxlen);
+  int recvmsg(OnelabProtocol &msg);
+	UDTSOCKET getSSocket() {return _fds;}
+	UDTSOCKET getUSocket() {return _fdu;}
+	std::string getName() {return _name;}
+  void updateParameter(onelab::parameter *);
+	unsigned int getIp() {return _ip.address;}
+	unsigned short getPort() {return _ip.port;}
+
+  void run(std::string action);
+};
+#endif
diff --git a/contrib/onelab2/OnelabNetworkClient.cpp b/contrib/onelab2/OnelabNetworkClient.cpp
new file mode 100644
index 0000000..d3d0889
--- /dev/null
+++ b/contrib/onelab2/OnelabNetworkClient.cpp
@@ -0,0 +1,237 @@
+#include <iostream>
+
+#include "OnelabNetworkClient.h"
+
+#ifdef HAVE_UDT
+OnelabNetworkClient::OnelabNetworkClient(std::string name, bool UDT)
+  : VirtualClient(name)
+{
+  _fds = 0;
+  _fdu = 0;
+  _ip.address = 0;
+  _ip.port = 0;
+  _connected = false;
+
+  IPv4 local;
+  local.address = 0;// FIXME ip4_default_iface();
+  local.port = 0;
+  UDT::startup();
+  if(UDT) _fdu = udt_socket(local, SOCK_STREAM);
+  else _fds = ip4_socket(local, SOCK_STREAM);
+}
+OnelabNetworkClient::OnelabNetworkClient(std::string name, unsigned int ip, unsigned short port, bool UDT)
+  : VirtualClient(name)
+{
+  _fds = 0;
+  _fdu = 0;
+  _ip.address = ip;
+  _ip.port = port;
+  _connected = false;
+
+  IPv4 local;
+  local.address = 0;//ip4_default_iface();
+  local.port = 0;
+  UDT::startup();
+  if(UDT) _fdu = udt_socket(local, SOCK_STREAM);
+  else _fds = ip4_socket(local, SOCK_STREAM);
+}
+#else
+OnelabNetworkClient::OnelabNetworkClient(std::string name)
+  : VirtualClient(name)
+{
+  _ip.address = 0;
+  _ip.port = 0;
+  _connected = false;
+
+  IPv4 local;
+  local.address = 0;// FIXME ip4_default_iface();
+  local.port = 0;
+  _fds = ip4_socket(local, SOCK_STREAM);
+}
+OnelabNetworkClient::OnelabNetworkClient(std::string name, unsigned int ip, unsigned short port)
+  : VirtualClient(name)
+{
+  _ip.address = ip;
+  _ip.port = port;
+  _connected = false;
+
+  IPv4 local;
+  local.address = 0;//ip4_default_iface();
+  local.port = 0;
+  _fds = ip4_socket(local, SOCK_STREAM);
+}
+#endif
+void OnelabNetworkClient::sendto(UInt8 *buff, UInt16 len)
+{
+#ifndef HAVE_UDT
+  ip4_socket_send(_fds, buff, len, _ip);
+#else
+  if(_fds) ip4_socket_send(_fds, buff, len);
+  else udt_socket_send(_fdu, buff, len);
+#endif
+}
+int OnelabNetworkClient::recvfrom(UInt8 *buff, UInt16 maxlen)
+{
+  IPv4 unused;
+#ifndef HAVE_UDT
+  return ip4_socket_recv(_fds, buff, maxlen, unused); // FIXME check unused == _ip ?
+#else
+  if(_fds) return ip4_socket_recv(_fds, buff, maxlen); // FIXME check unused == _ip ?
+  return udt_socket_recv(_fdu, buff, maxlen);
+#endif
+}
+int OnelabNetworkClient::recvfrom(OnelabProtocol &msg)
+{
+  UInt8 header[8];
+  UInt8 *buff = NULL;
+  int recvlen = 0;
+  // recv the header
+  recvlen = recvfrom(header, 4);
+  if(recvlen != 4) return recvlen;
+  int msglen = msg.parseHeader(header, recvlen);
+  // then recv the message
+  if(msglen == 0) return 4;
+  buff = (UInt8 *) malloc(sizeof(UInt8)*msglen);
+  recvlen = recvfrom(buff, msglen); // recvlen should be equals to msglen
+  msg.parseMessage(buff, recvlen);
+  free(buff);
+  return recvlen + 4;
+}
+int OnelabNetworkClient::recvfrom()
+{
+  OnelabProtocol msg(-1);
+  int totalrecv = 0;
+  int recvlen = 0;
+  do {
+    ip4_socket_timeout(_fds, 0, 1000);
+    recvlen = recvfrom(msg);
+    ip4_socket_timeout(_fds, 0);
+    if(recv > 0) totalrecv+=recvlen;
+
+    if(recv <= 0) return totalrecv;
+
+    switch(msg.msgType()) {
+      case OnelabProtocol::OnelabResponse:
+      case OnelabProtocol::OnelabUpdate:
+        for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+         if((*it)->getAttributeType() == OnelabAttr::Number) {
+           onelab::number *attr = (onelab::number *)*it;
+           set(*attr, false);
+         }
+         else if((*it)->getAttributeType() == OnelabAttr::String) {
+           onelab::string *attr = (onelab::string *)*it;
+           set(*attr, false);
+         }
+         else if((*it)->getAttributeType() == OnelabAttr::Region) {
+           onelab::region *attr = (onelab::region *)*it;
+           set(*attr, false);
+         }
+         else if((*it)->getAttributeType() == OnelabAttr::Function) {
+           onelab::function *attr = (onelab::function *)*it;
+           set(*attr, false);
+         }
+      }
+    }
+  } while(recvlen > 0);
+  return totalrecv;
+}
+bool OnelabNetworkClient::connect()
+{
+  if(_connected) return true;
+
+  UInt16 bufflen = 1024;
+  int recvlen = 0;
+  UInt8 buff[1024];
+  OnelabProtocol msg(OnelabProtocol::OnelabStart);
+#ifdef HAVE_UDT
+  if(_fds) {
+    ip4_socket_connect(_fds, _ip);
+  }
+  else{
+    udt_socket_connect(_fdu, _ip);
+  }
+#else
+  ip4_socket_connect(_fds, _ip);
+#endif
+  msg.attrs.push_back(new OnelabAttrStart(_name));
+  recvlen = msg.encodeMsg(buff, bufflen);
+  sendto(buff, recvlen);
+#ifdef HAVE_UDT
+  if(_fdu)udt_socket_timeout(_fdu, 3);
+  else
+#endif
+  ip4_socket_timeout(_fds, 3);
+  recvlen = recvfrom(msg);
+
+#ifdef HAVE_UDT
+  if(_fdu)udt_socket_timeout(_fdu, -1);
+  else
+#endif
+  ip4_socket_timeout(_fds, 0);
+  if(recvlen > 0 && msg.msgType() == OnelabProtocol::OnelabStart) _connected = true;
+  return _connected;
+}
+
+void OnelabNetworkClient::disconnect(bool waitForServer)
+{
+  if(!_connected) return;
+  // Send a message to the server to say the client is going to stop (the server have to reply)
+  UInt8 buff[128];
+  fd_set readfds;
+  struct timeval timeout;
+  OnelabProtocol msg(OnelabProtocol::OnelabStop);
+  int recvlen = msg.encodeMsg(buff, 128);
+  this->sendto(buff, recvlen);
+  if(waitForServer) {
+    timeout.tv_sec = 1;
+    timeout.tv_usec = 0;
+    FD_ZERO(&readfds);
+    FD_SET(_fds, &readfds);
+    while(select(_fds+1, &readfds, NULL, NULL, &timeout) > 0) { // Wait for the server to answer
+      recvlen = recvfrom(msg);
+      if(msg.msgType() == OnelabProtocol::OnelabStop) {
+        _connected = false;
+        closeSocket();
+        break;
+      }
+    }
+  }
+  else {
+    _connected = false;
+  }
+}
+
+void OnelabNetworkClient::closeSocket()
+{
+#ifdef HAVE_UDT
+  if(_fds)
+    ip4_socket_close(_fds);
+  else
+    udt_socket_close(_fdu);
+#else
+  ip4_socket_close(_fds);
+#endif
+}
+
+void OnelabNetworkClient::request(OnelabProtocol &msg)
+{
+  UInt16 bufflen = 1024, recvlen = 0;
+  UInt8 buff[1024];
+  recvlen = msg.encodeMsg(buff, bufflen);
+  this->sendto(buff, recvlen);
+}
+
+void OnelabNetworkClient::requestParameters()
+{
+  OnelabProtocol msg(OnelabProtocol::OnelabRequest);
+  this->request(msg);
+}
+
+void OnelabNetworkClient::sendMessage(const int level, const std::string &message)
+{
+  OnelabProtocol msg(OnelabProtocol::OnelabMessage);
+  UInt8 buff[1024];
+  msg.attrs.push_back(new OnelabAttrMessage(message, level));
+  int recvlen = msg.encodeMsg(buff, 1024);
+  this->sendto(buff, recvlen);
+}
diff --git a/contrib/onelab2/OnelabNetworkClient.h b/contrib/onelab2/OnelabNetworkClient.h
new file mode 100644
index 0000000..cb7d0f8
--- /dev/null
+++ b/contrib/onelab2/OnelabNetworkClient.h
@@ -0,0 +1,183 @@
+#ifndef _ONELABCLIENT_H_
+#define _ONELABCLIENT_H_
+
+#include <vector>
+#include <unistd.h>
+
+#include "VirtualClient.h"
+#include "OnelabProtocol.h"
+#ifdef HAVE_UDT
+#include "UdtUtils.h"
+#else
+#include "NetworkUtils.h"
+#endif
+
+class OnelabNetworkClient : public VirtualClient
+{
+private:
+#ifdef HAVE_UDT
+	UDTSOCKET _fdu;
+#endif
+	Socket _fds;
+	bool _connected;
+	IPv4 _ip;
+
+	void request(OnelabProtocol &msg);
+	template <class T> bool requestParameter(std::vector<T> &ps, const std::string &name=""){
+		OnelabProtocol msg(OnelabProtocol::OnelabRequest);
+		msg.attrs.push_back(new OnelabAttrParameterQuery(name.c_str(), T::attributeType()));
+		this->request(msg);
+    return true;
+	}
+	void requestParameters(); // request all parameter for this client
+public:
+#ifdef HAVE_UDT
+	OnelabNetworkClient(std::string name, bool UDT=false);
+	OnelabNetworkClient(std::string name, unsigned int ip, unsigned short port, bool UDT=false);
+	virtual ~OnelabNetworkClient() {UDT::cleanup();}
+#else
+	OnelabNetworkClient(std::string name);
+	OnelabNetworkClient(std::string name, unsigned int ip, unsigned short port);
+	virtual ~OnelabNetworkClient() {}
+#endif
+	template <class T> bool existInDatabase(const T p) {
+		std::vector<T> ps;
+		_parameterSpace->get(ps, p.getName(), _name);
+		return ps.size() > 0;
+	}
+	template <class T> bool set(const T &p, bool update=true){
+		bool isInDatabase = existInDatabase(p);
+		if(_parameterSpace->set(p, _name)) {
+			T *pp;
+			_parameterSpace->getPtr(&pp, p.getName(), _name);
+			if(update) {
+				OnelabProtocol msg(OnelabProtocol::OnelabUpdate);
+				msg.attrs.push_back(pp);
+				request(msg);
+			}
+			if(!isInDatabase) onNewParameter(pp);
+      else onUpdateParameter(pp);
+			return true;
+		}
+		return false;
+	}
+	template <class T> bool get(std::vector<T> &ps, const std::string &name, bool needed=false){
+		if(_parameterSpace->get(ps, name, this->_name) && ps.size() == 0) {
+			if(requestParameter(ps, name)) {
+		    if(needed) {// wait for the answer
+          fd_set readfds;
+          struct timeval timeout;
+          timeout.tv_sec = 1;
+          timeout.tv_usec = 0;
+          FD_ZERO(&readfds);
+          FD_SET(_fds, &readfds);
+          int nfds = select(_fds+1, &readfds, NULL, NULL, &timeout); // Wait for the server to answer
+          if(nfds > 0) recvfrom();
+        }
+        return _parameterSpace->get(ps, name, _name) && ps.size() == 0;
+      }
+      else
+        return false;
+    }
+		return true;
+  }
+  void clear(const std::string &name="", const std::string &client="")
+  {
+    // TODO
+  }
+  FILE *openFile(const std::string name, const char *mode="rb")
+  {
+    FILE *fp = fopen(name.c_str(), mode);
+    if(fp == NULL){ // File is not local, download it
+      OnelabProtocol msg(OnelabProtocol::OnelabUpdate);
+      msg.attrs.push_back(new OnelabAttrFileQuery(name));
+      request(msg);
+    // TODO
+    }
+    return fp;
+  }
+  bool fromChar(const std::vector<std::string> &msg, const std::string &client="")
+  {
+    onelab::parameter *parameters[4];
+    unsigned int pi = 0;
+    for(unsigned int i = 0; i < msg.size(); i++){
+      std::string version, type, name;
+      onelab::parameter::getInfoFromChar(msg[i], version, type, name);
+      if(onelab::parameter::version() != version) return false;
+      if(type == "number"){
+        onelab::number p; p.fromChar(msg[i]); set(p, false);
+        _parameterSpace->getPtr((onelab::number **)&parameters[pi++], p.getName());
+      }
+      else if(type == "string"){
+        onelab::string p; p.fromChar(msg[i]); set(p, false);
+        _parameterSpace->getPtr((onelab::string **)&parameters[pi++], p.getName());
+      }
+      else if(type == "region"){
+        onelab::region p; p.fromChar(msg[i]); set(p, false);
+        _parameterSpace->getPtr((onelab::region **)&parameters[pi++], p.getName());
+      }
+      else if(type == "function"){
+        onelab::function p; p.fromChar(msg[i]); set(p, false);
+        _parameterSpace->getPtr((onelab::function **)&parameters[pi++], p.getName());
+      }
+      else
+        return false;
+      if(pi == 4 || i==msg.size()-1) {
+        OnelabProtocol msg(OnelabProtocol::OnelabUpdate);
+        for(unsigned int j = 0; j < pi; j++)
+          msg.attrs.push_back(parameters[j]);
+        request(msg);
+        pi=0;
+      }
+    }
+    return true;
+  }
+  bool fromFile(FILE *fp, const std::string &client="")
+  {
+    std::vector<std::string> msg;
+    if(onelab::parameter::fromFile(msg, fp)) return fromChar(msg, client);
+    return false;
+  }
+	virtual void onNewParameter(onelab::parameter *){}
+  virtual void onUpdateParameter(onelab::parameter *){}
+  virtual void onRemoveParameter(onelab::parameter *){}
+  void onMessage(const std::string &name, const std::string &message, int level) {}
+	// network specific method
+	bool connect();
+	bool isConnected(){return _connected;}
+	int recvfrom(); // empty the buffer (useful when the client do not listen on another thread)
+	int recvfrom(OnelabProtocol &msg);
+	int recvfrom(UInt8 *buff, UInt16 maxlen);
+	void sendto(UInt8 *buff, UInt16 len);
+	void disconnect(bool waitForServer=false);
+  void closeSocket();
+	void setRemoteIP(unsigned long ip){if(!_connected) _ip.address=ip;}
+	void setRemotePort(unsigned short port){if(!_connected) _ip.port=port;}
+
+  void run(std::string action) {}
+
+  void sendMessage(const int level, const std::string &message);
+  void sendInfo(const std::string &msg)
+  {
+    sendMessage(OnelabAttrMessage::Info, msg);
+  }
+  void sendWarning(const std::string &msg)
+  {
+    sendMessage(OnelabAttrMessage::Warning, msg);
+  }
+  void sendError(const std::string &msg)
+  {
+    sendMessage(OnelabAttrMessage::Error, msg);
+  }
+  void mergeFile(const std::string &filename)
+  {
+    OnelabProtocol msg(OnelabProtocol::OnelabUpdate);
+    UInt8 buff[1024];
+    msg.attrs.push_back(new OnelabAttrMergeFile(filename));
+    int recvlen = msg.encodeMsg(buff, 1024);
+    std::cout <<recvlen << std::endl;
+    sendto(buff, recvlen);
+  }
+};
+
+#endif
diff --git a/contrib/onelab2/OnelabProtocol.cpp b/contrib/onelab2/OnelabProtocol.cpp
new file mode 100644
index 0000000..93ee702
--- /dev/null
+++ b/contrib/onelab2/OnelabProtocol.cpp
@@ -0,0 +1,162 @@
+#include <iostream>
+
+#include "OnelabProtocol.h"
+#include "onelab.h"
+#include "NetworkUtils.h"
+
+OnelabProtocol::OnelabProtocol(UInt16 type)
+{
+	_type = type;
+	_size = 0;
+}
+void OnelabProtocol::clearAttrs()
+{
+	for (std::vector<OnelabAttr*>::iterator it = this->attrs.begin() ; it != this->attrs.end(); ++it) {
+		if((*it) != NULL && !(*it)->isInDatabase()) delete *it;
+	}
+	this->attrs.clear();
+}
+unsigned short OnelabProtocol::encodeMsg(UInt8 *buff, UInt32 len)
+{
+	if(len < 4) throw ERROR_BUFFER_TOO_SMALL;
+	UInt8 *ptr = encode(buff, (UInt8)ONELAB_VERSION);
+	ptr = encode(ptr, _type);
+  UInt8 *sizeptr = ptr;
+	_size = 0;
+	ptr = encode(sizeptr, _size);
+	for (std::vector<OnelabAttr*>::iterator it = this->attrs.begin() ; it != this->attrs.end(); ++it) {
+    UInt16 attrLen = (*it)->getAttributeLength();
+    if(4+_size+attrLen > len) {
+	    encode(sizeptr, _size);
+      return (unsigned short)(ptr-buff);
+    }
+		ptr = (*it)->encodeAttribute(ptr);
+    _size+=attrLen+4;
+  }
+
+	encode(sizeptr, _size);
+	return (unsigned short)(ptr-buff);
+}
+unsigned short OnelabProtocol::encodeMsgs(UInt8 *buff, UInt32 len)
+{
+	if(len < 4) throw ERROR_BUFFER_TOO_SMALL;
+  if(!attrs.size()) return 0;
+	UInt8 *ptr = encode(buff, (UInt8)ONELAB_VERSION);
+	ptr = encode(ptr, _type);
+  UInt8 *sizeptr = ptr;
+	_size = 0;
+	ptr = encode(sizeptr, _size);
+  while(attrs.size() > 0) {
+    OnelabAttr *attr = attrs.back();
+    UInt16 attrLen = attr->getAttributeLength();
+    if(4+_size+attrLen > len) {
+	    encode(sizeptr, _size);
+      return (unsigned short)(ptr-buff);
+    }
+		ptr = attr->encodeAttribute(ptr);
+		if(!attr->isInDatabase()) delete attr;
+    attrs.pop_back();
+    _size+=attrLen+4;
+  }
+
+	encode(sizeptr, _size);
+	return (unsigned short)(ptr-buff);
+}
+int OnelabProtocol::parseHeader(UInt8 *buff, UInt32 len)
+{
+  this->clearAttrs();
+  if(len < 4) throw ERROR_BUFFER_TOO_SMALL;
+
+  UInt8 *ptr = buff;
+  UInt8 version = 0;
+  ptr = parse(ptr, version);
+  if(version != ONELAB_VERSION) throw ERROR_ONELAB_VERSION;
+  ptr = parse(ptr, _type);
+  ptr = parse(ptr, _size);
+
+  //std::cout << "current version is " << (int)ONELAB_VERSION << ", message version is " << (int)version << "(length is " << len << ", size is "<< _size <<" )" << std::endl;
+
+  return _size;
+}
+UInt32 OnelabProtocol::parseMessage(UInt8 *buff, UInt32 len)
+{
+  UInt8 *ptr = buff;
+  UInt8 *payload = ptr;
+  unsigned short parsed = 4; // header size
+  unsigned short size = _size;
+	while(size >= 4) {
+		UInt16 attrType = 0;
+		UInt16 attrSize = 0;
+		ptr = parse(ptr, attrType);
+		ptr = parse(ptr, attrSize);
+		size -= 4;
+		//std::cout << "Try to parse an attribute of type 0x" << std::hex << (UInt16)attrType << std::dec << " and size : " << attrSize << std::endl;
+		if(attrSize > size) throw ERROR_BUFFER_TOO_SMALL;
+		switch(attrType) {
+			case OnelabAttr::Message:
+				this->attrs.push_back(new OnelabAttrMessage());
+				((OnelabAttrMessage *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+			case OnelabAttr::Number:
+				this->attrs.push_back(new onelab::number());
+				((onelab::number *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+			case OnelabAttr::String:
+				this->attrs.push_back(new onelab::string());
+				((onelab::string *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+      case OnelabAttr::Region:
+        this->attrs.push_back(new onelab::region());
+        ((onelab::region *)this->attrs.back())->parseAttribute(ptr, attrSize);
+        break;
+      case OnelabAttr::Function:
+        this->attrs.push_back(new onelab::region());
+        ((onelab::function *)this->attrs.back())->parseAttribute(ptr, attrSize);
+        break;
+			case OnelabAttr::Start:
+				this->attrs.push_back(new OnelabAttrStart());
+				((onelab::string *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+			case OnelabAttr::Parameter:
+				this->attrs.push_back(new OnelabAttrParameterQuery());
+				((OnelabAttrParameterQuery *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+      case 0x10:
+        this->attrs.push_back(new OnelabAttrAction());
+				((OnelabAttrAction *)this->attrs.back())->parseAttribute(ptr, attrSize);
+				break;
+      case 0x0b:
+				this->attrs.push_back(new OnelabAttrFileQuery());
+				((OnelabAttrFileQuery *)this->attrs.back())->parseAttribute(ptr, attrSize);
+        break;
+      case 0x0c:
+				this->attrs.push_back(new OnelabAttrFile());
+				((OnelabAttrFile *)this->attrs.back())->parseAttribute(ptr, attrSize);
+        break;
+      case 0x0d:
+				this->attrs.push_back(new OnelabAttrMergeFile());
+				((OnelabAttrMergeFile *)this->attrs.back())->parseAttribute(ptr, attrSize);
+        break;
+			default:
+        // FIXME unknown attribute
+				//if(attrSize != 0) throw "Size of attr must be 0!";
+				/*this->attrs.push_back(new OnelabAttr(attrType));
+				this->attrs.back()->parseAttribute(ptr, &attrSize);*/
+				break;
+		}
+		ptr += attrSize;
+		size -= attrSize;
+    parsed += (attrSize+4);
+	}
+  //if(parsed != len) {std::cout << "parse - size left:"  << len-parsed << '-' << size << "(len is "<< len <<" and parsed is "<< parsed <<" )" << std::endl;}
+ 
+  return len-parsed;
+}
+void OnelabProtocol::showMsg()
+{
+	std::cout << "\033[1m" << "\033[4m" << "Message type: 0x" << std::hex << (int)_type << "\033[0m" << std::endl
+		<< "And have " << std::dec << this->attrs.size() << " attribute(s)" << std::endl;
+	for (std::vector<OnelabAttr*>::iterator it = this->attrs.begin() ; it != this->attrs.end(); ++it)
+		(*it)->showAttribute();
+	std::cout << std::endl;
+}
diff --git a/contrib/onelab2/OnelabProtocol.h b/contrib/onelab2/OnelabProtocol.h
new file mode 100644
index 0000000..afd4494
--- /dev/null
+++ b/contrib/onelab2/OnelabProtocol.h
@@ -0,0 +1,44 @@
+#ifndef _ONELAB_PROTOCOL_H
+#define _ONELAB_PROTOCOL_H
+
+#define ERROR_ONELAB_VERSION 20
+#define ONELAB_VERSION 0x02
+
+#include <vector>
+
+#include "OnelabAttributes.h"
+
+class OnelabProtocol
+{
+private:
+	//UInt8 _version;
+	UInt8 _type;
+	UInt16 _size;
+public:
+	std::vector<OnelabAttr*> attrs;
+	OnelabProtocol(UInt16 type);
+	~OnelabProtocol() {clearAttrs();}
+	void clearAttrs();
+	unsigned short encodeMsg(UInt8 *buff, UInt32 len);
+	unsigned short encodeMsgs(UInt8 *buff, UInt32 len);
+	UInt32 parseMsg(UInt8 *buff, UInt32 len);
+  int parseHeader(UInt8 *buff, UInt32 len);
+  UInt32 parseMessage(UInt8 *buff, UInt32 len);
+	void showMsg();
+
+	short msgType() {return _type;}
+	void msgType(short type) {this->clearAttrs(); _type = type;}
+
+	static const UInt8 BindRequestMsg	= 0x01;
+	static const UInt8 BindResponseMsg	= 0x02;
+	static const UInt8 BindMessageMsg	= 0x03;
+
+	static const UInt8 OnelabStart		= 0x10; // Client send his name to the server (first message)
+	static const UInt8 OnelabStop 		= 0x11; // Client say to the server he is going to stop / the server ask a client to stop
+	static const UInt8 OnelabMessage	= 0x12;
+	static const UInt8 OnelabRequest	= 0x13;
+	static const UInt8 OnelabResponse	= 0x14;
+	static const UInt8 OnelabUpdate		= 0x15;
+	static const UInt8 OnelabAction		= 0x16;
+};
+#endif
diff --git a/contrib/onelab2/OnelabServer.cpp b/contrib/onelab2/OnelabServer.cpp
new file mode 100644
index 0000000..21a9dd5
--- /dev/null
+++ b/contrib/onelab2/OnelabServer.cpp
@@ -0,0 +1,741 @@
+#include <cstdio>
+
+#ifndef WIN32
+#include <pthread.h>
+#include <signal.h>
+#else
+#include <wspiapi.h>
+#endif
+
+#include "NetworkUtils.h"
+#include "OnelabServer.h"
+#include "OnelabProtocol.h"
+#include "OnelabAttributes.h"
+#include "onelab.h"
+#include "onelabUtils.h"
+
+// FIXME no Gmsh specific header (used in launchClient)
+#include "StringUtils.h"
+#include "GmshMessage.h"
+#include "OS.h"
+#include "GModel.h"
+#include "Options.h"
+
+#ifndef WIN32
+void *OnelabServer_run(void *param);
+#else
+DWORD WINAPI OnelabServer_run(LPVOID param);
+#endif
+
+OnelabServer::OnelabServer(UInt32 iface, UInt16 port)
+{
+  _running = false;
+  _ip.address = iface;
+  _ip.port = port;
+#ifdef HAVE_UDT
+  UDT::startup();
+  _fdu = udt_socket(_ip, SOCK_STREAM);
+#endif
+  _fds = ip4_socket(_ip, SOCK_STREAM);
+  ip4_socket_ip(_fds, _ip);
+}
+
+OnelabServer::OnelabServer(UInt16 port)
+{
+  _running = false;
+  _ip.address = 0;
+  _ip.port = port;
+
+#ifdef HAVE_UDT
+  UDT::startup();
+  _fdu = udt_socket(_ip, SOCK_STREAM);
+#endif
+  _fds = ip4_socket(_ip, SOCK_STREAM);
+  ip4_socket_ip(_fds, _ip);
+}
+
+#ifdef HAVE_UDT
+void OnelabServer::addClient(std::string name, UDTSOCKET fd, UInt32 ip, UInt16 port)
+{
+  this->_clients.push_back(OnelabLocalNetworkClient(name, fd, ip, port));
+}
+
+OnelabLocalNetworkClient *OnelabServer::getClient(UDTSOCKET fd) // UDTSOCKET Socket
+{
+  for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+    if(it->getUSocket() == fd) return &(*it);
+    if(it->getSSocket() == fd) return &(*it);
+  }
+  return NULL;
+}
+#endif
+
+int OnelabServer::launchClient(const std::string &client, bool blocking) // FIXME OnelabDatabase instead of OnelabServer ?
+{
+  // launch a new client with a system call
+  std::string command = "";
+  if(getClient(client) != NULL || getLocalClient(client) != NULL) return -1; // client already exist
+
+  std::vector<onelab::string> s;
+  get(s, client + "/CommandLine");
+  if(s.size()) {
+    command.assign(s[0].getValue());
+  }
+  else if(client == "Gmsh") {
+    command.assign(Msg::GetExecutableName());
+  }
+  else {
+    int num = 0;
+    while(num < 10/*NUM_SOLVERS*/){
+      if(opt_solver_name(num, GMSH_GET, "") == client) break;
+      num++;
+    }
+    if(num >= 10/*NUM_SOLVERS*/) {
+      std::cout << "Unable to find " << client << std::endl;
+      return -1;
+    }
+
+    //std::string name = opt_solver_name(num, GMSH_GET, "");
+    std::string exe = opt_solver_executable(num, GMSH_GET, "");
+    command.assign(exe);
+  }
+
+  if(command.size()){
+    std::vector<std::string> args = onelabUtils::getCommandLine(client);
+    for(unsigned int i = 0; i < args.size(); i++)
+      command.append(" " + args[i]);
+  }
+  command.append(" -onelab"
+                 " \"" + client + "\" %s");
+
+  char cmd[1024];
+  // UNIX socket
+  //TODO sprintf(cmd, command, _sockname.c_str());
+
+  // TCP socket
+  sprintf(cmd, command.c_str(), " %s:%d");
+  command.assign(cmd);
+  sprintf(cmd, command.c_str(), (_ip.address==0)?"127.0.0.1":ip4_inet_ntop(_ip.address).c_str(), _ip.port);
+
+  std::cout << "launch " << client << " with command: " << cmd << std::endl;
+  SystemCall(cmd, blocking);
+
+  return 0;
+}
+
+//void OnelabServer::addClient(std::string name, Socket fd, UInt32 ip, UInt16 port)
+//{
+//  if(ip == 0 || port == 0) throw "Unable to add client (invalid ip or port)";
+//  this->_clients.push_back(OnelabLocalNetworkClient(name, fd, ip, port));
+//}
+//OnelabLocalNetworkClient *OnelabServer::getClient(Socket fd)
+//{
+//	for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+//		if(it->getSSocket() == fd) return &(*it);
+//	}
+//  return NULL;
+//}
+void OnelabServer::sendto(std::string client, UInt8 *buff, UInt32 len)
+{
+  for(std::vector<OnelabLocalNetworkClient>::iterator it = this->_clients.begin() ; it != this->_clients.end(); ++it) {
+    if((*it).getName() != client) continue;
+    (*it).sendto(buff, len);
+    return;
+  }
+}
+
+OnelabLocalNetworkClient *OnelabServer::getClient(const UInt32 ip, const UInt16 port)
+{
+  for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+    if((*it).getIp() == ip && (*it).getPort() == port)
+      return &(*it);
+  }
+  return NULL;
+}
+
+OnelabLocalNetworkClient *OnelabServer::getClient(const std::string &name)
+{
+  for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+    if((*it).getName() == name)
+      return &(*it);
+  }
+  return NULL;
+}
+OnelabLocalClient *OnelabServer::getLocalClient(const std::string &name)
+{
+  for(std::vector<OnelabLocalClient *>::iterator it = _localClients.begin(); it != _localClients.end(); ++it) {
+    if((*it)->getName() == name)
+      return (*it);
+  }
+  return NULL;
+
+}
+
+void OnelabServer::removeClient(OnelabLocalNetworkClient *client)
+{
+  for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+    if(&(*it) == client) {
+      _clients.erase(it);
+      return;
+    }
+  }
+}
+
+bool OnelabServer::performNextAction()
+{
+  pthread_mutex_lock(&_mutex_todo);
+  if(_todoClient.empty() || _todoAction.empty()) return false;
+
+  std::string client = _todoClient.front(),
+    action = _todoAction.front();
+  pthread_mutex_unlock(&_mutex_todo);
+  performAction(action, client, true);
+  pthread_mutex_lock(&_mutex_todo);
+  _todoAction.pop();
+  _todoClient.pop();
+  pthread_mutex_unlock(&_mutex_todo);
+
+  return true;
+}
+void OnelabServer::performAction(const std::string action, const std::string client, bool blocking)
+{
+  if(blocking) {
+    if(client.size()) {
+      onelabUtils::guessModelName(client);
+      OnelabLocalNetworkClient *cli = getClient(client);
+      OnelabLocalClient *localcli = getLocalClient(client);
+      if(action.size() > 0) {
+        std::cout << "set " << client << "/Action to" << action << std::endl;
+        onelab::string o(client + "/Action", action);
+        o.setVisible(false);
+        o.setNeverChanged(true);
+        set(o, client);
+      }
+      if(cli != NULL){ // Gmsh is used as a server and the client is remote
+        std::cout << action << " on " << client << "(client is remote)" << std::endl;
+        cli->run(action); // block ,use another thread ?
+      }
+      else if(localcli != NULL){ // client is local (in the same memory space than this server)
+        std::cout << action << " on " << client << "(client is local)" << std::endl;
+        localcli->run(action); // block, use another thread ?
+      }
+      else { // client does not exist (Gmsh is used as a server), launch the client
+        std::cout << action << " on " << client << "(launch a new remote client)" << std::endl;
+        launchClient(client, blocking);
+      }
+    }
+    else {
+      // run all non Gmsh clients TODO; exclude GUI ?
+      for(std::vector<OnelabLocalNetworkClient>::iterator it = _clients.begin(); it != _clients.end(); ++it) {
+        if((*it).getName() == "Gmsh") continue;
+        std::cout << action << " on " << (*it).getName() << "(remote)" << std::endl;
+        onelab::string o((*it).getName() + "/Action", action);
+        o.setVisible(false);
+        o.setNeverChanged(true);
+        set(o, (*it).getName());
+        (*it).run(action);
+      }
+
+    for(std::vector<OnelabLocalClient *>::iterator it = _localClients.begin(); it != _localClients.end(); ++it) {
+      if((*it)->getName() == "Gmsh") continue;
+      onelab::string o((*it)->getName() + "/Action", action);
+      o.setVisible(false);
+      o.setNeverChanged(true);
+      set(o);
+      std::cout << action << " on " << (*it)->getName() << "(local)" << std::endl;
+      (*it)->run(action);
+      }
+    }
+  }
+  else {
+    if(_running) {
+      pthread_mutex_lock(&_mutex_todo);
+      _todoClient.push(client);
+      _todoAction.push(action);
+      pthread_mutex_unlock(&_mutex_todo);
+    }
+    else {
+      _mutex_todo = PTHREAD_MUTEX_INITIALIZER;
+      _todoClient.push(client);
+      _todoAction.push(action);
+      pthread_create(&_runningThread, NULL, OnelabServer_run, NULL);
+    }
+  }
+}
+
+#ifndef WIN32
+void *OnelabServer_run(void *param)
+#else
+DWORD WINAPI OnelabServer_run(LPVOID param)
+#endif
+{
+  OnelabServer::instance()->running(true);
+
+  while(OnelabServer::instance()->performNextAction());
+
+  OnelabServer::instance()->running(false);
+}
+
+#ifdef HAVE_UDT
+#ifndef WIN32
+void *listenOnClients(void *param)
+#else
+  DWORD WINAPI listenOnClients(LPVOID param)
+#endif
+{
+  IPv4 ip;
+  std::set<UDTSOCKET> fdus;
+  std::set<Socket> fdss;
+  int recvlen = 0;
+  UInt8 buff[1024];
+  OnelabProtocol msg(-1), rep(-1);
+  int eid = OnelabServer::instance()->getEID();
+  while(UDT::ERROR != UDT::epoll_wait(eid, &fdus, NULL, -1, &fdss, NULL)) {
+    /*for(std::set<UDTSOCKET>::iterator it = fdus.begin(); it != fdus.end(); ++it) {
+      OnelabLocalNetworkClient *cli = OnelabServer::instance()->getClient(*it);
+      if(cli == NULL) { // Client is not in the list (it must be a Start message)
+        IPv4 ip;
+        recvlen = udt_socket_recv(*it, buff, 4);
+        if(recvlen != 4) {
+          // invalid message header
+          UDT::epoll_remove_usock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+        int msglen = msg.parseHeader(buff, recvlen);
+        if(msglen > 1024) {
+          // buffer size is too small
+          UDT::epoll_remove_ssock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+        recvlen = udt_socket_recv(*it, buff, msglen);
+        msg.parseMessage(buff, recvlen);
+        if(msg.msgType() == OnelabProtocol::OnelabStart && msg.attrs.size() > 0 && msg.attrs[0]->getAttributeType() == OnelabAttr::Start) {
+          std::string name = std::string(((OnelabAttrStart *)msg.attrs[0])->name());
+          if(OnelabServer::instance()->getClient(name) != NULL) {
+            std::cout << "A client exist with this name !" << std::endl;
+            rep.msgType(OnelabProtocol::OnelabMessage);
+            rep.attrs.push_back(new OnelabAttrMessage("A client exist with this name !", OnelabAttrMessage::Fatal));
+            recvlen = rep.encodeMsg(buff, 1024);
+            //TODO ip4_socket_send(*it, buff, recvlen);
+            UDT::epoll_remove_usock(eid, *it);
+            UDT::close(*it);
+            continue;
+          }
+          // Add a new remote client
+          OnelabServer::instance()->addClient(name, *it, ip.address, ip.port);
+          std::clog << "\033[0;31m" << "Add a new (UDT) client: " << name <<  "\033[0m" << std::endl;
+          OnelabProtocol rep(OnelabProtocol::OnelabStart);
+          recvlen = rep.encodeMsg(buff, 1024);
+          cli = OnelabServer::instance()->getClient(*it);
+          cli->sendto(buff, recvlen);
+          OnelabServer::instance()->sendAllParameter(cli);
+          continue;
+        }
+        else {
+          // cli shoud send a name first
+          UDT::epoll_remove_usock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+      }
+      else {
+        try {
+          recvlen = cli->recvmsg(msg);
+        }
+        catch(int &e) {
+          if(UDT::getlasterror().getErrorCode() == 2001 || e == 50) { // ECONNLOST
+            std::cout << "\033[0;31m" << "Connection with (UDT) client \"" << cli->getName() << "\" was broken, removing the client." << "\033[0m" << std::endl; // DEBUG
+            UDT::epoll_remove_usock(eid, *it);
+            OnelabServer::instance()->removeClient(cli);
+            UDT::close(*it);
+            }
+        }
+        switch (msg.msgType()) {
+        case OnelabProtocol::OnelabStop:
+          std::cout << "\033[0;31m" << "Client \"" << cli->getName() << "\" is going to stop" << "\033[0m" << std::endl; // DEBUG
+          rep.msgType(OnelabProtocol::OnelabStop);
+          recvlen = rep.encodeMsg(buff, 1024);
+          if(ip4_socket_connected(cli->getUSocket())) // FIXME cli can close socket before send
+            cli->sendto(buff, recvlen);
+          UDT::epoll_remove_usock(eid, *it);
+          OnelabServer::instance()->removeClient(cli);
+          UDT::close(*it);
+          break;
+        case OnelabProtocol::OnelabMessage:
+          if(msg.attrs.size()==1 && msg.attrs[0]->getAttributeType() == OnelabAttrMessage::attributeType()) {
+            OnelabLocalClient *localgui = OnelabServer::instance()->getLocalClient("localGUI");
+            OnelabLocalNetworkClient *gui = OnelabServer::instance()->getClient("GUI");
+            if(gui) {
+              recvlen = msg.encodeMsg(buff, 1024);
+              gui->sendto(buff, recvlen);
+            }
+            if(localgui) localgui->onMessage(cli->getName(), ((OnelabAttrMessage *)msg.attrs[0])->getMessage(), ((OnelabAttrMessage *)msg.attrs[0])->getLevel());
+          }
+          break;
+        case OnelabProtocol::OnelabRequest:
+          rep.msgType(OnelabProtocol::OnelabResponse);
+          if(msg.attrs.size() == 0) OnelabServer::instance()->sendAllParameter(cli);
+          else for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+              if((*it)->getAttributeType() == OnelabAttr::Parameter) {
+                OnelabAttrParameterQuery *attr = (OnelabAttrParameterQuery *)*it;
+                std::cout << "\033[0;31m" << "Client \"" << cli->getName() << " ask for parameter \"" << attr->getName() << " (type=" << (int)attr->paramType() << ")\"\033[0m" << std::endl; // DEBUG
+                onelab::parameter *p;
+                switch(attr->paramType()) {
+                case OnelabAttr::Number:
+                  OnelabServer::instance()->getPtr((onelab::number **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::String:
+                  OnelabServer::instance()->getPtr((onelab::string **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Region:
+                  OnelabServer::instance()->getPtr((onelab::region **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Function:
+                  OnelabServer::instance()->getPtr((onelab::function **)&p, attr->getName(), cli->getName());
+                  break;
+                }
+                if(p != NULL) rep.attrs.push_back(p);
+                else rep.attrs.push_back(new OnelabAttrMessage("Unable to find the request parameter.", OnelabAttrMessage::Error));
+              }
+              // else ??
+            }
+          recvlen = rep.encodeMsg(buff, 1024);
+          cli->sendto(buff, recvlen);
+          break;
+        case OnelabProtocol::OnelabUpdate:
+          for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+            if((*it)->getAttributeType() >= OnelabAttr::Number && (*it)->getAttributeType() <= OnelabAttr::Function) {
+              onelab::parameter *attr = (onelab::parameter *)*it;
+              std::cout << "\033[0;31m" << "Client \"" << cli->getName() << " update parameter \"" << attr->getName() << "\"\033[0m" << std::endl; // DEBUG
+              onelab::parameter *parameter = NULL;
+              switch(attr->getAttributeType()) {
+                case OnelabAttr::Number:
+                  OnelabServer::instance()->set(*(onelab::number *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::number **)&parameter, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::String:
+                  OnelabServer::instance()->set(*(onelab::string *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::string **)&parameter, attr->getName(), cli->getName());
+                  if(((onelab::string *)parameter)->getName() == "Gmsh/Action") {
+                    OnelabLocalClient *localgui = OnelabServer::instance()->getLocalClient("localGUI");
+                    if(((onelab::string *)parameter)->getValue() == "refresh") localgui->refresh();
+                  }
+                  break;
+                case OnelabAttr::Region:
+                  OnelabServer::instance()->set(*(onelab::region *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::region **)&parameter, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Function:
+                  OnelabServer::instance()->set(*(onelab::function *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::function **)&parameter, attr->getName(), cli->getName());
+                  break;
+              }
+            }
+            else
+              switch((*it)->getAttributeType()) {
+                case 0x0B:
+                {
+                  // TODO
+                  break;
+                }
+                case 0x0C:
+                {
+                  // TODO
+                  break;
+                }
+                case 0x0D:
+                {
+                  // merge file only if the GUI and the server are local
+                  OnelabLocalClient *gui = OnelabServer::instance()->getLocalClient("localGUI");
+                  if(gui) gui->mergeFile(((OnelabAttrMergeFile *)*it)->getFilename());
+                }
+              }
+            }
+            break;
+          case OnelabProtocol::OnelabAction:
+          {
+            if(msg.attrs.size()==1 && msg.attrs[0]->getAttributeType() == OnelabAttrAction::attributeType()) {
+              std::clog << "\033[0;31m" << "Client " << cli->getName() << " ask " << ((OnelabAttrAction *)msg.attrs[0])->getClient() << " to " << ((OnelabAttrAction *)msg.attrs[0])->getAction() <<  "\033[0m" << std::endl;
+              OnelabServer::instance()->performAction(((OnelabAttrAction *)msg.attrs[0])->getAction(), ((OnelabAttrAction *)msg.attrs[0])->getClient());
+            }
+          }
+          break;
+        }
+      }
+    }*/
+
+    for(std::set<Socket>::iterator it = fdss.begin(); it != fdss.end(); ++it) {
+
+      OnelabLocalNetworkClient *cli = OnelabServer::instance()->getClient(*it);
+      if(cli == NULL) { // Client is not in the list (we should get a Start message)
+        IPv4 ip;
+        // recv the header
+        recvlen = ip4_socket_recv(*it, buff, 4, ip);
+        if(recvlen != 4) {
+          // invalid message header
+          UDT::epoll_remove_ssock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+        int msglen = msg.parseHeader(buff, recvlen);
+        if(msglen > 1024) {
+          // FIXME? buffer is too small
+          UDT::epoll_remove_ssock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+        // then recv the message
+        recvlen = ip4_socket_recv(*it, buff, msglen, ip);
+        msg.parseMessage(buff, recvlen);
+        if(msg.msgType() == OnelabProtocol::OnelabStart && msg.attrs.size() > 0 && msg.attrs[0]->getAttributeType() == OnelabAttr::Start) {
+          std::string name = std::string(((OnelabAttrStart *)msg.attrs[0])->name());
+          if(OnelabServer::instance()->getClient(name) != NULL) {
+            std::cout << "A client exist with this name !" << std::endl;
+            rep.msgType(OnelabProtocol::OnelabMessage);
+            rep.attrs.push_back(new OnelabAttrMessage("A client exist with this name !", OnelabAttrMessage::Fatal));
+            recvlen = rep.encodeMsg(buff, 1024);
+            ip4_socket_send(*it, buff, recvlen);
+            UDT::epoll_remove_ssock(eid, *it);
+            UDT::close(*it);
+            continue;
+          }
+          // Add a new remote client
+          OnelabServer::instance()->addClient(name, *it, ip.address, ip.port);
+          std::clog << "\033[0;31m" << "Add a new client: " << name <<  "\033[0m" << std::endl;
+          OnelabProtocol rep(OnelabProtocol::OnelabStart);
+          recvlen = rep.encodeMsg(buff, 1024);
+          cli = OnelabServer::instance()->getClient(*it);
+          cli->sendto(buff, recvlen);
+          OnelabServer::instance()->sendAllParameter(cli);
+          continue;
+        }
+        else {
+          // cli shoud send a name first
+          UDT::epoll_remove_ssock(eid, *it);
+          UDT::close(*it);
+          continue;
+        }
+      }
+      else {
+        try {
+          recvlen = cli->recvmsg(msg);
+        }
+        catch(int &e) {
+          if(e == 50) { // Recv error (TCP)
+            std::cout << "\033[0;31m" << "Connection with client \"" << cli->getName() << "\" was broken, removing the client." << "\033[0m" << std::endl; // DEBUG
+            UDT::epoll_remove_ssock(eid, *it);
+            OnelabServer::instance()->removeClient(cli);
+            UDT::close(*it);
+          }
+          std::cerr << "Error while recv message." << std::endl;
+          continue;
+        }
+        if(recvlen == 0) { // for TCP
+          std::cout << "\033[0;31m" << "Connection with client \"" << cli->getName() << "\" was broken, removing the client." << "\033[0m" << std::endl; // DEBUG
+          UDT::epoll_remove_ssock(eid, *it);
+          OnelabServer::instance()->removeClient(cli);
+          UDT::close(*it);
+          continue;
+        }
+        switch (msg.msgType()) {
+        case OnelabProtocol::OnelabStop:
+          std::cout << "\033[0;31m" << "Client \"" << cli->getName() << "\" is going to stop" << "\033[0m" << std::endl; // DEBUG
+          rep.msgType(OnelabProtocol::OnelabStop);
+          recvlen = rep.encodeMsg(buff, 1024);
+          if(ip4_socket_connected(cli->getSSocket())) // FIXME cli can close socket before send
+            cli->sendto(buff, recvlen);
+          //UDT::epoll_remove_usock(eid, *it);
+          UDT::epoll_remove_ssock(eid, *it);
+          OnelabServer::instance()->removeClient(cli);
+          UDT::close(*it);
+          break;
+        case OnelabProtocol::OnelabMessage:
+          if(msg.attrs.size()==1 && msg.attrs[0]->getAttributeType() == OnelabAttrMessage::attributeType()) {
+            OnelabLocalClient *localgui = OnelabServer::instance()->getLocalClient("localGUI");
+            OnelabLocalNetworkClient *gui = OnelabServer::instance()->getClient("GUI");
+            if(gui) {
+              recvlen = msg.encodeMsg(buff, 1024);
+              gui->sendto(buff, recvlen);
+            }
+            if(localgui) localgui->onMessage(cli->getName(), ((OnelabAttrMessage *)msg.attrs[0])->getMessage(), ((OnelabAttrMessage *)msg.attrs[0])->getLevel());
+          }
+          break;
+        case OnelabProtocol::OnelabRequest:
+          rep.msgType(OnelabProtocol::OnelabResponse);
+          if(msg.attrs.size() == 0) OnelabServer::instance()->sendAllParameter(cli);
+          else for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+              if((*it)->getAttributeType() == OnelabAttr::Parameter) {
+                OnelabAttrParameterQuery *attr = (OnelabAttrParameterQuery *)*it;
+                std::cout << "\033[0;31m" << "Client \"" << cli->getName() << " ask for parameter \"" << attr->getName() << " (type=" << (int)attr->paramType() << ")\"\033[0m" << std::endl; // DEBUG
+                onelab::parameter *p;
+                switch(attr->paramType()) {
+                case OnelabAttr::Number:
+                  OnelabServer::instance()->getPtr((onelab::number **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::String:
+                  OnelabServer::instance()->getPtr((onelab::string **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Region:
+                  OnelabServer::instance()->getPtr((onelab::region **)&p, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Function:
+                  OnelabServer::instance()->getPtr((onelab::function **)&p, attr->getName(), cli->getName());
+                  break;
+                }
+                if(p != NULL) rep.attrs.push_back(p);
+                else rep.attrs.push_back(new OnelabAttrMessage("Unable to find the request parameter.", OnelabAttrMessage::Error));
+              }
+              // else ??
+            }
+          recvlen = rep.encodeMsg(buff, 1024);
+          cli->sendto(buff, recvlen);
+          break;
+        case OnelabProtocol::OnelabUpdate:
+          for(std::vector<OnelabAttr *>::iterator it = msg.attrs.begin() ; it != msg.attrs.end(); ++it) {
+            if((*it)->getAttributeType() >= OnelabAttr::Number && (*it)->getAttributeType() <= OnelabAttr::Function) {
+              onelab::parameter *attr = (onelab::parameter *)*it;
+              std::cout << "\033[0;31m" << "Client \"" << cli->getName() << " update parameter \"" << attr->getName() << "\"\033[0m" << std::endl; // DEBUG
+              onelab::parameter *parameter = NULL;
+              switch(attr->getAttributeType()) {
+                case OnelabAttr::Number:
+                  OnelabServer::instance()->set(*(onelab::number *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::number **)&parameter, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::String:
+                  OnelabServer::instance()->set(*(onelab::string *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::string **)&parameter, attr->getName(), cli->getName());
+                  if(((onelab::string *)parameter)->getName() == "Gmsh/Action") {
+                    OnelabLocalClient *localgui = OnelabServer::instance()->getLocalClient("localGUI");
+                    if(((onelab::string *)parameter)->getValue() == "refresh") localgui->refresh();
+                  }
+                  break;
+                case OnelabAttr::Region:
+                  OnelabServer::instance()->set(*(onelab::region *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::region **)&parameter, attr->getName(), cli->getName());
+                  break;
+                case OnelabAttr::Function:
+                  OnelabServer::instance()->set(*(onelab::function *)attr, cli->getName());
+                  OnelabServer::instance()->getPtr((onelab::function **)&parameter, attr->getName(), cli->getName());
+                  break;
+              }
+            }
+            else
+              switch((*it)->getAttributeType()) {
+                case 0x0B:
+                {
+                  // TODO check if file is on a specific client
+                  const char *filename = ((OnelabAttrFileQuery *)*it)->getFilename();
+                  // FIXME path/filename ?
+                  std::clog << "try to open " << filename << " to read" << std::endl;
+                  FILE *fp = fopen(filename, "rb");
+                  if(fp != NULL){
+                    std::clog << "file open" << std::endl;
+                    rep.msgType(OnelabProtocol::OnelabUpdate);
+                    rep.attrs.push_back(new OnelabAttrFile(std::string(filename), fp));
+                    recvlen = rep.encodeMsg(buff, 1024);
+                    cli->sendto(buff, recvlen);
+                    while((recvlen = fread(buff, 1, 1024, fp)) > 0){
+                      cli->sendto(buff, recvlen);
+                    }
+                  }
+                  std::clog << "file ok" << std::endl;
+                  break;
+                }
+                case 0x0C:
+                {
+                  const char *filename = ((OnelabAttrFile *)*it)->getFilename();
+                  std::clog << "try to open " << filename << " to write" << std::endl;
+                  FILE *fp = fopen(filename, "wb");
+                  if(fp != NULL){
+                    std::clog << "file open" << std::endl;
+                    int filesize = ((OnelabAttrFile *)*it)->getFileSize();
+                    int downloadsize = 0;
+                    while(downloadsize < filesize) {
+                      recvlen = cli->recvfrom(buff, 1024);
+                      fwrite(buff, 1, recvlen, fp);
+                    }
+                  }
+                  std::clog << "file ok" << std::endl;
+                  break;
+                }
+                case 0x0D:
+                {
+                  // merge file only if the GUI and the server are local
+                  OnelabLocalClient *gui = OnelabServer::instance()->getLocalClient("localGUI");
+                  if(gui) gui->mergeFile(((OnelabAttrMergeFile *)*it)->getFilename());
+                }
+              }
+            }
+            break;
+          case OnelabProtocol::OnelabAction:
+          {
+            if(msg.attrs.size()==1 && msg.attrs[0]->getAttributeType() == OnelabAttrAction::attributeType()) {
+              std::clog << "\033[0;31m" << "Client " << cli->getName() << " ask " << ((OnelabAttrAction *)msg.attrs[0])->getClient() << " to " << ((OnelabAttrAction *)msg.attrs[0])->getAction() <<  "\033[0m" << std::endl;
+              OnelabServer::instance()->performAction(((OnelabAttrAction *)msg.attrs[0])->getAction(), ((OnelabAttrAction *)msg.attrs[0])->getClient());
+            }
+          }
+          break;
+        }
+      }
+    }
+  }
+}
+#endif
+
+void OnelabServer::sendAllParameter(OnelabLocalNetworkClient *cli)
+{
+  std::set<onelab::parameter*, onelab::parameterLessThan> ps;
+  OnelabProtocol msg = OnelabProtocol(OnelabProtocol::OnelabUpdate);
+  UInt32 bufflen = 1024, recvlen = 0;
+  UInt8 buff[1024];
+  _parameterSpace.getAllParameters(ps);
+  if(ps.size() == 0) return;
+  for(std::set<onelab::parameter*, onelab::parameterLessThan>::iterator it = ps.begin(); it != ps.end(); it++)
+    if((*it)->hasClient(cli->getName())) msg.attrs.push_back(*it);
+  while(recvlen = msg.encodeMsgs(buff, bufflen))
+  {
+    cli->sendto(buff, recvlen);
+  }
+}
+
+void OnelabServer::Run()
+{
+  UInt32 bufflen = 1024, recvlen = 0;
+  UInt8 buff[1024];
+  IPv4 ip;
+  OnelabProtocol msg(-1), rep(OnelabProtocol::OnelabResponse);
+  OnelabLocalNetworkClient *currentClient = NULL;
+
+#ifdef HAVE_UDT
+  UDTSOCKET newcli = 0;
+#ifndef WIN32
+  pthread_t listen_thread;
+#else
+  HANDLER listen_thread;
+#endif
+
+  _eid = UDT::epoll_create();
+
+  udt_socket_listen(_fdu);
+  ip4_socket_listen(_fds);
+  std::clog << "listen on " << ip4_inet_ntop(_ip.address) << ":" << _ip.port << "(tcp)" << std::endl;
+  //  << "listen on " << ip4_inet_ntop(_ip.address) << ":" << _ip.port << "(udp/udt)" << std::endl;
+  //while(newcli = udt_socket_accept(_fdu, ip)) { // TODO accept udt and tcp ?
+
+  while(newcli = ip4_socket_accept(_fds, ip)) {
+    std::clog << "\033[0;31m" << "accpet peer : " << ip4_inet_ntop(ip.address)<< ':' << ip.port <<  "\033[0m" << std::endl;
+    //UDT::epoll_add_usock(_eid, newcli);
+    UDT::epoll_add_ssock(_eid, newcli);
+    if(_clients.size() == 0)
+#ifndef WIN32
+      pthread_create(&listen_thread, NULL, listenOnClients, NULL);
+#else
+      listen_thread = CreateThread(NULL, 0, listenOnClients, NULL, 0, NULL);
+#endif
+  }
+  udt_socket_close(_fdu);
+#endif
+  ip4_socket_close(_fds);
+}
diff --git a/contrib/onelab2/OnelabServer.h b/contrib/onelab2/OnelabServer.h
new file mode 100644
index 0000000..8682d91
--- /dev/null
+++ b/contrib/onelab2/OnelabServer.h
@@ -0,0 +1,159 @@
+#ifndef _ONELABSERVER_H_
+#define _ONELABSERVER_H_
+
+#include <vector>
+#include <string>
+#include <queue>
+
+#include "onelab.h"
+#include "GmshSocket.h"
+#include "NetworkUtils.h"
+#ifdef HAVE_UDT
+#include "UdtUtils.h"
+#endif
+#include "OnelabLocalNetworkClient.h"
+#include "OnelabLocalClient.h"
+
+class OnelabLocalClient;
+
+class OnelabServer
+{
+private:
+	static OnelabServer *_server;
+	IPv4 _ip;
+	std::vector<OnelabLocalNetworkClient> _clients;
+  std::vector<OnelabLocalClient *> _localClients;
+#ifndef WIN32
+  pthread_t _runningThread;
+  pthread_mutex_t _mutex_todo;
+#else
+  HANDLER _runningThread;
+#endif
+  bool _running;
+  std::queue<std::string> _todoClient;
+  std::queue<std::string> _todoAction;
+	onelab::parameterSpace _parameterSpace;
+	Socket _fds;
+#ifdef HAVE_UDT
+	UDTSOCKET _fdu;
+	int _eid;
+	void sendto(std::string client, UInt8 *buff, UInt32 len);
+#endif
+public:
+	OnelabServer(UInt16 port);
+	OnelabServer(UInt32 iface, UInt16 port);
+	static OnelabServer *instance(const UInt32 iface=0, const UInt16 port=0) {
+		if(!_server) _server = new OnelabServer(iface, port);
+    else if(iface != 0 || port != 0) {
+      delete _server;
+      _server = new OnelabServer(iface, port);
+    }
+		return _server;
+	}
+	static void setInstance(OnelabServer *s) { _server = s; }
+  onelab::parameterSpace *getParameterSpace() {return &_parameterSpace;}
+  UInt16 getPort() { return _ip.port;}
+#ifdef HAVE_UDT
+	~OnelabServer(){UDT::cleanup();}
+#else
+	~OnelabServer(){}
+#endif
+	void Run();
+  bool isRunning() const {return _running;}
+  void running(bool running) {_running = running;}
+	// Client methods
+#ifdef HAVE_UDT
+	inline int getEID() const {return _eid;}
+	void addClient(std::string name, UDTSOCKET fd, UInt32 ip, UInt16 port);
+	OnelabLocalNetworkClient *getClient(UDTSOCKET fd);
+#else
+	void addClient(std::string name, UInt32 ip, UInt16 port);
+#endif
+  void addClient(OnelabLocalClient *cli) {_localClients.push_back(cli);}
+  int launchClient(const std::string &, bool blocking=false);
+	void removeClient(OnelabLocalNetworkClient *client);
+  std::vector<OnelabLocalNetworkClient> &getClients() {return _clients;}
+  std::vector<OnelabLocalClient *> &getLocalClients() {return _localClients;}
+	OnelabLocalNetworkClient *getClient(const UInt32 ip, const UInt16 port);
+	OnelabLocalNetworkClient *getClient(const std::string &name);
+  OnelabLocalClient *getLocalClient(const std::string &name);
+  void waitForClient(const std::string &name);
+	void sendAllParameter(OnelabLocalNetworkClient *cli);
+	// Parameters methods
+	void clear(const std::string &name="", const std::string &client="") {
+		_parameterSpace.clear(name, client);
+	}
+  template <class T> bool existInDatabase(const T &p) {
+    std::vector<T> ps;
+    _parameterSpace.get(ps, p.getName());
+    return ps.size() > 0;
+  }
+	template <class T> bool set(const T &p, const std::string &client="") {
+    bool isNew = !existInDatabase(p);
+		_parameterSpace.set(p, client);
+    T *pp;
+    _parameterSpace.getPtr(&pp, p.getName());
+    if(pp->getVisible()) {
+      pp->addClient("GUI", true);
+      pp->addClient("localGUI", true);
+    }
+    for(std::vector<OnelabLocalClient *>::iterator it = _localClients.begin() ; it != _localClients.end(); ++it) {
+      if((*it)->getName() != client) {
+        if(isNew)(*it)->onNewParameter(pp);
+        else (*it)->onUpdateParameter(pp);
+      }
+    }
+    std::map<std::string, bool> clients = pp->getClients();
+    for(std::map<std::string, bool>::const_iterator it = clients.begin(); it != clients.end(); it++) {
+      if(it->first == client) continue;
+      OnelabLocalNetworkClient *tmp = getClient(it->first);
+      if(tmp == NULL) continue;
+      tmp->updateParameter(pp);
+    }
+    return true;
+	}
+	template <class T> bool get(std::vector<T> &ps, const std::string &name="", const std::string &client="") {
+		return _parameterSpace.get(ps, name, client);
+	}
+	template <class T> void getPtr(T **ptr, const std::string &name="", const std::string &client="") {
+		_parameterSpace.getPtr(ptr, name, client);
+	}
+  bool fromChar(const std::vector<std::string> &msg, const std::string &client="")
+  {
+    for(unsigned int i = 0; i < msg.size(); i++){
+      std::string version, type, name;
+      onelab::parameter::getInfoFromChar(msg[i], version, type, name);
+      if(onelab::parameter::version() != version) return false;
+      if(type == "number"){
+        onelab::number p; p.fromChar(msg[i]); set(p, client);
+      }
+      else if(type == "string"){
+        onelab::string p; p.fromChar(msg[i]); set(p, client);
+      }
+      else if(type == "region"){
+        onelab::region p; p.fromChar(msg[i]); set(p, client);
+      }
+      else if(type == "function"){
+        onelab::function p; p.fromChar(msg[i]); set(p, client);
+      }
+      else
+        return false;
+    }
+    return true;
+  }
+  bool fromFile(FILE *fp, const std::string &client="")
+  {
+    std::vector<std::string> msg;
+    if(onelab::parameter::fromFile(msg, fp)) return fromChar(msg, client);
+    return false;
+  }
+  bool getChanged(const std::string &client="") const {
+    return _parameterSpace.getChanged(client);
+  }
+  void setChanged(bool changed, const std::string &client="") {
+    _parameterSpace.setChanged(changed, client);
+  }
+  void performAction(const std::string action, const std::string client="", bool blocking=false);
+  bool performNextAction();
+};
+#endif
diff --git a/contrib/onelab2/UdtUtils.h b/contrib/onelab2/UdtUtils.h
new file mode 100644
index 0000000..26e12a9
--- /dev/null
+++ b/contrib/onelab2/UdtUtils.h
@@ -0,0 +1,80 @@
+#ifndef _UDTUTILS_H_
+#define _UDTUTILS_H_
+#include <iostream>// FIXME debug only
+#include <udt.h>
+#include "NetworkUtils.h"
+
+inline UDTSOCKET udt_socket(IPv4 ip, int socketType)
+{
+	UDTSOCKET fd;
+	struct sockaddr_in addr;
+
+	memset(&addr, 0, sizeof(struct sockaddr_in));
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = hton32((ip.address==0)? INADDR_ANY : ip.address);
+	addr.sin_port = hton16(ip.port);
+
+	if(UDT::ERROR == (fd = UDT::socket(AF_INET, socketType, 0))) throw ERROR_SOCKET_CREATE;
+
+	if(UDT::ERROR == UDT::bind(fd, (struct sockaddr*)&addr, sizeof(addr))) {std::cout << UDT::getlasterror().getErrorMessage() << std::endl; throw ERROR_SOCKET_BIND;}
+
+	bool otrue = true;
+	UDT::setsockopt(fd, 0, UDT_REUSEADDR, &otrue, sizeof(bool));
+
+	return fd;
+}
+
+inline void udt_socket_timeout(UDTSOCKET fd, long ms)
+{
+	setsockopt(fd, 0, UDT_SNDTIMEO, &ms, sizeof(long));
+	setsockopt(fd, 0, UDT_RCVTIMEO, &ms, sizeof(long));
+}
+
+inline void udt_socket_listen(UDTSOCKET fd, int maxconnection=1024)
+{
+	if(UDT::ERROR == UDT::listen(fd, maxconnection)) throw ERROR_SOCKET_LISTEN;
+}
+
+inline UDTSOCKET udt_socket_accept(UDTSOCKET fd, IPv4 &ip)
+{
+	UDTSOCKET cli;
+	struct sockaddr_in addr;
+	int addrl = sizeof(addr);
+
+	cli = UDT::accept(fd, (struct sockaddr*)&addr, &addrl);
+	ip.address = ntoh32(addr.sin_addr.s_addr);
+	ip.port = ntoh16(addr.sin_port);
+
+	return cli;
+}
+
+inline void udt_socket_connect(UDTSOCKET fd, IPv4 ip)
+{
+	struct sockaddr_in addr;
+	socklen_t addrl = sizeof(addr);
+	memset(&addr, 0, addrl);
+
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = hton32(ip.address);
+	addr.sin_port = hton16(ip.port);
+	if(UDT::ERROR == UDT::connect(fd, (struct sockaddr *)&addr, addrl)) { std::cout << UDT::getlasterror().getErrorMessage() << std::endl; throw ERROR_SOCKET_CONNECT;}
+}
+
+inline int udt_socket_send(UDTSOCKET fd, UInt8 *src, int length)
+{
+	return UDT::send(fd, (char *)src, length, 0);
+}
+
+inline int udt_socket_recv(UDTSOCKET fd, UInt8 *dst, int maxlength)
+{
+	int recvlen = 0;
+	if(UDT::ERROR == (recvlen = UDT::recv(fd, (char *)dst, maxlength, 0))) { std::cout << UDT::getlasterror().getErrorMessage() << std::endl; throw ERROR_SOCKET_RECV;}
+	return recvlen;
+}
+
+inline void udt_socket_close(UDTSOCKET fd)
+{
+	UDT::close(fd);
+}
+
+#endif
diff --git a/contrib/onelab2/VirtualClient.h b/contrib/onelab2/VirtualClient.h
new file mode 100644
index 0000000..a664d44
--- /dev/null
+++ b/contrib/onelab2/VirtualClient.h
@@ -0,0 +1,44 @@
+#ifndef _VIRTUALCLIENT_H_
+#define _VIRTUALCLIENT_H_
+
+#include <string>
+
+#include "onelab.h"
+
+class VirtualClient
+{
+protected:
+	std::string _name;
+	onelab::parameterSpace *_parameterSpace;
+private:
+	bool _parameterSpaceShouldBeDeleted;
+public:
+	VirtualClient(std::string name, onelab::parameterSpace *parameterSpace=NULL){
+		_name = name;
+		_parameterSpaceShouldBeDeleted = (parameterSpace==NULL);
+		if(_parameterSpaceShouldBeDeleted)_parameterSpace = new onelab::parameterSpace;
+		else _parameterSpace = parameterSpace;
+	}
+	virtual ~VirtualClient(){
+		if(_parameterSpaceShouldBeDeleted && _parameterSpace != NULL) delete _parameterSpace;
+	}
+	std::string &getName() {return _name;}
+	template <class T> bool existInDatabase(const T p) const {
+		std::vector<T> ps;
+		_parameterSpace->get(ps, p.getName(), this->_name);
+		return ps.size() > 0;
+	}
+	template <class T> bool set(const T &p){
+		return _parameterSpace->set(p, this->_name);
+	}
+	template <class T> bool get(std::vector<T> &ps, const std::string &name=""){
+		return _parameterSpace->get(ps, this->_name);
+	}
+	virtual void onNewParameter(onelab::parameter *) = 0;
+  virtual void onUpdateParameter(onelab::parameter *) = 0;
+  virtual void onRemoveParameter(onelab::parameter *) = 0;
+
+  virtual void run(std::string action) = 0;
+};
+
+#endif
diff --git a/contrib/onelab2/python/onelab2.py b/contrib/onelab2/python/onelab2.py
new file mode 100755
index 0000000..de33fc2
--- /dev/null
+++ b/contrib/onelab2/python/onelab2.py
@@ -0,0 +1,441 @@
+"""
+OneLab - Copyright (C) 2011-2014 ULg-UCL
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished
+to do so, provided that the above copyright notice(s) and this
+permission notice appear in all copies of the Software and that
+both the above copyright notice(s) and this permission notice
+appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+Please report all bugs and problems to the public mailing list
+<gmsh at geuz.org>.
+"""
+
+import socket, struct, os, sys, subprocess
+_VERSION = 2
+_ONELAB_PARAMETER = {
+  'number' : 0x06,
+  'string' : 0x07}
+
+def file_exist(filename):
+  try:
+    with open(filename) as f:
+      return True
+  except IOError:
+    return False
+
+def path(dirname, inp):
+  # dirname is a directory, can be empty
+  # inp is an optional file or subdirectory name
+  # returns the path to 'inp' in the same directory as 'ref' 
+  if not inp: 
+    return dirname
+  if inp[0] == '/' or inp[0] == '\\' or (len(inp) > 2 and inp[1] == '\:'):
+    return inp # do nothing, inp is an absolute path
+  if inp[0] == '.' :
+    inp = inp[2:] # cut off heading './' or '.\'
+  if dirname: 
+    return dirname + os.sep + inp # append inp to the path of the reference file
+  else:
+    return inp
+
+class _parameter() :
+  _membersbase = [
+    ('name', 'string'), ('label', 'string', ''), ('help', 'string', ''),
+    ('readOnly', 'bool', 0), ('neverChanged', 'bool', 0), ('visible', 'bool', 1), 
+    ('attributes', ('dict', 'string', 'string'), {}),
+    ('clients', ('dict', 'string', 'bool'), {})
+  ]
+  _members = {
+    'string' : _membersbase + [
+      ('value', 'string',''), ('kind', 'string', 'generic'), 
+      ('choices', ('list', 'string'), [])
+    ],
+    'number' : _membersbase + [
+      ('value', 'float',0),
+      ('min', 'float', -sys.float_info.max), ('max', 'float', sys.float_info.max),
+      ('step', 'float', 0.), ('index', 'int', -1), ('choices', ('list', 'float'), []),
+      ('labels', ('dict', 'float', 'string'), {})
+    ]
+  }
+
+  def __init__(self, type, **values) :
+    self.type = type
+    for i in _parameter._members[self.type] :
+      setattr(self, i[0], values[i[0]] if i[0] in values else i[2])
+
+  def tochar(self) :
+    def tocharitem(l, t, v) :
+      if t=='string' : l.append(v)
+      elif t =='int': l.append(str(v))
+      elif t=='float' : l.append('%.16g' % v)
+      elif t[0]=='list' : 
+        l.append(str(len(v)))
+        for i in v : tocharitem(l, t[1], i)
+      elif t[0]=='dict' :
+        l.append(str(len(v)))
+        for i, j in v.items() :
+          tocharitem(l, t[1], i)
+          tocharitem(l, t[2], j)
+    msg = [_VERSION, self.type]
+    for i in _parameter._members[self.type] :
+      tocharitem(msg, i[1], getattr(self, i[0]))
+    return '\0'.join(msg)
+
+  def tobytes(self):
+    def tobytesitem(t, v):
+      val = None
+      if t=='string':
+        val = v+'\0'
+      elif t=='bool':
+        val = struct.pack('!B', v)
+      elif t=='int':
+        val = struct.pack('!i', v)
+      elif t=='float':
+        val = struct.pack('!d', v)
+      elif t[0]=='list':
+        val = struct.pack('!H', len(v))
+        for i in v:
+          val += tobytesitem(t[1], i)
+      elif t[0]=='dict':
+        val = struct.pack('!H', len(v))
+        for i, j in v.items():
+          val += tobytesitem(t[1], i)
+          val += tobytesitem(t[2], j)
+      return val
+    msg = ''
+    for i in _parameter._members[self.type]:
+      msg += tobytesitem(i[1], getattr(self, i[0]))
+    return struct.pack('!HH', _ONELAB_PARAMETER[self.type], len(msg)) + msg
+
+  def frombytes(self, b):
+    def frombytesitem(p_w, t):
+      p = p_w[0]
+      val = None
+      if t=='string':
+        val = p[:p.index('\0')]
+        p_w[0] = p[p.index('\0')+1:]
+      elif t=='bool':
+        val = struct.unpack('!B', p[:1])[0]
+        p_w[0] = p[1:]
+      elif t=='int':
+        val = struct.unpack('!i', p[:4])[0]
+        p_w[0] = p[4:]
+      elif t=='float':
+        val = struct.unpack('!d', p[:8])[0]
+        p_w[0] = p[8:]
+      elif t[0]=='list':
+        l = struct.unpack('!H', p[:2])[0]
+        p_w[0] = p[2:]
+        val = [frombytesitem(p_w, t[1]) for i in range(l)]
+      elif t[0]=='dict':
+        l = struct.unpack('!H', p[:2])[0]
+        p_w[0] = p[2:]
+        val = dict([(frombytesitem(p_w, t[1]), frombytesitem(p_w, t[2])) for i in range(l)])
+      return val
+    tmp = [b[4:]]
+    for p in _parameter._members[self.type]:
+      setattr(self, p[0], frombytesitem(tmp, p[1]))
+    return self
+
+  def fromchar(self, msg) :
+    def fromcharitem(l, t) :
+      if t=='string' : return l.pop()
+      elif t =='int': return int(l.pop())
+      elif t=='float' : return float(l.pop())
+      elif t[0]=='list' : return [fromcharitem(l, t[1]) for i in range(int(l.pop()))]
+      elif t[0]=='dict' : return dict([(fromcharitem(l, t[1]),fromcharitem(l, t[2])) for i in range(int(l.pop()))])
+    l = msg.split('\0')
+    l.reverse()
+    if l.pop() != _VERSION :
+      print('onelab version mismatch')
+    if l.pop() != self.type :
+      print('onelab parameter type mismatch')
+    for p in  _parameter._members[self.type]:
+      setattr(self, p[0], fromcharitem(l, p[1]))
+    return self
+
+  def modify(self, **param) :
+    ## updates the parameter with the content of param, attributes are merged
+    for i in _parameter._members[self.type] :
+      if i[0] in param :
+        if i[0] == 'attributes' :
+          self.attributes.update(param['attributes'])
+        else :
+          setattr(self, i[0], param[i[0]])
+
+class client :
+  _ONELAB_START   = 0x10
+  _ONELAB_STOP    = 0x11
+  _ONELAB_MESSAGE = 0x12
+  _ONELAB_REQUEST = 0x13
+  _ONELAB_RESPONSE= 0x14
+  _ONELAB_UPDATE  = 0x15
+
+
+  def _createSocket(self) :
+    addr = self.addr
+    if '/' in addr or '\\' in addr or ':' not in addr :
+      self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+      self.socket.connect(addr)
+    else :
+      self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+      s = addr.split(':')
+      self.socket.connect((s[0], int(s[1])))
+
+  def _send(self, t, m=''):
+    if not self.socket :
+      return
+
+    try:
+      if self.socket.send(struct.pack('!BBH', _VERSION, t, len(m))+m) == 0 :
+        RuntimeError('onelab socket closed')
+    except socket.error:
+      self.socket.close()
+      self._createSocket()
+      #self.socket.send(struct.pack('ii%is' %len(m), t, len(m), m))
+
+  def _clearbuffer(self):
+    self.socket.recv(1024)
+
+  def _receive(self) :
+    def buffered_receive(l) :
+      msg = b''
+      while len(msg) < l:
+        chunk = self.socket.recv(l - len(msg))
+        if not chunk :
+          RuntimeError('onelab socket closed')
+        msg += chunk
+      return msg
+    msg = buffered_receive(struct.calcsize('BBH'))
+    v, t, l = struct.unpack('!BBH', msg)
+    if v != _VERSION :
+      RuntimeError('onelab version mismatch')
+    msg = buffered_receive(l)
+    if t == self._ONELAB_MESSAGE :
+      print('onelab info : %s' % msg)
+    return t, msg
+
+  def _parseParameter(msg):
+    def extract_attr(b):
+      t, l = struct.unpack('!HH', b[:4])
+      if l+4 > len(b):
+        RuntimeError('onelab invalid parameter')
+      return t ,b[4:]
+
+      ptype, p = extract_attr(msg)
+      if ptype == 0x06:
+        param = _parameter('number')
+        param.frombytes(msg)
+        return param
+      elif ptype == 0x07:
+        param = _parameter('string')
+        param.frombytes(msg)
+        return param
+      else:
+        return None
+
+  def _defineParameter(self, p) :
+    if not self.socket :
+      return p.value
+    self._send(self._ONELAB_UPDATE, p.tobytes())
+    return p.value
+
+  def _getParameter(self, param, warn_if_not_found=True) :
+    def extract_attr(b):
+      t, l = struct.unpack('!HH', b[:4])
+      if l+4 > len(b):
+        RuntimeError('onelab invalid parameter')
+      return t ,b[4:]
+
+    if not self.socket :
+      return
+    self._send(self._ONELAB_REQUEST, struct.pack('!HHB', 0x05, len(param.name)+1, _ONELAB_PARAMETER[param.type])+param.name)
+    (t, msg) = self._receive()
+    if t == self._ONELAB_RESPONSE :
+      ptype, p = extract_attr(msg)
+      if ptype == 0x06 or ptype == 0x07:
+        param.frombytes(msg)
+      elif ptype == 0x0A and warn_if_not_found:
+        print('Unknown parameter %s' %(param.name))
+
+  def defineNumber(self, name, **param):
+    if 'labels' in param :
+      param["choices"] = param["labels"].keys()
+    p = _parameter('number', name=name, **param)
+    value = self._defineParameter(p)
+    return value
+
+  def defineString(self, name, **param):
+    p = _parameter('string', name=name, **param)
+    value = self._defineParameter(p)
+    return value
+
+  def getString(self, name, warn_if_not_found=True):
+    param = _parameter('string', name=name)
+    self._getParameter(param, warn_if_not_found)
+    return param.value
+
+  def getNumber(self, name, warn_if_not_found=True):
+    param = _parameter('number', name=name)
+    self._getParameter(param, warn_if_not_found)
+    return param.value
+
+  def setNumber(self, name, **param):
+    if not self.socket :
+      return
+    p = _parameter('number', name=name)
+    self._getParameter(p, False)
+    p.modify(**param)
+    self._send(self._ONELAB_UPDATE, p.tobytes())
+
+  def setString(self, name, **param):
+    if not self.socket :
+      return
+    p = _parameter('string', name=name)
+    self._getParameter(p, False)
+    p.modify(**param)
+    self._send(self._ONELAB_UPDATE, p.tobytes())
+
+  def _sendMessage(self, msg, lvl=5):
+    if not self.socket :
+      print (msg)
+      return
+    self._send(self._ONELAB_MESSAGE, struct.pack("!HHB", 0x0A, len(msg)+1, lvl)+msg)
+
+  def sendFatal(self, msg) :
+    self._sendMessage(msg+'\0', 1)
+  def sendError(self, msg) :
+    self._sendMessage(msg+'\0', 2)
+  def sendWarning(self, msg) :
+    self._sendMessage(msg+'\0', 3)
+  def sendInfo(self, msg) :
+    self._sendMessage(msg+'\0', 5)
+  def sendDebug(self, msg) :
+    self._sendMessage(msg+'\0', 99)
+
+  def mergeFile(self, filename) :
+    if not self.socket or not filename :
+      return
+    self._send(self._ONELAB_UPDATE, struct.pack("!HH", 0x0D, len(filename))+filename)
+
+  def waitOnSubClient(self, name):
+    if not self.socket :
+      return
+    while self._numSubClients > 0:
+      (t, msg) = self._receive()
+      if t == _ONELAB_UPDATE:
+        param = _parseParameter(msg)
+        if param.type=='string' and param.name[-7:]=='/Action' and param.value=='stop':
+          if param.name[-7:] == name: return
+          self._numSubClients -= 1 # FIXME check that the client is a subclient ?
+
+
+  def waitOnSubClients(self):
+    if not self.socket :
+      return
+    while self._numSubClients > 0:
+      (t, msg) = self._receive()
+      if t == _ONELAB_UPDATE:
+        param = _parseParameter(msg)
+        if param.type=='string' and param.name[:-7]=='/Action' and param.value=='stop':
+          self._numSubClients -= 1 # FIXME check that the client is a subclient ?
+
+  def runNonBlockingSubClient(self, name, command, arguments=''):
+    if self.action == 'check':
+      cmd = command
+    else:
+      cmd = command + ' ' + arguments
+    os.system(cmd);
+    self._numSubClients +=1
+    self.getString(name+'/Action', False)
+
+  def runSubClient(self, name, command, arguments=''):
+    self.runNonBlockingSubClient(name, command, arguments)
+    self.waitOnSubClient(name) # makes the subclient blocking
+    #if self.action == 'compute': 
+    #TODO  self.setChanged(name, False)
+
+  def __init__(self, ref=''):
+    self.socket = None
+    self.name = ""
+    self.addr = ""
+    self.wdir = os.path.dirname(ref)
+    self._numSubClients = 0
+    for i, v in enumerate(sys.argv) :
+      if v == '-onelab':
+        self.name = sys.argv[i + 1]
+        self.addr = sys.argv[i + 2]
+        self._createSocket()
+        self._send(self._ONELAB_START, struct.pack('!HH', 0x04, len(self.name))+self.name)
+        (t, msg) = self._receive() # wait for the server to reply
+        if t != self._ONELAB_START:
+          print("unable to connect the server")
+          exit(1)
+        self._clearbuffer()
+    self.action = "compute" # default (subclients have no client.Action defined)
+    self.action = self.getString(self.name + '/Action', False)
+    self.setNumber('IsPyMetamodel',value=1,visible=0)
+    self.loop = self.getNumber('0Metamodel/Loop', warn_if_not_found=False)
+    self.batch = self.getNumber('0Metamodel/Batch', warn_if_not_found=False)
+    self.sendInfo("Performing OneLab '" + self.action + "'")
+    if self.action == "initialize": 
+      self.finalize()
+      exit(0)
+
+  def finalize(self):
+    # code aster python interpreter does not call the destructor at exit, it is
+    # necessary to call finalize() epxlicitely
+    if self.socket :
+      self.waitOnSubClients()
+      self._send(self._ONELAB_STOP)
+      self._receive()
+      self.socket.close()
+      self.socket = None
+
+  def getPath(self, inp='') :
+    return path(self.wdir,inp)
+
+  def fileExists(self, p) :
+    return os.path.exists(p)
+
+  def checkFile(self, p) :
+    if not self.fileExists(p):
+      self.sendError('path error: %s' %(p))
+      exit(0) 
+    return True
+
+  def checkPath(self, inp='') :
+    p = path(self.wdir,inp)
+    self.checkFile(p)
+    return p
+    
+  def __del__(self):
+    self.finalize()
+
+# tool to extract the (i, j)th element in an array file
+#from rlcompleter import readline
+def extract(filename,i,j):
+    input = open(filename,'r')
+    all_lines = input.readlines()
+    input.close()
+    if i == -1:
+        i = len(all_lines) # last line
+    items = all_lines[i-1].split()
+    return float(items[j-1])
diff --git a/contrib/rtree/README.TXT b/contrib/rtree/README.TXT
deleted file mode 100644
index a2f23a2..0000000
--- a/contrib/rtree/README.TXT
+++ /dev/null
@@ -1,43 +0,0 @@
-
-TITLE
-
-	R-TREES: A DYNAMIC INDEX STRUCTURE FOR SPATIAL SEARCHING
-
-DESCRIPTION
-
-	A C++ templated version of the RTree algorithm.
-	For more information please read the comments in RTree.h
-
-AUTHORS
-
-	* 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely
-	* 1994 ANCI C ported from original test code by Melinda Green - melinda at superliminal.com
-	* 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook
-	* 2004 Templated C++ port by Greg Douglas
-
-LICENSE:
-
-	Entirely free for all uses. Enjoy!
-
-FILES
-	* RTree.h            The C++ templated RTree implementation. Well commented.
-	* Test.cpp           A simple test program, ported from the original C version.
-	* MemoryTest.cpp     A more rigourous test to validate memory use.
-	* README.TXT         This file.
-
-TO BUILD
-
-	To build a test, compile only one of the test files with RTree.h.  
-	Both test files contain a main() function.
-
-RECENT CHANGE LOG
-
-05 Jan 2010
-o Fixed Iterator GetFirst() - Previous fix was not incomplete
-
-03 Dec 2009
-o Added Iteartor GetBounds()
-o Added Iterator usage to simple test
-o Fixed Iterator GetFirst() - Thanks Mathew Riek
-o Minor updates for MSVC 2005/08 compilers
-
diff --git a/contrib/rtree/rtree.h b/contrib/rtree/rtree.h
deleted file mode 100644
index 31f21e5..0000000
--- a/contrib/rtree/rtree.h
+++ /dev/null
@@ -1,1593 +0,0 @@
-#ifndef RTREE_H
-#define RTREE_H
-#include <algorithm>
-
-// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
-
-// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
-#include <stdio.h>
-#include <math.h>
-#include <assert.h>
-#include <stdlib.h>
-
-#define ASSERT assert // RTree uses ASSERT( condition )
-#ifndef Min
-  #define Min std::min
-#endif //Min
-#ifndef Max
-  #define Max std::max
-#endif //Max
-
-//
-// RTree.h
-//
-
-#define RTREE_TEMPLATE template<class DATATYPE, class ELEMTYPE, int NUMDIMS, class ELEMTYPEREAL, int TMAXNODES, int TMINNODES>
-#define RTREE_QUAL RTree<DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES>
-
-#define RTREE_DONT_USE_MEMPOOLS // This version does not contain a fixed memory allocator, fill in lines with EXAMPLE to implement one.
-#define RTREE_USE_SPHERICAL_VOLUME // Better split classification, may be slower on some systems
-
-// Fwd decl
-class RTFileStream;  // File I/O helper class, look below for implementation and notes.
-
-
-/// \class RTree
-/// Implementation of RTree, a multidimensional bounding rectangle tree.
-/// Example usage: For a 3-dimensional tree use RTree<Object*, float, 3> myTree;
-///
-/// This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com)
-///
-/// DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof<void*> and simple type
-/// ELEMTYPE Type of element such as int or float
-/// NUMDIMS Number of dimensions such as 2 or 3
-/// ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs
-///
-/// NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle.
-///        This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency.
-///        Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory
-///        array similar to MFC CArray or STL Vector for returning search query result.
-///
-template<class DATATYPE, class ELEMTYPE, int NUMDIMS,
-         class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
-class RTree
-{
-protected:
-
-  struct Node;  // Fwd decl.  Used by other internal structs and iterator
-
-public:
-
-  // These constant must be declared after Branch and before Node struct
-  // Stuck up here for MSVC 6 compiler.  NSVC .NET 2003 is much happier.
-  enum
-  {
-    MAXNODES = TMAXNODES,                         ///< Max elements in node
-    MINNODES = TMINNODES,                         ///< Min elements in node
-  };
-
-
-public:
-
-  RTree();
-  virtual ~RTree();
-
-  /// Insert entry
-  /// \param a_min Min of bounding rect
-  /// \param a_max Max of bounding rect
-  /// \param a_dataId Positive Id of data.  Maybe zero, but negative numbers not allowed.
-  void Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
-
-  /// Remove entry
-  /// \param a_min Min of bounding rect
-  /// \param a_max Max of bounding rect
-  /// \param a_dataId Positive Id of data.  Maybe zero, but negative numbers not allowed.
-  void Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
-
-  /// Find all within search rectangle
-  /// \param a_min Min of search bounding rect
-  /// \param a_max Max of search bounding rect
-  /// \param a_resultCallback Callback function to return result.  Callback should return 'true' to continue searching
-  /// \param a_context User context to pass as parameter to a_resultCallback
-  /// \return Returns the number of entries found
-  int Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context);
-
-  /// Remove all entries from tree
-  void RemoveAll();
-
-  /// Count the data elements in this container.  This is slow as no internal counter is maintained.
-  int Count();
-
-  /// Load tree contents from file
-  bool Load(const char* a_fileName);
-  /// Load tree contents from stream
-  bool Load(RTFileStream& a_stream);
-
-
-  /// Save tree contents to file
-  bool Save(const char* a_fileName);
-  /// Save tree contents to stream
-  bool Save(RTFileStream& a_stream);
-
-  /// Iterator is not remove safe.
-  class Iterator
-  {
-  private:
-
-    enum { MAX_STACK = 32 }; //  Max stack size. Allows almost n^32 where n is number of branches in node
-
-    struct StackElement
-    {
-      Node* m_node;
-      int m_branchIndex;
-    };
-
-  public:
-
-    Iterator()                                    { Init(); }
-
-    ~Iterator()                                   { }
-
-    /// Is iterator invalid
-    bool IsNull()                                 { return (m_tos <= 0); }
-
-    /// Is iterator pointing to valid data
-    bool IsNotNull()                              { return (m_tos > 0); }
-
-    /// Access the current data element. Caller must be sure iterator is not NULL first.
-    DATATYPE& operator*()
-    {
-      ASSERT(IsNotNull());
-      StackElement& curTos = m_stack[m_tos - 1];
-      return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
-    }
-
-    /// Access the current data element. Caller must be sure iterator is not NULL first.
-    const DATATYPE& operator*() const
-    {
-      ASSERT(IsNotNull());
-      StackElement& curTos = m_stack[m_tos - 1];
-      return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
-    }
-
-    /// Find the next data element
-    bool operator++()                             { return FindNextData(); }
-
-    /// Get the bounds for this node
-    void GetBounds(ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS])
-    {
-      ASSERT(IsNotNull());
-      StackElement& curTos = m_stack[m_tos - 1];
-      Branch& curBranch = curTos.m_node->m_branch[curTos.m_branchIndex];
-
-      for(int index = 0; index < NUMDIMS; ++index)
-      {
-        a_min[index] = curBranch.m_rect.m_min[index];
-        a_max[index] = curBranch.m_rect.m_max[index];
-      }
-    }
-
-  private:
-
-    /// Reset iterator
-    void Init()                                   { m_tos = 0; }
-
-    /// Find the next data element in the tree (For internal use only)
-    bool FindNextData()
-    {
-      for(;;)
-      {
-        if(m_tos <= 0)
-        {
-          return false;
-        }
-        StackElement curTos = Pop(); // Copy stack top cause it may change as we use it
-
-        if(curTos.m_node->IsLeaf())
-        {
-          // Keep walking through data while we can
-          if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
-          {
-            // There is more data, just point to the next one
-            Push(curTos.m_node, curTos.m_branchIndex + 1);
-            return true;
-          }
-          // No more data, so it will fall back to previous level
-        }
-        else
-        {
-          if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
-          {
-            // Push sibling on for future tree walk
-            // This is the 'fall back' node when we finish with the current level
-            Push(curTos.m_node, curTos.m_branchIndex + 1);
-          }
-          // Since cur node is not a leaf, push first of next level to get deeper into the tree
-          Node* nextLevelnode = curTos.m_node->m_branch[curTos.m_branchIndex].m_child;
-          Push(nextLevelnode, 0);
-
-          // If we pushed on a new leaf, exit as the data is ready at TOS
-          if(nextLevelnode->IsLeaf())
-          {
-            return true;
-          }
-        }
-      }
-    }
-
-    /// Push node and branch onto iteration stack (For internal use only)
-    void Push(Node* a_node, int a_branchIndex)
-    {
-      m_stack[m_tos].m_node = a_node;
-      m_stack[m_tos].m_branchIndex = a_branchIndex;
-      ++m_tos;
-      ASSERT(m_tos <= MAX_STACK);
-    }
-
-    /// Pop element off iteration stack (For internal use only)
-    StackElement& Pop()
-    {
-      ASSERT(m_tos > 0);
-      --m_tos;
-      return m_stack[m_tos];
-    }
-
-    StackElement m_stack[MAX_STACK];              ///< Stack as we are doing iteration instead of recursion
-    int m_tos;                                    ///< Top Of Stack index
-
-    friend class RTree; // Allow hiding of non-public functions while allowing manipulation by logical owner
-  };
-
-  /// Get 'first' for iteration
-  void GetFirst(Iterator& a_it)
-  {
-    a_it.Init();
-    Node* first = m_root;
-    while(first)
-    {
-      if(first->IsInternalNode() && first->m_count > 1)
-      {
-        a_it.Push(first, 1); // Descend sibling branch later
-      }
-      else if(first->IsLeaf())
-      {
-        if(first->m_count)
-        {
-          a_it.Push(first, 0);
-        }
-        break;
-      }
-      first = first->m_branch[0].m_child;
-    }
-  }
-
-  /// Get Next for iteration
-  void GetNext(Iterator& a_it)                    { ++a_it; }
-
-  /// Is iterator NULL, or at end?
-  bool IsNull(Iterator& a_it)                     { return a_it.IsNull(); }
-
-  /// Get object at iterator position
-  DATATYPE& GetAt(Iterator& a_it)                 { return *a_it; }
-
-protected:
-
-  /// Minimal bounding rectangle (n-dimensional)
-  struct Rect
-  {
-    ELEMTYPE m_min[NUMDIMS];                      ///< Min dimensions of bounding box
-    ELEMTYPE m_max[NUMDIMS];                      ///< Max dimensions of bounding box
-  };
-
-  /// May be data or may be another subtree
-  /// The parents level determines this.
-  /// If the parents level is 0, then this is data
-  struct Branch
-  {
-    Rect m_rect;                                  ///< Bounds
-    union
-    {
-      Node* m_child;                              ///< Child node
-      DATATYPE m_data;                            ///< Data Id or Ptr
-    };
-  };
-
-  /// Node for each branch level
-  struct Node
-  {
-    bool IsInternalNode()                         { return (m_level > 0); } // Not a leaf, but a internal node
-    bool IsLeaf()                                 { return (m_level == 0); } // A leaf, contains data
-
-    int m_count;                                  ///< Count
-    int m_level;                                  ///< Leaf is zero, others positive
-    Branch m_branch[MAXNODES];                    ///< Branch
-  };
-
-  /// A link list of nodes for reinsertion after a delete operation
-  struct ListNode
-  {
-    ListNode* m_next;                             ///< Next in list
-    Node* m_node;                                 ///< Node
-  };
-
-  /// Variables for finding a split partition
-  struct PartitionVars
-  {
-    int m_partition[MAXNODES+1];
-    int m_total;
-    int m_minFill;
-    int m_taken[MAXNODES+1];
-    int m_count[2];
-    Rect m_cover[2];
-    ELEMTYPEREAL m_area[2];
-
-    Branch m_branchBuf[MAXNODES+1];
-    int m_branchCount;
-    Rect m_coverSplit;
-    ELEMTYPEREAL m_coverSplitArea;
-  };
-
-  Node* AllocNode();
-  void FreeNode(Node* a_node);
-  void InitNode(Node* a_node);
-  void InitRect(Rect* a_rect);
-  bool InsertRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, Node** a_newNode, int a_level);
-  bool InsertRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level);
-  Rect NodeCover(Node* a_node);
-  bool AddBranch(Branch* a_branch, Node* a_node, Node** a_newNode);
-  void DisconnectBranch(Node* a_node, int a_index);
-  int PickBranch(Rect* a_rect, Node* a_node);
-  Rect CombineRect(Rect* a_rectA, Rect* a_rectB);
-  void SplitNode(Node* a_node, Branch* a_branch, Node** a_newNode);
-  ELEMTYPEREAL RectSphericalVolume(Rect* a_rect);
-  ELEMTYPEREAL RectVolume(Rect* a_rect);
-  ELEMTYPEREAL CalcRectVolume(Rect* a_rect);
-  void GetBranches(Node* a_node, Branch* a_branch, PartitionVars* a_parVars);
-  void ChoosePartition(PartitionVars* a_parVars, int a_minFill);
-  void LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars);
-  void InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill);
-  void PickSeeds(PartitionVars* a_parVars);
-  void Classify(int a_index, int a_group, PartitionVars* a_parVars);
-  bool RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root);
-  bool RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode);
-  ListNode* AllocListNode();
-  void FreeListNode(ListNode* a_listNode);
-  bool Overlap(Rect* a_rectA, Rect* a_rectB);
-  void ReInsert(Node* a_node, ListNode** a_listNode);
-  bool Search(Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context);
-  void RemoveAllRec(Node* a_node);
-  void Reset();
-  void CountRec(Node* a_node, int& a_count);
-
-  bool SaveRec(Node* a_node, RTFileStream& a_stream);
-  bool LoadRec(Node* a_node, RTFileStream& a_stream);
-
-  Node* m_root;                                    ///< Root of tree
-  ELEMTYPEREAL m_unitSphereVolume;                 ///< Unit sphere constant for required number of dimensions
-};
-
-
-// Because there is not stream support, this is a quick and dirty file I/O helper.
-// Users will likely replace its usage with a Stream implementation from their favorite API.
-class RTFileStream
-{
-  FILE* m_file;
-
-public:
-
-
-  RTFileStream()
-  {
-    m_file = NULL;
-  }
-
-  ~RTFileStream()
-  {
-    Close();
-  }
-
-  bool OpenRead(const char* a_fileName)
-  {
-    m_file = fopen(a_fileName, "rb");
-    if(!m_file)
-    {
-      return false;
-    }
-    return true;
-  }
-
-  bool OpenWrite(const char* a_fileName)
-  {
-    m_file = fopen(a_fileName, "wb");
-    if(!m_file)
-    {
-      return false;
-    }
-    return true;
-  }
-
-  void Close()
-  {
-    if(m_file)
-    {
-      fclose(m_file);
-      m_file = NULL;
-    }
-  }
-
-  template< typename TYPE >
-  size_t Write(const TYPE& a_value)
-  {
-    ASSERT(m_file);
-    return fwrite((void*)&a_value, sizeof(a_value), 1, m_file);
-  }
-
-  template< typename TYPE >
-  size_t WriteArray(const TYPE* a_array, int a_count)
-  {
-    ASSERT(m_file);
-    return fwrite((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
-  }
-
-  template< typename TYPE >
-  size_t Read(TYPE& a_value)
-  {
-    ASSERT(m_file);
-    return fread((void*)&a_value, sizeof(a_value), 1, m_file);
-  }
-
-  template< typename TYPE >
-  size_t ReadArray(TYPE* a_array, int a_count)
-  {
-    ASSERT(m_file);
-    return fread((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
-  }
-};
-
-
-RTREE_TEMPLATE
-RTREE_QUAL::RTree()
-{
-  ASSERT(MAXNODES > MINNODES);
-  ASSERT(MINNODES > 0);
-
-
-  // We only support machine word size simple data type eg. integer index or object pointer.
-  // Since we are storing as union with non data branch
-  ASSERT(sizeof(DATATYPE) == sizeof(void*) || sizeof(DATATYPE) == sizeof(int));
-
-  // Precomputed volumes of the unit spheres for the first few dimensions
-  const float UNIT_SPHERE_VOLUMES[] = {
-    0.000000f, 2.000000f, 3.141593f, // Dimension  0,1,2
-    4.188790f, 4.934802f, 5.263789f, // Dimension  3,4,5
-    5.167713f, 4.724766f, 4.058712f, // Dimension  6,7,8
-    3.298509f, 2.550164f, 1.884104f, // Dimension  9,10,11
-    1.335263f, 0.910629f, 0.599265f, // Dimension  12,13,14
-    0.381443f, 0.235331f, 0.140981f, // Dimension  15,16,17
-    0.082146f, 0.046622f, 0.025807f, // Dimension  18,19,20
-  };
-
-  m_root = AllocNode();
-  m_root->m_level = 0;
-  m_unitSphereVolume = (ELEMTYPEREAL)UNIT_SPHERE_VOLUMES[NUMDIMS];
-}
-
-
-RTREE_TEMPLATE
-RTREE_QUAL::~RTree()
-{
-  Reset(); // Free, or reset node memory
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
-{
-#ifdef _DEBUG
-  for(int index=0; index<NUMDIMS; ++index)
-  {
-    ASSERT(a_min[index] <= a_max[index]);
-  }
-#endif //_DEBUG
-
-  Rect rect;
-
-  for(int axis=0; axis<NUMDIMS; ++axis)
-  {
-    rect.m_min[axis] = a_min[axis];
-    rect.m_max[axis] = a_max[axis];
-  }
-
-  InsertRect(&rect, a_dataId, &m_root, 0);
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
-{
-#ifdef _DEBUG
-  for(int index=0; index<NUMDIMS; ++index)
-  {
-    ASSERT(a_min[index] <= a_max[index]);
-  }
-#endif //_DEBUG
-
-  Rect rect;
-
-  for(int axis=0; axis<NUMDIMS; ++axis)
-  {
-    rect.m_min[axis] = a_min[axis];
-    rect.m_max[axis] = a_max[axis];
-  }
-
-  RemoveRect(&rect, a_dataId, &m_root);
-}
-
-
-RTREE_TEMPLATE
-int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context)
-{
-#ifdef _DEBUG
-  for(int index=0; index<NUMDIMS; ++index)
-  {
-    ASSERT(a_min[index] <= a_max[index]);
-  }
-#endif //_DEBUG
-
-  Rect rect;
-
-  for(int axis=0; axis<NUMDIMS; ++axis)
-  {
-    rect.m_min[axis] = a_min[axis];
-    rect.m_max[axis] = a_max[axis];
-  }
-
-  // NOTE: May want to return search result another way, perhaps returning the number of found elements here.
-
-  int foundCount = 0;
-  Search(m_root, &rect, foundCount, a_resultCallback, a_context);
-
-  return foundCount;
-}
-
-
-RTREE_TEMPLATE
-int RTREE_QUAL::Count()
-{
-  int count = 0;
-  CountRec(m_root, count);
-
-  return count;
-}
-
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::CountRec(Node* a_node, int& a_count)
-{
-  if(a_node->IsInternalNode())  // not a leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      CountRec(a_node->m_branch[index].m_child, a_count);
-    }
-  }
-  else // A leaf node
-  {
-    a_count += a_node->m_count;
-  }
-}
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::Load(const char* a_fileName)
-{
-  RemoveAll(); // Clear existing tree
-
-  RTFileStream stream;
-  if(!stream.OpenRead(a_fileName))
-  {
-    return false;
-  }
-
-  bool result = Load(stream);
-
-  stream.Close();
-
-  return result;
-};
-
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::Load(RTFileStream& a_stream)
-{
-  // Write some kind of header
-  int _dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
-  int _dataSize = sizeof(DATATYPE);
-  int _dataNumDims = NUMDIMS;
-  int _dataElemSize = sizeof(ELEMTYPE);
-  int _dataElemRealSize = sizeof(ELEMTYPEREAL);
-  int _dataMaxNodes = TMAXNODES;
-  int _dataMinNodes = TMINNODES;
-
-  int dataFileId = 0;
-  int dataSize = 0;
-  int dataNumDims = 0;
-  int dataElemSize = 0;
-  int dataElemRealSize = 0;
-  int dataMaxNodes = 0;
-  int dataMinNodes = 0;
-
-  a_stream.Read(dataFileId);
-  a_stream.Read(dataSize);
-  a_stream.Read(dataNumDims);
-  a_stream.Read(dataElemSize);
-  a_stream.Read(dataElemRealSize);
-  a_stream.Read(dataMaxNodes);
-  a_stream.Read(dataMinNodes);
-
-  bool result = false;
-
-  // Test if header was valid and compatible
-  if(    (dataFileId == _dataFileId)
-      && (dataSize == _dataSize)
-      && (dataNumDims == _dataNumDims)
-      && (dataElemSize == _dataElemSize)
-      && (dataElemRealSize == _dataElemRealSize)
-      && (dataMaxNodes == _dataMaxNodes)
-      && (dataMinNodes == _dataMinNodes)
-    )
-  {
-    // Recursively load tree
-    result = LoadRec(m_root, a_stream);
-  }
-
-  return result;
-}
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::LoadRec(Node* a_node, RTFileStream& a_stream)
-{
-  a_stream.Read(a_node->m_level);
-  a_stream.Read(a_node->m_count);
-
-  if(a_node->IsInternalNode())  // not a leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      Branch* curBranch = &a_node->m_branch[index];
-
-      a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
-      a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
-
-      curBranch->m_child = AllocNode();
-      LoadRec(curBranch->m_child, a_stream);
-    }
-  }
-  else // A leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      Branch* curBranch = &a_node->m_branch[index];
-
-      a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
-      a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
-
-      a_stream.Read(curBranch->m_data);
-    }
-  }
-
-  return true; // Should do more error checking on I/O operations
-}
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::Save(const char* a_fileName)
-{
-  RTFileStream stream;
-  if(!stream.OpenWrite(a_fileName))
-  {
-    return false;
-  }
-
-  bool result = Save(stream);
-
-  stream.Close();
-
-  return result;
-}
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::Save(RTFileStream& a_stream)
-{
-  // Write some kind of header
-  int dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
-  int dataSize = sizeof(DATATYPE);
-  int dataNumDims = NUMDIMS;
-  int dataElemSize = sizeof(ELEMTYPE);
-  int dataElemRealSize = sizeof(ELEMTYPEREAL);
-  int dataMaxNodes = TMAXNODES;
-  int dataMinNodes = TMINNODES;
-
-  a_stream.Write(dataFileId);
-  a_stream.Write(dataSize);
-  a_stream.Write(dataNumDims);
-  a_stream.Write(dataElemSize);
-  a_stream.Write(dataElemRealSize);
-  a_stream.Write(dataMaxNodes);
-  a_stream.Write(dataMinNodes);
-
-  // Recursively save tree
-  bool result = SaveRec(m_root, a_stream);
-
-  return result;
-}
-
-
-RTREE_TEMPLATE
-bool RTREE_QUAL::SaveRec(Node* a_node, RTFileStream& a_stream)
-{
-  a_stream.Write(a_node->m_level);
-  a_stream.Write(a_node->m_count);
-
-  if(a_node->IsInternalNode())  // not a leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      Branch* curBranch = &a_node->m_branch[index];
-
-      a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
-      a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
-
-      SaveRec(curBranch->m_child, a_stream);
-    }
-  }
-  else // A leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      Branch* curBranch = &a_node->m_branch[index];
-
-      a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
-      a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
-
-      a_stream.Write(curBranch->m_data);
-    }
-  }
-
-  return true; // Should do more error checking on I/O operations
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::RemoveAll()
-{
-  // Delete all existing nodes
-  Reset();
-
-  m_root = AllocNode();
-  m_root->m_level = 0;
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::Reset()
-{
-#ifdef RTREE_DONT_USE_MEMPOOLS
-  // Delete all existing nodes
-  RemoveAllRec(m_root);
-#else // RTREE_DONT_USE_MEMPOOLS
-  // Just reset memory pools.  We are not using complex types
-  // EXAMPLE
-#endif // RTREE_DONT_USE_MEMPOOLS
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::RemoveAllRec(Node* a_node)
-{
-  ASSERT(a_node);
-  ASSERT(a_node->m_level >= 0);
-
-  if(a_node->IsInternalNode()) // This is an internal node in the tree
-  {
-    for(int index=0; index < a_node->m_count; ++index)
-    {
-      RemoveAllRec(a_node->m_branch[index].m_child);
-    }
-  }
-  FreeNode(a_node);
-}
-
-
-RTREE_TEMPLATE
-typename RTREE_QUAL::Node* RTREE_QUAL::AllocNode()
-{
-  Node* newNode;
-#ifdef RTREE_DONT_USE_MEMPOOLS
-  newNode = new Node;
-#else // RTREE_DONT_USE_MEMPOOLS
-  // EXAMPLE
-#endif // RTREE_DONT_USE_MEMPOOLS
-  InitNode(newNode);
-  return newNode;
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::FreeNode(Node* a_node)
-{
-  ASSERT(a_node);
-
-#ifdef RTREE_DONT_USE_MEMPOOLS
-  delete a_node;
-#else // RTREE_DONT_USE_MEMPOOLS
-  // EXAMPLE
-#endif // RTREE_DONT_USE_MEMPOOLS
-}
-
-
-// Allocate space for a node in the list used in DeletRect to
-// store Nodes that are too empty.
-RTREE_TEMPLATE
-typename RTREE_QUAL::ListNode* RTREE_QUAL::AllocListNode()
-{
-#ifdef RTREE_DONT_USE_MEMPOOLS
-  return new ListNode;
-#else // RTREE_DONT_USE_MEMPOOLS
-  // EXAMPLE
-#endif // RTREE_DONT_USE_MEMPOOLS
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::FreeListNode(ListNode* a_listNode)
-{
-#ifdef RTREE_DONT_USE_MEMPOOLS
-  delete a_listNode;
-#else // RTREE_DONT_USE_MEMPOOLS
-  // EXAMPLE
-#endif // RTREE_DONT_USE_MEMPOOLS
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::InitNode(Node* a_node)
-{
-  a_node->m_count = 0;
-  a_node->m_level = -1;
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::InitRect(Rect* a_rect)
-{
-  for(int index = 0; index < NUMDIMS; ++index)
-  {
-    a_rect->m_min[index] = (ELEMTYPE)0;
-    a_rect->m_max[index] = (ELEMTYPE)0;
-  }
-}
-
-
-// Inserts a new data rectangle into the index structure.
-// Recursively descends tree, propagates splits back up.
-// Returns 0 if node was not split.  Old node updated.
-// If node was split, returns 1 and sets the pointer pointed to by
-// new_node to point to the new node.  Old node updated to become one of two.
-// The level argument specifies the number of steps up from the leaf
-// level to insert; e.g. a data rectangle goes in at level = 0.
-RTREE_TEMPLATE
-bool RTREE_QUAL::InsertRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, Node** a_newNode, int a_level)
-{
-  ASSERT(a_rect && a_node && a_newNode);
-  ASSERT(a_level >= 0 && a_level <= a_node->m_level);
-
-  int index;
-  Branch branch;
-  Node* otherNode;
-
-  // Still above level for insertion, go down tree recursively
-  if(a_node->m_level > a_level)
-  {
-    index = PickBranch(a_rect, a_node);
-    if (!InsertRectRec(a_rect, a_id, a_node->m_branch[index].m_child, &otherNode, a_level))
-    {
-      // Child was not split
-      a_node->m_branch[index].m_rect = CombineRect(a_rect, &(a_node->m_branch[index].m_rect));
-      return false;
-    }
-    else // Child was split
-    {
-      a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
-      branch.m_child = otherNode;
-      branch.m_rect = NodeCover(otherNode);
-      return AddBranch(&branch, a_node, a_newNode);
-    }
-  }
-  else if(a_node->m_level == a_level) // Have reached level for insertion. Add rect, split if necessary
-  {
-    branch.m_rect = *a_rect;
-    branch.m_child = (Node*) a_id;
-    // Child field of leaves contains id of data record
-    return AddBranch(&branch, a_node, a_newNode);
-  }
-  else
-  {
-    // Should never occur
-    ASSERT(0);
-    return false;
-  }
-}
-
-
-// Insert a data rectangle into an index structure.
-// InsertRect provides for splitting the root;
-// returns 1 if root was split, 0 if it was not.
-// The level argument specifies the number of steps up from the leaf
-// level to insert; e.g. a data rectangle goes in at level = 0.
-// InsertRect2 does the recursion.
-//
-RTREE_TEMPLATE
-bool RTREE_QUAL::InsertRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level)
-{
-  ASSERT(a_rect && a_root);
-  ASSERT(a_level >= 0 && a_level <= (*a_root)->m_level);
-#ifdef _DEBUG
-  for(int index=0; index < NUMDIMS; ++index)
-  {
-    ASSERT(a_rect->m_min[index] <= a_rect->m_max[index]);
-  }
-#endif //_DEBUG
-
-  Node* newRoot;
-  Node* newNode;
-  Branch branch;
-
-  if(InsertRectRec(a_rect, a_id, *a_root, &newNode, a_level))  // Root split
-  {
-    newRoot = AllocNode();  // Grow tree taller and new root
-    newRoot->m_level = (*a_root)->m_level + 1;
-    branch.m_rect = NodeCover(*a_root);
-    branch.m_child = *a_root;
-    AddBranch(&branch, newRoot, NULL);
-    branch.m_rect = NodeCover(newNode);
-    branch.m_child = newNode;
-    AddBranch(&branch, newRoot, NULL);
-    *a_root = newRoot;
-    return true;
-  }
-
-  return false;
-}
-
-
-// Find the smallest rectangle that includes all rectangles in branches of a node.
-RTREE_TEMPLATE
-typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover(Node* a_node)
-{
-  ASSERT(a_node);
-
-  int firstTime = true;
-  Rect rect;
-  InitRect(&rect);
-
-  for(int index = 0; index < a_node->m_count; ++index)
-  {
-    if(firstTime)
-    {
-      rect = a_node->m_branch[index].m_rect;
-      firstTime = false;
-    }
-    else
-    {
-      rect = CombineRect(&rect, &(a_node->m_branch[index].m_rect));
-    }
-  }
-
-  return rect;
-}
-
-
-// Add a branch to a node.  Split the node if necessary.
-// Returns 0 if node not split.  Old node updated.
-// Returns 1 if node split, sets *new_node to address of new node.
-// Old node updated, becomes one of two.
-RTREE_TEMPLATE
-bool RTREE_QUAL::AddBranch(Branch* a_branch, Node* a_node, Node** a_newNode)
-{
-  ASSERT(a_branch);
-  ASSERT(a_node);
-
-  if(a_node->m_count < MAXNODES)  // Split won't be necessary
-  {
-    a_node->m_branch[a_node->m_count] = *a_branch;
-    ++a_node->m_count;
-
-    return false;
-  }
-  else
-  {
-    ASSERT(a_newNode);
-
-    SplitNode(a_node, a_branch, a_newNode);
-    return true;
-  }
-}
-
-
-// Disconnect a dependent node.
-// Caller must return (or stop using iteration index) after this as count has changed
-RTREE_TEMPLATE
-void RTREE_QUAL::DisconnectBranch(Node* a_node, int a_index)
-{
-  ASSERT(a_node && (a_index >= 0) && (a_index < MAXNODES));
-  ASSERT(a_node->m_count > 0);
-
-  // Remove element by swapping with the last element to prevent gaps in array
-  a_node->m_branch[a_index] = a_node->m_branch[a_node->m_count - 1];
-
-  --a_node->m_count;
-}
-
-
-// Pick a branch.  Pick the one that will need the smallest increase
-// in area to accomodate the new rectangle.  This will result in the
-// least total area for the covering rectangles in the current node.
-// In case of a tie, pick the one which was smaller before, to get
-// the best resolution when searching.
-RTREE_TEMPLATE
-int RTREE_QUAL::PickBranch(Rect* a_rect, Node* a_node)
-{
-  ASSERT(a_rect && a_node);
-
-  bool firstTime = true;
-  ELEMTYPEREAL increase;
-  ELEMTYPEREAL bestIncr = (ELEMTYPEREAL)-1;
-  ELEMTYPEREAL area;
-  ELEMTYPEREAL bestArea = (ELEMTYPEREAL)-1;
-  int best = -1;
-  Rect tempRect;
-
-  for(int index=0; index < a_node->m_count; ++index)
-  {
-    Rect* curRect = &a_node->m_branch[index].m_rect;
-    area = CalcRectVolume(curRect);
-    tempRect = CombineRect(a_rect, curRect);
-    increase = CalcRectVolume(&tempRect) - area;
-    if((increase < bestIncr) || firstTime)
-    {
-      best = index;
-      bestArea = area;
-      bestIncr = increase;
-      firstTime = false;
-    }
-    else if((increase == bestIncr) && (area < bestArea))
-    {
-      best = index;
-      bestArea = area;
-      bestIncr = increase;
-    }
-  }
-  return best;
-}
-
-
-// Combine two rectangles into larger one containing both
-RTREE_TEMPLATE
-typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB)
-{
-  ASSERT(a_rectA && a_rectB);
-
-  Rect newRect;
-
-  for(int index = 0; index < NUMDIMS; ++index)
-  {
-    newRect.m_min[index] = Min(a_rectA->m_min[index], a_rectB->m_min[index]);
-    newRect.m_max[index] = Max(a_rectA->m_max[index], a_rectB->m_max[index]);
-  }
-
-  return newRect;
-}
-
-
-
-// Split a node.
-// Divides the nodes branches and the extra one between two nodes.
-// Old node is one of the new ones, and one really new one is created.
-// Tries more than one method for choosing a partition, uses best result.
-RTREE_TEMPLATE
-void RTREE_QUAL::SplitNode(Node* a_node, Branch* a_branch, Node** a_newNode)
-{
-  ASSERT(a_node);
-  ASSERT(a_branch);
-
-  // Could just use local here, but member or external is faster since it is reused
-  PartitionVars localVars;
-  PartitionVars* parVars = &localVars;
-  int level;
-
-  // Load all the branches into a buffer, initialize old node
-  level = a_node->m_level;
-  GetBranches(a_node, a_branch, parVars);
-
-  // Find partition
-  ChoosePartition(parVars, MINNODES);
-
-  // Put branches from buffer into 2 nodes according to chosen partition
-  *a_newNode = AllocNode();
-  (*a_newNode)->m_level = a_node->m_level = level;
-  LoadNodes(a_node, *a_newNode, parVars);
-
-  ASSERT((a_node->m_count + (*a_newNode)->m_count) == parVars->m_total);
-}
-
-
-// Calculate the n-dimensional volume of a rectangle
-RTREE_TEMPLATE
-ELEMTYPEREAL RTREE_QUAL::RectVolume(Rect* a_rect)
-{
-  ASSERT(a_rect);
-
-  ELEMTYPEREAL volume = (ELEMTYPEREAL)1;
-
-  for(int index=0; index<NUMDIMS; ++index)
-  {
-    volume *= a_rect->m_max[index] - a_rect->m_min[index];
-  }
-
-  ASSERT(volume >= (ELEMTYPEREAL)0);
-
-  return volume;
-}
-
-
-// The exact volume of the bounding sphere for the given Rect
-RTREE_TEMPLATE
-ELEMTYPEREAL RTREE_QUAL::RectSphericalVolume(Rect* a_rect)
-{
-  ASSERT(a_rect);
-
-  ELEMTYPEREAL sumOfSquares = (ELEMTYPEREAL)0;
-  ELEMTYPEREAL radius;
-
-  for(int index=0; index < NUMDIMS; ++index)
-  {
-    ELEMTYPEREAL halfExtent = ((ELEMTYPEREAL)a_rect->m_max[index] - (ELEMTYPEREAL)a_rect->m_min[index]) * 0.5f;
-    sumOfSquares += halfExtent * halfExtent;
-  }
-
-  radius = (ELEMTYPEREAL)sqrt(sumOfSquares);
-
-  // Pow maybe slow, so test for common dims like 2,3 and just use x*x, x*x*x.
-  if(NUMDIMS == 3)
-  {
-    return (radius * radius * radius * m_unitSphereVolume);
-  }
-  else if(NUMDIMS == 2)
-  {
-    return (radius * radius * m_unitSphereVolume);
-  }
-  else
-  {
-    return (ELEMTYPEREAL)(pow(radius, NUMDIMS) * m_unitSphereVolume);
-  }
-}
-
-
-// Use one of the methods to calculate retangle volume
-RTREE_TEMPLATE
-ELEMTYPEREAL RTREE_QUAL::CalcRectVolume(Rect* a_rect)
-{
-#ifdef RTREE_USE_SPHERICAL_VOLUME
-  return RectSphericalVolume(a_rect); // Slower but helps certain merge cases
-#else // RTREE_USE_SPHERICAL_VOLUME
-  return RectVolume(a_rect); // Faster but can cause poor merges
-#endif // RTREE_USE_SPHERICAL_VOLUME
-}
-
-
-// Load branch buffer with branches from full node plus the extra branch.
-RTREE_TEMPLATE
-void RTREE_QUAL::GetBranches(Node* a_node, Branch* a_branch, PartitionVars* a_parVars)
-{
-  ASSERT(a_node);
-  ASSERT(a_branch);
-
-  ASSERT(a_node->m_count == MAXNODES);
-
-  // Load the branch buffer
-  for(int index=0; index < MAXNODES; ++index)
-  {
-    a_parVars->m_branchBuf[index] = a_node->m_branch[index];
-  }
-  a_parVars->m_branchBuf[MAXNODES] = *a_branch;
-  a_parVars->m_branchCount = MAXNODES + 1;
-
-  // Calculate rect containing all in the set
-  a_parVars->m_coverSplit = a_parVars->m_branchBuf[0].m_rect;
-  for(int index=1; index < MAXNODES+1; ++index)
-  {
-    a_parVars->m_coverSplit = CombineRect(&a_parVars->m_coverSplit, &a_parVars->m_branchBuf[index].m_rect);
-  }
-  a_parVars->m_coverSplitArea = CalcRectVolume(&a_parVars->m_coverSplit);
-
-  InitNode(a_node);
-}
-
-
-// Method #0 for choosing a partition:
-// As the seeds for the two groups, pick the two rects that would waste the
-// most area if covered by a single rectangle, i.e. evidently the worst pair
-// to have in the same group.
-// Of the remaining, one at a time is chosen to be put in one of the two groups.
-// The one chosen is the one with the greatest difference in area expansion
-// depending on which group - the rect most strongly attracted to one group
-// and repelled from the other.
-// If one group gets too full (more would force other group to violate min
-// fill requirement) then other group gets the rest.
-// These last are the ones that can go in either group most easily.
-RTREE_TEMPLATE
-void RTREE_QUAL::ChoosePartition(PartitionVars* a_parVars, int a_minFill)
-{
-  ASSERT(a_parVars);
-
-  ELEMTYPEREAL biggestDiff;
-  int group, chosen = -1, betterGroup = -1;
-
-  InitParVars(a_parVars, a_parVars->m_branchCount, a_minFill);
-  PickSeeds(a_parVars);
-
-  while (((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
-       && (a_parVars->m_count[0] < (a_parVars->m_total - a_parVars->m_minFill))
-       && (a_parVars->m_count[1] < (a_parVars->m_total - a_parVars->m_minFill)))
-  {
-    biggestDiff = (ELEMTYPEREAL) -1;
-    for(int index=0; index<a_parVars->m_total; ++index)
-    {
-      if(!a_parVars->m_taken[index])
-      {
-        Rect* curRect = &a_parVars->m_branchBuf[index].m_rect;
-        Rect rect0 = CombineRect(curRect, &a_parVars->m_cover[0]);
-        Rect rect1 = CombineRect(curRect, &a_parVars->m_cover[1]);
-        ELEMTYPEREAL growth0 = CalcRectVolume(&rect0) - a_parVars->m_area[0];
-        ELEMTYPEREAL growth1 = CalcRectVolume(&rect1) - a_parVars->m_area[1];
-        ELEMTYPEREAL diff = growth1 - growth0;
-        if(diff >= 0)
-        {
-          group = 0;
-        }
-        else
-        {
-          group = 1;
-          diff = -diff;
-        }
-
-        if(diff > biggestDiff)
-        {
-          biggestDiff = diff;
-          chosen = index;
-          betterGroup = group;
-        }
-        else if((diff == biggestDiff) && (a_parVars->m_count[group] < a_parVars->m_count[betterGroup]))
-        {
-          chosen = index;
-          betterGroup = group;
-        }
-      }
-    }
-    Classify(chosen, betterGroup, a_parVars);
-  }
-
-  // If one group too full, put remaining rects in the other
-  if((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
-  {
-    if(a_parVars->m_count[0] >= a_parVars->m_total - a_parVars->m_minFill)
-    {
-      group = 1;
-    }
-    else
-    {
-      group = 0;
-    }
-    for(int index=0; index<a_parVars->m_total; ++index)
-    {
-      if(!a_parVars->m_taken[index])
-      {
-        Classify(index, group, a_parVars);
-      }
-    }
-  }
-
-  ASSERT((a_parVars->m_count[0] + a_parVars->m_count[1]) == a_parVars->m_total);
-  ASSERT((a_parVars->m_count[0] >= a_parVars->m_minFill) &&
-        (a_parVars->m_count[1] >= a_parVars->m_minFill));
-}
-
-
-// Copy branches from the buffer into two nodes according to the partition.
-RTREE_TEMPLATE
-void RTREE_QUAL::LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars)
-{
-  ASSERT(a_nodeA);
-  ASSERT(a_nodeB);
-  ASSERT(a_parVars);
-
-  for(int index=0; index < a_parVars->m_total; ++index)
-  {
-    ASSERT(a_parVars->m_partition[index] == 0 || a_parVars->m_partition[index] == 1);
-
-    if(a_parVars->m_partition[index] == 0)
-    {
-      AddBranch(&a_parVars->m_branchBuf[index], a_nodeA, NULL);
-    }
-    else if(a_parVars->m_partition[index] == 1)
-    {
-      AddBranch(&a_parVars->m_branchBuf[index], a_nodeB, NULL);
-    }
-  }
-}
-
-
-// Initialize a PartitionVars structure.
-RTREE_TEMPLATE
-void RTREE_QUAL::InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill)
-{
-  ASSERT(a_parVars);
-
-  a_parVars->m_count[0] = a_parVars->m_count[1] = 0;
-  a_parVars->m_area[0] = a_parVars->m_area[1] = (ELEMTYPEREAL)0;
-  a_parVars->m_total = a_maxRects;
-  a_parVars->m_minFill = a_minFill;
-  for(int index=0; index < a_maxRects; ++index)
-  {
-    a_parVars->m_taken[index] = false;
-    a_parVars->m_partition[index] = -1;
-  }
-}
-
-
-RTREE_TEMPLATE
-void RTREE_QUAL::PickSeeds(PartitionVars* a_parVars)
-{
-  int seed0 = -1, seed1 = -1;
-  ELEMTYPEREAL worst, waste;
-  ELEMTYPEREAL area[MAXNODES+1];
-
-  for(int index=0; index<a_parVars->m_total; ++index)
-  {
-    area[index] = CalcRectVolume(&a_parVars->m_branchBuf[index].m_rect);
-  }
-
-  worst = -a_parVars->m_coverSplitArea - 1;
-  for(int indexA=0; indexA < a_parVars->m_total-1; ++indexA)
-  {
-    for(int indexB = indexA+1; indexB < a_parVars->m_total; ++indexB)
-    {
-      Rect oneRect = CombineRect(&a_parVars->m_branchBuf[indexA].m_rect, &a_parVars->m_branchBuf[indexB].m_rect);
-      waste = CalcRectVolume(&oneRect) - area[indexA] - area[indexB];
-      if(waste > worst)
-      {
-        worst = waste;
-        seed0 = indexA;
-        seed1 = indexB;
-      }
-    }
-  }
-  Classify(seed0, 0, a_parVars);
-  Classify(seed1, 1, a_parVars);
-}
-
-
-// Put a branch in one of the groups.
-RTREE_TEMPLATE
-void RTREE_QUAL::Classify(int a_index, int a_group, PartitionVars* a_parVars)
-{
-  ASSERT(a_parVars);
-  ASSERT(!a_parVars->m_taken[a_index]);
-
-  a_parVars->m_partition[a_index] = a_group;
-  a_parVars->m_taken[a_index] = true;
-
-  if (a_parVars->m_count[a_group] == 0)
-  {
-    a_parVars->m_cover[a_group] = a_parVars->m_branchBuf[a_index].m_rect;
-  }
-  else
-  {
-    a_parVars->m_cover[a_group] = CombineRect(&a_parVars->m_branchBuf[a_index].m_rect, &a_parVars->m_cover[a_group]);
-  }
-  a_parVars->m_area[a_group] = CalcRectVolume(&a_parVars->m_cover[a_group]);
-  ++a_parVars->m_count[a_group];
-}
-
-
-// Delete a data rectangle from an index structure.
-// Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node.
-// Returns 1 if record not found, 0 if success.
-// RemoveRect provides for eliminating the root.
-RTREE_TEMPLATE
-bool RTREE_QUAL::RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root)
-{
-  ASSERT(a_rect && a_root);
-  ASSERT(*a_root);
-
-  Node* tempNode;
-  ListNode* reInsertList = NULL;
-
-  if(!RemoveRectRec(a_rect, a_id, *a_root, &reInsertList))
-  {
-    // Found and deleted a data item
-    // Reinsert any branches from eliminated nodes
-    while(reInsertList)
-    {
-      tempNode = reInsertList->m_node;
-
-      for(int index = 0; index < tempNode->m_count; ++index)
-      {
-        InsertRect(&(tempNode->m_branch[index].m_rect),
-                   tempNode->m_branch[index].m_data,
-                   a_root,
-                   tempNode->m_level);
-      }
-
-      ListNode* remLNode = reInsertList;
-      reInsertList = reInsertList->m_next;
-
-      FreeNode(remLNode->m_node);
-      FreeListNode(remLNode);
-    }
-
-    // Check for redundant root (not leaf, 1 child) and eliminate
-    if((*a_root)->m_count == 1 && (*a_root)->IsInternalNode())
-    {
-      tempNode = (*a_root)->m_branch[0].m_child;
-
-      ASSERT(tempNode);
-      FreeNode(*a_root);
-      *a_root = tempNode;
-    }
-    return false;
-  }
-  else
-  {
-    return true;
-  }
-}
-
-
-// Delete a rectangle from non-root part of an index structure.
-// Called by RemoveRect.  Descends tree recursively,
-// merges branches on the way back up.
-// Returns 1 if record not found, 0 if success.
-RTREE_TEMPLATE
-bool RTREE_QUAL::RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode)
-{
-  ASSERT(a_rect && a_node && a_listNode);
-  ASSERT(a_node->m_level >= 0);
-
-  if(a_node->IsInternalNode())  // not a leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      if(Overlap(a_rect, &(a_node->m_branch[index].m_rect)))
-      {
-        if(!RemoveRectRec(a_rect, a_id, a_node->m_branch[index].m_child, a_listNode))
-        {
-          if(a_node->m_branch[index].m_child->m_count >= MINNODES)
-          {
-            // child removed, just resize parent rect
-            a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
-          }
-          else
-          {
-            // child removed, not enough entries in node, eliminate node
-            ReInsert(a_node->m_branch[index].m_child, a_listNode);
-            DisconnectBranch(a_node, index); // Must return after this call as count has changed
-          }
-          return false;
-        }
-      }
-    }
-    return true;
-  }
-  else // A leaf node
-  {
-    for(int index = 0; index < a_node->m_count; ++index)
-    {
-      if(a_node->m_branch[index].m_child == (Node*)a_id)
-      {
-        DisconnectBranch(a_node, index); // Must return after this call as count has changed
-        return false;
-      }
-    }
-    return true;
-  }
-}
-
-
-// Decide whether two rectangles overlap.
-RTREE_TEMPLATE
-bool RTREE_QUAL::Overlap(Rect* a_rectA, Rect* a_rectB)
-{
-  ASSERT(a_rectA && a_rectB);
-
-  for(int index=0; index < NUMDIMS; ++index)
-  {
-    if (a_rectA->m_min[index] > a_rectB->m_max[index] ||
-        a_rectB->m_min[index] > a_rectA->m_max[index])
-    {
-      return false;
-    }
-  }
-  return true;
-}
-
-
-// Add a node to the reinsertion list.  All its branches will later
-// be reinserted into the index structure.
-RTREE_TEMPLATE
-void RTREE_QUAL::ReInsert(Node* a_node, ListNode** a_listNode)
-{
-  ListNode* newListNode;
-
-  newListNode = AllocListNode();
-  newListNode->m_node = a_node;
-  newListNode->m_next = *a_listNode;
-  *a_listNode = newListNode;
-}
-
-
-// Search in an index tree or subtree for all data retangles that overlap the argument rectangle.
-RTREE_TEMPLATE
-bool RTREE_QUAL::Search(Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context)
-{
-  ASSERT(a_node);
-  ASSERT(a_node->m_level >= 0);
-  ASSERT(a_rect);
-
-  if(a_node->IsInternalNode()) // This is an internal node in the tree
-  {
-    for(int index=0; index < a_node->m_count; ++index)
-    {
-      if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
-      {
-        if(!Search(a_node->m_branch[index].m_child, a_rect, a_foundCount, a_resultCallback, a_context))
-        {
-          return false; // Don't continue searching
-        }
-      }
-    }
-  }
-  else // This is a leaf node
-  {
-    for(int index=0; index < a_node->m_count; ++index)
-    {
-      if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
-      {
-        DATATYPE& id = a_node->m_branch[index].m_data;
-
-        // NOTE: There are different ways to return results.  Here's where to modify
-        //if(&a_resultCallback)
-        {
-          ++a_foundCount;
-          if(!a_resultCallback(id, a_context))
-          {
-            return false; // Don't continue searching
-          }
-        }
-      }
-    }
-  }
-
-  return true; // Continue searching
-}
-
-
-#undef RTREE_TEMPLATE
-#undef RTREE_QUAL
-
-#endif //RTREE_H
diff --git a/contrib/voro++/src/cell.hh b/contrib/voro++/src/cell.hh
index a920b88..912c89d 100644
--- a/contrib/voro++/src/cell.hh
+++ b/contrib/voro++/src/cell.hh
@@ -420,7 +420,7 @@ class voronoicell_neighbor : public voronoicell_base {
 		 * face that is clockwise from the jth edge. */
 		int **ne;
 		voronoicell_neighbor();
-		~voronoicell_neighbor();
+		virtual ~voronoicell_neighbor();
 		void operator=(voronoicell &c);
 		void operator=(voronoicell_neighbor &c);
 		/** Cuts the Voronoi cell by a particle whose center is at a
diff --git a/doc/CREDITS.txt b/doc/CREDITS.txt
index 24bc6a5..70ad210 100644
--- a/doc/CREDITS.txt
+++ b/doc/CREDITS.txt
@@ -1,4 +1,4 @@
-                 Gmsh is copyright (C) 1997-2014
+                 Gmsh is copyright (C) 1997-2015
 
                        Christophe Geuzaine
                      <cgeuzaine at ulg.ac.be>
@@ -130,4 +130,5 @@ Van den Abeele, Simon Vun, Simon Corbin, Thomas De-Soza, Marcus Drosson, Antoine
 Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel
 Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios,
 Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain, Jose Paulo Moitinho de
-Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu.
+Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu, Nigel
+Nunn, Serban Georgescu.
diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt
index 07c88d2..c529a8c 100644
--- a/doc/VERSIONS.txt
+++ b/doc/VERSIONS.txt
@@ -1,3 +1,21 @@
+2.9.3 (April 18, 2015): updated versions of PETSc/SLEPc and OpenCASCADE/OCE
+libraries used in official binary builds; new Find() command; miscellaneous code
+cleanups and small fixes.
+
+2.9.2 (March 31, 2015): added support for extrusion of embedded points/curves;
+improved hex-dominant algorithm; fixed crashes in quad algorithm; fix regression
+in MED reader introduced in 2.9.0; new dark interface mode.
+
+2.9.1 (March 18, 2015): minor bug fixes.
+
+2.9.0 (March 12, 2015): improved robustness of spatial searches (extruded meshes,
+geometry coherence); improved reproductibility of 2D and 3D meshes; added
+support for high resolution ("retina") graphics; interactive graph point
+commands; on-the-fly creation of onelab clients in scripts; general periodic
+meshes using afine transforms; scripted selection of entities in bounding boxes;
+extended string and list handling functions; many small improvements and bug
+fixes.
+
 2.8.5 (Jul 9, 2014): improved stability and error handling, better Coherence
 function, updated onelab API version and inline parameter definitions, new
 background image modes, more robust Triangulate/Tetrahedralize plugins, new PGF
diff --git a/doc/gmsh.html b/doc/gmsh.html
index 871f9ff..74f9887 100644
--- a/doc/gmsh.html
+++ b/doc/gmsh.html
@@ -29,7 +29,7 @@ generator with built-in pre- and post-processing facilities</h1>
 
 <h4 align="center">Christophe Geuzaine and Jean-Fran�ois Remacle</h4>
 
-<h4 align="center">Version 2.8.5, July 9 2014</h4>
+<h4 align="center">Version 2.9.3, April 18 2015</h4>
 
 <center>
   <a href="#Description">Description</a> |
@@ -68,34 +68,32 @@ the <a href="doc/LICENSE.txt">GNU General Public License
 <ul>
   <li>
     <p class="highlight">
-      <strong>Current stable release</strong>: Windows
-      <a href="bin/Windows/gmsh-2.8.5-Windows.zip"><strong>32 bit</strong></a> /
-      <a href="bin/Windows/gmsh-2.8.5-Windows64.zip"><strong>64 bit</strong></a>,
+      <strong>Download current stable release</strong>: Windows
+      <a href="bin/Windows/gmsh-2.9.3-Windows32.zip"><strong>32 bit</strong></a> /
+      <a href="bin/Windows/gmsh-2.9.3-Windows64.zip"><strong>64 bit</strong></a>,
       Linux
-      <a href="bin/Linux/gmsh-2.8.5-Linux.tgz"><strong>32 bit</strong></a> /
-      <a href="bin/Linux/gmsh-2.8.5-Linux64.tgz"><strong>64 bit</strong></a>,
-      <a href="bin/MacOSX/gmsh-2.8.5-MacOSX.dmg"><strong>Mac OS X</strong></a>
+      <a href="bin/Linux/gmsh-2.9.3-Linux32.tgz"><strong>32 bit</strong></a> /
+      <a href="bin/Linux/gmsh-2.9.3-Linux64.tgz"><strong>64 bit</strong></a>,
+      <a href="bin/MacOSX/gmsh-2.9.3-MacOSX.dmg"><strong>Mac OS X</strong></a>
       and
-      <a href="src/gmsh-2.8.5-source.tgz"><strong>source code</strong></a>
+      <a href="src/gmsh-2.9.3-source.tgz"><strong>source code</strong></a>
     </p>
     <p>
       <em>A <a href="doc/texinfo/gmsh.html#Tutorial"><strong>tutorial</strong></a>
         introducing all key features and concepts is included in all the
         versions in the <code>tutorial</code> directory. <br>Make sure to read
         these examples before sending questions or bug reports!</em>
-  <li>Development version:
-    <ul><li>automated nightly builds
+  <li>Download development version:
+    <ul><li>automated nightly snapshots
         (<a href="http://onelab.info/CDash/index.php?project=Gmsh">dashboard</a>):
         Windows 
-        <a href="bin/Windows/gmsh-svn-Windows.zip">32 bit</a> /
+        <a href="bin/Windows/gmsh-svn-Windows32.zip">32 bit</a> /
         <a href="bin/Windows/gmsh-svn-Windows64.zip">64 bit</a>,
         Linux
-        <a href="bin/Linux/gmsh-svn-Linux.tgz">32 bit</a> /
-        <a href="bin/Linux/gmsh-svn-Linux64.tgz">64 bit</a>
-        and
-        <a href="bin/MacOSX/gmsh-svn-MacOSX.dmg">Mac OS X</a>
-      <li>nightly <a href="src/gmsh-svn-source.tgz">source
-          snapshot</a>
+        <a href="bin/Linux/gmsh-svn-Linux32.tgz">32 bit</a> /
+        <a href="bin/Linux/gmsh-svn-Linux64.tgz">64 bit</a>,
+        <a href="bin/MacOSX/gmsh-svn-MacOSX.dmg">Mac OS X</a> and
+        <a href="src/gmsh-svn-source.tgz">source code</a>
       <li>read-only svn access: '<code>svn co 
           <a href="https://geuz.org/svn/gmsh/trunk">https://geuz.org/svn/gmsh/trunk</a>
           gmsh</code>' (username: gmsh, password: gmsh)
@@ -114,7 +112,7 @@ algorithms</a>.
 
 <h2><a name="Authors"></a>Authors and credits</h2>
 
-Gmsh is developed by <a href="http://www.montefiore.ulg.ac.be/~geuzaine">Christophe
+Gmsh was created by <a href="http://www.montefiore.ulg.ac.be/~geuzaine">Christophe
 Geuzaine</a> and <a href="http://perso.uclouvain.be/jean-francois.remacle">Jean-Fran�ois
 Remacle</a>. The <a href="doc/CREDITS.txt">CREDITS</a> file has
 more information.
@@ -188,7 +186,8 @@ information.
 <h2><a name="Screenshots"></a>Screenshots</h2>
 
 <a href="gallery/screenshot.png"><img src="gallery/thumbnail.png"
-alt="Screenshot thumbnail"></a>
+alt="Screenshot thumbnail"></a> <a href="gallery/screenshot2.png"><img 
+src="gallery/thumbnail2.png" alt="Screenshot thumbnail"></a>
 
 <ul>
 <li>Sample STEP/BREP models:
diff --git a/doc/texinfo/cmake_options.texi b/doc/texinfo/cmake_options.texi
index 745c620..c057a66 100644
--- a/doc/texinfo/cmake_options.texi
+++ b/doc/texinfo/cmake_options.texi
@@ -29,6 +29,8 @@ Enable CGNS mesh export (experimental) (default: OFF)
 Enable Cairo to render fonts (experimental) (default: ON)
 @item ENABLE_CHACO
 Enable Chaco mesh partitioner (alternative to Metis) (default: ON)
+ at item ENABLE_COMPRESSED_IO
+Enable compressed (gzip) input/output using zlib (default: OFF)
 @item ENABLE_DINTEGRATION
 Enable discrete integration (needed for levelsets) (default: ON)
 @item ENABLE_FLTK
@@ -57,16 +59,24 @@ Enable built-in MPEG movie encoder (default: ON)
 Enable MPI (mostly for parser and solver - mesh generation is sequential) (default: OFF)
 @item ENABLE_MSVC_STATIC_RUNTIME
 Enable static Visual C++ runtime (default: OFF)
+ at item ENABLE_MUMPS
+Enable MUMPS sparse direct linear solver (default: OFF)
 @item ENABLE_NATIVE_FILE_CHOOSER
 Enable native file chooser in GUI (default: ON)
 @item ENABLE_NETGEN
 Enable Netgen 3D frontal mesh generator (default: ON)
+ at item ENABLE_NUMPY
+Enable conversion between fullMatrix and numpy array (requires SWIG) (default: OFF)
+ at item ENABLE_PETSC4PY
+Enable petsc4py wrappers for petsc matrices (default: ON)
 @item ENABLE_OCC
 Enable Open CASCADE geometrical models (default: ON)
 @item ENABLE_ONELAB
-Enable OneLab solver interface (default: ON)
+Enable ONELAB solver interface (default: ON)
+ at item ENABLE_ONELAB2
+Enable experimental ONELAB-Cloud solver interface (default: OFF)
 @item ENABLE_ONELAB_METAMODEL
-Enable OneLab metamodels (experimental) (default: ON)
+Enable ONELAB metamodels (experimental) (default: ON)
 @item ENABLE_OPENMP
 Enable OpenMP (experimental) (default: OFF)
 @item ENABLE_OPTHOM
@@ -99,6 +109,8 @@ Enable SLEPc eigensolvers (required for conformal compounds) (default: ON)
 Enable built-in finite element solvers (required for compounds) (default: ON)
 @item ENABLE_TAUCS
 Enable Taucs linear solver (alternative to PETSc) (default: ON)
+ at item ENABLE_TCMALLOC
+Enable libtcmalloc, a fast malloc implementation but that does not release memory (default: OFF)
 @item ENABLE_TETGEN
 Enable Tetgen 3D initial mesh generator (default: ON)
 @item ENABLE_TETGEN_OLD
diff --git a/doc/texinfo/commandline.texi b/doc/texinfo/commandline.texi
index bc9b014..77e6d25 100644
--- a/doc/texinfo/commandline.texi
+++ b/doc/texinfo/commandline.texi
@@ -82,6 +82,15 @@ Select link mode between views (0, 1, 2, 3, 4)
 @item -combine
 Combine views having identical names into multi-time-step views
 @end ftable
+ Solver options:
+ at ftable @code
+ at item -listen
+Always listen to incoming connection requests
+ at item -minterpreter string
+Name of Octave interpreter
+ at item -pyinterpreter string
+Name of Python interpreter
+ at end ftable
  Display options:
 @ftable @code
 @item -n
@@ -117,8 +126,6 @@ Open next files
 Start in automatic, geometry, mesh, solver or post-processing mode
 @item -pid
 Print process id on stdout
- at item -listen
-Always listen to incoming connection requests
 @item -watch pattern
 Pattern of files to merge as they become available
 @item -bg file
diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi
index a16b3e8..41d8589 100644
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@ -1,5 +1,5 @@
 \input texinfo.tex @c -*-texinfo-*-
- at c Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+ at c Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 @c
 @c See the LICENSE.txt file for license information. Please report all
 @c bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -21,8 +21,8 @@
 @c =========================================================================
 @c %**start of header
 @setfilename gmsh.info
- at set GMSH-VERSION 2.8
- at set COPYRIGHT @copyright{} 1997-2014 Christophe Geuzaine, Jean-Fran@,{c}ois Remacle
+ at set GMSH-VERSION 2.9
+ at set COPYRIGHT @copyright{} 1997-2015 Christophe Geuzaine, Jean-Fran@,{c}ois Remacle
 @settitle Gmsh @value{GMSH-VERSION}
 @footnotestyle separate
 @setchapternewpage odd
@@ -453,7 +453,8 @@ computations and process the results directly from within Gmsh's
 post-processing module. The default solver interfaced with Gmsh is GetDP
 (@uref{http://geuz.org/getdp/}). Examples on how to interface other
 solvers are available in the source distribution (in the
- at file{utils/solvers/} directory).
+ at url{https://geuz.org/svn/gmsh/trunk/utils/solvers/,utils/solvers}
+ at footnote{Login and password: @code{gmsh}.} directory).
 
 @c -------------------------------------------------------------------------
 @c Post-processing: scalar, vector and tensor field visualization
@@ -592,13 +593,14 @@ developers}) to remedy the aforementioned (and all other) shortcomings!
 @cindex E-mail, authors
 
 If you think you have found a bug in Gmsh, you can report it by email to
-the public Gmsh mailing list at @email{gmsh@@geuz.org}, or file it directly
-into our bug tracking database at @url{https://geuz.org/trac/gmsh/report} 
-(login: gmsh, password: gmsh). Please send as precise a description of
-the problem as you can, including sample input files that produce the
-bug. Don't forget to mention both the version of Gmsh and the version of
-your operation system (@pxref{Command-line options} to see how to get
-this information).
+the public Gmsh mailing list at @email{gmsh@@geuz.org}, or file it
+directly into our bug tracking database at
+ at url{https://geuz.org/trac/gmsh/report}@footnote{Login and password:
+ at code{gmsh}.}. Please send as precise a description of the problem as
+you can, including sample input files that produce the bug. Don't forget
+to mention both the version of Gmsh and the version of your operation
+system (@pxref{Command-line options} to see how to get this
+information).
 
 See @ref{Frequently asked questions}, and the bug tracking system to see
 which problems we already know about.
@@ -655,9 +657,12 @@ Application Programming Interface (API). No complete documentation of
 this API is available yet; a good starting point is @ref{Source code
 structure}, which gives a short introduction to Gmsh's internal source
 code structure. Then have a look e.g. at the examples in the
- at file{utils/api_demos/} directory in the source code.  To build the
+ at url{https://geuz.org/svn/gmsh/trunk/utils/api_demos/,utils/api_demos}@footnote{Login
+and password: @code{gmsh}.} directory in the source code.  To build the
 library see the instructions in @ref{Compiling the source code} and in
-the top-level @file{README.txt} file in the source distribution.
+the top-level
+ at url{https://geuz.org/svn/gmsh/trunk/README.txt,README.txt} file in the
+source distribution.
 
 @c -------------------------------------------------------------------------
 @c Syntactic rules used in the manual
@@ -737,8 +742,10 @@ on the right, and a status bar at the bottom. (You can detach the tree
 menu using `Window->Attach/Detach Menu'.)
 
 To open the first tutorial file (@pxref{Tutorial}), select the
-`File->Open' menu, and choose @file{t1.geo}. When using a terminal, you
-can specify the file name directly on the command line, i.e.:
+`File->Open' menu, and choose
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial/t1.geo,t1.geo}@footnote{Login
+and password: @code{gmsh}.}. When using a terminal, you can specify the
+file name directly on the command line, i.e.:
 
 @example
 > gmsh t1.geo
@@ -773,9 +780,12 @@ Several files can be loaded simultaneously in Gmsh. When specified on
 the command line, the first one defines the active model and the others
 are `merged' into this model. You can merge such files with the
 `File->Merge' menu. For example, to merge the post-processing views
-contained in the files @file{view1.pos} and @file{view5.msh} together
-with the geometry of the first tutorial @file{t1.geo}, you can type the
-following command:
+contained in the files
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial/view1.pos,view1.pos}@footnote{Login
+and password: @code{gmsh}.} and
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial/view5.msh,view5.msh}
+together with the geometry of the first tutorial @ref{t1.geo}, you can
+type the following command:
 
 @example
 > gmsh t1.geo view1.pos view5.msh
@@ -824,8 +834,10 @@ to mesh the first tutorial in batch mode, just type:
 > gmsh t1.geo -2
 @end example
 
-To mesh the same example, but with the background mesh available in the file
- at file{bgmesh.pos}, type:
+To mesh the same example, but with the background mesh available in the
+file
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial/bgmesh.pos,bgmesh.pos}@footnote{Login
+and password: @code{gmsh}.}, type:
 
 @example
 > gmsh t1.geo -2 -bgm bgmesh.pos
@@ -979,6 +991,7 @@ parsing of the script file:
   @var{expression} @var{operator-ternary-left} @var{expression} @var{operator-ternary-right} @var{expression} |
   @var{built-in-function} |
   @var{real-option} |
+  Find(@var{expression-list-item}, @var{expression-list-item}) |
   StrFind(@var{char-expression}, @var{char-expression}) |
   StrCmp(@var{char-expression}, @var{char-expression}) |
   TextAttributes(@var{char-expression}<, at var{char-expression}@dots{}>) |
@@ -1014,14 +1027,16 @@ The brackets @code{[]} permit to extract one item from a list. The
 @var{operator-ternary-right} are defined in @ref{Operators}. For the
 definition of @w{@var{built-in-function}s}, see @ref{Built-in
 functions}. The various @w{@var{real-option}s} are listed in
- at ref{Options}. @code{StrFind} searches the first @var{char-expression}
-for any occurrence of the second @var{char-expression}. @code{StrCmp}
-compares the two strings (returns an integer greater than, equal to, or
-less than 0, according as the first string is greater than, equal to, or
-less than the second string).  @code{TextAttributes} creates attributes
-for text strings. @code{Exists} checks if a variable with the given name
-exists (i.e., has been defined previously), and @code{FileExists} checks
-if the file with the given name exists.
+ at ref{Options}.  @code{Find} searches for occurrences of the first
+expression in the second (both of which can be lists).  @code{StrFind}
+searches the first @var{char-expression} for any occurrence of the
+second @var{char-expression}. @code{StrCmp} compares the two strings
+(returns an integer greater than, equal to, or less than 0, according as
+the first string is greater than, equal to, or less than the second
+string).  @code{TextAttributes} creates attributes for text
+strings. @code{Exists} checks if a variable with the given name exists
+(i.e., has been defined previously), and @code{FileExists} checks if the
+file with the given name exists.
 
 @code{DefineNumber} allows to define a ONELAB variable in-line. The
 @var{expression} given as the first argument is the default value; this
@@ -1061,7 +1076,8 @@ List of expressions are also widely used, and are defined as:
   @var{transform} |
   @var{extrude}
   Point @{ @var{expression} @} |
-  Point|Line|Surface|Volume "*" |
+  <Physical> Point|Line|Surface|Volume "*" |
+  Point|Line|Surface|Volume In BoundingBox @{ @var{expression-list} @} |
   Physical Point|Line|Surface|Volume @{ @var{expression-list} @}
 @c  @var{duplicata} - already implemented: should we explain this?
 @end example
@@ -1109,8 +1125,9 @@ Character expressions are defined as:
   Today | OnelabAction |
   StrPrefix ( @var{char-expression} ) |
   StrRelative ( @var{char-expression} ) |
-  StrCat ( @var{char-expression} , @var{char-expression} ) |
-  Str ( @var{char-expression} , @dots{} ) |
+  StrCat ( @var{char-expression} <, at dots{}> ) |
+  Str ( @var{char-expression} <, at dots{}> ) |
+  StrChoice ( @var{expression}, @var{char-expression}, @var{char-expression}) |
   Sprintf ( @var{char-expression} , @var{expression-list} ) |
   Sprintf ( @var{char-expression} ) |
   Sprintf ( @var{char-option} ) |
@@ -1168,11 +1185,13 @@ Colors expressions are hybrids between fixed-length braced
 
 @noindent The first case permits to use the X Windows names to refer to colors,
 e.g., @code{Red}, @code{SpringGreen}, @code{LavenderBlush3}, @dots{}
-(see @file{Common/Colors.h} in the source code for a complete list). The
-second case permits to define colors by using three expressions to
-specify their red, green and blue components (with values comprised
-between 0 and 255). The third case permits to define colors by using
-their red, green and blue color components as well as their alpha
+(see
+ at url{https://geuz.org/svn/gmsh/trunk/Common/Colors.h,Common/Colors.h}@footnote{Login
+and password: @code{gmsh}.} in the source code for a complete
+list). The second case permits to define colors by using three
+expressions to specify their red, green and blue components (with values
+comprised between 0 and 255). The third case permits to define colors by
+using their red, green and blue color components as well as their alpha
 channel. The last case permits to use the value of a @var{color-option}
 as a @var{color-expression}. The various @w{@var{color-option}s} are
 listed in @ref{Options}.
@@ -1905,13 +1924,14 @@ mesh element size at that point. See @ref{Specifying mesh element
 sizes}, for more information about how this value is used in the meshing
 process.
 
- at item Physical Point ( @var{expression} | @var{char-expression} ) = @{ @var{expression-list} @};
+ at item Physical Point ( @var{expression} | @var{char-expression} ) <+>= @{ @var{expression-list} @};
 Creates a physical point. The @var{expression} inside the parentheses is
 the physical point's identification number (if a @var{char-expression}
 is given instead, a unique identification number is automatically
 created); the @var{expression-list} on the right hand side should
 contain the identification numbers of all the elementary points that
 need to be grouped inside the physical point.
+
 @end ftable
 
 @c .........................................................................
@@ -2006,7 +2026,7 @@ number of the elementary lines that should be reparametrized as a single
 line. See @code{Compound Surface} for additional information on compound
 entities.
 
- at item Physical Line ( @var{expression} | @var{char-expression} ) = @{ @var{expression-list} @};
+ at item Physical Line ( @var{expression} | @var{char-expression} ) <+>= @{ @var{expression-list} @};
 Creates a physical line. The @var{expression} inside the parentheses is
 the physical line's identification number (if a @var{char-expression} is
 given instead, a unique identification number is automatically
@@ -2016,6 +2036,7 @@ to be grouped inside the physical line. Specifying negative
 identification numbers in the @var{expression-list} will reverse the
 orientation of the mesh elements belonging to the corresponding
 elementary lines in the saved mesh.
+
 @end ftable
 
 @c .........................................................................
@@ -2077,7 +2098,7 @@ surface's identification number; the mandatory @var{expression-list} on
 the right hand side contains the identification number of the elementary
 surfaces that should be reparametrized as a single surface.
 
- at item Physical Surface ( @var{expression} | @var{char-expression} ) = @{ @var{expression-list} @};
+ at item Physical Surface ( @var{expression} | @var{char-expression} ) <+>= @{ @var{expression-list} @};
 Creates a physical surface. The @var{expression} inside the parentheses
 is the physical surface's identification number (if a
 @var{char-expression} is given instead, a unique identification number
@@ -2087,6 +2108,7 @@ surfaces that need to be grouped inside the physical surface. Specifying
 negative identification numbers in the @var{expression-list} will
 reverse the orientation of the mesh elements belonging to the
 corresponding elementary surfaces in the saved mesh.
+
 @end ftable
 
 @c .........................................................................
@@ -2125,13 +2147,14 @@ number of the elementary volumes that should be reparametrized as a
 single volume. See @code{Compound Surface} for additional information on
 compound entities.
 
- at item Physical Volume ( @var{expression} | @var{char-expression} ) = @{ @var{expression-list} @};
+ at item Physical Volume ( @var{expression} | @var{char-expression} ) <+>= @{ @var{expression-list} @};
 Creates a physical volume. The @var{expression} inside the parentheses
 is the physical volume's identification number (if a
 @var{char-expression} is given instead, a unique identification number
 is automatically created); the @var{expression-list} on the right hand
 side should contain the identification numbers of all the elementary
 volumes that need to be grouped inside the physical volume.
+
 @end ftable
 
 @c .........................................................................
@@ -2849,10 +2872,12 @@ the mesh of the surface.
 Force mesh of lines on the left-hand side (slaves) to match the mesh of
 the lines on the right-hand side (masters).
 
- at item Periodic Surface @var{expression} @{ @var{expression-list} @} = @var{expression} @{ @var{expression-list} @};
+ at item Periodic Surface @var{expression} @{ @var{expression-list} @} = @var{expression} @{ @var{expression-list} @} < Using  @{ @var{expression-list} @} >;
 Force mesh of the surface on the left-hand side (slave, with boundary
 edges specified between braces) to match the mesh of the surface on the
-right-hand side (master, with boundary edges specified between braces).
+right-hand side (master, with boundary edges specified between braces). The
+optional @code{Using} list specifies an explicit affine transform (as a 4 x 4
+matrix given by row).
 
 @item Coherence Mesh;
 Removes all duplicate mesh vertices.
@@ -2953,10 +2978,12 @@ solver module, you need to specify its name (@code{Solver.Name0},
 @ref{Solver options list}).
 
 The client-server API for the solver interface is defined in the
- at file{onelab.h} header. See @file{utils/solvers/c++/solver.cpp} for a
-simple example on how to use the ONELAB programming interface. See the
-sources of GetDP (@url{http://geuz.org/getdp} for a more comprehensive
-example.
+ at url{https://geuz.org/svn/gmsh/trunk/Common/onelab.h,onelab.h}@footnote{Login
+and password: @code{gmsh}.} header. See
+ at url{https://geuz.org/svn/gmsh/trunk/utils/solvers/c++/solver.cpp,utils/solvers/c++/solver.cpp}
+for a simple example on how to use the ONELAB programming interface. See
+the sources of GetDP (@url{http://geuz.org/getdp} for a more
+comprehensive example.
 
 @menu
 * Solver options::              
@@ -3044,10 +3071,12 @@ labels, etc.). Note that 2D plots can be positioned explicitly inside the
 graphical window, or be automatically positioned in order to avoid overlaps.
 
 Sample post-processing files in human-readable ``parsed'' format and in
-the native MSH file format are available in the @file{tutorial}
-directory of Gmsh's distribution (@file{.pos} and @file{.msh}
-files). The ``parsed'' format is defined in the next section (cf. the
- at code{View} command); the MSH format is defined in @ref{File formats}.
+the native MSH file format are available in the
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial,tutorial}@footnote{Login
+and password: @code{gmsh}.} directory of Gmsh's distribution
+(@file{.pos} and @file{.msh} files). The ``parsed'' format is defined in
+the next section (cf. the @code{View} command); the MSH format is
+defined in @ref{File formats}.
 
 @menu
 * Post-processing commands::    
@@ -3440,6 +3469,11 @@ The format is defined as follows:
 $MeshFormat
 @var{version-number} @var{file-type} @var{data-size}
 $EndMeshFormat
+$PhysicalNames
+ at var{number-of-names}
+ at var{physical-dimension} @var{physical-number} "@var{physical-name}"
+ at dots{}
+$EndPhysicalNames
 $Nodes
 @var{number-of-nodes}
 @var{node-number} @var{x-coord} @var{y-coord} @var{z-coord}
@@ -3457,11 +3491,6 @@ $Periodic
 @var{slave-node-number master-node-number}
 @dots{}
 $EndPeriodic
-$PhysicalNames
- at var{number-of-names}
- at var{physical-dimension} @var{physical-number} "@var{physical-name}"
- at dots{}
-$EndPhysicalNames
 $NodeData
 @var{number-of-string-tags}
 < "@var{string-tag}" >
@@ -4421,8 +4450,10 @@ the same for all other kinds of values.
 @cindex Tutorial
 
 The following examples introduce new features gradually, starting with
- at file{t1.geo}. The files corresponding to these examples are available
-in the @file{tutorial} directory of the Gmsh distribution.
+ at ref{t1.geo}. The files corresponding to these examples are available in
+the
+ at url{https://geuz.org/svn/gmsh/trunk/tutorial,tutorial}@footnote{Login
+and password: @code{gmsh}.} directory of the Gmsh distribution.
 
 To learn how to run Gmsh on your computer, see @ref{Running Gmsh on your
 system}. Screencasts that show how to use the GUI are available on
@@ -4451,7 +4482,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t1.geo, t2.geo, Tutorial, Tutorial
- at section @file{t1.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t1.geo,t1.geo}
 
 @verbatiminclude ../../tutorial/t1.geo
 
@@ -4460,7 +4491,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t2.geo, t3.geo, t1.geo, Tutorial
- at section @file{t2.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t2.geo,t2.geo}
 
 @verbatiminclude ../../tutorial/t2.geo
 
@@ -4469,7 +4500,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t3.geo, t4.geo, t2.geo, Tutorial
- at section @file{t3.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t3.geo,t3.geo}
 
 @verbatiminclude ../../tutorial/t3.geo
 
@@ -4478,7 +4509,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t4.geo, t5.geo, t3.geo, Tutorial
- at section @file{t4.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t4.geo,t4.geo}
 
 @verbatiminclude ../../tutorial/t4.geo
 
@@ -4487,7 +4518,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t5.geo, t6.geo, t4.geo, Tutorial
- at section @file{t5.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t5.geo,t5.geo}
 
 @verbatiminclude ../../tutorial/t5.geo
 
@@ -4496,7 +4527,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t6.geo, t7.geo, t5.geo, Tutorial
- at section @file{t6.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t6.geo,t6.geo}
 
 @verbatiminclude ../../tutorial/t6.geo
 
@@ -4505,7 +4536,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t7.geo, t8.geo, t6.geo, Tutorial
- at section @file{t7.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t7.geo,t7.geo}
 
 @verbatiminclude ../../tutorial/t7.geo
 
@@ -4514,7 +4545,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t8.geo, t9.geo, t7.geo, Tutorial
- at section @file{t8.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t8.geo,t8.geo}
 
 @verbatiminclude ../../tutorial/t8.geo
 
@@ -4523,7 +4554,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t9.geo, t10.geo, t8.geo, Tutorial
- at section @file{t9.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t9.geo,t9.geo}
 
 @verbatiminclude ../../tutorial/t9.geo
 
@@ -4532,7 +4563,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t10.geo, t11.geo, t9.geo, Tutorial
- at section @file{t10.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t10.geo,t10.geo}
 
 @verbatiminclude ../../tutorial/t10.geo
 
@@ -4541,7 +4572,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t11.geo, t12.geo, t10.geo, Tutorial
- at section @file{t11.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t11.geo,t11.geo}
 
 @verbatiminclude ../../tutorial/t11.geo
 
@@ -4550,7 +4581,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t12.geo, t13.geo, t11.geo, Tutorial
- at section @file{t12.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t12.geo,t12.geo}
 
 @verbatiminclude ../../tutorial/t12.geo
 
@@ -4559,7 +4590,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t13.geo, t14.geo, t12.geo, Tutorial
- at section @file{t13.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t13.geo,t13.geo}
 
 @verbatiminclude ../../tutorial/t13.geo
 
@@ -4568,7 +4599,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t14.geo, t15.geo, t13.geo, Tutorial
- at section @file{t14.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t14.geo,t14.geo}
 
 @verbatiminclude ../../tutorial/t14.geo
 
@@ -4577,7 +4608,7 @@ system}. Screencasts that show how to use the GUI are available on
 @c -------------------------------------------------------------------------
 
 @node t15.geo,  , t14.geo, Tutorial
- at section @file{t15.geo}
+ at section @url{https://geuz.org/svn/gmsh/trunk/tutorial/t15.geo,t15.geo}
 
 @verbatiminclude ../../tutorial/t15.geo
 
@@ -4678,7 +4709,7 @@ by hand.
 @appendix Compiling the source code
 
 Stable releases and nightly source snapshots are available from
- at uref{http://geuz.org/gmsh/src/}. You can also access the subversion
+ at url{http://geuz.org/gmsh/src/}. You can also access the subversion
 repository directly:
 
 @enumerate
@@ -4686,7 +4717,7 @@ repository directly:
 The first time you want to download the latest full source, type:
 
 @example
-svn co https://geuz.org/svn/gmsh/trunk gmsh
+svn co @url{https://geuz.org/svn/gmsh/trunk} gmsh
 @end example
 
 You will be asked to accept the security certificate and to provide your
@@ -4728,8 +4759,10 @@ svn update --set-depth infinity
 @end enumerate
 
 Once you have the source code, you need to run CMake to configure your
-build (see the @file{README.txt} file in the top-level source directory
-for detailed information on how to run CMake). 
+build (see the
+ at url{https://geuz.org/svn/gmsh/trunk/README.txt,README.txt}@footnote{Login
+and password: @code{gmsh}.} file in the top-level source directory for
+detailed information on how to run CMake).
 
 Each build can be configured using a series of options, to selectively
 enable optional modules or features. Here is the list of CMake options:
@@ -4772,21 +4805,35 @@ source code is provided in @ref{Compiling the source code} (see also
 @section Source code structure
 
 Gmsh's code is structured in several subdirectories, roughly separated
-between the four core modules (@file{Geo}, @file{Mesh}, @file{Solver},
- at file{Post}) and associated utilities (@file{Common}, @file{Numeric}) on
-one hand, and the graphics (@file{Graphics}) and interface (@file{Fltk},
- at file{Parser}) code on the other.
+between the four core modules
+(@url{https://geuz.org/svn/gmsh/trunk/Geo,Geo}@footnote{Login and
+password: @code{gmsh}.},
+ at url{https://geuz.org/svn/gmsh/trunk/Mesh,Mesh},
+ at url{https://geuz.org/svn/gmsh/trunk/Solver,Solver},
+ at url{https://geuz.org/svn/gmsh/trunk/Post,Post}) and associated
+utilities (@url{https://geuz.org/svn/gmsh/trunk/Common,Common},
+ at url{https://geuz.org/svn/gmsh/trunk/Numeric,Numeric}) on one hand, and
+the graphics (@url{https://geuz.org/svn/gmsh/trunk/Graphics,Graphics})
+and interface (@url{https://geuz.org/svn/gmsh/trunk/Fltk,Fltk},
+ at url{https://geuz.org/svn/gmsh/trunk/Parser,Parser}) code on the other.
 
 The geometry and mesh modules are based on an object-oriented model
-class (@file{Geo/GModel.h}), built upon abstract geometrical entity
-classes (@file{Geo/GVertex.h}, @file{Geo/GEdge.h}, @file{Geo/GFace.h}
-and @file{Geo/GRegion.h}). Concrete implementations of the geometrical
-entity classes are provided for each supported CAD kernel
-(e.g. @file{Geo/gmshVertex.h} for geometry points in Gmsh's native CAD
-format, or @file{Geo/OCCVertex.h} for geometry points from
-OpenCASCADE). The post-processing module is based on the concept of
-views (@file{Post/PView.h}) and abstract data containers (derived from
- at file{Post/PViewData.h}).
+class (@url{https://geuz.org/svn/gmsh/trunk/Geo/GModel.h,Geo/GModel.h}),
+built upon abstract geometrical entity classes
+(@url{https://geuz.org/svn/gmsh/trunk/Geo/GVertex.h,Geo/GVertex.h},
+ at url{https://geuz.org/svn/gmsh/trunk/Geo/GEdge.h,Geo/GEdge.h},
+ at url{https://geuz.org/svn/gmsh/trunk/Geo/GFace.h,Geo/GFace.h} and
+ at url{https://geuz.org/svn/gmsh/trunk/Geo/GRegion.h,Geo/GRegion.h}). Concrete
+implementations of the geometrical entity classes are provided for each
+supported CAD kernel
+(e.g. @url{https://geuz.org/svn/gmsh/trunk/Geo/gmshVertex.h,Geo/gmshVertex.h}
+for geometry points in Gmsh's native CAD format, or
+ at url{https://geuz.org/svn/gmsh/trunk/Geo/OCCVertex.h,Geo/OCCVertex.h}
+for geometry points from OpenCASCADE). The post-processing module is
+based on the concept of views
+(@url{https://geuz.org/svn/gmsh/trunk/Post/PView.h,Post/PView.h}) and
+abstract data containers (derived from
+ at url{https://geuz.org/svn/gmsh/trunk/Post/PViewData.h,Post/PViewData.h}).
 
 @c -------------------------------------------------------------------------
 @c Coding style
@@ -4850,19 +4897,26 @@ To add a new option in Gmsh:
 
 @enumerate
 @item
-create the option in the @code{CTX} class (@file{Common/Context.h}) if
-it's a classical option, or in the @code{PViewOptions} class
-(@file{Post/PViewOptions.h}) if it's a post-processing view-dependent
-option;
+create the option in the @code{CTX} class
+(@url{https://geuz.org/svn/gmsh/trunk/Common/Context.h,Common/Context.h}@footnote{Login
+and password: @code{gmsh}.}) if it's a classical option, or in the
+ at code{PViewOptions} class
+(@url{https://geuz.org/svn/gmsh/trunk/Post/PViewOptions.h,Post/PViewOptions.h})
+if it's a post-processing view-dependent option;
 @item
-in @file{Common/DefaultOptions.h}, give a name (for the parser to be able to
-access it), a reference to a handling routine (i.e. @code{opt_XXX}) and a
-default value for this option;
+in
+ at url{https://geuz.org/svn/gmsh/trunk/Common/DefaultOptions.h,Common/DefaultOptions.h},
+give a name (for the parser to be able to access it), a reference to a
+handling routine (i.e. @code{opt_XXX}) and a default value for this
+option;
 @item
-create the handling routine @code{opt_XXX} in @file{Common/Options.cpp} (and
-add the prototype in @file{Common/Options.h});
+create the handling routine @code{opt_XXX} in
+ at url{https://geuz.org/svn/gmsh/trunk/Common/Options.cpp,Common/Options.cpp}
+(and add the prototype in
+ at url{https://geuz.org/svn/gmsh/trunk/Common/Options.h,Common/Options.h});
 @item
-optional: create the associated widget in @file{Fltk/optionWindow.cpp};
+optional: create the associated widget in
+ at url{https://geuz.org/svn/gmsh/trunk/Fltk/optionWindow.cpp,Fltk/optionWindow.h};
 @end enumerate
 
 @c -------------------------------------------------------------------------
@@ -5056,8 +5110,10 @@ found at @url{http://www.mesa3d.org}.
 @item How do I compile Gmsh from the source code?
 
 You need cmake (@url{http://www.cmake.org}) and a C++ compiler. See
- at ref{Compiling the source code} and the @file{README.txt} file in the
-top-level source directory for more information.
+ at ref{Compiling the source code} and the
+ at url{https://geuz.org/svn/gmsh/trunk/README.txt,README.txt}@footnote{Login
+and password: @code{gmsh}.} file in the top-level source directory for
+more information.
 
 @item Where does Gmsh save its configuration files?
 
@@ -5121,8 +5177,9 @@ You can create simple MPEG animations by choosing MPEG as the format in
 post-processing data sets, or to change parameters according to
 @code{Print.Parameter}. To create fully customized animations or to use
 different output formats (AVI, MP4, etc.) you should write a
-script. Have a look at @file{tutorial/t8.geo} or
- at file{demos/anim.script} for some examples.
+script. Have a look at @ref{t8.geo} or
+ at url{https://geuz.org/svn/gmsh/trunk/demos/anim.script,demos/anim.script}@footnote{Login
+and password: @code{gmsh}.} for some examples.
 
 @item Can I change values in input fields with the mouse in the GUI?
 
@@ -5268,9 +5325,10 @@ panel. From the command line, you can also use @code{-order 2}.
 
 @item Can I import an existing surface mesh in Gmsh and use it to build a 3D mesh?
 
-Yes, you can import a surface mesh in any one of the supported mesh
-file formats, define a volume, and mesh it. For an example see
- at file{demos/sphere-discrete.geo}.
+Yes, you can import a surface mesh in any one of the supported mesh file
+formats, define a volume, and mesh it. For an example see
+ at url{https://geuz.org/svn/gmsh/trunk/demos/sphere-discrete.geo,demos/sphere-discrete.geo}@footnote{Login
+and password: @code{gmsh}.}.
 
 @item How do I define boundary conditions or material properties in Gmsh?
 
@@ -5281,7 +5339,7 @@ elements, and it is up to the solver to interpret these tags as boundary
 conditions, materials, etc. Associating tags with elements in Gmsh is
 done by defining Physical entities (Physical Points, Physical Lines,
 Physical Surfaces and Physical Volumes). See the reference manual as
-well as the tutorials (in particular @file{tutorial/t1.geo}) for a detailed
+well as the tutorials (in particular @ref{t1.geo}) for a detailed
 description and some examples.
 
 @item How can I display only the mesh associated with selected geometrical entities?
@@ -5337,13 +5395,14 @@ solver (@url{http://geuz.org/getdp}) to see how this is done.
 
 Sure. The simplest (but rather crude) approach if to re-launch Gmsh
 everytime you want to visualize something (a simple C program showing
-how to do this is given in @file{utils/misc/callgmsh.c}). A better approach
-is to modify your program so that it can communicate with Gmsh over a
-socket (see ``How do I integrate my own solver with Gmsh?'' above; you
-can skip the option file creation). Then select `Always listen to
-incoming connection requests' in the solver option panel (or run gmsh
-with the @code{-listen} command line option) and Gmsh will always listen for
-your program on the Solver.SocketName socket.
+how to do this is given in
+ at url{https://geuz.org/svn/gmsh/trunk/utils/misc/callgmsh.c,utils/misc/callgmsh.c}). A
+better approach is to modify your program so that it can communicate
+with Gmsh over a socket (see ``How do I integrate my own solver with
+Gmsh?''  above; you can skip the option file creation). Then select
+`Always listen to incoming connection requests' in the solver option
+panel (or run gmsh with the @code{-listen} command line option) and Gmsh
+will always listen for your program on the Solver.SocketName socket.
 @end enumerate
 
 @c -------------------------------------------------------------------------
@@ -5427,7 +5486,9 @@ Evaluate plugin.
 
 You can save simple MPEG animations directly from the `File->Save As'
 menu. For other formats you should write a script. Have a look at
- at file{tutorial/t8.geo} or @file{demos/anim.script} for some examples.
+ at ref{t8.geo} or
+ at url{https://geuz.org/svn/gmsh/trunk/demos/anim.script,demos/anim.script}
+for some examples.
 
 @item Is there a way to visualize only certain components of vector/tensor fields?
 
diff --git a/doc/texinfo/opt_fields.texi b/doc/texinfo/opt_fields.texi
index 9bee17c..b20d016 100644
--- a/doc/texinfo/opt_fields.texi
+++ b/doc/texinfo/opt_fields.texi
@@ -76,6 +76,39 @@ type: float@*
 default value: @code{0.5}
 @end table
 
+ at item Ball
+The value of this field is VIn inside a spherical ball, VOut outside. The ball is defined by@*
+@*
+  ||dX||^2 < R^2 &&@*
+  dX = (X - XC)^2 + (Y-YC)^2 + (Z-ZC)^2@*
+Options:@*
+ at table @code
+ at item Radius
+Radius@*
+type: float@*
+default value: @code{0}
+ at item VIn
+Value inside the ball@*
+type: float@*
+default value: @code{0}
+ at item VOut
+Value outside the ball@*
+type: float@*
+default value: @code{0}
+ at item XCenter
+X coordinate of the ball center@*
+type: float@*
+default value: @code{0}
+ at item YCenter
+Y coordinate of the ball center@*
+type: float@*
+default value: @code{0}
+ at item ZCenter
+Z coordinate of the ball center@*
+type: float@*
+default value: @code{0}
+ at end table
+
 @item BoundaryLayer
 hwall * ratio^(dist/hwall)@*
 Options:@*
@@ -578,7 +611,7 @@ default value: @code{0}
 @end table
 
 @item Restrict
-Restrict the application of a field to a given list of geometrical curves, surfaces or volumes.@*
+Restrict the application of a field to a given list of geometrical points, curves, surfaces or volumes.@*
 Options:@*
 @table @code
 @item EdgesList
@@ -597,39 +630,10 @@ default value: @code{1}
 Volume indices@*
 type: list@*
 default value: @code{@{@}}
- at end table
-
- at item Sphere
-The value of this field is VIn inside a sphere, VOut outside. The sphere is given by@*
-@*
-  ||dX||^2 < R^2 &&@*
-  dX = (X - XC)^2 + (Y-YC)^2 + (Z-ZC)^2@*
-Options:@*
- at table @code
- at item Radius
-Radius@*
-type: float@*
-default value: @code{0}
- at item VIn
-Value inside the sphere@*
-type: float@*
-default value: @code{0}
- at item VOut
-Value outside the sphere@*
-type: float@*
-default value: @code{0}
- at item XCenter
-X coordinate of the sphere center@*
-type: float@*
-default value: @code{0}
- at item YCenter
-Y coordinate of the sphere center@*
-type: float@*
-default value: @code{0}
- at item ZCenter
-Z coordinate of the sphere center@*
-type: float@*
-default value: @code{0}
+ at item VerticesList
+Point indices@*
+type: list@*
+default value: @code{@{@}}
 @end table
 
 @item Structured
diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi
index 54f2d57..3711281 100644
--- a/doc/texinfo/opt_general.texi
+++ b/doc/texinfo/opt_general.texi
@@ -54,6 +54,11 @@ File into which the log is saved if a fatal error occurs@*
 Default value: @code{".gmsh-errors"}@*
 Saved in: @code{General.OptionsFileName}
 
+ at item General.ExecutableFileName
+File name of the Gmsh executable (read-only)@*
+Default value: @code{""}@*
+Saved in: @code{General.SessionFileName}
+
 @item General.FileName
 Current project file name (read-only)@*
 Default value: @code{""}@*
@@ -62,7 +67,7 @@ Saved in: @code{-}
 @item General.FltkTheme
 FLTK user interface theme (try e.g. plastic or gtk+)@*
 Default value: @code{""}@*
-Saved in: @code{General.OptionsFileName}
+Saved in: @code{General.SessionFileName}
 
 @item General.GraphicsFont
 Font used in the graphic window@*
@@ -109,6 +114,31 @@ Saved in: @code{General.SessionFileName}
 Default value: @code{"untitled.geo"}@*
 Saved in: @code{General.SessionFileName}
 
+ at item General.RecentFile5
+6th most recent opened file@*
+Default value: @code{"untitled.geo"}@*
+Saved in: @code{General.SessionFileName}
+
+ at item General.RecentFile6
+7th most recent opened file@*
+Default value: @code{"untitled.geo"}@*
+Saved in: @code{General.SessionFileName}
+
+ at item General.RecentFile7
+8th most recent opened file@*
+Default value: @code{"untitled.geo"}@*
+Saved in: @code{General.SessionFileName}
+
+ at item General.RecentFile8
+9th most recent opened file@*
+Default value: @code{"untitled.geo"}@*
+Saved in: @code{General.SessionFileName}
+
+ at item General.RecentFile9
+10th most recent opened file@*
+Default value: @code{"untitled.geo"}@*
+Saved in: @code{General.SessionFileName}
+
 @item General.SessionFileName
 Option file into which session specific information is saved; automatically read on startup@*
 Default value: @code{".gmshrc"}@*
@@ -460,9 +490,9 @@ Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
 @item General.ColorScheme
-Default color scheme (0=dark, 1=light or 2=grayscale)@*
+Default color scheme for graphics (0=dark, 1=light, 2=grayscale, 3=reverse)@*
 Default value: @code{1}@*
-Saved in: @code{General.OptionsFileName}
+Saved in: @code{General.SessionFileName}
 
 @item General.ConfirmOverwrite
 Ask confirmation before overwriting files?@*
@@ -559,6 +589,11 @@ Vertical position (in pixels) of the upper left corner of the file chooser windo
 Default value: @code{200}@*
 Saved in: @code{General.SessionFileName}
 
+ at item General.FltkColorScheme
+FLTK user interface color theme (0: standard, 1:dark)@*
+Default value: @code{0}@*
+Saved in: @code{General.SessionFileName}
+
 @item General.FontSize
 Size of the font in the user interface (-1=automatic)@*
 Default value: @code{-1}@*
@@ -604,6 +639,16 @@ Vertical position (in pixels) of the upper left corner of the high order tools w
 Default value: @code{150}@*
 Saved in: @code{General.SessionFileName}
 
+ at item General.HighResolutionGraphics
+Use high-resolution OpenGL graphics (e.g. for Macs with retina displays)@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+ at item General.HighResolutionPointSizeFactor
+Point size factor when using high-resolution OpenGL graphics@*
+Default value: @code{2}@*
+Saved in: @code{General.OptionsFileName}
+
 @item General.InitialModule
 Module launched on startup (0=automatic, 1=geometry, 2=mesh, 3=solver, 4=post-processing) @*
 Default value: @code{0}@*
@@ -809,6 +854,11 @@ Vertical position (in pixels) of the (detached) menu tree@*
 Default value: @code{400}@*
 Saved in: @code{General.SessionFileName}
 
+ at item General.MessageFontSize
+Size of the font in the message window (-1=automatic)@*
+Default value: @code{-1}@*
+Saved in: @code{General.OptionsFileName}
+
 @item General.MessageHeight
 Height (in pixels) of the message console when it is visible (should be > 0)@*
 Default value: @code{300}@*
diff --git a/doc/texinfo/opt_geometry.texi b/doc/texinfo/opt_geometry.texi
index 327f996..2a5fa0f 100644
--- a/doc/texinfo/opt_geometry.texi
+++ b/doc/texinfo/opt_geometry.texi
@@ -125,10 +125,15 @@ Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Geometry.OCCConnectFaces
-Cut and connect faces in STEP, IGES and BRep models@*
+Cut and connect faces in STEP, IGES and BRep models (0=no, 1=internal, 2=Salome)@*
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
+ at item Geometry.OCCScaling
+Scale STEP, IGES and BRep model by given factor@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
 @item Geometry.OffsetX
 Model display offset along X-axis (in model coordinates)@*
 Default value: @code{0}@*
diff --git a/doc/texinfo/opt_mesh.texi b/doc/texinfo/opt_mesh.texi
index 8ff1a05..fca061b 100644
--- a/doc/texinfo/opt_mesh.texi
+++ b/doc/texinfo/opt_mesh.texi
@@ -659,6 +659,11 @@ Skip a model edge in mesh generation if its length is less than user's defined t
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
+ at item Mesh.ToleranceInitialDelaunay
+Tolerance for initial 3D Delaunay mesher@*
+Default value: @code{1e-08}@*
+Saved in: @code{General.OptionsFileName}
+
 @item Mesh.Triangles
 Display mesh triangles?@*
 Default value: @code{1}@*
diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi
index bba5e25..496a66f 100644
--- a/doc/texinfo/opt_plugin.texi
+++ b/doc/texinfo/opt_plugin.texi
@@ -5,29 +5,31 @@
 
 @ftable @code
 @item Plugin(AnalyseCurvedMesh)
-Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. It computes, min(J) where J is the scaled Jacobian determinant. Eventually, it computes min(R) where R is the ratio between the smaller and the greater of the eigenvalues of the metric. It creates one or more PView and hides elements for which min(@{J, R@}) < 'Hidding threshold'.@*
+Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. It computes, min(J) where J is the scaled Jacobian determinant and, if asked, min(R) where R is the ratio between the smaller and the greater of the eigenvalues of the metric. It creates a PView and hides elements for which min(@{J, R@}) < 'Hidding threshold'.@*
+@*
+J is faster to compute but gives informations only on validity while R gives also informations on quality.@*
 @*
 Parameters:@*
 @*
-- Show [...] = @{0, 1@}: If 0, computes Jacobian and shows min(J). If 1, computes Jacobian and metric and shows min(R).@*
+- Show [...] = @{0, 1, 2@}: If 0, computes Jacobian and shows min(J). If 1, computes Jacobian and metric and shows min(R). If 2, behaves like it is 1 but draw the two min(J) and min(R) PView@*
 @*
-- Number of PView = @{0, 1, 2@}: If 1, create one PView with all elements. If 2, create two PView, one with straight-sided elements and one with curved elements.@*
+- Draw PView = @{0, 1@}: Creates a PView of min(@{J, R@}) if it does not exist already. If 'Recompute' = 1, a new PView is redrawed.@*
 @*
 - Hidding threshold = [0,1]: Hides all element for which min(R) or min(J) is strictly greater than the threshold. If = 1, no effect, if = 0 hide all elements except invalid.@*
 @*
-- Dimension = @{-1, 1, 2, 3@}: If = -1, analyse element of the greater dimension.@*
+- Dimension = @{-1, 1, 2, 3, 4@}: If = -1, analyse element of the greater dimension. If = 4, analyse 2D and 3D elements@*
 @*
 - Recompute = @{0,1@}: If the mesh has changed, set to 1 to recompute the bounds.@*
 @*
-- Tolerance = ]0, 1[: Tolerance on the computation of min(R) or min(J). It should be at most 0.01 but it can be set to 1 to just check the validity of the mesh.
+- Tolerance = ]0, 1[: Tolerance on the computation of min(@{R, J@}). It should be at most 0.01 but it can be set to 1 or greater to just check the validity of the mesh.
 Numeric options:
 @table @code
- at item Show: (0) Jacobian, (1) Metric
+ at item Show: 0:J, 1:R, 2:J&&R
+Default value: @code{1}
+ at item Draw PView
 Default value: @code{1}
- at item Number of PView
-Default value: @code{2}
 @item Hidding threshold
-Default value: @code{0.1}
+Default value: @code{10}
 @item Dimension of elements
 Default value: @code{-1}
 @item Recompute bounds
@@ -350,6 +352,14 @@ Numeric options:
 Default value: @code{-1}
 @end table
 
+ at item Plugin(DuplicateBoundaries)
+Plugin(DuplicateBoundaries) is not documented yet.
+Numeric options:
+ at table @code
+ at item Dummy
+Default value: @code{1}
+ at end table
+
 @item Plugin(Eigenvalues)
 Plugin(Eigenvalues) computes the three real eigenvalues of each tensor in the view `View'.@*
 @*
@@ -574,7 +584,7 @@ Plugin(Integrate) integrates a scalar field over all the elements of the view `V
 @*
 If `View' < 0, the plugin is run on the current view.@*
 @*
-If `OverTime' = 1 , the plugin integrates the scalar view over time instead of over space.@*
+If `OverTime' = i > -1 , the plugin integrates the scalar view over time instead of over space, starting at iteration i.If `Visible' = 1, the plugin only integrates overvisible entities.@*
 @*
 Plugin(Integrate) creates one new view.
 Numeric options:
@@ -585,6 +595,8 @@ Default value: @code{-1}
 Default value: @code{-1}
 @item Dimension
 Default value: @code{-1}
+ at item Visible
+Default value: @code{1}
 @end table
 
 @item Plugin(Isosurface)
@@ -714,14 +726,24 @@ Default value: @code{0}
 Default value: @code{-1}
 @end table
 
+ at item Plugin(MeshSubEntities)
+Plugin(MeshSubEntities) creates mesh elements for the entities of dimension `OutputDimension' (0 for vertices, 1 for edges, 2 for faces) of the `InputPhysicalGroup' of dimension `InputDimension'. The plugin creates new elements belonging to `OutputPhysicalGroup'.
+Numeric options:
+ at table @code
+ at item InputDimension
+Default value: @code{1}
+ at item InputPhysicalGroup
+Default value: @code{1}
+ at item OuputDimension
+Default value: @code{0}
+ at item OuputPhysicalGroup
+Default value: @code{2000}
+ at end table
+
 @item Plugin(MinMax)
 Plugin(MinMax) computes the min/max of a view.@*
 @*
-If `View' < 0, the plugin is run on the current view.@*
-@*
-If `OverTime' = 1, calculates the min/max over space AND time@*
-@*
-If `Argument' = 1, calculates the min/max AND the argmin/argmax@*
+If `View' < 0, the plugin is run on the current view. If `OverTime' = 1, the plugin calculates the min/max over space and time. If `Argument' = 1, the plugin calculates the min/max and the argmin/argmax. If `Visible' = 1, the plugin is only applied to visible entities.@*
 @*
 Plugin(MinMax) creates two new views.
 Numeric options:
@@ -732,6 +754,8 @@ Default value: @code{-1}
 Default value: @code{0}
 @item Argument
 Default value: @code{0}
+ at item Visible
+Default value: @code{1}
 @end table
 
 @item Plugin(ModifyComponent)
@@ -1204,13 +1228,15 @@ Default value: @code{-1}
 @end table
 
 @item Plugin(Triangulate)
-Plugin(Triangulate) triangulates the points in the view `View', assuming that all the points belong to a surface that can be projected one-to-one onto a plane.@*
+Plugin(Triangulate) triangulates the points in the view `View', assuming that all the points belong to a surface that can be projected one-to-one onto a plane. Algorithm selects the old (0) or new (1) meshing algorithm.@*
 @*
 If `View' < 0, the plugin is run on the current view.@*
 @*
 Plugin(Triangulate) creates one new view.
 Numeric options:
 @table @code
+ at item Algorithm
+Default value: @code{0}
 @item View
 Default value: @code{-1}
 @end table
diff --git a/doc/texinfo/opt_post.texi b/doc/texinfo/opt_post.texi
index 7a1b034..7c9649d 100644
--- a/doc/texinfo/opt_post.texi
+++ b/doc/texinfo/opt_post.texi
@@ -4,6 +4,11 @@
 @c
 
 @ftable @code
+ at item PostProcessing.GraphPointCommand
+Command parsed when double-clicking on a graph data point (e.g. Merge Sprintf('file_%g.pos', PostProcessing.GraphPointX);)@*
+Default value: @code{""}@*
+Saved in: @code{General.OptionsFileName}
+
 @item PostProcessing.AnimationDelay
 Delay (in seconds) between frames in automatic animation mode@*
 Default value: @code{0.1}@*
@@ -34,6 +39,16 @@ Default file format for post-processing views (0=ASCII view, 1=binary view, 2=pa
 Default value: @code{10}@*
 Saved in: @code{General.OptionsFileName}
 
+ at item PostProcessing.GraphPointX
+Abscissa of last selected graph point@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+ at item PostProcessing.GraphPointY
+Ordinate of last selected graph point@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
 @item PostProcessing.HorizontalScales
 Display value scales horizontally@*
 Default value: @code{1}@*
diff --git a/doc/texinfo/opt_solver.texi b/doc/texinfo/opt_solver.texi
index c655dd4..e41e32c 100644
--- a/doc/texinfo/opt_solver.texi
+++ b/doc/texinfo/opt_solver.texi
@@ -104,6 +104,16 @@ Name of solver 9@*
 Default value: @code{""}@*
 Saved in: @code{General.SessionFileName}
 
+ at item Solver.OctaveInterpreter
+Name of the Octave interpreter (used to run .m files)@*
+Default value: @code{"octave"}@*
+Saved in: @code{General.SessionFileName}
+
+ at item Solver.PythonInterpreter
+Name of the Python interpreter (used to run .py files if they are not executable)@*
+Default value: @code{"python"}@*
+Saved in: @code{General.SessionFileName}
+
 @item Solver.RemoteLogin0
 Command to login to a remote host to launch solver 0@*
 Default value: @code{""}@*
diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi
index f4d30b6..81abcc4 100644
--- a/doc/texinfo/opt_view.texi
+++ b/doc/texinfo/opt_view.texi
@@ -145,7 +145,7 @@ Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
 @item View.AutoPosition
-Position the scale or 2D plot automatically (0: manual, 1: automatic, 2: top left, 3: top right, 4: bottom left, 5: bottom right, 6: top, 7: bottom, 8: left, 9: right, 10: full, 11: top third)@*
+Position the scale or 2D plot automatically (0: manual, 1: automatic, 2: top left, 3: top right, 4: bottom left, 5: bottom right, 6: top, 7: bottom, 8: left, 9: right, 10: full, 11: top third, 12: in model coordinates)@*
 Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
@@ -216,7 +216,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item View.CenterGlyphs
 Center glyphs (arrows, numbers, etc.)? (0=left, 1=centered, 2=right)@*
-Default value: @code{1}@*
+Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
 @item View.Clip
@@ -484,6 +484,11 @@ Maximum value in the view (read-only)@*
 Default value: @code{0}@*
 Saved in: @code{-}
 
+ at item View.MaxVisible
+Maximum value in the visible parts of the view (read-only)@*
+Default value: @code{0}@*
+Saved in: @code{-}
+
 @item View.MaxX
 Maximum view coordinate along the X-axis (read-only)@*
 Default value: @code{0}@*
@@ -504,6 +509,11 @@ Minimum value in the view (read-only)@*
 Default value: @code{0}@*
 Saved in: @code{-}
 
+ at item View.MinVisible
+Minimum value in the visible parts of the view (read-only)@*
+Default value: @code{0}@*
+Saved in: @code{-}
+
 @item View.MinX
 Minimum view coordinate along the X-axis (read-only)@*
 Default value: @code{0}@*
@@ -654,6 +664,11 @@ Current time step displayed@*
 Default value: @code{0}@*
 Saved in: @code{-}
 
+ at item View.Time
+Current time displayed (if positive, sets the time step corresponding the given time value)@*
+Default value: @code{0}@*
+Saved in: @code{-}
+
 @item View.TransformXX
 Element (1,1) of the 3x3 coordinate transformation matrix@*
 Default value: @code{1}@*
@@ -700,7 +715,7 @@ Default value: @code{1}@*
 Saved in: @code{-}
 
 @item View.Type
-Type of plot (1=3D, 2=2D space, 3=2D time)@*
+Type of plot (1=3D, 2=2D space, 3=2D time, 4=2D)@*
 Default value: @code{1}@*
 Saved in: @code{-}
 
diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi
index 6e4fd29..8d65486 100644
--- a/doc/texinfo/shortcuts.texi
+++ b/doc/texinfo/shortcuts.texi
@@ -140,6 +140,8 @@ Hide/show mesh lines
 Hide/show mesh points
 @item Alt+Shift+s
 Hide/show mesh surface edges
+ at item Alt+Shift+t
+Same as Alt+t, but with numeric mode included
 @item Alt+Shift+v
 Hide/show mesh volume edges
 @item Alt+Shift+w
diff --git a/tutorial/t10.geo b/tutorial/t10.geo
index 433f626..1a92888 100644
--- a/tutorial/t10.geo
+++ b/tutorial/t10.geo
@@ -1,22 +1,22 @@
-/********************************************************************* 
+/*********************************************************************
  *
  *  Gmsh tutorial 10
- * 
+ *
  *  General mesh size fields
  *
  *********************************************************************/
 
 // In addition to specifying target mesh sizes at the points of the
 // geometry (see t1) or using a background mesh (see t7), you can use
-// general mesh size "Fields". 
+// general mesh size "Fields".
 
 // Let's create a simple rectangular geometry
 lc = .15;
-Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc}; 
-Point(3) = {1,1,0,lc};     Point(4) = {0,1,0,lc}; 
+Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc};
+Point(3) = {1,1,0,lc};     Point(4) = {0,1,0,lc};
 Point(5) = {0.2,.5,0,lc};
 
-Line(1) = {3,2}; Line(2) = {2,1}; Line(3) = {1,4}; Line(4) = {4,3};
+Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};
 
 Line Loop(5) = {1,2,3,4}; Plane Surface(6) = {5};
 
@@ -29,7 +29,7 @@ Line Loop(5) = {1,2,3,4}; Plane Surface(6) = {5};
 Field[1] = Attractor;
 Field[1].NodesList = {5};
 Field[1].NNodesByEdge = 100;
-Field[1].EdgesList = {1};
+Field[1].EdgesList = {2};
 
 // We then define a Threshold field, which uses the return value of
 // the Attractor Field[1] in order to define a simple change in
@@ -73,7 +73,7 @@ Field[5].F = Sprintf("F4^3 + %g", lc / 100);
 Field[6] = Box;
 Field[6].VIn = lc / 15;
 Field[6].VOut = lc;
-Field[6].XMin = 0.3; 
+Field[6].XMin = 0.3;
 Field[6].XMax = 0.6;
 Field[6].YMin = 0.3;
 Field[6].YMax = 0.6;
@@ -89,5 +89,6 @@ Field[7] = Min;
 Field[7].FieldsList = {2, 3, 5, 6};
 Background Field = 7;
 
-// Don't extend the elements sizes from the boundary inside the domain
-Mesh.CharacteristicLengthExtendFromBoundary = 0;
+// If the boundary mesh size was too small, we could ask not to extend the
+// elements sizes from the boundary inside the domain:
+// Mesh.CharacteristicLengthExtendFromBoundary = 0;
diff --git a/tutorial/t11.geo b/tutorial/t11.geo
index a113e50..58a4d01 100644
--- a/tutorial/t11.geo
+++ b/tutorial/t11.geo
@@ -1,7 +1,7 @@
-/********************************************************************* 
+/*********************************************************************
  *
  *  Gmsh tutorial 11
- * 
+ *
  *  Unstructured quadrangular meshes
  *
  *********************************************************************/
@@ -12,13 +12,13 @@
 // same way. Let's define a simple geometry with an analytical mesh
 // size field:
 
-Point(1) = {-1.25, -.5, 0}; Point(2) = {-1.25, 1.25, 0};
-Point(3) = {1.25, -.5, 0};  Point(4) = {1.25, 1.25, 0};
+Point(1) = {-1.25, -.5, 0}; Point(2) = {1.25, -.5, 0};
+Point(3) = {1.25, 1.25, 0};  Point(4) = {-1.25, 1.25, 0};
 
-Line(1) = {1, 2}; Line(2) = {2, 4};
-Line(3) = {4, 3}; Line(4) = {3, 1};
+Line(1) = {1, 2}; Line(2) = {2, 3};
+Line(3) = {3, 4}; Line(4) = {4, 1};
 
-Line Loop(4) = {1,2, 3, 4}; Plane Surface(100) = {4};
+Line Loop(4) = {1, 2, 3, 4}; Plane Surface(100) = {4};
 
 Field[1] = MathEval;
 Field[1].F = "0.01*(1.0+30.*(y-x*x)*(y-x*x) + (1-x)*(1-x))";
@@ -44,5 +44,4 @@ Recombine Surface{100};
 // "Delaunay for quads" (DelQuad) meshing algorithm: DelQuad is a
 // triangulation algorithm that enables to create right triangles
 // almost everywhere. Uncomment the following line to try DelQuad:
-
-Mesh.Algorithm = 8; // DelQuad (experimental)
+// Mesh.Algorithm = 8;
diff --git a/tutorial/t12.geo b/tutorial/t12.geo
index 3cf793a..e698d2b 100644
--- a/tutorial/t12.geo
+++ b/tutorial/t12.geo
@@ -1,7 +1,7 @@
-/********************************************************************* 
+/*********************************************************************
  *
  *  Gmsh tutorial 12
- * 
+ *
  *  Cross-patch meshing with compounds
  *
  *********************************************************************/
@@ -11,7 +11,7 @@
 // parametrization can then be used for remeshing the compound as if
 // it were a single CAD entity.
 
-lc = 0.2;
+lc = 0.1;
 
 Point(1) = {0, 0, 0, lc};       Point(2) = {1, 0, 0, lc};
 Point(3) = {1, 1, 0.5, lc};     Point(4) = {0, 1, 0.4, lc};
@@ -19,9 +19,9 @@ Point(5) = {0.3, 0.2, 0, lc};   Point(6) = {0, 0.01, 0.01, lc};
 Point(7) = {0, 0.02, 0.02, lc}; Point(8) = {1, 0.05, 0.02, lc};
 Point(9) = {1, 0.32, 0.02, lc};
 
-Line(1) = {1, 2}; Line(2) = {2, 8}; Line(3) = {8, 9}; 
-Line(4) = {9, 3}; Line(5) = {3, 4}; Line(6) = {4, 7}; 
-Line(7) = {7, 6}; Line(8) = {6, 1}; Spline(9) = {7, 5, 9}; 
+Line(1) = {1, 2}; Line(2) = {2, 8}; Line(3) = {8, 9};
+Line(4) = {9, 3}; Line(5) = {3, 4}; Line(6) = {4, 7};
+Line(7) = {7, 6}; Line(8) = {6, 1}; Spline(9) = {7, 5, 9};
 Line(10) = {6, 8};
 
 Line Loop(11) = {5, 6, 9, 4};     Ruled Surface(12) = {11};
@@ -36,9 +36,10 @@ Compound Line(101) = {6, 7, 8};
 // Treat surfaces 12, 14 and 16 as a single surface
 Compound Surface(200) = {12, 14, 16};
 
-// Hide the original surfaces so we only see the compound
-// (cross-patch) mesh
-//Hide {Surface{12, 14, 16}; }
+// Add option to toggle visibility of sub-entities
+DefineConstant[ hide = {Geometry.HideCompounds, Choices{0,1},
+    Name "Hide compound sub-entities", GmshOption "Geometry.HideCompounds",
+    AutoCheck 0} ];
 
 // More details about the reparametrization technique can be found in
 // the following papers:
@@ -52,7 +53,7 @@ Compound Surface(200) = {12, 14, 16};
 //   and J-F Remacle, "Quality meshing based on STL triangulations for
 //   biomedical simulations", International Journal for Numerical
 //   Methods in Biomedical Engineering", 26 (7), pp. 876-889, 2010.
-// 
+//
 // * E. Marchandise, C. Carton de Wiart, W. G. Vos, C. Geuzaine and
 //   J.-F. Remacle, "High Quality Surface Remeshing Using Harmonic
 //   Maps. Part II: Surfaces with High Genus and of Large Aspect
diff --git a/tutorial/t13.geo b/tutorial/t13.geo
index d037310..b76be2a 100644
--- a/tutorial/t13.geo
+++ b/tutorial/t13.geo
@@ -41,20 +41,23 @@ Volume(1) = {1};
 Physical Surface(1) = {s : s + #ss[]-1};
 Physical Volume(1) = 1;
 
-uniform = 1;
-If(uniform)
-  // uniform mesh size...
-  Mesh.CharacteristicLengthMin = 2.5;
-  Mesh.CharacteristicLengthMax = 2.5;
-EndIf
-If(!uniform)
-  // ... or apply a funny mesh size field, just because we can :-)
-  Field[1] = MathEval;
+// element size imposed by a size field
+Field[1] = MathEval;
+Field[1].F = "2.5";
+Background Field = 1;
+
+DefineConstant[
+  funny = {0, Choices{0,1}, Name "Apply funny mesh size field?"},
+  hide = {0, Choices{0,1}, Name "Hide compound sub-entities"}
+];
+
+If(funny)
   Field[1].F = "2*Sin((x+y)/5) + 3";
-  Background Field = 1;
 EndIf
 
-Mesh.RemeshAlgorithm = 1; // (0) no split (1) automatic (2) automatic only with metis
-Mesh.RemeshParametrization = 7; // (0) harmonic (1) conformal spectral (7) conformal finite element
-Geometry.HideCompounds = 0; // don't hide the compound entities
+DefineConstant[  ];
+
+Mesh.RemeshAlgorithm = 1; // automatic
+Mesh.RemeshParametrization = 7; // conformal finite element
+Geometry.HideCompounds = hide; // hide the compound sub-entities?
 Mesh.Algorithm = 6; // Frontal
diff --git a/tutorial/t3.geo b/tutorial/t3.geo
index 521d861..6b7363e 100644
--- a/tutorial/t3.geo
+++ b/tutorial/t3.geo
@@ -58,13 +58,12 @@ out[] = Extrude { {-2*h,0,0}, {1,0,0} , {0,0.15,0.25} , angle * Pi / 180 } {
 Physical Volume(101) = {1, 2, out[1]};
 
 // Let us now change some options... Since all interactive options are
-// accessible in Gmsh's scripting language, we can for example define
-// a global characteristic length factor or redefine some colors
-// directly in the input file:
+// accessible in Gmsh's scripting language, we can for example make point tags
+// visible or redefine some colors directly in the input file:
 
-Mesh.CharacteristicLengthFactor = 4;
-General.Color.Text = White;
+Geometry.PointNumbers = 1;
 Geometry.Color.Points = Orange;
+General.Color.Text = White;
 Mesh.Color.Points = {255,0,0};
 
 // Note that all colors can be defined literally or numerically, i.e.
diff --git a/tutorial/t5.geo b/tutorial/t5.geo
index d10f08a..5906916 100644
--- a/tutorial/t5.geo
+++ b/tutorial/t5.geo
@@ -158,3 +158,9 @@ Volume(186) = {theloops[]} ;
 // with numbers 1 to 5 in the `For' loop):
 
 Physical Volume (10) = 186 ;
+
+// We could make only part of the model visible to only mesh this subset:
+//
+// Hide "*";
+// Recursive Show { Volume{129}; }
+// Mesh.MeshOnlyVisible=1;
diff --git a/tutorial/t6.geo b/tutorial/t6.geo
index 07f850e..f00fb76 100644
--- a/tutorial/t6.geo
+++ b/tutorial/t6.geo
@@ -1,7 +1,7 @@
-/********************************************************************* 
+/*********************************************************************
  *
  *  Gmsh tutorial 6
- * 
+ *
  *  Transfinite meshes
  *
  *********************************************************************/
@@ -22,7 +22,7 @@ l3 = newl; Line(l3) = {p2, 4};
 
 // Create surface
 Line Loop(1) = {2, -1, l1, l2, l3, -3};
-Plane Surface(1) = {1};
+Plane Surface(1) = {-1};
 
 // Put 20 points with a refinement toward the extremities on curve 2
 Transfinite Line{2} = 20 Using Bump 0.05;
diff --git a/utils/api_demos/mainHomology.cpp b/utils/api_demos/mainHomology.cpp
index 238a63c..3260fd3 100644
--- a/utils/api_demos/mainHomology.cpp
+++ b/utils/api_demos/mainHomology.cpp
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh at geuz.org>.
diff --git a/utils/misc/gmsh_app.plist b/utils/misc/gmsh_app.plist
index 6bd3849..b2d6da8 100644
--- a/utils/misc/gmsh_app.plist
+++ b/utils/misc/gmsh_app.plist
@@ -9,7 +9,7 @@
     <key>CFBundleShortVersionString</key><string>GMSH_VERSION</string>
     <key>CFBundleIconFile</key><string>Gmsh.icns</string>
     <key>CFBundleSignature</key><string>GMSH</string>
-    <key>CFBundleGetInfoString</key><string>Gmsh GMSH_VERSION, Copyright 1997-2013 C. Geuzaine and J.-F. Remacle</string>
+    <key>CFBundleGetInfoString</key><string>Gmsh GMSH_VERSION, Copyright 1997-2014 C. Geuzaine and J.-F. Remacle</string>
     <key>CFBundleIdentifier</key><string>org.geuz.Gmsh</string>
     <key>NSHighResolutionCapable</key><true/>
     <key>CFBundleDocumentTypes</key>
diff --git a/utils/misc/package_gmsh_getdp.sh b/utils/misc/package_gmsh_getdp.sh
index 44c3950..0be0784 100755
--- a/utils/misc/package_gmsh_getdp.sh
+++ b/utils/misc/package_gmsh_getdp.sh
@@ -8,16 +8,29 @@ Gmsh (http://gmsh.info) and GetDP (http://getdp.info).
 Both Gmsh and GetDP are distributed under the terms of the GNU General Public
 License. See the LICENSE and CREDITS files for more information. 
 
-See the official websites http://gmsh.info and http://getdp.info for
-up-to-date versions, documentation and examples." > /tmp/README.txt
+The Gmsh tutorial and sample GetDP models are provided in the tutorial and
+models directories.
+
+See the official websites for up-to-date versions, documentation and additional
+examples." > /tmp/README.txt
 
 GMSH=svn
 GETDP=svn
 
-#GMSH=2.8.4
-#GETDP=2.4.3
+#GMSH=2.8.5
+#GETDP=2.4.4
 
-rm -rf gmsh-getdp-Windows64
+MODELS='machines relay inductor indheat magnetometer antennas acoustic_scattering time_reversal shielding waveguides transfo_simple ddm_wave_simple bloch_periodic_waveguides magnets thermal_conduction'
+
+# get onelab models
+mkdir /tmp/models
+for m in ${MODELS}; do
+  curl -O http://onelab.info/files/${m}.zip
+  unzip -q -o ${m}.zip -d /tmp/models
+  rm -f ${m}.zip
+done
+
+rm -rf gmsh-getdp-Windows64*
 mkdir gmsh-getdp-Windows64
 curl -O http://geuz.org/gmsh/bin/Windows/gmsh-${GMSH}-Windows64.zip
 curl -O http://geuz.org/getdp/bin/Windows/getdp-${GETDP}-Windows64c.zip
@@ -29,58 +42,70 @@ cp /tmp/README.txt gmsh-getdp-Windows64
 mv /tmp/gmsh-*${GMSH}-Windows/gmsh.exe gmsh-getdp-Windows64
 mv /tmp/gmsh-*${GMSH}-Windows/onelab.py gmsh-getdp-Windows64
 mv /tmp/getdp-*${GETDP}-Windows/getdp.exe gmsh-getdp-Windows64
-mv /tmp/gmsh-*${GMSH}-Windows/LICENSE.txt gmsh-getdp-Windows64/LICENSE_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Windows/LICENSE.txt gmsh-getdp-Windows64/LICENSE_GetDP.txt
-mv /tmp/gmsh-*${GMSH}-Windows/CREDITS.txt gmsh-getdp-Windows64/CREDITS_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Windows/CREDITS.txt gmsh-getdp-Windows64/CREDITS_GetDP.txt
+mv /tmp/gmsh-*${GMSH}-Windows/LICENSE.txt gmsh-getdp-Windows64/LICENSE.txt
+echo "\n\n" >> gmsh-getdp-Windows64/LICENSE.txt
+cat /tmp/getdp-*${GETDP}-Windows/LICENSE.txt >> gmsh-getdp-Windows64/LICENSE.txt
+mv /tmp/gmsh-*${GMSH}-Windows/CREDITS.txt gmsh-getdp-Windows64/CREDITS.txt
+echo "\n\n" >> gmsh-getdp-Windows64/CREDITS.txt
+cat /tmp/getdp-*${GETDP}-Windows/CREDITS.txt >> gmsh-getdp-Windows64/CREDITS.txt
+mv /tmp/gmsh-*${GMSH}-Windows/tutorial gmsh-getdp-Windows64
+cp -R /tmp/models gmsh-getdp-Windows64
 rm -rf /tmp/gmsh-*
 rm -rf /tmp/getdp-*
 zip -r gmsh-getdp-Windows64.zip gmsh-getdp-Windows64
 rm -rf gmsh-getdp-Windows64
 
-rm -rf gmsh-getdp-Windows32
+rm -rf gmsh-getdp-Windows32*
 mkdir gmsh-getdp-Windows32
-curl -O http://geuz.org/gmsh/bin/Windows/gmsh-${GMSH}-Windows.zip
+curl -O http://geuz.org/gmsh/bin/Windows/gmsh-${GMSH}-Windows32.zip
 curl -O http://geuz.org/getdp/bin/Windows/getdp-${GETDP}-Windows32c.zip
-mv gmsh-${GMSH}-Windows.zip /tmp
+mv gmsh-${GMSH}-Windows32.zip /tmp
 mv getdp-${GETDP}-Windows32c.zip /tmp
-unzip -q -o /tmp/gmsh-${GMSH}-Windows.zip -d /tmp
+unzip -q -o /tmp/gmsh-${GMSH}-Windows32.zip -d /tmp
 unzip -q -o /tmp/getdp-${GETDP}-Windows32c.zip -d /tmp
 cp /tmp/README.txt gmsh-getdp-Windows32
 mv /tmp/gmsh-*${GMSH}-Windows/gmsh.exe gmsh-getdp-Windows32
 mv /tmp/gmsh-*${GMSH}-Windows/onelab.py gmsh-getdp-Windows32
 mv /tmp/getdp-*${GETDP}-Windows/getdp.exe gmsh-getdp-Windows32
-mv /tmp/gmsh-*${GMSH}-Windows/LICENSE.txt gmsh-getdp-Windows32/LICENSE_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Windows/LICENSE.txt gmsh-getdp-Windows32/LICENSE_GetDP.txt
-mv /tmp/gmsh-*${GMSH}-Windows/CREDITS.txt gmsh-getdp-Windows32/CREDITS_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Windows/CREDITS.txt gmsh-getdp-Windows32/CREDITS_GetDP.txt
+mv /tmp/gmsh-*${GMSH}-Windows/LICENSE.txt gmsh-getdp-Windows32/LICENSE.txt
+echo "\n\n" >> gmsh-getdp-Windows32/LICENSE.txt
+cat /tmp/getdp-*${GETDP}-Windows/LICENSE.txt >> gmsh-getdp-Windows32/LICENSE.txt
+mv /tmp/gmsh-*${GMSH}-Windows/CREDITS.txt gmsh-getdp-Windows32/CREDITS.txt
+echo "\n\n" >> gmsh-getdp-Windows32/CREDITS.txt
+cat /tmp/getdp-*${GETDP}-Windows/CREDITS.txt >> gmsh-getdp-Windows32/CREDITS.txt
+mv /tmp/gmsh-*${GMSH}-Windows/tutorial gmsh-getdp-Windows32
+cp -R /tmp/models gmsh-getdp-Windows32
 rm -rf /tmp/gmsh-*
 rm -rf /tmp/getdp-*
 zip -r gmsh-getdp-Windows32.zip gmsh-getdp-Windows32
 rm -rf gmsh-getdp-Windows32
 
-rm -rf gmsh-getdp-Linux32
+rm -rf gmsh-getdp-Linux32*
 mkdir gmsh-getdp-Linux32
-curl -O http://geuz.org/gmsh/bin/Linux/gmsh-${GMSH}-Linux.tgz
+curl -O http://geuz.org/gmsh/bin/Linux/gmsh-${GMSH}-Linux32.tgz
 curl -O http://geuz.org/getdp/bin/Linux/getdp-${GETDP}-Linux32c.tgz
-mv gmsh-${GMSH}-Linux.tgz /tmp
+mv gmsh-${GMSH}-Linux32.tgz /tmp
 mv getdp-${GETDP}-Linux32c.tgz /tmp
-tar zxvf /tmp/gmsh-${GMSH}-Linux.tgz -C /tmp
+tar zxvf /tmp/gmsh-${GMSH}-Linux32.tgz -C /tmp
 tar zxvf /tmp/getdp-${GETDP}-Linux32c.tgz -C /tmp
 cp /tmp/README.txt gmsh-getdp-Linux32
 mv /tmp/gmsh-*${GMSH}-Linux/bin/gmsh gmsh-getdp-Linux32
 mv /tmp/gmsh-*${GMSH}-Linux/bin/onelab.py gmsh-getdp-Linux32
 mv /tmp/getdp-*${GETDP}-Linux/bin/getdp gmsh-getdp-Linux32
-mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/LICENSE.txt gmsh-getdp-Linux32/LICENSE_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/LICENSE.txt gmsh-getdp-Linux32/LICENSE_GetDP.txt
-mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/CREDITS.txt gmsh-getdp-Linux32/CREDITS_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/CREDITS.txt gmsh-getdp-Linux32/CREDITS_GetDP.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/LICENSE.txt gmsh-getdp-Linux32/LICENSE.txt
+echo "\n\n" >> gmsh-getdp-Linux32/LICENSE.txt
+cat /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/LICENSE.txt >> gmsh-getdp-Linux32/LICENSE.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/CREDITS.txt gmsh-getdp-Linux32/CREDITS.txt
+echo "\n\n" >> gmsh-getdp-Linux32/CREDITS.txt
+cat /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/CREDITS.txt >> gmsh-getdp-Linux32/CREDITS.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/tutorial gmsh-getdp-Linux32
+cp -R /tmp/models gmsh-getdp-Linux32
 rm -rf /tmp/gmsh-*
 rm -rf /tmp/getdp-*
 zip -r gmsh-getdp-Linux32.zip gmsh-getdp-Linux32
 rm -rf gmsh-getdp-Linux32
 
-rm -rf gmsh-getdp-Linux64
+rm -rf gmsh-getdp-Linux64*
 mkdir gmsh-getdp-Linux64
 curl -O http://geuz.org/gmsh/bin/Linux/gmsh-${GMSH}-Linux64.tgz
 curl -O http://geuz.org/getdp/bin/Linux/getdp-${GETDP}-Linux64c.tgz
@@ -92,16 +117,20 @@ cp /tmp/README.txt gmsh-getdp-Linux64
 mv /tmp/gmsh-*${GMSH}-Linux/bin/gmsh gmsh-getdp-Linux64
 mv /tmp/gmsh-*${GMSH}-Linux/bin/onelab.py gmsh-getdp-Linux64
 mv /tmp/getdp-*${GETDP}-Linux/bin/getdp gmsh-getdp-Linux64
-mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/LICENSE.txt gmsh-getdp-Linux64/LICENSE_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/LICENSE.txt gmsh-getdp-Linux64/LICENSE_GetDP.txt
-mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/CREDITS.txt gmsh-getdp-Linux64/CREDITS_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/CREDITS.txt gmsh-getdp-Linux64/CREDITS_GetDP.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/LICENSE.txt gmsh-getdp-Linux64/LICENSE.txt
+echo "\n\n" >> gmsh-getdp-Linux64/LICENSE.txt
+cat /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/LICENSE.txt >> gmsh-getdp-Linux64/LICENSE.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/CREDITS.txt gmsh-getdp-Linux64/CREDITS.txt
+echo "\n\n" >> gmsh-getdp-Linux64/CREDITS.txt
+cat /tmp/getdp-*${GETDP}-Linux/share/doc/getdp/CREDITS.txt >> gmsh-getdp-Linux64/CREDITS.txt
+mv /tmp/gmsh-*${GMSH}-Linux/share/doc/gmsh/tutorial gmsh-getdp-Linux64
+cp -R /tmp/models gmsh-getdp-Linux64
 rm -rf /tmp/gmsh-*
 rm -rf /tmp/getdp-*
 zip -r gmsh-getdp-Linux64.zip gmsh-getdp-Linux64
 rm -rf gmsh-getdp-Linux64
 
-rm -rf gmsh-getdp-MacOSX
+rm -rf gmsh-getdp-MacOSX*
 mkdir gmsh-getdp-MacOSX
 curl -O http://geuz.org/gmsh/bin/MacOSX/gmsh-${GMSH}-MacOSX.dmg
 curl -O http://geuz.org/getdp/bin/MacOSX/getdp-${GETDP}-MacOSX64c.tgz
@@ -114,12 +143,18 @@ tar zxvf /tmp/getdp-${GETDP}-MacOSX64c.tgz -C /tmp
 cp /tmp/README.txt gmsh-getdp-MacOSX
 cp -R gmsh_mount/Gmsh.app gmsh-getdp-MacOSX
 mv /tmp/getdp-*${GETDP}-MacOSX/bin/getdp gmsh-getdp-MacOSX/Gmsh.app/Contents/MacOS/
-cp gmsh_mount/LICENSE.txt gmsh-getdp-MacOSX/LICENSE_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/LICENSE.txt gmsh-getdp-MacOSX/LICENSE_GetDP.txt
-cp gmsh_mount/CREDITS.txt gmsh-getdp-MacOSX/CREDITS_Gmsh.txt
-mv /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/CREDITS.txt gmsh-getdp-MacOSX/CREDITS_GetDP.txt
+cp gmsh_mount/LICENSE.txt gmsh-getdp-MacOSX/LICENSE.txt
+echo "\n\n" >> gmsh-getdp-MacOSX/LICENSE.txt
+cat /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/LICENSE.txt >> gmsh-getdp-MacOSX/LICENSE.txt
+cp gmsh_mount/CREDITS.txt gmsh-getdp-MacOSX/CREDITS.txt
+echo "\n\n" >> gmsh-getdp-MacOSX/CREDITS.txt
+cat /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/CREDITS.txt >> gmsh-getdp-MacOSX/CREDITS.txt
+cp -R gmsh_mount/tutorial gmsh-getdp-MacOSX
+cp -R /tmp/models gmsh-getdp-MacOSX
 umount gmsh_mount
 rm -rf /tmp/gmsh-*
 rm -rf /tmp/getdp-*
 zip -r gmsh-getdp-MacOSX.zip gmsh-getdp-MacOSX
 rm -rf gmsh-getdp-MacOSX
+
+rm -rf /tmp/models
diff --git a/utils/misc/release_gmsh_getdp.sh b/utils/misc/release_gmsh_getdp.sh
new file mode 100755
index 0000000..46a19c9
--- /dev/null
+++ b/utils/misc/release_gmsh_getdp.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+  echo "Usage: $0 arch [gmsh|getdp]" 1>&2;
+  echo "  with arch in [mac,linux32,linux64,win32,win64][_test]" 1>&2;
+  exit 1;
+fi
+
+if [ $# -lt 2 ] || [ $2 == "gmsh" ]; then
+  echo "========= Building Gmsh =========="
+  cd ${HOME}/src/gmsh
+  svn update
+  cd utils/nightly
+  ctest -VV -S ./gmsh_$1.ctest
+fi
+
+if [ $# -lt 2 ] || [ $2 == "getdp" ]; then
+  echo "========= Building GetDP =========="
+  cd ${HOME}/src/getdp
+  svn update
+  cd utils/nightly
+  ctest -VV -S ./getdp_$1.ctest
+fi
diff --git a/utils/misc/update_copyright.sh b/utils/misc/update_copyright.sh
index 8e77da2..160c220 100755
--- a/utils/misc/update_copyright.sh
+++ b/utils/misc/update_copyright.sh
@@ -1,12 +1,12 @@
 #!/bin/sh -
 
-files=`find ../.. -not -path "*.svn*" -and -not -path "*lib*" -and -not -path "*bin*" -and -not -name "update_copyright.sh" -print0 | xargs -0 grep 'Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle' -sl`
+files=`find ../.. -not -path "*.svn*" -and -not -path "*lib*" -and -not -path "*bin*" -and -not -name "update_copyright.sh" -print0 | xargs -0 grep 'Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle' -sl`
 
 #echo $files
 
 for file in $files 
 do
-sed "s|(C) 1997-2013 C|(C) 1997-2014 C|g" $file > $file.tmp
+sed "s|(C) 1997-2014 C|(C) 1997-2015 C|g" $file > $file.tmp
 echo modified $file
 rm -f $file
 mv $file.tmp $file
diff --git a/utils/solvers/c++/GmshSocket.h b/utils/solvers/c++/GmshSocket.h
index 312d160..1483a31 100644
--- a/utils/solvers/c++/GmshSocket.h
+++ b/utils/solvers/c++/GmshSocket.h
@@ -1,4 +1,4 @@
-// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+// Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 //
 // Permission is hereby granted, free of charge, to any person
 // obtaining a copy of this software and associated documentation
@@ -82,6 +82,7 @@ class GmshSocket{
     GMSH_PARAMETER_CLEAR     = 31,
     GMSH_PARAMETER_UPDATE    = 32,
     GMSH_OPEN_PROJECT        = 33,
+    GMSH_CLIENT_CHANGED      = 34,
     GMSH_OPTION_1            = 100,
     GMSH_OPTION_2            = 101,
     GMSH_OPTION_3            = 102,
@@ -323,11 +324,11 @@ class GmshServer : public GmshSocket{
  public:
   GmshServer() : GmshSocket(), _portno(-1) {}
   virtual ~GmshServer(){}
-  virtual int NonBlockingSystemCall(const char *str) = 0;
+  virtual int NonBlockingSystemCall(const char *exe, const char *args) = 0;
   virtual int NonBlockingWait(double waitint, double timeout, int socket=-1) = 0;
-  // start the client by launching "command" (command is supposed to contain
+  // start the client by launching "exe args" (args is supposed to contain
   // '%s' where the socket name should appear)
-  int Start(const char *command, const char *sockname, double timeout)
+  int Start(const char *exe, const char *args, const char *sockname, double timeout)
   {
     if(!sockname) throw "Invalid (null) socket name";
     _sockname = sockname;
@@ -392,10 +393,10 @@ class GmshServer : public GmshSocket{
       }
     }
 
-    if(command && strlen(command)){
-      char cmd[1024];
-      sprintf(cmd, command, _sockname.c_str());
-      NonBlockingSystemCall(cmd); // starts the solver
+    if((exe && strlen(exe)) || (args && strlen(args))){
+      char s[1024];
+      sprintf(s, args, _sockname.c_str());
+      NonBlockingSystemCall(exe, s); // starts the solver
     }
     else{
       timeout = 0.; // no command launched: don't set a timeout
diff --git a/utils/solvers/c++/onelab.h b/utils/solvers/c++/onelab.h
index 615b4da..fafc38a 100644
--- a/utils/solvers/c++/onelab.h
+++ b/utils/solvers/c++/onelab.h
@@ -38,10 +38,19 @@
 #include <sstream>
 #include "GmshSocket.h"
 
+#ifdef HAVE_ONELAB2
+#include "NetworkUtils.h"
+#include "OnelabAttributes.h"
+#endif
+
 namespace onelab{
 
   // The base parameter class.
-  class parameter{
+#ifdef HAVE_ONELAB2
+  class parameter : public OnelabAttr{
+#else
+  class parameter {
+#endif
   private:
     // the name of the parameter, including its '/'-separated path in the
     // parameter hierarchy. Parameters or subpaths can start with numbers to
@@ -292,6 +301,86 @@ namespace onelab{
       }
       return true;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x05;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = _name.length()+_label.length()+_help.length()+10;
+      for(std::map<std::string, bool>::const_iterator it = getClients().begin(); it != getClients().end(); it++)
+        len += it->first.size()+2;
+      for(std::map<std::string, std::string>::const_iterator it = _attributes.begin(); it != _attributes.end(); it++)
+        len += it->first.size()+it->second.size()+2;
+      return len;
+    }
+    virtual UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = encode(dst, getAttributeType());
+      dst = encode(dst, getAttributeLength());
+
+      dst = encode(dst, (UInt8 *)_name.c_str(), this->_name.length()+1);
+      dst = encode(dst, (UInt8 *)_label.c_str(), this->_label.length()+1);
+      dst = encode(dst, (UInt8 *)_help.c_str(), this->_help.length()+1);
+      dst = encode(dst, (UInt8)_readOnly);
+      dst = encode(dst, (UInt8)_neverChanged);
+      dst = encode(dst, (UInt8)_visible);
+
+      dst = encode(dst, (UInt16)_attributes.size());
+      for(std::map<std::string, std::string>::const_iterator it = _attributes.begin(); it != _attributes.end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+
+      dst = encode(dst, (UInt16)_clients.size());
+      for(std::map<std::string, bool>::const_iterator it = getClients().begin(); it != getClients().end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8)it->second);
+      }
+
+      return dst;
+    }
+    virtual UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt8 tmp;
+      UInt16 n;
+
+      src = parse(src, _name, '\0');
+      src = parse(src, _label, '\0');
+      src = parse(src, _help, '\0');
+      src = parse(src, tmp);
+      this->_readOnly = (bool)tmp;
+      src = parse(src, tmp);
+      this->_neverChanged = (bool)tmp;
+      src = parse(src, tmp);
+      this->_visible = (bool)tmp;
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        std::string key, value;
+        src = parse(src, key, '\0');
+        src = parse(src, value, '\0');
+        setAttribute(key, value);
+      }
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        std::string client;
+        src = parse(src, client, '\0');
+        src = parse(src, tmp);
+        addClient(client, (bool)tmp);
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      std::cout << "Name: " << getName() << std::endl
+        << "Label: " << getLabel() << std::endl
+        << "Help: " << getHelp() << std::endl
+        << "Never changed: " << getNeverChanged() << std::endl
+        << "Changed: " << getChanged() << std::endl
+        << "Visible: " << getVisible() << std::endl;
+    }
+#endif
   };
 
   class parameterLessThan{
@@ -412,6 +501,73 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x06;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength()+sizeof(double)*4+8+sizeof(double)*_choices.size();
+      for(std::map<double, std::string>::const_iterator it = _valueLabels.begin(); it != _valueLabels.end(); it++)
+        len += it->second.size()+1+sizeof(double);
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+
+      dst = encode(dst, _value);
+      dst = encode(dst, _min);
+      dst = encode(dst, _max);
+      dst = encode(dst, _step);
+      dst = encode(dst, (UInt32)_index);
+
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        dst = encode(dst, _choices[i]);
+
+      dst = encode(dst, (UInt16)_valueLabels.size());
+      for(std::map<double, std::string>::const_iterator it = _valueLabels.begin(); it != _valueLabels.end(); it++) {
+        dst = encode(dst, it->first);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt16 n;
+
+      src = parameter::parseAttribute(src, length);
+
+      src = parse(src, _value);
+      src = parse(src, _min);
+      src = parse(src, _max);
+      src = parse(src, _step);
+      src = parse(src, *(UInt32 *)&_index);
+
+      src = parse(src, n);
+      _choices.resize(n);
+      for(unsigned int i = 0; i < n; i++)
+        src = parse(src, _choices[i]);
+
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        double value;
+        std::string label;
+        src = parse(src, value);
+        src = parse(src, label, '\0');
+        setValueLabel(value, label);
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      parameter::showAttribute();
+      std::cout << "Value: " << this->_value << std::endl
+        << "Min: " << this->_min << std::endl
+        << "Max: " << this->_max << std::endl;
+    }
+#endif
   };
 
   // The string class. A string has a mutable "kind": we do not derive
@@ -476,6 +632,51 @@ namespace onelab{
         _choices[i] = getNextToken(msg, pos);
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x07;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const
+    {
+      UInt16 len =  parameter::getAttributeLength();
+      len += _value.size()+_kind.size()+4;
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        len += _choices[i].size()+1;
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+
+      dst = encode(dst, (UInt8 *)_value.c_str(), _value.size()+1);
+      dst = encode(dst, (UInt8 *)_kind.c_str(), _kind.size()+1);
+
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++)
+        dst = encode(dst, (UInt8 *)_choices[i].c_str(), _choices[i].size()+1);
+
+      return dst;
+     }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 length)
+    {
+      UInt16 n;
+      src = parameter::parseAttribute(src, length);
+      src = parse(src, _value, '\0');
+      src = parse(src, _kind, '\0');
+
+      src = parse(src, n);
+      _choices.resize(n);
+      for(unsigned int i=0; i<n; i++) {
+        src = parse(src, _choices[i], '\0');
+      }
+
+      return src;
+    }
+    void showAttribute() const
+    {
+      parameter::showAttribute();
+      std::cout << "Value: " << this->_value << std::endl;
+    }
+#endif
   };
 
   // The region class. A region can be any kind of geometrical entity,
@@ -558,6 +759,63 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x08;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength();
+      len += 2;
+      for(std::set<std::string>::const_iterator it = _value.begin(); it != _value.end(); it++)
+        len += it->size()+1;
+      len += 4;
+      len += 2;
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        len += 2;
+        for(std::set<std::string>::const_iterator it = _choices[i].begin(); it != _choices[i].end(); it++)
+          len += it->size()+1;
+      }
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst);
+      dst = encode(dst, (UInt16)this->_value.size());
+      for(std::set<std::string>::const_iterator it = _value.begin(); it != _value.end(); it++)
+        dst = encode(dst, (UInt8 *)it->c_str(), it->size()+1);
+      dst = encode(dst, (UInt32)_dimension);
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        dst = encode(dst, (UInt16)_choices[i].size());
+        for(std::set<std::string>::const_iterator it = _choices[i].begin(); it != _choices[i].end(); it++)
+          dst = encode(dst, (UInt8 *)it->c_str(), it->size()+1);
+      }
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 len)
+    {
+      src = parameter::parseAttribute(src, len);
+      UInt16 m = 0, n = 0;
+      std::string value;
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, value, '\0');
+      	_value.insert(value);
+      }
+      src = parse(src, *(UInt32 *)&_dimension);
+      src = parse(src, n);
+      _choices.resize(n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, m);
+        for(int j=0; j<m; j++) {
+          src = parse(src, value, '\0');
+          _choices[i].insert(value);
+        }
+      }
+      return src;
+    }
+    void showAttribute() const {}
+#endif
+
   };
 
   // The (possibly piece-wise defined on regions) function class. Functions are
@@ -642,6 +900,69 @@ namespace onelab{
       }
       return pos;
     }
+#ifdef HAVE_ONELAB2
+    static UInt16 attributeType() {return 0x09;}
+    virtual inline UInt16 getAttributeType() const {return this->attributeType();}
+    virtual inline UInt16 getAttributeLength() const {
+      UInt16 len = parameter::getAttributeLength();
+      len += 2;
+      for(std::map<std::string, std::string>::const_iterator it = _value.begin();
+          it != _value.end(); it++)
+        len += 2+it->first.size()+it->second.size();
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        len += 2;
+        for(std::map<std::string, std::string>::const_iterator it = _choices[i].begin();
+            it != _choices[i].end(); it++) {
+          len += 2+it->first.size()+it->second.size();
+        }
+      }
+      return len;
+    }
+    UInt8 *encodeAttribute(UInt8 *dst)
+    {
+      dst = parameter::encodeAttribute(dst),
+      dst = encode(dst, (UInt16)this->_value.size());
+      for(std::map<std::string, std::string>::const_iterator it = _value.begin();
+          it != _value.end(); it++) {
+        dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+        dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+      }
+      dst = encode(dst, (UInt16)_choices.size());
+      for(unsigned int i = 0; i < _choices.size(); i++){
+        dst = encode(dst, (UInt16)_choices[i].size());
+        for(std::map<std::string, std::string>::const_iterator it = _choices[i].begin();
+            it != _choices[i].end(); it++) {
+          dst = encode(dst, (UInt8 *)it->first.c_str(), it->first.size()+1);
+          dst = encode(dst, (UInt8 *)it->second.c_str(), it->second.size()+1);
+        }
+      }
+      return dst;
+    }
+    UInt8 *parseAttribute(UInt8 *src, UInt32 len)
+    {
+      src = parameter::parseAttribute(src, len);
+      UInt16 m = 0, n = 0;
+      std::string key, value;
+      src = parse(src, n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, key, '\0');
+        src = parse(src, value, '\0');
+      	_value[key] = value;
+      }
+      src = parse(src, n);
+      _choices.resize(n);
+      for(int i=0; i<n; i++) {
+        src = parse(src, m);
+        for(int j=0; j<m; j++) {
+          src = parse(src, key, '\0');
+          src = parse(src, value, '\0');
+          _choices[i][key] = value;
+        }
+      }
+      return src;
+    }
+    void showAttribute() const {}
+#endif
   };
 
   // The parameter space, i.e., the set of parameters stored and handled by the
@@ -695,6 +1016,9 @@ namespace onelab{
       }
       else{
         T* newp = new T(p);
+#ifdef HAVE_ONELAB2
+        newp->isInDatabase(true);
+#endif
         if(client.size()) newp->addClient(client, true);
         ps.insert(newp);
       }
@@ -724,6 +1048,16 @@ namespace onelab{
       }
       return true;
     }
+    template <class T> T* _getPtr(std::string name, const std::string client, std::set<T*, parameterLessThan> ps)
+    {
+      T tmp(name);
+      typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp);
+      if(it != ps.end()){
+        if(client.size()) (*it)->addClient(client, true);
+        return *it;
+      }
+      return NULL;
+    }
     void _getAllParameters(std::set<parameter*, parameterLessThan> &ps) const
     {
       ps.insert(_numbers.begin(), _numbers.end());
@@ -770,6 +1104,21 @@ namespace onelab{
              const std::string &client=""){ return _get(ps, name, client, _regions); }
     bool get(std::vector<function> &ps, const std::string &name="",
              const std::string &client=""){ return _get(ps, name, client, _functions); }
+    void getPtr(number **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _numbers);}
+    void getPtr(string **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _strings);}
+    void getPtr(region **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _regions);}
+    void getPtr(function **ptr, const std::string name, const std::string client="")
+      {*ptr = _getPtr(name, client, _functions);}
+    void getAllParameters(std::set<parameter*, parameterLessThan> &ps) const
+    {
+      ps.insert(_numbers.begin(), _numbers.end());
+      ps.insert(_strings.begin(), _strings.end());
+      ps.insert(_regions.begin(), _regions.end());
+      ps.insert(_functions.begin(), _functions.end());
+    }
     unsigned int getNumParameters()
     {
       return (int)(_numbers.size() + _strings.size() + _regions.size() + _functions.size());
@@ -798,7 +1147,7 @@ namespace onelab{
       }
       return false;
     }
-    // set the changed flag for all the parameters that depend on the give
+    // set the changed flag for all the parameters that depend on the given
     // client (or for all parameters if no client name is provided)
     void setChanged(bool changed, const std::string &client="")
     {
@@ -935,7 +1284,6 @@ namespace onelab{
       return false;
     }
   };
-
   // The onelab server: a singleton that stores the parameter space and
   // interacts with onelab clients.
   class server{
@@ -989,6 +1337,10 @@ namespace onelab{
     {
       return _parameterSpace.getChanged(client);
     }
+    bool isRegistered(const std::string &client)
+    {
+      return _clients.count(client);
+    }
     unsigned int getNumParameters(){ return _parameterSpace.getNumParameters(); }
     std::vector<std::string> toChar(const std::string &client="")
     {
@@ -1057,6 +1409,10 @@ namespace onelab{
   private:
     // executable of the client (including filesystem path, if necessary)
     std::string _executable;
+    // treat the executable name as a full command line (will prevent the
+    // escaping of the exe name, and will assume that the command line has been
+    // correcly escaped)
+    bool _treatExecutableAsFullCommandLine;
     // command to login to a remote host (if necessary)
     std::string _remoteLogin;
     // command line option to specify socket
@@ -1067,14 +1423,21 @@ namespace onelab{
     GmshServer *_gmshServer;
   public:
     localNetworkClient(const std::string &name, const std::string &executable,
-                       const std::string &remoteLogin="")
-      : localClient(name), _executable(executable), _remoteLogin(remoteLogin),
-        _socketSwitch("-onelab"), _pid(-1), _gmshServer(0) {}
+                       const std::string &remoteLogin="",
+                       bool treatExecutableAsFullCommandLine=false)
+      : localClient(name), _executable(executable),
+        _treatExecutableAsFullCommandLine(treatExecutableAsFullCommandLine),
+        _remoteLogin(remoteLogin), _socketSwitch("-onelab"), _pid(-1),
+        _gmshServer(0) {}
     virtual ~localNetworkClient(){}
     virtual bool isNetworkClient(){ return true; }
     const std::string &getExecutable(){ return _executable; }
     void setExecutable(const std::string &s){ _executable = s; }
     const std::string &getRemoteLogin(){ return _remoteLogin; }
+    const bool treatExecutableAsFullCommandLine()
+    {
+      return _treatExecutableAsFullCommandLine;
+    }
     void setRemoteLogin(const std::string &s){ _remoteLogin = s; }
     const std::string &getSocketSwitch(){ return _socketSwitch; }
     void setSocketSwitch(const std::string &s){ _socketSwitch = s; }
diff --git a/utils/solvers/python/pend.py b/utils/solvers/python/pend.py
index 7ce01c8..b73e52d 100755
--- a/utils/solvers/python/pend.py
+++ b/utils/solvers/python/pend.py
@@ -7,15 +7,17 @@
 import onelab
 import math, os
 
+c = onelab.client(__file__)
+
 def exportMsh(le1,le2):
-   mshFile = open(onelab.path(__file__, "pend.msh"),'w')
+   mshFile = open(c.getPath("pend.msh"), 'w')
    mshFile.write('$MeshFormat\n2.2 0 8\n$EndMeshFormat\n')
    mshFile.write('$Nodes\n3\n1 0 0 0\n2 0 %s 0\n3 0 %s 0\n$EndNodes\n' %(-le1, -le1-le2))
    mshFile.write('$Elements\n3\n1 1 2 0 1 1 2\n2 1 2 0 1 2 3\n3 15 2 0 2 3\n$EndElements\n')
    mshFile.close()
 
 def exportMshOpt():
-   optFile = open(onelab.path(__file__, "pend.msh.opt"),'w')
+   optFile = open(c.getPath("pend.msh.opt"),'w')
    optFile.write('n = PostProcessing.NbViews - 1;\n')
    optFile.write('If(n >= 0)\nView[n].ShowScale = 0;\nView[n].VectorType = 5;\n')
    optFile.write('View[n].ExternalView = 0;\nView[n].DisplacementFactor = 1 ;\n')
@@ -24,13 +26,11 @@ def exportMshOpt():
    optFile.close()
 
 def exportIter(iter,t,x1,y1,x2,y2):
-   mshFile = open(onelab.path(__file__, "pend.msh"),'a')
+   mshFile = open(c.checkPath("pend.msh"),'a')
    mshFile.write('$NodeData\n1\n"motion"\n1\n\t%f\n3\n\t%d\n3\n' % (t, iter))
    mshFile.write('\t3\n\t1 0 0 0\n\t2 %f %f 0\n\t3 %f %f 0\n$EndNodeData\n' %(x1,y1,x2,y2))
    mshFile.close()
 
-c = onelab.client()
-
 g = 9.8	# acceleration of gravity
 m = 0.3 # mass of pendulum balls
 
@@ -38,7 +38,7 @@ l = c.defineNumber('Geom/arm length [m]', value=1.0)
 time = c.defineNumber('Dyna/time [s]', value=0.0)
 dt = c.defineNumber('Dyna/time step [s]', value=0.001)
 tmax = c.defineNumber('Dyna/max time [s]', value=20)
-refresh = c.defineNumber('Dyna/refresh interval [s]', value=0.05)
+refresh = c.defineNumber('Dyna/refresh interval [s]', value=0.1)
 theta0 = c.defineNumber('Init/initial theta angle [deg]', value=10, 
                          attributes={'Highlight':'Pink'})
 phi0 = c.defineNumber('Init/initial phi angle [deg]', value=180,
@@ -114,7 +114,7 @@ while (time < tmax):
 
       exportMsh(l1, l2)
       exportIter(iter, time, x1, y1+l1, x2, y2+l1+l2)
-      c.mergeFile(onelab.path(__file__, 'pend.msh'))
+      c.mergeFile(c.checkPath('pend.msh'))
       iter += 1
 
 c.setNumber(c.name + '/Progress', value=0)
diff --git a/wrappers/gmshpy/CMakeLists.txt b/wrappers/gmshpy/CMakeLists.txt
index 7a34421..7f3c318 100644
--- a/wrappers/gmshpy/CMakeLists.txt
+++ b/wrappers/gmshpy/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
+# Gmsh - Copyright (C) 1997-2015 C. Geuzaine, J.-F. Remacle
 #
 # See the LICENSE.txt file for license information. Please report all
 # bugs and problems to the public mailing list <gmsh at geuz.org>.
@@ -75,6 +75,12 @@ include_directories(${PYTHON_INCLUDE_PATH})
 set(GMSH_PYTHON_MODULES_INCLUDE_CODE "")
 foreach(module ${SWIG_MODULES})
   set_source_files_properties(${module}.i PROPERTIES CPLUSPLUS ON)
+  # silent the warnings if DISABLE_SWIG_WARNING_FLAG has been set
+  string(COMPARE EQUAL "${DISABLE_SWIG_WARNINGS_FLAG}" "" swig_warnings_enabled)
+  if(NOT swig_warnings_enabled )
+    message("The swig warnings are disabled!")
+    set_source_files_properties(${module}.i PROPERTIES SWIG_FLAGS "${DISABLE_SWIG_WARNINGS_FLAG}")
+  endif(NOT swig_warnings_enabled )
 
   # code backported from CMake git version, see CMake bug 4147
   swig_get_wrapper_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/\${module}.i 
@@ -141,10 +147,12 @@ set (GMSH_PYTHON_EXTRA_INCLUDE
   Mesh/meshGFaceLloyd.h
   contrib/HighOrderMeshOptimizer/OptHomRun.h
   contrib/HighOrderMeshOptimizer/OptHomElastic.h
+  contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
   Post/PViewAsSimpleFunction.h
   Post/PViewDataList.h
   Post/PViewFactory.h
   Numeric/pyramidalBasis.h
+  Numeric/FuncSpaceData.h
   Solver/SElement.h
   Numeric/simpleFunctionPython.h
   Solver/STensor33.h
diff --git a/wrappers/gmshpy/gmshCommon.i b/wrappers/gmshpy/gmshCommon.i
index 1efbdca..668a477 100644
--- a/wrappers/gmshpy/gmshCommon.i
+++ b/wrappers/gmshpy/gmshCommon.i
@@ -1,4 +1,5 @@
 %feature("autodoc", "1");
+#pragma SWIG nowarn=312
 %module gmshCommon
 
 %include std_string.i
@@ -8,6 +9,7 @@
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
 
   #include "Context.h"
diff --git a/wrappers/gmshpy/gmshGeo.i b/wrappers/gmshpy/gmshGeo.i
index 67e3432..9cb1d60 100644
--- a/wrappers/gmshpy/gmshGeo.i
+++ b/wrappers/gmshpy/gmshGeo.i
@@ -1,4 +1,5 @@
 %feature("autodoc", "1");
+#pragma SWIG nowarn=312
 %module gmshGeo
 
 %include std_string.i
@@ -7,6 +8,7 @@
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
 
   #include "GModel.h"
@@ -15,8 +17,8 @@
   #include "GVertex.h"
   #include "GEdge.h"
   #include "GFace.h"
+  #include "GFaceCompound.h"
   #include "GRegion.h"
-  #include "GPoint.h"
   #include "discreteFace.h"
   #include "discreteEdge.h"
   #include "discreteRegion.h"
@@ -49,6 +51,8 @@ namespace std {
   %template(GRegionVector) vector<GRegion*, std::allocator<GRegion*> >;
   %template(MVertexVector) vector< MVertex *,std::allocator< MVertex * > >;
   %template(MElementVector) vector< MElement *,std::allocator< MElement * > >;
+  %template(MTriangleVector) vector< MTriangle *,std::allocator< MTriangle * > >;
+  %template(MQuadrangleVector) vector< MQuadrangle *,std::allocator< MQuadrangle * > >;
   %template(GEdgeVectorVector) vector< std::vector< GEdge *,std::allocator< GEdge * > >,std::allocator< std::vector< GEdge *,std::allocator< GEdge * > > > >;
   %template(GFaceVectorVector) vector< std::vector< GFace *,std::allocator< GFace * > >,std::allocator< std::vector< GFace *,std::allocator< GFace * > > > >;
   %template(GFaceList) list<GFace*, std::allocator<GFace*> >;
@@ -61,6 +65,23 @@ namespace std {
   %template(SPoint3Vector) std::vector<SPoint3, std::allocator<SPoint3> >;
 }
 
+%rename(__add__) *::operator+;
+%rename(__sub__) *::operator-;
+%rename(__neg__) *::operator-();
+%rename(_operator_mult) *::operator*;
+%rename(_operator_assign) *::operator=;
+%rename(_operator_equal) *::operator==;
+%ignore operator+;
+%ignore operator-;
+%ignore operator*;
+%ignore operator==;
+%ignore operator!=;
+%ignore operator double*;
+%ignore *::operator[](int);
+%rename(at) *::operator[];
+%rename(_print) *::print;
+
+
 %include "GmshConfig.h"
 %include "simpleFunction.h"
 %template(simpleFunctionDouble) simpleFunction<double>;
@@ -70,30 +91,42 @@ namespace std {
 }
 
 %include "GModel.h"
+%ignore GPoint::x();
+%ignore GPoint::y();
+%ignore GPoint::z();
 %include "GPoint.h"  
 %include "GEntity.h"
 %include "GVertex.h"
 %apply std::vector<double> &OUTPUT{std::vector<double> &ts}
 %apply std::vector<SPoint3> &OUTPUT{std::vector<SPoint3> &dpts}
 %include "GEdge.h"
+%ignore GFace::computeMeanPlane(std::vector< MVertex *>const&);
 %include "GFace.h"
+%include "GFaceCompound.h"
 %include "GRegion.h"
-%include "GPoint.h"
 %include "discreteFace.h"
 %include "discreteEdge.h"
 %include "discreteVertex.h"
 %include "discreteRegion.h"
 %include "SPoint3.h"
 %include "MElement.h"
+%ignore MVertex::x();
+%ignore MVertex::y();
+%ignore MVertex::z();
 %include "MVertex.h"
 %include "MTriangle.h"
 %include "MPrism.h"
 %include "MHexahedron.h"
 %include "MQuadrangle.h"
 %include "MLine.h"
+%warnfilter(401) Equal_Edge;
+%warnfilter(401) Less_Edge;
 %include "MEdge.h"
+%warnfilter(401) Equal_Face;
+%warnfilter(401) Less_Face;
 %include "MFace.h"
 %include "MPoint.h"
+%ignore SVector3::operator()(int);
 %include "SVector3.h"
 %include "SPoint2.h"
 %include "SBoundingBox3d.h"
@@ -148,3 +181,30 @@ namespace std {
     return p;
   }
 }
+
+%extend GEdge {
+  void setTransfinite(int nbPointsTransfinite, int typeTransfinite = 0, double coeffTransfinite = 1) {
+    $self->meshAttributes.method = MESH_TRANSFINITE;
+    $self->meshAttributes.typeTransfinite = typeTransfinite;
+    $self->meshAttributes.nbPointsTransfinite = std::max(2, nbPointsTransfinite);
+    $self->meshAttributes.coeffTransfinite = coeffTransfinite;
+  }
+}
+
+%extend GFace {
+  void setTransfinite() {
+    $self->meshAttributes.method = MESH_TRANSFINITE;
+  }
+  void setRecombine() {
+    $self->meshAttributes.recombine = 1;
+  }
+}
+
+%extend GRegion {
+  void setTransfinite() {
+    $self->meshAttributes.method = MESH_TRANSFINITE;
+  }
+  void setRecombine() {
+    $self->meshAttributes.recombine3D = 1;
+  }
+}
diff --git a/wrappers/gmshpy/gmshMesh.i b/wrappers/gmshpy/gmshMesh.i
index c35f139..48f7601 100644
--- a/wrappers/gmshpy/gmshMesh.i
+++ b/wrappers/gmshpy/gmshMesh.i
@@ -5,6 +5,7 @@
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
 #if defined(HAVE_MESH)
   #include "Generator.h"
@@ -17,6 +18,9 @@
 #if defined(HAVE_OPTHOM)
   #include "OptHomRun.h"
   #include "OptHomElastic.h"
+  #include "OptHomFastCurving.h"
+  #include "MeshQualityOptimizer.h"
+  #include "CADDistances.h"
 #endif
 #if defined(HAVE_METIS) || defined(HAVE_CHACO)
   #include "meshPartition.h"
@@ -46,6 +50,7 @@ namespace std {
 %include "GmshConfig.h"
 #if defined(HAVE_MESH)
 %include "Generator.h"
+#pragma SWIG nowarn=314
 %include "DivideAndConquer.h"
 #if defined(HAVE_BFGS)
 %include "meshGFaceLloyd.h"
@@ -55,10 +60,14 @@ namespace std {
 #if defined(HAVE_OPTHOM)
 %include "OptHomRun.h"
 %include "OptHomElastic.h"
+%include "OptHomFastCurving.h"
+%include "MeshQualityOptimizer.h"
+%include "CADDistances.h"
 #endif
 #if defined(HAVE_METIS) || defined(HAVE_CHACO)
 %include "meshPartition.h"
 #endif
+%warnfilter(401) FieldManager;
 %include "Field.h"
 %extend FieldManager {
   int addPythonField(PyObject *callback, int id = -1) {
diff --git a/wrappers/gmshpy/gmshNumeric.i b/wrappers/gmshpy/gmshNumeric.i
index 9fca5e8..3f3df01 100644
--- a/wrappers/gmshpy/gmshNumeric.i
+++ b/wrappers/gmshpy/gmshNumeric.i
@@ -1,11 +1,13 @@
 %feature("autodoc", "1");
 %module gmshNumeric
+#pragma SWIG nowarn=325
 
 %include std_string.i
 %include std_vector.i
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
 
   #include "GaussIntegration.h"
@@ -19,8 +21,12 @@
   #include "pyramidalBasis.h"
 %}
 
+%rename("_operator_assign") *::operator=;
+%rename("_print") *::print;
 %include "GaussIntegration.h"
 %include "JacobianBasis.h"
+%ignore fullMatrix<double>::operator()(int, int);
+%ignore fullVector<double>::operator()(int);
 %include "fullMatrix.h"
 %include "simpleFunction.h"
 %template(fullMatrixDouble) fullMatrix<double>;
@@ -31,3 +37,15 @@
 %include "polynomialBasis.h"
 %include "pyramidalBasis.h"
 %include "BasisFactory.h"
+%extend nodalBasis {
+  fullMatrix<double> F(const fullMatrix<double> &xi) {
+    fullMatrix<double> psi;
+    $self->f(xi, psi);
+    return psi;
+  }
+  fullMatrix<double> DF(const fullMatrix<double> &xi) {
+    fullMatrix<double> dpsi;
+    $self->df(xi, dpsi);
+    return dpsi;
+  }
+}
diff --git a/wrappers/gmshpy/gmshPost.i b/wrappers/gmshpy/gmshPost.i
index d30cc19..f32630b 100644
--- a/wrappers/gmshpy/gmshPost.i
+++ b/wrappers/gmshpy/gmshPost.i
@@ -7,6 +7,7 @@
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
   #include "fullMatrix.h"
 #if defined(HAVE_POST)
@@ -16,6 +17,7 @@
   #include "PViewFactory.h"
   #include "PViewData.h"
   #include "PViewAsSimpleFunction.h"
+  #include "PViewDataGModel.h"
 #endif
 %}
 
@@ -34,6 +36,7 @@ namespace std {
 %include "simpleFunction.h"
 %template(simpleFunctionDouble) simpleFunction<double>;
 %include "PViewAsSimpleFunction.h"
+%include "PViewDataGModel.h"
 %include "Plugin.h"
 %include "PluginManager.h"
 #endif
diff --git a/wrappers/gmshpy/gmshSolver.i b/wrappers/gmshpy/gmshSolver.i
index 881d8ad..630d1c1 100644
--- a/wrappers/gmshpy/gmshSolver.i
+++ b/wrappers/gmshpy/gmshSolver.i
@@ -6,10 +6,12 @@
 %import "gmshtypemaps.i"
 
 %{
+  #undef HAVE_DLOPEN
   #include "GmshConfig.h"
 #if defined(HAVE_SOLVER)
   #include "dofManager.h"
   #include "elasticitySolver.h"
+  #include "thermicSolver.h"
   #include "frameSolver.h"
   #include "linearSystem.h"
   #include "linearSystemCSR.h"
@@ -19,11 +21,14 @@
 #endif
 %}
 
+%rename ("_print") *::print;
+
 %include "GmshConfig.h"
 #if defined(HAVE_SOLVER)
 %include "dofManager.h"
 %template(dofManagerDouble) dofManager<double>;
 %include "elasticitySolver.h"
+%include "thermicSolver.h"
 %include "frameSolver.h"
 %include "linearSystem.h"
 %template(linearSystemDouble) linearSystem<double>;
@@ -34,6 +39,9 @@
 %include "linearSystemFull.h"
 %template(linearSystemFullDouble) linearSystemFull<double> ;
 #if defined(HAVE_PETSC)
+#if defined(HAVE_PETSC4PY)
+%include petsc4py/petsc4py.i
+#endif
 %include "linearSystemPETSc.h"
 %template(linearSystemPETScDouble) linearSystemPETSc<double>;
 %template(linearSystemPETScBlockDouble) linearSystemPETSc<fullMatrix<double> >;
diff --git a/wrappers/gmshpy/gmshtypemaps.i b/wrappers/gmshpy/gmshtypemaps.i
index fa9ec33..76acb7c 100644
--- a/wrappers/gmshpy/gmshtypemaps.i
+++ b/wrappers/gmshpy/gmshtypemaps.i
@@ -6,6 +6,7 @@
 }
 
 %fragment("fullMatrixConversion", "header", fragment="fullMatrixConversionInit") {
+  %#undef HAVE_DLOPEN
   %#include "fullMatrix.h"
   %#include "GmshConfig.h"
   %#ifdef HAVE_NUMPY
@@ -15,6 +16,7 @@
   %#define NPY_ARRAY_FARRAY NPY_FARRAY
   %#define NPY_ARRAY_ALIGNED NPY_ALIGNED
   %#define NPY_ARRAY_F_CONTIGUOUS NPY_F_CONTIGUOUS
+  %#define NPY_ARRAY_WRITEABLE NPY_WRITEABLE
   %#define PyArray_SetBaseObject(a, b) PyArray_BASE(a) = b
   %#endif
   %#endif
@@ -123,6 +125,31 @@
     }
     return array;
   }
+  PyObject *fullMatrix2PyArrayConst(const fullMatrix<double> &fm)
+  {
+    npy_intp dims[2] = {fm.size1(), fm.size2()};
+    double *data = (double*)fm.getDataPtr();
+    // do not copy data
+    PyObject *array = PyArray_New(&PyArray_Type, 2, dims, NPY_DOUBLE, NULL, (void*)data, 0, NPY_ARRAY_F_CONTIGUOUS, NULL);
+    PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED);
+    return array;
+  }
+  PyObject *fullMatrix2PyArrayProxy(const fullMatrix<double> &fm)
+  {
+    npy_intp dims[2] = {fm.size1(), fm.size2()};
+    double *data = (double*)fm.getDataPtr();
+    PyObject *array = PyArray_New(&PyArray_Type, 2, dims, NPY_DOUBLE, NULL, (void*)data, 0, NPY_ARRAY_F_CONTIGUOUS, NULL);
+    PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED |NPY_ARRAY_WRITEABLE);
+    return array;
+  }
+  PyObject *fullVector2PyArrayProxy(fullVector<double> &fv)
+  {
+    npy_intp dims[1] = {fv.size()};
+    double *data = &fv.operator()(0);
+    PyObject *array = PyArray_New(&PyArray_Type, 1, dims, NPY_DOUBLE, NULL, (void*)data, 0, NPY_ARRAY_F_CONTIGUOUS, NULL);
+    PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED | NPY_ARRAY_WRITEABLE);
+    return array;
+  }
   %#endif
 }
 
@@ -176,6 +203,17 @@
 %typemap(out, fragment="fullMatrixConversion") fullMatrix<double> {
   $result = fullMatrix2PyArray($1);
 }
-#endif
 
+%typemap(out, fragment="fullMatrixConversion") const fullMatrix<double>& {
+  $result = fullMatrix2PyArrayConst(*$1);
+}
+
+%typemap(out, fragment="fullMatrixConversion") fullMatrix<double>& {
+  $result = fullMatrix2PyArrayProxy(*$1);
+}
+
+%typemap(out, fragment="fullMatrixConversion") fullVector<double>& {
+  $result = fullVector2PyArrayProxy(*$1);
+}
+#endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gmsh.git



More information about the debian-science-commits mailing list